From 650f1c913e891d06aaca133a3e026bde4eb429ac Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Thu, 23 Dec 2021 10:21:34 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E6=92=A4=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/visual/measure/volunteer.vue | 261 ++++++++++++------ 1 file changed, 178 insertions(+), 83 deletions(-) diff --git a/src/views/modules/visual/measure/volunteer.vue b/src/views/modules/visual/measure/volunteer.vue index 44b697ca0..2035625f7 100644 --- a/src/views/modules/visual/measure/volunteer.vue +++ b/src/views/modules/visual/measure/volunteer.vue @@ -1,97 +1,114 @@ @@ -129,6 +146,8 @@ export default { // [1,'商丘路社区第一网格','商丘路小区','2号楼','杨颖、王平、刘佳敏、丁辉、杨萍'], ], value2: '', + selectAgency: '', + propTree: [], visibleLoading: true, pageNo: 1, pageSize: 10, @@ -163,12 +182,13 @@ export default { }, async mounted () { await nextTick(100); - this.getPie() + await this.getAgencyList() + this.getPie(this.$store.state.user.agencyId) // this.initCharts() // this.initCount() await this.getWorkUserInfo() - await this.getMapUnitList() + await this.getMapUnitList(this.$store.state.user.agencyId) }, methods: { initCharts (total, data) { @@ -286,12 +306,12 @@ export default { option && _charts.setOption(option); }, - async getPie () { + async getPie (agencyId) { const url = "/data/report/heart/demand/volunteer/service"; - // let params = { - // agencyId: this.$store.state.user.agencyId, - // }; - const { data, code, msg } = await requestPost(url); + let params = { + agencyId, + }; + const { data, code, msg } = await requestPost(url, params); if (code === 0) { console.log('data-ddd', data) this.vInfo = data @@ -317,7 +337,7 @@ export default { }, { name: '居民数量', value: data.resiServiceTotal, - temStyle: { + itemStyle: { color: 'rgba(250, 193, 38, 1)' } }] @@ -331,6 +351,52 @@ export default { this.$message.error(msg) } }, + async getAgencyList() { + // const url = "/gov/org/customeragency/staffinagencylist"; + const url = '/gov/org/customeragency/agencygridtree' + // let params = { + // agencyId: this.$store.state.user.agencyId, + // }; + const { data, code, msg } = await requestPost(url); + if (code === 0) { + console.log('data-org----o', data) + this.selectAgency = [`${data.agencyId}-${data.level}`] + let arr = [] + arr.push(data) + this.propTree = arr && this.getTreeData(arr) + + } else { + this.$message.error(msg) + } + }, + getTreeData(data){ + if (!Array.isArray(data)) return [] + let arr = data.map(item => { + let _item = {} + if (item.subAgencyList) { + if (item.subAgencyList.length === 0) { + _item = { + label: item.agencyName, + value: item.agencyId + '-' + item.level, + level: item.level, + children: undefined + } + } else _item = { + label: item.agencyName, + value: item.agencyId + '-' + item.level, + level: item.level, + children: this.getTreeData(item.subAgencyList)} + } else { + _item = { + label: item.agencyName, + value: item.agencyId + '-' + item.level, + level: item.level, + } + } + return _item + }) + return arr + }, // 【人员预警】 楼宇预警数量列表 pageSizeChangeHandleNew (val) { this.pageNo = 1; @@ -370,12 +436,13 @@ export default { //获取联建单位分布图 - async getMapUnitList () { + async getMapUnitList (agencyId) { const url = "/epmetuser/volunteer/distribution" // const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/distribution" let params = { - customerId: this.$store.state.user.customerId + customerId: this.$store.state.user.customerId, + agencyId } const { data, code, msg } = await requestPost(url, params) @@ -427,7 +494,17 @@ export default { }, - + handleCascader(val) { + console.log('val-vvv', val) + if (val.length > 0) { + const _arr = val[val.length - 1].split('-') + const orgType = _arr[1] !== 'grid' ? 'agency': 'grid' + // this.getServicePie(_arr[0], orgType) + this.getPie(_arr[0]) + this.getMapUnitList(_arr[0]) + } + + }, //加载地图数据 loadMap () { if (this.isfirstInit) { @@ -534,7 +611,10 @@ export default { > From a352fbe5fb2ceef672f766abc2e8abd49a6be87e Mon Sep 17 00:00:00 2001 From: jiangyy Date: Fri, 14 Jan 2022 09:13:55 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E4=BA=8B=E9=A1=B9?= =?UTF-8?q?=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 26 +- src/views/components/scoreRecord.vue | 343 +++++++++++ src/views/modules/base/community/roomForm.vue | 2 +- .../regionalParty/finishList.vue | 567 ++++++++++++++++++ .../communityParty/regionalParty/units.vue | 111 +++- .../serviceMatter/service.vue | 321 ++++++++++ .../serviceMatter/serviceForm.vue | 232 +++++++ .../visual/basicinfo/personCategory/Base.js | 10 + .../components/screen-loading/index.vue | 68 +++ .../components/screen-table/index.vue | 307 ++++++++++ .../visual/basicinfo/personCategory/index.vue | 164 +++++ 11 files changed, 2111 insertions(+), 40 deletions(-) create mode 100644 src/views/components/scoreRecord.vue create mode 100644 src/views/modules/communityParty/regionalParty/finishList.vue create mode 100644 src/views/modules/systemManagement/serviceMatter/service.vue create mode 100644 src/views/modules/systemManagement/serviceMatter/serviceForm.vue create mode 100644 src/views/modules/visual/basicinfo/personCategory/Base.js create mode 100644 src/views/modules/visual/basicinfo/personCategory/components/screen-loading/index.vue create mode 100644 src/views/modules/visual/basicinfo/personCategory/components/screen-table/index.vue create mode 100644 src/views/modules/visual/basicinfo/personCategory/index.vue diff --git a/src/router/index.js b/src/router/index.js index edcfb0201..228413045 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -226,19 +226,19 @@ router.beforeEach((to, from, next) => { icon: "icon-setting", id: "22213213", name: "基础信息", - url: "visual/basicinfo/basicInfoMain", - // children: [ - // // { - // // url: "/visual/basicinfo/basicInfoMain", - // // name: "基础信息", - // // id: "5feawfwaefwa5", - // // }, - // // { - // // url: "/visual/basicinfo/basicInfoMain", - // // name: "人员类别分析", - // // id: "5fwaefwaefawef5", - // // }, - // ], + // url: "visual/basicinfo/basicInfoMain", + children: [ + { + url: "/visual/basicinfo/basicInfoMain", + name: "基础信息", + id: "5feawfwaefwa5", + }, + { + url: "/visual/basicinfo/personCategory/index", + name: "人员类别分析", + id: "5fwaefwaefawef5", + }, + ], }, { icon: "icon-setting", diff --git a/src/views/components/scoreRecord.vue b/src/views/components/scoreRecord.vue new file mode 100644 index 000000000..de420ec1c --- /dev/null +++ b/src/views/components/scoreRecord.vue @@ -0,0 +1,343 @@ + + + + diff --git a/src/views/modules/base/community/roomForm.vue b/src/views/modules/base/community/roomForm.vue index 9b595dc5f..548762b72 100644 --- a/src/views/modules/base/community/roomForm.vue +++ b/src/views/modules/base/community/roomForm.vue @@ -137,7 +137,7 @@ export default { houseId: '', //房屋ID houseType: '1', purpose: '1', - rentFlag: 1, + rentFlag: 0, dataForm: { neighborHoodId: '', // 所属小区ID buildingId: '',//所属楼栋ID diff --git a/src/views/modules/communityParty/regionalParty/finishList.vue b/src/views/modules/communityParty/regionalParty/finishList.vue new file mode 100644 index 000000000..17846816d --- /dev/null +++ b/src/views/modules/communityParty/regionalParty/finishList.vue @@ -0,0 +1,567 @@ + + + + + + diff --git a/src/views/modules/communityParty/regionalParty/units.vue b/src/views/modules/communityParty/regionalParty/units.vue index a9ff9dc60..0e5202e28 100644 --- a/src/views/modules/communityParty/regionalParty/units.vue +++ b/src/views/modules/communityParty/regionalParty/units.vue @@ -126,19 +126,19 @@ header-align="center" align="center" label="单位名称" - width="180"> + min-width="100"> + min-width="80"> + min-width="250"> @@ -245,6 +279,8 @@ import unitsForm from './unitsForm' import unitsDetail from './unitsDetail' +import finishList from './finishList' +import scoreRecord from '../../../components/scoreRecord.vue' import { requestPost } from "@/js/dai/request"; import { mapGetters } from 'vuex' @@ -298,6 +334,13 @@ export default { formTitle: '新增单位', detailShow: false, + //完成情况 + finishDiaTitle: '区域化党建单位完成情况', + finishDiaShow: false, + //积分记录 + scoreDiaTitle: '积分记录', + scoreDiaShow: false, + files: "", fileName: "", uploadUlr: window.SITE_CONFIG['apiURL'] + '/gov/org/neighborhood/import' @@ -305,7 +348,7 @@ export default { } }, components: { - unitsForm, unitsDetail + unitsForm, unitsDetail, finishList, scoreRecord }, async created () { @@ -390,14 +433,14 @@ export default { this.tableLoading = false }, - - - diaClose () { + editDiaClose () { this.$refs.ref_form.resetData() this.formShow = false }, - detailClosed () { + diaClose () { this.detailShow = false + this.finishDiaShow = false + this.scoreDiaShow = false }, handleDetail (row) { @@ -407,6 +450,22 @@ export default { }) }, + //完成情况 + handleFinish (row) { + this.finishDiaTitle = row.unitName + '完成情况' + this.finishDiaShow = true + this.$nextTick(() => { + this.$refs.ref_finish.initTable(row) + }) + }, + //积分记录 + handleScore (row) { + this.scoreDiaShow = true + this.$nextTick(() => { + this.$refs.ref_score.initForm(row) + }) + }, + handleAdd () { this.formTitle = '新增' this.formShow = 'edit' diff --git a/src/views/modules/systemManagement/serviceMatter/service.vue b/src/views/modules/systemManagement/serviceMatter/service.vue new file mode 100644 index 000000000..f09c31fb1 --- /dev/null +++ b/src/views/modules/systemManagement/serviceMatter/service.vue @@ -0,0 +1,321 @@ + + + + diff --git a/src/views/modules/systemManagement/serviceMatter/serviceForm.vue b/src/views/modules/systemManagement/serviceMatter/serviceForm.vue new file mode 100644 index 000000000..08e4e2ebc --- /dev/null +++ b/src/views/modules/systemManagement/serviceMatter/serviceForm.vue @@ -0,0 +1,232 @@ + + + + + + diff --git a/src/views/modules/visual/basicinfo/personCategory/Base.js b/src/views/modules/visual/basicinfo/personCategory/Base.js new file mode 100644 index 000000000..be6ef0e45 --- /dev/null +++ b/src/views/modules/visual/basicinfo/personCategory/Base.js @@ -0,0 +1,10 @@ +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-loading/index.vue b/src/views/modules/visual/basicinfo/personCategory/components/screen-loading/index.vue new file mode 100644 index 000000000..cc8bda6fe --- /dev/null +++ b/src/views/modules/visual/basicinfo/personCategory/components/screen-loading/index.vue @@ -0,0 +1,68 @@ + + + + + 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 new file mode 100644 index 000000000..9413eb258 --- /dev/null +++ b/src/views/modules/visual/basicinfo/personCategory/components/screen-table/index.vue @@ -0,0 +1,307 @@ + + + + + diff --git a/src/views/modules/visual/basicinfo/personCategory/index.vue b/src/views/modules/visual/basicinfo/personCategory/index.vue new file mode 100644 index 000000000..58fa07502 --- /dev/null +++ b/src/views/modules/visual/basicinfo/personCategory/index.vue @@ -0,0 +1,164 @@ + + + + + From 671ecbd9805c85bd8935ad40d8c98c83a7cba0b8 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Fri, 14 Jan 2022 10:03:53 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E4=BA=BA=E5=91=98=E7=B1=BB=E5=88=AB?= =?UTF-8?q?=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scss/modules/visual/personCategory.scss | 164 ++++++++++++++++++ .../visual/basicinfo/personCategory/index.vue | 122 ++++++++++--- .../visual/communityGovern/typeAnalyze.vue | 4 +- 3 files changed, 262 insertions(+), 28 deletions(-) create mode 100644 src/assets/scss/modules/visual/personCategory.scss diff --git a/src/assets/scss/modules/visual/personCategory.scss b/src/assets/scss/modules/visual/personCategory.scss new file mode 100644 index 000000000..7d9aee4a4 --- /dev/null +++ b/src/assets/scss/modules/visual/personCategory.scss @@ -0,0 +1,164 @@ +.warning-box { + box-sizing: border-box; + // width: 1881px; + width: 100%; + // height: 100%; + min-height: 100%; + margin: auto; + color: #fff; + // background: url("../../../img/modules/visual/warning-box.png") no-repeat center; + background-size: 100% 100%; + padding: 45px 21px 35px 24px; + + &-top { + display: flex; + // justify-content: space-around; + justify-content: flex-start; + flex-wrap: wrap; + min-height: 190px; + + .top-item-active { + background: linear-gradient(0deg, #1a5afd86, #26c5ff75); + } + + .top-item { + box-sizing: border-box; + width: 280px; + height: 190px; + padding: 10px 22px 14px 21px; + // background: rgba(255, 255, 255, 0); + border: 1px solid #1043c0; + box-shadow: 0px 83px 150px 0px #002790; + border-radius: 8px; + margin-right: 15px; + margin-bottom: 15px; + cursor: pointer; + + &-img { + display: flex; + align-items: center; + + img { + width: 78px; + height: 78px; + margin-right: 16px; + margin-bottom: 10px; + } + + .top-item-left { + display: flex; + flex-direction: column; + + span { + display: inline-block; + } + + span:nth-child(1) { + font-size: 18px; + font-weight: 400; + color: #ffffff; + } + + span:nth-child(2) { + font-size: 28px; + font-weight: bold; + color: #00fffc; + margin-top: 10px; + } + } + } + + &-num { + width: 100%; + display: flex; + position: relative; + flex-direction: column; + align-items: space-between; + // border: 1px solid red; + + .num-item { + position: relative; + width: 100%; + height: 35px; + display: flex; + border-radius: 4px; + align-items: center; + justify-content: space-between; + padding: 0 10px 0 9px; + + // &::after { + // display: block; + // content: ""; + // width: 8px; + // height: 8px; + // background: #f0f3f7; + // border-radius: 50%; + // position: absolute; + // left: 12px; + // top: 50%; + // transform: translate(0, -50%); + // } + + div:nth-child(1) { + font-size: 16px; + font-family: PingFang SC; + font-weight: 400; + color: #ffffff; + } + + div:nth-child(2) { + // width: 70%; + display: flex; + font-size: 20px; + font-family: PingFang SC; + font-weight: 500; + color: #ffffff; + + .right-icon { + width: 10px; + height: 14px; + } + } + } + + .num-item:nth-child(2) { + margin-top: 10px; + } + } + } + } + + &-bottom { + box-sizing: border-box; + width: 100%; + height: calc(100% - 300px); + min-height: 300px; + margin-top: 60px; + + .pagination { + box-sizing: border-box; + margin-top: 20px; + width: 100%; + height: 40px; + display: flex; + justify-content: flex-end; + + /deep/ .el-pagination.is-background .el-pager li:not(.disabled).active { + background: #0266d1; + color: #000d3f; + } + + /deep/ .el-pagination .el-pager li { + background: #002e74; + } + + /deep/ .el-pagination .btn-prev { + background: #002e74; + } + + /deep/ .el-pagination .btn-next { + background: #002e74; + } + } + } +} diff --git a/src/views/modules/visual/basicinfo/personCategory/index.vue b/src/views/modules/visual/basicinfo/personCategory/index.vue index 58fa07502..e1e9276fe 100644 --- a/src/views/modules/visual/basicinfo/personCategory/index.vue +++ b/src/views/modules/visual/basicinfo/personCategory/index.vue @@ -1,8 +1,40 @@ -
-
- {{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 0e5202e28..09331bc01 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 f09c31fb1..9af01fe12 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 08e4e2ebc..7a5c420a7 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 e538d41ef..5aa402e83 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 be6ef0e45..000000000 --- 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 9413eb258..d8c0a8541 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 e1e9276fe..807d66c32 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}}
- +