From 810f19518449f301438812b74fe1976e146d967e Mon Sep 17 00:00:00 2001 From: ancong <12345678> Date: Fri, 23 Jan 2026 16:08:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 8 +-- .env.production | 8 +-- .../components/cl-upload/cl-upload.vue | 5 +- src/manifest.json | 4 +- src/pages/xiangmu/addxiangmu.vue | 21 +++--- src/pages/xiangmu/listindex.vue | 2 +- src/pages/xiangmu/yezhudanwei.vue | 67 ++++++++++++++----- src/pages/zhixing/addjianchabiao.vue | 33 ++++----- src/pages/zhixing/jianchabiao.vue | 15 ++--- 9 files changed, 101 insertions(+), 62 deletions(-) diff --git a/.env.development b/.env.development index b64a7ad..e61e50b 100644 --- a/.env.development +++ b/.env.development @@ -1,12 +1,12 @@ ENV='development' # base api -VITE_APP_BASE_URL='http://219.146.89.198' -VITE_APP_BASE_URLpro='9380' +#VITE_APP_BASE_URL='http://219.146.89.198' +#VITE_APP_BASE_URLpro='9380' #VITE_APP_BASE_URL='http://192.168.1.115' #VITE_APP_BASE_URLpro='8088' -#VITE_APP_BASE_URL='http://219.146.89.198' -#VITE_APP_BASE_URLpro='18080' +VITE_APP_BASE_URL='http://219.146.89.198' +VITE_APP_BASE_URLpro='18080' # VITE_APP_BASE_PRE="http://rest.apizza.net/mock/eb75fcfa7845b9bd4a958fe69e3af419" VITE_APP_BASE_PRE="/prod-api" VITE_APP_BASE_NAME='小程序' diff --git a/.env.production b/.env.production index b4c40f7..04ac7ed 100644 --- a/.env.production +++ b/.env.production @@ -1,9 +1,9 @@ ENV='production' # base api -VITE_APP_BASE_URL='http://219.146.89.198' -VITE_APP_BASE_URLpro='9380' - #VITE_APP_BASE_URL='http://219.146.89.198' -#VITE_APP_BASE_URLpro='18080' +#VITE_APP_BASE_URLpro='9380' + +VITE_APP_BASE_URL='http://219.146.89.198' +VITE_APP_BASE_URLpro='18080' VITE_APP_BASE_PRE='/prod-api' VITE_APP_BASE_NAME='vite项目' diff --git a/src/components/cl-upload/components/cl-upload/cl-upload.vue b/src/components/cl-upload/components/cl-upload/cl-upload.vue index 0fbfdf4..6334c18 100644 --- a/src/components/cl-upload/components/cl-upload/cl-upload.vue +++ b/src/components/cl-upload/components/cl-upload/cl-upload.vue @@ -473,7 +473,7 @@ // upload(tempFiles); // } const maxSize = 5 * 1024 * 1024; //暂定超过5m压缩 - + debugger tempFiles.map((imgInfo, index) => { // debugger if (imgInfo.size > maxSize) { @@ -493,7 +493,8 @@ }); return } else { - upload(tempFiles); + // upload(tempFiles); + upload([imgInfo]); return } }) diff --git a/src/manifest.json b/src/manifest.json index b563e96..e4f82e0 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -3,8 +3,8 @@ "appid" : "__UNI__D31BBA7", "package" : "com.skzh.hzyjzaqyhglpt", "description" : "安全隐患排查app", - "versionName" : "2.0.0", - "versionCode" : 200, + "versionName" : "2.0.2", + "versionCode" : 202, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { diff --git a/src/pages/xiangmu/addxiangmu.vue b/src/pages/xiangmu/addxiangmu.vue index 9234e78..3e58b9b 100644 --- a/src/pages/xiangmu/addxiangmu.vue +++ b/src/pages/xiangmu/addxiangmu.vue @@ -991,7 +991,7 @@ } //debugger - if (this.projectid != '' & this.isedit) { + if (this.projectid & this.isedit) { //编辑 upsafety_hazardproject(this.formdata).then(res => { //debugger @@ -1059,7 +1059,7 @@ } //debugger - if (this.projectid != '' & this.isedit) { + if (this.projectid & this.isedit) { //编辑 upuserprojectbatch(this.xmcylist, this.projectid).then(res => { //debugger @@ -1122,6 +1122,7 @@ // jzfllist2: [], // jzfllist3: [], // }], + // debugger if (!this.projectid) { this.$modal.msgError(`请先保存项目信息!`) return false; @@ -1185,11 +1186,12 @@ } let delIds = this.findDeletedIds(this.buildingCmdsListold, this.buildingCmdsList, 'buildingId'); //debugger - if (this.projectid != '' & this.isedit) { + if (this.projectid & this.isedit) { //编辑 - addsafety_hazardbuilding(this.buildingCmdsList).then(res => { - //debugger + upsafety_hazardbuilding(delIds, this.buildingCmdsList).then(res => { + // debugger this.$modal.msgSuccess("修改成功!"); + // uni.navigateBack({ // delta: 1, // 默认返回上一页,数值越大返回层数越多 // success: () => { @@ -1201,9 +1203,12 @@ // }, 300); }); + + } else { - upsafety_hazardbuilding(delIds, this.buildingCmdsList).then(res => { - // debugger + //新增 + addsafety_hazardbuilding(this.buildingCmdsList).then(res => { + //debugger this.$modal.msgSuccess("添加成功!"); // uni.navigateBack({ // delta: 1, // 默认返回上一页,数值越大返回层数越多 @@ -1263,7 +1268,7 @@ } //debugger - if (this.projectid != '' & this.isedit) { + if (this.projectid & this.isedit) { //编辑 // let dataform={ diff --git a/src/pages/xiangmu/listindex.vue b/src/pages/xiangmu/listindex.vue index 7e01b23..bd7ca0d 100644 --- a/src/pages/xiangmu/listindex.vue +++ b/src/pages/xiangmu/listindex.vue @@ -184,7 +184,7 @@ @click="daochu()"> - diff --git a/src/pages/xiangmu/yezhudanwei.vue b/src/pages/xiangmu/yezhudanwei.vue index 6fbea70..59b9be6 100644 --- a/src/pages/xiangmu/yezhudanwei.vue +++ b/src/pages/xiangmu/yezhudanwei.vue @@ -7,7 +7,7 @@ * 单位名称: - @@ -93,7 +93,7 @@ - + - {{ item.name }} + {{ item.name }}{{item.shortName?`${'('+item.shortName+')'}`:''}} - + * @@ -177,6 +178,15 @@ + + + * + 简称: + + + + + @@ -368,6 +378,7 @@ id: null, customerCompanyId: null, selectedArr: [], + shortName: '', name: "", code: "", level: null, @@ -483,9 +494,12 @@ let arr = []; if (this.isArray(nodes)) { for (let i = 0, l = nodes.length; i < l; i++) { + // debugger const node = nodes[i]; node.pids = ids; - node.level = ids.length - 1; + // node.level = ids.length - 1; + node.level = nodes[i].level; + arr.push(node); // 取每项数据放入一个新数组 if (this.isArray(node['children']) && node['children'].length > 0) // 若存在children则递归调用,把数据拼接到新数组中,并且删除该children @@ -505,9 +519,11 @@ this.openList = list; }, checkOpen(id) { + //debugger return ~this.openList.findIndex(o => o === id); }, open(item, index) { + //debugger if (!this.checkOpen(item.id)) { this.openList.push(item.id); } else { @@ -598,6 +614,7 @@ list = this.treeToArray(list); // debugger this.tableData = list; + this.openList = [list[0].id]; }) }, @@ -623,22 +640,36 @@ selectedArr: [], name: "", code: "", + shortName: '', level: null, parentId: null, status: "0", remark: "" }; - + //debugger //新增 if (this.rowitem) { this.formdata.level = Number(this.rowitem.level) + Number(1); this.formdata.parentId = this.rowitem.customerCompanyId; - this.formdata.customerCompanyId = this.rowitem.customerCompanyId; + // this.formdata.customerCompanyId = this.rowitem.customerCompanyId; + this.formdata.selectedArr = [String(this.rowitem.customerCompanyId)]; } this.modaltitle = "添加业主单位"; }, + + upxiangmu() { + //详情 + this.isedit = true; + getcustomerCompanyIdinfo(this.rowitem.customerCompanyId).then(res => { + //debugger + this.formdata = res.data; + this.formdata.selectedArr = [String(this.formdata.customerCompanyId)]; + this.addshow = true; + }); + + }, baocun() { //保存 // debugger @@ -648,6 +679,9 @@ } else if (!this.formdata.name) { this.$modal.msgError("请输入单位名称!") return; + } else if (!this.formdata.shortName) { + this.$modal.msgError("请输入公司简称!") + return; } @@ -666,7 +700,14 @@ }); } else { // debugger + + if (this.formdata.level == 4) { + this.$modal.msgError("单位级别最大为三级!") + return; + + } this.formdata.customerCompanyId = this.formdata.selectedArr[0].toString(); + addsafety_hazardcompany(this.formdata).then(res => { // debugger this.$modal.msgSuccess("添加成功!"); @@ -719,17 +760,7 @@ }, - upxiangmu() { - //详情 - this.isedit = true; - getcustomerCompanyIdinfo(this.rowitem.customerCompanyId).then(res => { - // debugger - this.formdata = res.data; - this.formdata.selectedArr = [String(this.formdata.customerCompanyId)]; - this.addshow = true; - }); - }, statusswitch(e, item, index) { //更改状态 // debugger diff --git a/src/pages/zhixing/addjianchabiao.vue b/src/pages/zhixing/addjianchabiao.vue index 6273895..7452d1a 100644 --- a/src/pages/zhixing/addjianchabiao.vue +++ b/src/pages/zhixing/addjianchabiao.vue @@ -126,7 +126,7 @@ - + - + --> @@ -814,13 +813,15 @@ else if (!this.formdata.result) { this.$modal.msgError("请选择是否存在问题!") return; - } else if (this.formdata.result == '1') { - if (!this.formdata.issueStandardChanged) { - this.$modal.msgError("请选择问题是否因规范更替引起!") - return; - } - } + + // else if (this.formdata.result == '1') { + // if (!this.formdata.issueStandardChanged) { + // this.$modal.msgError("请选择问题是否因规范更替引起!") + // return; + // } + + // } this.formdata.imgUrl = this.upimgfileList1.toString(); this.formdata.projectId = this.projectid; //debugger @@ -873,13 +874,15 @@ else if (!this.formdata.result) { this.$modal.msgError("请选择是否存在问题!") return; - } else if (this.formdata.result == '1') { - if (!this.formdata.issueStandardChanged) { - this.$modal.msgError("请选择问题是否因规范更替引起!") - return; - } - } + + // else if (this.formdata.result == '1') { + // if (!this.formdata.issueStandardChanged) { + // this.$modal.msgError("请选择问题是否因规范更替引起!") + // return; + // } + + // } this.formdata.imgUrl = this.upimgfileList1.toString(); this.formdata.projectId = this.projectid; diff --git a/src/pages/zhixing/jianchabiao.vue b/src/pages/zhixing/jianchabiao.vue index 76e58f8..b9eb455 100644 --- a/src/pages/zhixing/jianchabiao.vue +++ b/src/pages/zhixing/jianchabiao.vue @@ -44,9 +44,9 @@ v-if="$checkPermi(['safety_hazard:log:query'])"> - + v-if="$checkPermi(['safety_hazard:suggestion:add'])"> --> @@ -82,14 +82,14 @@ - - + - - + --> - +