| | |
| | | <template> |
| | | <basic-container> |
| | | <div |
| | | :class="[ |
| | | 'securityUnit', |
| | | $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '', |
| | | ]" |
| | | <basic-container |
| | | :class="[ |
| | | 'securityUnit', |
| | | $store.state.control.screenSize == 1366 ? 'smallSize' : 'normalSize', |
| | | $store.state.control.windowWidth >= 1024 ? 'tooRowSearch1' : '' |
| | | ]" |
| | | > |
| | | <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" |
| | | > |
| | | <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-scope="{ row }" slot="znum"> |
| | | <el-tag |
| | | class="rowClickSelf" |
| | | @click="rowClickSelf(row)" |
| | | title="点击查看保安人员情况" |
| | | >{{ row.znum }}</el-tag |
| | | > |
| | | </template> |
| | | <!-- @row-click="rowClick" --> |
| | | <template slot-scope="{ row }" slot="znum"> |
| | | <el-tag |
| | | class="rowClickSelf" |
| | | @click="rowClickSelf(row)" |
| | | title="点击查看保安人员情况" |
| | | >{{ row.znum }}</el-tag |
| | | > |
| | | </template> |
| | | |
| | | <template slot-scope="{ type, size, row }" slot="menu"> |
| | | <el-button |
| | | icon="el-icon-s-custom" |
| | | :size="size" |
| | | :type="type" |
| | | @click.stop="rowClick(row)" |
| | | >查看 |
| | | </el-button> |
| | | <el-button |
| | | :size="size" |
| | | :type="type" |
| | | @click="handleUploadPage(row)" |
| | | icon="el-icon-circle-check" |
| | | >附件上传 |
| | | </el-button> |
| | | </template> |
| | | <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="handleImport1" |
| | | >批量导入 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </div> |
| | | <template slot-scope="{ type, size, row }" slot="menu"> |
| | | <el-button |
| | | icon="el-icon-s-custom" |
| | | :size="size" |
| | | :type="type" |
| | | @click.stop="rowClick(row)" |
| | | >查看 |
| | | </el-button> |
| | | <el-button |
| | | :size="size" |
| | | :type="type" |
| | | @click="handleUploadPage(row)" |
| | | icon="el-icon-circle-check" |
| | | >附件上传 |
| | | </el-button> |
| | | </template> |
| | | <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="handleImport1" |
| | | >批量导入 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <el-dialog |
| | | title="保安单位导入" |
| | | append-to-body |
| | |
| | | getdata, |
| | | adddata, |
| | | update, |
| | | remove, |
| | | remove |
| | | } from "@/api/securityUnit/securityUnit"; |
| | | import { mapGetters } from "vuex"; |
| | | import { getToken } from "@/util/auth"; |
| | |
| | | loadText: "文件上传中,请稍等", |
| | | span: 24, |
| | | propsHttp: { |
| | | res: "data", |
| | | res: "data" |
| | | }, |
| | | tip: "请上传 .xls,.xlsx 标准格式文件", |
| | | action: "/api/information/import-informaton", |
| | | action: "/api/information/import-informaton" |
| | | }, |
| | | { |
| | | label: "模板下载", |
| | | prop: "excelTemplate", |
| | | formslot: true, |
| | | span: 24, |
| | | }, |
| | | ], |
| | | span: 24 |
| | | } |
| | | ] |
| | | }, |
| | | loading: true, //保安单位基本信息 |
| | | selectionList: [], |
| | |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | ...this.$store.state.control.changePageSize, |
| | | ...this.$store.state.control.changePageSize |
| | | }, |
| | | treeData: [], |
| | | treeOption: { |
| | |
| | | column: [ |
| | | { |
| | | label: "自定义项", |
| | | prop: "label", |
| | | }, |
| | | ], |
| | | prop: "label" |
| | | } |
| | | ] |
| | | }, |
| | | props: { |
| | | labelText: "标题", |
| | | label: "title", |
| | | value: "id", |
| | | children: "children", |
| | | }, |
| | | children: "children" |
| | | } |
| | | }, |
| | | forms: false, |
| | | noshehuibianma: 0, |
| | |
| | | { |
| | | required: true, |
| | | message: "请选择企业名称", |
| | | trigger: "click", |
| | | }, |
| | | trigger: "click" |
| | | } |
| | | ], |
| | | overHidden: true, |
| | | overHidden: true |
| | | }, |
| | | { |
| | | label: "所属辖区", |
| | |
| | | dicUrl: "/api//jurisdiction/lazy-trees", |
| | | props: { |
| | | label: "title", |
| | | value: "id", |
| | | value: "id" |
| | | }, |
| | | rules: [ |
| | | { |
| | | required: false, |
| | | message: "请选择所属辖区", |
| | | trigger: "click", |
| | | }, |
| | | trigger: "click" |
| | | } |
| | | ], |
| | | overHidden: true, |
| | | overHidden: true |
| | | }, |
| | | { |
| | | label: "法定代表人", |
| | |
| | | { |
| | | required: false, |
| | | message: "请输入法定代表人", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "法定代表人电话", |
| | |
| | | { |
| | | required: false, |
| | | message: "请输入法定代表人电话", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "联系人", |
| | | prop: "contacts", |
| | | labelWidth: 145, |
| | | hide: true, |
| | | hide: true |
| | | }, |
| | | { |
| | | label: "联系电话", |
| | | prop: "contactscell", |
| | | labelWidth: 145, |
| | | hide: true, |
| | | hide: true |
| | | }, |
| | | { |
| | | label: "保安人数", |
| | |
| | | editDisplay: false, |
| | | viewDisabled: false, |
| | | viewDisplay: false, |
| | | searchLabelWidth: 100, |
| | | searchLabelWidth: 100 |
| | | }, |
| | | { |
| | | label: "派遣人数", |
| | |
| | | viewDisabled: false, |
| | | viewDisplay: false, |
| | | searchSpan: 4, |
| | | searchLabelWidth: 100, |
| | | searchLabelWidth: 100 |
| | | }, |
| | | { |
| | | label: "持证人数", |
| | |
| | | viewDisabled: false, |
| | | viewDisplay: false, |
| | | searchSpan: 4, |
| | | searchLabelWidth: 100, |
| | | searchLabelWidth: 100 |
| | | }, |
| | | { |
| | | label: "企业属性", |
| | |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=stats", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey", |
| | | value: "dictKey" |
| | | }, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择企业属性", |
| | | trigger: "click", |
| | | }, |
| | | ], |
| | | trigger: "click" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "注册地址", |
| | | prop: "address", |
| | | labelWidth: 145, |
| | | // search: true, |
| | | hide: true, |
| | | hide: true |
| | | }, |
| | | { |
| | | label: "注册时间", |
| | |
| | | { |
| | | required: false, |
| | | message: "请选择注册时间", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "办公地址", |
| | | prop: "industry", |
| | | span: 12, |
| | | labelWidth: 145, |
| | | disabled: false, |
| | | hide:true, |
| | | rules: [{ |
| | | required: false, |
| | | message: "请选择办公地址", |
| | | trigger: "blur", |
| | | }, ], |
| | | label: "办公地址", |
| | | prop: "industry", |
| | | span: 12, |
| | | labelWidth: 145, |
| | | disabled: false, |
| | | hide: true, |
| | | rules: [ |
| | | { |
| | | required: false, |
| | | message: "请选择办公地址", |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "登记机关", |
| | |
| | | labelWidth: 145, |
| | | // width: 88, |
| | | overHidden: true, |
| | | hide: true, |
| | | }, |
| | | hide: true |
| | | } |
| | | ], |
| | | ...this.$store.state.control.clearOtherBut, |
| | | }, |
| | | ...this.$store.state.control.clearOtherBut |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | column.value = "1"; |
| | | column.editDisabled = true; |
| | | column.addDisabled = true; |
| | | if(this.userInfo.role_name == "administrator" ){ |
| | | if (this.userInfo.role_name == "administrator") { |
| | | column.editDisabled = false; |
| | | column.addDisabled = false; |
| | | } |
| | |
| | | ...mapGetters(["userInfo"]), |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach((ele) => { |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.creditcode); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$store.commit("setWindowSizeHeightAdd"); |
| | | }, |
| | | methods: { |
| | | rowClickSelf(val) { |
| | | // console.log(val.departmentid); |
| | | this.$router.push({ |
| | | path: "/securityGuardOnce/index", |
| | | query: { departmentid: val.departmentid }, |
| | | query: { departmentid: val.departmentid } |
| | | }); |
| | | }, |
| | | handleImport1() { |
| | |
| | | done(); |
| | | }, |
| | | handleTemplate1() { |
| | | window.open(`/api/examSubjectChoices/export-template?${ |
| | | this.website.tokenHeader |
| | | }=${getToken()}&` |
| | | ); |
| | | window.open( |
| | | `/api/examSubjectChoices/export-template?${ |
| | | this.website.tokenHeader |
| | | }=${getToken()}&` |
| | | ); |
| | | }, |
| | | //保安单位基本信息 |
| | | sizeChange(val) { |
| | |
| | | }, |
| | | rowSave(form, done, loading) { |
| | | form["createUserId"] = this.userInfo.Id; |
| | | adddata(form).then((res) => { |
| | | adddata(form).then(res => { |
| | | if (res.data.success) { |
| | | this.$message({ |
| | | message: "操作成功", |
| | | type: "success", |
| | | type: "success" |
| | | }); |
| | | this.refreshChange(); |
| | | done(); |
| | |
| | | } else { |
| | | this.$message({ |
| | | message: "操作失败", |
| | | type: "warning", |
| | | type: "warning" |
| | | }); |
| | | done(); |
| | | } |
| | |
| | | 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(() => { |
| | | console.log(row); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | type: "warning" |
| | | } |
| | | ) |
| | | .then(() => { |
| | | // console.log(this.ids); |
| | | return remove(this.ids, this.ids1).then((res) => { |
| | | return remove(this.ids, this.ids1).then(res => { |
| | | this.refreshChange(); |
| | | }); |
| | | }) |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | this.$refs.crudrec.toggleSelection(); |
| | | }) |
| | | .catch((res) => {}); |
| | | .catch(res => {}); |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | |
| | | var data = JSON.stringify(row); |
| | | this.$router.push({ |
| | | path: "/securityUnitChild", |
| | | query: { data: data }, |
| | | query: { data: data } |
| | | }); |
| | | }, |
| | | //跳转到附近列表页面 |
| | |
| | | path: `/resource/attachCopy`, |
| | | query: { |
| | | deptId: row.departmentid, |
| | | enterprisename: row.enterprisename, |
| | | }, |
| | | enterprisename: row.enterprisename |
| | | } |
| | | }); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query) |
| | | ).then((res) => { |
| | | ).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | window.localStorage.setItem("danweidataS", JSON.stringify(this.data)); |
| | | console.log(this.data); |
| | | this.$store.commit("setWindowSizeHeightAdd"); |
| | | // console.log(this.data); |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | |
| | | } |
| | | }, |
| | | mounted() {}, |
| | | mounted() {} |
| | | }; |
| | | </script> |
| | | |