bug
This commit is contained in:
		| @@ -12,6 +12,8 @@ | |||||||
|               @node-click="handleNodeClick" |               @node-click="handleNodeClick" | ||||||
|               node-key="id" |               node-key="id" | ||||||
|               ref="tree" |               ref="tree" | ||||||
|  |               :expand-on-click-node="false" | ||||||
|  |               :defaultExpandedKeys="treeObj.defaultExpandedKeys" | ||||||
|               :filter-node-method="filterNode" |               :filter-node-method="filterNode" | ||||||
|               highlight-current> |               highlight-current> | ||||||
|             <template slot-scope="{node,data}"> |             <template slot-scope="{node,data}"> | ||||||
| @@ -217,16 +219,13 @@ export default { | |||||||
|     getTreeList() { |     getTreeList() { | ||||||
|       this.instance.post(`/app/appgirdinfo/listAll3`).then((res) => { |       this.instance.post(`/app/appgirdinfo/listAll3`).then((res) => { | ||||||
|         if (res?.data) { |         if (res?.data) { | ||||||
|           this.$nextTick(() => { |  | ||||||
|             this.$refs.tree.setCurrentKey(res.data.id) |  | ||||||
|           }) |  | ||||||
|  |  | ||||||
|           this.treeObj.treeList = res.data.filter(e => !e.parentGirdId) |           this.treeObj.treeList = res.data.filter(e => !e.parentGirdId) | ||||||
|           const parentGirdId = this.treeObj.treeList[0].id |           const parentGirdId = this.treeObj.treeList[0].id | ||||||
|  |  | ||||||
|           this.treeObj.treeList.map(p => this.addChild(p, res.data.map(v => { |           this.treeObj.treeList.map(p => this.addChild(p, res.data.map(v => { | ||||||
|             if (v.id === parentGirdId) { |             if (v.id === parentGirdId) { | ||||||
|               // this.defaultExpandedKeys.push(v.id) |               this.treeObj.defaultExpandedKeys.push(v.id) | ||||||
|             } |             } | ||||||
|  |  | ||||||
|             return { |             return { | ||||||
| @@ -235,6 +234,10 @@ export default { | |||||||
|           }), { |           }), { | ||||||
|             parent: 'parentGirdId' |             parent: 'parentGirdId' | ||||||
|           })) |           })) | ||||||
|  |           this.$nextTick(() => { | ||||||
|  |             this.info = this.treeObj.treeList[0] | ||||||
|  |             this.$refs.tree.setCurrentKey(parentGirdId) | ||||||
|  |           }) | ||||||
|         } |         } | ||||||
|       }); |       }); | ||||||
|     }, |     }, | ||||||
|   | |||||||
							
								
								
									
										50
									
								
								project/sass/apps/AppMaterialLibrary/AppMaterialLibrary.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								project/sass/apps/AppMaterialLibrary/AppMaterialLibrary.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,50 @@ | |||||||
|  | <template> | ||||||
|  |   <div class="AppMaterialLibrary-wrapper"> | ||||||
|  |       <component ref="component" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component> | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  |  | ||||||
|  | <script> | ||||||
|  |   import List from './components/List' | ||||||
|  |  | ||||||
|  |   export default { | ||||||
|  |     name: 'AppMaterialLibrary', | ||||||
|  |     label: '素材库', | ||||||
|  |  | ||||||
|  |     props: { | ||||||
|  |       instance: Function, | ||||||
|  |       dict: Object | ||||||
|  |     }, | ||||||
|  |  | ||||||
|  |     data () { | ||||||
|  |       return { | ||||||
|  |         component: 'List', | ||||||
|  |         params: {} | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |  | ||||||
|  |     components: { | ||||||
|  |       List | ||||||
|  |     }, | ||||||
|  |  | ||||||
|  |     mounted () { | ||||||
|  |     }, | ||||||
|  |  | ||||||
|  |     methods: { | ||||||
|  |       onChange (data) { | ||||||
|  |         if (data.type === 'list') { | ||||||
|  |           this.component = 'List' | ||||||
|  |           this.params = data.params | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | </script> | ||||||
|  |  | ||||||
|  | <style lang="scss"> | ||||||
|  |   .AppMaterialLibrary-wrapper { | ||||||
|  |     height: 100%; | ||||||
|  |     background: #F3F6F9; | ||||||
|  |     overflow: auto; | ||||||
|  |   } | ||||||
|  | </style> | ||||||
							
								
								
									
										177
									
								
								project/sass/apps/AppMaterialLibrary/components/List.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										177
									
								
								project/sass/apps/AppMaterialLibrary/components/List.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,177 @@ | |||||||
|  | <template> | ||||||
|  |   <ai-list class="AppMaterialLibrary"> | ||||||
|  |     <template slot="title"> | ||||||
|  |       <ai-title title="素材库" isShowBottomBorder> | ||||||
|  |         <template #sub> | ||||||
|  |           <span>网格员和居民触发的风险事件,将通过应用消息即时提醒相关人员进行跟进</span> | ||||||
|  |         </template> | ||||||
|  |       </ai-title> | ||||||
|  |     </template> | ||||||
|  |     <template #left> | ||||||
|  |       <div class="left"> | ||||||
|  |         <div class="title"> | ||||||
|  |           <h2>分组</h2> | ||||||
|  |           <el-button icon="iconfont iconAdd">添加分组</el-button> | ||||||
|  |         </div> | ||||||
|  |         <el-scrollbar class="group-list"> | ||||||
|  |           <div class="item"> | ||||||
|  |             <h2>全部分类</h2> | ||||||
|  |           </div> | ||||||
|  |         </el-scrollbar> | ||||||
|  |       </div> | ||||||
|  |     </template> | ||||||
|  |     <template slot="content"> | ||||||
|  |       <ai-search-bar class="search-bar"> | ||||||
|  |         <template #left> | ||||||
|  |           <el-button size="small" type="primary" icon="iconfont iconAdd" @click="toAdd('')">添加话术</el-button> | ||||||
|  |         </template> | ||||||
|  |         <template slot="right"> | ||||||
|  |           <el-input | ||||||
|  |             v-model="search.taskTitle" | ||||||
|  |             size="small" | ||||||
|  |             v-throttle="() => { search.current = 1, getList() }" | ||||||
|  |             placeholder="请输入任务名称" | ||||||
|  |             clearable | ||||||
|  |             @clear="search.current = 1, search.taskTitle = '', getList()" | ||||||
|  |             suffix-icon="iconfont iconSearch"> | ||||||
|  |           </el-input> | ||||||
|  |         </template> | ||||||
|  |       </ai-search-bar> | ||||||
|  |       <ai-table | ||||||
|  |         :tableData="tableData" | ||||||
|  |         :col-configs="colConfigs" | ||||||
|  |         :total="total" | ||||||
|  |         v-loading="loading" | ||||||
|  |         style="margin-top: 6px; width: 100%;" | ||||||
|  |         :current.sync="search.current" | ||||||
|  |         :size.sync="search.size" | ||||||
|  |         @getList="getList"> | ||||||
|  |         <el-table-column slot="user" width="140px" label="创建人" align="center"> | ||||||
|  |           <template slot-scope="{ row }"> | ||||||
|  |             <div class="userinfo"> | ||||||
|  |               <span> | ||||||
|  |                 <ai-open-data type="userName" :openid="row.createUserId"></ai-open-data> | ||||||
|  |               </span> | ||||||
|  |               <span style="color: #999"> | ||||||
|  |                 <ai-open-data type="departmentName" :openid="row.createUserDept"></ai-open-data> | ||||||
|  |               </span> | ||||||
|  |             </div> | ||||||
|  |           </template> | ||||||
|  |         </el-table-column> | ||||||
|  |         <el-table-column slot="options" width="140px" fixed="right" label="操作" align="center"> | ||||||
|  |           <template slot-scope="{ row }"> | ||||||
|  |             <div class="table-options"> | ||||||
|  |               <el-button type="text" @click="remindExamine(row.id)" v-if="['0'].includes(row.status)">催办</el-button> | ||||||
|  |               <el-button type="text" @click="cancel(row.id)" v-if="['0'].includes(row.status)">撤回</el-button> | ||||||
|  |               <el-button type="text" @click="toDetail(row.id)">详情</el-button> | ||||||
|  |               <el-button type="text" @click="toAdd(row.id)" v-if="['1', '3'].includes(row.status)">编辑</el-button> | ||||||
|  |             </div> | ||||||
|  |           </template> | ||||||
|  |         </el-table-column> | ||||||
|  |       </ai-table> | ||||||
|  |     </template> | ||||||
|  |   </ai-list> | ||||||
|  | </template> | ||||||
|  |  | ||||||
|  | <script> | ||||||
|  |   export default { | ||||||
|  |     name: 'List', | ||||||
|  |  | ||||||
|  |     props: { | ||||||
|  |       instance: Function, | ||||||
|  |       dict: Object | ||||||
|  |     }, | ||||||
|  |  | ||||||
|  |     data() { | ||||||
|  |       return { | ||||||
|  |         search: { | ||||||
|  |           current: 1, | ||||||
|  |           size: 10, | ||||||
|  |           taskTitle: '', | ||||||
|  |           endTime: '' | ||||||
|  |         }, | ||||||
|  |         user: [], | ||||||
|  |         tableData: [], | ||||||
|  |         loading: false, | ||||||
|  |         total: 0, | ||||||
|  |         colConfigs: [ | ||||||
|  |           { prop: 'taskTitle', label: '任务名称' }, | ||||||
|  |           { prop: 'typeName', label: '群发类型', align: 'center' }, | ||||||
|  |           { slot: 'user', label: '创建人', openType: 'userName', align: 'center' }, | ||||||
|  |           { prop: 'choiceTime', label: '群发时间', align: 'center' }, | ||||||
|  |           { | ||||||
|  |             prop: 'status', | ||||||
|  |             align: 'center', | ||||||
|  |             label: '状态', | ||||||
|  |             render: (h, {row}) => { | ||||||
|  |               return h('span', { | ||||||
|  |                 style: { | ||||||
|  |                   color: this.dict.getColor('mstStatus', row.status) | ||||||
|  |                 } | ||||||
|  |               }, this.dict.getLabel('mstStatus', row.status)) | ||||||
|  |             } | ||||||
|  |           }, | ||||||
|  |           { prop: 'completionRate', label: '任务完成率', align: 'center', formart: v => v ? v === '0.0' ? '0%' : `${v}%` : '-' } | ||||||
|  |         ] | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |  | ||||||
|  |     created () { | ||||||
|  |       this.dict.load('mstStatus', 'mstSendType').then(() => { | ||||||
|  |         // this.getList() | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |  | ||||||
|  |     methods: { | ||||||
|  |       getList() { | ||||||
|  |         this.loading = true | ||||||
|  |         this.instance.post(`/app/appmasssendingtask/list`, null, { | ||||||
|  |           params: { | ||||||
|  |             ...this.search, | ||||||
|  |           } | ||||||
|  |         }).then(res => { | ||||||
|  |           if (res.code == 0) { | ||||||
|  |             this.tableData = res.data.records.map(v => { | ||||||
|  |               return { | ||||||
|  |                 ...v, | ||||||
|  |                 typeName: '群发居民群' | ||||||
|  |               } | ||||||
|  |             }) | ||||||
|  |             this.total = res.data.total | ||||||
|  |  | ||||||
|  |             this.$nextTick(() => { | ||||||
|  |               this.loading = false | ||||||
|  |             }) | ||||||
|  |           } else { | ||||||
|  |             this.loading = false | ||||||
|  |           } | ||||||
|  |         }).catch(() => { | ||||||
|  |           this.loading = false | ||||||
|  |         }) | ||||||
|  |       }, | ||||||
|  |  | ||||||
|  |       remove(id) { | ||||||
|  |         this.$confirm('确定删除该数据?').then(() => { | ||||||
|  |           this.instance.post(`/app/appmasssendingtask/delete?ids=${id}`).then(res => { | ||||||
|  |             if (res.code == 0) { | ||||||
|  |               this.$message.success('删除成功!') | ||||||
|  |               this.getList() | ||||||
|  |             } | ||||||
|  |           }) | ||||||
|  |         }) | ||||||
|  |       }, | ||||||
|  |  | ||||||
|  |       toAdd(id) { | ||||||
|  |       }, | ||||||
|  |  | ||||||
|  |       toDetail (id) { | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | </script> | ||||||
|  |  | ||||||
|  | <style lang="scss" scoped> | ||||||
|  |   .AppAnnounce { | ||||||
|  |     height: 100%; | ||||||
|  |   } | ||||||
|  | </style> | ||||||
		Reference in New Issue
	
	Block a user