| | |
| | | <script> |
| | | import { |
| | | getdata1, |
| | | adddata1, |
| | | update1, |
| | | saveDispatcher, |
| | | updateDispatcher, |
| | | remove1, |
| | | getDispatcherUnitByDeptId, |
| | | overDispatcher, |
| | | } from "@/api/dispatch/dispatch"; |
| | | import { update, getListByDeptId } from "@/api/system/user"; |
| | | import { update, getSecurityDispatcherTree } from "@/api/system/user"; |
| | | import { mapState } from "vuex"; |
| | | |
| | | export default { |
| | |
| | | searchSpan: 3, |
| | | search: true, |
| | | hide: true, |
| | | // props: { |
| | | // label: "realName", |
| | | // value: "id", |
| | | // }, |
| | | // dicUrl: `/api/blade-user/page-security-units?dispatch=1&deptId={{key}}`, |
| | | dicUrl: `/api/blade-user/security-dispatcher-tree?deptId={{key}}`, |
| | | dicData: [], |
| | | props: { |
| | | label: "realName", |
| | | label: "name", |
| | | value: "id", |
| | | }, |
| | | // dicUrl: `/api/blade-user/page-security-units?dispatch=1&deptId={{key}}`, |
| | | dicUrl: `/api/blade-user/page-security-units?status=1&deptId={{key}}`, |
| | | dicData: [], |
| | | //不包含父节点值 |
| | | leafOnly:true, |
| | | multiple: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | // value: "id", |
| | | // }, |
| | | // dicUrl: `/api/blade-user/page-security-units?dispatch=1&deptId={{key}}`, |
| | | dicData: [], |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | if (this.useifid != 266) { |
| | | form["deptId"] = this.useifid; |
| | | } |
| | | adddata1(form).then( |
| | | console.log(form,123456); |
| | | form["ids"] = form.userIds.join(","), |
| | | delete form.userIds; |
| | | console.log(form,321); |
| | | saveDispatcher(form).then( |
| | | (res) => { |
| | | this.onLoad1(this.page1); |
| | | this.$message({ |
| | |
| | | if (this.useifid != 266) { |
| | | row["deptId"] = this.useifid; |
| | | } |
| | | update1(row).then( |
| | | updateDispatcher(row).then( |
| | | () => { |
| | | this.onLoad1(this.page1); |
| | | this.$message({ |
| | |
| | | |
| | | beforeOpen(done, type) { |
| | | this.initFlag = true; |
| | | if(type=="edit"){ |
| | | // alert(1); |
| | | const userColumn = this.findObject(this.option1.column, "userIds"); |
| | | userColumn.multiple = false; |
| | | } |
| | | done(); |
| | | }, |
| | | |
| | |
| | | ); |
| | | dispatcherUnitIdColumn.dicData = res.data.data; |
| | | }); |
| | | getListByDeptId(that.userInfo.dept_id, 1).then((res) => { |
| | | getSecurityDispatcherTree(that.userInfo.dept_id, 1).then((res) => { |
| | | const userIdsColumn = that.findObject(this.option1.column, "userIds"); |
| | | userIdsColumn.dicData = res.data.data; |
| | | }); |