{"remainingRequest":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\examine-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\examine-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\examine-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\examine-fvue\\src\\views\\examMenu\\components\\paperMenuDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\examine-fvue\\src\\views\\examMenu\\components\\paperMenuDialog.vue","mtime":1705466684645},{"path":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.string.iterator\";\nimport \"core-js/modules/es6.map\";\nimport \"core-js/modules/es6.array.sort\";\nimport \"regenerator-runtime/runtime\";\nimport _asyncToGenerator from \"D:/jenkins/workspace/examine-fvue/node_modules/@babel/runtime/helpers/esm/asyncToGenerator\";\nimport \"core-js/modules/es6.regexp.to-string\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/es6.number.constructor\";\nimport \"core-js/modules/web.dom.iterable\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport dictUtils from '@/components/dict/DictSelectUtils.js';\nimport paperMenu from '@/api/examination/paperMenu.js';\nimport configurationDIalog from \"./configurationDIalog.vue\";\nimport subjectDialog from \"./subjectDialog.vue\";\nimport randomDialog from \"./randomDialog.vue\";\nimport yearSubjectDialog from \"./yearSubjectDialog.vue\";\nexport default {\n props: {\n subjectlist: {\n type: Array,\n default: function _default() {\n return [];\n }\n }\n },\n components: {\n configurationDIalog: configurationDIalog,\n subjectDialog: subjectDialog,\n randomDialog: randomDialog,\n yearSubjectDialog: yearSubjectDialog\n },\n name: 'paperMenuDialog',\n data: function data() {\n var _this = this;\n\n return {\n querys: [{\n group: 'main',\n operation: 'LIKE',\n parentGroup: '',\n property: 'u.fullname_',\n relation: 'AND',\n value: ''\n }],\n visible: false,\n confVisible: false,\n //二级弹框\n activeCollapse1: '1',\n ctlTypeList: '',\n isActive: 0,\n parameter: {},\n params: {\n name: '',\n subjectId: '',\n wayType: 1,\n paperQuestionSettings: [],\n paperSetting: {\n testUserType: 1,\n planStartTime: '',\n planEndTime: '',\n paperType: '',\n totalScore: 100,\n trainModel: 1\n },\n totalScore: 100,\n endStatus: '1',\n userInfoVos: []\n },\n examTime: [],\n subject: [],\n subjectList: [],\n btnBisabled: true,\n visiblePopover: false,\n rules: {\n name: [{\n required: true,\n message: '请输入试卷名称',\n trigger: 'blur'\n }],\n subjectId: [{\n required: true,\n message: '请选择考试课目',\n trigger: 'blur'\n }],\n paperType: [{\n required: true,\n message: '请选择考试方式',\n trigger: 'blur'\n }],\n // timeLength: [{\n // \trequired: true,\n // \tmessage: '请输入考试时长',\n // \ttrigger: 'blur',\n // }, ],\n // roomId: [{\n // \trequired: true,\n // \tmessage: '请选择考试场地',\n // \ttrigger: 'blur',\n // }, ],\n totalScore: [{\n required: true,\n message: '请输入及格分数',\n trigger: 'blur'\n }],\n // switchCount: [{\n // \trequired: true,\n // \tmessage: '请输入页面切换次数',\n // \ttrigger: 'blur',\n // }, ],\n planStartTime: [{\n required: true,\n message: '请选择考试结开始时间',\n trigger: 'blur'\n }],\n planEndTime: [{\n required: true,\n message: '请选择考试结束时间',\n trigger: 'blur'\n }]\n },\n testUserList: [{\n name: '所有人',\n value: '1'\n }, {\n name: '用户',\n value: '2'\n }],\n //随机组卷\n data: [],\n newParam: {\n pageBean: {\n page: 1,\n pageSize: 10\n }\n },\n ruleForm: {\n startTime: '',\n // 开始时间\n endTime: '' // 结束时间\n\n },\n // 禁用今天之前的时间\n pickerOptionsOne: {\n disabledDate: function disabledDate(time) {\n return time.getTime() < Date.now() - 8.64e7;\n }\n },\n // 禁用今天之前的时间 + 禁用第一个时间选择框选择的小时之前的时间\n pickerOptionsTwo: {\n selectableRange: [],\n disabledDate: function disabledDate(time) {\n return time.getTime() < Date.now() - 8.64e7;\n }\n },\n title: '',\n search: '',\n search1: '',\n EquipmentList: [],\n multipleSelection: [],\n multipleSelection1: [],\n defaultProps: {\n children: 'children',\n label: 'name'\n },\n selectUserProps: {\n label: \"userName\"\n },\n nameArr: [],\n // examsearch: '',\n // examsearch1: '',\n // examEquipmentList: [],\n // examparams.userInfoVos: [],\n // exammultipleSelection: [],\n // exammultipleSelection1: [],\n // examdefaultProps: {\n // \tchildren: 'children',\n // \tlabel: 'label'\n // },\n typeList: [{\n name: '正在考试',\n value: 0\n }, {\n name: '模拟考试',\n value: 1\n }],\n pickerOptions: {\n disabledDate: function disabledDate(time) {\n console.log(_this.params.paperSetting.planStartTime);\n\n if (_this.value2 != \"\") {\n return time.getTime() > new Date(_this.value2).getTime();\n }\n }\n },\n pickerOptions1: {\n disabledDate: function disabledDate(time) {\n console.log(time.getTime(), '选中');\n console.log(Date.parse(new Date(_this.params.paperSetting.planStartTime)), '开始');\n return time.getTime() < Date.parse(new Date(_this.params.paperSetting.planStartTime)) - 8.64e7;\n 1000; //减去一天的时间代表可以选择同一天;\n }\n },\n subjectsList: [],\n topicList: [],\n //题目类型\n stndList: [],\n //试题难度\n khlxList: [],\n //考试方式\n isShrink: false,\n //展开\n //考生确认\n total: 0,\n jobsList: [],\n //岗位树\n subjectUser: {\n majorIds: [],\n subjectIds: []\n },\n roomList: [],\n //考场列表\n userInfoVos: [],\n userlength: 0,\n startTimeRange: '',\n endType: false,\n //是否显示最终成绩\n tooltip: '',\n //提示语\n currentKey: null,\n filterText: '',\n expandAll: false\n };\n },\n computed: {\n totalScore: function totalScore() {\n var totalScore = 0;\n this.params.paperQuestionSettings.forEach(function (p) {\n totalScore += p.numuber * p.score;\n });\n return totalScore;\n },\n configScore: function configScore() {\n var configScore = 0;\n this.params.paperQuestionSettings.forEach(function (s) {\n configScore += Number(s.score);\n });\n return configScore;\n }\n },\n watch: {\n filterText: function filterText(val) {\n this.$refs.tree.filter(val);\n },\n // 监听计算属性里面的endTime\n endTime: {\n handler: function handler(val, oldVal) {\n this.pickerOptionsTwo.selectableRange = val;\n },\n deep: true\n },\n examTime: {\n handler: function handler(newValue, oldValue) {\n if (newValue) {\n var nowDate = moment().format('YYYY-MM-DD HH:mm:ss');\n var dt = nowDate.split(\" \");\n var st = '';\n\n if (newValue.split(\" \")[0] == dt[0]) {\n // 如果是当天,选择的时间开始为此刻的时分秒\n st = dt[1]; // 如果是当天(只有当日期改变时),默认选中时间为当前时间\n\n if (newValue.split(\" \")[0] != oldValue.split(\" \")[0]) {\n this.examTime = nowDate;\n }\n } else {\n // 明天以及后面的时间从0时开始\n st = '00:00:00';\n }\n\n this.startTimeRange = st + ' - 23:59:59'; //例如:如果今天此刻时间为15:27:00 则选择时间范围为: 15:27:00 - 23:59:59 \n //否则为:00:00:00 - 23:59:59\n }\n }\n },\n currentKey: {\n handler: function handler(value) {\n var _this2 = this;\n\n if (value) {\n this.$nextTick(function () {\n _this2.$refs.tree.setCurrentKey(_this2.currentKey);\n });\n }\n },\n immediate: true,\n valType: false\n }\n },\n created: function created() {\n this.zjfsList = dictUtils.getDictItemsFromCache('zjfs');\n this.topicList = dictUtils.getDictItemsFromCache('sttx');\n this.stndList = dictUtils.getDictItemsFromCache('stnd');\n this.khlxList = dictUtils.getDictItemsFromCache('khlx');\n },\n mounted: function mounted() {},\n methods: {\n expandHandle: function expandHandle() {\n console.log(this.$refs.tree.store);\n this.expandAll = !this.expandAll;\n this.expandNodes(this.$refs.tree.store.root);\n },\n // 遍历树形数据,设置每一项的expanded属性,实现展开收起\n expandNodes: function expandNodes(node) {\n node.expanded = this.expandAll;\n\n for (var i = 0; i < node.childNodes.length; i++) {\n node.childNodes[i].expanded = this.expandAll;\n\n if (node.childNodes[i].childNodes.length > 0) {\n this.expandNodes(node.childNodes[i]);\n }\n }\n },\n filterNode: function filterNode(value, data) {\n if (!value) return true;\n return data.name.indexOf(value) !== -1;\n },\n add: function add(val) {\n this.visible = true;\n this.parameter = val;\n this.title = '新增';\n this.getOrgPostPage();\n this.pagingQuery();\n },\n edit: function edit(val) {\n var _this3 = this;\n\n this.getOrgPostPage();\n this.pagingQuery();\n this.visible = true;\n this.title = '修改';\n this.$nextTick(function () {\n paperMenu.detailIdPaper(val.id, function (res) {\n if (res) {\n _this3.params = res;\n _this3.params.paperType = res.paperType.toString();\n _this3.subjectList = _this3.params.subjectInfos;\n\n _this3.subjectList.forEach(function (s) {\n _this3.subject.push(s.id);\n });\n\n _this3.userInfoVos = JSON.parse(JSON.stringify(_this3.params.userInfoVos));\n _this3.userlength = _this3.params.userInfoVos.length;\n _this3.examTime = [_this3.params.paperSetting.planStartTime, _this3.params.paperSetting.planEndTime];\n\n if (_this3.params.wayType == 1 || _this3.params.wayType == 3) {\n _this3.params.paperQuestionSettings.forEach(function (p) {\n _this3.subjectList.forEach(function (s) {\n if (s.id == p.subjectId) {\n p.subjectName = s.name;\n }\n });\n\n _this3.topicList.forEach(function (t) {\n if (t.value == p.questionType) {\n p.questionName = t.name;\n }\n });\n });\n }\n\n if (_this3.params.wayType == 2) {\n _this3.params.paperQuestionSettings.forEach(function (e) {\n e.isShrink = false;\n\n _this3.topicList.forEach(function (t) {\n if (e.questionType == t.value) {\n e.questionTypeName = t.name;\n }\n });\n\n _this3.stndList.forEach(function (s) {\n if (e.questionsInfo.difficulty == s.value) {\n e.questionsInfo.difficultyName = s.name;\n }\n });\n });\n }\n }\n });\n });\n },\n //复制试卷\n copy: function copy(val) {\n var _this4 = this;\n\n this.getOrgPostPage();\n this.pagingQuery();\n this.visible = true;\n this.title = '复制';\n this.$nextTick(function () {\n paperMenu.detailIdPaper(val.id, function (res) {\n if (res) {\n _this4.params = res;\n delete _this4.params.id;\n _this4.subjectList = _this4.params.subjectInfos;\n\n _this4.subjectList.forEach(function (s) {\n _this4.subject.push(s.id);\n });\n\n delete _this4.params.paperSetting.id;\n delete _this4.params.paperSetting.paperId;\n delete _this4.params.pkVal;\n _this4.examTime = [_this4.params.paperSetting.planStartTime, _this4.params.paperSetting.planEndTime];\n _this4.userInfoVos = JSON.parse(JSON.stringify(_this4.params.userInfoVos));\n _this4.userlength = _this4.params.userInfoVos.length;\n\n if (_this4.params.wayType == 1 || _this4.params.wayType == 3) {\n _this4.params.paperQuestionSettings.forEach(function (p) {\n delete p.paperBaseId;\n delete p.id;\n\n _this4.subjectList.forEach(function (s) {\n if (s.id == p.subjectId) {\n p.subjectName = s.name;\n }\n });\n\n _this4.topicList.forEach(function (t) {\n if (t.value == p.questionType) {\n p.questionName = t.name;\n }\n });\n });\n }\n\n if (_this4.params.wayType == 2) {\n _this4.params.paperQuestionSettings.forEach(function (e) {\n delete e.paperBaseId;\n delete e.id;\n e.isShrink = false;\n\n _this4.topicList.forEach(function (t) {\n if (e.questionType == t.value) {\n e.questionTypeName = t.name;\n }\n });\n\n _this4.stndList.forEach(function (s) {\n if (e.questionsInfo.difficulty == s.value) {\n e.questionsInfo.difficultyName = s.name;\n }\n });\n });\n }\n\n _this4.params.paperType = _this4.params.paperType.toString(); // if (this.params.paperType == 2) {\n // \tthis.subject = []\n // \tthis.subjectList = []\n // }\n }\n });\n });\n },\n pagingQuery: function pagingQuery() {\n var _this5 = this;\n\n paperMenu.pagingQuery({\n pageBean: {\n page: -1,\n pageSize: 10,\n showTotal: true\n }\n }, function (res) {\n if (res) {\n _this5.roomList = res.rows; // console.log(this.roomList);\n }\n });\n },\n // 关闭新增人员窗口\n handleClose: function handleClose() {\n this.params = {\n name: '',\n subjectId: '',\n wayType: 1,\n paperQuestionSettings: [],\n paperSetting: {\n testUserType: 1,\n planStartTime: '',\n planEndTime: '',\n paperType: '',\n totalScore: 100,\n trainModel: 1\n },\n totalScore: 100,\n endStatus: '1'\n };\n this.newParam = {\n pageBean: {\n page: 1,\n pageSize: 10\n },\n querys: []\n };\n this.endType = false;\n this.isActive = 0;\n this.subject = [];\n this.subjectList = [];\n this.visible = false;\n },\n // 确认后不关闭弹框\n addClose: function addClose() {\n this.params = {\n name: '',\n wayType: 1,\n subjectId: '',\n paperQuestionSettings: [{}]\n };\n },\n changeValue: function changeValue() {\n this.params.paperQuestionSettings[index].questionType = JSON.parse(JSON.stringify(this.params.paperQuestionSettings[index].questionType));\n },\n getUser: function getUser(val) {\n var _this6 = this;\n\n console.log(val);\n this.subject = [];\n this.subjectList = val;\n this.subjectList.forEach(function (e) {\n _this6.subject.push(e.id);\n });\n\n if (this.params.paperType == 2 && this.subject.length > 0) {\n paperMenu.getEndStatus(this.subject[0], function (res) {\n if (res.message) {\n _this6.tooltip = res.message;\n }\n });\n this.endType = true;\n } else {\n this.endType = false;\n }\n },\n //打开课目弹框\n subjectDUsers: function subjectDUsers() {\n console.log(this.params.id); // 1为普通考核 2为年度考核\n\n if (this.params.paperType) {\n if (this.params.paperType == 1) {\n this.$refs.subjectDialog.add(this.subjectList);\n } else if (this.params.paperType == 2) {\n this.$refs.yearSubject.add(this.subjectList, this.params.id);\n }\n } else {\n this.$message({\n message: '请先选择考核类型',\n type: 'warning'\n });\n }\n },\n //上一步\n lastStep: function lastStep() {\n this.isActive -= 1;\n },\n //下一步\n nextStep: function nextStep() {\n var _this7 = this;\n\n // if(this.subject.length==0){\n // \treturn\n // }\n if (this.isActive == 0) {\n this.params.paperSetting.planStartTime = this.examTime[0];\n this.params.paperSetting.planEndTime = this.examTime[1];\n var arrA = [];\n\n if (this.params.wayType == 1 || this.params.wayType == 1) {\n this.params.paperQuestionSettings.forEach(function (item) {\n _this7.subject.forEach(function (s) {\n if (item.subjectId == s) {\n arrA.push(item);\n }\n });\n });\n } else if (this.params.wayType == 2) {\n this.params.paperQuestionSettings.forEach(function (item) {\n _this7.subject.forEach(function (s) {\n if (item.subId == s) {\n arrA.push(item);\n }\n });\n });\n }\n\n this.params.paperQuestionSettings = arrA;\n\n if (this.subject.length > 0) {\n this.subject.forEach(function (s, si) {\n if (si == 0) {\n _this7.params.subjectId = s;\n } else {\n _this7.params.subjectId += ',' + s;\n }\n });\n } else {\n this.params.subjectId = '';\n }\n\n if (this.params.subjectId == '' || this.params.name == '' || this.params.paperType == '' || this.params.totalScore == '' || this.params.paperSetting.planStartTime == '' || this.params.paperSetting.planEndTime == '') {\n this.$notify({\n type: 'warning',\n message: '请填写完整试卷信息',\n duration: 2000\n });\n return;\n } else {\n this.isActive += 1;\n }\n } else if (this.isActive == 1) {\n console.log(this.params.paperQuestionSettings);\n\n if (this.params.paperQuestionSettings.length == 0) {\n this.$notify({\n type: 'warning',\n message: '题目不能为空',\n duration: 2000\n });\n return;\n }\n\n this.isActive += 1;\n this.subjectExaminee(); // if(this.title=='新增'){\n // }else if(this.title=='修改'){\n // }\n } else if (this.isActive == 2) {\n console.log(this.params);\n this.$refs.formInfo.validate(function (valid) {\n if (valid) {\n if (_this7.title === '新增' || _this7.title === '复制') {\n paperMenu.addPaper(_this7.params, function (response) {\n if (response.state) {\n _this7.$notify({\n type: 'success',\n message: _this7.title + '成功',\n duration: 2000\n });\n\n _this7.handleClose();\n\n _this7.$emit('loadData');\n } else {\n _this7.$message.warning(response.message);\n }\n });\n } else if (_this7.title === '修改') {\n paperMenu.editPaper(_this7.params, function (response) {\n if (response.state) {\n _this7.$notify({\n type: 'success',\n message: _this7.title + '成功',\n duration: 2000\n });\n\n _this7.handleClose();\n\n _this7.$emit('loadData');\n } else {\n _this7.$message.warning(response.message);\n }\n });\n }\n }\n });\n }\n },\n addTable: function addTable() {\n this.params.paperQuestionSettings.push({});\n },\n testUserType: function testUserType(val) {\n this.params.paperSetting.testUserType = val.value;\n },\n changeType: function changeType(val) {\n var _this8 = this;\n\n console.log(this.params.wayType); //判断当前选中的组卷类型 \n //如果为1和3时\n //判断是否填写题目\n // 如果存在题目,则弹出提示框确认\n\n if (this.params.paperQuestionSettings.length > 0) {\n this.$confirm('您确定要修改组卷类型吗?切换后原有的试题将会无效', '温馨提示', {\n confirmButtonText: '是',\n cancelButtonText: '否',\n type: 'warning'\n }).then(function () {\n _this8.params.wayType = val.value;\n _this8.params.paperQuestionSettings = [];\n }).catch(function () {});\n } else {\n // 不存在题目,直接跳转\n this.params.wayType = val.value;\n this.params.paperQuestionSettings = [];\n } // } else {\n // \tif (this.params.paperQuestionSettings.length > 0) {\n // \t\tthis.$confirm('您确定要修改组卷类型吗?切换后原有的试题将会无效', '温馨提示', {\n // \t\t\tconfirmButtonText: '是',\n // \t\t\tcancelButtonText: '否',\n // \t\t\ttype: 'warning'\n // \t\t}).then(() => {\n // \t\t\tthis.params.wayType = val.value\n // \t\t\tif (this.params.wayType == 2) {\n // \t\t\t\tthis.params.paperQuestionSettings = []\n // \t\t\t} else {\n // \t\t\t\tthis.params.paperQuestionSettings = [{\n // \t\t\t\t\tquestionType: null,\n // \t\t\t\t\tscore: null,\n // \t\t\t\t\tnumuber: null\n // \t\t\t\t}]\n // \t\t\t}\n // \t\t}).catch(() => {\n // \t\t});\n // \t} else {\n // \t\tthis.params.wayType = val.value\n // \t\tif (this.params.wayType == 2) {\n // \t\t\tthis.params.paperQuestionSettings = []\n // \t\t\t// this.confVisible = true\n // \t\t} else {\n // \t\t\tthis.params.paperQuestionSettings = [{\n // \t\t\t\tquestionType: null,\n // \t\t\t\tscore: null,\n // \t\t\t\tnumuber: null\n // \t\t\t}]\n // \t\t}\n // \t}\n // }\n // \n\n\n return;\n this.params.userInfoVos = [];\n this.multipleSelection1 = [];\n\n if (this.params.wayType == 2) {\n this.params.paperQuestionSettings = []; // this.confVisible = true\n } else {\n this.params.paperQuestionSettings = [{\n questionType: null,\n score: null,\n numuber: null\n }];\n }\n },\n removeTable: function removeTable(index) {\n if (this.params.paperQuestionSettings.length == 1) {\n this.params.json = '';\n this.params.paperQuestionSettings = [{}];\n } else {\n this.params.paperQuestionSettings.splice(index, 1);\n }\n },\n // 课目树选中ID\n handleChange: function handleChange(val) {\n var ArrIds = [];\n ArrIds = val;\n\n if (ArrIds.length == 0) {\n this.params.subjectId = ArrIds[0];\n } else {\n this.params.subjectId = ArrIds[val.length - 1];\n }\n },\n //岗位树点击\n handleNodeClick: function handleNodeClick(val) {\n if (val.type == 1) {\n this.newParam.querys = [{\n group: \"defaultQueryGroup\",\n operation: \"EQUAL\",\n property: \"orguser.org_id_\",\n relation: \"AND\",\n value: val.id\n }];\n } else if (val.type == 2) {\n this.newParam.querys = [{\n group: \"defaultQueryGroup\",\n operation: \"EQUAL\",\n property: \"POS_ID_\",\n relation: \"AND\",\n value: val.id\n }];\n } // this.EquipmentList = []\n\n\n this.getOrgUserPage(1);\n },\n getOrgUserPage: function getOrgUserPage(val) {\n var _this9 = this;\n\n this.EquipmentList = [];\n\n if (val) {\n this.newParam.pageBean.page = val;\n }\n\n if (this.querys[0].value) {\n this.newParam.querys.push(this.querys[0]);\n }\n\n this.EquipmentList = [];\n paperMenu.getOrgUserPage(this.newParam, function (res) {\n if (res.rows) {\n res.rows.forEach(function (r) {\n _this9.EquipmentList.push({\n positionId: r.relId,\n account: r.account,\n userName: r.fullName,\n userId: r.userId\n });\n });\n\n _this9.$nextTick(function () {\n if (_this9.params.userInfoVos) {\n _this9.params.userInfoVos.forEach(function (s) {\n _this9.EquipmentList.forEach(function (u) {\n if (s.userId == u.userId) {\n _this9.$refs.multipleTable.toggleRowSelection(u);\n }\n });\n });\n }\n });\n\n _this9.total = res.total;\n }\n });\n },\n //根据课目id查询考生人员\n subjectExaminee: function subjectExaminee() {\n var _this10 = this;\n\n // if(this.params.)\n if (this.title == '新增') {\n this.subjectUser.subjectIds = [];\n this.subjectList.forEach(function (s) {\n _this10.subjectUser.subjectIds.push(s.id);\n });\n paperMenu.getSubjectUserList(this.subjectUser, function (res) {\n _this10.userInfoVos = JSON.parse(JSON.stringify(res));\n _this10.userlength = res.length;\n _this10.params.userInfoVos = res;\n });\n }\n },\n //添加题目\n addTopic: function addTopic() {\n this.confVisible = true;\n this.$refs.configuration.add(this.subjectList, this.params.paperQuestionSettings);\n },\n //随机添加\n addRandom: function addRandom() {\n this.$refs.randomDialog.add(this.subjectList, this.params.paperQuestionSettings);\n },\n //展开 收缩\n anShrinkage: function anShrinkage(val, index) {\n var _this11 = this;\n\n if (!val.questionsInfo.options || val.questionsInfo.options.length > 0) {\n val.isShrink = !val.isShrink;\n this.$set(this.params.paperQuestionSettings, index, val);\n } else if (val.questionsInfo.options.length == 0 && !val.isShrink) {\n paperMenu.detailIdTopic(val.questionId, function (res) {\n val.questionsInfo.options = res.options;\n val.isShrink = !val.isShrink;\n\n _this11.$set(_this11.params.paperQuestionSettings, index, val);\n });\n } else {\n val.isShrink = !val.isShrink;\n this.$set(this.params.paperQuestionSettings, index, val);\n }\n },\n closeFormDiao: function closeFormDiao() {\n this.confVisible = false;\n },\n deleteTopic: function deleteTopic(index) {\n this.params.paperQuestionSettings.splice(index, 1);\n },\n //随机弹框返回值\n getRandom: function getRandom(val) {\n var _this12 = this;\n\n this.params.paperQuestionSettings = [];\n val.forEach(function (v) {\n _this12.subjectList.forEach(function (s) {\n if (s.id == v.subjectId) {\n v.subjectName = s.name;\n }\n });\n\n _this12.topicList.forEach(function (t) {\n if (t.value == v.questionType) {\n v.questionName = t.name;\n }\n });\n\n _this12.params.paperQuestionSettings.push(v);\n });\n },\n //接收考试题目\n testQuestions: function () {\n var _testQuestions = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(val) {\n var _this13 = this;\n\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n console.log(val);\n this.confVisible = false;\n val.forEach(function (e) {\n _this13.params.paperQuestionSettings.push({\n questionId: e.id,\n questionType: e.type,\n score: e.score,\n numuber: 1,\n questionsInfo: {\n difficulty: e.difficulty,\n question: e.question,\n rightOption: e.rightOption,\n parsing: e.parsing,\n createTime: e.createTime,\n options: []\n }\n });\n });\n this.params.paperQuestionSettings.forEach(function (e) {\n e.isShrink = false;\n\n _this13.topicList.forEach(function (t) {\n if (e.questionType == t.value) {\n e.questionTypeName = t.name;\n }\n });\n\n _this13.stndList.forEach(function (s) {\n if (e.questionsInfo.difficulty == s.value) {\n e.questionsInfo.difficultyName = s.name;\n }\n });\n });\n this.params.paperQuestionSettings = this.params.paperQuestionSettings.sort(function (a, b) {\n return a.questionType - b.questionType;\n });\n\n case 5:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function testQuestions(_x) {\n return _testQuestions.apply(this, arguments);\n }\n\n return testQuestions;\n }(),\n //题目数量\n handleNumber: function handleNumber(num, totalNumuber) {\n console.log(num, totalNumuber);\n },\n // 考生确认\n //获取岗位树\n getOrgPostPage: function getOrgPostPage() {\n var _this14 = this;\n\n paperMenu.getOrgPostPage({}, function (res) {\n _this14.currentKey == null;\n _this14.jobsList = res;\n console.log(_this14.jobsList);\n\n if (_this14.jobsList) {\n _this14.currentKey = _this14.jobsList[0].id;\n _this14.newParam.querys = [{\n group: \"defaultQueryGroup\",\n operation: \"EQUAL\",\n property: \"POS_ID_\",\n relation: \"AND\",\n value: _this14.currentKey\n }];\n }\n\n _this14.getOrgUserPage(1);\n });\n },\n handleSizeChange: function handleSizeChange(val) {\n this.newParam.pageBean.pageSize = val;\n this.getOrgUserPage();\n },\n handleCurrentChange: function handleCurrentChange(val) {\n this.newParam.pageBean.page = val;\n this.getOrgUserPage();\n },\n // 中间列表\n searchEnterFun: function searchEnterFun() {\n this.getOrgUserPage(1);\n },\n // 重置\n reset: function reset() {\n this.querys[0].value = \"\";\n this.getOrgUserPage(1);\n },\n // handleSelectionChange(val) {\n // \tif (val.length > 0) {\n // \t\tval.forEach(v => {\n // \t\t\tthis.params.userInfoVos.push(v)\n // \t\t})\n // \t}\n // },\n //删除\n delSubject: function delSubject(index) {\n this.params.paperQuestionSettings.splice(index, 1);\n },\n binRowKey: function binRowKey(row) {\n return row.userId;\n },\n selectable: function selectable(row) {\n var _this15 = this;\n\n var type = true;\n console.log(this.userInfoVos);\n this.userInfoVos.forEach(function (u, ui) {\n if (ui <= _this15.userlength) {\n console.log(row.userId, u.userId);\n\n if (row.userId == u.userId) {\n type = false;\n }\n }\n });\n return type; // return true\n },\n handleSelectionChange: function handleSelectionChange(val) {\n var _this16 = this;\n\n if (val.length > 0) {\n var arr = val.concat(this.params.userInfoVos);\n var map = new Map();\n var uniqueArr = arr.filter(function (item) {\n var key = item.userId;\n var isExist = map.has(key);\n return isExist ? false : map.set(key, true);\n });\n this.params.userInfoVos = uniqueArr;\n this.$set(this.params.userInfoVos);\n } else {\n this.EquipmentList.forEach(function (q) {\n _this16.params.userInfoVos.forEach(function (s, si) {\n if (q.userId == s.userId) {\n _this16.params.userInfoVos.splice(si, 1);\n }\n });\n });\n } // console.log('结果',uniqueArr)\n // console.log(this.params.userInfoVos);\n // val.forEach(e=>{\n // \tthis.params.userInfoVos.forEach(u=>{\n // \t\tif(e.userId==u.userId){\n // \t\t\tconsole.log(e);\n // \t\t}\n // \t})\n // })\n\n },\n manualSelection: function manualSelection(selection, row) {\n var _this17 = this;\n\n console.log(selection, row); //先判断当前操作flag\n //true勾选还是false取消\n\n var flag = selection.some(function (item) {\n if (row.userId == item.userId) return true;\n });\n\n if (flag) {\n this.params.userInfoVos.push(row);\n } else {\n this.params.userInfoVos.forEach(function (s, si) {\n if (s.userId == row.userId) {\n _this17.params.userInfoVos.splice(si, 1);\n }\n });\n }\n },\n selectPaperType: function selectPaperType(val) {\n if (val == 2) {\n this.visiblePopover = true;\n this.subjectList = [];\n this.subject = [];\n } else {\n this.visiblePopover = false;\n }\n },\n selectSubject: function selectSubject(val) {\n var _this18 = this;\n\n console.log(val);\n var arr = JSON.parse(JSON.stringify(this.subjectList));\n this.subjectList = [];\n arr.forEach(function (p, pi) {\n val.forEach(function (v) {\n // console.log(p,v);\n if (p.id == v) {\n _this18.subjectList.push(p);\n }\n });\n });\n\n if (this.params.paperType == 2) {\n this.endType = false;\n }\n },\n renderContent: function renderContent(h, _ref) {\n var _this19 = this;\n\n var node = _ref.node,\n data = _ref.data,\n store = _ref.store;\n return h(\"span\", {\n \"class\": \"custom-tree-node\",\n \"on\": {\n \"mouseover\": function mouseover() {\n _this19.show = true;\n },\n \"mouseout\": function mouseout() {\n _this19.show = false;\n }\n }\n }, [h(\"span\", [data.userName]), h(\"span\", [h(\"el-button\", {\n \"style\": \"width:100%;border:0;margin:0;\",\n \"attrs\": {\n \"size\": \"mini\",\n \"type\": \"text\"\n },\n \"on\": {\n \"click\": function click() {\n return _this19.remove(data);\n }\n }\n }, [\"\\u5220\\u9664\"])])]);\n },\n remove: function remove(val) {\n var _this20 = this;\n\n this.params.userInfoVos.forEach(function (u, ui) {\n if (u.userId == val.userId) {\n _this20.params.userInfoVos.splice(ui, 1);\n }\n });\n this.userInfoVos = JSON.parse(JSON.stringify(this.params.userInfoVos));\n this.userlength = this.params.userInfoVos.length;\n this.getOrgUserPage(1);\n }\n }\n};",null]}