| | |
| | | import 'nprogress/nprogress.css'; |
| | | import { getPostList } from '@/api/system/post'; |
| | | import { getDeptTree } from '@/api/system/dept'; |
| | | import func from "@/utils/func"; |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | }, |
| | | { |
| | | label: "姓名", |
| | | // prop: "name", |
| | | prop: 'realName', |
| | | prop: "name", |
| | | // prop: 'realName', |
| | | type: "input", |
| | | search: true, |
| | | rules: [ |
| | |
| | | dicData: [], |
| | | props: { |
| | | label: 'title', |
| | | value: 'id', |
| | | value: 'title', |
| | | }, |
| | | control: (res, form) => { |
| | | this.selectObj.deptList.some(item => { |
| | | if (item.title === res) { |
| | | form.deptId = item.id || '' |
| | | return |
| | | } else { |
| | | if (item.children) { |
| | | item.children.some(cItem => { |
| | | if (cItem.title === res) { |
| | | form.deptId = item.id || '' |
| | | return true |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | rules: [ |
| | | { |
| | |
| | | dicData: [], |
| | | props: { |
| | | label: 'postName', |
| | | value: 'id', |
| | | value: 'postName', |
| | | }, |
| | | control: (res, form) => { |
| | | const value = this.selectObj.postList.find(item => item.postName === res) |
| | | form.postId = value?.id || '' |
| | | |
| | | }, |
| | | rules: [ |
| | | { |
| | |
| | | // }, |
| | | ] |
| | | }, |
| | | data: [] |
| | | data: [], |
| | | selectObj: {} |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | row.account = row.phone |
| | | row.realName = row.name |
| | | row.userType = 2 |
| | | row.roleId = this.$store.state.user.userInfo?.role_id || '1123598816738675202' |
| | | // 转换值 |
| | | add(row).then(() => { |
| | | this.onLoad(this.page); |
| | |
| | | item.dicData = res.data.data |
| | | } |
| | | }) |
| | | this.selectObj.deptList = res.data.data |
| | | }); |
| | | getPostList(tenantId).then(res => { |
| | | this.option.column.forEach(item => { |
| | |
| | | item.dicData = res.data.data |
| | | } |
| | | }) |
| | | this.selectObj.postList = res.data.data |
| | | }); |
| | | }, |
| | | }, |