| | |
| | | <span v-if="typeTABS.prop === 'tab1'"> --> |
| | | <avue-crud |
| | | class="tablesss" |
| | | v-model="form" |
| | | :option="option" |
| | | :data="data" |
| | | :page.sync="page" |
| | | ref="crudrec" |
| | | :permission="permissionList" |
| | | :before-open="beforeOpen" |
| | | @on-load="onLoad" |
| | | :table-loading="loading" |
| | | @row-save="rowSave" |
| | |
| | | import { mapGetters } from "vuex"; |
| | | import { mapState } from "vuex"; |
| | | import { getToken } from "@/util/auth"; |
| | | import {getDetail} from "@/api/check/postFiling"; |
| | | export default { |
| | | name:"dispatchList", |
| | | data() { |
| | |
| | | } |
| | | ] |
| | | }, |
| | | form:{}, |
| | | option: { |
| | | tip: false, |
| | | index: true, |
| | |
| | | ] |
| | | }, |
| | | { |
| | | label: "企业名称", |
| | | prop: "deptId", |
| | | type: "tree", |
| | | overHidden: true, |
| | | dicUrl: "", |
| | | props: { |
| | | label: "title", |
| | | value: "id" |
| | | }, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择企业名称", |
| | | trigger: "click" |
| | | } |
| | | ], |
| | | labelWidth: 138, |
| | | width: 180, |
| | | searchLabelWidth: 80, |
| | | search: true, |
| | | searchSpan: 4 |
| | | }, |
| | | |
| | | { |
| | | label: "派遣单位类型", |
| | | prop: "district", |
| | | type: "select", |
| | |
| | | dataType: "number" |
| | | }, |
| | | { |
| | | label: "企业名称", |
| | | prop: "deptId", |
| | | type: "tree", |
| | | overHidden: true, |
| | | dicUrl: "", |
| | | label: "派遣单位行业", |
| | | prop: "profession", |
| | | type: "select", |
| | | search: false, |
| | | dicUrl: |
| | | "/api/blade-system/dict-biz/dictionary?code=dispatchProfession", |
| | | props: { |
| | | label: "title", |
| | | value: "id" |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | }, |
| | | searchLabelWidth: 110, |
| | | overHidden: true, |
| | | searchSpan: 4, |
| | | width: 100, |
| | | labelWidth: 138, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择企业名称", |
| | | message: "请选择派遣单位行业", |
| | | trigger: "click" |
| | | } |
| | | ], |
| | | labelWidth: 138, |
| | | width: 180, |
| | | searchLabelWidth: 80, |
| | | search: true, |
| | | searchSpan: 4 |
| | | dataType: "number" |
| | | }, |
| | | { |
| | | label: " 派遣单位地址", |
| | | prop: "address", |
| | | labelWidth: 138, |
| | | span:24, |
| | | }, |
| | | |
| | | { |
| | | label: "保安服务类型", |
| | | prop: "serveType", |
| | |
| | | trigger: "click" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: " 派遣单位地址", |
| | | prop: "address", |
| | | labelWidth: 138 |
| | | }, |
| | | { |
| | | label: "合同开始时间", |
| | |
| | | trigger: "click" |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | { |
| | | label:"地图选点", |
| | | labelWidth: 138, |
| | | width: 110, |
| | | prop:"mapAddress", |
| | | type: "map", |
| | | span:24, |
| | | hide:true, |
| | | value:[112.85857823133,35.496284586473,""], |
| | | rules: [ |
| | | { |
| | | required: false, |
| | | message: "请选择点位", |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | }, |
| | | ] |
| | | }, |
| | | |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | this.form['mapAddress'] = [this.form.longitude,this.form.latitude,this.form.address] |
| | | } |
| | | done(); |
| | | }, |
| | | handleChangeTABS(column) { |
| | | this.typeTABS = column; |
| | | if (column.prop == "tab1") { |
| | |
| | | if (this.useifid != 266) { |
| | | form["deptId"] = this.useifid; |
| | | } |
| | | form.longitude =form.mapAddress[0] |
| | | form.latitude = form.mapAddress[1] |
| | | adddata(form).then( |
| | | res => { |
| | | this.onLoad(this.page); |
| | |
| | | if (this.useifid != 266) { |
| | | row["deptId"] = this.useifid; |
| | | } |
| | | row.longitude = this.form.mapAddress[0] |
| | | row.latitude = this.form.mapAddress[1] |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | |
| | | @current-change="currentChange" |
| | | @on-load="onLoad" |
| | | > |
| | | <template slot="menuLeft"> |
| | | |
| | | <el-button |
| | | type="success" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-upload2" |
| | | v-if="permission.dispatch_import" |
| | | @click="handleImport" |
| | | >批量导入 |
| | | </el-button> |
| | | </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> |
| | | |
| | | </basic-container> |
| | | </template> |
| | | |
| | |
| | | import { update, getSecurityDispatcherTree } from "@/api/system/user"; |
| | | import { mapState } from "vuex"; |
| | | import { mapGetters } from "vuex"; |
| | | import {getToken} from "@/util/auth"; |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | } |
| | | ] |
| | | }, |
| | | useifid: 266 |
| | | useifid: 266, |
| | | |
| | | excelBox: false, |
| | | excelForm: {}, |
| | | excelOption: { |
| | | submitBtn: false, |
| | | emptyBtn: false, |
| | | column: [ |
| | | { |
| | | label: "模板上传", |
| | | prop: "excelFile", |
| | | type: "upload", |
| | | drag: true, |
| | | loadText: "模板上传中,请稍等", |
| | | span: 24, |
| | | propsHttp: { |
| | | res: "data" |
| | | }, |
| | | tip: "请上传 .xls,.xlsx 标准格式文件", |
| | | action: "/api/dispatcher/import-dispatcher" |
| | | }, |
| | | // { |
| | | // label: "数据覆盖", |
| | | // prop: "isCovered", |
| | | // type: "switch", |
| | | // align: "center", |
| | | // width: 80, |
| | | // dicData: [ |
| | | // { |
| | | // label: "否", |
| | | // value: 0, |
| | | // }, |
| | | // { |
| | | // label: "是", |
| | | // value: 1, |
| | | // }, |
| | | // ], |
| | | // value: 0, |
| | | // slot: true, |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "请选择是否覆盖", |
| | | // trigger: "blur", |
| | | // }, |
| | | // ], |
| | | // }, |
| | | { |
| | | label: "模板下载", |
| | | prop: "excelTemplate", |
| | | formslot: true, |
| | | span: 24 |
| | | } |
| | | ] |
| | | }, |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | handleTemplate() { |
| | | window.open( |
| | | `/api/dispatcher/export-template?${ |
| | | this.website.tokenHeader |
| | | }=${getToken()}&` |
| | | ); |
| | | }, |
| | | handleImport() { |
| | | this.excelBox = true; |
| | | }, |
| | | uploadAfter(res, done, loading, column) { |
| | | window.console.log(column); |
| | | this.excelBox = false; |
| | | this.refreshChange(); |
| | | done(); |
| | | }, |
| | | |
| | | handleChangeTABS(column) { |
| | | this.typeTABS = column; |
| | | if (column.prop == "tab1") { |