| | |
| | | plain |
| | | icon="el-icon-download" |
| | | @click="handleExport" |
| | | >成绩导出 |
| | | >导出 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission"]), |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.post_add, false), |
| | |
| | | methods: { |
| | | //导出 |
| | | handleExport() { |
| | | this.$confirm("是否导出成绩数据?", "提示", { |
| | | this.$confirm("是否导出单位检查信息?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | //获取查询条件 |
| | | // console.log(this.questionBankSearch, 456); |
| | | // console.log(this.userInfo, 456); |
| | | // return; |
| | | var data = { |
| | | account: this.questionBankSearch.account, |
| | | companyName: this.questionBankSearch.companyName, |
| | | examDate: this.questionBankSearch.examDate, |
| | | isExam: this.questionBankSearch.isExam, |
| | | qualified: this.questionBankSearch.qualified, |
| | | securityName: this.questionBankSearch.securityName, |
| | | examName: this.questionBankSearch.examName, |
| | | startTime: this.query.startTime, |
| | | endTime: this.query.endTime, |
| | | reviewedDeptName: this.query.reviewedDeptName, |
| | | realName: this.query.realName, |
| | | jurisdiction: this.userInfo.jurisdiction, |
| | | }; |
| | | //导出 |
| | | if ( |
| | | this.userInfo.role_name == "保安公司管理员" || |
| | | this.userInfo.role_name == "保安" |
| | | ) { |
| | | //如果是保安公司管理员 |
| | | data["deptId"] = this.userInfo.dept_id; |
| | | } |
| | | if (this.userInfo.role_name == "培训公司管理员") { |
| | | //如果是培训公司管理员 |
| | | data["trainUnitId"] = this.userInfo.dept_id; |
| | | } |
| | | data["examType"] = 2; |
| | | // if ( |
| | | // this.userInfo.role_name == "保安公司管理员" || |
| | | // this.userInfo.role_name == "保安" |
| | | // ) { |
| | | // //如果是保安公司管理员 |
| | | // data["deptId"] = this.userInfo.dept_id; |
| | | // } |
| | | // if (this.userInfo.role_name == "培训公司管理员") { |
| | | // //如果是培训公司管理员 |
| | | // data["trainUnitId"] = this.userInfo.dept_id; |
| | | // } |
| | | // data["examType"] = 2; |
| | | //序列号url形式,用&拼接 |
| | | data = Qs.stringify(data); |
| | | window.open(`/api/examScore/export-examScore?` + data); |
| | | window.open(`/api/coinspect/export-coinspect?` + data); |
| | | }); |
| | | }, |
| | | getStartTime() { |