| | |
| | | ]" |
| | | > |
| | | <avue-crud |
| | | class="tablesss" |
| | | :key="option.height" |
| | | :option="option" |
| | | :search.sync="search" |
| | | :table-loading="loading" |
| | |
| | | :type="type" |
| | | v-if="permission.securityGuard_delete && row.status != 2" |
| | | @click.stop="rowStatus(row)" |
| | | >离职登记 |
| | | >离职 |
| | | </el-button> |
| | | <el-button |
| | | icon="el-icon-edit" |
| | |
| | | </el-col> |
| | | <div |
| | | :class="[ |
| | | 'downSFZ', |
| | | $store.state.control.windowWidth >= 1024 |
| | | ? 'downSFZqudong' |
| | | : 'downSFZqudongS', |
| | |
| | | callback(); |
| | | } |
| | | }; |
| | | // let table = document.getElementsByClassName("tablesss"); |
| | | // let heard = table[0].getElementsByClassName("avue-crud__search"); |
| | | // let usNum = |
| | | // this.windowWidth <= 1376 && this.windowHeight <= 778 ? 170 : 332; |
| | | // // that.option.height = +h - (+heard[0].clientHeight + 332); |
| | | // let optionHeight = +this.windowHeight - (+heard[0].clientHeight + +usNum); |
| | | return { |
| | | sort: "", |
| | | sortName: "", |
| | |
| | | }, |
| | | choiceList: [], |
| | | option: { |
| | | searchIndex: 5, //收缩展示数量 |
| | | searchIcon: true, //搜索是否收缩 |
| | | height: "auto", |
| | | calcHeight: 80, |
| | | tip: true, |
| | |
| | | label: "保安员证编号", |
| | | prop: "securitynumber", |
| | | hide: true, |
| | | display:true, |
| | | rules: [{ |
| | | display: true, |
| | | rules: [ |
| | | { |
| | | required: false, |
| | | message: "请输入保安员证编号", |
| | | trigger: "blur", |
| | | }], |
| | | }, |
| | | ], |
| | | }, |
| | | // { |
| | | // label: "发证日期", |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | tablevisible: true, |
| | | isNotChangeSize: true, //取消表格loging |
| | | }; |
| | | }, |
| | | watch: { |
| | | // windowHeight() { |
| | | // let d = { |
| | | // option: this.option, |
| | | // fn: function () { |
| | | // console.log(123); |
| | | // }, |
| | | // add: 100, |
| | | // }; |
| | | // this.$store.dispatch("WHchangeHight", d); |
| | | // }, |
| | | windowHeight() { |
| | | let that = this; |
| | | that.isNotChangeSize = false; //取消表格loging |
| | | let d = { |
| | | fn: function (h) { |
| | | let table = document.getElementsByClassName("tablesss"); |
| | | let heard = table[0].getElementsByClassName("avue-crud__search"); |
| | | let usNum = |
| | | that.windowWidth <= 1376 || that.windowHeight <= 778 ? 170 : 302; |
| | | // // that.option.height = +h - (+heard[0].clientHeight + 332); |
| | | // alert(h); |
| | | let doit = (height) => { |
| | | let hs = height || h; |
| | | // alert(hs); |
| | | // alert(heard[0].clientHeight); |
| | | // alert(usNum); |
| | | that.option.height = +hs - (+heard[0].clientHeight + +usNum); |
| | | that.$nextTick(() => { |
| | | that.refreshChange(); |
| | | setTimeout(() => { |
| | | let d = { |
| | | that: this, |
| | | otherclass: ["downSFZ"], |
| | | haveOpen: true, |
| | | }; |
| | | //刷新表格后再次调整按钮 |
| | | that.$store.dispatch("TABLE_CHANGEBUTPOSITION", d); |
| | | that.isNotChangeSize = true; //恢复表格loging |
| | | }, 10); |
| | | }); |
| | | }; |
| | | if (that.option.height == "auto") { |
| | | //解决第一次未渲染成功会报错的问题 |
| | | setTimeout(() => { |
| | | doit(window.innerHeight); |
| | | }, 150); |
| | | } else { |
| | | doit(); |
| | | } |
| | | }, |
| | | }; |
| | | this.$store.dispatch("WHchangeHight", d); |
| | | }, |
| | | radio() { |
| | | if (this.radio) { |
| | | this.SFZloding = true; |
| | |
| | | this.initData(this.form.tenantId); |
| | | } |
| | | }, |
| | | "form.hold":{ |
| | | handler(val){ |
| | | var securitynumbercolumn =this.findObject(this.option.group,'securitynumber') |
| | | "form.hold": { |
| | | handler(val) { |
| | | var securitynumbercolumn = this.findObject( |
| | | this.option.group, |
| | | "securitynumber" |
| | | ); |
| | | // console.log(val,1234); |
| | | if(val==1){ |
| | | securitynumbercolumn.display=true; |
| | | securitynumbercolumn.rules=[ |
| | | { |
| | | required: true, |
| | | message: "请输入保安员证编号", |
| | | trigger: "blur", |
| | | } |
| | | if (val == 1) { |
| | | securitynumbercolumn.display = true; |
| | | securitynumbercolumn.rules = [ |
| | | { |
| | | required: true, |
| | | message: "请输入保安员证编号", |
| | | trigger: "blur", |
| | | }, |
| | | ]; |
| | | }else{ |
| | | securitynumbercolumn.display=false; |
| | | securitynumbercolumn.rules=[ |
| | | { |
| | | required: false, |
| | | message: "请输入保安员证编号", |
| | | trigger: "blur", |
| | | } |
| | | } else { |
| | | securitynumbercolumn.display = false; |
| | | securitynumbercolumn.rules = [ |
| | | { |
| | | required: false, |
| | | message: "请输入保安员证编号", |
| | | trigger: "blur", |
| | | }, |
| | | ]; |
| | | } |
| | | }, |
| | | immediate: true |
| | | immediate: true, |
| | | }, |
| | | "form.fingerprint"() { |
| | | let that = this; |
| | |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | |
| | | setTimeout(() => { |
| | | // var iframeDom = document.getElementById("zhiwen"); |
| | | // console.log(iframeDom,111111); |
| | |
| | | }, |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userInfo", "permission", "windowHeight"]), |
| | | ...mapGetters(["userInfo", "permission", "windowHeight", "windowWidth"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.securityGuard_add, false), |
| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | // let d = { |
| | | // that: this, |
| | | // otherclass: ["downSFZ"], |
| | | // haveOpen: true, |
| | | // flowHeight: 332, |
| | | // }; |
| | | // this.$store.dispatch("TABLE_CHANGEBUTPOSITION", d); |
| | | // console.log((this.$refs.crud._props.option.height = 200)); |
| | | this.changeButsPosition("TABLE_CHANGEBUTPOSITION"); |
| | | // this.option.column[0].hide = true |
| | | // 非保安单位模式默认加载管理组数据 |
| | | if (!website.tenantMode) { |
| | |
| | | // this.olondSFZ(); //检查身份证设备是否存在 |
| | | }, |
| | | methods: { |
| | | changeButsPosition(val) { |
| | | let d = { |
| | | that: this, |
| | | otherclass: ["downSFZ"], |
| | | haveOpen: true, |
| | | from: "mounted", |
| | | }; |
| | | // 开始就适应高度 |
| | | this.$store.commit("setWindowSizeHeightAdd"); |
| | | this.$store.dispatch("TABLE_CHANGEBUTPOSITION", d); |
| | | }, |
| | | openccc() { |
| | | console.log(this.zhiwenImg); |
| | | // console.log(this.zhiwenChart); |
| | |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | if (this.isNotChangeSize) { |
| | | this.loading = true; |
| | | } |
| | | params = this.search; |
| | | var that = this; |
| | | //获取当前登录人员的角色信息 |
| | |
| | | ...that.query, |
| | | }; |
| | | |
| | | that.loading = true; |
| | | getList(page.currentPage, page.pageSize, values).then((res) => { |
| | | const data = res.data.data; |
| | | that.page.total = data.total; |