Browse Source

Merge branch 'dev-用户反馈' into yantai_master

jly/task002
dai 3 years ago
parent
commit
67e5095a20
  1. 4
      src/assets/scss/modules/search.scss
  2. 1
      src/views/components/editResi.vue
  3. 200
      src/views/components/screen-echarts-frame/index.vue
  4. 1457
      src/views/modules/base/communityYantai/community.vue
  5. 176
      src/views/modules/base/communityYantai/cpts/agency-info.vue
  6. 176
      src/views/modules/base/communityYantai/cpts/grid-info.vue
  7. 535
      src/views/modules/base/communityYantai/cpts/map.vue
  8. 1
      src/views/modules/base/epidemic/antiInfo.vue
  9. 2
      src/views/modules/base/epidemic/natInfo/natList.vue
  10. 86
      src/views/modules/base/epidemic/static/lineOption.js
  11. 107
      src/views/modules/base/epidemic/static/options.js
  12. 525
      src/views/modules/base/epidemic/static/static.vue
  13. 133
      src/views/modules/base/epidemic/static/vaccineCountTable.vue
  14. 46
      src/views/modules/base/organization/organization.vue
  15. 193
      src/views/modules/base/userinfo/userInfoDetail.vue
  16. 407
      src/views/modules/base/userinfo/userInfoList.vue
  17. 377
      src/views/modules/communityParty/dyhx/crateForm.vue
  18. 176
      src/views/modules/communityParty/dyhx/options.js
  19. 1183
      src/views/modules/communityParty/dyhx/party.vue
  20. 559
      src/views/modules/communityParty/organization/finishList.vue
  21. 704
      src/views/modules/communityParty/organization/index.vue
  22. 207
      src/views/modules/communityParty/organization/orgDetail.vue
  23. 521
      src/views/modules/communityParty/organization/orgForm.vue
  24. 71
      src/views/modules/communityService/estateManagement/cpts/detail.vue
  25. 205
      src/views/modules/communityService/estateManagement/cpts/edit.vue
  26. 336
      src/views/modules/communityService/estateManagement/estateManagement.vue
  27. 3
      src/views/modules/communityService/worklog/workLog.vue
  28. 6
      src/views/modules/partymember/icpartyorgtree.vue
  29. 221
      src/views/modules/partymember/lookMember.vue
  30. 694
      src/views/modules/shequ/index.vue
  31. 2
      src/views/modules/shequzhili/event/cpts/process-form.vue
  32. 2
      src/views/modules/shequzhili/event/eventList.vue
  33. 148
      src/views/modules/shequzhili/htgl/cpts/htglInfo.vue
  34. 324
      src/views/modules/shequzhili/htgl/index.vue
  35. 142
      src/views/modules/shequzhili/tuceng/anquan/xuncharecord/icenterprisechangerecord-add-or-update.vue
  36. 358
      src/views/modules/shequzhili/tuceng/anquan/xuncharecord/icenterprisechangerecord.vue
  37. 328
      src/views/modules/visual/communityGovern/shijianchuli/shijianchulifenxi copy 2.vue
  38. 740
      src/views/modules/visual/communityGovern/shijianchuli/shijianchulifenxi copy.vue
  39. 436
      src/views/modules/workSys/feedbackDetail.vue
  40. 450
      src/views/modules/workSys/feedbackList.vue

4
src/assets/scss/modules/search.scss

