| | |
| | | <template> |
| | | <basic-container> |
| | | <div |
| | | :class="[ |
| | | 'dispatchChildoperable', |
| | | $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '', |
| | | ]" |
| | | <basic-container |
| | | :class="[ |
| | | 'dispatchChildoperable', |
| | | $store.state.control.screenSize == 1366 ? 'smallSize' : 'normalSize', |
| | | $store.state.control.windowWidth >= 1024 ? 'tooRowSearch1' : '' |
| | | ]" |
| | | > |
| | | <avue-crud |
| | | class="tablesss" |
| | | :option="option1" |
| | | :data="data1" |
| | | :page.sync="page1" |
| | | ref="crudrec1" |
| | | v-model="form" |
| | | :table-loading="loading1" |
| | | :before-open="beforeOpen" |
| | | @row-save="rowSave1" |
| | | @search-change="searchChange1" |
| | | @search-reset="searchReset1" |
| | | @row-update="rowUpdate1" |
| | | @row-del="rowDel1" |
| | | @selection-change="selectionChange1" |
| | | @refresh-change="refreshChange1" |
| | | @on-load="onLoad1" |
| | | > |
| | | <avue-crud |
| | | :option="option1" |
| | | :data="data1" |
| | | :page.sync="page1" |
| | | ref="crudrec1" |
| | | v-model="form" |
| | | :table-loading="loading1" |
| | | :before-open="beforeOpen" |
| | | @row-save="rowSave1" |
| | | @search-change="searchChange1" |
| | | @search-reset="searchReset1" |
| | | @row-update="rowUpdate1" |
| | | @row-del="rowDel1" |
| | | @selection-change="selectionChange1" |
| | | @refresh-change="refreshChange1" |
| | | > |
| | | </avue-crud> |
| | | </div> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </template> |
| | | |
| | |
| | | update1, |
| | | remove1, |
| | | getDispatcherUnitByDeptId, |
| | | overDispatcher, |
| | | overDispatcher |
| | | } from "@/api/dispatch/dispatch"; |
| | | import { update, getListByDeptId } from "@/api/system/user"; |
| | | import { mapState } from "vuex"; |
| | |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | ...this.$store.state.control.changePageSize, |
| | | ...this.$store.state.control.changePageSize |
| | | }, |
| | | form: {}, |
| | | query1: {}, |
| | |
| | | editBtnText: "变更派遣", |
| | | // addBtn: false, |
| | | // menuWidth: 160, |
| | | menu: false, |
| | | align: "center", |
| | | selection: true, |
| | | ...this.$store.state.control.clearOtherBut, |
| | |
| | | // searchSpan: 4, |
| | | minWidth: 210, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | editDisplay: false |
| | | }, |
| | | { |
| | | label: "保安公司", |
| | |
| | | cascaderItem: ["userIds"], |
| | | props: { |
| | | label: "title", |
| | | value: "id", |
| | | value: "id" |
| | | }, |
| | | width: 180, |
| | | dicUrl: `/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697`, |
| | |
| | | { |
| | | required: true, |
| | | message: "请输入保安公司", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "派遣单位", |
| | |
| | | // dicUrl: "/api/dispatcherUnit/page-tree?deptId={{key}}", |
| | | props: { |
| | | label: "name", |
| | | value: "id", |
| | | value: "id" |
| | | }, |
| | | hide: true, |
| | | searchSpan: 4, |
| | |
| | | { |
| | | required: true, |
| | | message: "请输入派遣单位", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "保安员", |
| | |
| | | hide: true, |
| | | props: { |
| | | label: "realName", |
| | | value: "id", |
| | | value: "id" |
| | | }, |
| | | // dicUrl: `/api/blade-user/page-security-units?dispatch=1&deptId={{key}}`, |
| | | dicUrl: `/api/blade-user/page-security-units?status=1&deptId={{key}}`, |
| | |
| | | { |
| | | required: true, |
| | | message: "请选择保安", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "保安员", |
| | |
| | | { |
| | | required: true, |
| | | message: "请选择保安", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | }, |
| | | |
| | | { |
| | |
| | | { |
| | | required: true, |
| | | message: "请输入身份证", |
| | | trigger: "click", |
| | | }, |
| | | ], |
| | | trigger: "click" |
| | | } |
| | | ] |
| | | // search: true, |
| | | // searchSpan: 4, |
| | | // overHidden: true |
| | |
| | | { |
| | | required: true, |
| | | message: "请输入派遣时间", |
| | | trigger: "click", |
| | | }, |
| | | ], |
| | | trigger: "click" |
| | | } |
| | | ] |
| | | // overHidden: true |
| | | }, |
| | | { |
| | |
| | | { |
| | | required: true, |
| | | message: "请输入结束时间", |
| | | trigger: "click", |
| | | }, |
| | | ], |
| | | trigger: "click" |
| | | } |
| | | ] |
| | | // search: true, |
| | | // searchSpan: 4, |
| | | // overHidden: true |
| | |
| | | { |
| | | required: true, |
| | | message: "请输入时间", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "派遣地址", |
| | |
| | | { |
| | | required: true, |
| | | message: "请输入派遣地址", |
| | | trigger: "click", |
| | | }, |
| | | ], |
| | | trigger: "click" |
| | | } |
| | | ] |
| | | // search: true, |
| | | // searchSpan: 4, |
| | | // overHidden: true |
| | | }, |
| | | ], |
| | | }, |
| | | } |
| | | ] |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | // }, |
| | | ids1() { |
| | | let ids1 = []; |
| | | this.selectionList1.forEach((ele) => { |
| | | this.selectionList1.forEach(ele => { |
| | | ids1.push(ele.id); |
| | | }); |
| | | return ids1.join(","); |
| | | }, |
| | | ...mapState({ |
| | | userInfo: (state) => state.user.userInfo, |
| | | userInfo: state => state.user.userInfo |
| | | }), |
| | | deps() { |
| | | return this.form.deptId; |
| | | }, |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | |
| | | // } |
| | | |
| | | adddata1(form).then( |
| | | (res) => { |
| | | res => { |
| | | this.onLoad1(this.page1); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | |
| | | this.onLoad1(this.page1); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | |
| | | this.$confirm("确定结束当前派遣?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return overDispatcher(row); |
| | |
| | | this.onLoad1(this.page1); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove1(this.ids1); |
| | |
| | | this.onLoad1(this.page1); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | this.$refs.crudrec1.toggleSelection(); |
| | | }); |
| | |
| | | ...params, |
| | | beginTime: releaseTimeRange[0], |
| | | overTime: releaseTimeRange[1], |
| | | ...this.query, |
| | | ...this.query |
| | | }; |
| | | values.releaseTimeRange = null; |
| | | } else { |
| | | values = { |
| | | ...params, |
| | | ...this.query, |
| | | ...this.query |
| | | }; |
| | | } |
| | | |
| | |
| | | page.pageSize, |
| | | // Object.assign(params, this.query) |
| | | values |
| | | ).then((res) => { |
| | | ).then(res => { |
| | | const data = res.data.data; |
| | | this.page1.total = data.total; |
| | | this.data1 = data.records; |
| | | this.loading1 = false; |
| | | // this.$nextTick(() => this.$refs.crudrec1.dicInit("cascader")); |
| | | console.log(this.form, 111111); |
| | | this.$store.commit("setWindowSizeHeightAdd"); |
| | | // console.log(this.form, 111111); |
| | | }); |
| | | }, |
| | | initData(type) { |
| | | var that = this; |
| | | if (type == 1) { |
| | | getDispatcherUnitByDeptId(null).then((res) => { |
| | | getDispatcherUnitByDeptId(null).then(res => { |
| | | const dispatcherUnitIdColumn = that.findObject( |
| | | this.option1.column, |
| | | "dispatcherUnitId" |
| | |
| | | }); |
| | | } |
| | | if (type == 2) { |
| | | getDispatcherUnitByDeptId(that.userInfo.dept_id).then((res) => { |
| | | getDispatcherUnitByDeptId(that.userInfo.dept_id).then(res => { |
| | | const dispatcherUnitIdColumn = that.findObject( |
| | | this.option1.column, |
| | | "dispatcherUnitId" |
| | | ); |
| | | dispatcherUnitIdColumn.dicData = res.data.data; |
| | | }); |
| | | getListByDeptId(that.userInfo.dept_id, 1).then((res) => { |
| | | getListByDeptId(that.userInfo.dept_id, 1).then(res => { |
| | | const userIdsColumn = that.findObject(this.option1.column, "userIds"); |
| | | userIdsColumn.dicData = res.data.data; |
| | | }); |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | // watch: { |
| | | // // "form.deptId"() { |
| | |
| | | // } |
| | | // }, |
| | | mounted() { |
| | | this.onLoad1(this.page1, this.query1); |
| | | }, |
| | | this.$store.commit("setWindowSizeHeightAdd"); |
| | | // this.onLoad1(this.page1, this.query1); |
| | | } |
| | | }; |
| | | </script> |
| | | |