feat(xumu): 添加认证审核功能
- 新增 AppAuthManage组件作为认证审核的路由组件- 添加 authAdd 和 authList两个子组件分别用于添加认证和认证列表 - 实现了认证列表的展示、搜索和分页功能 - 添加了认证材料的查看和上传功能 - 优化了表单布局,增加了 row 类样式
This commit is contained in:
		
							
								
								
									
										124
									
								
								project/xumu/AppAccountConfigManage/AppAccountConfigManage.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										124
									
								
								project/xumu/AppAccountConfigManage/AppAccountConfigManage.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,124 @@ | |||||||
|  | <script> | ||||||
|  | import {mapState} from "vuex"; | ||||||
|  |  | ||||||
|  | export default { | ||||||
|  |   name: "AppAccountConfigManage", | ||||||
|  |   label: "配置管理", | ||||||
|  |   props: { | ||||||
|  |     instance: Function, | ||||||
|  |     dict: Object, | ||||||
|  |     permissions: Function | ||||||
|  |   }, | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       columns: [ | ||||||
|  |         {label: "序号", type: "index"}, | ||||||
|  |         {label: "账号", prop: "userName"}, | ||||||
|  |         {label: "姓名", prop: "name"}, | ||||||
|  |         {label: "角色", prop: "roleName"}, | ||||||
|  |         {label: "所属端", prop: "type", dict: "roleType", width: 120, align: 'center'}, | ||||||
|  |         {label: "状态", prop: "configStatus", dict: "configStatus", width: 120, align: 'center'}, | ||||||
|  |       ], | ||||||
|  |       tableData: [], | ||||||
|  |       page: {pageNum: 1, pageSize: 10, total: 0}, | ||||||
|  |       search: {name: ""}, | ||||||
|  |       dialog: false, | ||||||
|  |       userId: "", | ||||||
|  |       treeData: [] | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   computed: { | ||||||
|  |     ...mapState(['user']) | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  |     getTableData() { | ||||||
|  |       this.instance.post("/user/config/page", null, { | ||||||
|  |         params: {...this.page, ...this.search} | ||||||
|  |       }).then(res => { | ||||||
|  |         if (res?.data) { | ||||||
|  |           this.tableData = res.data?.records | ||||||
|  |           this.page.total = res.data.total | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |     getTreeData() { | ||||||
|  |       const {userId} = this | ||||||
|  |       this.instance.post("/siteUser/querySiteByUserId", null, {params: {userId}}).then(res => { | ||||||
|  |         if (res?.data) { | ||||||
|  |           this.treeData = res.data | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |     handleDelete(node) { | ||||||
|  |       this.$confirm("是否要删除该节点?").then(() => { | ||||||
|  |         this.instance.post("/siteUser/del", null, {params: {ids: node.id}}).then(res => { | ||||||
|  |           if (res?.code == '0' && res?.data != 1) { | ||||||
|  |             this.$message.success("删除成功!") | ||||||
|  |             this.getTreeData() | ||||||
|  |           } else { | ||||||
|  |             this.$message.error(res.msg) | ||||||
|  |           } | ||||||
|  |         }) | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |     createNode(data) { | ||||||
|  |       this.$prompt("请输入名称").then(({value}) => { | ||||||
|  |         const {userId} = this | ||||||
|  |         this.instance.post("/siteUser/add", null, {params: {name: value, parentId: data.id, userId}}).then(res => { | ||||||
|  |           if (res?.code == '0' && res?.data != 1) { | ||||||
|  |             this.$message.success("新增成功!") | ||||||
|  |             this.getTreeData() | ||||||
|  |           } else { | ||||||
|  |             this.$message.error(res.msg) | ||||||
|  |           } | ||||||
|  |         }) | ||||||
|  |       }) | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   created() { | ||||||
|  |     this.dict.load("roleType", "configStatus") | ||||||
|  |     this.getTableData() | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | </script> | ||||||
|  |  | ||||||
|  | <template> | ||||||
|  |   <ai-page class="AppAccountConfigManage" :title="$options.label"> | ||||||
|  |     <ai-search-bar> | ||||||
|  |       <template #right> | ||||||
|  |         <el-input size="small" placeholder="搜索账号" v-model="search.name" clearable | ||||||
|  |                   @change="page.pageNum=1, getTableData()" @getList="getTableData"/> | ||||||
|  |       </template> | ||||||
|  |     </ai-search-bar> | ||||||
|  |     <ai-table :tableData="tableData" :colConfigs="columns" :dict="dict" @getList="getTableData" | ||||||
|  |               :total="page.total" :current.sync="page.pageNum" :size.sync="page.pageSize"> | ||||||
|  |       <el-table-column slot="options" label="操作" fixed="right" align="center"> | ||||||
|  |         <template slot-scope="{row}"> | ||||||
|  |           <div class="table-options"> | ||||||
|  |             <el-button type="text" @click="dialog=true,userId=row.id">配置</el-button> | ||||||
|  |           </div> | ||||||
|  |         </template> | ||||||
|  |       </el-table-column> | ||||||
|  |     </ai-table> | ||||||
|  |     <ai-dialog v-model="dialog" title="认证材料" width="500px" @close="userId=''" | ||||||
|  |                @open="getTreeData" customFooter> | ||||||
|  |       <el-button class="mar-b8" type="primary" @click="createNode(treeData)">新增根节点</el-button> | ||||||
|  |       <el-tree :data="treeData" :props="{label:'name'}" default-expand-all> | ||||||
|  |         <template slot-scope="{node,data}"> | ||||||
|  |           <div class="flex" style="width: 100%"> | ||||||
|  |             <span class="fill" v-text="node.label"/> | ||||||
|  |             <el-button size="mini" type="text" @click="createNode(data)">增加子节点</el-button> | ||||||
|  |             <el-button size="mini" type="text" @click="handleDelete(data)">删除</el-button> | ||||||
|  |           </div> | ||||||
|  |         </template> | ||||||
|  |       </el-tree> | ||||||
|  |       <el-button slot="footer" @click="dialog=false">关闭</el-button> | ||||||
|  |     </ai-dialog> | ||||||
|  |   </ai-page> | ||||||
|  | </template> | ||||||
|  |  | ||||||
|  | <style scoped lang="scss"> | ||||||
|  | .AppAccountConfigManage { | ||||||
|  |   height: 100%; | ||||||
|  | } | ||||||
|  | </style> | ||||||
| @@ -404,8 +404,10 @@ div[flex], .flex { | |||||||
|   } |   } | ||||||
|  |  | ||||||
|   .el-message-box__content { |   .el-message-box__content { | ||||||
|     padding-left: 77px; |  | ||||||
|     padding-top: 4px; |     padding-top: 4px; | ||||||
|  |     min-height: 60px; | ||||||
|  |     padding-left: 40px; | ||||||
|  |     padding-right: 40px; | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   .el-message-box__title { |   .el-message-box__title { | ||||||
| @@ -426,7 +428,6 @@ div[flex], .flex { | |||||||
|     font-size: 16px; |     font-size: 16px; | ||||||
|     color: #333; |     color: #333; | ||||||
|     font-weight: bold; |     font-weight: bold; | ||||||
|     min-height: 60px; |  | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   .el-message-box__btns { |   .el-message-box__btns { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user