登录情况统计修改,新增登录情况导出,题库新增查询修改,优化
| | |
| | | optionContentBId: null, |
| | | optionContentCId: null, |
| | | optionContentDId: null, |
| | | optionContentEId: null, |
| | | arrContent: ["1"], |
| | | list: [ |
| | | { |
| | |
| | | choicesType: "0", |
| | | loading: true, |
| | | form: { |
| | | score: 1, |
| | | }, |
| | | option: { |
| | | height: "auto", |
| | |
| | | ], |
| | | span: 24, |
| | | }, |
| | | { |
| | | label: "类型", |
| | | prop: "tktype", |
| | | slot: true, |
| | | type: "checkbox", |
| | | dicData: [ |
| | | { |
| | | label: "简易题库", |
| | | value: "A", |
| | | }, |
| | | { |
| | | label: "复杂题库", |
| | | value: "B", |
| | | }, |
| | | { |
| | | label: "模拟题库", |
| | | value: "C", |
| | | }, |
| | | ], |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择类型", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | span: 24, |
| | | }, |
| | | // { |
| | | // label: "类型", |
| | | // prop: "tktype", |
| | | // slot: true, |
| | | // type: "checkbox", |
| | | // dicData: [ |
| | | // { |
| | | // label: "简易题库", |
| | | // value: "A", |
| | | // }, |
| | | // { |
| | | // label: "复杂题库", |
| | | // value: "B", |
| | | // }, |
| | | // { |
| | | // label: "模拟题库", |
| | | // value: "C", |
| | | // }, |
| | | // ], |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "请选择类型", |
| | | // trigger: "blur", |
| | | // }, |
| | | // ], |
| | | // span: 24, |
| | | // }, |
| | | { |
| | | label: "选项", |
| | | prop: "", |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "解析", |
| | | prop: "analysis", |
| | | span: 24, |
| | | type: "textarea", |
| | | }, |
| | | { |
| | | label: "分值", |
| | | prop: "score", |
| | | span: 24, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入分值", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | // { |
| | | // label: "解析", |
| | | // prop: "analysis", |
| | | // span: 24, |
| | | // type: "textarea", |
| | | // }, |
| | | // { |
| | | // label: "分值", |
| | | // prop: "score", |
| | | // span: 24, |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "请输入分值", |
| | | // trigger: "blur", |
| | | // }, |
| | | // ], |
| | | // }, |
| | | ], |
| | | }, |
| | | formCheckbox: { |
| | | score: 1, |
| | | }, |
| | | optionCheckbox: { |
| | | height: "auto", |
| | |
| | | ], |
| | | span: 24, |
| | | }, |
| | | { |
| | | label: "类型", |
| | | prop: "tktype", |
| | | slot: true, |
| | | type: "checkbox", |
| | | dicData: [ |
| | | { |
| | | label: "简易题库", |
| | | value: "A", |
| | | }, |
| | | { |
| | | label: "复杂题库", |
| | | value: "B", |
| | | }, |
| | | { |
| | | label: "模拟题库", |
| | | value: "C", |
| | | }, |
| | | ], |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择类型", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | span: 24, |
| | | }, |
| | | // { |
| | | // label: "类型", |
| | | // prop: "tktype", |
| | | // slot: true, |
| | | // type: "checkbox", |
| | | // dicData: [ |
| | | // { |
| | | // label: "简易题库", |
| | | // value: "A", |
| | | // }, |
| | | // { |
| | | // label: "复杂题库", |
| | | // value: "B", |
| | | // }, |
| | | // { |
| | | // label: "模拟题库", |
| | | // value: "C", |
| | | // }, |
| | | // ], |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "请选择类型", |
| | | // trigger: "blur", |
| | | // }, |
| | | // ], |
| | | // span: 24, |
| | | // }, |
| | | { |
| | | label: "选项", |
| | | prop: "", |
| | |
| | | ], |
| | | }, |
| | | { |
| | | label: "E", |
| | | prop: "optionContentE", |
| | | span: 24, |
| | | placeholder: "请输入内容", |
| | | rules: [ |
| | | { |
| | | required: false, |
| | | message: "请输入内容", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "答案", |
| | | prop: "answer", |
| | | span: 24, |
| | |
| | | label: "D", |
| | | value: "D", |
| | | }, |
| | | { |
| | | label: "E", |
| | | value: "E", |
| | | }, |
| | | ], |
| | | rules: [ |
| | | { |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "解析", |
| | | prop: "analysis", |
| | | span: 24, |
| | | type: "textarea", |
| | | }, |
| | | { |
| | | label: "分值", |
| | | prop: "score", |
| | | span: 24, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入分值", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | // { |
| | | // label: "解析", |
| | | // prop: "analysis", |
| | | // span: 24, |
| | | // type: "textarea", |
| | | // }, |
| | | // { |
| | | // label: "分值", |
| | | // prop: "score", |
| | | // span: 24, |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "请输入分值", |
| | | // trigger: "blur", |
| | | // }, |
| | | // ], |
| | | // }, |
| | | ], |
| | | }, |
| | | formJudge: { |
| | | score: 1, |
| | | }, |
| | | formJudge: {}, |
| | | optionJudge: { |
| | | height: "auto", |
| | | calcHeight: 80, |
| | |
| | | ], |
| | | span: 24, |
| | | }, |
| | | { |
| | | label: "类型", |
| | | prop: "tktype", |
| | | slot: true, |
| | | type: "checkbox", |
| | | dicData: [ |
| | | { |
| | | label: "简易题库", |
| | | value: "A", |
| | | }, |
| | | { |
| | | label: "复杂题库", |
| | | value: "B", |
| | | }, |
| | | { |
| | | label: "模拟题库", |
| | | value: "C", |
| | | }, |
| | | ], |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择类型", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | span: 24, |
| | | }, |
| | | // { |
| | | // label: "类型", |
| | | // prop: "tktype", |
| | | // slot: true, |
| | | // type: "checkbox", |
| | | // dicData: [ |
| | | // { |
| | | // label: "简易题库", |
| | | // value: "A", |
| | | // }, |
| | | // { |
| | | // label: "复杂题库", |
| | | // value: "B", |
| | | // }, |
| | | // { |
| | | // label: "模拟题库", |
| | | // value: "C", |
| | | // }, |
| | | // ], |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "请选择类型", |
| | | // trigger: "blur", |
| | | // }, |
| | | // ], |
| | | // span: 24, |
| | | // }, |
| | | // { |
| | | // label: "选项", |
| | | // prop: "", |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "解析", |
| | | prop: "analysis", |
| | | span: 24, |
| | | type: "textarea", |
| | | }, |
| | | { |
| | | label: "分值", |
| | | prop: "score", |
| | | defaultValue: 2, |
| | | span: 24, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入分值", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | // { |
| | | // label: "解析", |
| | | // prop: "analysis", |
| | | // span: 24, |
| | | // type: "textarea", |
| | | // }, |
| | | // { |
| | | // label: "分值", |
| | | // prop: "score", |
| | | // defaultValue: 2, |
| | | // span: 24, |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "请输入分值", |
| | | // trigger: "blur", |
| | | // }, |
| | | // ], |
| | | // }, |
| | | ], |
| | | }, |
| | | formFill: { |
| | | score: 1, |
| | | }, |
| | | optionFill: { |
| | | height: "auto", |
| | |
| | | ], |
| | | span: 24, |
| | | }, |
| | | { |
| | | label: "类型", |
| | | prop: "tktype", |
| | | slot: true, |
| | | type: "checkbox", |
| | | dicData: [ |
| | | { |
| | | label: "简易题库", |
| | | value: "A", |
| | | }, |
| | | { |
| | | label: "复杂题库", |
| | | value: "B", |
| | | }, |
| | | { |
| | | label: "模拟题库", |
| | | value: "C", |
| | | }, |
| | | ], |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择类型", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | span: 24, |
| | | }, |
| | | // { |
| | | // label: "类型", |
| | | // prop: "tktype", |
| | | // slot: true, |
| | | // type: "checkbox", |
| | | // dicData: [ |
| | | // { |
| | | // label: "简易题库", |
| | | // value: "A", |
| | | // }, |
| | | // { |
| | | // label: "复杂题库", |
| | | // value: "B", |
| | | // }, |
| | | // { |
| | | // label: "模拟题库", |
| | | // value: "C", |
| | | // }, |
| | | // ], |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "请选择类型", |
| | | // trigger: "blur", |
| | | // }, |
| | | // ], |
| | | // span: 24, |
| | | // }, |
| | | { |
| | | label: "选项", |
| | | prop: "", |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "解析", |
| | | prop: "analysis", |
| | | span: 24, |
| | | type: "textarea", |
| | | }, |
| | | { |
| | | label: "分值", |
| | | prop: "score", |
| | | span: 24, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入分值", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | // { |
| | | // label: "解析", |
| | | // prop: "analysis", |
| | | // span: 24, |
| | | // type: "textarea", |
| | | // }, |
| | | // { |
| | | // label: "分值", |
| | | // prop: "score", |
| | | // span: 24, |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "请输入分值", |
| | | // trigger: "blur", |
| | | // }, |
| | | // ], |
| | | // }, |
| | | ], |
| | | }, |
| | | data: [], |
| | |
| | | that.optionContentBId = data.examSubjectOptions[1].id; |
| | | that.optionContentCId = data.examSubjectOptions[2].id; |
| | | that.optionContentDId = data.examSubjectOptions[3].id; |
| | | that.optionContentEId = data.examSubjectOptions[4].id; |
| | | that.formCheckbox.optionContentA = |
| | | data.examSubjectOptions[0].optionContent; |
| | | that.formCheckbox.optionContentB = |
| | |
| | | data.examSubjectOptions[2].optionContent; |
| | | that.formCheckbox.optionContentD = |
| | | data.examSubjectOptions[3].optionContent; |
| | | that.formCheckbox.optionContentE = |
| | | data.examSubjectOptions[4].optionContent; |
| | | } |
| | | //判断题 |
| | | if (data.choicesType == 2) { |
| | |
| | | var that = this; |
| | | row["choicesType"] = this.choicesType; |
| | | row["creator"] = this.userInfo.user_name; |
| | | row.tktype = row.tktype.join(","); |
| | | row['score'] = 2; |
| | | // row.tktype = row.tktype.join(","); |
| | | //选项信息 |
| | | const examSubjectOptions = [ |
| | | { |
| | |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | that.refreshPage(); |
| | | that.visible = false; |
| | | that.$refs.form.resetFields(); |
| | | done(); |
| | |
| | | var that = this; |
| | | row["choicesType"] = this.choicesType; |
| | | row["creator"] = this.userInfo.user_name; |
| | | row.tktype = row.tktype.join(","); |
| | | row['score'] = 2; |
| | | // row.tktype = row.tktype.join(","); |
| | | row.answer = row.answer.join(","); |
| | | //选项信息 |
| | | const examSubjectOptions = [ |
| | |
| | | optionContent: row.optionContentD, |
| | | creator: this.userInfo.user_name, |
| | | }, |
| | | { |
| | | id: that.optionContentEId, |
| | | optionName: "E", |
| | | optionContent: row.optionContentE, |
| | | creator: this.userInfo.user_name, |
| | | }, |
| | | ]; |
| | | row["examSubjectOptions"] = examSubjectOptions; |
| | | saveSubjectChoicesAndOption(row).then( |
| | |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | that.refreshPage(); |
| | | that.visible = false; |
| | | that.$refs.formCheckbox.resetFields(); |
| | | done(); |
| | |
| | | var that = this; |
| | | row["choicesType"] = this.choicesType; |
| | | row["creator"] = this.userInfo.user_name; |
| | | row.tktype = row.tktype.join(","); |
| | | row['score'] = 1; |
| | | // row.tktype = row.tktype.join(","); |
| | | saveSubjectChoicesAndOption(row).then( |
| | | () => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | that.refreshPage(); |
| | | that.visible = false; |
| | | that.$refs.formJudge.resetFields(); |
| | | done(); |
| | |
| | | } |
| | | ); |
| | | }, |
| | | refreshPage(){ |
| | | this.$emit('refreshPage',null); |
| | | }, |
| | | //填空排序题提交(新增)数据 |
| | | submitFill(row, done, loading) { |
| | | var that = this; |
| | | row["choicesType"] = this.choicesType; |
| | | row["creator"] = this.userInfo.user_name; |
| | | row.tktype = row.tktype.join(","); |
| | | row['score'] = 2; |
| | | // row.tktype = row.tktype.join(","); |
| | | //选项信息 |
| | | var examSubjectOptions = []; |
| | | if (row.optionContent1) { |
| | |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | that.refreshPage(); |
| | | that.visible = false; |
| | | that.$refs.formFill.resetFields(); |
| | | done(); |
| | |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | <addsubject ref="addsubject"></addsubject> |
| | | <addsubject ref="addsubject" v-on:refreshPage="refreshPage"></addsubject> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | }, |
| | | }, |
| | | methods: { |
| | | //触发页面刷新 |
| | | refreshPage(){ |
| | | this.questionBankOnLoad(this.questionBankPage); |
| | | }, |
| | | questionBankHandleAdd(row) { |
| | | this.$refs.addsubject.inits(row.id); |
| | | }, |
| | | questionBankOnLoad(page, params = {}) { |
| | | params = this.questionBankSearch; |
| | | this.questionBankLoading = false; |
| | | getList( |
| | | page.currentPage, |
| | |
| | | @search-reset="searchReset" |
| | | @refresh-change="refreshChange" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | type="warning" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-download" |
| | | @click="handleExportLoginRecord" |
| | | >导出 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getInformationLoginPage } from "@/api/loginRecord/loginRecord"; // 保安员 |
| | | import { getInformationLoginPage } from "@/api/loginRecord/loginRecord"; |
| | | import Qs from "qs"; |
| | | import { getToken } from "@/util/auth"; |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | props: ["card"], |
| | | data() { |
| | |
| | | { |
| | | label: "所属辖区", |
| | | prop: "jurisdictionName", |
| | | type: "select", |
| | | dicData: [ |
| | | { |
| | | label: "男", |
| | | value: 1, |
| | | }, |
| | | { |
| | | label: "女", |
| | | value: 2, |
| | | }, |
| | | { |
| | | label: "未知", |
| | | value: 3, |
| | | }, |
| | | ], |
| | | display: false, |
| | | }, |
| | | { |
| | |
| | | }, |
| | | }; |
| | | }, |
| | | computed:{ |
| | | ...mapGetters(["userInfo", "permission"]), |
| | | }, |
| | | methods: { |
| | | onLoad(page, params = {}) { |
| | | params = this.search; |
| | | if (this.card.jurisdiction == 1372091709474910209) { |
| | | this.card.jurisdiction = ""; |
| | | } |
| | | params['jurisdiction'] = this.userInfo.jurisdiction; |
| | | |
| | | const { releaseTimeRange } = this.query; |
| | | |
| | |
| | | this.page.currentPage = 1; |
| | | this.refreshChange(); |
| | | }, |
| | | //登录数据导出 |
| | | handleExportLoginRecord() { |
| | | this.$confirm("是否导出企业登录记录数据?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | //获取查询条件 |
| | | const { releaseTimeRange } = this.search; |
| | | if (releaseTimeRange) { |
| | | this.search["startTime"] = releaseTimeRange[0]; |
| | | this.search["endTime"] = releaseTimeRange[1]; |
| | | } |
| | | var data = { |
| | | jurisdiction:this.userInfo.jurisdiction, |
| | | stats: this.search.stats, |
| | | deptName: this.search.deptName, |
| | | types: this.search.types, |
| | | startTime: this.search.startTime, |
| | | endTime: this.search.endTime, |
| | | }; |
| | | // console.log(data,123); |
| | | //序列号url形式,用&拼接 |
| | | data = Qs.stringify(data); |
| | | window.open( |
| | | `/api/loginRecord/export-login-record?${ |
| | | this.website.tokenHeader |
| | | }=${getToken()}&` + data |
| | | ); |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | var data = [ |
| | | { |
| | | value:b[0], |
| | | name:"近7天登录企业数" |
| | | name:"近14天登录企业数" |
| | | }, |
| | | { |
| | | value:b[1], |
| | | name:"近7天未登录企业数" |
| | | name:"近14天未登录企业数" |
| | | } |
| | | ] |
| | | that.setEC1s(data); |