| | |
| | | <template> |
| | | <basic-container |
| | | :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']" |
| | | :class="[ |
| | | $store.state.control.screenSize == 1366 ? 'smallSize' : 'normalSize', |
| | | $store.state.control.windowWidth >= 1024 ? 'tooRowSearch1' : '' |
| | | ]" |
| | | > |
| | | <avue-crud |
| | | class="tablesss" |
| | | :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | |
| | | getDetail2, |
| | | adddata2, |
| | | update2, |
| | | remove2, |
| | | } from "@/api/securityUnit/securityUnit"; |
| | | remove2 |
| | | } from "@/api/securityUnit/securityUnit"; |
| | | import { mapGetters } from "vuex"; |
| | | import { getToken } from "@/util/auth"; |
| | | export default { |
| | | props: ["deptid","stats"], |
| | | props: ["deptid", "stats"], |
| | | data() { |
| | | var deptid = this.deptid; |
| | | if (deptid == undefined) { |
| | |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | ...this.$store.state.control.changePageSize, |
| | | ...this.$store.state.control.changePageSize |
| | | }, |
| | | selectionList: [], |
| | | option: { |
| | |
| | | searchSize: "mini", |
| | | searchMenuSpan: 8, |
| | | height: "auto", |
| | | editBtn:true, |
| | | delBtn:true, |
| | | viewBtn:true, |
| | | editBtn: true, |
| | | delBtn: true, |
| | | viewBtn: true, |
| | | menuWidth: 200, |
| | | menuAlign: "center", |
| | | align: "center", |
| | |
| | | prop: "creditcode", |
| | | hide: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | editDisplay: false |
| | | }, |
| | | { |
| | | label: "id", |
| | | prop: "id", |
| | | hide: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | editDisplay: false |
| | | }, |
| | | { |
| | | label: "姓名", |
| | | prop: "name", |
| | | search: true, |
| | | rules: [{ |
| | | searchLabelWidth: 55, |
| | | searchSpan: 4, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入姓名", |
| | | trigger: "blur" |
| | | }], |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "职务", |
| | | prop: "post", |
| | | search: true, |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入职务", |
| | | trigger: "blur" |
| | | }], |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "身份证", |
| | | prop: "cardid", |
| | | prop: "cardid" |
| | | }, |
| | | { |
| | | label: "联系电话", |
| | | prop: "cell", |
| | | prop: "cell" |
| | | }, |
| | | { |
| | | label: "学历", |
| | | prop: "education", |
| | | display:false, |
| | | row:true, |
| | | hide:true, |
| | | rules: [{ |
| | | display: false, |
| | | row: true, |
| | | hide: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择学历", |
| | | trigger: "blur" |
| | | }], |
| | | } |
| | | ], |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=educationTypes", |
| | | search: false, |
| | | searchSpan: 4, |
| | | type: "select", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | }, |
| | | dataType: "number", |
| | | dataType: "number" |
| | | }, |
| | | { |
| | | label: "证书", |
| | | prop: "paper", |
| | | type: "upload", |
| | | dataType:"string", |
| | | dataType: "string", |
| | | listType: "picture-card", |
| | | span: 24, |
| | | propsHttp: { |
| | | res: "data", |
| | | res: "data" |
| | | }, |
| | | tip: "只能上传jpg/png格式图片,且不超过2Mb", |
| | | action: "/api/blade-resource/oss/endpoint/put-files", |
| | | display:false, |
| | | hide:true, |
| | | }, |
| | | ], |
| | | display: false, |
| | | hide: true |
| | | } |
| | | ] |
| | | }, |
| | | data: [], |
| | | excelForm: {}, |
| | |
| | | loadText: "模板上传中,请稍等", |
| | | span: 24, |
| | | propsHttp: { |
| | | res: "data", |
| | | res: "data" |
| | | }, |
| | | tip: "请上传 .xls,.xlsx 标准格式文件", |
| | | action: "/api/member/import-member", |
| | | action: "/api/member/import-member" |
| | | }, |
| | | { |
| | | label: "模板下载", |
| | | prop: "excelTemplate", |
| | | formslot: true, |
| | | span: 24, |
| | | }, |
| | | ], |
| | | }, |
| | | span: 24 |
| | | } |
| | | ] |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.option.height = this.windowHeight - 320; |
| | | if (this.stats == "1") { |
| | | //学校 |
| | | const educationcolumn = this.findObject( |
| | | this.option.column, |
| | | "education" |
| | | ); |
| | | const papercolumn = this.findObject( |
| | | this.option.column, |
| | | "paper" |
| | | ); |
| | | //学历证书 |
| | | educationcolumn.display = true; |
| | | educationcolumn.hide = false; |
| | | educationcolumn.search = true; |
| | | papercolumn.display = true; |
| | | papercolumn.hide = false; |
| | | } |
| | | //学校 |
| | | const educationcolumn = this.findObject(this.option.column, "education"); |
| | | const papercolumn = this.findObject(this.option.column, "paper"); |
| | | //学历证书 |
| | | educationcolumn.display = true; |
| | | educationcolumn.hide = false; |
| | | educationcolumn.search = true; |
| | | papercolumn.display = true; |
| | | papercolumn.hide = false; |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission", "userInfo", "windowHeight"]), |
| | |
| | | // }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach((ele) => { |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$store.commit("setWindowSizeHeightAdd"); |
| | | }, |
| | | methods: { |
| | | rowSave(row, done, loading) { |
| | | row['deptId'] = this.deptid; |
| | | if(this.stats != "1"){ |
| | | row["deptId"] = this.deptid; |
| | | if (this.stats != "1") { |
| | | delete row.paper; |
| | | } |
| | | adddata2(row).then( |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | error => { |
| | | loading(); |
| | | window.console.log(error); |
| | | } |
| | | ); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | row['deptId'] = this.deptid; |
| | | if(this.stats != "1"){ |
| | | row["deptId"] = this.deptid; |
| | | if (this.stats != "1") { |
| | | delete row.paper; |
| | | } |
| | | update2(row).then( |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | error => { |
| | | loading(); |
| | | console.log(error); |
| | | } |
| | |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove2(row.id); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove2(this.ids); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail2(this.form.id).then((res) => { |
| | | getDetail2(this.form.id).then(res => { |
| | | this.form = res.data.data; |
| | | }); |
| | | } |
| | |
| | | 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; |
| | | this.loading = false; |
| | | this.$store.commit("setWindowSizeHeightAdd"); |
| | | this.selectionClear(); |
| | | }); |
| | | }, |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | </style> |
| | | <style></style> |