| | |
| | | <template> |
| | | <basic-container> |
| | | <div |
| | | :class="[ |
| | | 'dispatch', |
| | | $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '', |
| | | ]" |
| | | > |
| | | <!-- <avue-tabs :option="optionTABS" @change="handleChangeTABS"></avue-tabs> |
| | | <basic-container |
| | | :class="[ |
| | | 'dispatch', |
| | | $store.state.control.screenSize == 1366 ? 'smallSize' : 'normalSize', |
| | | $store.state.control.windowWidth >= 1024 ? 'tooRowSearch1' : '' |
| | | ]" |
| | | > |
| | | <!-- <avue-tabs :option="optionTABS" @change="handleChangeTABS"></avue-tabs> |
| | | <span v-if="typeTABS.prop === 'tab1'"> --> |
| | | <avue-crud |
| | | :option="option" |
| | | :data="data" |
| | | :page.sync="page" |
| | | ref="crudrec" |
| | | @on-load="onLoad" |
| | | :table-loading="loading" |
| | | @row-save="rowSave" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @row-update="rowUpdate" |
| | | @row-del="rowDel" |
| | | @selection-change="selectionChange" |
| | | @refresh-change="refreshChange" |
| | | @row-click="rowClick" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-delete" |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | | <avue-crud |
| | | class="tablesss" |
| | | :option="option" |
| | | :data="data" |
| | | :page.sync="page" |
| | | ref="crudrec" |
| | | @on-load="onLoad" |
| | | :table-loading="loading" |
| | | @row-save="rowSave" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @row-update="rowUpdate" |
| | | @row-del="rowDel" |
| | | @selection-change="selectionChange" |
| | | @refresh-change="refreshChange" |
| | | @row-click="rowClick" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-delete" |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | | |
| | | <el-button |
| | | type="success" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-upload2" |
| | | @click="handleImport" |
| | | >批量导入 |
| | | <el-button |
| | | type="success" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-upload2" |
| | | @click="handleImport" |
| | | >批量导入 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{ row }" slot="jurisdiction"> |
| | | {{ row.jurisdiction == -1 ? "" : row.jurisdiction }} |
| | | </template> |
| | | </avue-crud> |
| | | |
| | | <el-dialog |
| | | title="派遣单位导入" |
| | | append-to-body |
| | | :visible.sync="excelBox" |
| | | width="555px" |
| | | > |
| | | <avue-form |
| | | :option="excelOption" |
| | | v-model="excelForm" |
| | | :upload-after="uploadAfter" |
| | | > |
| | | <template slot="excelTemplate"> |
| | | <el-button type="primary" @click="handleTemplate"> |
| | | 点击下载<i class="el-icon-download el-icon--right"></i> |
| | | </el-button> |
| | | </template> |
| | | </avue-form> |
| | | </el-dialog> |
| | | |
| | | <template slot-scope="{ row }" slot="jurisdiction"> |
| | | {{ row.jurisdiction == -1 ? "" : row.jurisdiction }} |
| | | </template> |
| | | </avue-crud> |
| | | |
| | | <el-dialog |
| | | title="派遣单位导入" |
| | | append-to-body |
| | | :visible.sync="excelBox" |
| | | width="555px" |
| | | > |
| | | <avue-form |
| | | :option="excelOption" |
| | | v-model="excelForm" |
| | | :upload-after="uploadAfter" |
| | | > |
| | | <template slot="excelTemplate"> |
| | | <el-button type="primary" @click="handleTemplate"> |
| | | 点击下载<i class="el-icon-download el-icon--right"></i> |
| | | </el-button> |
| | | </template> |
| | | </avue-form> |
| | | </el-dialog> |
| | | |
| | | <!-- </span> |
| | | <!-- </span> |
| | | <span v-else-if="typeTABS.prop === 'tab2'"> |
| | | <avue-crud |
| | | :option="option1" |
| | |
| | | </template> |
| | | </avue-crud> |
| | | </span> --> |
| | | <!-- <span v-else-if="typeTABS.prop === 'tab3'">选项卡内容3</span> --> |
| | | </div> |
| | | <!-- <span v-else-if="typeTABS.prop === 'tab3'">选项卡内容3</span> --> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getdata, |
| | | adddata, |
| | | update, |
| | | remove, |
| | | } from "@/api/dispatch/dispatch"; |
| | | import { getdata, adddata, update, remove } from "@/api/dispatch/dispatch"; |
| | | import { mapGetters } from "vuex"; |
| | | import { mapState } from "vuex"; |
| | | import { getToken } from "@/util/auth"; |
| | | export default { |
| | | data() { |
| | | var phones = (rule, value, callback) => { |
| | | window.yanzhengphons = |
| | | /^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/; |
| | | window.yanzhengphons = /^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/; |
| | | if (!yanzhengphons.test(value)) { |
| | | callback(new Error("请输入正确电话")); |
| | | } else { |
| | |
| | | { |
| | | icon: "el-icon-info", |
| | | label: "派遣服务公司登记", |
| | | prop: "tab1", |
| | | prop: "tab1" |
| | | }, |
| | | { |
| | | icon: "el-icon-info", |
| | | label: "派遣记录", |
| | | prop: "tab2", |
| | | }, |
| | | prop: "tab2" |
| | | } |
| | | // { |
| | | // icon: "el-icon-info", |
| | | // label: "选项卡3", |
| | | // prop: "tab3", |
| | | // }, |
| | | ], |
| | | ] |
| | | }, |
| | | |
| | | loading: true, //派遣服务公司登记 |
| | |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | ...this.$store.state.control.changePageSize, |
| | | ...this.$store.state.control.changePageSize |
| | | }, |
| | | query: {}, |
| | | data: [], |
| | |
| | | loadText: "模板上传中,请稍等", |
| | | span: 24, |
| | | propsHttp: { |
| | | res: "data", |
| | | res: "data" |
| | | }, |
| | | tip: "请上传 .xls,.xlsx 标准格式文件", |
| | | action: "/api/dispatcherUnit/import-dispatcherUnit", |
| | | action: "/api/dispatcherUnit/import-dispatcherUnit" |
| | | }, |
| | | // { |
| | | // label: "数据覆盖", |
| | |
| | | label: "模板下载", |
| | | prop: "excelTemplate", |
| | | formslot: true, |
| | | span: 24, |
| | | }, |
| | | ], |
| | | span: 24 |
| | | } |
| | | ] |
| | | }, |
| | | option: { |
| | | tip: false, |
| | |
| | | menuWidth: 160, |
| | | align: "center", |
| | | selection: true, |
| | | menu: false, |
| | | ...this.$store.state.control.clearOtherBut, |
| | | column: [ |
| | | { |
| | |
| | | { |
| | | required: true, |
| | | message: "请输入派遣单位名称", |
| | | trigger: "click", |
| | | }, |
| | | ], |
| | | trigger: "click" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "派遣单位类型", |
| | | prop: "district", |
| | | type: "select", |
| | | search: false, |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=dispatcherUnitType", |
| | | dicUrl: |
| | | "/api/blade-system/dict-biz/dictionary?code=dispatcherUnitType", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | |
| | | { |
| | | required: true, |
| | | message: "请选择派遣单位类型", |
| | | trigger: "click", |
| | | }, |
| | | trigger: "click" |
| | | } |
| | | ], |
| | | dataType: "number", |
| | | dataType: "number" |
| | | }, |
| | | { |
| | | label: "企业名称", |
| | |
| | | dicUrl: "", |
| | | props: { |
| | | label: "title", |
| | | value: "id", |
| | | value: "id" |
| | | }, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择企业名称", |
| | | trigger: "click", |
| | | }, |
| | | trigger: "click" |
| | | } |
| | | ], |
| | | labelWidth: 138, |
| | | width: 180, |
| | | searchLabelWidth: 80, |
| | | search: true, |
| | | searchSpan: 4, |
| | | searchSpan: 4 |
| | | }, |
| | | { |
| | | label: "保安服务类型", |
| | |
| | | searchSpan: 4, |
| | | overHidden: true, |
| | | // span: 12, |
| | | labelWidth: 138, |
| | | labelWidth: 138 |
| | | }, |
| | | { |
| | | label: "合同生效时间", |
| | |
| | | { |
| | | required: true, |
| | | message: "请输入时间", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "所属辖区", |
| | |
| | | dicUrl: "/api/jurisdiction/lazy-tree", |
| | | props: { |
| | | label: "title", |
| | | value: "id", |
| | | value: "id" |
| | | }, |
| | | checkStrictly: true, |
| | | slot: true, |
| | |
| | | { |
| | | required: false, |
| | | message: "请选择所属辖区", |
| | | trigger: "click", |
| | | }, |
| | | ], |
| | | trigger: "click" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "所属辖区", |
| | |
| | | viewDisplay: false, |
| | | overHidden: true, |
| | | labelWidth: 138, |
| | | width:100, |
| | | width: 100, |
| | | type: "tree", |
| | | dicUrl: "/api/jurisdiction/lazy-tree", |
| | | props: { |
| | | label: "title", |
| | | value: "id", |
| | | value: "id" |
| | | }, |
| | | checkStrictly: true, |
| | | slot: true, |
| | |
| | | { |
| | | required: false, |
| | | message: "请选择所属辖区", |
| | | trigger: "click", |
| | | }, |
| | | ], |
| | | trigger: "click" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: " 派遣单位地址", |
| | | prop: "address", |
| | | labelWidth: 138, |
| | | labelWidth: 138 |
| | | }, |
| | | { |
| | | label: "合同开始时间", |
| | |
| | | { |
| | | required: true, |
| | | message: "请选择开始时间", |
| | | trigger: "click", |
| | | }, |
| | | ], |
| | | trigger: "click" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "合同结束时间", |
| | |
| | | { |
| | | required: true, |
| | | message: "请选择结束时间", |
| | | trigger: "click", |
| | | }, |
| | | ], |
| | | trigger: "click" |
| | | } |
| | | ] |
| | | // searchSpan: 4, |
| | | // overHidden: true |
| | | }, |
| | | { |
| | | label: " 派遣单位联系人", |
| | | prop: "linkman", |
| | | labelWidth: 138, |
| | | labelWidth: 138 |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | |
| | | label: "派遣单位联系方式", |
| | | prop: "phone", |
| | | labelWidth: 138, |
| | | width: 130, |
| | | width: 130 |
| | | }, |
| | | { |
| | | label: " 负责人", |
| | |
| | | { |
| | | required: true, |
| | | message: "请输入负责人", |
| | | trigger: "click", |
| | | }, |
| | | ], |
| | | trigger: "click" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "负责人联系方式", |
| | |
| | | { |
| | | required: true, |
| | | message: "请输入联系方式", |
| | | trigger: "click", |
| | | }, |
| | | trigger: "click" |
| | | } |
| | | // { |
| | | // validator: phones, |
| | | // trigger: ["change", "blur"], |
| | | // }, |
| | | ], |
| | | ] |
| | | }, |
| | | |
| | | |
| | | { |
| | | label: "派遣保安员数", |
| | | prop: "num", |
| | |
| | | { |
| | | required: true, |
| | | message: "请输入派遣保安员数", |
| | | trigger: "click", |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | trigger: "click" |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | }, |
| | | |
| | | useifid: 266, |
| | | useifid: 266 |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | ...mapGetters(["userInfo"]), |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach((ele) => { |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | 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 |
| | | }) |
| | | }, |
| | | |
| | | methods: { |
| | | handleChangeTABS(column) { |
| | | this.typeTABS = column; |
| | |
| | | form["deptId"] = this.useifid; |
| | | } |
| | | adddata(form).then( |
| | | (res) => { |
| | | res => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | this.$refs.crudrec.toggleSelection(); |
| | | }); |
| | |
| | | window.localStorage.setItem("paqiandata", JSON.stringify(row)); |
| | | this.$router.push({ |
| | | path: "/dispatchChild", |
| | | query: { rowdispatch: "fromDispatch" }, |
| | | query: { rowdispatch: "fromDispatch" } |
| | | }); |
| | | }, |
| | | getStartTime() { |
| | |
| | | ...params, |
| | | beginTime: releaseTimeRange[0], |
| | | overTime: releaseTimeRange[1], |
| | | ...this.query, |
| | | ...this.query |
| | | }; |
| | | // values.releaseTimeRange = null; |
| | | } else { |
| | | values = { |
| | | ...params, |
| | | ...this.query, |
| | | ...this.query |
| | | }; |
| | | } |
| | | if (this.useifid != 266) { |
| | |
| | | page.pageSize, |
| | | // Object.assign(params, this.query) |
| | | values |
| | | ).then((res) => { |
| | | ).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | |
| | | } |
| | | } |
| | | window.localStorage.setItem("paqiandataS", JSON.stringify(this.data)); |
| | | this.$store.commit("setWindowSizeHeightAdd"); |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | |
| | | handleTemplate() { |
| | | window.open(`/api/dispatcherUnit/export-template?${ |
| | | this.website.tokenHeader |
| | | }=${getToken()}&` |
| | | ); |
| | | window.open( |
| | | `/api/dispatcherUnit/export-template?${ |
| | | this.website.tokenHeader |
| | | }=${getToken()}&` |
| | | ); |
| | | }, |
| | | handleImport() { |
| | | this.excelBox = true; |
| | |
| | | this.excelBox = false; |
| | | this.refreshChange(); |
| | | done(); |
| | | }, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$store.commit("setWindowSizeHeightAdd"); |
| | | this.typeTABS = this.optionTABS.column[0]; |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |