Merge branch 'dev' into build
# Conflicts: # project/oms/apps/develop/AppDeployCustom/add.vue
This commit is contained in:
		| @@ -37,17 +37,20 @@ | ||||
|           </el-form-item> | ||||
|         </el-form> | ||||
|       </div> | ||||
|       <ai-dialog title="选择网格" :visible.sync="showGrid" :customFooter="true" :destroyOnClose="true" | ||||
|                  @opened="beforeSelectTree" border width="720px"> | ||||
|       <ai-dialog title="选择网格" :visible.sync="showGrid" :customFooter="true" :destroyOnClose="true" border width="720px"> | ||||
|         <div class="grid"> | ||||
|           <el-tree :data="treeObj.treeList" :props="treeObj.defaultProps" node-key="id" ref="tree" | ||||
|                    :check-strictly="true" show-checkbox | ||||
|                    :default-checked-keys="treeObj.checkedKeys" default-expand-all | ||||
|                    @check="onCheckChange"> | ||||
|             <template slot-scope="{node,data}"> | ||||
|               <el-tooltip :content="node.label"> | ||||
|                 <div class="el-tree-node__label" v-text="node.label"/> | ||||
|               </el-tooltip> | ||||
|           <el-tree | ||||
|             :data="treeObj.treeList" | ||||
|             :props="treeObj.defaultProps" | ||||
|             node-key="id" | ||||
|             ref="tree" | ||||
|             :check-strictly="true" | ||||
|             show-checkbox | ||||
|             :default-checked-keys="treeObj.checkedKeys" | ||||
|             :default-expanded-keys="treeObj.checkedKeys" | ||||
|             @check="onCheckChange"> | ||||
|             <template slot-scope="{node}"> | ||||
|               <div class="el-tree-node__label" :title="node.label" v-text="node.label"/> | ||||
|             </template> | ||||
|           </el-tree> | ||||
|         </div> | ||||
| @@ -98,7 +101,7 @@ export default { | ||||
|       treeObj: { | ||||
|         treeList: [], | ||||
|         defaultProps: { | ||||
|           children: "girdList", | ||||
|           children: "children", | ||||
|           label: "girdName", | ||||
|         }, | ||||
|         checkedKeys: [], | ||||
| @@ -115,6 +118,7 @@ export default { | ||||
|   }, | ||||
|  | ||||
|   created() { | ||||
|     this.beforeSelectTree() | ||||
|     this.dict.load('cardType', 'sex', 'nation').then(() => { | ||||
|       if (this.params && this.params.id) { | ||||
|         this.getInfo(this.params.id) | ||||
| @@ -123,15 +127,23 @@ export default { | ||||
|   }, | ||||
|   methods: { | ||||
|     beforeSelectTree() { | ||||
|       this.treeObj.checkedKeys = []; | ||||
|       this.instance.post(`/app/appgirdinfo/listAll`, null, null).then((res) => { | ||||
|       this.instance.post(`/app/appgirdinfo/listAll3`).then((res) => { | ||||
|         if (res.code == 0) { | ||||
|           this.treeObj.treeList = this.format(res.data) | ||||
|           this.treeObj.checkedKeys = [] | ||||
|           if (this.form.girdInfoList.length) { | ||||
|             this.form.girdInfoList.map((e) => { | ||||
|               this.treeObj.checkedKeys.push(e.id); | ||||
|             }); | ||||
|           } | ||||
|           this.treeObj.treeList = res.data.filter(e => !e.parentGirdId) | ||||
|           this.treeObj.treeList.map(p => this.addChild(p, res.data.map(v => { | ||||
|  | ||||
|             return { | ||||
|               ...v | ||||
|             } | ||||
|           }), { | ||||
|             parent: 'parentGirdId' | ||||
|           })) | ||||
|         } | ||||
|       }); | ||||
|     }, | ||||
|   | ||||
| @@ -17,10 +17,10 @@ | ||||
|                 <el-input v-model="forms.girdName" placeholder="请输入…" :maxlength="50" show-word-limit clearable/> | ||||
|               </el-form-item> | ||||
|               <el-form-item label="网格长" prop="girdMemberManageList"> | ||||
|                 <ai-user-picker :instance="instance" v-model="forms.girdMemberManageList" :props="{label:'name', id: 'id'}"/> | ||||
|                 <ai-user-selecter isShowUser :instance="instance" v-model="forms.girdMemberManageList" :props="{label:'name', id: 'id'}"/> | ||||
|               </el-form-item> | ||||
|               <el-form-item label="网格员" prop="girdMemberList"> | ||||
|                 <ai-user-picker :instance="instance" v-model="forms.girdMemberList" :props="{label:'name', id: 'id'}"/> | ||||
|                 <ai-user-selecter isShowUser :instance="instance" v-model="forms.girdMemberList" :props="{label:'name', id: 'id'}"/> | ||||
|               </el-form-item> | ||||
|             </template> | ||||
|           </ai-card> | ||||
| @@ -184,13 +184,15 @@ export default { | ||||
|             girdMemberManageList: res.data.girdMemberManageList ? res.data.girdMemberManageList.map(v => { | ||||
|               return { | ||||
|                 ...v, | ||||
|                 id: v.wxUserId | ||||
|                 id: v.wxUserId, | ||||
|                 avatar: v.photo | ||||
|               } | ||||
|             }) : [], | ||||
|             girdMemberList: res.data.girdMemberList ? res.data.girdMemberList.map(v => { | ||||
|               return { | ||||
|                 ...v, | ||||
|                 id: v.wxUserId | ||||
|                 id: v.wxUserId, | ||||
|                 avatar: v.photo | ||||
|               } | ||||
|             }) : [] | ||||
|           }; | ||||
|   | ||||
| @@ -13,7 +13,6 @@ | ||||
|               node-key="id" | ||||
|               ref="tree" | ||||
|               :filter-node-method="filterNode" | ||||
|               default-expand-all | ||||
|               highlight-current> | ||||
|             <template slot-scope="{node,data}"> | ||||
|               <div v-text="node.label"/> | ||||
| @@ -153,7 +152,7 @@ export default { | ||||
|       treeObj: { | ||||
|         treeList: [], | ||||
|         defaultProps: { | ||||
|           children: "girdList", | ||||
|           children: "children", | ||||
|           label: "girdName", | ||||
|         }, | ||||
|         defaultExpandedKeys: [], | ||||
| @@ -216,13 +215,26 @@ export default { | ||||
|       this.getList(); | ||||
|     }, | ||||
|     getTreeList() { | ||||
|       this.instance.post("/app/appgirdinfo/listAllByTop").then(res => { | ||||
|       this.instance.post(`/app/appgirdinfo/listAll3`).then((res) => { | ||||
|         if (res?.data) { | ||||
|           this.treeObj.treeList = [res.data]; | ||||
|           this.info = res.data | ||||
|           this.$nextTick(() => { | ||||
|             this.$refs.tree.setCurrentKey(this.info.id) | ||||
|             this.$refs.tree.setCurrentKey(res.data.id) | ||||
|           }) | ||||
|  | ||||
|           this.treeObj.treeList = res.data.filter(e => !e.parentGirdId) | ||||
|           const parentGirdId = this.treeObj.treeList[0].id | ||||
|  | ||||
|           this.treeObj.treeList.map(p => this.addChild(p, res.data.map(v => { | ||||
|             if (v.id === parentGirdId) { | ||||
|               // this.defaultExpandedKeys.push(v.id) | ||||
|             } | ||||
|  | ||||
|             return { | ||||
|               ...v | ||||
|             } | ||||
|           }), { | ||||
|             parent: 'parentGirdId' | ||||
|           })) | ||||
|         } | ||||
|       }); | ||||
|     }, | ||||
|   | ||||
| @@ -13,19 +13,19 @@ | ||||
|           </header> | ||||
|           <div class="tree-div"> | ||||
|             <el-tree | ||||
|                 :data="treeObj.treeList" | ||||
|                 :props="treeObj.defaultProps" | ||||
|                 @node-click="handleNodeClick" | ||||
|                 node-key="id" | ||||
|                 ref="tree" | ||||
|                 :expand-on-click-node="false" | ||||
|                 :filter-node-method="filterNode" | ||||
|                 default-expand-all | ||||
|                 highlight-current> | ||||
|               :data="treeObj.treeList" | ||||
|               :props="treeObj.defaultProps" | ||||
|               @node-click="handleNodeClick" | ||||
|               node-key="id" | ||||
|               ref="tree" | ||||
|               :expand-on-click-node="false" | ||||
|               :filter-node-method="filterNode" | ||||
|               :default-expanded-keys="treeObj.defaultExpandedKeys" | ||||
|               highlight-current> | ||||
|               <template slot-scope="{node,data}"> | ||||
|                 <el-tooltip :content="node.label"> | ||||
|                   <div class="el-tree-node__label" v-text="node.label"/> | ||||
|                 </el-tooltip> | ||||
|                 <!-- <el-tooltip :content="node.label"> --> | ||||
|                 <div class="el-tree-node__label" :title="node.label" v-text="node.label"/> | ||||
|                 <!-- </el-tooltip> --> | ||||
|               </template> | ||||
|             </el-tree> | ||||
|           </div> | ||||
| @@ -61,7 +61,7 @@ export default { | ||||
|       treeObj: { | ||||
|         treeList: [], | ||||
|         defaultProps: { | ||||
|           children: "girdList", | ||||
|           children: "children", | ||||
|           label: "girdName", | ||||
|         }, | ||||
|         defaultExpandedKeys: [], | ||||
| @@ -88,9 +88,7 @@ export default { | ||||
|   }, | ||||
|   created() { | ||||
|     this.dict.load("onlineStatus") | ||||
|     this.getTreeList().then(() => { | ||||
|       this.getLeafNodes() | ||||
|     }) | ||||
|     this.getTreeList() | ||||
|   }, | ||||
|   watch: { | ||||
|     filterText(val) { | ||||
| @@ -103,15 +101,29 @@ export default { | ||||
|       return data.girdName.indexOf(value) !== -1; | ||||
|     }, | ||||
|     getTreeList() { | ||||
|       return this.instance.post(`/app/appgirdinfo/listAll`).then((res) => { | ||||
|         if (res.code == 0) { | ||||
|           this.treeObj.treeList = res.data; | ||||
|  | ||||
|       this.instance.post(`/app/appgirdinfo/listAll3`).then((res) => { | ||||
|         if (res?.data) { | ||||
|           this.$nextTick(() => { | ||||
|             res.data.length && this.$refs.tree.setCurrentKey(res.data[0].id) | ||||
|             this.$refs.tree.setCurrentKey(res.data.id) | ||||
|           }) | ||||
|  | ||||
|           this.treeObj.treeList = res.data.filter(e => !e.parentGirdId) | ||||
|           const parentGirdId = this.treeObj.treeList[0].id | ||||
|  | ||||
|           this.treeObj.treeList.map(p => this.addChild(p, res.data.map(v => { | ||||
|             if (v.id === parentGirdId) { | ||||
|               this.treeObj.defaultExpandedKeys.push(v.id) | ||||
|             } | ||||
|  | ||||
|             return { | ||||
|               ...v | ||||
|             } | ||||
|           }), { | ||||
|             parent: 'parentGirdId' | ||||
|           })) | ||||
|           this.getLeafNodes() | ||||
|         } | ||||
|       }) | ||||
|       }); | ||||
|     }, | ||||
|  | ||||
|     onMapInit() { | ||||
|   | ||||
| @@ -21,12 +21,12 @@ | ||||
|         </template> | ||||
|         <template slot="right"> | ||||
|           <el-input | ||||
|               v-model="searchObj.name" | ||||
|               v-model="searchObj.con" | ||||
|               size="small" | ||||
|               placeholder="网格员/责任网格" | ||||
|               v-throttle="() => {page.current = 1, getList()}" | ||||
|               clearable | ||||
|               @clear="(searchObj.name = '', page.current = 1), getList()" | ||||
|               @clear="(searchObj.con = '', page.current = 1), getList()" | ||||
|               suffix-icon="iconfont iconSearch"/> | ||||
|         </template> | ||||
|       </ai-search-bar> | ||||
| @@ -65,7 +65,7 @@ export default { | ||||
|   data() { | ||||
|     return { | ||||
|       searchObj: { | ||||
|         name: "", | ||||
|         con: "", | ||||
|         selectionDate: "", | ||||
|       }, | ||||
|       page: { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user