20 changed files with 4633 additions and 1898 deletions
File diff suppressed because it is too large
@ -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> |
|||
@ -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.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: { |
|||
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> |
|||
@ -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> |
|||
@ -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> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
@ -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) => {//这个关键属性我们一定要写在data的里面并且return的外面,这是动态改变区间的关键 |
|||
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) => {//这个关键属性我们一定要写在data的里面并且return的外面,这是动态改变区间的关键 |
|||
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> |
|||
File diff suppressed because it is too large
@ -1,511 +1,377 @@ |
|||
<template> |
|||
<div> |
|||
<div class="dialog-h-content scroll-h"> |
|||
<div v-if="initLoading" |
|||
class="m-row"> |
|||
<div v-if="initLoading" class="m-row"> |
|||
<div class="m-info"> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">服务名称:</span> |
|||
<span>{{ formData.serviceName||'--' }}</span> |
|||
<span>{{ formData.serviceName || "--" }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">服务组织:</span> |
|||
<span>{{ serviceOrgName||'--' }}</span> |
|||
<span>{{ serviceOrgName || "--" }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">服务范围:</span> |
|||
<span>{{ formData.gridIdListName ||'--' }}</span> |
|||
<span>{{ formData.gridIdListName || "--" }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">政策依据:</span> |
|||
<span>{{ formData.policyTitle||'--' }}</span> |
|||
<el-button v-if="formData.policyId" |
|||
style="margin-left: 10px" |
|||
type="primary" |
|||
size="small" |
|||
@click="handlePersonList">预览</el-button> |
|||
<span>{{ formData.policyTitle || "--" }}</span> |
|||
<el-button |
|||
v-if="formData.policyId" |
|||
style="margin-left: 10px" |
|||
type="primary" |
|||
size="small" |
|||
@click="handlePersonList" |
|||
>预览</el-button |
|||
> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">经办人:</span> |
|||
<span>{{ formData.principalName||'--' }}</span> |
|||
<span>{{ formData.principalName || "--" }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">联系方式:</span> |
|||
<span>{{ formData.principalContact||'--' }}</span> |
|||
<span>{{ formData.principalContact || "--" }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">服务时间:</span> |
|||
<span>{{ formData.serviceTimeStart||'--' }}</span>至 |
|||
<span>{{ formData.serviceTimeEnd||'--' }}</span> |
|||
<span>{{ formData.serviceTimeStart || "--" }}</span |
|||
>至 |
|||
<span>{{ formData.serviceTimeEnd || "--" }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">备注:</span> |
|||
<span>{{ formData.remark||'--' }}</span> |
|||
<span>{{ formData.remark || "--" }}</span> |
|||
</div> |
|||
|
|||
<div v-show="formData.serviceStatus==='completed'"> |
|||
<div v-show="formData.serviceStatus === 'completed'"> |
|||
<h3 class="d-h3">反馈内容</h3> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">服务目标:</span> |
|||
<span>{{ feedbackFormData.serviceGoal||'--' }}</span> |
|||
<span>{{ feedbackFormData.serviceGoal || "--" }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">服务效果:</span> |
|||
<span>{{ feedbackFormData.serviceEffect||'--' }}</span> |
|||
<span>{{ feedbackFormData.serviceEffect || "--" }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">服务人数:</span> |
|||
<span>{{ feedbackFormData.servicePeopleNumber||0 }}</span> |
|||
<span>{{ feedbackFormData.servicePeopleNumber || 0 }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">服务状态:</span> |
|||
<span>{{ feedbackFormData.serviceStatusShow||'--' }}</span> |
|||
<span>{{ feedbackFormData.serviceStatusShow || "--" }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">满意度:</span> |
|||
<span>{{ feedbackFormData.satisfactionShow||'--' }}</span> |
|||
<span>{{ feedbackFormData.satisfactionShow || "--" }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">地理位置:</span> |
|||
<span>{{ feedbackFormData.address||'--' }}</span> |
|||
<span>{{ feedbackFormData.address || "--" }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">地图位置:</span> |
|||
<div class="div_map"> |
|||
|
|||
<div id="app_detail"></div> |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">附件:</span> |
|||
<file-list v-if="fileList.length>0" |
|||
:fileList="fileList"></file-list> |
|||
<file-list |
|||
v-if="fileList.length > 0" |
|||
:fileList="fileList" |
|||
></file-list> |
|||
<span v-else>--</span> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
<div class="div-btn"> |
|||
<el-button size="small" |
|||
@click="handleCancle">关 闭</el-button> |
|||
|
|||
<el-button size="small" @click="handleCancle">关 闭</el-button> |
|||
</div> |
|||
|
|||
<el-dialog v-if="showPersonList" |
|||
:visible.sync="showPersonList" |
|||
:append-to-body="true" |
|||
:close-on-click-modal="false" |
|||
:close-on-press-escape="false" |
|||
:title="'政策预览'" |
|||
width="1150px" |
|||
top="5vh" |
|||
class="dialog-h" |
|||
@closed="showPersonList = false"> |
|||
<person-list ref="ref_detail_form" |
|||
:policyId="policyId" |
|||
:ruleList="ruleList" |
|||
@handleOk="handleOk" |
|||
@handleClose="handleClose"> |
|||
<el-dialog |
|||
v-if="showPersonList" |
|||
:visible.sync="showPersonList" |
|||
:append-to-body="true" |
|||
:close-on-click-modal="false" |
|||
:close-on-press-escape="false" |
|||
:title="'政策预览'" |
|||
width="1150px" |
|||
top="5vh" |
|||
class="dialog-h" |
|||
@closed="showPersonList = false" |
|||
> |
|||
<person-list |
|||
ref="ref_detail_form" |
|||
:policyId="policyId" |
|||
:ruleList="ruleList" |
|||
@handleOk="handleOk" |
|||
@handleClose="handleClose" |
|||
> |
|||
</person-list> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { mapGetters } from 'vuex' |
|||
import { Loading } from 'element-ui' // 引入Loading服务 |
|||
import { requestPost } from '@/js/dai/request' |
|||
import { mapGetters } from "vuex"; |
|||
import { Loading } from "element-ui"; // 引入Loading服务 |
|||
import { requestPost } from "@/js/dai/request"; |
|||
import personList from "../policy/personList"; |
|||
import fileList from '@/views/components/fileList' |
|||
import fileList from "@/views/components/fileList"; |
|||
import daiMap from "@/utils/dai-map"; |
|||
|
|||
var map; |
|||
let loading; // 加载动画 |
|||
|
|||
var map |
|||
var search |
|||
var markers |
|||
var infoWindowList |
|||
var geocoder // 新建一个正逆地址解析类 |
|||
|
|||
let loading // 加载动画 |
|||
export default { |
|||
data () { |
|||
|
|||
data() { |
|||
return { |
|||
|
|||
|
|||
initLoading: false, |
|||
|
|||
keyWords: '', |
|||
keyWords: "", |
|||
formData: {}, |
|||
|
|||
feedbackFormData: { |
|||
serviceProjectId: '',// 服务项目id |
|||
serviceName: '', |
|||
serviceGoal: '',// 服务目标 |
|||
serviceEffect: '',// 服务效果 |
|||
servicePeopleNumber: null,// 服务人数 |
|||
serviceStatus: 'completed',// 服务状态。in_service服务中;completed:已完成 |
|||
satisfaction: '',//满意度。不满意:bad、基本满意:good、非常满意:perfect |
|||
longitude: '',// 经度 |
|||
latitude: '',// 维度 |
|||
address: '', |
|||
fileList: [],// 附件列表 |
|||
serviceProjectId: "", // 服务项目id |
|||
serviceName: "", |
|||
serviceGoal: "", // 服务目标 |
|||
serviceEffect: "", // 服务效果 |
|||
servicePeopleNumber: null, // 服务人数 |
|||
serviceStatus: "completed", // 服务状态。in_service服务中;completed:已完成 |
|||
satisfaction: "", //满意度。不满意:bad、基本满意:good、非常满意:perfect |
|||
longitude: "", // 经度 |
|||
latitude: "", // 维度 |
|||
address: "", |
|||
fileList: [], // 附件列表 |
|||
}, |
|||
|
|||
|
|||
policyId: "", |
|||
showPersonList: false, |
|||
ruleList: [], |
|||
policyList: [], |
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
}; |
|||
}, |
|||
components: { personList, fileList }, |
|||
async mounted () { |
|||
await this.getPolicyList() |
|||
async mounted() { |
|||
await this.getPolicyList(); |
|||
// if (this.serviceRecordId) {//详情 |
|||
await this.loadInfo() |
|||
this.initLoading = true |
|||
await this.loadInfo(); |
|||
this.initLoading = true; |
|||
|
|||
if (this.formData.serviceStatus === 'completed') { |
|||
if ( |
|||
this.formData.serviceStatus === "completed" && |
|||
this.feedbackFormData.latitude |
|||
) { |
|||
this.$nextTick(() => { |
|||
this.initMap() |
|||
}) |
|||
this.initMap(); |
|||
}); |
|||
} |
|||
}, |
|||
|
|||
|
|||
methods: { |
|||
|
|||
diaDestroy () { |
|||
if (map) { |
|||
map.destroy() |
|||
} |
|||
}, |
|||
diaDestroy() {}, |
|||
|
|||
//加载组织数据 |
|||
async handlePersonList () { |
|||
async handlePersonList() { |
|||
if (!this.formData.policyId) { |
|||
this.$message.info('请先选择政策') |
|||
return false |
|||
this.$message.info("请先选择政策"); |
|||
return false; |
|||
} |
|||
|
|||
this.policyId = this.formData.policyId |
|||
await this.loadRuleList() |
|||
this.policyId = this.formData.policyId; |
|||
await this.loadRuleList(); |
|||
|
|||
this.showPersonList = true; |
|||
}, |
|||
|
|||
async loadRuleList () { |
|||
async loadRuleList() { |
|||
const url = "/heart/policy/rulelist/" + this.policyId; |
|||
|
|||
const url = "/heart/policy/rulelist/" + this.policyId |
|||
let params = {}; |
|||
|
|||
let params = {} |
|||
|
|||
const { data, code, msg } = await requestPost(url, params) |
|||
const { data, code, msg } = await requestPost(url, params); |
|||
|
|||
if (code === 0) { |
|||
this.ruleList = data |
|||
|
|||
this.ruleList = data; |
|||
} else { |
|||
this.$message.error(msg) |
|||
this.$message.error(msg); |
|||
} |
|||
|
|||
}, |
|||
|
|||
handleClose () { |
|||
this.showPersonList = false |
|||
handleClose() { |
|||
this.showPersonList = false; |
|||
}, |
|||
|
|||
async getPolicyList() { |
|||
const url = "/heart/policy/policyListSelect"; |
|||
|
|||
async getPolicyList () { |
|||
const url = '/heart/policy/policyListSelect' |
|||
|
|||
let params = {} |
|||
let params = {}; |
|||
|
|||
const { data, code, msg } = await requestPost(url, params) |
|||
const { data, code, msg } = await requestPost(url, params); |
|||
|
|||
if (code === 0) { |
|||
this.policyList = data |
|||
this.policyList = data; |
|||
} else { |
|||
this.$message.error(msg) |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
//加载组织 |
|||
async loadInfo () { |
|||
const url = '/heart/icServiceRecordV2/detail' |
|||
async loadInfo() { |
|||
const url = "/heart/icServiceRecordV2/detail"; |
|||
|
|||
let params = { |
|||
serviceRecordId: this.serviceRecordId |
|||
} |
|||
serviceRecordId: this.serviceRecordId, |
|||
}; |
|||
|
|||
const { data, code, msg } = await requestPost(url, params) |
|||
const { data, code, msg } = await requestPost(url, params); |
|||
|
|||
if (code === 0) { |
|||
this.formData = { ...data } |
|||
this.formData.serviceRecordId = this.serviceRecordId |
|||
this.feedbackFormData = { ...data.feedback } |
|||
this.formData.policyName = '' |
|||
this.formData.gridIdListName = '' |
|||
this.feedbackFormData.serviceStatusShow = '' |
|||
this.feedbackFormData.satisfactionShow = '' |
|||
|
|||
let arr = [] |
|||
this.formData.gridIdList.forEach(element => { |
|||
arr.push(element.objectName) |
|||
this.formData = { ...data }; |
|||
this.formData.serviceRecordId = this.serviceRecordId; |
|||
this.feedbackFormData = { ...data.feedback }; |
|||
this.formData.policyName = ""; |
|||
this.formData.gridIdListName = ""; |
|||
this.feedbackFormData.serviceStatusShow = ""; |
|||
this.feedbackFormData.satisfactionShow = ""; |
|||
|
|||
let arr = []; |
|||
this.formData.gridIdList.forEach((element) => { |
|||
arr.push(element.objectName); |
|||
}); |
|||
this.formData.gridIdListName = arr.join(',') |
|||
this.statusArray.forEach(element => { |
|||
this.formData.gridIdListName = arr.join(","); |
|||
this.statusArray.forEach((element) => { |
|||
if (this.formData.serviceStatus === element.value) { |
|||
this.feedbackFormData.serviceStatusShow = element.label |
|||
this.feedbackFormData.serviceStatusShow = element.label; |
|||
} |
|||
}); |
|||
this.satisfyArray.forEach(element => { |
|||
this.satisfyArray.forEach((element) => { |
|||
if (this.feedbackFormData.satisfaction === element.value) { |
|||
this.feedbackFormData.satisfactionShow = element.label |
|||
this.feedbackFormData.satisfactionShow = element.label; |
|||
} |
|||
}); |
|||
this.policyList.forEach(element => { |
|||
this.policyList.forEach((element) => { |
|||
if (this.formData.policyId === element.policyId) { |
|||
this.formData.policyName = element.title |
|||
this.formData.policyName = element.title; |
|||
} |
|||
}); |
|||
|
|||
this.fileList = [] |
|||
if (data.feedback && data.feedback.fileList && data.feedback.fileList.length > 0) { |
|||
data.feedback.fileList.forEach(element => { |
|||
this.fileList = []; |
|||
if ( |
|||
data.feedback && |
|||
data.feedback.fileList && |
|||
data.feedback.fileList.length > 0 |
|||
) { |
|||
data.feedback.fileList.forEach((element) => { |
|||
let obj = { |
|||
name: element.name, |
|||
format: element.format, |
|||
url: element.url, |
|||
type: element.type |
|||
|
|||
} |
|||
this.fileList.push(obj) |
|||
type: element.type, |
|||
}; |
|||
this.fileList.push(obj); |
|||
}); |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
} else { |
|||
this.$message.error(msg) |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
|
|||
|
|||
handleCancle () { |
|||
this.resetData() |
|||
this.$emit('diaDetailClose') |
|||
|
|||
handleCancle() { |
|||
this.resetData(); |
|||
this.$emit("diaDetailClose"); |
|||
}, |
|||
|
|||
|
|||
|
|||
// 地图初始化函数,本例取名为init,开发者可根据实际情况定义 |
|||
initMap () { |
|||
// 定义地图中心点坐标 |
|||
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; |
|||
} |
|||
var center = new window.TMap.LatLng(latitude, latitude) |
|||
// 定义map变量,调用 TMap.Map() 构造函数创建地图 |
|||
map = new window.TMap.Map(document.getElementById('app_detail'), { |
|||
center: center, // 设置地图中心点坐标 |
|||
zoom: 17.2, // 设置地图缩放级别 |
|||
pitch: 43.5, // 设置俯仰角 |
|||
rotation: 45 // 设置地图旋转角度 |
|||
}) |
|||
|
|||
search = new window.TMap.service.Search({ pageSize: 10 }) |
|||
// 新建一个地点搜索类 |
|||
markers = new TMap.MultiMarker({ |
|||
map: map, |
|||
geometries: [] |
|||
}) |
|||
infoWindowList = Array(10) |
|||
|
|||
geocoder = new TMap.service.Geocoder(); // 新建一个正逆地址解析类 |
|||
|
|||
// 监听地图平移结束 |
|||
map.on('panend', () => { |
|||
this.handleMoveCenter() |
|||
}) |
|||
this.handleMoveCenter() |
|||
this.convert() |
|||
}, |
|||
initMap() { |
|||
let { latitude, longitude } = this.feedbackFormData; |
|||
|
|||
setMarker (lat, lng) { |
|||
markers.setGeometries([]) |
|||
markers.add([ |
|||
map = new daiMap( |
|||
document.getElementById("app_detail"), |
|||
{ latitude, longitude }, |
|||
{ |
|||
id: '4', |
|||
styleId: 'marker', |
|||
position: new TMap.LatLng(lat, lng), |
|||
properties: { |
|||
title: 'marker4' |
|||
} |
|||
zoom: 16.2, // 设置地图缩放级别 |
|||
pitch: 43.5, // 设置俯仰角 |
|||
rotation: 45, // 设置地图旋转角度 |
|||
} |
|||
]) |
|||
}, |
|||
); |
|||
|
|||
handleSearchMap () { |
|||
infoWindowList.forEach((infoWindow) => { |
|||
infoWindow.close() |
|||
}) |
|||
infoWindowList.length = 0 |
|||
markers.setGeometries([]) |
|||
// 在地图显示范围内以给定的关键字搜索地点 |
|||
search |
|||
.searchRectangle({ |
|||
keyword: this.keyWords, |
|||
bounds: map.getBounds() |
|||
}) |
|||
.then((result) => { |
|||
let { data } = result |
|||
if (Array.isArray(data) && data.length > 0) { |
|||
const { |
|||
location: { lat, lng } |
|||
} = data[0] |
|||
|
|||
|
|||
map.setCenter(new TMap.LatLng(lat, lng)) |
|||
this.setMarker(lat, lng) |
|||
this.formData.latitude = lat |
|||
this.formData.longitude = lng |
|||
this.convert() |
|||
} else { |
|||
this.$message.error('未检索到相关位置坐标') |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
handleMoveCenter () { |
|||
//修改地图中心点 |
|||
const center = map.getCenter() |
|||
const lat = center.getLat() |
|||
const lng = center.getLng() |
|||
this.formData.latitude = lat |
|||
this.formData.longitude = lng |
|||
this.setMarker(lat, lng) |
|||
this.convert(lat, lng) |
|||
map.setCenter(latitude, longitude); |
|||
map.setMarker(latitude, longitude); |
|||
}, |
|||
|
|||
convert (lat, lng) { |
|||
markers.setGeometries([]); |
|||
// var input = document.getElementById('location').value.split(','); |
|||
let location |
|||
if (lat && lng) { |
|||
location = new TMap.LatLng(lat, lng); |
|||
} else { |
|||
location = new TMap.LatLng(this.formData.latitude, this.formData.longitude); |
|||
} |
|||
|
|||
// map.setCenter(location); |
|||
markers.updateGeometries([ |
|||
{ |
|||
id: 'main', // 点标注数据数组 |
|||
position: location, |
|||
}, |
|||
]); |
|||
geocoder |
|||
.getAddress({ location: location }) // 将给定的坐标位置转换为地址 |
|||
.then((result) => { |
|||
this.formData.address = result.result.address |
|||
// 显示搜索到的地址 |
|||
}); |
|||
}, |
|||
handleOk () { |
|||
this.showPersonList = false |
|||
handleOk() { |
|||
this.showPersonList = false; |
|||
}, |
|||
|
|||
resetData () { |
|||
this.formData = {} |
|||
resetData() { |
|||
this.formData = {}; |
|||
}, |
|||
// 开启加载动画 |
|||
startLoading () { |
|||
startLoading() { |
|||
loading = Loading.service({ |
|||
lock: true, // 是否锁定 |
|||
text: '正在加载……', // 加载中需要显示的文字 |
|||
background: 'rgba(0,0,0,.7)' // 背景颜色 |
|||
}) |
|||
text: "正在加载……", // 加载中需要显示的文字 |
|||
background: "rgba(0,0,0,.7)", // 背景颜色 |
|||
}); |
|||
}, |
|||
// 结束加载动画 |
|||
endLoading () { |
|||
endLoading() { |
|||
// clearTimeout(timer); |
|||
if (loading) { |
|||
loading.close() |
|||
loading.close(); |
|||
} |
|||
} |
|||
}, |
|||
}, |
|||
computed: { |
|||
dataRule () { |
|||
dataRule() { |
|||
return { |
|||
|
|||
|
|||
serviceTimeStart: [ |
|||
{ required: true, message: '服务时间不能为空', trigger: 'blur' } |
|||
{ required: true, message: "服务时间不能为空", trigger: "blur" }, |
|||
], |
|||
|
|||
|
|||
} |
|||
}; |
|||
}, |
|||
}, |
|||
props: { |
|||
|
|||
serviceRecordId: { |
|||
type: String, |
|||
required: true |
|||
required: true, |
|||
}, |
|||
serviceOrgName: { |
|||
type: String, |
|||
required: true |
|||
required: true, |
|||
}, |
|||
|
|||
|
|||
satisfyArray: { |
|||
type: Array, |
|||
default () { |
|||
return [] |
|||
} |
|||
default() { |
|||
return []; |
|||
}, |
|||
}, |
|||
statusArray: { |
|||
type: Array, |
|||
default () { |
|||
return [] |
|||
} |
|||
default() { |
|||
return []; |
|||
}, |
|||
}, |
|||
} |
|||
} |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
|
|||
<style lang="scss" scoped > |
|||
<style lang="scss" scoped> |
|||
@import "@/assets/scss/modules/management/detail-main.scss"; |
|||
</style> |
|||
</style> |
|||
|
|||
@ -0,0 +1,83 @@ |
|||
<template> |
|||
<div> |
|||
<div class=""> |
|||
<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="img_label">图片:</span> |
|||
<section v-for="(item,index) in htglDetailData.topicImages" :key="index" > |
|||
<img :src="item" alt="" width="150px" height="75px" style="margin-left:16px;" /> |
|||
</section> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row type="flex" > |
|||
<el-col :span="24"> |
|||
<span class="htgl_info_label">话题发表人:</span> {{htglDetailData.releaseUserName||'--'}} |
|||
</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="htgl_info_label">当前支持:</span>{{htglDetailData.supportCount||'--'}}票,反对: {{htglDetailData.oppositionCount||'--'}}票 |
|||
</el-col> |
|||
</el-row> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data() { |
|||
return {}; |
|||
}, |
|||
props:{ |
|||
htglDetailData:{ |
|||
type:Object, |
|||
default:{} |
|||
}, |
|||
topicId:{ |
|||
type:String, |
|||
default:'' |
|||
} |
|||
}, |
|||
created() {}, |
|||
methods: {}, |
|||
components: {}, |
|||
computed: {}, |
|||
watch: {}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
.img_label{ |
|||
display: inline-block; |
|||
height: 75px; |
|||
vertical-align: top; |
|||
width: 90px; |
|||
text-align: right; |
|||
margin-right: 6px; |
|||
} |
|||
.htgl_info_label{ |
|||
display: inline-block; |
|||
width: 90px; |
|||
text-align: right; |
|||
margin-right: 6px; |
|||
} |
|||
</style> |
|||
@ -0,0 +1,331 @@ |
|||
<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="releaseUserName" |
|||
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="dialogVisible" |
|||
width="60%" |
|||
> |
|||
<htgl-info |
|||
:htglDetailData="htglDetailData" |
|||
:topicId="topicId" |
|||
> |
|||
|
|||
</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: '', |
|||
}, |
|||
topicId:'', |
|||
tableData:[], |
|||
dialogVisible:false, |
|||
agencyIdArray: [], |
|||
htglDetailData:{}, |
|||
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.topicId = row.topicId |
|||
this.dialogVisible = true |
|||
const url = "/resi/group/ytTopic/topicDetail"; |
|||
const { data, code, msg } = await requestPost(url, { |
|||
topicId: this.topicId, |
|||
}); |
|||
if (code === 0) { |
|||
this.htglDetailData = { ...data }; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
}, |
|||
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-bottom: 16px; |
|||
} |
|||
</style> |
|||
@ -0,0 +1,440 @@ |
|||
<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张图片,图片支持jpg、jpeg、bmp、git或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) { |
|||
|
|||
if (data) { |
|||
|
|||
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> |
|||
|
|||
@ -0,0 +1,449 @@ |
|||
<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" |
|||
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) => {//这个关键属性我们一定要写在data的里面并且return的外面,这是动态改变区间的关键 |
|||
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) => {//这个关键属性我们一定要写在data的里面并且return的外面,这是动态改变区间的关键 |
|||
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: '',//是否被回复,0未回复,1回复, 传空查询所有 |
|||
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: '',//是否被回复,0未回复,1回复, 传空查询所有 |
|||
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…
Reference in new issue