From 54880a95622fb61f61d603d7550cdee39c852289 Mon Sep 17 00:00:00 2001
From: wanglei <1336977847@qq.com>
Date: Wed, 26 Jun 2024 11:19:28 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E9=97=A8=E5=BA=97=E6=A1=A3=E6=A1=88?=
=?UTF-8?q?=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../AppArchives/components/Add.vue | 24 +++++++++---
.../AppArchives/components/Detail.vue | 38 +++++++++++--------
.../AppArchives/components/List.vue | 4 +-
3 files changed, 42 insertions(+), 24 deletions(-)
diff --git a/project/fengdu/AppOutSource/AppArchives/components/Add.vue b/project/fengdu/AppOutSource/AppArchives/components/Add.vue
index a4345fcf..c61e61cf 100644
--- a/project/fengdu/AppOutSource/AppArchives/components/Add.vue
+++ b/project/fengdu/AppOutSource/AppArchives/components/Add.vue
@@ -129,6 +129,7 @@
show-checkbox
:default-expanded-keys="currCheckedKeys"
:default-checked-keys="currCheckedKeys"
+ @check-change="handleCheckChange"
@check="onCheckChange">
@@ -171,6 +172,7 @@ export default {
currCheckedKeys: [],
dialog: false,
treeList: [],
+ treeArray:[],
treeObj: {
checkedKeys: [],
},
@@ -209,6 +211,7 @@ export default {
this.treeObj.checkedKeys = [];
this.instance.post(`/app/appgirdinfo/listAll3`, null, null).then((res) => {
if (res.code == 0) {
+ this.treeArray = res.data
this.form.girdInfoList.map((e) => {
this.treeObj.checkedKeys.push(e.id);
});
@@ -238,7 +241,12 @@ export default {
}
})
if (code === 0) {
- this.form = {...data}
+ this.form = {...data,girdInfoList:[]}
+ this.form.fileUrl = [{
+ url: data.fileUrl
+ }]
+ const target = this.treeArray?.find(v=>v.girdCode === data.girdCode)
+ this.currCheckedKeys = [target.id]
}
} catch (e) {
console.error(e)
@@ -251,18 +259,22 @@ export default {
return this.$message.error('请选择网格')
}
- if (nodes.length > 1) {
- return this.$message.error('不支持多选')
- }
-
this.currCheckedKeys = [nodes[0]?.id]
this.form.girdCode = nodes[0]?.girdCode
this.form.girdName = nodes[0]?.girdName
this.dialog = false;
},
- onCheckChange(e) {
+ handleCheckChange(data, checked){
+ if (checked) {
+ this.$refs.treeRef.setCheckedKeys([data.id])
+ }
+ },
+ onCheckChange(e) {
+ if(e.children && e.children.length>0){
+ this.$refs.treeRef.setCheckedKeys([]);
+ }
},
idChange(val) {
diff --git a/project/fengdu/AppOutSource/AppArchives/components/Detail.vue b/project/fengdu/AppOutSource/AppArchives/components/Detail.vue
index 88d3986e..3a7c8b73 100644
--- a/project/fengdu/AppOutSource/AppArchives/components/Detail.vue
+++ b/project/fengdu/AppOutSource/AppArchives/components/Detail.vue
@@ -7,35 +7,35 @@
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+ :limit="1" :disabled="true">
-
-
-
-
-
+
+
+
+
+
@@ -68,12 +68,15 @@ export default {
girdName: '',
address: '',
description: '',
+ fileUrl:[]
},
}
},
created() {
- this.getDetail()
+ this.$dict.load('sex','operatorType').then(()=>{
+ this.getDetail()
+ })
},
methods: {
@@ -86,6 +89,9 @@ export default {
})
if (code === 0) {
this.form = {...data}
+ this.form.fileUrl = [{
+ url: data.fileUrl
+ }]
}
} catch (e) {
console.error(e)
diff --git a/project/fengdu/AppOutSource/AppArchives/components/List.vue b/project/fengdu/AppOutSource/AppArchives/components/List.vue
index 7d450b53..5fddc053 100644
--- a/project/fengdu/AppOutSource/AppArchives/components/List.vue
+++ b/project/fengdu/AppOutSource/AppArchives/components/List.vue
@@ -52,13 +52,13 @@