From 22b909c187eae7b85aca35c08a2fa9b3310de6a6 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Mon, 17 Jan 2022 15:13:04 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=AF=E5=88=86=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scss/modules/visual/personCategory.scss | 2 + src/views/components/scoreRecord.vue | 40 ++- .../regionalParty/finishList.vue | 189 +++++------ .../communityParty/regionalParty/units.vue | 7 +- .../serviceMatter/service.vue | 10 +- .../serviceMatter/serviceForm.vue | 4 +- .../visual/basicinfo/basicInfoMain.vue | 64 ++-- .../visual/basicinfo/personCategory/Base.js | 10 - .../components/screen-table/index.vue | 317 ++++++++++-------- .../visual/basicinfo/personCategory/index.vue | 147 ++++---- src/views/modules/workSys/mapConfig.vue | 28 +- 11 files changed, 453 insertions(+), 365 deletions(-) delete mode 100644 src/views/modules/visual/basicinfo/personCategory/Base.js diff --git a/src/assets/scss/modules/visual/personCategory.scss b/src/assets/scss/modules/visual/personCategory.scss index 7d9aee4a..509dc2aa 100644 --- a/src/assets/scss/modules/visual/personCategory.scss +++ b/src/assets/scss/modules/visual/personCategory.scss @@ -30,6 +30,8 @@ border: 1px solid #1043c0; box-shadow: 0px 83px 150px 0px #002790; border-radius: 8px; + margin-top: 10px; + margin-left: 10px; margin-right: 15px; margin-bottom: 15px; cursor: pointer; diff --git a/src/views/components/scoreRecord.vue b/src/views/components/scoreRecord.vue index de420ec1..128e06c0 100644 --- a/src/views/components/scoreRecord.vue +++ b/src/views/components/scoreRecord.vue @@ -24,7 +24,7 @@
- {{totalScore}} + {{totalPoint}}
@@ -43,40 +43,40 @@ align="center" type="index" width="50"> - - - - - - diff --git a/src/views/modules/communityParty/regionalParty/finishList.vue b/src/views/modules/communityParty/regionalParty/finishList.vue index 17846816..e9965972 100644 --- a/src/views/modules/communityParty/regionalParty/finishList.vue +++ b/src/views/modules/communityParty/regionalParty/finishList.vue @@ -23,11 +23,12 @@ header-align="center" align="center" label="年份" - min-width="90"> + min-width="120"> -
-
- {{scope.row.timeShow}} + {{scope.row.monthQuarterName}}
-
-
- {{scope.row.state==='1'?'完成':'未完成'}} + {{scope.row.status==='1'?'已完成':'未完成'}}
@@ -170,86 +177,52 @@ export default { data () { return { tableLoading: false, - + unitId: '', typeList: [ { value: 'quarter', label: '季度' }, { - value: 'month', + value: 'monthly', label: '月度' } ], - yearList: [ - { - value: '2019', - label: '2019' - }, - { - value: '2020', - label: '2020' - }, - { - value: '2021', - label: '2021' - }, - ], + yearList: [], quarterList: [ { - value: '1', - label: '第一季度' - }, - { - value: '2', + value: 'Q1', label: '第一季度' }, { - value: '3', + value: 'Q2', label: '第二季度' }, { - value: '4', + value: 'Q3', label: '第三季度' }, + { + value: 'Q4', + label: '第四季度' + }, ], monthlist: [], timeList: [], - stateList: [ + statusList: [ { value: '1', - label: '完成' + label: '已完成' }, { - value: '2', + value: '0', label: '未完成' }, ], - tableData: [ - { - timeType: 'month', - typeShow: '月度', - year: '2019', - time: '12', - timeShow: '12月', - state: '1', - stateShow: '完成', - score: 90 - }, - { - timeType: 'quarter', - typeShow: '季度', - year: '2019', - time: '3', - timeShow: '第三季度', - state: '2', - stateShow: '未完成', - score: 90 - } - ], + tableData: [], } @@ -261,7 +234,8 @@ export default { methods: { - async initTable () { + async initTable (row) { + this.unitId = row.id //初始化时间 this.initData() @@ -299,13 +273,13 @@ export default { let empetArray = [] this.tableData[tableIndex].timeList = [...empetArray] let rowData = JSON.parse(JSON.stringify(row)) - rowData.time = '' + rowData.monthQuarter = '' this.$set(this.tableData, tableIndex, rowData) - if (row.timeType === 'month') { + if (row.type === 'monthly') { this.tableData[tableIndex].timeList = [...this.monthlist] - } else if (row.timeType === 'quarter') { + } else if (row.type === 'quarter') { this.tableData[tableIndex].timeList = [...this.quarterList] } }, @@ -319,16 +293,9 @@ export default { //加载form async loadTable () { - this.tableData.forEach(item => { - item.isEdit = false - item.timeList = [] - - }); - return false - this.tableLoading = true - const url = '/gov/org/placepatrolreviewrecord/getlist' - // const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolreviewrecord/getlist' + // const url = '/heart/icpartyunitcompletion/list' + const url = 'http://yapi.elinkservice.cn/mock/245/heart/icpartyunitcompletion/list' let params = { placePatrolRecordId: this.placePatrolRecordId } @@ -338,14 +305,12 @@ export default { if (code === 0) { if (data.list && data.list.length > 0) { + data.list.forEach(item => { item.isEdit = false - item.isNew = false - let arrayInspectors = item.inspectors.split(',') - item.inspectorArray = [...arrayInspectors] + item.timeList = [] + item.typeShow = item.type === 'monthly' ? '月度' : '季度' - let arrayReviewTime = item.reviewTime.split(' ') - item.reviewTime = arrayReviewTime[0] }); this.tableData = [...data.list] @@ -362,13 +327,13 @@ export default { let obj = { isEdit: true,//是否编辑 - timeType: '', + type: '', typeShow: '', year: '', - time: '', + monthQuarter: '', timeShow: '', - state: '', - stateShow: '', + status: '', + unitId: '', score: 0.0 } this.tableData.push(obj) @@ -380,9 +345,9 @@ export default { rowData.isEdit = true this.$set(this.tableData, tableIndex, rowData) - if (row.timeType === 'month') { + if (row.type === 'monthly') { this.tableData[tableIndex].timeList = [...this.monthlist] - } else if (row.timeType === 'quarter') { + } else if (row.type === 'quarter') { this.tableData[tableIndex].timeList = [...this.quarterList] } }, @@ -402,27 +367,36 @@ export default { }, async addReview (row, tableIndex) { - console.log(row) - return false - let url = "/gov/org/placepatrolreviewrecord/add" - if (row.placePatrolReviewRecordId) { - url = "/gov/org/placepatrolreviewrecord/edit" - } + // let url = "/heart/icpartyunitcompletion/save" + + let url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunitcompletion/save" let params = JSON.parse(JSON.stringify(row)) - params.inspectors = params.inspectorArray.join(',') - params.reviewTime = params.reviewTime + ' 00:00:00' + params.unitId = this.unitId const { data, code, msg } = await requestPost(url, params) if (code === 0) { - let array = data.reviewTime.split(' ') - data.reviewTime = array[0] - data.isEdit = false - data.isNew = false - this.$set(this.tableData, tableIndex, data) + 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 { @@ -437,13 +411,13 @@ export default { if (!row.year) { message = message + '年份不能为空;' } - if (!row.timeType) { + if (!row.type) { message = message + '类型不能为空;' } - if (!row.time) { + if (!row.monthQuarter) { message = message + '时间不能为空;' } - if (!row.state) { + if (!row.status) { message = message + '完成情况不能为空;' } @@ -461,7 +435,7 @@ export default { type: "warning" }) .then(() => { - if (row.placePatrolReviewRecordId) {//存在id,调用服务删除 + if (row.id) {//存在id,调用服务删除 this.deleteRecord(row, tableIndex) } else {//不存在id,直接删除数组数据 this.tableData.splice(tableIndex, 1); @@ -478,10 +452,11 @@ export default { async deleteRecord (row, tableIndex) { - const url = "/gov/org/placepatrolreviewrecord/del" + // const url = "/heart/icpartyunitcompletion/delete" + const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunitcompletion/delete" let params = { - placePatrolReviewRecordId: row.placePatrolReviewRecordId + id: row.id } const { data, code, msg } = await requestPost(url, params) @@ -564,4 +539,10 @@ export default { display: flex; justify-content: flex-end; } +.picker_year { + /deep/ .el-date-editor.el-input, + .el-date-editor.el-input__inner { + width: 140px; + } +} diff --git a/src/views/modules/communityParty/regionalParty/units.vue b/src/views/modules/communityParty/regionalParty/units.vue index 0e5202e2..09331bc0 100644 --- a/src/views/modules/communityParty/regionalParty/units.vue +++ b/src/views/modules/communityParty/regionalParty/units.vue @@ -103,9 +103,9 @@ :http-request="uploadFile"> 导入 --> + type="red">导入 - + -->
@@ -269,7 +269,8 @@ width="1050px" top="5vh" @closed="diaClose"> - + diff --git a/src/views/modules/systemManagement/serviceMatter/service.vue b/src/views/modules/systemManagement/serviceMatter/service.vue index f09c31fb..9af01fe1 100644 --- a/src/views/modules/systemManagement/serviceMatter/service.vue +++ b/src/views/modules/systemManagement/serviceMatter/service.vue @@ -143,8 +143,8 @@ export default { async loadTable () { this.tableLoading = true - // const url = "/heart/serviceitem/list" - const url = "http://yapi.elinkservice.cn/mock/245/heart/serviceitem/list" + const url = "/heart/serviceitem/list" + // const url = "http://yapi.elinkservice.cn/mock/245/heart/serviceitem/list" let params = { customerId: this.customerId } @@ -217,11 +217,11 @@ export default { }, async disableService (row, type) { - // const url = "/heart/serviceitem/updatestatus" - const url = "http://yapi.elinkservice.cn/mock/245/heart/serviceitem/updatestatus" + const url = "/heart/serviceitem/updatestatus" + // const url = "http://yapi.elinkservice.cn/mock/245/heart/serviceitem/updatestatus" let params = { - id: row.categoryId, + categoryId: row.categoryId, usableFlag: type === 'able' } diff --git a/src/views/modules/systemManagement/serviceMatter/serviceForm.vue b/src/views/modules/systemManagement/serviceMatter/serviceForm.vue index 08e4e2eb..7a5c420a 100644 --- a/src/views/modules/systemManagement/serviceMatter/serviceForm.vue +++ b/src/views/modules/systemManagement/serviceMatter/serviceForm.vue @@ -116,8 +116,8 @@ export default { }, async addService () { - // let url = '/heart/serviceitem/saveorupdate' - let url = "http://yapi.elinkservice.cn/mock/245/heart/serviceitem/saveorupdate" + let url = '/heart/serviceitem/saveorupdate' + // let url = "http://yapi.elinkservice.cn/mock/245/heart/serviceitem/saveorupdate" const { data, code, msg } = await requestPost(url, this.formData) diff --git a/src/views/modules/visual/basicinfo/basicInfoMain.vue b/src/views/modules/visual/basicinfo/basicInfoMain.vue index e538d41e..5aa402e8 100644 --- a/src/views/modules/visual/basicinfo/basicInfoMain.vue +++ b/src/views/modules/visual/basicinfo/basicInfoMain.vue @@ -155,7 +155,7 @@ var createTextStyle = function (feature) { text: feature.values_.name, backgroundFill: new Fill({ // color: 'rgba(0, 146, 238, 0.75)' - color: textColorArray[feature.values_.index - 1] + color: textColorArray[feature.values_.colorIndex] }), padding: [4, 10, 4, 10], //text: "变电站名称", @@ -174,10 +174,10 @@ var polygonStyleFunction = (function () { return new Style({ fill: new Fill({ // color: [255, 255, 255, 0.3] - color: polygonColorArray[feature.values_.index - 1] + color: polygonColorArray[feature.values_.colorIndex] }), stroke: new Stroke({ - color: polygonColorArray[feature.values_.index - 1], + color: polygonColorArray[feature.values_.colorIndex], width: 3 }), @@ -214,11 +214,14 @@ const vueGis = { runNum: 0, runAgencyArray: [], selUserId: '', + center: [], + zoom: null, } }, async mounted () { + //加载组织数据 await this.loadOrgData() @@ -289,12 +292,14 @@ const vueGis = { //下钻到下一级 type点击的类型:polygon 点击多边形(分为点击组织/小区) search 点击搜索 people 点击详情 async toSubAgency (type, e, searchName) { - console.log(e) - this.runNum++ - this.runAgencyArray.push(this.orgData) + if (!e) { + return false + } + //点击小区neighborHood显示楼栋,点击非小区,进入下一级地图 if (type === 'people') { - + this.runNum++ + this.runAgencyArray.push(this.orgData) this.orgLevel = 'people' this.selUserId = e this.orgId = '' @@ -305,9 +310,11 @@ const vueGis = { } this.searchName = searchName - } else if (type === 'search') { + } else if (type === 'search') { + this.runNum++ + this.runAgencyArray.push(this.orgData) this.orgLevel = 'search' this.orgId = '' this.orgData = { @@ -320,8 +327,17 @@ const vueGis = { }); } else { - this.subAgencyArray.forEach(item => { + if (!e.selected[0]) { + return false + } + this.runNum++ + this.orgData.center = map.getView().getCenter() + this.orgData.zoom = map.getView().getZoom() + console.log('center', map.getView().getCenter()) + console.log('zoom', map.getView().getZoom()) + this.runAgencyArray.push(this.orgData) + this.subAgencyArray.forEach(item => { if (item.id === e.selected[0].values_.id) { this.orgId = item.id this.orgLevel = item.level @@ -332,7 +348,6 @@ const vueGis = { if (this.orgLevel === 'neighborHood') { this.loadList() this.$nextTick(() => { - // 小区id,小区名称 this.$refs.ref_community.initData(this.orgData.id, this.orgData.name); }); @@ -343,7 +358,6 @@ const vueGis = { } - }, //刷新地图 @@ -378,6 +392,8 @@ const vueGis = { this.orgId = this.orgData.id this.orgLevel = this.orgData.level + this.center = this.orgData.center + this.zoom = this.orgData.zoom if (this.orgLevel === 'people') { @@ -437,10 +453,14 @@ const vueGis = { if (subAgencyArray && subAgencyArray.length > 0) {//判断是否存在下级标注 let oneData = {} - subAgencyArray.forEach(agencyItem => { + let count = 0 + for (let i = 0; i < subAgencyArray.length; i++) { + const agencyItem = subAgencyArray[i] + if (agencyItem.coordinates && agencyItem.coordinates !== '') {//如果有坐标 - let urlNum = this.getRndBetween(1, 3) + let urlNum = count % 3 + count++ oneData = { type: 'Feature', @@ -449,7 +469,7 @@ const vueGis = { id: agencyItem.id, level: agencyItem.level, name: agencyItem.name, - index: urlNum//颜色随机的索引 + colorIndex: urlNum//颜色随机的索引 }, geometry: { type: 'Polygon', @@ -474,7 +494,7 @@ const vueGis = { oneData.geometry.coordinates.push(polygonArray) featureData.push(oneData) } - }); + } } if (featureData && featureData.length > 0) { @@ -515,7 +535,7 @@ const vueGis = { scale: 0.5, // src: "/img/largeScreen/icon_camra.png" // src: "https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20211116/a219130b6bc74b0b80b5ddb0fce0892a.png" - src: iconUrlArray[oneIcon.values_.index - 1] + src: iconUrlArray[oneIcon.values_.colorIndex] }) }); @@ -532,18 +552,20 @@ const vueGis = { }, //设置地图定位的中心点和缩放级别 setMapLocation () { + this.centerPoint = [] + if (this.center && this.center.length > 0) { + this.centerPoint = this.center + } else if (this.orgData.longitude && this.orgData.latitude) { - if (this.orgData.longitude && this.orgData.latitude) { - this.centerPoint = [] this.centerPoint.push(this.orgData.longitude) this.centerPoint.push(this.orgData.latitude) } else { - this.centerPoint = centerPointGlobal } - - this.setZoom(this.orgData.agencyLevel) + if (!this.zoom) { + this.setZoom(this.orgData.agencyLevel) + } }, //根据组织层级设置缩放级别 diff --git a/src/views/modules/visual/basicinfo/personCategory/Base.js b/src/views/modules/visual/basicinfo/personCategory/Base.js deleted file mode 100644 index be6ef0e4..00000000 --- a/src/views/modules/visual/basicinfo/personCategory/Base.js +++ /dev/null @@ -1,10 +0,0 @@ -class Base { - constructor() { - this.a = '3' - this.init() - } - init() { - console.log('1') - } -} -export default Base diff --git a/src/views/modules/visual/basicinfo/personCategory/components/screen-table/index.vue b/src/views/modules/visual/basicinfo/personCategory/components/screen-table/index.vue index 9413eb25..d8c0a854 100644 --- a/src/views/modules/visual/basicinfo/personCategory/components/screen-table/index.vue +++ b/src/views/modules/visual/basicinfo/personCategory/components/screen-table/index.vue @@ -3,11 +3,48 @@
- {{ item.title }} + style="width:5%"> + {{ '序号' }}
+
+ {{ '姓名' }} +
+
+ {{ '调整时间' }} +
+
+ {{ typeShow }} + + +
+
+
+
{{item.label}}
+ +
+
+
+ +
+ +
+
+ {{ '网格' }} +
+
+ {{ '小区楼栋' }} +
+
- {{ item }} - - 更多> - - - {{ item }} - - + :style="{width:widthList[indexs]}" + :key="indexs"> + {{ item }} +
加载中 @@ -48,144 +73,108 @@ @@ -213,6 +202,18 @@ export default { text-align: center; width: calc(100% / 5); } + &-select { + position: relative; + cursor: pointer; + // display: flex; + // justify-content: space-around; + + > img { + margin-left: 10px; + // width: 10px; + // height: 10px; + } + } } &-body { @@ -304,4 +305,54 @@ export default { } } } + +.user_list { + margin-top: 2px; + position: absolute; + z-index: 10; + left: 25%; + + background: #020340; + border: 1px solid #0a359b; + border-radius: 4px; + box-shadow: 0 0 10px inset #1a5afd; + + .user_item { + padding: 13px 8px 0 14px; + font-size: 16px; + font-family: PingFang SC; + font-weight: 400; + color: #ffffff; + + .user_item_content { + display: flex; + // justify-content: center; + align-items: center; + + .name { + max-width: 80%; + text-align: left; + } + + > img { + margin-left: auto; + + margin-top: 4px; + width: 8px; + height: 12px; + } + } + + .item_line { + margin-top: 9px; + width: 70px; + height: 0px; + border: 1px dotted #1797ff31; + border-width: 0.5px; + } + .last_line { + border: 1px dotted #1797ff00; + } + } +} diff --git a/src/views/modules/visual/basicinfo/personCategory/index.vue b/src/views/modules/visual/basicinfo/personCategory/index.vue index e1e9276f..807d66c3 100644 --- a/src/views/modules/visual/basicinfo/personCategory/index.vue +++ b/src/views/modules/visual/basicinfo/personCategory/index.vue @@ -34,37 +34,35 @@ :class="{ 'top-item-active': activeIndex == index , }" - @click="onClickList(index)" - v-for="(item, index) in warningList" + @click="onClickList(item,index)" + v-for="(item, index) in categoryList" :key="index">
- {{ item.label }} - {{ item.count }} + {{ item.categoryName }} + {{ item.total }}
较上月
-
{{ "+2000" }}
+
{{ "+"+ item.immigration }}
{{" "}}
-
{{ "-2000"}}
+
{{ "-"+ item.emigration}}
- +