From bcf407e403a24801695859b2454af377bb006695 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Tue, 1 Mar 2022 14:59:50 +0800 Subject: [PATCH 01/29] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/base/community/communityTable.vue | 103 +++++++++++++++++- 1 file changed, 101 insertions(+), 2 deletions(-) diff --git a/src/views/modules/base/community/communityTable.vue b/src/views/modules/base/community/communityTable.vue index c33c0246..39b64c96 100644 --- a/src/views/modules/base/community/communityTable.vue +++ b/src/views/modules/base/community/communityTable.vue @@ -98,12 +98,18 @@
- + style="width: 100%" + @select-all="selectAll" + @selection-change="selectionChange"> + + @@ -162,6 +168,16 @@ :total="total">
+ +
+ 全选 + 删除 +
@@ -197,11 +213,14 @@ export default { pageSize: 20, pageNo: 0, tableLoading: true, + selAllFlag: false, + isIndeterminate: false,//复选框的不确定状态 agencyObj: {},//树所选的组织对象 ownerName: '', ownerPhone: '', tableData: [], + selection: [], //form相关 formShow: false, @@ -231,7 +250,61 @@ export default { ...mapGetters(['clientHeight']) }, methods: { + handleSelectAll (selectAllFlag) { + this.$refs.ref_table.clearSelection(); + if (selectAllFlag) { + this.tableData.forEach(row => { + this.$refs.ref_table.toggleRowSelection(row); + }); + } + }, + deleteBatch () { + if (this.selection.length > 0) { + this.$confirm("确认删除选择的小区?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning" + }) + .then(() => { + this.deleteCommunityBatch() + }) + .catch(err => { + if (err == "cancel") { + // this.$message({ + // type: "info", + // message: "已取消删除" + // }); + } + + }); + } else { + this.$message.warning('请先选择要删除的小区') + } + }, + selectAll (selection) { + this.selection = selection + if (selection.length > 0) { + this.selAllFlag = true + } else { + this.selAllFlag = false + } + + }, + selectionChange (selection) { + this.selection = selection + + if (selection.length === this.tableData.length) { + this.selAllFlag = true + this.isIndeterminate = false + } else if (selection.length > 0) { + this.selAllFlag = false + this.isIndeterminate = true + } else { + this.selAllFlag = false + this.isIndeterminate = false + } + }, handleSearch () { this.loadTable() }, @@ -326,6 +399,26 @@ export default { }); }, + async deleteCommunityBatch () { + const url = "/gov/org/neighborhood/neighborhooddel" + + let params = { + neighborHoodId: row.neighborHoodId + } + + const { data, code, msg } = await requestPost(url, params) + + if (code === 0) { + this.$message({ + type: "success", + message: "删除成功" + }); + this.$emit('refreshTree') + this.loadTable() + } else { + this.$message.error(msg) + } + }, async deleteCommunity (row) { const url = "/gov/org/neighborhood/neighborhooddel" @@ -573,6 +666,12 @@ export default { .div_table { margin-top: 20px; + position: relative; +} +.div_del { + position: absolute; + left: 10px; + bottom: 0; } .div_search { display: flex; From 311b85b292faa75aca663c94f3789cff3b437819 Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Wed, 2 Mar 2022 14:56:34 +0800 Subject: [PATCH 02/29] =?UTF-8?q?=E5=B1=82=E7=BA=A7=E7=8E=B0=E5=AE=9E?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/visual/communityParty/elegant.vue | 2 +- src/views/modules/visual/communityParty/elegantInfo.vue | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/modules/visual/communityParty/elegant.vue b/src/views/modules/visual/communityParty/elegant.vue index ac3073ac..8510173c 100644 --- a/src/views/modules/visual/communityParty/elegant.vue +++ b/src/views/modules/visual/communityParty/elegant.vue @@ -555,7 +555,7 @@ export default { flex-wrap: wrap; padding: 30px 0 20px; .elegant-item { - width: 19%; + width: calc((100% - 80px) / 5); margin-right: 20px; margin-bottom: 36px; box-sizing: border-box; diff --git a/src/views/modules/visual/communityParty/elegantInfo.vue b/src/views/modules/visual/communityParty/elegantInfo.vue index 809716b9..db63d69f 100644 --- a/src/views/modules/visual/communityParty/elegantInfo.vue +++ b/src/views/modules/visual/communityParty/elegantInfo.vue @@ -41,7 +41,8 @@ v-for="(item, index) in info.imageList" :key="index" style="width: 200px; height: 200px;margin-right: 10px;" :src="item" - :preview-src-list="info.imageList"> + :preview-src-list="info.imageList" + :z-index="99999"> From 04347893bbb268231d35a802393dbe8f0a0cf20f Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Wed, 2 Mar 2022 15:50:43 +0800 Subject: [PATCH 03/29] =?UTF-8?q?=E5=B1=85=E6=B0=91=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=89=B9=E9=87=8F=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/base/resi.vue | 131 ++++++++++++++++++++++++++++---- 1 file changed, 118 insertions(+), 13 deletions(-) diff --git a/src/views/modules/base/resi.vue b/src/views/modules/base/resi.vue index 86c4e35f..b062a50a 100644 --- a/src/views/modules/base/resi.vue +++ b/src/views/modules/base/resi.vue @@ -32,11 +32,15 @@ - + class="resi-table" + @select-all="selectAll" + @selection-change="selectionChange"> + -
- - +
+
+ 全选 + 删除 +
+
+ + +
+
@@ -240,6 +256,8 @@ export default { btnLoading: false, disabled: false, pageLoading: false, + selAllFlag: false, + isIndeterminate: false, dialogEditVisible: false, dialogVisible: false, uploadUlr: window.SITE_CONFIG['apiURL'] + '/epmetuser/icresiuser/importExcel', @@ -262,6 +280,7 @@ export default { formList: [], tableHeader: [], tabsList: [], + selection: [], defaultCategotyKey: '', @@ -336,6 +355,61 @@ export default { const { user } = this.$store.state return id === user.agencyId }, + selectionChange (selection) { + this.selection = selection + + if (selection.length === this.tableData.length) { + this.selAllFlag = true + this.isIndeterminate = false + } else if (selection.length > 0) { + this.selAllFlag = false + this.isIndeterminate = true + } else { + this.selAllFlag = false + this.isIndeterminate = false + } + }, + handleSelectAll (selectAllFlag) { + this.$refs.ref_table.clearSelection(); + if (selectAllFlag) { + this.tableData.forEach(row => { + this.$refs.ref_table.toggleRowSelection(row); + }); + } + }, + selectAll (selection) { + this.selection = selection + + if (selection.length > 0) { + this.selAllFlag = true + } else { + this.selAllFlag = false + } + + }, + deleteBatch () { + if (this.selection.length > 0) { + this.$confirm("删除之后无法恢复,确认删除?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning" + }) + .then(() => { + this.deleteresiBatch() + }) + .catch(err => { + if (err == "cancel") { + // this.$message({ + // type: "info", + // message: "已取消删除" + // }); + } + + }); + } else { + this.$message.warning('请先选择要删除的小区') + } + }, handleSizeChange (val) { console.log(`每页 ${val} 条`) this.pageSize = val @@ -627,7 +701,7 @@ export default { handleDel (row) { let params = { formCode: 'resi_base_info', - icResiUserId: row.icResiUserId + userIds: [row.icResiUserId] } console.log('row1', row) this.$http @@ -926,7 +1000,29 @@ export default { .catch(() => { return this.$message.error('网络错误') }) - } + }, + async deleteresiBatch () { + if (this.selection.length === 0) return this.$message.error('请选择之后进行操作') + let userIds = this.selection.map(item => item.icResiUserId) + let params = { + formCode: 'resi_base_info', + userIds + } + this.$http + .post('/epmetuser/icresiuser/delete', params) + .then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } else { + this.$message.success('删除成功') + this.getTableData() + } + }) + .catch((err) => { + console.log('row4', err) + return this.$message.error('网络错误') + }) + }, } } @@ -1033,4 +1129,13 @@ export default { margin-top: 20px; text-align: center; } +.div-flex { + display: flex; + justify-content: space-between; + align-items: center; + width: 100%; + .div_del { + margin-top: 15px; + } +} From 7633b946ef59f48602386eee11c72cce7a3c1a2c Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Thu, 3 Mar 2022 13:46:44 +0800 Subject: [PATCH 04/29] =?UTF-8?q?=E5=AF=BC=E5=85=A5ddd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/communityService/sqzzz/index.vue | 65 ++++++++++++------- .../visual/communityParty/community.vue | 25 +++++-- 2 files changed, 63 insertions(+), 27 deletions(-) diff --git a/src/views/modules/communityService/sqzzz/index.vue b/src/views/modules/communityService/sqzzz/index.vue index c6e74ee5..0524e4f5 100644 --- a/src/views/modules/communityService/sqzzz/index.vue +++ b/src/views/modules/communityService/sqzzz/index.vue @@ -270,34 +270,53 @@ export default { } return fileType && isLt1M; }, - uploadHttpRequest(file) { + async uploadHttpRequest(file) { this.importLoading = true; this.importBtnTitle = "正在上传中..."; + this.$message({ + showClose: true, + message: '导入中,请到系统管理-导入记录中查看进度', + duration: 0 + }) const formData = new FormData(); //FormData对象,添加参数只能通过append('key', value)的形式添加 formData.append("file", file.file); //添加文件对象 - axios({ - url: - window.SITE_CONFIG["apiURL"] + - "/heart/iccommunityselforganization/importcommunityselforganization", - method: "post", - data: formData, - // responseType: "blob", - }) - .then((res) => { - this.importLoading = false; - this.importBtnTitle = "excel导入"; - console.log("resresresresresresres", res); - - this.getTableData(); - if (res.data.code == 0) { - return this.$message.success(res.data.data || "导入成功"); - } else { - return this.$message.error(res.data.msg); - } + await this.$http + .post('/heart/iccommunityselforganization/importcommunityselforganization', formData).then(res => { + console.log('res-up', res) + if (res.data.code == 0 && res.data.msg == 'success') { + this.$message.success('导入成功') + this.getTableData() + } else this.$message.error(res.data.msg) + }).catch(err => { + console.log('失败', err) + file.onError() //上传失败的文件会从文件列表中删除 + this.$message.error('导入失败') }) - .catch((err) => { - console.log("失败", err); - }); + // axios({ + // url: + // window.SITE_CONFIG["apiURL"] + + // "/heart/iccommunityselforganization/importcommunityselforganization", + // method: "post", + // data: formData, + // // responseType: "blob", + // }) + // .then((res) => { + // this.importLoading = false; + // this.importBtnTitle = "excel导入"; + // console.log("resresresresresresres", res); + + // this.getTableData(); + // if (res.data.code == 0) { + // return this.$message.success(res.data.data || "导入成功"); + // } else { + // return this.$message.error(res.data.msg); + // } + // }) + // .catch((err) => { + // console.log("失败", err); + // }); + this.importLoading = false + this.importBtnTitle = 'excel导入' this.$refs.upload.clearFiles(); }, diff --git a/src/views/modules/visual/communityParty/community.vue b/src/views/modules/visual/communityParty/community.vue index b550259b..1146ca2d 100644 --- a/src/views/modules/visual/communityParty/community.vue +++ b/src/views/modules/visual/communityParty/community.vue @@ -36,7 +36,8 @@ prefix-icon="el-icon-caret-bottom" value-format="yyyy-MM-dd HH:mm:ss" :clearable="false" - :default-time="['00:00:00', '23:59:59']"> + :default-time="['00:00:00', '23:59:59']" + @change="handleTimeChange">
@@ -121,6 +122,7 @@ diff --git a/src/views/modules/base/community/communityTable.vue b/src/views/modules/base/community/communityTable.vue index 6f79fe9f..574cc7f7 100644 --- a/src/views/modules/base/community/communityTable.vue +++ b/src/views/modules/base/community/communityTable.vue @@ -180,14 +180,15 @@ -
+
全选 删除 + @click="deleteBatch">批量删除
@@ -263,61 +264,7 @@ export default { ...mapGetters(['clientHeight']) }, methods: { - handleSelectAll (selectAllFlag) { - this.$refs.ref_table.clearSelection(); - if (selectAllFlag) { - this.tableData.forEach(row => { - this.$refs.ref_table.toggleRowSelection(row); - }); - } - }, - deleteBatch () { - if (this.selection.length > 0) { - this.$confirm("确认删除选择的小区?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }) - .then(() => { - this.deleteCommunityBatch() - }) - .catch(err => { - if (err == "cancel") { - // this.$message({ - // type: "info", - // message: "已取消删除" - // }); - } - }); - } else { - this.$message.warning('请先选择要删除的小区') - } - }, - selectAll (selection) { - this.selection = selection - - if (selection.length > 0) { - this.selAllFlag = true - } else { - this.selAllFlag = false - } - - }, - selectionChange (selection) { - this.selection = selection - - if (selection.length === this.tableData.length) { - this.selAllFlag = true - this.isIndeterminate = false - } else if (selection.length > 0) { - this.selAllFlag = false - this.isIndeterminate = true - } else { - this.selAllFlag = false - this.isIndeterminate = false - } - }, handleSearch () { this.loadTable() }, @@ -326,7 +273,7 @@ export default { if (fromTree) { this.agencyObj = treeObj } - console.log(this.agencyObj) + const url = "/gov/org/neighborhood/neighborhoodlist" let params = { @@ -391,6 +338,62 @@ export default { this.$emit('refreshTree') }, + handleSelectAll (selectAllFlag) { + this.$refs.ref_table.clearSelection(); + if (selectAllFlag) { + this.tableData.forEach(row => { + this.$refs.ref_table.toggleRowSelection(row); + }); + } + }, + deleteBatch () { + if (this.selection.length > 0) { + this.$confirm("确认删除选择的小区?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning" + }) + .then(() => { + this.deleteCommunityBatch() + }) + .catch(err => { + if (err == "cancel") { + // this.$message({ + // type: "info", + // message: "已取消删除" + // }); + } + + }); + } else { + this.$message.warning('请先选择要删除的小区') + } + }, + selectAll (selection) { + this.selection = selection + + if (selection.length > 0) { + this.selAllFlag = true + } else { + this.selAllFlag = false + } + + }, + selectionChange (selection) { + this.selection = selection + + if (selection.length === this.tableData.length) { + this.selAllFlag = true + this.isIndeterminate = false + } else if (selection.length > 0) { + this.selAllFlag = false + this.isIndeterminate = true + } else { + this.selAllFlag = false + this.isIndeterminate = false + } + }, + async handleDelete (row) { this.$confirm("确认删除?", "提示", { @@ -413,10 +416,18 @@ export default { }, async deleteCommunityBatch () { - const url = "/gov/org/neighborhood/neighborhooddel" + let ids = [] + console.log(this.selection) + this.selection.forEach(element => { + + ids.push(element.neighborHoodId) + }); + + const url = "/gov/org/house/delete" let params = { - neighborHoodId: row.neighborHoodId + type: 'neighborHood', + ids: ids } const { data, code, msg } = await requestPost(url, params) @@ -428,6 +439,13 @@ export default { }); this.$emit('refreshTree') this.loadTable() + } else if (code > 8000) { + // this.$message({ + // type: "success", + // message: msg + // }); + this.$emit('refreshTree') + this.loadTable() } else { this.$message.error(msg) } @@ -681,70 +699,5 @@ export default { diff --git a/src/views/modules/base/community/roomTable.vue b/src/views/modules/base/community/roomTable.vue index 21bd0f91..5c1b9180 100644 --- a/src/views/modules/base/community/roomTable.vue +++ b/src/views/modules/base/community/roomTable.vue @@ -64,12 +64,18 @@
- + style="width: 100%" + @select-all="selectAll" + @selection-change="selectionChange"> + + @@ -141,6 +147,18 @@ :total="total">
+ +
+ 全选 + 批量删除 +
+ @@ -175,6 +193,8 @@ export default { pageSize: 20, pageNo: 0, tableLoading: true, + selAllFlag: false, + isIndeterminate: false,//复选框的不确定状态 agencyObj: {},//树所选的小区对象 ownerName: '', @@ -274,6 +294,62 @@ export default { this.loadTable() }, + handleSelectAll (selectAllFlag) { + this.$refs.ref_table.clearSelection(); + if (selectAllFlag) { + this.tableData.forEach(row => { + this.$refs.ref_table.toggleRowSelection(row); + }); + } + }, + deleteBatch () { + if (this.selection.length > 0) { + this.$confirm("确认删除选择的房屋?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning" + }) + .then(() => { + this.deleteCommunityBatch() + }) + .catch(err => { + if (err == "cancel") { + // this.$message({ + // type: "info", + // message: "已取消删除" + // }); + } + + }); + } else { + this.$message.warning('请先选择要删除的房屋') + } + }, + selectAll (selection) { + this.selection = selection + + if (selection.length > 0) { + this.selAllFlag = true + } else { + this.selAllFlag = false + } + + }, + selectionChange (selection) { + this.selection = selection + + if (selection.length === this.tableData.length) { + this.selAllFlag = true + this.isIndeterminate = false + } else if (selection.length > 0) { + this.selAllFlag = false + this.isIndeterminate = true + } else { + this.selAllFlag = false + this.isIndeterminate = false + } + }, + async handleDelete (row) { this.$confirm("确认删除?", "提示", { @@ -297,6 +373,41 @@ export default { }, + async deleteCommunityBatch () { + let ids = [] + this.selection.forEach(element => { + + ids.push(element.houseId) + }); + + const url = "/gov/org/house/delete" + + let params = { + type: 'house', + ids: ids + } + + const { data, code, msg } = await requestPost(url, params) + + if (code === 0) { + this.$message({ + type: "success", + message: "删除成功" + }); + this.$emit('refreshTree') + this.loadTable() + } else if (code > 8000) { + // this.$message({ + // type: "success", + // message: msg + // }); + this.$emit('refreshTree') + this.loadTable() + } else { + this.$message.error(msg) + } + }, + async deleteRoom (row) { const url = "/gov/org/house/housedel" @@ -502,58 +613,5 @@ export default { diff --git a/src/views/modules/communityService/ninePlaces/inspect/inspectForm.vue b/src/views/modules/communityService/ninePlaces/inspect/inspectForm.vue index 83836816..480b36b8 100644 --- a/src/views/modules/communityService/ninePlaces/inspect/inspectForm.vue +++ b/src/views/modules/communityService/ninePlaces/inspect/inspectForm.vue @@ -18,6 +18,7 @@ placeholder="全部" clearable> @@ -33,6 +34,7 @@ placeholder="请选择" clearable> @@ -205,11 +207,26 @@ export default { this.endLoading() }, + //改变场所区域 + handleChangeGrid () { + this.formData.placeOrgId = '' + this.loadPlaces() + }, + + //改变场所类型 + handleChangeType () { + this.formData.placeOrgId = '' + this.loadPlaces() + }, + + //加载场所 async loadPlaces () { const url = '/gov/org/placeorg/getlist' let params = { + gridId: this.formData.gridId,//场所区域【网格Id】 + ninePlaceVal: this.formData.ninePlaceVal,//场所类型【九小场所Value值】 isPage: false } @@ -223,6 +240,7 @@ export default { } }, + //加载分队 async loadTeams () { const url = '/gov/org/placepatrolteam/getlist' From 791388c1ac89e2afda25193ef2bb4eaecee48496 Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Thu, 3 Mar 2022 15:16:47 +0800 Subject: [PATCH 06/29] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 76 ++++++++++++------------ src/views/modules/importRecord/index.vue | 2 +- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index e278ad84..e138f4ec 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -282,44 +282,44 @@ router.beforeEach((to, from, next) => { url: "visual/heart/index", children: [], }, - // { - // icon: "icon-setting", - // id: "44rq22222q2222", - // name: "AI安防", - // // url: "visual/basicinfo/basicInfoMain", - // children: [ - // { - // url: "/visual/ai/index", - // name: "AI安防", - // id: "5feawfwa111111efwa57", - // }, - // { - // url: "/visual/ai/renliu", - // name: "人流数据", - // id: "5fwaefwae222112fawef58", - // }, - // { - // url: "/visual/ai/cheliu", - // name: "车流数据", - // id: "erawerwecsxefwaw", - // }, - // { - // url: "/visual/ai/shebei", - // name: "设备数据", - // id: "zfzffewaf", - // }, - // { - // url: "/visual/ai/gongdan", - // name: "工单数据", - // id: "fewafwafewaefddd", - // }, - // { - // url: "/visual/ai/yujing", - // name: "预警事件", - // id: "545345fdsfs", - // }, - // ], - // }, + { + icon: "icon-setting", + id: "44rq22222q2222", + name: "AI安防", + // url: "visual/basicinfo/basicInfoMain", + children: [ + { + url: "/visual/ai/index", + name: "AI安防", + id: "5feawfwa111111efwa57", + }, + { + url: "/visual/ai/renliu", + name: "人流数据", + id: "5fwaefwae222112fawef58", + }, + { + url: "/visual/ai/cheliu", + name: "车流数据", + id: "erawerwecsxefwaw", + }, + { + url: "/visual/ai/shebei", + name: "设备数据", + id: "zfzffewaf", + }, + { + url: "/visual/ai/gongdan", + name: "工单数据", + id: "fewafwafewaefddd", + }, + { + url: "/visual/ai/yujing", + name: "预警事件", + id: "545345fdsfs", + }, + ], + }, ]; fnAddDynamicMenuRoutes2(window.SITE_CONFIG["menuShujuList"]); diff --git a/src/views/modules/importRecord/index.vue b/src/views/modules/importRecord/index.vue index 1796ece1..1198e63a 100644 --- a/src/views/modules/importRecord/index.vue +++ b/src/views/modules/importRecord/index.vue @@ -22,7 +22,7 @@ >导入中 已完成 Date: Thu, 3 Mar 2022 15:54:38 +0800 Subject: [PATCH 07/29] dd --- src/views/modules/communityParty/elegant/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/modules/communityParty/elegant/index.vue b/src/views/modules/communityParty/elegant/index.vue index 592cbeb1..3d8d394f 100644 --- a/src/views/modules/communityParty/elegant/index.vue +++ b/src/views/modules/communityParty/elegant/index.vue @@ -226,7 +226,7 @@ export default { data() { return { uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadqrcodeV2', - importBtnTitle: '导入人员数据', + importBtnTitle: '导入数据', importLoading: false, exportBtn: false, exportBtnTitle: '导出', @@ -424,7 +424,7 @@ export default { // this.$message.error('导入失败') // }) this.importLoading = false - this.importBtnTitle = '导入人员数据' + this.importBtnTitle = '导入数据' this.$refs.upload.clearFiles() }, async handleExport() { From 41d58b9ac5b8b5a71b9999607d93a3086d07812b Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Fri, 4 Mar 2022 09:28:51 +0800 Subject: [PATCH 08/29] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E4=BC=98=E5=8C=963?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/importRecord/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/modules/importRecord/index.vue b/src/views/modules/importRecord/index.vue index 1198e63a..c77d1cf5 100644 --- a/src/views/modules/importRecord/index.vue +++ b/src/views/modules/importRecord/index.vue @@ -85,7 +85,7 @@ export default { }, computed: { maxTableHeight() { - return this.clientHeight - 450; + return this.clientHeight - 300; }, ...mapGetters(["clientHeight"]), }, From 07eb9d0333e30c0c7807a0e03d477bc85c5333f6 Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Fri, 4 Mar 2022 09:51:43 +0800 Subject: [PATCH 09/29] dd --- src/views/modules/base/resi.vue | 4 ++-- src/views/modules/communityParty/elegant/index.vue | 4 ++-- src/views/modules/communityService/sqzzz/index.vue | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/views/modules/base/resi.vue b/src/views/modules/base/resi.vue index b062a50a..0c86748f 100644 --- a/src/views/modules/base/resi.vue +++ b/src/views/modules/base/resi.vue @@ -542,13 +542,13 @@ export default { .post('/epmetuser/icresiuser/importExcel', formData).then(res => { console.log('res-up', res) if (res.data.code == 0 && res.data.msg == 'success') { - this.$message.success('导入成功') + // this.$message.success('导入成功') this.getTableData() } else this.$message.error(res.data.msg) }).catch(err => { console.log('失败', err) file.onError() //上传失败的文件会从文件列表中删除 - this.$message.error('导入失败') + // this.$message.error('导入失败') }) // await axios({ // url: window.SITE_CONFIG['apiURL'] + '/epmetuser/icresiuser/importExcel', diff --git a/src/views/modules/communityParty/elegant/index.vue b/src/views/modules/communityParty/elegant/index.vue index 3d8d394f..5095431e 100644 --- a/src/views/modules/communityParty/elegant/index.vue +++ b/src/views/modules/communityParty/elegant/index.vue @@ -385,7 +385,7 @@ export default { .post('/resi/partymember/icpartymemberstyle/import', formData).then(res => { console.log('res-up', res) if (res.data.code == 0 && res.data.msg == 'success') { - this.$message.success('导入成功') + // this.$message.success('导入成功') this.getTableData() } else { this.$message.error(res.data.msg) @@ -393,7 +393,7 @@ export default { }).catch(err => { console.log('失败', err) file.onError() //上传失败的文件会从文件列表中删除 - this.$message.error('导入失败') + // this.$message.error('导入失败') }) // await axios({ // url: window.SITE_CONFIG['apiURL'] + '/resi/partymember/icpartymemberstyle/import', diff --git a/src/views/modules/communityService/sqzzz/index.vue b/src/views/modules/communityService/sqzzz/index.vue index 0524e4f5..c64bb3b1 100644 --- a/src/views/modules/communityService/sqzzz/index.vue +++ b/src/views/modules/communityService/sqzzz/index.vue @@ -284,13 +284,13 @@ export default { .post('/heart/iccommunityselforganization/importcommunityselforganization', formData).then(res => { console.log('res-up', res) if (res.data.code == 0 && res.data.msg == 'success') { - this.$message.success('导入成功') + // this.$message.success('导入成功') this.getTableData() } else this.$message.error(res.data.msg) }).catch(err => { console.log('失败', err) file.onError() //上传失败的文件会从文件列表中删除 - this.$message.error('导入失败') + // this.$message.error('导入失败') }) // axios({ // url: From 8c83da3c4eb6cb6ebafe7f148e26a30f8b01e15f Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Fri, 4 Mar 2022 10:06:43 +0800 Subject: [PATCH 10/29] dd --- src/views/modules/visual/communityParty/community.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/modules/visual/communityParty/community.vue b/src/views/modules/visual/communityParty/community.vue index 1146ca2d..a9d7e3a5 100644 --- a/src/views/modules/visual/communityParty/community.vue +++ b/src/views/modules/visual/communityParty/community.vue @@ -436,9 +436,9 @@ export default { const start = new Date(); start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); console.log('time-rtt', this.timeFormat(start), this.timeFormat(end)) - this.timeRange = [this.timeFormat(start), this.timeFormat(end)] + this.timeRange = [this.timeFormat(start, '00:00:00'), this.timeFormat(end, '23:59:59')] }, - timeFormat (date) { + timeFormat (date, h) { if (!date || typeof date === 'string') { return false } @@ -448,7 +448,7 @@ export default { var d = date.getDate() //日 if (d < 10) d = '0' + d - return y + '-' + m + '-' + d + ' 00:00:00' + return y + '-' + m + '-' + d + ' ' + h }, async loadUnit () { const url = "/heart/serviceitem/dict-list" From 714c80b8c2051973ae745d5780f74dfd1d85903a Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Fri, 4 Mar 2022 10:31:18 +0800 Subject: [PATCH 11/29] dd --- src/views/modules/base/resi.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/views/modules/base/resi.vue b/src/views/modules/base/resi.vue index 0c86748f..dcdb3760 100644 --- a/src/views/modules/base/resi.vue +++ b/src/views/modules/base/resi.vue @@ -94,8 +94,9 @@
全选 - 删除 @@ -370,6 +371,10 @@ export default { } }, handleSelectAll (selectAllFlag) { + // if (this.tableData.length == 0) { + // this.selAllFlag = false + // return + // } this.$refs.ref_table.clearSelection(); if (selectAllFlag) { this.tableData.forEach(row => { @@ -407,7 +412,7 @@ export default { }); } else { - this.$message.warning('请先选择要删除的小区') + this.$message.warning('请先选择要删除的居民') } }, handleSizeChange (val) { From 87ea87d2bbc97bc1ee4b18ef5d100bda2870bc30 Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Fri, 4 Mar 2022 10:32:52 +0800 Subject: [PATCH 12/29] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E4=BC=98=E5=8C=964?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/importRecord/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/modules/importRecord/index.vue b/src/views/modules/importRecord/index.vue index c77d1cf5..bd98184c 100644 --- a/src/views/modules/importRecord/index.vue +++ b/src/views/modules/importRecord/index.vue @@ -33,7 +33,7 @@ > 导入失败导入失败,未知错误 From 1d05ab6b15d2eb2e898dec0b0236dc18f61ee185 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Fri, 4 Mar 2022 14:23:27 +0800 Subject: [PATCH 13/29] =?UTF-8?q?=E9=94=99=E8=AF=AF=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/dai/request.js | 10 ++++++++-- src/views/modules/base/community/communityTable.vue | 7 ++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/js/dai/request.js b/src/js/dai/request.js index 80d8118e..c248f009 100644 --- a/src/js/dai/request.js +++ b/src/js/dai/request.js @@ -2,8 +2,9 @@ | 请求接口封装 | ---------------------------------------------------------------*/ import axios from "axios"; -import message from "dai-js/modules/message/message"; +// import message from "dai-js/modules/message/message"; import curry from "dai-js/tools/curry"; +import { Message } from "element-ui"; const request = curry( (method, url, data = {}, headers = {}, progress = () => {}) => { @@ -36,7 +37,12 @@ const request = curry( // retData = Vue.$afterRequestHook(retData); // } if (res.data.code > 8000 && res.data.code < 10000) { - message.error(res.data.msg); + // message.error(res.data.msg); + Message({ + showClose: true, + message: res.data.msg, + duration: 0 + }) } reslove(retData); diff --git a/src/views/modules/base/community/communityTable.vue b/src/views/modules/base/community/communityTable.vue index 574cc7f7..61834588 100644 --- a/src/views/modules/base/community/communityTable.vue +++ b/src/views/modules/base/community/communityTable.vue @@ -441,9 +441,10 @@ export default { this.loadTable() } else if (code > 8000) { // this.$message({ - // type: "success", - // message: msg - // }); + // showClose: true, + // message: msg, + // duration: 0 + // }) this.$emit('refreshTree') this.loadTable() } else { From d48f05ab04d7bc92fabeff894297df184e0a506b Mon Sep 17 00:00:00 2001 From: jiangyy Date: Fri, 4 Mar 2022 16:12:13 +0800 Subject: [PATCH 14/29] =?UTF-8?q?=E5=90=88=E5=B9=B6=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/dai/request.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/js/dai/request.js b/src/js/dai/request.js index e4071ff4..41864aea 100644 --- a/src/js/dai/request.js +++ b/src/js/dai/request.js @@ -2,12 +2,8 @@ | 请求接口封装 | ---------------------------------------------------------------*/ import axios from "axios"; -<<<<<<< HEAD -// import message from "dai-js/modules/message/message"; -======= import message from "dai-js/modules/message/message"; import { Message } from "element-ui"; ->>>>>>> dev-20220218 import curry from "dai-js/tools/curry"; import { Message } from "element-ui"; From 9beeef992b35ae88ac948a41cf7c12c8d2a30192 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Fri, 4 Mar 2022 16:12:31 +0800 Subject: [PATCH 15/29] =?UTF-8?q?=E5=90=88=E5=B9=B6=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/dai/request.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/js/dai/request.js b/src/js/dai/request.js index e4071ff4..41864aea 100644 --- a/src/js/dai/request.js +++ b/src/js/dai/request.js @@ -2,12 +2,8 @@ | 请求接口封装 | ---------------------------------------------------------------*/ import axios from "axios"; -<<<<<<< HEAD -// import message from "dai-js/modules/message/message"; -======= import message from "dai-js/modules/message/message"; import { Message } from "element-ui"; ->>>>>>> dev-20220218 import curry from "dai-js/tools/curry"; import { Message } from "element-ui"; From 46d604ac8bcc6f46054143d762d674ea5df060f0 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Fri, 4 Mar 2022 16:17:43 +0800 Subject: [PATCH 16/29] 11 --- src/js/dai/request.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/js/dai/request.js b/src/js/dai/request.js index 41864aea..93b51680 100644 --- a/src/js/dai/request.js +++ b/src/js/dai/request.js @@ -2,8 +2,6 @@ | 请求接口封装 | ---------------------------------------------------------------*/ import axios from "axios"; -import message from "dai-js/modules/message/message"; -import { Message } from "element-ui"; import curry from "dai-js/tools/curry"; import { Message } from "element-ui"; From 11f80487defa4f6e8835947f8a2cda913a2912c9 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Fri, 4 Mar 2022 16:22:26 +0800 Subject: [PATCH 17/29] 111 --- src/js/dai/request.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/js/dai/request.js b/src/js/dai/request.js index 41864aea..0d62217a 100644 --- a/src/js/dai/request.js +++ b/src/js/dai/request.js @@ -2,8 +2,7 @@ | 请求接口封装 | ---------------------------------------------------------------*/ import axios from "axios"; -import message from "dai-js/modules/message/message"; -import { Message } from "element-ui"; + import curry from "dai-js/tools/curry"; import { Message } from "element-ui"; From b8802c7ef2efcec8d7a22e3e3adeb8ec1f4fbf27 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Fri, 4 Mar 2022 16:31:05 +0800 Subject: [PATCH 18/29] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=AF=BC=E5=85=A5=E6=88=90=E5=8A=9F=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/base/community/buildTable.vue | 2 +- src/views/modules/base/community/communityTable.vue | 2 +- src/views/modules/base/community/roomTable.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/modules/base/community/buildTable.vue b/src/views/modules/base/community/buildTable.vue index 86049103..9066cd7d 100644 --- a/src/views/modules/base/community/buildTable.vue +++ b/src/views/modules/base/community/buildTable.vue @@ -588,7 +588,7 @@ export default { (data, rspMsg) => { if (data.code === 0 && data.msg == 'success') { - this.$message.success('导入成功') + // this.$message.success('导入成功') } else { this.$message({ showClose: true, diff --git a/src/views/modules/base/community/communityTable.vue b/src/views/modules/base/community/communityTable.vue index bcbc2023..e4e504cb 100644 --- a/src/views/modules/base/community/communityTable.vue +++ b/src/views/modules/base/community/communityTable.vue @@ -622,7 +622,7 @@ export default { (data, rspMsg) => { if (data.code === 0 && data.msg == 'success') { - this.$message.success('导入成功') + // this.$message.success('导入成功') } else { this.$message({ showClose: true, diff --git a/src/views/modules/base/community/roomTable.vue b/src/views/modules/base/community/roomTable.vue index 7dc64508..d17e7a9b 100644 --- a/src/views/modules/base/community/roomTable.vue +++ b/src/views/modules/base/community/roomTable.vue @@ -551,7 +551,7 @@ export default { (data, rspMsg) => { if (data.code === 0 && data.msg == 'success') { - this.$message.success('导入成功') + // this.$message.success('导入成功') } else { this.$message({ showClose: true, From aa9747c1d676abb72bedc5ab90dc48360a6da4d2 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Fri, 4 Mar 2022 16:32:16 +0800 Subject: [PATCH 19/29] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=88=90=E5=8A=9F=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/base/community/buildTable.vue | 2 +- src/views/modules/base/community/communityTable.vue | 2 +- src/views/modules/base/community/roomTable.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/modules/base/community/buildTable.vue b/src/views/modules/base/community/buildTable.vue index 86049103..9066cd7d 100644 --- a/src/views/modules/base/community/buildTable.vue +++ b/src/views/modules/base/community/buildTable.vue @@ -588,7 +588,7 @@ export default { (data, rspMsg) => { if (data.code === 0 && data.msg == 'success') { - this.$message.success('导入成功') + // this.$message.success('导入成功') } else { this.$message({ showClose: true, diff --git a/src/views/modules/base/community/communityTable.vue b/src/views/modules/base/community/communityTable.vue index bcbc2023..e4e504cb 100644 --- a/src/views/modules/base/community/communityTable.vue +++ b/src/views/modules/base/community/communityTable.vue @@ -622,7 +622,7 @@ export default { (data, rspMsg) => { if (data.code === 0 && data.msg == 'success') { - this.$message.success('导入成功') + // this.$message.success('导入成功') } else { this.$message({ showClose: true, diff --git a/src/views/modules/base/community/roomTable.vue b/src/views/modules/base/community/roomTable.vue index 7dc64508..d17e7a9b 100644 --- a/src/views/modules/base/community/roomTable.vue +++ b/src/views/modules/base/community/roomTable.vue @@ -551,7 +551,7 @@ export default { (data, rspMsg) => { if (data.code === 0 && data.msg == 'success') { - this.$message.success('导入成功') + // this.$message.success('导入成功') } else { this.$message({ showClose: true, From 78fd9a53b246d8419174716c8ae79056f064933d Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Mon, 7 Mar 2022 14:38:38 +0800 Subject: [PATCH 20/29] =?UTF-8?q?=E5=85=9A=E5=91=98=E9=A3=8E=E9=87=87?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/workSys/elegantCate.vue | 286 ++++++++++++++++++++++ src/views/modules/workSys/elegantEdit.vue | 169 +++++++++++++ 2 files changed, 455 insertions(+) create mode 100644 src/views/modules/workSys/elegantCate.vue create mode 100644 src/views/modules/workSys/elegantEdit.vue diff --git a/src/views/modules/workSys/elegantCate.vue b/src/views/modules/workSys/elegantCate.vue new file mode 100644 index 00000000..8dfa0a9b --- /dev/null +++ b/src/views/modules/workSys/elegantCate.vue @@ -0,0 +1,286 @@ + + + + + diff --git a/src/views/modules/workSys/elegantEdit.vue b/src/views/modules/workSys/elegantEdit.vue new file mode 100644 index 00000000..356bdee7 --- /dev/null +++ b/src/views/modules/workSys/elegantEdit.vue @@ -0,0 +1,169 @@ + + + + + From 16f9572a9cc86582d5f021cb15055a80594c8e8c Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Mon, 7 Mar 2022 15:10:02 +0800 Subject: [PATCH 21/29] ddd --- src/js/dai/request.js | 7 +- src/js/dai/request2.js | 90 ++++++++++++++++++++++++ src/views/modules/importRecord/index.vue | 2 +- 3 files changed, 92 insertions(+), 7 deletions(-) create mode 100644 src/js/dai/request2.js diff --git a/src/js/dai/request.js b/src/js/dai/request.js index 93b51680..8365bd3e 100644 --- a/src/js/dai/request.js +++ b/src/js/dai/request.js @@ -36,12 +36,7 @@ const request = curry( // retData = Vue.$afterRequestHook(retData); // } if (res.data.code > 8000 && res.data.code < 10000) { - // message.error(res.data.msg); - Message({ - showClose: true, - message: res.data.msg, - duration: 0 - }) + // Message.error(res.data.msg); } reslove(retData); diff --git a/src/js/dai/request2.js b/src/js/dai/request2.js new file mode 100644 index 00000000..8c38025d --- /dev/null +++ b/src/js/dai/request2.js @@ -0,0 +1,90 @@ +/*--------------------------------------------------------------- + | 请求接口封装 | + ---------------------------------------------------------------*/ +import axios from "axios"; +import curry from "dai-js/tools/curry"; +import { Message } from "element-ui"; + +const request = curry( + (method, url, data = {}, headers = {}, progress = () => {}) => { + return new Promise((reslove) => { + let returnIniData = { + httpCode: "", + data: {}, + msg: "", + code: "", + }; + + // 添加服务器端URL + function processUrl(url) { + if (url.indexOf("http://") > -1 || url.indexOf("https://") > -1) { + return url; + } + return process.env.VUE_APP_API_SERVER + url; + } + + url = processUrl(url); + + const succFn = (res) => { + // log(`[request成功] ${url}`, data, res); + let retData = { + ...returnIniData, + ...res.data, + httpCode: res.statusCode, + }; + // if(typeof Vue.$afterRequestHook == 'function'){ + // retData = Vue.$afterRequestHook(retData); + // } + if (res.data.code > 8000 && res.data.code < 10000) { + Message.error(res.data.msg); + } + + reslove(retData); + }; + + const failFn = (err) => { + // log(`[request失败] ${url}`, data, err); + + reslove( + Object.assign({}, returnIniData, { + httpCode: "9999", //访问出现意外 + msg: "网络错误", + }) + ); + }; + + if (method.toUpperCase() == "POST") { + axios + .post(url, data, { + headers, + responseType: "json", + // progress, + // credentials: false, + }) + .then(succFn) + .catch(failFn); + } else { + axios + .get(url, { + params: data, + headers, + responseType: "json", + // credentials: true, + }) + .then(succFn) + .catch(failFn); + } + }); + } +); + +export const requestGet = request("get"); + +export const requestPost = request("post"); + +export default { + install(Vue) { + Vue.prototype.$requestGet = requestGet; + Vue.prototype.$requestPost = requestPost; + }, +}; diff --git a/src/views/modules/importRecord/index.vue b/src/views/modules/importRecord/index.vue index bd98184c..978ab1d3 100644 --- a/src/views/modules/importRecord/index.vue +++ b/src/views/modules/importRecord/index.vue @@ -55,7 +55,7 @@ diff --git a/src/views/modules/base/community/community.vue b/src/views/modules/base/community/community.vue index 1c15672c..8ae143d3 100644 --- a/src/views/modules/base/community/community.vue +++ b/src/views/modules/base/community/community.vue @@ -29,13 +29,16 @@ @@ -67,7 +70,8 @@ export default { selTreeObj: {}, - centerPoint: [] + centerPoint: [], + staffAgencyId: localStorage.getItem("agencyId") } }, @@ -78,6 +82,7 @@ export default { this.treeLoading = true await this.loadOrgData() await this.loadTree() + await this.$refs['ref_communityTable'].loadTable(true, this.selTreeObj) if (this.treeData.length > 0) { this.$nextTick(() => { @@ -276,8 +281,8 @@ export default { .div_table { margin-left: 15px; - flex: 1; - // width: calc(100vw - 550px); + // flex: 1; + width: calc(100vw - 550px); background-color: #ffffff; border-radius: 5px; padding: 10px; diff --git a/src/views/modules/base/community/communityTable.vue b/src/views/modules/base/community/communityTable.vue index 8566f09b..c4678931 100644 --- a/src/views/modules/base/community/communityTable.vue +++ b/src/views/modules/base/community/communityTable.vue @@ -42,7 +42,7 @@ icon="el-icon-plus" @click="handleAdd">新增小区
+ v-if="showImportBtn"> 查看 - 修改 - 删除 @@ -229,6 +231,7 @@ export default { tableLoading: true, selAllFlag: false, isIndeterminate: false,//复选框的不确定状态 + showImportBtn: false,//是否显示操作按钮,根据登录人所属组织判断 agencyObj: {},//树所选的组织对象 ownerName: '', @@ -236,6 +239,7 @@ export default { tableData: [], selection: [], + //form相关 formShow: false, formTitle: '新增小区', @@ -254,7 +258,6 @@ export default { }, computed: { tableHeight () { - return (this.clientHeight - 300) }, @@ -269,9 +272,26 @@ export default { this.loadTable() }, async loadTable (fromTree, treeObj) { + console.log(111, this.staffAgencyId) + this.tableLoading = true if (fromTree) { this.agencyObj = treeObj + if (this.agencyObj.level === 'community') {//只有社区和网格显示操作按钮 + if (this.agencyObj.id === this.staffAgencyId) {//如果所选树的组织id和登录人员id相同,有权限 + this.showImportBtn = true + } else { + this.showImportBtn = false + } + } else if (this.agencyObj.level === 'grid') {//网格下 + if (this.agencyObj.pid === this.staffAgencyId) {//如果所选树的父级组织id和登录人员id相同,有权限 + this.showImportBtn = true + } else { + this.showImportBtn = false + } + } else { + this.showImportBtn = false + } } const url = "/gov/org/neighborhood/neighborhoodlist" @@ -289,6 +309,14 @@ export default { if (code === 0) { this.total = data.total + data.forEach(item => { + if (item.agencyId === this.staffAgencyId) { + item.showBtn = true + } else { + item.showBtn = false + } + + }); this.tableData = data.list } else { this.$message.error(msg) @@ -702,7 +730,10 @@ export default { } }, props: { - + staffAgencyId: { + type: String, + default: '', + }, } } diff --git a/src/views/modules/base/community/roomTable.vue b/src/views/modules/base/community/roomTable.vue index 5b3b80fc..25b60b18 100644 --- a/src/views/modules/base/community/roomTable.vue +++ b/src/views/modules/base/community/roomTable.vue @@ -615,7 +615,10 @@ export default { } }, props: { - + staffAgencyId: { + type: String, + default: '', + }, } } From dfb9c7b86ad10c76327b8ead7ed4bafbaeda984c Mon Sep 17 00:00:00 2001 From: jiangyy Date: Mon, 7 Mar 2022 17:27:25 +0800 Subject: [PATCH 24/29] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=8C=89=E9=92=AE=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/base/community/buildTable.vue | 110 +++++++++++------- .../modules/base/community/communityTable.vue | 6 +- .../modules/base/community/roomTable.vue | 30 ++++- 3 files changed, 100 insertions(+), 46 deletions(-) diff --git a/src/views/modules/base/community/buildTable.vue b/src/views/modules/base/community/buildTable.vue index a93ae623..59ee9190 100644 --- a/src/views/modules/base/community/buildTable.vue +++ b/src/views/modules/base/community/buildTable.vue @@ -41,47 +41,49 @@ size="small" icon="el-icon-plus" @click="handleAdd">新增楼宇 - - 下载楼宇模板 - - - + 导入楼宇数据 - - 下载房屋模板 - - - 下载楼宇模板 + + + 导入楼宇数据 + + 导入房屋数据 - + icon="el-icon-download" + @click="handleExportModule('room')">下载房屋模板 + + + 导入房屋数据 + +
@@ -134,12 +136,14 @@ style="color:#1C6AFD;text-decoration: underline;" size="small" @click="handleDetail(scope.row)">查看 - 修改 - 删除 @@ -206,6 +210,7 @@ export default { tableLoading: true, selAllFlag: false, isIndeterminate: false,//复选框的不确定状态 + showImportBtn: false,//是否显示操作按钮,根据登录人所属组织判断 agencyObj: {},//树所选的小区对象 ownerName: '', @@ -243,6 +248,21 @@ export default { this.tableLoading = true if (fromTree) { this.agencyObj = treeObj + if (this.agencyObj.level === 'community') {//只有社区和网格显示操作按钮 + if (this.agencyObj.id === this.staffAgencyId) {//如果所选树的组织id和登录人员id相同,有权限 + this.showImportBtn = true + } else { + this.showImportBtn = false + } + } else if (this.agencyObj.level === 'grid') {//网格下 + if (this.agencyObj.pid === this.staffAgencyId) {//如果所选树的父级组织id和登录人员id相同,有权限 + this.showImportBtn = true + } else { + this.showImportBtn = false + } + } else { + this.showImportBtn = false + } } console.log(this.agencyObj) const url = "/gov/org/building/buildinglist" @@ -258,6 +278,14 @@ export default { if (code === 0) { this.total = data.total + data.list.forEach(item => { + if (item.agencyId === this.staffAgencyId) { + item.showBtn = true + } else { + item.showBtn = false + } + + }); this.tableData = data.list } else { this.$message.error(msg) diff --git a/src/views/modules/base/community/communityTable.vue b/src/views/modules/base/community/communityTable.vue index c4678931..00dede49 100644 --- a/src/views/modules/base/community/communityTable.vue +++ b/src/views/modules/base/community/communityTable.vue @@ -157,13 +157,13 @@ style="color:#1C6AFD;text-decoration: underline;" size="small" @click="handleDetail(scope.row)">查看 - 修改 - { + data.list.forEach(item => { if (item.agencyId === this.staffAgencyId) { item.showBtn = true } else { diff --git a/src/views/modules/base/community/roomTable.vue b/src/views/modules/base/community/roomTable.vue index 25b60b18..75140abe 100644 --- a/src/views/modules/base/community/roomTable.vue +++ b/src/views/modules/base/community/roomTable.vue @@ -125,12 +125,14 @@ style="color:#1C6AFD;text-decoration: underline;" size="small" @click="handleDetail(scope.row)">查看 - 修改 - 删除 @@ -195,6 +197,7 @@ export default { tableLoading: true, selAllFlag: false, isIndeterminate: false,//复选框的不确定状态 + showImportBtn: false,//是否显示操作按钮,根据登录人所属组织判断 agencyObj: {},//树所选的小区对象 ownerName: '', @@ -234,6 +237,21 @@ export default { this.tableLoading = true if (fromTree) { this.agencyObj = treeObj + if (this.agencyObj.level === 'community') {//只有社区和网格显示操作按钮 + if (this.agencyObj.id === this.staffAgencyId) {//如果所选树的组织id和登录人员id相同,有权限 + this.showImportBtn = true + } else { + this.showImportBtn = false + } + } else if (this.agencyObj.level === 'grid') {//网格下 + if (this.agencyObj.pid === this.staffAgencyId) {//如果所选树的父级组织id和登录人员id相同,有权限 + this.showImportBtn = true + } else { + this.showImportBtn = false + } + } else { + this.showImportBtn = false + } } const url = "/gov/org/house/houselist" @@ -250,6 +268,14 @@ export default { if (code === 0) { this.total = data.total + data.list.forEach(item => { + if (item.agencyId === this.staffAgencyId) { + item.showBtn = true + } else { + item.showBtn = false + } + + }); this.tableData = data.list } else { this.$message.error(msg) From 19e390bee62bfe9816696fb0a9d4b170c8f4d083 Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Tue, 8 Mar 2022 17:28:38 +0800 Subject: [PATCH 25/29] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/router/index.js b/src/router/index.js index e138f4ec..75966340 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -375,7 +375,7 @@ function fnAddDynamicMenuRoutes(menuList = [], routes = []) { for (var i = 0; i < menuList.length; i++) { if (menuList[i].children && menuList[i].children.length >= 1) { temp = temp.concat(menuList[i].children); - continue; + // continue; } // 组装路由 var route = { From 2f467d4df8e8a8ecb51a3453133c8c392466c93d Mon Sep 17 00:00:00 2001 From: jiangyy Date: Wed, 9 Mar 2022 09:26:24 +0800 Subject: [PATCH 26/29] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=A2=9E=E5=8A=A0=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/base/community/buildTable.vue | 39 ++++----- .../modules/base/community/community.vue | 31 +++++-- .../modules/base/community/communityTable.vue | 11 +-- .../modules/base/community/roomTable.vue | 86 ++++++++++--------- 4 files changed, 98 insertions(+), 69 deletions(-) diff --git a/src/views/modules/base/community/buildTable.vue b/src/views/modules/base/community/buildTable.vue index 59ee9190..fdc6d0ef 100644 --- a/src/views/modules/base/community/buildTable.vue +++ b/src/views/modules/base/community/buildTable.vue @@ -210,7 +210,7 @@ export default { tableLoading: true, selAllFlag: false, isIndeterminate: false,//复选框的不确定状态 - showImportBtn: false,//是否显示操作按钮,根据登录人所属组织判断 + // showImportBtn: false,//是否显示操作按钮,根据登录人所属组织判断 agencyObj: {},//树所选的小区对象 ownerName: '', @@ -247,23 +247,17 @@ export default { async loadTable (fromTree, treeObj) { this.tableLoading = true if (fromTree) { + this.agencyObj = treeObj - if (this.agencyObj.level === 'community') {//只有社区和网格显示操作按钮 - if (this.agencyObj.id === this.staffAgencyId) {//如果所选树的组织id和登录人员id相同,有权限 - this.showImportBtn = true - } else { - this.showImportBtn = false - } - } else if (this.agencyObj.level === 'grid') {//网格下 - if (this.agencyObj.pid === this.staffAgencyId) {//如果所选树的父级组织id和登录人员id相同,有权限 - this.showImportBtn = true - } else { - this.showImportBtn = false - } - } else { - this.showImportBtn = false - } + + // if (this.agencyObj.pid === this.staffAgencyId) {//如果所选树的父级组织id和登录人员id相同,有权限 + // this.showImportBtn = true + // } else { + // this.showImportBtn = false + // } } + + console.log(this.agencyObj) const url = "/gov/org/building/buildinglist" let params = { @@ -438,10 +432,11 @@ export default { this.$emit('refreshTree') this.loadTable() } else if (code > 8000) { - // this.$message({ - // type: "success", - // message: msg - // }); + this.$message({ + showClose: true, + message: msg, + duration: 0 + }) this.$emit('refreshTree') this.loadTable() } else { @@ -692,6 +687,10 @@ export default { type: String, default: '', }, + showImportBtn: { + type: Boolean, + default: false, + }, } } diff --git a/src/views/modules/base/community/community.vue b/src/views/modules/base/community/community.vue index 8ae143d3..2800a96b 100644 --- a/src/views/modules/base/community/community.vue +++ b/src/views/modules/base/community/community.vue @@ -30,10 +30,12 @@ { + + + if (obj.level === 'building') {//点击楼栋 this.$refs['ref_buildingTable'].loadTable(true, this.selTreeObj) @@ -201,18 +209,31 @@ export default { // 小区:小区id、小区名称、type、所属网格id、所属网格名称、所属组织id、所属组织名称、经度、纬度 // 楼:楼id、楼名称、type、所属小区id、所属小区名称 if (obj.level === 'building') {//点击楼栋 - let communityNode = this.$refs.ref_tree.getNode(obj.pid) - obj.communityId = communityNode.data.id - obj.communityName = communityNode.data.label + let neighborHoodNode = this.$refs.ref_tree.getNode(obj.pid)//所属小区 - } else if (obj.level === 'neighborHood') {//点击小区 + let gridNode = this.$refs.ref_tree.getNode(neighborHoodNode.data.pid)//所属网格 + let agencyNode = this.$refs.ref_tree.getNode(gridNode.data.pid)//所属社区 + obj.agencyId = agencyNode.data.id + obj.agencyName = agencyNode.data.label + if (obj.agencyId === this.staffAgencyId) { + this.showImportBtn = true + } else { + this.showImportBtn = false + } + } else if (obj.level === 'neighborHood') {//点击小区 let gridNode = this.$refs.ref_tree.getNode(obj.pid) let agencyNode = this.$refs.ref_tree.getNode(gridNode.data.pid) obj.gridId = gridNode.data.id obj.gridName = gridNode.data.label obj.agencyId = agencyNode.data.id obj.agencyName = agencyNode.data.label + if (obj.agencyId === this.staffAgencyId) { + this.showImportBtn = true + } else { + this.showImportBtn = false + } + } else { } diff --git a/src/views/modules/base/community/communityTable.vue b/src/views/modules/base/community/communityTable.vue index 00dede49..491288f0 100644 --- a/src/views/modules/base/community/communityTable.vue +++ b/src/views/modules/base/community/communityTable.vue @@ -468,11 +468,11 @@ export default { this.$emit('refreshTree') this.loadTable() } else if (code > 8000) { - // this.$message({ - // showClose: true, - // message: msg, - // duration: 0 - // }) + this.$message({ + showClose: true, + message: msg, + duration: 0 + }) this.$emit('refreshTree') this.loadTable() } else { @@ -734,6 +734,7 @@ export default { type: String, default: '', }, + } } diff --git a/src/views/modules/base/community/roomTable.vue b/src/views/modules/base/community/roomTable.vue index 75140abe..1de9a574 100644 --- a/src/views/modules/base/community/roomTable.vue +++ b/src/views/modules/base/community/roomTable.vue @@ -41,26 +41,29 @@ icon="el-icon-plus" size="small" @click="handleAdd">新增房屋 - 下载房屋模板 - - + 导入房屋数据 - + icon="el-icon-download" + @click="handleExportModule">下载房屋模板 + + 导入房屋数据 + +
@@ -197,7 +200,7 @@ export default { tableLoading: true, selAllFlag: false, isIndeterminate: false,//复选框的不确定状态 - showImportBtn: false,//是否显示操作按钮,根据登录人所属组织判断 + // showImportBtn: false,//是否显示操作按钮,根据登录人所属组织判断 agencyObj: {},//树所选的小区对象 ownerName: '', @@ -237,21 +240,21 @@ export default { this.tableLoading = true if (fromTree) { this.agencyObj = treeObj - if (this.agencyObj.level === 'community') {//只有社区和网格显示操作按钮 - if (this.agencyObj.id === this.staffAgencyId) {//如果所选树的组织id和登录人员id相同,有权限 - this.showImportBtn = true - } else { - this.showImportBtn = false - } - } else if (this.agencyObj.level === 'grid') {//网格下 - if (this.agencyObj.pid === this.staffAgencyId) {//如果所选树的父级组织id和登录人员id相同,有权限 - this.showImportBtn = true - } else { - this.showImportBtn = false - } - } else { - this.showImportBtn = false - } + // if (this.agencyObj.level === 'community') {//只有社区和网格显示操作按钮 + // if (this.agencyObj.id === this.staffAgencyId) {//如果所选树的组织id和登录人员id相同,有权限 + // this.showImportBtn = true + // } else { + // this.showImportBtn = false + // } + // } else if (this.agencyObj.level === 'grid') {//网格下 + // if (this.agencyObj.pid === this.staffAgencyId) {//如果所选树的父级组织id和登录人员id相同,有权限 + // this.showImportBtn = true + // } else { + // this.showImportBtn = false + // } + // } else { + // this.showImportBtn = false + // } } const url = "/gov/org/house/houselist" @@ -423,10 +426,11 @@ export default { this.$emit('refreshTree') this.loadTable() } else if (code > 8000) { - // this.$message({ - // type: "success", - // message: msg - // }); + this.$message({ + showClose: true, + message: msg, + duration: 0 + }) this.$emit('refreshTree') this.loadTable() } else { @@ -645,6 +649,10 @@ export default { type: String, default: '', }, + showImportBtn: { + type: Boolean, + default: false, + }, } } From 9b4dce629bd3b0f2635411b022312df69a5a76ca Mon Sep 17 00:00:00 2001 From: jiangyy Date: Wed, 9 Mar 2022 09:45:49 +0800 Subject: [PATCH 27/29] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E6=9D=83=E9=99=90=20=E5=88=97=E8=A1=A8=E5=A4=8D=E9=80=89?= =?UTF-8?q?=E6=A1=86=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/base/community/buildTable.vue | 15 ++++++++++++- .../modules/base/community/communityForm.vue | 2 +- .../modules/base/community/communityTable.vue | 22 ++++++++++++++++++- .../modules/base/community/roomTable.vue | 16 +++++++++++++- 4 files changed, 51 insertions(+), 4 deletions(-) diff --git a/src/views/modules/base/community/buildTable.vue b/src/views/modules/base/community/buildTable.vue index fdc6d0ef..337a7c28 100644 --- a/src/views/modules/base/community/buildTable.vue +++ b/src/views/modules/base/community/buildTable.vue @@ -97,6 +97,7 @@ @select-all="selectAll" @selection-change="selectionChange"> { - this.$refs.ref_table.toggleRowSelection(row); + if (row.showBtn) { + this.$refs.ref_table.toggleRowSelection(row); + } }); } }, diff --git a/src/views/modules/base/community/communityForm.vue b/src/views/modules/base/community/communityForm.vue index 6dec5775..60ce06be 100644 --- a/src/views/modules/base/community/communityForm.vue +++ b/src/views/modules/base/community/communityForm.vue @@ -385,7 +385,7 @@ export default { if (code === 0) { this.$message({ type: 'success', - message: '添加小区成功' + message: '操作成功' }) this.resetData() this.$emit('dialogOk') diff --git a/src/views/modules/base/community/communityTable.vue b/src/views/modules/base/community/communityTable.vue index 491288f0..c58a4ca9 100644 --- a/src/views/modules/base/community/communityTable.vue +++ b/src/views/modules/base/community/communityTable.vue @@ -119,6 +119,7 @@ @select-all="selectAll" @selection-change="selectionChange"> { - this.$refs.ref_table.toggleRowSelection(row); + if (row.showBtn) { + this.$refs.ref_table.toggleRowSelection(row); + } }); } }, @@ -742,3 +756,9 @@ export default { @import "@/assets/scss/buttonstyle.scss"; @import "@/assets/scss/modules/visual/communityManage.scss"; + + diff --git a/src/views/modules/base/community/roomTable.vue b/src/views/modules/base/community/roomTable.vue index 1de9a574..1cfead15 100644 --- a/src/views/modules/base/community/roomTable.vue +++ b/src/views/modules/base/community/roomTable.vue @@ -77,6 +77,7 @@ @select-all="selectAll" @selection-change="selectionChange"> { - this.$refs.ref_table.toggleRowSelection(row); + if (row.showBtn) { + this.$refs.ref_table.toggleRowSelection(row); + } + }); } }, From 5ddc09a484e842d132b75a40a93edfeea10bb9b9 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Wed, 9 Mar 2022 15:16:02 +0800 Subject: [PATCH 28/29] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E7=AE=A1=E7=90=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/base/community/buildTable.vue | 35 +++++++++++-------- .../modules/base/community/community.vue | 4 +++ .../modules/base/community/communityTable.vue | 33 ++++++++++------- src/views/modules/base/community/roomForm.vue | 3 +- .../modules/base/community/roomTable.vue | 35 +++++++++++-------- 5 files changed, 69 insertions(+), 41 deletions(-) diff --git a/src/views/modules/base/community/buildTable.vue b/src/views/modules/base/community/buildTable.vue index 337a7c28..17b182b6 100644 --- a/src/views/modules/base/community/buildTable.vue +++ b/src/views/modules/base/community/buildTable.vue @@ -164,10 +164,12 @@
- 全选 - 批量删除 @@ -216,7 +218,9 @@ export default { agencyObj: {},//树所选的小区对象 ownerName: '', ownerPhone: '', - tableData: [], + validTableDataNum: 0,//有效的数据数量,即有权限操作的数据数量 + selection: [], + showDeletBtn: false, //form相关 formShow: false, @@ -282,10 +286,12 @@ export default { const { data, code, msg } = await requestPost(url, params) if (code === 0) { + this.validTableDataNum = 0 this.total = data.total data.list.forEach(item => { if (item.agencyId === this.staffAgencyId) { item.showBtn = true + this.validTableDataNum++ } else { item.showBtn = false } @@ -376,7 +382,7 @@ export default { selectAll (selection) { this.selection = selection - if (selection.length > 0) { + if (selection.length === this.validTableDataNum) { this.selAllFlag = true } else { this.selAllFlag = false @@ -385,19 +391,15 @@ export default { }, selectionChange (selection) { this.selection = selection - - if (selection.length === this.tableData.length) { + this.isIndeterminate = false + if (selection.length === this.validTableDataNum) { this.selAllFlag = true - this.isIndeterminate = false - } else if (selection.length > 0) { - this.selAllFlag = false - this.isIndeterminate = true + } else { this.selAllFlag = false - this.isIndeterminate = false + } }, - async handleDelete (row) { this.$confirm("确认删除?", "提示", { @@ -691,8 +693,13 @@ export default { } }, watch: { - filterText (val) { - this.$refs.tree.filter(val); + selection (val) { + + if (val.length > 0) { + this.showDeletBtn = true + } else { + this.showDeletBtn = false + } } }, props: { diff --git a/src/views/modules/base/community/community.vue b/src/views/modules/base/community/community.vue index 2800a96b..7f91ed38 100644 --- a/src/views/modules/base/community/community.vue +++ b/src/views/modules/base/community/community.vue @@ -215,6 +215,10 @@ export default { let agencyNode = this.$refs.ref_tree.getNode(gridNode.data.pid)//所属社区 obj.agencyId = agencyNode.data.id obj.agencyName = agencyNode.data.label + obj.gridId = gridNode.data.id + obj.gridName = gridNode.data.label + obj.neighborHoodId = neighborHoodNode.data.id + obj.neighborHoodName = neighborHoodNode.data.label if (obj.agencyId === this.staffAgencyId) { this.showImportBtn = true } else { diff --git a/src/views/modules/base/community/communityTable.vue b/src/views/modules/base/community/communityTable.vue index c58a4ca9..0f3e390e 100644 --- a/src/views/modules/base/community/communityTable.vue +++ b/src/views/modules/base/community/communityTable.vue @@ -185,10 +185,12 @@
- 全选 - 批量删除 @@ -238,7 +240,9 @@ export default { ownerName: '', ownerPhone: '', tableData: [], + validTableDataNum: 0,//有效的数据数量,即有权限操作的数据数量 selection: [], + showDeletBtn: false, //form相关 @@ -309,10 +313,12 @@ export default { const { data, code, msg } = await requestPost(url, params) if (code === 0) { + this.validTableDataNum = 0 this.total = data.total data.list.forEach(item => { if (item.agencyId === this.staffAgencyId) { item.showBtn = true + this.validTableDataNum++ } else { item.showBtn = false } @@ -412,9 +418,10 @@ export default { } }, selectAll (selection) { + this.selection = selection - if (selection.length > 0) { + if (selection.length === this.validTableDataNum) { this.selAllFlag = true } else { this.selAllFlag = false @@ -423,16 +430,13 @@ export default { }, selectionChange (selection) { this.selection = selection - - if (selection.length === this.tableData.length) { + this.isIndeterminate = false + if (selection.length === this.validTableDataNum) { this.selAllFlag = true - this.isIndeterminate = false - } else if (selection.length > 0) { - this.selAllFlag = false - this.isIndeterminate = true + } else { this.selAllFlag = false - this.isIndeterminate = false + } }, @@ -739,8 +743,13 @@ export default { } }, watch: { - filterText (val) { - this.$refs.tree.filter(val); + selection (val) { + + if (val.length > 0) { + this.showDeletBtn = true + } else { + this.showDeletBtn = false + } } }, props: { diff --git a/src/views/modules/base/community/roomForm.vue b/src/views/modules/base/community/roomForm.vue index 548762b7..2263b645 100644 --- a/src/views/modules/base/community/roomForm.vue +++ b/src/views/modules/base/community/roomForm.vue @@ -163,9 +163,10 @@ export default { methods: { async initForm (type, row, agencyObj) { + debugger this.$refs.ref_form.resetFields(); this.agencyObj = agencyObj - this.dataForm.neighborHoodId = agencyObj.communityId + this.dataForm.neighborHoodId = agencyObj.neighborHoodId this.dataForm.buildingId = agencyObj.id this.formType = type diff --git a/src/views/modules/base/community/roomTable.vue b/src/views/modules/base/community/roomTable.vue index 1cfead15..3beb3b0b 100644 --- a/src/views/modules/base/community/roomTable.vue +++ b/src/views/modules/base/community/roomTable.vue @@ -156,10 +156,12 @@
- 全选 - 批量删除 @@ -206,7 +208,9 @@ export default { agencyObj: {},//树所选的小区对象 ownerName: '', ownerPhone: '', - tableData: [], + validTableDataNum: 0,//有效的数据数量,即有权限操作的数据数量 + selection: [], + showDeletBtn: false, //form相关 formShow: false, @@ -282,9 +286,11 @@ export default { if (code === 0) { this.total = data.total + this.validTableDataNum = 0 data.list.forEach(item => { if (item.agencyId === this.staffAgencyId) { item.showBtn = true + this.validTableDataNum++ } else { item.showBtn = false } @@ -370,8 +376,7 @@ export default { }, selectAll (selection) { this.selection = selection - - if (selection.length > 0) { + if (selection.length === this.validTableDataNum) { this.selAllFlag = true } else { this.selAllFlag = false @@ -380,16 +385,13 @@ export default { }, selectionChange (selection) { this.selection = selection - - if (selection.length === this.tableData.length) { + this.isIndeterminate = false + if (selection.length === this.validTableDataNum) { this.selAllFlag = true - this.isIndeterminate = false - } else if (selection.length > 0) { - this.selAllFlag = false - this.isIndeterminate = true + } else { this.selAllFlag = false - this.isIndeterminate = false + } }, @@ -654,8 +656,13 @@ export default { } }, watch: { - filterText (val) { - this.$refs.tree.filter(val); + selection (val) { + + if (val.length > 0) { + this.showDeletBtn = true + } else { + this.showDeletBtn = false + } } }, props: { From 6a3ee40abbb522fbe0c0f8a8ed1e3f55db5318c0 Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 9 Mar 2022 15:48:09 +0800 Subject: [PATCH 29/29] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=B8=82=E5=8C=97?= =?UTF-8?q?=E7=94=9F=E4=BA=A7=E7=8E=AF=E5=A2=83=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.shibei_production | 4 ++++ package.json | 1 + public/index.html | 16 ++++++++++------ 3 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 .env.shibei_production diff --git a/.env.shibei_production b/.env.shibei_production new file mode 100644 index 00000000..b227d2fa --- /dev/null +++ b/.env.shibei_production @@ -0,0 +1,4 @@ +NODE_ENV=production +VUE_APP_API_SERVER = https://epdc-shibei.elinkservice.cn/api +VUE_APP_NODE_ENV=shibei_prod +VUE_APP_PUBLIC_PATH=epmet-oper \ No newline at end of file diff --git a/package.json b/package.json index 699ce11d..360bbcb1 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "build:sit": "vue-cli-service build --mode production.sit", "build:uat": "vue-cli-service build --mode production.uat", "build:prod": "vue-cli-service build --mode production", + "build:shibei_prod": "vue-cli-service build --mode shibei_production", "lint": "vue-cli-service lint", "et": "node_modules/.bin/et", "et:init": "node_modules/.bin/et -i", diff --git a/public/index.html b/public/index.html index 1fcf3218..7761c737 100644 --- a/public/index.html +++ b/public/index.html @@ -14,7 +14,7 @@ window.SITE_CONFIG = {} window.SITE_CONFIG['version'] = 'v2.0.0' window.SITE_CONFIG['nodeEnv'] = '<%= process.env.VUE_APP_NODE_ENV %>' - window.SITE_CONFIG['apiURL'] = '' // api请求地址 + window.SITE_CONFIG['apiURL'] = '<%= process.env.VUE_APP_API_SERVER %>' // api请求地址 window.SITE_CONFIG['storeState'] = {} // vuex本地储存初始化状态(用于不刷新页面的情况下,也能重置初始化项目中所有状态) window.SITE_CONFIG['contentTabDefault'] = { // 内容标签页默认属性对象 @@ -36,7 +36,7 @@ - <% if (process.env.VUE_APP_NODE_ENV==='dev' ) { %> + + <!– 集成测试环境 dev –> <% if (process.env.VUE_APP_NODE_ENV==='prod:sit' ) { %> <% } %> - + <!– 验收测试环境 aliyun –> <% if (process.env.VUE_APP_NODE_ENV==='prod:uat' ) { %> <% } %> - + <!– 生产环境 –> <% if (process.env.VUE_APP_NODE_ENV==='prod' ) { %> - <% } %> + <% } %>--> + +