@ -218,7 +218,7 @@
align-items: center;
.notice-btn {
width: 50px;
width: 90px;
background-color: #3e8ef7;
color: #fff;
text-align: center;
@ -227,7 +227,7 @@
}
.notice-list {
// @include toe;
width: calc(100% - 70px);
width: calc(100% - 110px);
// height: 24px;
// overflow: hidden;
a {

1
src/views/components/editResi.vue

@ -311,7 +311,6 @@
import { isCard, isMobile, isPhone } from '@/utils/validate'
import { requestPost } from "@/js/dai/request";
export default {
name: 'editForm',
props: {

200
src/views/components/screen-echarts-frame/index.vue

@ -0,0 +1,200 @@
<template>
<div>
<div v-show="!noData"
class="screenEchartsFrame"
ref="screenEchartsFrame"></div>
<screen-nodata v-show="noData"
class="nodata"></screen-nodata>
</div>
</template>
<script>
import * as echarts from 'echarts';
import ScreenNodata from "@/views/modules/visual/components/screen-nodata";
export default {
name: 'screen-echarts-frame',
data () {
return {
myChart: '',
noData: false,
}
},
props: {
chartMethod: {
type: Function
}
},
mounted () {
this.initChart()
window.onresize = () => {
this.myChart.resize()
}
},
beforeDestroy () {
// echarts
if (this.myChart) this.myChart.dispose()
},
watch: {},
components: {
ScreenNodata,
},
methods: {
initChart () {
this.$nextTick(() => {
const dom = this.$refs.screenEchartsFrame
this.myChart = echarts.init(dom)
// this.myChart.setOption(this.chartMethod());
this.$emit('myChartMethod', this.myChart)
})
},
//pie
handleClick (fun) {
this.myChart.on('click', fun);
},
//
setNoData (nodata) {
this.noData = nodata
},
//
highLight (index) {
this.myChart.dispatchAction({
type: 'highlight',
seriesIndex: 1,
dataIndex: index
});
},
//
downplay (index) {
this.myChart.dispatchAction({
type: 'downplay',
seriesIndex: 0,
});
},
// option
setOption (option) {
this.myChart.setOption(option)
},
// option
getOption () {
if (this.myChart) {
return this.myChart.getOption()
} else {
return null
}
},
//
resize () {
if (this.myChart) {
this.myChart.resize()
}
},
clear () {
if (this.myChart) {
this.myChart.clear()
}
},
showLoading () {
if (this.myChart) {
this.$nextTick(() => {
this.myChart.showLoading({
text: '',
color: '#29cdff',
textColor: '#29cdff',
maskColor: 'rgba(255, 255, 255, 0)',
zlevel: 0
})
})
}
},
hideLoading () {
if (this.myChart) {
this.myChart.hideLoading()
}
},
// 使
tooltipAnimate (chart, length) {
//
this.timeTicket && clearInterval(this.timeTicket)
const count = 0
//
this._action(chart, count, length)
chart && //
chart.on('mouseover', params => {
this._cleanAction(chart, params)
})
//
chart &&
chart.on('mouseout', () => {
this._action(chart, count, length)
})
},
// tooltipaction
_action (chart, count, length) {
this.timeTicket && clearInterval(this.timeTicket)
this.timeTicket = setInterval(() => {
if (!chart) {
clearInterval(this.timeTicket)
return
}
chart &&
chart.dispatchAction({
type: 'downplay',
seriesIndex: 0
})
chart &&
chart.dispatchAction({
type: 'highlight',
seriesIndex: 0,
dataIndex: count % length
})
chart &&
chart.dispatchAction({
type: 'showTip',
seriesIndex: 0,
dataIndex: count % length
})
count++
}, 1000 * 3)
},
_cleanAction (chart, params) {
this.timeTicket && clearInterval(this.timeTicket)
if (!chart) {
clearInterval(this.timeTicket)
return
}
chart &&
chart.dispatchAction({
type: 'downplay',
seriesIndex: 0
})
chart &&
chart.dispatchAction({
type: 'highlight',
seriesIndex: 0,
dataIndex: params.dataIndex
})
chart &&
chart.dispatchAction({
type: 'showTip',
seriesIndex: 0,
dataIndex: params.dataIndex
})
}
}
}
</script>
<style lang="scss" scoped>
.screenEchartsFrame {
width: 100%;
height: 100%;
}
</style>

1457
src/views/modules/base/communityYantai/community.vue

File diff suppressed because it is too large

176
src/views/modules/base/communityYantai/cpts/agency-info.vue

@ -0,0 +1,176 @@
<template>
<div class="m-info">
<div class="btn-close" @click="off">
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true">
<use xlink:href="#icon-close"></use>
</svg>
</div>
<div class="info">
<div class="title">{{ info.agencyName || '--' }}</div>
<div class="item">
<div class="field">组织区划</div>
<div class="value">{{ info.areaName || '--' }}</div>
</div>
<div class="item">
<div class="field">组织编码</div>
<div class="value">{{ info.areaCode || '--' }}</div>
</div>
<div class="item">
<div class="field">负责人</div>
<div class="value">{{ info.contacts || '--' }}</div>
</div>
<div class="item">
<div class="field">联系电话</div>
<div class="value">{{ info.mobile || '--' }}</div>
</div>
<div class="item">
<div class="field">组织简介</div>
<div class="value">{{ info.remark || '--' }}</div>
</div>
<div class="item" v-if="mapData">
<div class="field">管辖范围</div>
<div class="value-map">
<grid-map ref="map" :srcGridData="mapData" :pitch="0" />
</div>
</div>
</div>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import gridMap from "./map";
export default {
components: { gridMap },
props: {
agencyId: {
//
type: String,
default: "",
},
},
data() {
return {
info: {
agencyId: "", // ID
level: "",
agencyName: "",
areaCode: "",
areaName: "",
contacts: "",
mobile: "",
remark: "",
},
mapData: null,
displayed: false,
};
},
computed: {},
mounted() {
if (this.agencyId) {
this.getInfo();
this.getMapData();
}
},
watch: {
agencyId() {
this.mapData = null;
this.getInfo();
this.getMapData();
},
},
methods: {
off() {
this.$emit("close");
},
async getInfo() {
const url = "/gov/org/agency/agencydetail";
let params = {
agencyId: this.agencyId,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.info = data;
} else {
this.$message.error(msg);
}
},
async getMapData() {
const url = "/gov/org/agency/maporg";
let params = {
level: "agency",
orgId: this.agencyId,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
if (data.coordinates) {
this.mapData = data;
}
} else {
this.$message.error(msg);
}
},
},
};
</script>
<style lang="scss" scoped>
.m-info {
position: relative;
width: 300px;
background-color: #ffffff;
box-shadow: 0px 6px 16px 0px rgba(0, 0, 0, 0.08),
0px 3px 6px -4px rgba(0, 0, 0, 0.12);
padding: 15px;
.btn-close {
position: absolute;
top: 0;
right: 0;
font-size: 15px;
color: #aaaaaa;
padding: 15px;
cursor: pointer;
&:hover {
color: #666666;
}
}
.info {
.title {
font-size: 18px;
font-weight: bold;
line-height: 30px;
}
.item {
display: flex;
flex-wrap: wrap;
line-height: 24px;
.field {
width: 30%;
}
.value {
width: 70%;
}
.value-map {
width: 100%;
height: 200px;
}
}
}
}
</style>

176
src/views/modules/base/communityYantai/cpts/grid-info.vue

@ -0,0 +1,176 @@
<template>
<div class="m-info">
<div class="btn-close" @click="off">
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true">
<use xlink:href="#icon-close"></use>
</svg>
</div>
<div class="info">
<div class="title">{{ info.gridName || '--' }}</div>
<div class="item">
<div class="field">组织区划</div>
<div class="value">{{ info.areaName || '--' }}</div>
</div>
<div class="item">
<div class="field">组织编码</div>
<div class="value">{{ info.areaCode || '--' }}</div>
</div>
<div class="item">
<div class="field">负责人</div>
<div class="value">{{ info.contacts || '--' }}</div>
</div>
<div class="item">
<div class="field">联系电话</div>
<div class="value">{{ info.mobile || '--' }}</div>
</div>
<div class="item">
<div class="field">网格类型</div>
<div class="value">{{ info.gridTypeName || '--' }}</div>
</div>
<div class="item" v-if="mapData">
<div class="field">管辖范围</div>
<div class="value-map">
<grid-map ref="map" :srcGridData="mapData" :pitch="0" />
</div>
</div>
</div>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import gridMap from "./map";
export default {
components: { gridMap },
props: {
gridId: {
//
type: String,
default: "",
},
},
data() {
return {
info: {
gridId: "", // ID
level: "",
gridName: "",
areaCode: "",
areaName: "",
contacts: "",
mobile: "",
remark: "",
},
mapData: null,
displayed: false,
};
},
computed: {},
mounted() {
if (this.gridId) {
this.getInfo();
this.getMapData();
}
},
watch: {
gridId() {
this.mapData = null;
this.getInfo();
this.getMapData();
},
},
methods: {
off() {
this.$emit("close");
},
async getInfo() {
const url = "/gov/org/grid/griddetail";
let params = {
gridId: this.gridId,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.info = data;
} else {
this.$message.error(msg);
}
},
async getMapData() {
const url = "/gov/org/agency/maporg";
let params = {
level: "grid",
orgId: this.gridId,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
if (data.coordinates) {
this.mapData = data;
}
} else {
this.$message.error(msg);
}
},
},
};
</script>
<style lang="scss" scoped>
.m-info {
position: relative;
width: 300px;
background-color: #ffffff;
box-shadow: 0px 6px 16px 0px rgba(0, 0, 0, 0.08),
0px 3px 6px -4px rgba(0, 0, 0, 0.12);
padding: 15px;
.btn-close {
position: absolute;
top: 0;
right: 0;
font-size: 15px;
color: #aaaaaa;
padding: 15px;
cursor: pointer;
&:hover {
color: #666666;
}
}
.info {
.title {
font-size: 18px;
font-weight: bold;
line-height: 30px;
}
.item {
display: flex;
flex-wrap: wrap;
line-height: 24px;
.field {
width: 30%;
}
.value {
width: 70%;
}
.value-map {
width: 100%;
height: 200px;
}
}
}
}
</style>

535
src/views/modules/base/communityYantai/cpts/map.vue

@ -0,0 +1,535 @@
<template>
<div class="m-map" :class="{ 'z-td': mapType == 'td' }">
<div id="map"></div>
</div>
</template>
<script>
import nextTick from "dai-js/tools/nextTick";
import {
Scene,
PolygonLayer,
LineLayer,
RasterLayer,
PointLayer,
} from "@antv/l7";
import { GaodeMap, Map } from "@antv/l7-maps";
import { spliceIntoChunks } from "@/utils/index";
import { mapType, searchNearby } from "@/utils/dai-map";
import tdtWp from "@/utils/tdt-wp";
import tdtWpZw from "@/utils/tdt-wp-zw";
let myMap;
let scene;
let polygonLayer;
let lineLayer;
let textLayer;
let posLayer;
let circleLayer;
export default {
name: "l7",
inject: ["refresh"],
data() {
return {
mapType,
mapStyleType: "light",
// srcGridData: {},
darkStyle: {
style: "amap://styles/blue",
polygonColor: [
"rgba(255, 100, 60, 0.5)",
"rgba(43, 231, 253, 0.35)",
"rgba(255, 255, 50, 0.35)",
],
lineColor: [
"rgba(255, 180, 150, 0.9)",
"rgba(43, 231, 253, 0.7)",
"rgba(255, 255, 50, 0.7)",
],
circleColor: [
"rgba(255, 180, 150, 0.99)",
"rgba(43, 231, 253, 0.99)",
"rgba(255, 255, 50, 0.99)",
],
textColor: [
"rgba(255, 100, 60, 0.99)",
"rgba(43, 231, 253, 0.99)",
"rgba(255, 255, 50, 0.99)",
],
textStrokeColor: "#fff",
},
lightStyle: {
style: "amap://styles/whitesmoke",
polygonColor: [
"rgba(255, 100, 60, 0.3)",
"rgba(43, 231, 253, 0.3)",
"rgba(255, 255, 50, 0.3)",
],
lineColor: [
"rgba(220, 150, 120, 0.9)",
"rgba(33, 201, 223, 0.8)",
"rgba(200, 200, 50, 0.9)",
],
circleColor: [
"rgba(255, 180, 150, 0.99)",
"rgba(13, 181, 203, 0.8)",
"rgba(255, 255, 50, 0.99)",
],
textColor: [
"rgba(200, 50, 10, 0.99)",
"rgba(0, 130, 153, 0.99)",
"rgba(120, 120, 0, 0.99)",
],
textStrokeColor: "#666",
},
};
},
props: {
pitch: {
type: Number,
default: 60,
},
srcGridData: {
type: Object,
default: null,
},
},
components: {},
async mounted() {
//
window._AMapSecurityConfig = {
securityJsCode: "92ea2c965c6cf1ba7ee3a8fe01449ef2",
};
this.iniMap();
},
computed: {
polygonData() {
const { srcGridData } = this;
if (srcGridData.coordinates == "") {
return { type: "FeatureCollection", features: [] };
}
const polygon = [
...[srcGridData]
.filter((item) => item.coordinates.length > 0)
.map((item) => ({
type: "Feature",
properties: {
// id: item.id,
// name: item.name,
// level: item.level,
center: [item.longitude, item.latitude],
...item,
},
geometry: {
type: "Polygon",
coordinates: [
spliceIntoChunks(
item.coordinates
.split(",")
.map((item) => parseFloat(item)),
2
).filter((item) => item.length == 2),
],
},
})),
];
return { type: "FeatureCollection", features: polygon };
},
polygonDotData() {
const { srcGridData } = this;
if (srcGridData.coordinates == "") {
return { type: "FeatureCollection", features: [] };
}
const polygon = [
...[srcGridData]
.filter((item) => item.coordinates.length > 0)
.map((item) => ({
type: "Feature",
properties: {
// id: item.id,
// name: item.name,
// level: item.level,
center: [item.longitude, item.latitude],
...item,
},
geometry: {
type: "Polygon",
coordinates: [
item.latitude
? [[item.longitude, item.latitude]]
: spliceIntoChunks(
item.coordinates
.split(",")
.map((item) =>
parseFloat(item)
),
2
).filter((item) => item.length == 2),
],
},
})),
];
return { type: "FeatureCollection", features: polygon };
},
},
watch: {
srcGridData(val, oldValue) {
if (oldValue == null) {
this.iniMap();
} else {
this.updateGrid();
}
this.zoomInABit();
},
dotList(val, oldValue) {
this.updateDot();
},
dotList2(val, oldValue) {
this.updateDot();
},
},
methods: {
iniMap() {
const { darkStyle, lightStyle, srcGridData } = this;
if (!srcGridData) return false;
let styleConfig = darkStyle;
if (this.mapStyleType == "light") {
styleConfig = lightStyle;
}
const iniCenter = [
srcGridData.longitude ||
this.$store.state.user.longitude ||
116.39743841556731,
srcGridData.latitude ||
this.$store.state.user.latitude ||
39.9088810666821,
];
if (mapType != "qq") {
myMap = new Map({
center: iniCenter,
zoom: 18,
});
} else {
myMap = new GaodeMap({
pitch: this.pitch,
style: styleConfig.style,
center: iniCenter,
token: "fc14b42e0ca18387866d68ebd4f150c1",
zoom: 18,
isHotspot: false,
resizeEnable: true,
doubleClickZoom: false,
});
}
scene = new Scene({
id: "map",
logoVisible: false,
map: myMap,
});
scene.on("loaded", async () => {
if (mapType == "td") {
this.iniMapBase(scene);
} else if (mapType == "tdzw") {
this.iniMapBase2(scene);
}
this.iniMapGrid(scene);
await nextTick(0);
this.zoomInABit();
});
},
//
iniMapBase(scene) {
console.log("-----------------iniMapBase");
//
const baseLayer = new RasterLayer({
zIndex: 1,
});
baseLayer
.source(
"http://t7.tianditu.com/DataServer?T=vec_w&tk=8a08c117ab9ee45d508686b01cc8d397&x={x}&y={y}&l={z}",
{
parser: {
type: "rasterTile",
tileSize: 256,
// minZoom: 6,
// maxZoom: 15,
zoomOffset: 0,
},
}
)
.style({
opacity: 0.7,
});
//
const annotionLayer = new RasterLayer({
zIndex: 2,
});
annotionLayer
.source(
"http://t7.tianditu.com/DataServer?T=cva_w&tk=8a08c117ab9ee45d508686b01cc8d397&x={x}&y={y}&l={z}",
{
parser: {
type: "rasterTile",
tileSize: 256,
// minZoom: 6,
// maxZoom: 15,
zoomOffset: 0,
},
}
)
.style({
opacity: 0.5,
});
scene.addLayer(baseLayer);
scene.addLayer(annotionLayer);
},
//
iniMapBase2(scene) {
console.log("-----------------iniMapBase");
//
const baseLayer = new RasterLayer({
zIndex: 1,
});
baseLayer
.source(tdtWpZw.vec, {
parser: {
type: "rasterTile",
tileSize: 256,
zoomOffset: 0,
},
})
.style({
opacity: 0.7,
});
scene.addLayer(baseLayer);
},
iniMapGrid(scene) {
const { darkStyle, lightStyle, polygonData, polygonDotData } = this;
let styleConfig = darkStyle;
if (this.mapStyleType == "light") {
styleConfig = lightStyle;
}
console.log("地图初始化数据", polygonData);
polygonLayer = new PolygonLayer({
autoFit: true,
})
// .size(0)
.source(polygonData)
.color("name", styleConfig.polygonColor)
// .shape("extrude")
.shape("fill")
.style({
opacityLinear: {
enable: true, // true - false
dir: "out", // in - out
},
opacity: 1,
// heightfixed: true,
// pickLight: true,
raisingHeight: 0,
// sourceColor: "#333",
// targetColor: "rgba(255,255,255, 0.5)",
});
scene.addLayer(polygonLayer);
lineLayer = new LineLayer({
zIndex: 2,
name: "line2",
})
.source(polygonData)
.shape("line")
.size(1)
.color("name", styleConfig.lineColor)
.style({
opacity: 1,
})
.animate({
interval: 1, //
duration: 2, //
trailLength: 2, // 线
});
scene.addLayer(lineLayer);
circleLayer = new PolygonLayer({
zIndex: 3,
})
.source(polygonDotData)
.color("name", styleConfig.circleColor)
.shape("circle")
.active(true)
.animate(true)
.size(50)
.style({
offsets: [0, -10], // [, ]
opacity: 1,
});
scene.addLayer(circleLayer);
scene.addImage(
"pos-red",
require("@/assets/img/shuju/grid/pos-red.png")
);
scene.addImage(
"pos-green",
require("@/assets/img/shuju/grid/pos-green.png")
);
scene.addImage(
"pos-yellow",
require("@/assets/img/shuju/grid/pos-yellow.png")
);
posLayer = new PolygonLayer({
zIndex: 4,
})
.source(polygonDotData)
.shape("name", ["pos-red", "pos-green", "pos-yellow"])
.size(12)
.style({
offsets: [0, 8], // [, ]
// rotation: 60,
// layerType: "fillImage",
});
scene.addLayer(posLayer);
textLayer = new PolygonLayer({
zIndex: 20,
})
.source(polygonDotData)
.color("name", styleConfig.textColor)
.shape("name", "text")
.size(16)
.style({
textAnchor: "center", // center|left|right|top|bottom|top-left
textOffset: [0, 40], // [, ]
spacing: 2, //
padding: [2, 2], // padding []
stroke: styleConfig.textStrokeColor, //
strokeWidth: 0.1, //
strokeOpacity: 0.8,
textAllowOverlap: true,
})
.active(true);
scene.addLayer(textLayer);
polygonLayer.on("mousemove", (e) => {
polygonLayer.style({
raisingHeight: 0,
});
});
polygonLayer.on("click", (e) => {
console.log(e.feature.properties);
this.$emit("clickAgency", e.feature.properties);
});
polygonLayer.on("unmousemove", (e) => {
polygonLayer.style({
raisingHeight: 0,
});
});
},
//
zoomInABit() {
let current = scene.getZoom();
scene.setZoomAndCenter(current + 0.5);
},
shiftMapStyle(type) {
this.mapStyleType = type;
localStorage.setItem("mapStyle", type);
this.refresh();
},
updateMap() {
this.updateGrid();
},
updateGrid() {
const { polygonData, polygonDotData } = this;
if (polygonLayer) {
polygonLayer.setData(polygonData);
lineLayer.setData(polygonData);
textLayer.setData(polygonDotData);
posLayer.setData(polygonDotData);
circleLayer.setData(polygonDotData);
}
},
},
};
</script>
<style lang="scss" scoped>
.m-map {
position: relative;
height: 100%;
border-radius: 10px;
overflow: hidden;
&.z-td {
#app {
/deep/ .l7-scene {
canvas {
background-color: rgba(43, 51, 73, 0.82);
background-image: radial-gradient(
rgba(0, 0, 0, 0),
rgba(0, 0, 0, 0.3),
#000
);
}
.gray {
-webkit-filter: grayscale(100%);
filter: grayscale(100%);
opacity: 0.7;
}
}
}
}
#map {
width: 100%;
height: 100%;
}
.btn {
position: absolute;
bottom: 0;
left: 0;
width: 100px;
line-height: 36px;
height: 36px;
text-align: center;
color: #ffffff;
font-size: 14px;
background-color: rgba(#000, 0.2);
cursor: pointer;
}
}
</style>

1
src/views/modules/base/epidemic/antiInfo.vue

@ -599,7 +599,6 @@ export default {
} else {
this.$message.error(msg);
}
},
handleAgeChange (val) {

2
src/views/modules/base/epidemic/natInfo/natList.vue

@ -402,7 +402,7 @@ export default {
//id: 1536638904600752130
this.customerId = localStorage.getItem("customerId");
this.isYantai = false
this.isXiaozhaizi = false
this.isXiaozhaizi = true
if (this.customerId === '1535072605621841922') {
this.isYantai = true

86
src/views/modules/base/epidemic/static/lineOption.js

@ -0,0 +1,86 @@
import * as echarts from 'echarts'
export function lineOption () {
return {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
label: {
backgroundColor: '#6a7985'
}
}
},
xAxis: {
type: 'category',
// boundaryGap: false,
axisLabel: {
color: '#8ec7dc',
fontSize: 16
},
axisTick: {
show: false
},
axisLine: {
lineStyle: {
color: '#0c4b59'
}
}
},
yAxis: {
nameTextStyle: {
color: '#8ec7dc',
fontSize: 18
},
splitNumber: 4,
minInterval: 1,
show: true,
type: 'value',
axisLabel: {
color: '#8ec7dc',
fontSize: 18
},
axisTick: {
show: false
},
splitLine: {
lineStyle: {
color: ['#145968'],
type: 'dotted'
}
},
axisLine: {
show: true,
symbol: ['none', 'arrow'],
symbolOffset: [0, 15],
lineStyle: {
color: '#0c4b59'
}
}
},
series: [
{
name: '项目数',
type: 'line',
smooth: true,
barWidth: 15,
areaStyle: {},
itemStyle: {
color: new echarts.graphic.LinearGradient(
0, 1, 0, 0,
[
{ offset: 0, color: 'rgba(121, 55, 255, 0)' },
{ offset: 1, color: '#6339FF' }
]
)
}
},
// {
// data: [820, 932, 901, 934, 1290, 1330, 1320],
// type: 'line',
// areaStyle: {}
// }
]
}
}

107
src/views/modules/base/epidemic/static/options.js

@ -0,0 +1,107 @@
export function pieOption (_charts) {
const center= ['60%', '40%']
return {
// title: {
// text: '0',
// top: 125,
// left: 235,
// textAlign: 'center',
// textStyle: {
// width: '100%',
// fontSize: 32,
// color: '#FFFFFF',
// fontWeight: 400,
// align: 'center'
// },
// itemGap: 5,
// },
tooltip: {
show: false
},
legend: {
top: 500,
bottom: 0,
itemWidth: 20,
itemHeight: 10,
textStyle: {
color: '#000000',
fontSize: 16,
lineHeight: 20,
},
},
series: [
// 突出的
{
type: 'pie',
radius: '65%',
center: ['50%', '50%'],
selectedMode: 'single',
label: {
// show: false,
position: 'outside',
alignTo: 'edge',
// formatter: '{a|{c}}\n\n{name|{b}}',
formatter: '{name|{b}}{a|{c}}\n{r|}\n{d|{d}%}',
// minMargin: 5,
edgeDistance: 20,
lineHeight: 15,
// color: '#fff',
fontSize: 12,
// distanceToLabelLine: -60,
rich: {
name: {
padding: [0, 6, 0, 6]
},
a: {
fontSize: 30,
// color: '#fff',
padding: [0, 6, 6, 6]
},
r: {
backgroundColor: 'auto',
borderRadius: 6,
width: 6,
height: 6,
// padding: [3, 3, 0, -12]
}
}
},
labelLine: {
show: false,
smooth: 0.2,
length: 20,
length2: 10,
maxSurfaceAngle: 80
},
labelLayout: function (params) {
const isLeft = params.labelRect.x < _charts.getWidth() / 3;
const points = params.labelLinePoints;
// Update the end point.
if (points) {
points[2][0] = isLeft
? params.labelRect.x
: params.labelRect.x + params.labelRect.width;
}
return {
labelLinePoints: points
};
},
itemStyle: {
},
data: [],
},
]
}
}

525
src/views/modules/base/epidemic/static/static.vue

@ -0,0 +1,525 @@
<template>
<div class="div_main">
<div class="card-title">
<div class="title-label">
<span>所属组织</span>
<el-cascader class="customer_cascader"
style="margin-left:10px"
size="small"
ref="myCascader"
v-model="agencyIdArray"
:options="orgOptions"
:props="orgOptionProps"
:show-all-levels="false"
@change="handleChangeAgency"></el-cascader>
<el-button style="margin-left:30px"
size="small"
class="diy-button--search"
@click="handleSearch">查询</el-button>
</div>
</div>
<div class="card-echart">
<div class="card-left">
<div class="card-left-title">辖区疫苗接种情况</div>
<div class="echart-wr">
<screen-echarts-frame class="echart-org"
@myChartMethod="pieInitOks"
ref="eduChart"></screen-echarts-frame>
</div>
</div>
<div class="card-left">
<div class="card-left-title">近7天核酸检测人数</div>
<div class="echart-wr">
<screen-echarts-frame class="echart-org"
@myChartMethod="lineInitOk"
ref="lineChart"></screen-echarts-frame>
</div>
</div>
</div>
<el-dialog :visible.sync="dialogVisible"
width="50%"
@close="diaClose"
>
<vaccine-Count ref="ref_vaccineCount"
:seriesNum="seriesNum"
:tableData="tableData"
>
</vaccine-Count>
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[10, 20, 60, 100]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination>
</el-dialog>
</div>
</template>
<script>
import { requestPost, requestGet } from "@/js/dai/request";
import vaccineCount from "./vaccineCountTable.vue"
import nextTick from "dai-js/tools/nextTick";
import screenEchartsFrame from "@c/screen-echarts-frame";
import { pieOption } from './options'
import { lineOption } from './lineOption'
import { mapGetters } from 'vuex'
import * as echarts from 'echarts';
export default {
name: "warning-box",
components: {
vaccineCount,
screenEchartsFrame,
},
data () {
return {
disabled: true,
agencyIdArray: [],
orgOptions: [],
dialogVisible:false,
seriesNum:{},
tableData:[],
orgOptionProps: {
multiple: false,
value: 'agencyId',
label: 'agencyName',
children: 'subAgencyList',
checkStrictly: true
},
noEduInit: false,
agencyId: '',
grid: '',
pieItem: [
{
name: '接种0针人数',
value: 0,
color: 'rgba(27, 81, 255, 1)'
}, {
name: '接种1针人数',
value: 1,
color: 'rgba(0, 229, 237, 1)'
}, {
name: '接种2针人数',
value: 2,
color: 'rgba(120, 0, 255, 1)'
}, {
name: '接种3针人数',
value: 3,
color: 'rgba(255, 120, 0, 1)'
}, {
name: '接种4针人数',
value: 4,
color: 'rgba(255, 186, 0, 1)'
}
],
pageNo:1,
pageSize:10,
total:1,
resiVaccineNum:"",
pieEduChartSs: null,
pieEduOptions: null,
lineChart: "",
lineOption: {},
lineInitState: false,
lineXaxis: [],
lineSeriesData: [],
state:false
};
},
computed: {
tableHeight () {
return this.$store.state.inIframe ? this.clientHeight - 500 + this.iframeHeight : this.clientHeight - 500
},
...mapGetters(['clientHeight', 'iframeHeight'])
},
async mounted () {
await nextTick(100);
await this.getOrgTreeList()
this.getPieData()
this.getLineChart()
this.getLine()
// this.clickEduPie()
},
async created () {
},
methods: {
handleSearch (val) {
this.getPieData()
},
pieInitOks (dom) {
console.log('pies准备好了', dom)
this.pieEduChartS = dom
// this.pieInitState = true
},
handleSizeChange (val) {
this.pageSize = val
this.clickPieShowTable(true)
},
handleCurrentChange (val) {
this.pageNo = val
this.clickPieShowTable(true)
},
async getPieData () {
// const url = "/epmetuser/icresiuser/partymembereducationstatistics";
const url = '/epmetuser/epidemicPrevention/vaccinePie'
let params = {}
if(this.gridId){
params = {
gridId: this.gridId,
}
}else{
params = {
agencyId:this.agencyId
}
}
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.pieItem = data.map(item => {
return {
...item,
name: item.label,
isClick: false
}
})
this.initEduCharts()
} else {
}
},
initEduCharts () {
let legend = {
show: true,
// orient: 'vertical',
bottom: 10,
// right: 0,
textStyle: {
width: 90,
// color: '#fff',
rich: {
a: {
width: 90
}
}
},
formatter: name => {
for (let a = 0; a < this.pieItem.length; a++) {
// this.data
if (this.pieItem[a].name === name) {
//
let params1 = name + "\n"; //returnlegend
console.log(params1);
let tmp = params1.split("\n");
let res = "" + params1;
for (let i in tmp) {
res = res.replace(tmp[i], "");
}
return res + params1;
}
}
}
}
this.pieEduOptions = pieOption(this.pieEduChartS)
this.pieEduOptions.legend = { ...legend }
const maxValue = Math.max(...this.pieItem.map(i => Number(i.value)));
const maxIndex = this.pieItem.findIndex(a => Number(a.value) == maxValue);
this.clickEduPie(maxIndex)
// console.log('----------------------', maxValue, maxIndex)
let fun = params => {
this.clickEduPie(params.dataIndex)
}
this.$refs.eduChart.handleClick(fun)
this.clickPieShowTable(false)
},
diaClose () {
this.dialogVisible = false
this.pageNo = 1
this.resiVaccineNum = ''
},
async clickPieShowTable(flag){
this.dialogVisible = flag
let url = "/epmetuser/epidemicPrevention/page"
let params = {}
if(this.gridId){
params = {
pageNo:this.pageNo,
pageSize:this.pageSize,
vaccineCount: this.resiVaccineNum,
gridId:this.gridId
}
}else{
params = {
pageNo:this.pageNo,
pageSize:this.pageSize,
vaccineCount: this.resiVaccineNum,
agencyId:this.agencyId,
}
}
let {data,code,msg} = await requestPost(url,params)
if(code==0){
this.total = data.total || 0;
this.tableData = data.list
}else{
this.$message.error(msg);
}
},
clickEduPie (seriesIndex) {
let _code = ''
let isClick = true
this.pieItem.forEach((element, index) => {
if (index === seriesIndex) {
_code = element.code
this.resiVaccineNum = _code
if (!this.noEduInit) isClick = false
else {
element.isClick = !element.isClick
isClick = element.isClick
}
element.label = {
show: true,
};
element.labelLine = {
show: true,
lineStyle: {
opacity: 1,
}
};
} else {
element.isClick = false
element.label = {
show: false,
};
element.labelLine = {
show: false,
lineStyle: {
opacity: 0,
color: 'rgba(255,255,255,0)'
}
};
}
});
this.pieEduOptions.series[0].data = this.pieItem
// this.$refs.pieChart.hideLoading()
this.$refs.eduChart.setOption(this.pieEduOptions)
setTimeout(() => {
this.state = true
}, 1000);
if (!this.state) return
this.clickPieShowTable(true)
},
lineInitOk () {
this.lineInitState = true;
},
getLine () {
if (this.lineInitState) {
this.assignLineChart();
} else {
setTimeout(() => {
this.getLine();
}, 500);
}
},
// 线
async getLineChart () {
//
let date = new Date();
let base = Date.parse(date); //
let year = date.getFullYear(); //
let mon = date.getMonth() + 1; //
let day = date.getDate(); //
let oneDay = 24 * 3600 * 1000
let daytimeArr = []
for (let i = 6; i > 0; i--) { //
let now = new Date(base - oneDay * i);
let myear = now.getFullYear();
let month = now.getMonth() + 1;
let mday = now.getDate()
daytimeArr.push([myear, month >= 10 ? month : '0' + month, mday >= 10 ? mday : '0' + mday].join('/'))
}
daytimeArr.push([year, mon >= 10 ? mon : '0' + mon, day >= 10 ? day : '0' + day].join('/'))
console.log(daytimeArr)
this.lineXaxis = daytimeArr;
this.lineSeriesData = [0, 0, 0, 0, 0, 0, 0];
},
assignLineChart () {
this.lineOption = lineOption();
this.$refs.lineChart.setOption(this.lineOption, true);
this.$refs.lineChart.setOption(
{
xAxis: { data: this.lineXaxis },
series: [{ data: this.lineSeriesData }],
},
true
);
},
getOrgTreeList () {
const { user } = this.$store.state
this.$http
.post('/gov/org/customeragency/agencygridtree', {})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取组织树成功', res.data)
this.orgOptions = []
this.orgOptions.push(res.data)
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
handleChangeAgency (val) {
let obj = this.$refs["myCascader"].getCheckedNodes()[0].data
if (obj) {
if (obj.level === 'grid') {
this.gridId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : '';
this.agencyId = ''
} else {
this.agencyId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : '';
this.gridId = ''
}
} else {
this.agencyId = ''
this.gridId = ''
}
this.agencyId = obj.agencyId
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/modules/visual/warning.scss"
scoped
></style>
<style lang="scss" scoped>
.div_main {
background: #fff;
margin: 10px;
padding: 10px;
}
.card-title {
display: flex;
align-items: center;
cursor: pointer;
margin-bottom: 10px;
padding: 4px 2px;
.title-icon {
display: block;
width: 46px;
height: 34px;
box-sizing: border-box;
margin-right: 6px;
}
.title-time {
display: flex;
align-items: center;
box-sizing: border-box;
margin-left: 30px;
font-size: 14px;
color: #fff;
.title-time-label {
margin-right: 10px;
}
}
.title-label {
font-size: 16px;
font-family: PingFang SC;
// font-weight: 800;
}
}
.card-echart {
display: flex;
margin-top: 40px;
height: 100%;
.card-left {
position: relative;
flex: 1;
// display: flex;
height: 100%;
.card-flex {
width: 100%;
display: flex;
}
}
}
.card-left-title {
position: relative;
padding-left: 40px;
font-size: 16px;
font-weight: 500;
}
.card-left-title::after {
content: "";
position: absolute;
top: 50%;
left: 20px;
width: 12px;
height: 12px;
box-sizing: border-box;
margin-top: -6px;
background: #2865fa;
border-radius: 50%;
}
.echart-wr {
position: relative;
flex-shrink: 0;
width: 90%;
height: 520px;
box-sizing: border-box;
.echart-org {
width: 100%;
height: 100%;
}
}
</style>

133
src/views/modules/base/epidemic/static/vaccineCountTable.vue

@ -0,0 +1,133 @@
<template>
<div class="">
<!-- :height="tableHeight" -->
<el-table class="table"
:data="tableData"
border
ref="ref_table"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
style="width: 100%">
<el-table-column label="序号"
header-align="center"
align="center"
type="index"
width="50"></el-table-column>
<el-table-column prop="name"
header-align="center"
align="center"
label="姓名"
width="120">
</el-table-column>
<el-table-column prop="gridName"
header-align="center"
align="center"
label="所属网格"
show-overflow-tooltip
min-width="180">
</el-table-column>
<el-table-column prop="houseName"
header-align="center"
align="center"
label="所属房屋"
show-overflow-tooltip
min-width="180">
</el-table-column>
<el-table-column prop="mobile"
header-align="center"
align="center"
label="手机号"
width="180">
</el-table-column>
<el-table-column prop="idCard"
header-align="center"
align="center"
label="证件号"
width="180">
</el-table-column>
<el-table-column prop="birthDay"
header-align="center"
align="center"
label="出生日期"
width="140">
</el-table-column>
<el-table-column label="操作"
fixed="right"
width="140"
header-align="center"
align="center"
class="operate">
<template slot-scope="scope">
<el-button
type="text"
class="div-table-button--detail"
size="small"
@click="handleDetail(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
<people-more v-if="showedPeopleMoreInfo && currentPepeleId"
:userId="currentPepeleId"
:view_real_data="true"
:gridName="currentPepeleGridName"
@close="showedPeopleMoreInfo = false" />
</div>
</template>
<script>
import { requestPost, requestGet } from "@/js/dai/request";
import peopleMore from "@/views/modules/shequ/cpts/people-more";
export default {
data() {
return {
showedPeopleMoreInfo: false,
tableLoading: false,
currentPepeleId:"",
currentPepeleGridName:""
};
},
created() {
},
async mounted(){
// await this.getResiList()
},
props:{
seriesNum:{
type:Object,
default:()=>{}
},
tableData:{
type:Array,
default:()=>[]
}
},
watch:{
// 'seriesNum':{
// handler(newVal){
// console.log(newVal);
// this.getResiList()
// },
// deep:true,
// inject:true
// }
},
methods: {
handleDetail(row){
this.showedPeopleMoreInfo= true
this.currentPepeleId = row.id
this.currentPepeleGridName = row.gridName
}
},
components: {peopleMore},
computed: {},
watch: {},
};
</script>
<style lang="scss" scoped>
</style>

46
src/views/modules/base/organization/organization.vue

@ -15,12 +15,10 @@
<el-link v-if="index === breadcrumbArr.length - 1"
type="primary"
@click.native="modifyOrgInfo"
style="
margin-left: 10px;
margin-top: 0px;
color: #3e8ef7;
cursor: pointer;
"
style=" margin-left: 10px;
margin-top: 0px;
color: #3e8ef7;
cursor: pointer;"
icon="el-icon-edit">修改</el-link>
</el-breadcrumb-item>
</el-breadcrumb>
@ -679,6 +677,10 @@
<el-input v-model="agencyForm.mobile"
placeholder="请输入联系电话"></el-input>
</el-form-item>
<el-form-item label="组织简介">
<el-input v-model="agencyForm.remark"
type="textarea" rows=3 maxlength="500" show-word-limit placeholder="请输入组织简介"></el-input>
</el-form-item>
<el-form-item label="坐标">
<div id="con"></div>
</el-form-item>
@ -714,6 +716,18 @@
<el-input v-model="OrgDetailsForm.mobile"
placeholder="请输入联系电话"></el-input>
</el-form-item>
<el-form-item label="组织简介">
<el-input
type="textarea"
v-model="OrgDetailsForm.remark"
placeholder="请输入内容"
resize="none"
rows=3
maxlength="500"
show-word-limit
>
</el-input>
</el-form-item>
<el-form-item label="坐标">
<div id="con"></div>
</el-form-item>
@ -758,6 +772,18 @@
<el-input v-model="OrgDetailsForm.contacts"
placeholder="请输入负责人名字"></el-input>
</el-form-item>
<el-form-item label="组织简介">
<el-input
type="textarea"
v-model="OrgDetailsForm.remark"
placeholder="请输入内容"
show-word-limit
maxlength="500"
resize="none"
rows=3
>
</el-input>
</el-form-item>
<el-form-item label="联系电话">
<el-input v-model="OrgDetailsForm.mobile"
placeholder="请输入联系电话"></el-input>
@ -793,7 +819,7 @@
<el-input v-model="OrgUnitDetailsForm.contacts"
placeholder="请输入负责人名字"></el-input>
</el-form-item>
<el-form-item label="联系电话">
<el-form-item label="联系电话1">
<el-input v-model="OrgUnitDetailsForm.mobile"
placeholder="请输入联系电话"></el-input>
</el-form-item>
@ -993,6 +1019,7 @@ export default {
areaName: "",
contacts: "",
mobile: "",
remark:"",
code: "",
},
//
@ -1036,6 +1063,7 @@ export default {
areaCode: "",
agencyId: "",
areaName: "",
remark:""
},
//
OrgUnitDetailsForm: {
@ -1606,6 +1634,7 @@ export default {
(this.agencyForm.contacts = ""),
(this.agencyForm.mobile = ""),
(this.agencyForm.code = ""),
(this.agencyForm.remark = ""),
(this.latitude = ""),
(this.longitude = "");
},
@ -2335,6 +2364,7 @@ export default {
contacts: this.agencyForm.contacts,
mobile: this.agencyForm.mobile,
code: this.agencyForm.code,
remark: this.agencyForm.remark,
latitude: this.latitude,
longitude: this.longitude,
};
@ -2413,6 +2443,7 @@ export default {
this.OrgDetailsForm.centerAddress = data.centerAddress;
this.OrgDetailsForm.areaCode = data.areaCode;
this.OrgDetailsForm.mobile = data.mobile;
this.OrgDetailsForm.remark = data.remark;
this.latitude = data.latitude;
this.longitude = data.longitude;
this.OrgDetailsForm.agencyId = data.agencyId;
@ -2479,6 +2510,7 @@ export default {
mobile: this.OrgDetailsForm.mobile,
code: this.OrgDetailsForm.code,
latitude: this.latitude,
remark:this.OrgDetailsForm.remark,
longitude: this.longitude,
};

193
src/views/modules/base/userinfo/userInfoDetail.vue

@ -0,0 +1,193 @@
<template>
<div class="epidemic-form">
<div class="dialog-h-content scroll-h">
<!-- <div v-if="view_real_data"
class="div_tuomin">
<el-button size="mini"
class="diy-button--search"
@click="handleTuomin">显示脱敏信息</el-button>
</div> -->
<div v-if="initLoading"
class="m-row">
<div class="m-info">
<div class="info-prop">
<span class="info-title-2">姓名</span>
<span>{{ formData.realName||'--' }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">昵称</span>
<span>{{ formData.nickname||'--' }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">证件号</span>
<span>{{ formData.idNum||'--' }}</span>
</div>
<div v-if="!isXiaozhaizi"
class="info-prop">
<span class="info-title-2">路牌号</span>
<span>{{ formData.street||'--' }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">小区名称</span>
<span>{{ formData.district||'--' }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">详细地址</span>
<span>{{ formData.buildingAddress||'--' }}</span>
</div>
<div class="info-prop"
v-if="formData.headImgUrl">
<span class="info-title-2">头像</span>
<div class="info-pics">
<img style="width:80px;height:80px"
:src="formData.headImgUrl"
@click="watchImg(formData.headImgUrl)">
</div>
</div>
</div>
</div>
</div>
<div class="div-btn">
<el-button size="small"
@click="handleCancle"> </el-button>
<!-- <el-button v-if="formType != 'detail'"
size="small"
type="primary"
:disabled="btnDisable"
@click="handleComfirm"> </el-button> -->
</div>
</div>
</template>
<script>
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
import { dateFormats } from '@/utils/index'
let loading //
export default {
data () {
return {
initLoading: false,
formData: {},
fileList: [],
}
},
components: {},
async mounted () {
const { user } = this.$store.state
this.agencyId = user.agencyId
},
methods: {
async handleTuomin () {
const url = "/data/aggregator/epmetuser/detailByType";
const { data, code, msg } = await requestPost(url, {
id: this.icNatId,
type: "natRecord",
});
if (code === 0) {
this.$set(this.formData, 'showMobile', data.mobile)
this.$set(this.formData, 'showIdCard', data.idCard)
} else {
this.$message.error(msg);
}
},
async initForm (row) {
this.startLoading()
this.formData.agencyId = this.agencyId
this.formData = JSON.parse(JSON.stringify(row));
this.initLoading = true
this.endLoading()
},
handleCancle () {
// this.resetData()
this.$emit('dialogCancle')
},
watchImg (src) {
window.open(src);
},
resetData () {
this.formData = {}
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
},
props: {
view_real_data: {//
type: Boolean,
default: false,
},
isXiaozhaizi: {
type: Boolean,
default: false
},
},
}
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/management/detail-main.scss";
.div_tuomin {
position: absolute;
top: 0;
right: 40px;
z-index: 1000;
}
</style>

407
src/views/modules/base/userinfo/userInfoList.vue

@ -0,0 +1,407 @@
<template>
<div class="div_main">
<div class="div_search">
<el-form :inline="true"
:model="formData"
ref="ref_searchform"
:label-width="'80px'">
<div>
<el-form-item label="所属组织"
prop="gridId">
<el-cascader class="customer_cascader"
size="small"
ref="myCascader"
v-model="agencyIdArray"
:options="orgOptions"
:props="orgOptionProps"
:show-all-levels="false"
@change="handleChangeAgency"></el-cascader>
</el-form-item>
<el-form-item label="注册时间"
prop="regStartTime">
<el-date-picker v-model="formData.regStartTime"
:picker-options="startPickerOptions"
class="item_width_2"
size="small"
type="date"
value-format="yyyyMMdd"
placeholder="开始时间">
</el-date-picker>
<span class="data-tag"></span>
<el-date-picker v-model="formData.regEndTime"
:picker-options="endPickerOptions"
class="item_width_2 data-tag"
size="small"
type="date"
value-format="yyyyMMdd"
placeholder="结束时间">
</el-date-picker>
</el-form-item>
<el-form-item label="姓名"
prop="name">
<el-input v-model="formData.name"
size="small"
class="item_width_2"
clearable
placeholder="请输入姓名">
</el-input>
</el-form-item>
<el-button style="margin-left:30px"
size="small"
class="diy-button--search"
@click="handleSearch">查询</el-button>
<el-button style="margin-left:10px"
size="small"
class="diy-button--reset"
@click="resetSearch">重置</el-button>
</div>
</el-form>
</div>
<div class="div_table">
<el-table :data="tableData"
border
v-loading="tableLoading"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
class="table"
style="width: 100%"
:height="maxTableHeight">
<el-table-column label="序号"
fixed="left"
type="index"
align="center"
width="50" />
<el-table-column prop="realName"
min-width="100"
align="center"
label="姓名"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="nickname"
min-width="100"
align="center"
label="昵称"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="imageList"
align="center"
width="80"
label="头像">
<template slot-scope="scope">
<el-image v-if="scope.row.headImgUrl"
style="width: 40px; height: 40px"
:src="scope.row.headImgUrl">
</el-image>
<span v-else></span>
</template>
</el-table-column>
<el-table-column prop="showIdNum"
label="证件号"
min-width="170"
align="center"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="street"
align="center"
min-width="170"
label="路牌号"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="district"
align="center"
min-width="170"
label="小区名称"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="buildingAddress"
align="center"
min-width="170"
label="详细地址"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column fixed="right"
label="操作"
align="center"
width="100">
<template slot-scope="scope">
<el-button @click="handleWatch(scope.row)"
type="text"
size="small">查看</el-button>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="parseInt(pageSize)"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination>
</div>
</div>
<!-- 修改弹出框 -->
<el-dialog :visible.sync="detailShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'信息详情'"
width="650px"
top="5vh"
class="dialog-h"
@closed="detailFormCancle">
<user-info-detail ref="ref_form_detail"
@dialogCancle="detailFormCancle"></user-info-detail>
</el-dialog>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import nextTick from "dai-js/tools/nextTick";
import { mapGetters } from "vuex";
import userInfoDetail from './userInfoDetail'
import axios from "axios";
export default {
components: { userInfoDetail },
data () {
let endDisabledDate = (time) => {//datareturn
let nowData = Date.now()
if (this.formData.regStartTime) {
let regStartTime = new Date(this.formData.regStartTime)
return time.getTime() > nowData || time.getTime() < regStartTime || time.getTime() === regStartTime
} else {
return time.getTime() > nowData
}
}
let startDisabledDate = (time) => {//datareturn
let nowData = Date.now()
return time.getTime() > nowData
}
return {
tableLoading: false,
user: {},
agencyIdArray: [],
orgOptions: [],
orgOptionProps: {
multiple: false,
value: 'agencyId',
label: 'agencyName',
children: 'subAgencyList',
checkStrictly: true
},
tableData: [],
formData: {
agencyId: '',//id
gridId: '',
regStartTime: '',//
regEndTime: '',//
name: ''
},
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
total: 1,
endPickerOptions: {
disabledDate: endDisabledDate
},
startPickerOptions: {
disabledDate: startDisabledDate
},
eventId: '',
eventDetailData: {},
detailShow: false,
};
},
computed: {
maxTableHeight () {
return this.$store.state.inIframe
? this.clientHeight - 320 + this.iframeHeigh
: this.clientHeight - 320;
},
...mapGetters(["clientHeight", "iframeHeight"]),
},
watch: {
// "formData.regEndTime": function (val) {
// if (val && val != '') {
// let arrayTemp = val.split(' ')
// this.formData.regEndTime = arrayTemp[0] + ' 23:59:59'
// }
// },
},
mounted () {
console.log(this.$store.state)
this.user = this.$store.state.user
this.formData.agencyId = this.user.agencyId
this.getOrgTreeList();
this.getTableData();
},
methods: {
handleChangeAgency (val) {
let obj = this.$refs["myCascader"].getCheckedNodes()[0].data
if (obj) {
if (obj.level === 'grid') {
this.formData.gridId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : '';
this.formData.agencyId = ''
} else {
this.formData.agencyId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : '';
this.formData.gridId = ''
}
} else {
this.formData.agencyId = this.user.agencyId
this.formData.gridId = ''
}
},
handleSearch (val) {
console.log(this.formData);
this.pageNo = 1;
this.getTableData();
},
getOrgTreeList () {
const { user } = this.$store.state
this.$http
.post('/gov/org/customeragency/agencygridtree', {})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取组织树成功', res.data)
this.orgOptions = []
this.orgOptions.push(res.data)
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
async handleWatch (row) {
this.detailShow = true
this.$nextTick(() => {
this.$refs.ref_form_detail.initForm(row)
})
},
replayOk () {
this.detailShow = false
this.getTableData()
},
detailFormCancle () {
this.detailShow = false
},
async getTableData () {
this.tableLoading = true
const url = "/epmetuser/userbaseinfo/page-reguser";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/list";
const { pageSize, pageNo, formData } = this;
const { data, code, msg } = await requestPost(url, {
pageSize,
pageNo,
...formData,
});
this.tableLoading = false
if (code === 0) {
this.total = data.total || 0;
this.tableData = data.list
} else {
this.$message.error(msg);
}
},
handleSizeChange (val) {
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getTableData();
},
handleCurrentChange (val) {
this.pageNo = val;
this.getTableData();
},
resetSearch () {
this.agencyIdArray = []
this.formData = {
agencyId: this.user.agencyId,//id id
gridId: '',
regStartTime: '',//
regEndTime: '',//
name: ''
}
this.pageNo = 1
this.getTableData();
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/buttonstyle.scss";
@import "@/assets/scss/modules/management/list-main.scss";
@import "@/assets/scss/modules/shequzhili/event-info.scss";
.div_search {
.item_width_2 {
width: 200px;
}
}
.myNote {
display: -webkit-box;
text-overflow: ellipsis;
overflow: hidden;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
</style>

377
src/views/modules/communityParty/dyhx/crateForm.vue

@ -0,0 +1,377 @@
<template>
<div class="epidemic-form">
<div class="dialog-h-content scroll-h">
<div class="m-row">
<div class="m-row-2">
<div class="info-prop">
<span class="info-title-2">所属党组织</span>
<span>{{ form.orgName }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">党员中心户</span>
<span>{{ form.isDyzxh==='1'?'是':'否'}}</span>
</div>
</div>
<div class="m-row-2">
<div class="info-prop">
<span class="info-title-2">姓名</span>
<span>{{ form.name}}</span>
</div>
<div class="info-prop">
<span class="info-title-2">免学习</span>
<span>{{form.isMxx==='1'?'是':'否'}}</span>
</div>
</div>
<div class="m-row-2">
<div class="info-prop">
<span class="info-title-2">手机号</span>
<span>{{ form.showMobile }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">职务</span>
<span>{{ form.postName|| "--"}}</span>
</div>
</div>
<div class="m-row-2">
<div class="info-prop">
<span class="info-title-2">身份证</span>
<span>{{ form.showIdCard }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">文化程度</span>
<span>{{form.cultureName || "--"}}</span>
</div>
</div>
<div class="m-row-2">
<div class="info-prop">
<span class="info-title-2">地址</span>
<span>{{ form.address|| "--" }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">入党时间</span>
<span>{{ form.rdsj || "--"}}</span>
</div>
</div>
<div class="m-row-2">
<div class="info-prop">
<span class="info-title-2">流动党员</span>
<span>{{ form.isLd==='1'?'是':'否' }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">党员流动号</span>
<span>{{ form.ldzh || "--" }}</span>
</div>
</div>
<div class="m-row-2">
<div class="info-prop">
<span class="info-title-2">备注</span>
<span>{{ form.remark || "--" }}</span>
</div>
</div>
</div>
<people-more v-if="showedPeopleMoreInfo"
:view_real_data="true"
:userId="info.icResiUser"
:gridName="info.orgName"
@close="handleCancleLook" />
</div>
<div class="div-btn">
<el-button size="small"
@click="handleCancle"> </el-button>
<el-button v-if="form.icResiUser != null && form.icResiUser != ''"
type="primary"
:disabled="false"
size="small"
@click="jump(form.icResiUser)">查看更多</el-button>
</div>
</div>
</template>
<script>
import { isCard, isMobile } from '@/utils/validate'
import { computedCard } from '@/utils/index'
import peopleMore from "@/views/modules/shequ/cpts/people-more";
export default {
components: {
peopleMore
},
props: {
partyList: {
type: Array,
default: () => []
},
info: {
type: Object,
default: () => { }
},
disabled: {
type: Boolean,
default: false
}
},
data () {
return {
activesName: 'first',
isAuto: false,
formItemWd: '100%',
partymenberid: '',
partyProps: {
label: 'partyOrgName',
value: 'id',
emitPath: false
},
form: {
icResiUser: '',
name: '',
mobile: '',
idCard: '',
address: '',
rdsj: '',
sszb: '',
isLd: '0',
ldzh: '',
partyZw: '0',
isDyzxh: '0',
isMxx: '0',
culture: '',
remark: ''
},
eduList: [],
partyOrgs: [],
showedPeopleMoreInfo: false
}
},
watch: {
info: {
handler (val) {
if (Object.keys(val).length > 0) {
this.form = { ...val }
if (val.icResiUserId || val.icResiUser) this.isAuto = true
console.log('val----------in', val)
console.log('isAuto----------in', this.isAuto)
this.partyOrgs = val.orgPids.split(':')
console.log('partyOrgs-----', this.partyOrgs)
this.partymenberid = val.id
}
},
immediate: true
}
},
created () {
this.getEduList()
console.log('partyList', this.partyList)
},
mounted () {
// const w = document.getElementsByClassName('dialog-h-content')[0]
// this.formItemWd = w.clientWidth + 'px'
},
destroyed () {
// this.$refs['ruleForm'].resetFields()
},
methods: {
handleCancle () {
// this.$refs['ruleForm'].resetFields()
this.$emit('cancle')
},
handleValidBlur (n) {
if (!isCard(this.form.idCard)) return
const { age } = computedCard(this.form.idCard)
this.form.isMxx = age >= 70 ? '1' : '0'
this.validateResi()
},
async getEduList () {
await this.$http
.post('/sys/dict/data/education')
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.eduList = res.data
}
})
.catch(err => {
console.log('err', err)
return this.$message.error('网络错误')
})
},
async validateResi () {
const params = {
idCard: this.form.idCard,
agencyId: this.$store.state.user.agencyId
}
await this.$http
.post('/epmetuser/icresiuser/getUserByIdCard', params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
const { address, icResiUserId } = res.data
if (icResiUserId) {
this.form.address = address
this.isAuto = true
} else {
this.form.address = ''
this.isAuto = false
}
}
})
.catch(err => {
console.log('err', err)
return this.$message.error('网络错误')
})
},
hadnleSubmitbase () {
this.$refs['ruleForm'].validate((valid) => {
if (valid) {
if (Object.keys(this.info).length > 0) this.editBase()
else this.saveBase()
} else {
console.log('error submit!!');
return false;
}
});
},
handleSavePoints (data) {
const _data = { ...data }
const params = {
..._data,
baseOptions: data.baseOptions.length > 0 ? data.baseOptions.toString() : '',
reviewOptions: data.reviewOptions.length > 0 ? data.reviewOptions.toString() : '',
inspireOptions: data.inspireOptions.length > 0 ? data.inspireOptions.toString() : '',
warnOptions: data.warnOptions.length > 0 ? data.warnOptions.toString() : ''
}
this.savePoints(params)
},
async jump (icResiUserId) {
this.showedPeopleMoreInfo = true
// this.$emit('saveBase', icResiUserId)
},
handleCancleLook () {
this.showedPeopleMoreInfo = false
},
async saveBase () {
const params = {
...this.form
}
await this.$http
.post('/resi/partymember/icPartyMember/save', params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.$message.success('保存成功')
this.partymenberid = res.data
this.$emit('saveBase', true)
}
})
.catch(err => {
console.log('err', err)
return this.$message.error('网络错误')
})
},
async editBase () {
const params = {
...this.form
}
await this.$http
.post('/resi/partymember/icPartyMember/update', params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.$message.success('保存成功')
this.partymenberid = res.data
this.$emit('saveBase', true)
}
})
.catch(err => {
console.log('err', err)
return this.$message.error('网络错误')
})
},
async savePoints (form) {
const params = {
...form,
partyMemberId: this.partymenberid
}
let url = ''
if (form.id) url = '/resi/partymember/icPartyMemberPoint/update'
else url = '/resi/partymember/icPartyMemberPoint/save'
await this.$http
.post(url, params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.$message.success('保存成功')
}
})
.catch(err => {
console.log('err', err)
return this.$message.error('网络错误')
})
},
async saveRecord (form) {
const params = {
...form,
partyMemberId: this.partymenberid
}
await this.$http
.post('/resi/partymember/icPartyMemberPoint/save', params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.$message.success('保存成功')
}
})
.catch(err => {
console.log('err', err)
return this.$message.error('网络错误')
})
}
}
}
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/management/detail-main.scss";
</style>

176
src/views/modules/communityParty/dyhx/options.js

@ -0,0 +1,176 @@
export function pieOption (_charts) {
const center= ['60%', '50%']
return {
title: {
text: '0',
top: 125,
left: 235,
textAlign: 'center',
textStyle: {
width: '100%',
fontSize: 32,
color: '#FFFFFF',
fontWeight: 400,
align: 'center'
},
itemGap: 5,
subtext: '总数',
subtextStyle: {
fontSize: 16,
color: '#fff',
fontWeight: 400,
align: 'center'
}
},
tooltip: {
show: false
},
legend: {
top: 500,
bottom: 0,
itemWidth: 20,
itemHeight: 10,
textStyle: {
color: '#000000',
fontSize: 16,
lineHeight: 20,
},
},
series: [
// 外侧圆环
{
type: 'pie',
// 起始刻度的角度,默认为 90 度,即圆心的正上方。0 度为圆心的正右方。
startAngle: 90,
hoverAnimation: false,
// tooltip: {
// },
center: center,
left: 'left',
radius: ['60%', '70%'],
width: 400,
label: {
show: false
},
labelLine: {
show: false
},
data: [{
value: 480,
itemStyle: {
color: 'rgba(40, 101, 250, 0)',
width:0,
borderColor: 'rgba(40, 101, 250, 0.5)',
borderWidth: 1,
borderType: 'dotted'
}
}
]
},
// 突出的
{
hoverAnimation: false,
type: 'pie',
center: center,
radius: ['40%', '60%'],
avoidLabelOverlap: false,
selectedMode: 'single',
left: 'left',
width: 400,
startAngle: 90,
label: {
// show: false,
position: 'outside',
alignTo: 'edge',
// formatter: '{a|{c}}\n\n{name|{b}}',
formatter: '{a|{c}}\n{r|}\n{name|{b}}',
// minMargin: 5,
edgeDistance: 20,
lineHeight: 15,
// color: '#fff',
fontSize: 12,
// distanceToLabelLine: -60,
rich: {
name: {
padding: [0, 6, 0, 6]
},
a: {
fontSize: 30,
// color: '#fff',
padding: [0, 6, 6, 6]
},
r: {
backgroundColor: 'auto',
borderRadius: 6,
width: 6,
height: 6,
// padding: [3, 3, 0, -12]
}
}
},
labelLine: {
show: false,
smooth: 0.2,
length: 20,
length2: 10,
maxSurfaceAngle: 80
},
labelLayout: function (params) {
const isLeft = params.labelRect.x < _charts.getWidth() / 3;
const points = params.labelLinePoints;
// Update the end point.
if (points) {
points[2][0] = isLeft
? params.labelRect.x
: params.labelRect.x + params.labelRect.width;
}
return {
labelLinePoints: points
};
},
itemStyle: {
},
data: [],
},
// 中间圆环
{
type: 'pie',
// 起始刻度的角度,默认为 90 度,即圆心的正上方。0 度为圆心的正右方。
startAngle: 90,
hoverAnimation: false,
center: center,
left: 'left',
width: 400,
// tooltip: {
// },
radius: ['0%', '25%'],
label: {
show: false
},
labelLine: {
show: false
},
data: [
{
value: 360,
itemStyle: {
color: 'rgba(8, 37, 134, 1)',
}
}
]
},
]
}
}

1183
src/views/modules/communityParty/dyhx/party.vue

File diff suppressed because it is too large

559
src/views/modules/communityParty/organization/finishList.vue

@ -0,0 +1,559 @@
<template>
<div class="dialog-h-content scroll-h">
<div class="div_table">
<el-button type="green"
size="small"
@click="handleAdd">新增</el-button>
<el-table class="table"
:data="tableData"
border
:height="tableHeight"
v-loading="tableLoading"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
style="width: 100%">
<el-table-column label="序号"
header-align="center"
align="center"
type="index"
width="50">
</el-table-column>
<el-table-column prop="year"
header-align="center"
align="center"
label="年份"
min-width="120">
<template slot-scope="scope">
<div v-if="scope.row.isEdit"
class="picker_year">
<!-- <el-select class="item_width_2"
v-model="scope.row.year"
placeholder="请选择">
<el-option v-for="(item,index) in yearList"
@click.native="hancleChangeYear(scope.row,index,scope.$index)"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select> -->
<el-date-picker v-model="scope.row.year"
type="year"
format="yyyy"
value-format="yyyy"
placeholder="选择年">
</el-date-picker>
</div>
<span v-else>{{scope.row.year}}</span>
</template>
</el-table-column>
<el-table-column prop="type"
header-align="center"
align="center"
label="类型"
min-width="90">
<template slot-scope="scope">
<div v-if="scope.row.isEdit">
<el-select class="item_width_2"
v-model="scope.row.type"
placeholder="请选择">
<el-option v-for="(item,index) in typeList"
@click.native="hancleChangeType(scope.row,index,scope.$index)"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
<span v-else>{{scope.row.typeShow}}</span>
</template>
</el-table-column>
<el-table-column prop="monthQuarter"
header-align="center"
align="center"
label="时间"
min-width="100">
<template slot-scope="scope">
<div v-if="scope.row.isEdit">
<el-select class="item_width_3"
v-model="scope.row.monthQuarter"
placeholder="请选择">
<el-option v-for="item in scope.row.timeList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
<span v-else>{{scope.row.monthQuarterName}}</span>
</template>
</el-table-column>
<el-table-column prop="status"
header-align="center"
align="center"
label="完成情况"
min-width="90">
<template slot-scope="scope">
<div v-if="scope.row.isEdit">
<el-select class="item_width_2"
v-model="scope.row.status"
placeholder="全部">
<el-option v-for="item in statusList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
<span v-else>{{scope.row.status==='1'?'已完成':'未完成'}}</span>
</template>
</el-table-column>
<el-table-column prop="score"
header-align="center"
align="center"
label="评分(百分制)"
min-width="120">
<template slot-scope="scope">
<div v-if="scope.row.isEdit">
<!-- <el-input class="item_width_2"
v-model.number="scope.row.score"
onkeyup="this.value = this.value.replace(/[^\d.]/g,'');"></el-input>-->
<el-input-number class="item_width_1"
v-model="scope.row.score"
:precision="1"
:controls="false"
:max="100"></el-input-number>
</div>
<span v-else>{{scope.row.score}}</span>
</template>
</el-table-column>
<el-table-column label="操作"
fixed="right"
width="120"
header-align="center"
align="center"
class="operate">
<template slot-scope="scope">
<el-button v-if="scope.row.isEdit"
type="text"
style="color:#00A7A9;text-decoration: underline;"
size="small"
@click="handleComfirm(scope.row,scope.$index)">保存</el-button>
<el-button v-if="!scope.row.isEdit"
type="text"
style="color:#1C6AFD;text-decoration: underline;"
size="small"
@click="handleEdit(scope.row,scope.$index)">修改</el-button>
<el-button type="text"
style="color:#D51010;text-decoration: underline;"
size="small"
@click="handleDelete(scope.row,scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
<!-- <div class="div_btn">
<el-button @click="handleCancle"> </el-button>
</div> -->
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
let loading //
export default {
data () {
return {
tableLoading: false,
unitId: '',
typeList: [
{
value: 'quarter',
label: '季度'
},
{
value: 'monthly',
label: '月度'
}
],
yearList: [],
quarterList: [
{
value: 'Q1',
label: '第一季度'
},
{
value: 'Q2',
label: '第二季度'
},
{
value: 'Q3',
label: '第三季度'
},
{
value: 'Q4',
label: '第四季度'
},
],
monthlist: [],
timeList: [],
statusList: [
{
value: '1',
label: '已完成'
},
{
value: '0',
label: '未完成'
},
],
tableData: [],
}
},
components: {},
mounted () {
},
methods: {
async initTable (row) {
this.unitId = row.id
//
this.initData()
await this.loadTable()
},
//
initData () {
let today = new Date((new Date).getTime())
let year = today.getFullYear()
this.yearList = []
for (let i = 0; i < 20; i++) {
let obj = {
label: (year - i) + '',
value: (year - i) + '',
}
this.yearList.push(obj)
}
this.monthlist = []
for (let i = 1; i < 13; i++) {
let m = i
if (m < 10) {
m = '0' + m
}
let obj = {
label: m + '月',
value: m,
}
this.monthlist.push(obj)
}
},
//
async hancleChangeType (row, index, tableIndex) {
let empetArray = []
this.tableData[tableIndex].timeList = [...empetArray]
let rowData = JSON.parse(JSON.stringify(row))
rowData.monthQuarter = ''
this.$set(this.tableData, tableIndex, rowData)
if (row.type === 'monthly') {
this.tableData[tableIndex].timeList = [...this.monthlist]
} else if (row.type === 'quarter') {
this.tableData[tableIndex].timeList = [...this.quarterList]
}
},
// row index timeList tableIndex
hancleChangeYear (row, index, tableIndex) {
},
//form
async loadTable () {
this.tableLoading = true
const url = '/heart/icpartyunitcompletion/list'
// const url = 'http://yapi.elinkservice.cn/mock/245/heart/icpartyunitcompletion/list'
let params = {
unitId: this.unitId
}
const { data, code, msg } = await requestPost(url, params)
this.tableLoading = false
if (code === 0) {
if (data.list && data.list.length > 0) {
data.list.forEach(item => {
item.isEdit = false
item.timeList = []
item.typeShow = item.type === 'monthly' ? '月度' : '季度'
});
this.tableData = [...data.list]
} else {
this.tableData = []
}
} else {
this.$message.error(msg)
}
},
handleAdd () {
let obj = {
isEdit: true,//
type: '',
typeShow: '',
year: '',
monthQuarter: '',
timeShow: '',
status: '',
unitId: '',
score: undefined
}
this.tableData.push(obj)
},
async handleEdit (row, tableIndex) {
let rowData = JSON.parse(JSON.stringify(row))
rowData.isEdit = true
this.$set(this.tableData, tableIndex, rowData)
if (row.type === 'monthly') {
this.tableData[tableIndex].timeList = [...this.monthlist]
} else if (row.type === 'quarter') {
this.tableData[tableIndex].timeList = [...this.quarterList]
}
},
async handleComfirm (row, tableIndex) {
let valiMsg = this.validata(row)
if (valiMsg) {
this.$message({
type: 'warning',
message: valiMsg
})
return false
}
this.addReview(row, tableIndex)
},
async addReview (row, tableIndex) {
let url = "/heart/icpartyunitcompletion/save"
// let url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunitcompletion/save"
let params = JSON.parse(JSON.stringify(row))
params.unitId = this.unitId
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
row.isEdit = false
row.typeShow = row.type === 'monthly' ? '月度' : '季度'
if (row.type === 'monthly') {
row.monthQuarterName = row.monthQuarter + '月'
} else {
for (let index in row.timeList) {
if (row.timeList[index].value === row.monthQuarter) {
row.monthQuarterName = row.timeList[index].label
}
}
}
this.$set(this.tableData, tableIndex, row)
} else {
this.$message.error(msg)
}
},
validata (row) {
let message = ''
if (!row.year) {
message = message + '年份不能为空;'
}
if (!row.type) {
message = message + '类型不能为空;'
}
if (!row.monthQuarter) {
message = message + '时间不能为空;'
}
if (!row.status) {
message = message + '完成情况不能为空;'
}
if (row.score !== 0 && !row.score) {
message = message + '评分不能为空;'
}
if (row.score > 100) {
message = message + '评分不能超过100分;'
}
return message
},
async handleDelete (row, tableIndex) {
this.$confirm("确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
if (row.id) {//id
this.deleteRecord(row, tableIndex)
} else {//id
this.tableData.splice(tableIndex, 1);
}
})
.catch(err => {
if (err == "cancel") {
}
});
},
async deleteRecord (row, tableIndex) {
const url = "/heart/icpartyunitcompletion/delete"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunitcompletion/delete"
let params = {
id: row.id
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
// this.$message({
// type: "success",
// message: ""
// });
this.tableData.splice(tableIndex, 1);
} else {
this.$message.error(msg)
}
},
handleCancle () {
this.$emit('dialogCancle')
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
tableHeight () {
return (this.clientHeight - 360)
},
...mapGetters(['clientHeight'])
},
props: {
}
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/buttonstyle.scss";
.item_width_1 {
width: 150px;
}
.item_width_2 {
width: 100px;
}
.item_width_3 {
width: 120px;
}
.div_table {
margin-top: 10px;
// background: #ffffff;
// box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.1);
// border-radius: 4px;
.table {
margin-top: 20px;
}
}
.div_btn {
margin-top: 10px;
display: flex;
justify-content: flex-end;
}
.picker_year {
/deep/ .el-date-editor.el-input,
.el-date-editor.el-input__inner {
width: 140px;
}
}
</style>

704
src/views/modules/communityParty/organization/index.vue

@ -0,0 +1,704 @@
<template>
<div class="div_main">
<div class="div_search">
<el-form :inline="true"
:model="formData"
ref="ref_searchform"
:label-width="'100px'">
<div>
<el-form-item label="所属组织"
prop="agencyId">
<el-cascader class="item_width_1"
ref="myCascader"
v-model="agencyIdArray"
:options="orgOptions"
:props="orgOptionProps"
:show-all-levels="false"
@change="handleChangeAgency"></el-cascader>
</el-form-item>
<el-form-item label="单位名称"
prop="name">
<el-input v-model="formData.name"
class="item_width_1"
clearable
size="small"
placeholder="请输入内容">
</el-input>
</el-form-item>
<el-form-item label="服务事项"
prop="categoryIds">
<el-select class="item_width_2"
v-model="formData.categoryIds"
placeholder="请选择"
multiple
size="small"
clearable>
<el-option v-for="item in serviceList"
:key="item.categoryName"
:label="item.categoryName"
:value="item.categoryId">
</el-option>
</el-select>
</el-form-item>
</div>
<div>
<el-form-item label="分类"
prop="type">
<el-select class="item_width_1"
v-model="formData.type"
placeholder="请选择"
size="small"
clearable>
<el-option v-for="item in typeList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="联系人"
prop="contact">
<el-input v-model="formData.contact"
class="item_width_1"
size="small"
clearable
placeholder="请输入内容">
</el-input>
</el-form-item>
<el-form-item label="联系电话"
prop="contactMobile">
<el-input v-model="formData.contactMobile"
class="item_width_1"
size="small"
clearable
placeholder="请输入内容">
</el-input>
</el-form-item>
<el-button style="margin-left:10px"
class="diy-button--search"
size="small"
@click="handleSearch">查询</el-button>
<el-button style="margin-left:10px"
class="diy-button--reset"
size="small"
@click="resetSearch">重置</el-button>
</div>
</el-form>
</div>
<div class="div_table">
<div class="div_btn">
<el-button class="diy-button--add"
size="small"
@click="handleAdd">新增</el-button>
</div>
<el-table class="table"
:data="tableData"
border
:height="tableHeight"
v-loading="tableLoading"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
style="width: 100%">
<el-table-column label="序号"
header-align="center"
align="center"
type="index"
width="50"></el-table-column>
<el-table-column prop="name"
header-align="center"
align="center"
label="单位名称"
min-width="100">
</el-table-column>
<el-table-column prop="agencyName"
header-align="center"
align="center"
label="所属组织"
min-width="100">
</el-table-column>
<el-table-column prop="typeName"
header-align="center"
align="center"
label="分类"
min-width="80">
</el-table-column>
<el-table-column prop="serviceMatterName"
header-align="center"
align="center"
label="服务事项"
show-overflow-tooltip
min-width="250">
<!-- <template slot-scope="scope">
<p style="text-align:center;margin:2px 0;"
v-for="(item,index) in scope.row.serviceMatterList"
:key="index">{{item}}</p>
</template> -->
</el-table-column>
<el-table-column prop="contact"
header-align="center"
align="center"
label="联系人"
width="80">
</el-table-column>
<el-table-column prop="contactMobile"
header-align="center"
align="center"
label="联系电话"
width="120">
</el-table-column>
<el-table-column prop="remark"
header-align="center"
align="center"
label="备注"
show-overflow-tooltip
width="150">
</el-table-column>
<el-table-column label="操作"
fixed="right"
width="150"
header-align="center"
align="center"
class="operate">
<template slot-scope="scope">
<el-button type="text"
class="div-table-button--detail"
size="small"
@click="handleDetail(scope.row)">查看</el-button>
<el-button v-if="agencyId===scope.row.agencyId"
type="text"
class="div-table-button--edit"
size="small"
@click="handleEdit(scope.row)">修改</el-button>
<el-button type="text"
class="div-table-button--delete"
size="small"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[10, 20, 50]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination>
</div>
</div>
<!-- 修改弹出框 -->
<el-dialog :visible.sync="formShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="formTitle"
:destroy-on-close="true"
width="950px"
top="5vh"
class="dialog-h"
@closed="editDiaClose">
<org-form ref="ref_form"
:typeList="typeList"
@dialogCancle="addFormCancle"
@dialogOk="addFormOk"></org-form>
</el-dialog>
<el-dialog :visible.sync="detailShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'单位详情'"
width="950px"
top="5vh"
class="dialog-h"
@closed="diaDetailClose">
<org-detail ref="ref_detail"
@diaDetailClose="diaDetailClose"></org-detail>
</el-dialog>
</div>
</template>
<script>
import orgForm from './orgForm'
import orgDetail from './orgDetail'
import finishList from './finishList'
import { requestPost } from "@/js/dai/request";
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
let loading //
export default {
data () {
return {
loading: false,
total: 0,
pageSize: 10,
pageNo: 0,
tableLoading: false,
agencyId: '',
serviceList: [],//list
typeList: [{label:'实有单位',value:'1'},{label:'社会服务组织',value:'2'},{label:'志愿单位',value:'3'}],//list
agencyIdArray: [],
orgOptions: [],
orgOptionProps: {
multiple: false,
value: 'agencyId',
label: 'agencyName',
children: 'subAgencyList',
checkStrictly: true
},
unitId: '',
formData: {
agencyId: '',
name: '',
categoryIds: [],
type: '',
contact: '',
contactMobile: ''
},
tableData: [],
//form
formShow: false,
formTitle: '新增单位',
detailShow: false,
//
finishDiaTitle: '区域化党建单位完成情况',
finishDiaShow: false,
}
},
components: {
orgForm, orgDetail, finishList
},
async created () {
},
async mounted () {
//
await this.loadService()
this.getOrgTreeList()
const { user } = this.$store.state
this.agencyId = user.agencyId
await this.loadTable()
},
methods: {
handleChangeAgency (val) {
let obj = this.$refs["myCascader"].getCheckedNodes()[0].data
if (obj) {
this.formData.agencyId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : '';
} else {
this.formData.agencyId = ''
}
},
getOrgTreeList () {
const { user } = this.$store.state
this.$http
.post('/gov/org/customeragency/my-subagency-list', {})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.orgOptions = []
this.orgOptions.push(res.data)
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
handleSearch () {
this.pageNo = 1
this.loadTable()
},
//
async loadService () {
const url = "/heart/serviceitem/dict-options"
let params = {
type:'all'
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.serviceList = data
} else {
this.$message.error(msg)
}
},
async loadTable () {
this.tableLoading = true
const url = "/heart/icPublicServiceOrg/page"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/list"
let params = {
pageSize: this.pageSize,
pageNo: this.pageNo,
agencyId: this.agencyId,
...this.formData
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.total = data.total
data.list.forEach(element => {
if (element.serviceMatterList.length > 0) {
element.serviceMatterListShow = element.serviceMatterList.join(',')
} else {
element.serviceMatterListShow = ''
}
});
this.tableData = data.list
} else {
this.$message.error(msg)
}
this.tableLoading = false
},
editDiaClose () {
this.$refs.ref_form.resetData()
this.formShow = false
},
diaDetailClose () {
this.$refs.ref_detail.diaDestroy()
this.detailShow = false
},
handleDetail (row) {
// this.formTitle = ''
this.detailShow = true
this.$nextTick(() => {
this.$refs.ref_detail.initForm(row)
})
},
//
handleFinish (row) {
this.finishDiaTitle = row.name + '完成情况'
this.finishDiaShow = true
this.$nextTick(() => {
this.$refs.ref_finish.initTable(row)
})
},
handleAdd () {
this.formTitle = '新增'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm('add', null)
})
},
handleEdit (row) {
this.formTitle = '修改'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm('edit',row.id)
})
},
addFormCancle () {
this.formShow = false
},
addFormOk () {
this.formShow = false
this.loadTable()
},
async handleSync (row) {
this.$confirm("确认同步到通讯录?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.syncUnit(row)
})
.catch(err => {
if (err == "cancel") {
}
});
},
async handleNoSync (row) {
this.$confirm("确认取消同步?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.noSyncUnit(row)
})
.catch(err => {
if (err == "cancel") {
}
});
},
async syncUnit (row) {
const url = "/gov/org/department/syncdept"
let params = {
id: row.id,
deptName: row.name,
mobile: row.contactMobile,
personName: row.contact,
deptType: 'party_unit',
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
if (data.type) {
this.$message({
type: "success",
message: data.msg || "同步成功"
});
this.loadTable()
} else {
this.$message.error(data.msg)
}
} else {
this.$message.error(msg)
}
},
async noSyncUnit (row) {
const url = "/gov/org/department/notsyncdept"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/delete"
let params = {
id: row.id,
deptId: row.deptId,
deptStaffId: row.deptStaffId,
deptType: 'party_unit',
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
if (data.type) {
this.$message({
type: "success",
message: "取消同步成功"
});
this.loadTable()
} else {
this.$message.error(data.msg)
}
} else {
this.$message.error(msg)
}
},
async handleDelete (row) {
this.$confirm("确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.deleteUnit(row)
})
.catch(err => {
if (err == "cancel") {
}
});
},
async deleteUnit (row) {
const url = "/heart/icPublicServiceOrg/delete"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/delete"
let params = {
id: row.id
}
const { data, code, msg } = await requestPost(url, [row.id])
if (code === 0) {
this.$message({
type: "success",
message: "删除成功"
});
this.loadTable()
} else {
this.$message.error(msg)
}
},
//
resetSearch () {
this.agencyIdArray = []
this.formData = {
agencyId: '',
name: '',
categoryIds: [],
type: '',
contact: '',
contactMobile: ''
}
this.pageSize = 10
this.pageNo = 0
// this.loadTable()
},
//
async handleExport () {
let title = '联建单位列表'
const url = "/heart/icpartyunit/export"
let params = {
agencyId: this.agencyId,
...this.formData
}
app.ajax.exportFilePost(
url,
params,
(data, rspMsg) => {
this.download(data, title + '.xls')
},
(rspMsg, data) => {
this.$message.error(rspMsg);
}
);
},
handleSizeChange (val) {
this.pageSize = val
this.pageNo = 1
this.loadTable()
},
handleCurrentChange (val) {
this.pageNo = val
this.loadTable()
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
tableHeight () {
return this.$store.state.inIframe ? this.clientHeight - 430 + this.iframeHeight : this.clientHeight - 430
},
...mapGetters(['clientHeight', 'iframeHeight'])
},
watch: {
},
props: {
}
}
</script>
<style lang="scss" scoped >
.div_main {
width: 100%;
}
.div_search {
background: #ffffff;
border-radius: 4px;
padding: 30px 20px 5px;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.1);
}
.item_width_1 {
width: 260px;
}
.item_width_2 {
width: 620px;
}
.div_table {
background: #ffffff;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.1);
border-radius: 4px;
margin-top: 15px;
padding: 23px 30px 10px;
.table {
margin-top: 20px;
}
}
.el-row {
/* margin-bottom: 20px; */
display: flex;
flex-wrap: wrap;
margin-top: 10px;
margin-right: 50px;
}
</style>

207
src/views/modules/communityParty/organization/orgDetail.vue

@ -0,0 +1,207 @@
<template>
<div>
<div class="dialog-h-content scroll-h">
<div v-if="initLoading"
class="m-row">
<div class="m-info">
<div class="info-prop">
<span class="info-title-2">单位名称</span>
<span>{{ formData.name||'--' }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">分类</span>
<span>{{ formData.type||'--' }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">服务事项</span>
<span>{{ formData.serviceMatterName }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">联系人</span>
<span>{{ formData.contact||'--' }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">联系电话</span>
<span>{{ formData.contactMobile||'--' }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">备注</span>
<span>{{ formData.remark||'--' }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">地理位置</span>
<span>{{ formData.address||'--' }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">地图位置</span>
<div class="div_map">
<div id="app_detail_unit"></div>
</div>
</div>
</div>
</div>
</div>
<div class="div-btn">
<el-button size="small"
@click="handleCancle"> </el-button>
</div>
</div>
</template>
<script>
import { Loading } from 'element-ui' // Loading
import nextTick from 'dai-js/tools/nextTick'
import daiMap from "@/utils/dai-map";
import { requestPost } from '@/js/dai/request'
var map
var search
var markers
var infoWindowList
var geocoder //
let loading //
export default {
data () {
return {
formData: {
name:"",
type:"",
serviceMatterName:"",
contact:"",
contactMobile:"",
remark:"",
address:"",
latitude:"",
longitude:"",
},
initLoading: false,
unitId:""
}
},
components: {},
created () {
},
methods: {
handleCancle () {
this.diaDestroy()
this.$emit('diaDetailClose')
},
diaDestroy () {
if (map) {
// map.destroy()
}
},
async initForm (row) {
this.startLoading()
// this.formData = JSON.parse(JSON.stringify(row))
this.initLoading = true
this.unitId = row.id
// await nextTick(200)
await this.getDetail()
console.log(this.formData);
let { latitude, longitude } = this.$store.state.user;
console.log('lat' + latitude + ',lon' + longitude)
if (this.formData.latitude && this.formData.longitude) {
latitude = this.formData.latitude
longitude = this.formData.longitude
}
if (!latitude || latitude == "" || latitude == "0") {
latitude = 39.9088810666821;
longitude = 116.39743841556731;
}
this.$nextTick(() => {
if (!map) {
this.initMap(latitude, longitude)
} else {
map.setCenter(latitude, longitude);
map.setMarker(latitude, longitude);
}
})
this.endLoading()
},
async getDetail () {
const url = `/heart/icPublicServiceOrg/detail/${this.unitId}`
const { data, code, msg } = await requestPost(url)
if (code === 0) {
this.formData = data
} else {
this.$message.error(msg)
}
},
// init
initMap (latitude, longitude) {
console.log(latitude, longitude);
map = new daiMap(
document.getElementById("app_detail_unit"),
{ latitude, longitude },
{
zoom: 16.2, //
pitch: 43.5, //
rotation: 45, //
}
);
// //
// map.on("dragend", (e) => {
// this.handleMoveCenter(e);
// });
map.setCenter(latitude, longitude);
map.setMarker(latitude, longitude);
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
},
props: {
}
}
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/management/detail-main.scss";
</style>
<style scoped>
</style>

521
src/views/modules/communityParty/organization/orgForm.vue

@ -0,0 +1,521 @@
<template>
<div>
<div class="dialog-h-content scroll-h">
<el-form ref="ref_form"
:inline="true"
:model="formData"
:rules="dataRule"
:disabled="formType === 'detail'"
class="form">
<el-form-item label="单位名称"
prop="name"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
maxlength="50"
show-word-limit
placeholder="请输入单位名称"
v-model="formData.name">
</el-input>
</el-form-item>
<el-form-item label="分类"
prop="type"
label-width="150px"
style="display: block">
<el-select class="item_width_1"
v-model="formData.type"
placeholder="请选择"
filterable
clearable>
<el-option v-for="item in typeList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="服务事项"
prop="serviceMatterList"
label-width="150px"
style="display: block">
<el-checkbox-group class="item_width_1"
style="display:flex;flex-wrap:wrap"
v-model="formData.serviceMatterList">
<el-checkbox v-for="item in serviceList"
:key="item.categoryCode"
:label="item.categoryCode">{{item.categoryName}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="联系人"
prop="contact"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
placeholder="请输入联系人姓名"
v-model="formData.contact">
</el-input>
</el-form-item>
<el-form-item label="联系电话"
prop="contactMobile"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
placeholder="请输入联系人电话"
v-model="formData.contactMobile">
</el-input>
</el-form-item>
<el-form-item label="备注"
prop="remark"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
type="textarea"
maxlength="500"
show-word-limit
:rows="3"
placeholder="请输入备注,不超过500字"
v-model="formData.remark"></el-input>
</el-form-item>
<el-form-item label="地图位置"
prop="longitude"
label-width="150px"
style="display: block">
<div style="width: 500px">
<el-select v-model="searchValue"
filterable
style="width: 500px"
remote
:reserve-keyword="true"
placeholder="请输入关键词"
:remote-method="remoteMethod"
:loading="loading">
<el-option v-for="(item,index) in searchOptions"
@click.native="handleClickKey(index)"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<div id="app_unit"
class="div_map"></div>
</div>
</el-form-item>
<el-form-item label="详细地址"
prop="address"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
v-model="formData.address">
</el-input>
</el-form-item>
</el-form>
</div>
<div class="div_btn">
<el-button size="small"
@click="handleCancle"> </el-button>
<el-button size="small"
v-if="formType != 'detail'"
type="primary"
:disabled="btnDisable"
@click="handleComfirm"> </el-button>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
import daiMap from "@/utils/dai-map";
var map
let loading //
export default {
data () {
let initFormData = () => {
let _form = {
name: '',
serviceMatterList: [],
type: '',
contact: '',
contactMobile: '',
remark: '', //500
address: '', //
longitude: this.$store.state.user.longitude, //
latitude: this.$store.state.user.latitude //
}
return _form
}
return {
formType: 'add', // addeditdetail
searchOptions: [],
searchValue: '',
resultList: [],
loading: false,
serviceMatterListCody:[],
btnDisable: false,
unitId: '',
keyWords: '',
formData: initFormData(),
serviceList: [],//list
}
},
components: {},
mounted () {
// this.initMap()
},
watch:{
},
methods: {
async initForm (type, unitId) {
this.startLoading()
this.$refs.ref_form.resetFields();
//
await this.loadService()
let { latitude, longitude } = this.$store.state.user;
this.formType = type
if (unitId) {
this.unitId = unitId
await this.getDetail()
} else {
this.formData.latitude = latitude
this.formData.longitude = longitude
}
// if (!map) {
this.initMap(this.formData.latitude, this.formData.longitude);
// }
this.endLoading()
},
//
async loadService () {
const url = "/heart/serviceitem/dict-options"
let params = {
type: 'usable'
// parentCategoryCode: '1010'
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.serviceList = data
} else {
this.$message.error(msg)
}
},
async getDetail () {
const url = `/heart/icPublicServiceOrg/detail/${this.unitId}`
const { data, code, msg } = await requestPost(url)
if (code === 0) {
for(let key in data){
if(key == 'serviceMatterList'){
let arr =[]
for(let val of data[key]){
arr.push(val.categoryCode)
}
this.serviceMatterListCody = arr
}
}
this.formData = data
this.formData.serviceMatterList = this.serviceMatterListCody
} else {
this.$message.error(msg)
}
},
//
async loadFormData () {
const url = '/heart/icpartyunit/detail'
// const url = 'http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/detail'
let params = {
id: this.unitId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
if (!data.serviceMatterList) {
data.serviceMatterList = []
}
this.formData = { ...data }
} else {
this.$message.error(msg)
}
},
async handleComfirm () {
this.btnDisable = true
setTimeout(() => {
this.btnDisable = false
}, 10000)
this.$refs['ref_form'].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj)
this.btnDisable = false
} else {
this.addUnit()
}
})
},
async addUnit () {
// const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //
// if (regPhone.test(this.formData.contactMobile) === false) {
// this.btnDisable = false
// this.$message({
// type: 'warning',
// message: ''
// })
// return false;
// }
let url = '/heart/icPublicServiceOrg/save'
// let url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/save"
if (this.formType === 'edit') {
this.formData.id = this.unitId
url = '/heart/icPublicServiceOrg/update'
}
if(this.formData.serviceMatterList.length>0){
let arr = []
for( let code of this.formData.serviceMatterList){
this.serviceList.forEach(item=>{
if( item.categoryCode == code){
arr.push({categoryCode:item.categoryCode,categoryId:item.categoryId})
}
return arr
})
}
this.formData.serviceMatterList = arr
this.formData.latitude = this.formData.latitude.toString()
this.formData.longitude = this.formData.longitude.toString()
}
const { data, code, msg } = await requestPost(url,this.formData)
if (code === 0) {
this.$message({
type: 'success',
message: '操作成功'
})
this.resetData()
this.$emit('dialogOk')
this.btnDisable = false
} else {
this.btnDisable = false
this.$message.error(msg)
}
},
handleCancle () {
this.resetData()
this.$emit('dialogCancle')
},
// init
initMap (latitude, longitude) {
map = new daiMap(
document.getElementById("app_unit"),
{ latitude, longitude },
{
zoom: 16.2, //
pitch: 43.5, //
rotation: 45, //
}
);
//
map.on("dragend", (e) => {
this.handleMoveCenter(e);
});
map.setCenter(latitude, longitude);
map.setMarker(latitude, longitude);
},
async handleMoveCenter () {
//
const { lat, lng } = map.getCenter();
this.formData.latitude = lat;
this.formData.longitude = lng;
map.setMarker(lat, lng);
let { msg, data } = await map.getAddress(lat, lng);
if (msg == "success") {
this.formData.address = data.address
this.searchValue = data.address
this.searchOptions = []
}
},
async remoteMethod (query) {
if (query !== '') {
this.loading = true;
const { msg, data } = await map.searchNearby(query);
this.loading = false;
this.resultList = []
if (msg == "success" && data.resultList && data.resultList.length > 0) {
if (data.resultList && data.resultList.length > 0) {
this.resultList = data.resultList
this.searchOptions = this.resultList.map(item => {
return { value: `${item.hotPointID}`, label: `${item.address + item.name}` };
});
}
} else {
this.searchOptions = [
{
value: '0',
label: '未检索到结果'
}
]
}
} else {
this.searchOptions = [];
}
},
handleClickKey (index) {
let selPosition = this.resultList[index]
let lonlat = selPosition.lonlat.split(" ")
map.setCenter(lonlat[1], lonlat[0]);
map.setMarker(lonlat[1], lonlat[0]);
this.formData.latitude = lonlat[1];
this.formData.longitude = lonlat[0];
this.formData.address = selPosition.address + selPosition.name
},
resetData () {
this.searchValue = ''
this.searchOptions = []
this.resultList = []
if (map) {
console.log(map)
// map.destroy()
}
this.unitId = ''
this.keyWords = ''
this.formData = {
name: '',
serviceMatterList: [],
type: '',
contact: '',
contactMobile: '',
remark: '', //500
address: '', //
longitude: this.$store.state.user.longitude, //
latitude: this.$store.state.user.latitude//
}
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
dataRule () {
return {
name: [
{ required: true, message: '单位名称不能为空', trigger: 'blur' },
],
type: [
{ required: true, message: '分类不能为空', trigger: 'blur' }
],
contact: [
{ required: true, message: '联系人不能为空', trigger: 'blur' }
],
contactMobile: [
{ required: true, message: '联系电话不能为空', trigger: 'blur' }
],
address: [
{ required: true, message: '详细地址不能为空', trigger: 'blur' }
],
longitude: [
{ required: true, message: '坐标不能为空', trigger: 'blur' }
]
}
},
},
props: {
typeList: {
type: Array,
default: []
},
}
}
</script>
<style scoped>
.div_map {
position: relative;
}
.div_searchmap {
z-index: 5000;
position: absolute;
top: 5px;
left: 5px;
}
</style>
<style lang="scss" scoped >
@import "@/assets/scss/modules/visual/communityManageForm.scss";
</style>

71
src/views/modules/communityService/estateManagement/cpts/detail.vue

@ -0,0 +1,71 @@
<template>
<div>
<div class="dialog-h-content scroll-h">
<div
class="m-row">
<div class="m-info">
<div class="info-prop">
<span class="info-title-2">物业名称</span>
<span>{{ villageList.name|| "--" }}</span>
</div>
</div>
</div>
</div>
<div class="div-btn">
<el-button size="small"
@click="handleCancle"> </el-button>
</div>
</div>
</template>
<script>
import { mapGetters } from "vuex";
import { requestPost } from "@/js/dai/request";
import fileList from '@/views/components/fileList'
export default {
props: {
formId: {
type: String,
default: "",
},
villageList:{
type:Object,
default:()=>{}
}
},
data () {
return {
customerId: localStorage.getItem("customerId"),
initLoading: false,
fmData: {},
};
},
components: { fileList },
computed: {
},
watch: {},
methods: {
handleCancle () {
this.$emit("diaDetailClose");
},
},
};
</script>
<style lang="scss" scoped >
@import "@/assets/scss/modules/management/detail-main.scss";
</style>

205
src/views/modules/communityService/estateManagement/cpts/edit.vue

@ -0,0 +1,205 @@
<template>
<div>
<div class="dialog-h-content scroll-h">
<el-form
ref="ref_form"
:inline="true"
:model="fmData"
:rules="dataRule"
:disabled="formType === 'watch'"
class="form"
>
<el-form-item
label="物业名称"
prop="name"
label-width="150px"
style="display: block"
>
<el-input
v-if="formType == 'add' || formType == 'edit'"
class="item_width_1"
show-word-limit
placeholder="请输入物业名称"
v-model="fmData.name"
>
</el-input>
<div style="width:610px" v-else>{{ fmData.serviceName || "--" }}</div>
</el-form-item>
</el-form>
</div>
<div class="div_btn resi-btns">
<el-button size="small" @click="handleCancle"> </el-button>
<el-button
v-if="formType != 'watch'"
type="primary"
size="small"
:disabled="btnDisable"
@click="handleComfirm"
> </el-button
>
</div>
</div>
</template>
<script>
import { mapGetters } from "vuex";
import { requestPost } from "@/js/dai/request";
import formVltHelper from "dai-js/tools/formVltHelper";
export default {
props: {
formId: {
type: String,
default: "",
},
formType: {
type: String,
default: "info",
},
villageList: {
type: Object,
default: {},
},
},
data() {
return {
uploadUrl: window.SITE_CONFIG["apiURL"] + "/oss/file/uploadqrcodeV2",
customerId: localStorage.getItem("customerId"),
btnDisable: false,
fmData: {
name:""
},
levelOptions: [
{
value: "0",
label: "市级",
},
{
value: "1",
label: "区级",
},
{
value: "2",
label: "街道级",
},
],
categoryOptions: [],
};
},
components: {},
computed: {
dataRule() {
return {
name: [
{ required: true, message: "物业名字不能为空", trigger: "blur" },
],
};
},
},
watch: {},
async mounted() {
this.initForm();
},
methods: {
async initForm() {
if ( this.formType != "add") {
this.getInfo();
}
},
async getInfo() {
this.fmData.name = this.villageList.name
},
async handleComfirm() {
this.btnDisable = true;
setTimeout(() => {
this.btnDisable = false;
}, 10000);
this.$refs["ref_form"].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj);
this.btnDisable = false;
} else {
this.submit();
}
});
},
async submit() {
let url = "";
let params = { ...this.fmData };
if (this.formType === "add") {
url = "/gov/org/propertymanagement/add";
} else {
url = "/gov/org/propertymanagement/update";
this.$set(params,"id", this.villageList.id)
}
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.$message({
type: "success",
message: "操作成功",
});
this.$emit("afterEdit");
this.btnDisable = false;
} else {
this.btnDisable = false;
this.$message.error(msg);
}
},
handleCancle() {
this.$emit("close");
},
},
};
</script>
<style lang="scss" scoped>
.item_width_1 {
width: 500px;
}
.item_width_2 {
width: 400px;
}
.item_width_3 {
margin-left: 10px;
width: 200px;
}
.item_width_4 {
width: 200px;
}
.div_map {
margin-top: 10px;
}
.div_btn {
// display: flex;
// justify-content: flex-end;
}
.el-tabs {
margin: 0 20px;
}
.el-upload__tip {
color: rgb(155, 155, 155);
margin: 0;
}
.form {
margin-top: 30px;
}
.attachement-list {
}
</style>

336
src/views/modules/communityService/estateManagement/estateManagement.vue

@ -0,0 +1,336 @@
<template>
<div class="div_main">
<div v-show="true">
<div class="div_search">
<el-form :inline="true"
:model="searchData"
ref="ref_searchform"
:label-width="'80px'">
<div>
<el-form-item label="物业名称"
prop="serviceContent">
<el-input v-model="searchData.name"
class="item_width_2"
size="small"
clearable
placeholder="请输入">
</el-input>
</el-form-item>
<el-button style="margin-left: 30px"
size="small"
class="diy-button--search"
@click="handleSearch">查询</el-button>
<el-button style="margin-left: 10px"
size="small"
class="diy-button--reset"
@click="resetSearch">重置</el-button>
</div>
</el-form>
</div>
<div class="div_table">
<div class="div_btn">
<el-button class="diy-button--add"
size="small"
@click="handleAdd">新增</el-button>
<!-- <el-button
@click="handleExport"
class="diy-button--reset"
size="small"
>导出</el-button
> -->
</div>
<el-table :data="tableData"
border
:header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }"
class="table"
style="width: 100%"
:height="maxTableHeight">
<el-table-column label="序号"
fixed="left"
type="index"
align="center"
width="50" />
<el-table-column prop="name"
align="center"
label="物业名称"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="totalNeighborHood"
align="center"
label="管理小区数量 "
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column fixed="right"
label="操作"
align="center"
width="200">
<template slot-scope="scope">
<el-button @click="handleWatch(scope.row)"
type="text"
size="small"
class=".div-table-button--detail">查看</el-button>
<el-button @click="handleEdit(scope.row)"
type="text"
size="small"
class="div-table-button--edit">编辑</el-button>
<el-popconfirm title="删除之后无法回复,确认删除?"
@onConfirm="handleDelete(scope.row, scope.$index)"
@confirm="handleDelete(scope.row, scope.$index)">
<el-button slot="reference"
type="text"
size="small"
style="margin-left: 10px"
class="div-table-button--delete">删除</el-button>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="parseInt(pageSize)"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination>
</div>
</div>
</div>
<!-- 修改弹出框 -->
<el-dialog v-if="formShow"
:visible.sync="formShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="formTitle"
width="850px"
top="5vh"
class="dialog-h"
@closed="handleClose">
<edit-form ref="eleEditForm"
:formId="formId"
:formType="formType"
@close="handleClose"
:villageList="villageList"
@afterEdit="handleEditSuccess"></edit-form>
</el-dialog>
<!-- 详情弹出框 -->
<el-dialog v-if="detailShow"
:visible.sync="detailShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'详情'"
width="850px"
top="5vh"
class="dialog-h"
@closed="handleClose">
<detail-form ref="ref_form_detail"
:formId="formId"
:villageList="villageList"
@diaDetailClose="handleClose"></detail-form>
</el-dialog>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import nextTick from "dai-js/tools/nextTick";
import { mapGetters } from "vuex";
import axios from "axios";
import editForm from "./cpts/edit";
import detailForm from "./cpts/detail";
function iniSearchData () {
return {
name: "",
};
}
export default {
components: { editForm, detailForm },
data () {
return {
tableData: [],
villageList:{},
searchData: iniSearchData(),
categoryOptions: [],
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
total: 1,
formId: "",
formShow: false,
formTitle: "服务项目",
formType: "", // list add edit info
detailShow: false,
};
},
computed: {
maxTableHeight () {
return this.$store.state.inIframe
? this.clientHeight - 410 + this.iframeHeigh
: this.clientHeight - 410;
},
...mapGetters(["clientHeight", "iframeHeight"]),
},
mounted () {
console.log(this.$store.state);
this.user = this.$store.state.user;
this.getTableData();
},
methods: {
handleSearch (val) {
console.log(this.searchData);
this.pageNo = 1;
this.getTableData();
},
async handleExport () {
const url = "/gov/project/icEvent/export";
const { pageSize, pageNo, searchData } = this;
axios({
url: window.SITE_CONFIG["apiURL"] + url,
method: "post",
data: {
pageSize,
pageNo,
...searchData,
},
responseType: "blob",
})
.then((res) => {
let fileName = window.decodeURI(
res.headers["content-disposition"].split(";")[1].split("=")[1]
);
console.log("filename", fileName);
let blob = new Blob([res.data], { type: "application/vnd.ms-excel" });
var url = window.URL.createObjectURL(blob);
var aLink = document.createElement("a");
aLink.style.display = "none";
aLink.href = url;
aLink.setAttribute("download", fileName);
document.body.appendChild(aLink);
aLink.click();
document.body.removeChild(aLink); //
window.URL.revokeObjectURL(url); //blob
})
.catch((err) => {
console.log("获取导出情失败", err);
return this.$message.error("网络错误");
});
},
handleAdd () {
this.formType = "add";
this.formTitle = "新增";
this.formShow = true;
},
handleWatch (row) {
// this.formType = "watch";
this.villageList = row
// this.formTitle = "";
// this.formShow = true;
console.log(this.villageList);
this.detailShow = true
},
handleEdit (row) {
this.formType = "edit";
this.formId = row.villageId;
this.villageList = row
this.formTitle = "编辑";
this.formShow = true;
},
handleClose () {
this.formShow = false;
this.detailShow = false
},
handleEditSuccess () {
this.handleClose();
this.getTableData();
},
async handleDelete (rowData, rowIndex) {
console.log(rowData, rowIndex);
const url = "/gov/org/propertymanagement/delete";
let params = {id : rowData.id}
const { data, code, msg } = await requestPost(url,params);
if (code === 0) {
this.$message.success("删除成功!");
this.getTableData();
} else {
if(code>=8000){
this.$message.error(msg);
}else{
this.$message.error("操作失败!");
}
}
},
async getTableData () {
const url = "/gov/org/propertymanagement/page";
const { pageSize, pageNo, searchData } = this;
const { data, code, msg } = await requestPost(url, {
pageSize,
pageNo,
...searchData,
});
if (code === 0) {
this.total = data.total || 0;
this.tableData = data.list
? data.list.map((item) => {
return item;
})
: [];
} else {
this.$message.error(msg);
}
},
handleSizeChange (val) {
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getTableData();
},
handleCurrentChange (val) {
this.pageNo = val;
this.getTableData();
},
resetSearch () {
this.searchData = iniSearchData();
this.getTableData();
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/buttonstyle.scss";
@import "@/assets/scss/modules/management/list-main.scss";
@import "@/assets/scss/modules/shequzhili/event-info.scss";
</style>

3
src/views/modules/communityService/worklog/workLog.vue

@ -654,13 +654,10 @@ export default {
message: "导入中,请到系统管理-导入记录中查看进度",
duration: 0,
});
this.loadTable()
} else {
this.$message.error(msg)
}
},
handleSizeChange (val) {

6
src/views/modules/partymember/icpartyorgtree.vue

@ -35,7 +35,7 @@
size="small"
class="div-table-button--detail">{{'负责人'}}</el-button>
<el-button v-if="(scope.row.agencyId == agencyId || scope.row.agencyPids.includes(agencyId)) && scope.row.partyOrgType != '6'"
@click="handleLook(scope.row.agencyPids, scope.row.id, scope.row)"
@click="handleLook(scope.row.agencyPids, scope.row.id, scope.row,scope.row.agencyId)"
type="text"
size="small"
class="div-table-button--detail">{{'查看党员'}}</el-button>
@ -304,10 +304,10 @@
}).catch(() => {})
},
//
handleLook(agencyPids, id, row) {
handleLook(agencyPids, id, row,agencyId) {
this.lookMemberShow = true
this.$nextTick(() => {
this.$refs.ref_table_Member.initForm(agencyPids.split(':')[agencyPids.split(':').length - 1], id)
this.$refs.ref_table_Member.initForm(agencyPids.split(':')[agencyPids.split(':').length - 1], id,agencyId)
})
},
lookMemberClose () {

221
src/views/modules/partymember/lookMember.vue

@ -27,6 +27,7 @@
:options="optionsG"
:props="partyProps"
clearable
:key="cascaderKey"
@change="handlePartyChange"></el-cascader>
</el-form-item>
<el-form-item label="姓名"
@ -146,6 +147,35 @@
</div>
</el-card>
<el-card class="resi-card-table">
<div class="resi-row-btn">
<el-button class="diy-button--export"
size="small"
@click="handleExportModule()">下载模板</el-button>
<el-upload :headers="$getElUploadHeaders()"
ref="upload"
class="upload-demo"
action="uploadUlr"
:limit="1"
:accept="'.xls,.xlsx'"
:with-credentials="true"
:show-file-list="false"
:auto-upload="true"
:on-success="handleExcelSuccess"
:before-upload="beforeExcelUpload"
:http-request="uploadHttpRequest">
<el-button size="small"
class="diy-button--delete"
:loading="importLoading">{{importBtnTitle}}</el-button>
</el-upload>
<el-button class="diy-button--reset"
size="small"
:loading="exportBtn"
@click="handleExport">{{ exportBtnTitle }}</el-button>
</div>
<el-table :data="tableData"
row-key="id"
v-loading="tableLoading"
@ -278,9 +308,11 @@
import axios from 'axios'
import { mapGetters } from 'vuex'
import crateForm from '../communityParty/members/crateForm.vue'
import { requestGet } from '../../../js/dai/request'
export default {
data () {
return {
cascaderKey:0,//
uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadqrcodeV2',
importBtnTitle: '导入',
importLoading: false,
@ -404,22 +436,33 @@ export default {
components: {
crateForm
},
created(){
},
watch: {
'optionsG': {
handler(newVal){
this.cascaderKey ++
}
},
},
methods: {
initForm (agencyId, id) {
initForm (agencyId, id,agencyIds) {
this.agencyId = agencyId
this.searchForm.partyOrgId = id
this.partyOrgId = id
console.log('this.searchForm.partyOrgId:::::', this.searchForm.partyOrgId)
this.tableLoading = true
this.pageLoading = true
this.getTableData()
this.getGridList('query')
this.getGridList('query',agencyIds)
},
//
handleCancle () {
this.partyOrgRange = []
console.log( this.partyOrgRange);
console.log(this.searchForm.partyOrgId);
this.$emit('lookMemberCancle')
},
@ -495,6 +538,126 @@ export default {
window.URL.revokeObjectURL(url)
}
},
async handleExportModule () {
let url = "/resi/partymember/icPartyMember/downloadTemplate"
let params = {
}
await this.$http({
method: 'POST',
url,
responseType: 'blob',
data: params
})
.then(res => {
console.log('res-------dd', res)
if (res.headers["content-disposition"]) {
let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1])
this.download(res.data, fileName)
} else this.$message.error('下载失败')
})
.catch(err => {
console.log('err', err)
return this.$message.error('网络错误')
})
},
//
handleExcelSuccess (res, file) {
if (res.code === 0 && res.msg === 'success') {
console.log('resss---ppp', res)
} else {
this.$message.error(res.msg)
}
},
beforeExcelUpload (file) {
console.log('file', file)
const isType = file.type === 'application/vnd.ms-excel'
const isTypeComputer = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
const fileType = isType || isTypeComputer
const isLt1M = (file.size / 1024 / 1024) < 10
if (!fileType) {
this.$message.error('上传文件只能是xls/xlsx格式!')
}
if (!isLt1M) {
this.$message.error('上传文件大小不能超过 10MB!')
}
return fileType && isLt1M
},
async uploadHttpRequest (file) {
this.importLoading = true
this.importBtnTitle = '正在上传中...'
this.$message({
showClose: true,
message: '导入中,请到系统管理-导入记录中查看进度',
duration: 0
})
const formData = new FormData() //FormDataappend('key', value)
formData.append('file', file.file) //
this.$http
.post('/resi/partymember/icPartyMember/import', formData).then(res => {
console.log('res-up', res)
if (res.data.code == 0 && res.data.msg == 'success') {
// this.$message.success('')
this.getTableData()
} else {
this.$message.error(res.data.msg)
}
}).catch(err => {
console.log('失败', err)
file.onError() //
// this.$message.error('')
})
this.importLoading = false
this.importBtnTitle = '导入'
this.$refs.upload.clearFiles()
},
async handleExport () {
this.exportBtn = true
this.exportBtnTitle = '正在导出...'
let params = {
...this.searchForm,
agencyId: this.agencyId,
pageSize: 9999,
pageNo: this.currentPage
}
// .post('epmetuser/icresiuser/exportExcel', params)
await axios({
url: window.SITE_CONFIG['apiURL'] + '/resi/partymember/icPartyMember/export',
// url: 'epmetuser/icresiuser/exportExcel',
method: 'post',
data: params,
responseType: 'blob'
})
.then(res => {
console.log('resllll', res)
let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1])
console.log('filename', fileName)
let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
var url = window.URL.createObjectURL(blob)
var aLink = document.createElement('a')
aLink.style.display = 'none'
aLink.href = url
aLink.setAttribute('download', fileName)
document.body.appendChild(aLink)
aLink.click()
document.body.removeChild(aLink) //
window.URL.revokeObjectURL(url) //blob
})
.catch((err) => {
console.log('获取导出情失败', err)
this.$message.error('获取导出失败')
})
this.exportBtn = false
this.exportBtnTitle = '导出'
},
handleSearch (val) {
console.log('searchhh--', val)
@ -508,6 +671,7 @@ export default {
this.searchForm.payEndDate = ''
this.searchForm.rdsjStartDate = ''
this.searchForm.rdsjEndDate = ''
this.partyOrgRange = []
this.$refs[formName].resetFields()
this.searchForm.partyOrgId = this.partyOrgId
this.handleSearch()
@ -546,20 +710,18 @@ export default {
},
async getGridList (type, agencyId) {
// addorupdate query
await this.$http
.get('/resi/partymember/icPartyOrg/getSearchTreelist', { params: { agencyId: agencyId } })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
let url = "/resi/partymember/icPartyOrg/getSearchTreelist"
let params = {
agencyId: agencyId
}
const {data , msg,code } = await requestGet(url,params)
if (code !== 0) {
return this.$message.error(msg)
} else {
console.log('获取查询详情成功', res.data)
this.optionsG = this.deepArrTOnull(res.data)
console.log('获取查询详情成功', data)
this.optionsG = this.deepArrTOnull(data)
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
deepArrTOnull (arr) {
let a = []
@ -597,7 +759,7 @@ export default {
this.tableLoading = true
let params = {
...this.searchForm,
agencyId: this.agencyId,
// agencyId:this.agencyId,
pageNo: this.currentPage,
pageSize: this.pageSize
}
@ -623,6 +785,33 @@ export default {
@import "@/assets/scss/modules/visual/communityManage.scss";
</style>
<style lang="scss" scoped>
.resi-row-btn {
display: flex;
margin-bottom: 13px;
::v-deep .el-button {
// margin-left: 10px;
border: 0;
}
::v-deep .el-select {
margin-right: 10px;
}
.el-button--success {
background: rgba(34, 193, 195, 1);
}
.el-button {
margin-left: 10px;
border: 0;
}
.el-button--success {
background: rgba(34, 193, 195, 1);
}
.el-button--warning {
background: rgba(254, 179, 73, 1);
}
.el-button--danger {
background: rgba(254, 98, 82, 1);
}
}
.div_btn {
display: flex;
align-items: center;

694
src/views/modules/shequ/index.vue

File diff suppressed because it is too large

2
src/views/modules/shequzhili/event/cpts/process-form.vue

@ -18,7 +18,7 @@
label="">暂不处理</el-radio>
<el-radio label="0">回复</el-radio>
<el-radio label="1">立项</el-radio>
<el-radio label="2">转服务</el-radio>
<el-radio label="2">需求服务</el-radio>
<el-radio label="3">转议题</el-radio>
</el-radio-group>

2
src/views/modules/shequzhili/event/eventList.vue

@ -787,7 +787,7 @@ export default {
// this.tableData.forEach(item => {
// if (item.operationType === '2') {
// item.operationTypeShow = ''
// item.operationTypeShow = ''
// }
// if (item.operationType === '1') {
// item.operationTypeShow = ''

148
src/views/modules/shequzhili/htgl/cpts/htglInfo.vue

@ -0,0 +1,148 @@
<template>
<div>
<div class="body">
<el-row type="flex" >
<el-col :span="24">
<span class="htgl_info_label">所属网格:</span> {{htglDetailData.gridName||'--'}}
</el-col>
</el-row>
<el-row type="flex" >
<el-col :span="24" style="display: flex;">
<span class="htgl_info_label">话题内容:</span> <section style="flex:1">{{htglDetailData.topicContent||'--'}}</section>
</el-col>
</el-row>
<el-row type="flex" >
<el-col :span="24" style="display: flex;">
<span :class="htglDetailData.topicImages?'img_label':'htgl_info_label'" >图片:</span>
<template v-if=" htglDetailData.topicImages">
<section v-for="(item,index) in htglDetailData.topicImages" :key="index" >
<img :src="item" alt="" width="150px" height="200px" :style="{'margin-left': index==0?'0px':'16px'}" />
</section>
</template>
<span v-if="htglDetailData.topicImages==null">--</span>
</el-col>
</el-row>
<el-row type="flex" >
<el-col :span="24">
<span class="htgl_info_label">话题发表人:</span> {{htglDetailData.userName||'--'}}
</el-col>
</el-row>
<el-row type="flex" >
<el-col :span="24">
<span class="htgl_info_label">发布时间:</span> {{htglDetailData.releaseTime||'--'}}
</el-col>
</el-row>
<el-row type="flex" >
<el-col :span="24">
<span :class="htglDetailData.topicVoices ? 'img_label':'htgl_info_label'">语音详情:</span>
<div style=" display: inline-block;" v-if="htglDetailData.topicVoices">
<audio controls v-if="htglDetailData.topicVoices">
<source :src="htglDetailData.topicVoices[0].url" type="">
</audio>
</div>
<span v-else>--</span>
</el-col>
</el-row>
<el-row type="flex" >
<el-col :span="24">
<span class="htgl_info_label">当前支持:</span>{{htglDetailData.supportCount||'--'}},反对: {{htglDetailData.oppositionCount||'--'}}
</el-col>
</el-row>
</div>
</div>
</template>
<script>
import nextTick from "dai-js/tools/nextTick";
import { requestPost } from "@/js/dai/request";
export default {
data() {
return {
htglDetailData:{}
};
},
props:{
htglDetailId:{
type:String,
default:""
},
},
created() {
this.getEditList()
// console.log(this.htglDetailData);
// this.$set(this.htglDetailData,'topicVoices',this.htglDetailData)
},
methods:{
async getEditList(){
const url = "/resi/group/ytTopic/topicDetail";
const { data, code, msg } = await requestPost(url, {
topicId: this.htglDetailId
});
if (code === 0) {
this.htglDetailData = { ...data };
} else {
this.$message.error(msg);
}
}
},
mounted(){
},
components: {},
computed: {
},
watch: {},
};
</script>
<style lang="scss" scoped>
.img_label{
display: inline-block;
height: 75px;
vertical-align: top;
padding-left: 10px;
width: 90px;
text-align: left;
margin-right: 6px;
}
.body{
padding: 0 60px;
}
.htgl_info_label{
display: inline-block;
width: 90px;
text-align: left;
padding-left: 10px;
position: relative;
margin-right: 6px;
}
.htgl_info_label::before{
content: "";
display: block;
position: absolute;
top: 5px;
width: 7px;
left: -5px;
height: 7px;
background: #0c81fe;
border-radius: 3px;
margin-right: 10px;
}
.img_label::before{
content: "";
display: block;
position: absolute;
left: -5px;
top: 5px;
width: 7px;
height: 7px;
background: #0c81fe;
border-radius: 3px;
margin-right: 10px;
}
</style>

324
src/views/modules/shequzhili/htgl/index.vue

@ -0,0 +1,324 @@
<template>
<div class="div_main">
<div class="div_search">
<el-form
:inline="true"
:model="formData"
ref="ref_searchform"
:label-width="'100px'"
>
<div>
<el-form-item label="所属组织" prop="orgId" >
<el-cascader
class="item_width_2"
ref="myCascader"
size="small"
v-model="agencyIdArray"
:options="orgOptions"
:props="orgOptionProps"
:show-all-levels="false"
></el-cascader>
</el-form-item>
<el-form-item label="话题内容" prop="topicContent">
<el-input
class="item_width_2"
size="small"
v-model="formData.topicContent"
clearable
placeholder="请输入"
>
</el-input>
</el-form-item>
<el-form-item label="话题发表人" prop="userName">
<el-input
class="item_width_2"
size="small"
v-model="formData.userName"
clearable
placeholder="请输入"
>
</el-input>
</el-form-item>
<el-form-item label="发布时间" prop="startTime">
<el-date-picker v-model="formData.startDate"
class="item_width_2"
size="small"
type="date"
value-format="yyyy-MM-dd"
value="yyyy-MM-dd"
placeholder="开始时间">
</el-date-picker>
<span class="data-tag"></span>
<el-date-picker v-model="formData.endDate"
class="item_width_2 data-tag"
size="small"
type="date"
value-format="yyyy-MM-dd"
value="yyyy-MM-dd"
placeholder="结束时间">
</el-date-picker>
</el-form-item>
<el-button
style="margin-left: 30px"
size="small"
class="diy-button--search"
@click="handleSearch"
>查询</el-button
>
<el-button
style="margin-left: 10px"
size="small"
class="diy-button--reset"
@click="resetSearch"
>重置</el-button
>
</div>
</el-form>
</div>
<div class="div_table">
<el-table
border
:header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }"
class="table"
:data="tableData"
style="width: 100%"
:height="maxTableHeight"
>
<el-table-column
label="序号"
fixed="left"
type="index"
align="center"
width="50"
/>
<el-table-column
prop="gridName"
align="center"
label="所属网格"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column
prop="topicContent"
label="话题内容"
min-width="150"
align="center"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column
prop="userName"
align="center"
min-width="150"
label="话题发表人"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column
prop="releaseTime"
align="center"
width="180"
:show-overflow-tooltip="true"
label="发布时间"
>
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="100">
<template slot-scope="scope">
<!-- <el-button v-if="scope.row.issueStatus==='voting'&& agencyId===scope.row.orgId"
@click="handleDispose(scope.row)"
type="text" size="small"
class="div-table-button--edit">处理</el-button> -->
<el-button @click="handleWatch(scope.row)" type="text" size="small"
>查看</el-button
>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="parseInt(pageSize)"
layout="sizes, prev, pager, next, total"
:total="total"
>
</el-pagination>
</div>
</div>
<el-dialog
title="话题详情"
:visible.sync="showhtglDialog"
width="950px"
v-if="showhtglDialog"
@close="showhtglDialog = false"
>
<htgl-info
:htglDetailId="htglDetailId"
>
</htgl-info>
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from "vuex";
import { requestPost } from "@/js/dai/request";
import htglInfo from "./cpts/htglInfo.vue"
import axios from "axios";
export default {
data() {
return {
orgOptions: [],
orgOptionProps: {
multiple: false,
value: 'agencyId',
label: 'agencyName',
children: 'subAgencyList',
checkStrictly: true
},
formData: {
topicContent: '',
userName: '',
startDate: '',
endDate: '',
},
showhtglDialog:false,
topicId:'',
tableData:[],
dialogVisible:false,
agencyIdArray: [],
htglDetailId:"",
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
total: 1,
};
},
created() {
this.getTableData()
},
mounted() {
this.getOrgTreeList();
},
methods: {
async getOrgTreeList() {
const url = "/gov/org/customeragency/agencygridtree";
let params = {
agencyId: this.agencyId,
purpose: "query",
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.orgOptions = [];
this.orgOptions.push(data);
} else {
this.$message.error(msg);
}
},
handleSizeChange (val) {
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getTableData();
},
handleCurrentChange (val) {
this.pageNo = val;
this.getTableData();
},
handleSearch (val) {
this.pageNo = 1;
this.getTableData();
},
resetSearch () {
this.agencyIdArray = []
this.formData = {
topicContent: '',
userName: '',
startDate: '',
endDate: '',
}
this.pageNo = 1
},
async getTableData () {
const url = "/resi/group/ytTopic/topicList";
var gridId = ''
const { pageSize, pageNo, formData } = this;
if(this.agencyIdArray.length ==1){
gridId = this.agencyIdArray.join()
}else if(this.agencyIdArray.length ==2){
gridId = this.agencyIdArray.splice(1).join()
}else if(this.agencyIdArray.length ==3){
gridId = this.agencyIdArray.splice(2).join()
}else if(this.agencyIdArray.length ==4){
gridId = this.agencyIdArray.splice(3).join()
}else{
this.agencyIdArray = []
}
const { data, code, msg } = await requestPost(url, {
pageSize,
pageNo,
gridId,
source:'1',
...formData,
});
if (code === 0) {
this.total = data.total || 0;
this.tableData = data.list
? data.list.map((item) => {
return item;
})
: [];
} else {
this.$message.error(msg);
}
},
async handleWatch (row) {
this.showhtglDialog = true
this.htglDetailId = row.topicId
},
},
components: {
htglInfo
},
computed: {
maxTableHeight () {
return this.$store.state.inIframe
? this.clientHeight - 360 + this.iframeHeigh
: this.clientHeight - 360;
},
...mapGetters(["clientHeight", "iframeHeight"]),
},
watch: {},
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/buttonstyle.scss";
@import "@/assets/scss/modules/management/list-main.scss";
@import "@/assets/scss/modules/shequzhili/event-info.scss";
::v-deep .el-row{
margin:20px 0px 10px;
font-size: 15px;
}
</style>

142
src/views/modules/shequzhili/tuceng/anquan/xuncharecord/icenterprisechangerecord-add-or-update.vue

@ -0,0 +1,142 @@
<template>
<el-dialog :visible.sync="visible" title="操作记录" :close-on-click-modal="false" :close-on-press-escape="false">
<el-table :cell-style="cellStyle" v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%">
<el-table-column show-overflow-tooltip width="200" prop="placeOrgName" label="场所名称" header-align="center" align="center"></el-table-column>
<el-table-column show-overflow-tooltip width="200" prop="address" label="场所地址" header-align="center" align="center"></el-table-column>
<el-table-column show-overflow-tooltip width="200" prop="placeType" label="场所类型" header-align="center" align="center"></el-table-column>
<el-table-column show-overflow-tooltip width="150" prop="scale" label="规模" header-align="center" align="center"></el-table-column>
<el-table-column show-overflow-tooltip width="150" prop="personInCharge" label="负责人" header-align="center" align="center"></el-table-column>
<el-table-column show-overflow-tooltip width="250" prop="mobile" label="联系电话" header-align="center" align="center"></el-table-column>
<el-table-column show-overflow-tooltip width="200" prop="createdTime" label="操作日期" header-align="center" align="center"></el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
</el-pagination>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
</template>
</el-dialog>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import debounce from 'lodash/debounce'
export default {
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/gov/org/enterprise/history/0',
getDataListIsPage: true,
createdIsNeed: false,
},
visible: false,
historyList:[],
dataForm: {
id: '',
customerId: '',
gridId: '',
agencyId: '',
agencyPids: '',
placeType: '',
placeOrgName: '',
address: '',
longitude: '',
latitude: '',
scale: '',
personInCharge: '',
mobile: '',
sourceType: '',
latestResult: '',
latestPatrolTime: '',
delFlag: '',
revision: '',
createdBy: '',
createdTime: '',
updatedBy: '',
updatedTime: ''
}
}
},
computed: {
dataRule () {
return {
}
}
},
methods: {
init () {
this.visible = true
this.$nextTick(() => {
if (this.dataForm.id) {
this.getInfo()
}
})
},
cellStyle({row, column, rowIndex, columnIndex}) {
let mark = 'background:red;font-weight:bold;color:#303133;'
if(row.placeOrgName.includes('->') && columnIndex === 0){
return mark
}
if(row.address.includes('->') && columnIndex === 1){
return mark
}
if(row.placeType.includes('->') && columnIndex === 2){
return mark
}
if(row.scale.includes('->') && columnIndex === 3){
return mark
}
if(row.personInCharge.includes('->') && columnIndex === 4){
return mark
}
if(row.mobile.includes('->') && columnIndex === 5){
return mark
}
},
//
getInfo () {
this.mixinViewModuleOptions.getDataListURL = `/gov/org/icEnterpriseChangeRecord/history/${this.dataForm.id}`
this.getDataList()
// this.$http.get(`/gov/org/icEnterpriseChangeRecord/history/${this.dataForm.id}`).then(({ data: res }) => {
// if (res.code !== 0) {
// this.historyList = []
// this.total = 0
// return this.$message.error(res.msg)
// }
// this.historyList = res.data.list
// this.total = res.data.total
//
// }).catch(() => {})
},
//
dataFormSubmitHandle: debounce(function () {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
this.$http[!this.dataForm.id ? 'post' : 'put']('/gov/org/icEnterpriseChangeRecord/', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
})
}, 1000, { 'leading': true, 'trailing': false })
}
}
</script>

358
src/views/modules/shequzhili/tuceng/anquan/xuncharecord/icenterprisechangerecord.vue

@ -0,0 +1,358 @@
<template>
<div class="mod-__icEnterpriseChangeRecord} resi-container">
<el-card ref="searchCard" class="search-card">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()" label-width="100px">
<el-form-item label="场所名称"
prop="placeOrgName">
<el-input v-model="dataForm.placeOrgName"
size="small"
style="width: 240px"
clearable
placeholder="请输入场所名称">
</el-input>
</el-form-item>
<el-form-item label="联系电话"
prop="createdUser">
<el-input v-model="dataForm.mobile"
size="small"
style="width: 240px"
clearable
placeholder="请输入联系电话">
</el-input>
</el-form-item>
<el-form-item label="场所区域"
prop="gridId">
<el-select
v-model.trim="dataForm.gridId"
placeholder="请选择"
style="width: 240px"
clearable
>
<el-option
v-for="item in optionsG"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="场所类型"
prop="placeType">
<el-select v-model="dataForm.placeType"
placeholder="请选择"
size="small"
style="width: 240px"
clearable>
<el-option v-for="item in placeTypeArr"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="规模"
prop="placeType">
<el-select v-model="dataForm.scale"
placeholder="请选择"
size="small"
style="width: 240px"
clearable>
<el-option v-for="item in scaleArr"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" class="diy-button--search" @click="getDataList()">{{ $t('query') }}</el-button>
<el-button style="margin-left:10px"
size="small"
type="primary"
class="diy-button--reset"
@click="resetSearch">重置</el-button>
</el-form-item>
<!-- <el-button style="margin-left:10px"
size="small"
type="primary"
class="diy-button--reset"
@click="resetSearch">重置</el-button> -->
<!-- <el-form-item>-->
<!-- <el-button type="primary" size="small" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>-->
<!-- </el-form-item>-->
<!-- <el-form-item>
<el-button size="small" style="margin-left:10px" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
</el-form-item> -->
</el-form>
</el-card>
<el-card class="resi-card-table">
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%">
<el-table-column label="序号" type="index" align="center" width="50" />
<el-table-column prop="placeOrgName" label="场所名称" header-align="center" align="center"></el-table-column>
<el-table-column prop="address" label="场所地址" header-align="center" align="center"></el-table-column>
<el-table-column prop="placeType" label="场所类型" :formatter="placeTypeFormatter" header-align="center" align="center"></el-table-column>
<el-table-column prop="scale" label="规模" :formatter="scaleFormatter" header-align="center" align="center"></el-table-column>
<el-table-column prop="personInCharge" label="负责人" header-align="center" align="center"></el-table-column>
<el-table-column prop="mobile" label="联系电话" header-align="center" align="center"></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.enterpriseId)">{{ '操作记录' }}</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
</el-pagination>
</el-card>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
</div>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './icenterprisechangerecord-add-or-update'
import { requestPost } from "@/js/dai/request";
export default {
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/gov/org/enterprise/page',
getDataListIsPage: true,
deleteURL: '/gov/org/icEnterpriseChangeRecord',
deleteIsBatch: true
},
scaleArr: [],
resultArr: [{
value: '0',
label: '合格'
},{
value: '1',
label: '不合格'
}],
placeTypeArr: [],
agencyIdArray: [],
optionsG: [],
orgOptions: [],
orgOptionProps:{
multiple: false,
value: 'value',
label: 'label',
children: 'children',
checkStrictly: true
},
dataForm: {
id: ''
}
}
},
components: {
AddOrUpdate
},
created () {
this.getGridList()
this.getPlaceTypeList()
this.getScaleList()
},
methods: {
placeTypeFormatter (row) {
let re = ''
this.placeTypeArr.forEach((item) => {
if (item.value === row.placeType) {
re = item.label
}
})
return re
},
scaleFormatter (row) {
let re = ''
this.scaleArr.forEach((item) => {
if (item.value === row.scale) {
re = item.label
}
})
return re
},
resultFormatter (row) {
let re = ''
this.resultArr.forEach((item) => {
if (item.value === row.latestResult) {
re = item.label
}
})
return re
},
getPlaceTypeList() {
const { user } = this.$store.state
this.$http
.post('/gov/org/coverage/dict-select-list/enterprise_patrol', {})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取查询详情成功', res.data)
this.placeTypeArr = res.data
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
getGridList() {
const { user } = this.$store.state
this.$http
.post('/gov/org/customergrid/gridoption', { agencyId: user.agencyId, purpose: 'query' })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取查询详情成功', res.data)
this.optionsG = res.data
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
exportHandle () {
const url = this.mixinViewModuleOptions.exportURL
this.$http({
method: 'GET',
url,
responseType: 'blob',
params: this.dataForm
}).then(res => {
// this.download(res.data, title + '.xls')
if (res.headers["content-disposition"]) {
let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1])
console.log('filename', fileName)
let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
var url = window.URL.createObjectURL(blob)
var aLink = document.createElement('a')
aLink.style.display = 'none'
aLink.href = url
aLink.setAttribute('download', fileName)
document.body.appendChild(aLink)
aLink.click()
document.body.removeChild(aLink) //
window.URL.revokeObjectURL(url) //blob
} else this.$message.error('下载失败')
}).catch(err => {
console.log('err', err)
return this.$message.error('网络错误')
})
},
//
resetSearch () {
this.agencyIdArray = []
this.dataForm = {
agencyId: '',
gridId: '',
logType: '',
createdUser: '',
startTime: '',
endTime: '',
mobile: ''
}
this.getDataList()
},
//
async getScaleList () {
console.log(localStorage.getItem('token'))
const url = "/sys/dict/data/dictlist"
let params = {
dictType: 'scale'
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.scaleArr = data
} else {
this.$message.error(msg)
}
}
}
}
</script>
<style lang="scss" scoped>
@import "@/assets/scss/buttonstyle.scss";
.resi-container .resi-card-table {
::v-deep .el-table th {
color: #fff;
background-color: rgba(33, 149, 254, 1);
// border-right: 1px solid rgba(33, 149, 254, 1);
}
}
.resi-table {
::v-deep .el-button--text {
text-decoration: underline;
}
::v-deep .btn-color-del {
margin-left: 10px;
color: rgba(213, 16, 16, 1);
}
::v-deep .btn-color-edit {
color: rgba(0, 167, 169, 1);
}
}
.resi-row-btn {
margin-bottom: 13px;
.upload-btn {
display: inline-block;
margin: 0 10px;
}
}
.form-wr {
.input-width {
width: 260px;
}
.input-width-textarea {
width: 500px;
}
.imsg-list {
display: flex;
align-items: center;
.imgs-item {
position: relative;
margin-right: 10px;
.el-icon-delete {
position: absolute;
top: 0;
right: 0;
font-size: 18px;
color: red;
z-index: 3;
cursor: pointer;
}
}
}
}
.div-content {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>
<style>
.el-table .warning-row {
background: #ffe168;
}
</style>

328
src/views/modules/visual/communityGovern/shijianchuli/shijianchulifenxi copy 2.vue

@ -1,328 +0,0 @@
<template>
<div class="chart-container">
<div class="chart"
id="cityGreenLand"
ref="chart"></div>
<!-- 底座背景 -->
<div class="bg"></div>
</div>
</template>
<script>
import * as echarts from 'echarts';
// import echarts from 'echarts'
import 'echarts-gl';
import { getPie3D, getParametricEquation } from './chart.js' //js
const color = ['#005aff', '#f8b551']
export default {
name: 'chart',
data () {
return {
optionData: [
{
name: '处理中',
value: 28
},
{
name: '已完成',
value: 72
}
],
statusChart: null,
option: {}
}
},
created () {
this.setLabel()
},
mounted () {
this.initChart()
//
const that = this
window.onresize = function () {
that.changeSize()
}
},
methods: {
// label
setLabel () {
this.optionData.forEach((item, index) => {
item.itemStyle = {
color: color[index]
}
item.label = {
normal: {
show: true,
color: color[index],
formatter: [
'{d|{d}%}',
'{b|{b}}'
].join('\n'), // \n
rich: {
b: {
color: '#fff',
lineHeight: 25,
align: 'left',
fontSize: 16,
marginTop: 20
},
c: {
fontSize: 22,
color: '#fff',
textShadowColor: '#1c90a6',
textShadowOffsetX: 0,
textShadowOffsetY: 2,
textShadowBlur: 5
},
d: {
color: color[index],
fontSize: 25,
align: 'left'
}
}
}
}
item.labelLine = {
normal: {
length: 30,
length2: 80,
lineStyle: {
width: 1,
color: 'rgba(255,255,255,0.7)'
}
}
}
item.labelLayout = function (params) {
const isLeft = params.labelRect.x < myChart.getWidth() / 2;
const points = params.labelLinePoints;
// Update the end point.
points[2][0] = isLeft
? params.labelRect.x
: params.labelRect.x + params.labelRect.width;
return {
labelLinePoints: points
};
}
})
},
//
initChart () {
// let statusChart = echarts.init(document.getElementById('cityGreenLand-charts'));
this.statusChart = echarts.init(document.getElementById('cityGreenLand'));
// option, 3d,
this.option = getPie3D(this.optionData, 0.8, 220, 28, 22, 0.4)
this.statusChart.setOption(this.option)
// label线2d使labelLine3dsetOption
this.option.series.push({
name: '电梯状态', //
backgroundColor: 'transparent',
type: 'pie',
label: {
opacity: 1,
fontSize: 13,
lineHeight: 20
},
startAngle: 40, // [0, 360]
clockwise: false, // 3d
radius: ['40%', '50%'],
center: ['50%', '50%'],
data: this.optionData,
itemStyle: {
opacity: 0 //02d
}
})
this.statusChart.setOption(this.option)
this.bindListen(this.statusChart)
},
//
// optionNameoptionopiton
bindListen (myChart, optionName = 'option') {
let selectedIndex = ''
let hoveredIndex = ''
//
myChart.on('click', (params) => {
// option.series
const isSelected = !this[optionName].series[params.seriesIndex].pieStatus
.selected
const isHovered =
this[optionName].series[params.seriesIndex].pieStatus.hovered
const k = this[optionName].series[params.seriesIndex].pieStatus.k
const startRatio =
this[optionName].series[params.seriesIndex].pieData.startRatio
const endRatio =
this[optionName].series[params.seriesIndex].pieData.endRatio
// option
if (selectedIndex !== '' && selectedIndex !== params.seriesIndex) {
this[optionName].series[
selectedIndex
].parametricEquation = getParametricEquation(
this[optionName].series[selectedIndex].pieData.startRatio,
this[optionName].series[selectedIndex].pieData.endRatio,
false,
false,
k,
this[optionName].series[selectedIndex].pieData.value
)
this[optionName].series[selectedIndex].pieStatus.selected = false
}
// / option
this[optionName].series[
params.seriesIndex
].parametricEquation = getParametricEquation(
startRatio,
endRatio,
isSelected,
isHovered,
k,
this[optionName].series[params.seriesIndex].pieData.value
)
this[optionName].series[params.seriesIndex].pieStatus.selected = isSelected
// seriesIndex
selectedIndex = isSelected ? params.seriesIndex : null
// 使 option
myChart.setOption(this[optionName])
})
// mouseover
// myChart.on('mouseover', (params) => {
// //
// let isSelected
// let isHovered
// let startRatio
// let endRatio
// let k
// // mouseover
// if (hoveredIndex === params.seriesIndex) {
// //
// } else {
// // option
// if (hoveredIndex !== '') {
// // option.series false
// isSelected = this[optionName].series[hoveredIndex].pieStatus.selected
// isHovered = false
// startRatio = this[optionName].series[hoveredIndex].pieData.startRatio
// endRatio = this[optionName].series[hoveredIndex].pieData.endRatio
// k = this[optionName].series[hoveredIndex].pieStatus.k
// // option
// this[optionName].series[
// hoveredIndex
// ].parametricEquation = getParametricEquation(
// startRatio,
// endRatio,
// isSelected,
// isHovered,
// k,
// this[optionName].series[hoveredIndex].pieData.value
// )
// this[optionName].series[hoveredIndex].pieStatus.hovered = isHovered
// // seriesIndex
// hoveredIndex = ''
// }
// // mouseover option
// if (
// params.seriesName !== 'mouseoutSeries' &&
// params.seriesName !== 'pie2d'
// ) {
// // option.series true
// isSelected =
// this[optionName].series[params.seriesIndex].pieStatus.selected
// isHovered = true
// startRatio =
// this[optionName].series[params.seriesIndex].pieData.startRatio
// endRatio = this[optionName].series[params.seriesIndex].pieData.endRatio
// k = this[optionName].series[params.seriesIndex].pieStatus.k
// // option
// this[optionName].series[
// params.seriesIndex
// ].parametricEquation = getParametricEquation(
// startRatio,
// endRatio,
// isSelected,
// isHovered,
// k,
// this[optionName].series[params.seriesIndex].pieData.value + 60
// )
// this[optionName].series[
// params.seriesIndex
// ].pieStatus.hovered = isHovered
// // seriesIndex
// hoveredIndex = params.seriesIndex
// }
// // 使 option
// myChart.setOption(this[optionName])
// }
// })
// // bug
// myChart.on('globalout', () => {
// //
// let isSelected
// let isHovered
// let startRatio
// let endRatio
// let k
// if (hoveredIndex !== '') {
// // option.series true
// isSelected = this[optionName].series[hoveredIndex].pieStatus.selected
// isHovered = false
// k = this[optionName].series[hoveredIndex].pieStatus.k
// startRatio = this[optionName].series[hoveredIndex].pieData.startRatio
// endRatio = this[optionName].series[hoveredIndex].pieData.endRatio
// // option
// this[optionName].series[
// hoveredIndex
// ].parametricEquation = getParametricEquation(
// startRatio,
// endRatio,
// isSelected,
// isHovered,
// k,
// this[optionName].series[hoveredIndex].pieData.value
// )
// this[optionName].series[hoveredIndex].pieStatus.hovered = isHovered
// // seriesIndex
// hoveredIndex = ''
// }
// // 使 option
// myChart.setOption(this[optionName])
// })
},
//
changeSize () {
this.statusChart.resize()
}
}
}
</script>
<style lang='scss' scoped>
.chart-container {
position: relative;
width: 100%;
height: 800px;
.chart,
.bg {
width: 100%;
height: 800px;
z-index: 2;
}
.bg {
position: absolute;
bottom: 180px;
left: 50%;
z-index: 1;
width: 570px;
height: 340px;
background: no-repeat center;
background-image: url("../../../../../assets/img/shuju/3d-pid-bg.png");
background-size: 100% 100%;
transform: translateX(-50%);
}
}
</style>

740
src/views/modules/visual/communityGovern/shijianchuli/shijianchulifenxi copy.vue

@ -1,740 +0,0 @@
<template>
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<span>事件处理分析</span>
<div class="search">
<div class="second-select cascader">
<el-cascader class="customer_cascader"
ref="myCascader"
v-model="agencyIdArray"
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
:show-all-levels="false"
@change="handleChangeAgency"></el-cascader>
</div>
<div class="second-select">
<el-select v-model="dataType"
:popper-append-to-body="false"
placeholder="请选择">
<el-option v-for="(item) in dateArray"
:key="item.value"
:label="item.label"
:value="item.value"
@click.native="handleChangeDate(item.value)">
</el-option>
</el-select>
</div>
<div v-if="dataType==='0'"
class="second-select range-data">
<el-date-picker v-model="timeRange"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
prefix-icon="el-icon-caret-bottom"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
@change="handleSelectChange">
</el-date-picker>
</div>
</div>
</div>
<div class="g-cpt-resi">
<div class="g-l">
<div class="l_top">
<div v-if="!pieNoData && !dataLoading"
class="g-pie">
<screen-echarts-frame class="echart-wr"
@myChartMethod="pieInitOk"
ref="pieChart"></screen-echarts-frame>
<div class="pie-legend">
<div :class="['legend_item',{'item_last':index===legendArray.length-1}]"
v-for="(item,index) in legendArray"
:key="index">
<div class="item_name">{{item.name}}</div>
<img :src="item.url" />
<!-- <div class="item_num">
<span class="item_count">{{item.count}}</span>
<span class="item_percent">{{item.percent}}</span>
</div> -->
</div>
</div>
</div>
<screen-nodata class="nodata"
v-if="pieNoData&& !dataLoading"></screen-nodata>
<div class="table-status"
v-if="dataLoading">
<screen-loading>加载中</screen-loading>
</div>
</div>
<div class="l_bottom">
<div class="bottom_label">月度新增事件统计</div>
<screen-echarts-frame v-if="!lineNoData&& !dataLoading"
class="echart-line"
@myChartMethod="lineInitOk"
ref="lineChart"></screen-echarts-frame>
<screen-nodata class="nodata"
v-if="lineNoData&& !dataLoading"></screen-nodata>
<div class="table-status"
v-if="dataLoading">
<screen-loading>加载中</screen-loading>
</div>
</div>
</div>
<div class="g-r">
<div class="m-tb">
<div class="tb">
<cpt-tb :col-list="demand.colList"
:loading="demand.loading"
:header="demand.header"
:list="demand.list"
@operate="toEventInfo"></cpt-tb>
</div>
<div class="m-pagination">
<el-pagination hide-on-single-page :current-page="demand.pageNo"
:page-size="demand.pageSize"
:total="demand.total"
background
layout="prev, pager, next,total"
@current-change="handlePageNoChange_demand">
</el-pagination>
</div>
</div>
</div>
</div>
<event-info v-if="showProject"
:eventId="eventId"
:orgId="orgId"
:orgType="orgType"
@close="showProject = false" />
</cpt-card>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import cptCard from "@/views/modules/visual/cpts/card";
import cptTb from "@/views/modules/visual/cpts/tb";
import screenEchartsFrame from "@/views/modules/visual/components/screen-echarts-frame";
import ScreenLoading from "@/views/modules/visual/components/screen-loading";
import ScreenNodata from "@/views/modules/visual/components/screen-nodata";
import eventInfo from "./event-info";
import { pieOption } from './pieOption.js'
import { lineOption } from './lineOption.js'
import nextTick from 'dai-js/tools/nextTick'
import dateFormat from "dai-js/tools/dateFormat";
export default {
name: "shijianchulifenxi",
data () {
return {
dataLoading: true,
pieNoData: false,
lineNoData: false,
isfirstInit: true,//
projectTotal: 0,
processingCount: 0,
processingRatio: 0,
lineChart: '',
lineOption: {},
lineInitState: false,
lineColorArray: [],
lineData: [],
lineXaxis: [],
lineSeriesData: [],
pieChartS: null,
pieChart: '',
pieOption: {},
pieInitState: false,
pieData: [],
legendArray: [
{
name: '未结案',
count: 0,
percent: '0%',
url: require('@/assets/img/shuju/measure/huang@2x.png')
},
{
name: '已结案',
count: 0,
percent: '0%',
url: require('@/assets/img/shuju/measure/lv@2x.png')
}
],
timeRange: [],
orgId: '',
orgType: 'agency',
queryStartTime: '',
queryEndTime: '',
processStatus: 'closed_case',
dataType: '1',
casOptions: [],
agencyIdArray: [],
customerList: [],
iscascaderShow: 0,
optionProps: {
multiple: false,
value: 'agencyId',
label: 'agencyName',
children: 'subAgencyList',
checkStrictly: true
},
dateArray: [
{
label: '近一年',
value: '1'
},
{
label: '近一个月',
value: '2'
},
{
label: '近三个月',
value: '3'
},
{
label: '近半年',
value: '4'
},
{
label: '自定义',
value: '0'
},
],
tableList: [],
demand: {
loading: true,
colList: [
{
align: "center",
width: "5%",
},
{
align: "center",
width: "15%",
},
{
align: "center",
width: "25%",
},
{
align: "center",
width: "10%",
},
{
align: "center",
width: "10%",
},
{
align: "center",
width: "10%",
},
{
align: "center",
width: "5%",
},
{
align: "center",
width: "10%",
},
],
header: ["序号", "所属组织", "事件内容", "上报渠道", "报事人", "手机号", "状态", "操作"],
list: [],
pageSize: 10,
pageNo: 1,
total: 0,
},
showProject: false,
eventId: '',
};
},
// mixins: [animate]
beforeDestroy () {
},
async created () {
},
async mounted () {
this.dataLoading = true
//
this.initData()
await this.getAgencylist()//
this.handleChangeDate(this.dataType)
//
await this.getProjectTotal()
await this.getLineChart()
this.dataLoading = false
// this.assignData()
},
methods: {
async getApiData () {
await this.getProjectTotal()
await this.getLineChart()
this.assignData()
},
async handleChangeDate (index) {
let end = new Date();
let start = new Date();
if (index === '1') {//
start.setFullYear(start.getFullYear() - 1);
console.log(start.getDate())
} else if (index === '2') {//
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
} else if (index === '3') {//
start.setTime(start.getTime() - 3600 * 1000 * 24 * 91);
} else if (index === '4') {//
start.setTime(start.getTime() - 3600 * 1000 * 24 * 183);
}
if (index != '0') {
this.queryStartTime = dateFormat(start, 'yyyy-MM-dd') + " 00:00:00"
this.queryEndTime = dateFormat(end, 'yyyy-MM-dd') + " 23:59:59"
}
if (index !== '0') {
await this.getApiData()
// this.assignPieChart()
}
},
assignData () {
this.getPie()
this.getLine()
},
handleSelectChange (value) {
this.queryStartTime = value[0] + " 00:00:00"
this.queryEndTime = value[1] + " 23:59:59"
this.getApiData();
},
//
async getAgencylist () {
const url = "/gov/org/customeragency/agencygridtree";
//const url = '/gov/org/customeragency/agencylist'
let params = {};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.orgId = data.agencyId
//
++this.iscascaderShow
this.casOptions = []
this.agencyIdArray.length = []
if (data) {
this.casOptions.push(data)
this.agencyIdArray.push(this.orgId)
}
} else {
this.$message.error(msg);
}
},
//
async getProjectTotal () {
if (this.$refs.pieChart) {
this.$refs.pieChart.showLoading()
this.$refs.pieChart.clear()
}
const url = "/gov/project/icEvent/processAnalysis/processStatusRatio";
//const url = "http://yapi.elinkservice.cn/mock/245/api/gov/project/icEvent/processAnalysis/processStatusRatio";
let params = {
orgId: this.orgId,
orgType: this.orgType,
queryStartTime: this.queryStartTime,
queryEndTime: this.queryEndTime,
};
const { data, code, msg } = await requestPost(url, params);
if (this.$refs.pieChart) {
this.$refs.pieChart.hideLoading()
}
if (code === 0) {
this.projectTotal = parseInt(data.processingCount) + parseInt(data.closedCount);
this.legendArray = [
{
name: '已完成',
count: data.closedCount,
percent: data.closedRatio,
url: require('@/assets/img/shuju/measure/huang@2x.png')
},
{
name: '处理中',
count: data.processingCount,
percent: data.processingRatio,
url: require('@/assets/img/shuju/measure/lv@2x.png')
}
]
this.pieData = [
{
name: "已完成",
value: Math.floor(data.closedRatio * 10000) / 100
},
{
name: "处理中",
value: Math.floor(data.processingRatio * 10000) / 100
},
]
} else {
this.$message.error(msg);
}
},
//
async getTable () {
const url = "/gov/project/icEvent/processAnalysis/eventList";
//const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/processAnalysis/eventList";
let params = {
processStatus: this.processStatus,
orgId: this.orgId,
orgType: this.orgType,
queryStartTime: this.queryStartTime,
queryEndTime: this.queryEndTime,
pageNo: this.demand.pageNo,
pageSize: this.demand.pageSize,
biz: 'eventProcessAnalysis'
};
const { data, code, msg } = await requestPost(url, params);
this.demand.loading = false;
if (code === 0) {
this.demand.total = data.total;
this.tableList = data.list
this.demand.list = data.list.map((item, index) => {
return [
index + 1,
item.gridName ? item.gridName : '',
item.eventContent ? item.eventContent : '',
item.sourceTypeName ? item.sourceTypeName : '',
item.reportUserName ? item.reportUserName : '',
item.mobile ? item.mobile : 'processing',
item.processStatus ? item.processStatus === 'closed_case' ? '已完成' : '处理中' : '',
{ type: "operate", list: ["查看"] },
];
});
} else {
this.$message.error(msg);
}
},
handlePageNoChange_demand (val) {
this.demand.pageNo = val;
this.getTable();
},
toEventInfo (index) {
const { tableList } = this;
this.eventId = tableList[index].eventId
this.showProject = true
},
pieInitOk (dom) {
this.pieChartS = dom
this.pieInitState = true
},
lineInitOk () {
this.lineInitState = true
},
getLine () {
if (this.lineInitState) {
this.assignLineChart()
} else {
setTimeout(() => {
this.getLine()
}, 500)
}
},
// 线
async getLineChart () {
if (this.$refs.lineChart) {
this.$refs.lineChart.clear()
this.$refs.lineChart.showLoading()
}
const _that = this
// this.$refs.pieChart.showLoading()
const url = "/gov/project/icEvent/processAnalysis/monthlyIncrement";
//const url = "http://yapi.elinkservice.cn/mock/245/api/gov/project/icEvent/processAnalysis/monthlyIncrement";
let params = {
orgId: this.orgId,
orgType: this.orgType,
queryStartTime: this.queryStartTime,
queryEndTime: this.queryEndTime,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
// pieChart
this.lineXaxis = []
this.lineSeriesData = []
if (data && data.length > 0) {
this.lineNoData = false
data.forEach(item => {
this.lineXaxis.push(item.monthName)
this.lineSeriesData.push(item.increment)
});
this.lineData = data
} else {
this.lineNoData = true
}
if (this.$refs.lineChart) {
this.$refs.lineChart.hideLoading()
}
} else {
this.$message.error(msg);
}
},
assignLineChart () {
this.lineOption = lineOption()
this.$refs.lineChart.setOption(this.lineOption, true)
this.$refs.lineChart.setOption({
xAxis: { data: this.lineXaxis },
series: [
{ data: this.lineSeriesData },
]
}, true)
},
getPie () {
if (this.pieInitState) {
this.assignPieChart()
} else {
setTimeout(() => {
this.getPie()
}, 500)
}
},
//
async assignPieChart () {
let maxIndex = 0
const _that = this
// pieChart
this.pieOption = pieOption(this.pieChartS)
this.pieData[0].selected = false
this.pieData[1].selected = false
this.pieOption.title.text = this.projectTotal
this.clickPie()
let fun = function (params) {
_that.clickPie(params)
}
this.$refs.pieChart.handleClick(fun)
},
clickPie (params) {
let dataIndex = params ? params.dataIndex : null
let componentIndex = params ? params.componentIndex : null
if (componentIndex === 1) {//
if (dataIndex === 0) {
this.processStatus = 'closed_case'
} else if (dataIndex === 1) {
this.processStatus = 'processing'
}
} else if (componentIndex === 2) {//
this.processStatus = ''
dataIndex = 3
}
if (dataIndex === 3) {
this.$refs.pieChart.clear()
}
this.pieData.forEach((element, index) => {
if (index === dataIndex) {
element.selected = true
element.label = {
show: true,
};
element.labelLine = {
show: true,
lineStyle: {
opacity: 1,
}
};
// element.selected = !element.selected
} else {
element.selected = false
element.label = {
show: false,
};
element.labelLine = {
show: false,
lineStyle: {
opacity: 0,
color: 'rgba(255,255,255,0)'
}
};
element.selected = false
}
});
this.pieOption.series[1].data = this.pieData
this.demand.pageNo = 1
this.getTable()
// this.$refs.pieChart.hideLoading()
this.$refs.pieChart.setOption(this.pieOption)
},
handleChangeAgency () {
let obj = this.$refs["myCascader"].getCheckedNodes()[0].data
if (obj) {
this.orgType = obj.level === 'grid' ? 'grid' : 'agency'
this.orgId = obj.agencyId
} else {
this.orgId = ''
this.orgType = ''
}
this.getApiData()
},
//
initData () {
var time = (new Date).getTime() - 24 * 60 * 60 * 1000;
var nowdate = new Date(time); //
var y = nowdate.getFullYear();
var m = nowdate.getMonth() + 1 < 10 ? "0" + (nowdate.getMonth() + 1) : nowdate.getMonth() + 1;
var d = nowdate.getDate() < 10 ? "0" + nowdate.getDate() : nowdate.getDate();
this.dateIdShow = y + '-' + m + '-' + d;
},
},
props: {
uid: {
type: String,
default: "",
// default: "8ada68cb6f1e4b9a8333348a39ef3aee",
},
},
computed: {},
components: {
cptCard,
cptTb,
screenEchartsFrame,
eventInfo,
ScreenLoading,
ScreenNodata
},
watch: {
dateIdShow () {
// let dataArray = this.dateIdShow.split('-')
// this.dateId = dataArray.join('')
},
uid (id) {
this.userId = id;
},
userId () {
// this.getApiData();
window.scrollTo(0, 0);
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/modules/visual/shijianchulifenxi.scss"
scoped
></style>
<style
lang="scss"
src="@/assets/scss/modules/visual/search_1.scss"
scoped
></style>

436
src/views/modules/workSys/feedbackDetail.vue

@ -0,0 +1,436 @@
<template>
<div>
<div class="dialog-h-content scroll-h">
<el-tag type="info"
class="eltag"
size="medium"
style="width: 100%; margin-top: 10px">建议详情</el-tag>
<div class="m-row">
<div class="m-row-2">
<div class="info-prop">
<span class="info-title-2">客户名</span>
<span>{{ adviceData.customerName }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">组织名</span>
<span>{{ adviceData.agencyName}}</span>
</div>
</div>
<div class="m-row-2">
<div class="info-prop">
<span class="info-title-2">网格名</span>
<span>{{ adviceData.gridName}}</span>
</div>
<div class="info-prop">
<span class="info-title-2">注册手机</span>
<span>{{ adviceData.regPhone}}</span>
</div>
</div>
<div class="m-row-2">
<div class="info-prop">
<span class="info-title-2">问题分类</span>
<span>{{ adviceData.adviceType}}</span>
</div>
<div class="info-prop">
<span class="info-title-2">提出时间</span>
<span>{{ adviceData.adviceTime}}</span>
</div>
</div>
<div class="m-row-2">
<div class="info-prop">
<span class="info-title-2">提出者</span>
<span>{{ adviceData.userName}}</span>
</div>
<div class="info-prop">
<span class="info-title-2">联系方式</span>
<span>{{ adviceData.phone}}</span>
</div>
</div>
<div class="m-info">
<div class="info-prop">
<span class="info-title-2">建议内容</span>
<span>{{ adviceData.adviceContent}}</span>
</div>
<div v-if="adviceData.imgList.length>0"
class="info-prop">
<span class="info-title-2">建议图片</span>
<div style="display:flex"
v-for="(item,index) in adviceData.imgList"
:key="index">
<img class="img_icon"
:src="item">
</div>
</div>
</div>
</div>
<el-tag type="info"
class="eltag"
size="medium"
style="width: 100%; margin-top: 10px">回复详情</el-tag>
<div v-if="!showConfirm"
class="m-row">
<div class="m-row-2">
<div class="info-prop">
<span class="info-title-3">回复者</span>
<span>{{ adviceData.replyUserName }}</span>
</div>
<div class="info-prop">
<span class="info-title-3">回复时间</span>
<span>{{ adviceData.replyTime}}</span>
</div>
</div>
<div class="m-info">
<div class="info-prop">
<span class="info-title-3">回复内容</span>
<span>{{ adviceData.replyContent}}</span>
</div>
<div class="info-prop">
<span class="info-title-3">政府回复文本</span>
<span>{{ adviceData.govContent}}</span>
</div>
<div v-if="adviceData.govImgList.length>0"
class="info-prop">
<span class="info-title-3">政府回复取证</span>
<div style="display:flex"
v-for="(item,index) in adviceData.govImgList"
:key="index">
<img class="img_icon"
:src="item">
</div>
</div>
</div>
</div>
<div v-if="showConfirm"
class="m-row">
<div class="m-info">
<div class="info-prop">
<span class="info-title-3">回复内容</span>
<div>
<el-input type="textarea"
:rows="4"
resize="none"
maxlength="500"
show-word-limit
style="width: 600px"
placeholder="请输入回复内容"
v-model="adviceData.replyContent"></el-input>
<div class="input_tip">建议只可回复一次请谨慎回复</div>
</div>
</div>
<div class="info-prop">
<span class="info-title-3">政府回复文本</span>
<el-input type="textarea"
:rows="4"
resize="none"
maxlength="500"
style="width: 600px"
show-word-limit
placeholder="请输入政府回复文本"
v-model="adviceData.govContent"></el-input>
</div>
<div class="info-prop">
<span class="info-title-3">政府回复取证</span>
<div>
<el-upload :headers="$getElUploadHeaders()"
ref="uploadPic"
:action="uploadUlr"
:data="{ customerId: adviceData.customerId }"
list-type="picture-card"
:on-exceed="exceedPic"
:on-remove="removePic"
:file-list="replayImgList"
:on-success="handleSuccess"
:limit="3">
<span class="font-14">选择图片</span>
<div slot="tip"
class="upload_tip">
最多上传3张图片图片支持jpgjpegbmpgit或png格式
</div>
</el-upload>
</div>
</div>
</div>
</div>
</div>
<div class="div-btn">
<el-button size="small"
@click="handleCancle"> </el-button>
<el-button v-if="showConfirm"
size="small"
type="primary"
:disabled="btnDisable"
@click="handleComfirm"> </el-button>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
import daiMap from "@/utils/dai-map";
let loading //
export default {
data () {
return {
initLoading: false,
btnDisable: false,
adviceId: '',
srcList: [],
adviceData: {
customerId: '', //id
customerName: '', //
agencyName: '', //
gridName: '', //
userName: '', //
regPhone: '', //
adviceType: '', //
phone: '', //
adviceTime: '', //
adviceContent: '', //
imgList: [], //
replyContent: '', //
replyTime: '', //
replyUserName: '', //
govContent: '', //
govImgList: [] //
},
showConfirm: true,
replayImgList: [],
uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadqrcodeV2',
// upload_url: '', // URL
upload_name: '' //
}
},
mounted () {
},
methods: {
diaDestroy () {
},
async initForm (adviceId) {
this.adviceId = adviceId
await this.loadFormData()
this.initLoading = true
},
//form
async loadFormData () {
this.startLoading()
//const url = "https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/epmetuser/useradvice/advicedetail"
const url = '/epmetuser/useradvice/advicedetail'
const params = {
adviceId: this.adviceId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
// this.endLoading()
if (data) {
this.adviceData = data
if (
this.adviceData.replyContent === '' ||
this.adviceData.replyContent === null
) {
this.showConfirm = true
} else {
this.showConfirm = false
}
}
} else {
this.$message.error(msg)
}
this.endLoading()
},
async handleComfirm () {
if (
this.adviceData.replyContent === '' ||
this.adviceData.replyContent === null
) {
this.$message.warning('请填写回复内容')
return
}
this.startLoading()
// let url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/epmetuser/useradvice/replyadvice'
let url = '/epmetuser/useradvice/replyadvice'
//
let params = {
adviceId: this.adviceData.adviceId,
replyContent: this.adviceData.replyContent,
govContent: this.adviceData.govContent,
govImgList: this.adviceData.govImgList
}
const { data, code, msg } = await requestPost(url, params)
this.endLoading()
if (code === 0) {
this.$message.success('回复成功')
this.$emit('replayOk')
} else {
this.$message.error(msg)
}
// window.app.ajax.post(
// url,
// _data,
// (data, rspMsg) => {
// this.endLoading()
// this.$message.success('')
// this.diaCancel()
// this.$emit('refresh')
// },
// (rspMsg, data) => {
// this.endLoading()
// this.$message.error(rspMsg)
// }
// )
},
removePic (file, fileList) {
this.adviceData.govImgList.splice(
this.adviceData.govImgList.findIndex((item) => item === file.url),
1
)
this.replayImgList.splice(
this.replayImgList.findIndex((item) => item.uid === file.uid),
1
)
},
exceedPic () {
this.$message.warning('最多上传3张预览图片')
},
handleSuccess (response, file, fileList) {
this.replayImgList.push(file)
this.adviceData.govImgList.push(response.data.url)
},
handleCancle () {
this.$emit('diaDetailClose')
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
},
props: {
}
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/modules/management/detail-main.scss";
</style>
<style lang="scss" scoped >
.m-info {
padding-left: 0px;
}
.upload_tip {
color: #7a7a7a;
margin: 10px 0 0 0;
}
.div-tooltip {
margin-left: 10px;
color: red;
}
.input_tip {
color: #e60000;
margin: 10px 0 0 0;
}
.img_icon {
margin-right: 10px;
width: 70px;
height: 70px;
}
</style>
<style lang="scss">
.el-dialog__body {
padding: 0 10px 20px !important;
}
.hide {
.el-upload--picture-card {
display: none !important;
}
}
</style>

450
src/views/modules/workSys/feedbackList.vue

@ -0,0 +1,450 @@
<template>
<div class="div_main">
<div class="div_search">
<el-form :inline="true"
:model="formData"
ref="ref_searchform"
:label-width="'80px'">
<div>
<el-form-item label="所属组织"
prop="gridId">
<el-cascader class="customer_cascader"
size="small"
ref="myCascader"
v-model="agencyIdArray"
:options="orgOptions"
:props="orgOptionProps"
:show-all-levels="false"
@change="handleChangeAgency"></el-cascader>
</el-form-item>
<el-form-item label="问题分类"
prop="adviceType">
<el-select v-model="formData.adviceType"
placeholder="请选择"
size="small"
clearable
class="item_width_2">
<el-option v-for="item in adviceTypeArray"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="回复状态"
prop="isReply">
<el-select class="item_width_2"
v-model="formData.isReply"
placeholder="全部"
size="small"
clearable>
<el-option v-for="item in statusArray"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="发生时间"
prop="startTime">
<el-date-picker v-model="formData.startTime"
:picker-options="startPickerOptions"
class="item_width_2"
size="small"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="开始时间">
</el-date-picker>
<span class="data-tag"></span>
<el-date-picker v-model="formData.endTime"
:picker-options="endPickerOptions"
class="item_width_2 data-tag"
size="small"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="结束时间">
</el-date-picker>
</el-form-item>
<el-button style="margin-left:30px"
size="small"
class="diy-button--search"
@click="handleSearch">查询</el-button>
<el-button style="margin-left:10px"
size="small"
class="diy-button--reset"
@click="resetSearch">重置</el-button>
</div>
</el-form>
</div>
<div class="div_table">
<el-table :data="tableData"
border
v-loading="tableLoading"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
class="table"
style="width: 100%"
:height="maxTableHeight">
<el-table-column label="序号"
fixed="left"
type="index"
align="center"
width="50" />
<el-table-column prop="gridName"
min-width="100"
align="center"
label="所属网格"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="adviceType"
label="建议分类"
min-width="140"
align="center"
:show-overflow-tooltip="true">
<template slot-scope="scope">
<p style="text-align:center"
v-for="(item,index) in scope.row.adviceTypeArray"
:key="index">{{item}}</p>
</template>
</el-table-column>
<el-table-column prop="phone"
label="联系电话"
width="120"
align="center"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="adviceTime"
align="center"
width="170"
label="建议时间"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="adviceContent"
align="center"
min-width="200"
:show-overflow-tooltip="true"
label="建议内容">
<template slot-scope="scope">
<div class="myNote">{{scope.row.adviceContent}}</div>
</template>
</el-table-column>
<el-table-column fixed="right"
label="操作"
align="center"
width="100">
<template slot-scope="scope">
<el-button @click="handleWatch(scope.row)"
type="text"
size="small">查看</el-button>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="parseInt(pageSize)"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination>
</div>
</div>
<!-- 修改弹出框 -->
<el-dialog :visible.sync="detailShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'建议详情'"
width="1150px"
top="5vh"
:destroy-on-close="true"
class="dialog-h"
@closed="detailFormCancle">
<feedback-detail ref="ref_form_detail"
@replayOk="replayOk"
@diaDetailClose="detailFormCancle"></feedback-detail>
</el-dialog>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import nextTick from "dai-js/tools/nextTick";
import { mapGetters } from "vuex";
import feedbackDetail from './feedbackDetail'
import axios from "axios";
export default {
components: { feedbackDetail },
data () {
let endDisabledDate = (time) => {//datareturn
let nowData = Date.now()
if (this.formData.startTime) {
let startTime = new Date(this.formData.startTime)
return time.getTime() > nowData || time.getTime() < startTime || time.getTime() === startTime
} else {
return time.getTime() > nowData
}
}
let startDisabledDate = (time) => {//datareturn
let nowData = Date.now()
return time.getTime() > nowData
}
return {
tableLoading: false,
user: {},
agencyIdArray: [],
orgOptions: [],
orgOptionProps: {
multiple: false,
value: 'agencyId',
label: 'agencyName',
children: 'subAgencyList',
checkStrictly: true
},
tableData: [],
statusArray: [
{
value: '0',
label: '未回复'
},
{
value: '1',
label: '已回复'
}
],
adviceTypeArray: [
{
value: 'gov',
label: '政府业务建议'
},
{
value: 'software',
label: '软件功能及体验问题'
}
],
formData: {
customerId: '',//id
agencyId: '',//id
gridId: '',
isReply: '',//,01,
adviceType: '',// gov,software ,
startTime: '',//
endTime: '',//
},
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
total: 1,
endPickerOptions: {
disabledDate: endDisabledDate
},
startPickerOptions: {
disabledDate: startDisabledDate
},
eventId: '',
eventDetailData: {},
detailShow: false,
};
},
computed: {
maxTableHeight () {
return this.$store.state.inIframe
? this.clientHeight - 320 + this.iframeHeigh
: this.clientHeight - 320;
},
...mapGetters(["clientHeight", "iframeHeight"]),
},
watch: {
// "formData.endTime": function (val) {
// if (val && val != '') {
// let arrayTemp = val.split(' ')
// this.formData.endTime = arrayTemp[0] + ' 23:59:59'
// }
// },
},
mounted () {
console.log(this.$store.state)
this.user = this.$store.state.user
this.formData.customerId = this.user.customerId
this.formData.agencyId = this.user.agencyId
this.getOrgTreeList();
this.getTableData();
},
methods: {
handleChangeAgency (val) {
let obj = this.$refs["myCascader"].getCheckedNodes()[0].data
if (obj) {
if (obj.level === 'grid') {
this.formData.gridId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : '';
this.formData.agencyId = ''
} else {
this.formData.agencyId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : '';
this.formData.gridId = ''
}
} else {
this.formData.agencyId = this.user.agencyId
this.formData.gridId = ''
}
},
handleSearch (val) {
console.log(this.formData);
this.pageNo = 1;
this.getTableData();
},
getOrgTreeList () {
const { user } = this.$store.state
this.$http
.post('/gov/org/customeragency/agencygridtree', {})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取组织树成功', res.data)
this.orgOptions = []
this.orgOptions.push(res.data)
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
async handleWatch (row) {
this.detailShow = true
this.$nextTick(() => {
this.$refs.ref_form_detail.initForm(row.id)
})
},
replayOk () {
this.detailShow = false
this.getTableData()
},
detailFormCancle () {
this.detailShow = false
},
async getTableData () {
this.tableLoading = true
const url = "/epmetuser/useradvice/advicelist";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/list";
const { pageSize, pageNo, formData } = this;
const { data, code, msg } = await requestPost(url, {
pageSize,
pageNo,
...formData,
});
this.tableLoading = false
if (code === 0) {
this.total = data.total || 0;
this.tableData = data.list
this.tableData.forEach(element => {
element.adviceTypeArray = element.adviceType.split("\\n")
})
} else {
this.$message.error(msg);
}
},
handleSizeChange (val) {
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getTableData();
},
handleCurrentChange (val) {
this.pageNo = val;
this.getTableData();
},
resetSearch () {
this.agencyIdArray = []
this.formData = {
customerId: this.user.customerId,
agencyId: this.user.agencyId,//id id
gridId: '',
isReply: '',//,01,
adviceType: '',// gov,software ,
startTime: '',//
endTime: '',//
}
this.pageNo = 1
this.getTableData();
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/buttonstyle.scss";
@import "@/assets/scss/modules/management/list-main.scss";
@import "@/assets/scss/modules/shequzhili/event-info.scss";
.div_search {
.item_width_2 {
width: 200px;
}
}
.myNote {
display: -webkit-box;
text-overflow: ellipsis;
overflow: hidden;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
</style>
Loading…
Cancel
Save