{"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\\questionManage\\components\\questionListMenuDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\examine-fvue\\src\\views\\questionManage\\components\\questionListMenuDialog.vue","mtime":1705466684692},{"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.regexp.to-string\";\nimport _typeof from \"D:/jenkins/workspace/examine-fvue/node_modules/@babel/runtime/helpers/esm/typeof\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/es6.function.name\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 questionListMenu from '@/api/examination/questionListMenu.js';\nimport dictUtils from '@/components/dict/DictSelectUtils.js';\nimport subjectDialog from \"./subjectDialog.vue\";\nimport { mapState } from 'vuex';\nimport 'quill/dist/quill.core.css';\nimport 'quill/dist/quill.snow.css';\nimport 'quill/dist/quill.bubble.css';\nimport { quillEditor } from 'vue-quill-editor';\nvar toolbarOptions = [['bold', 'italic', 'underline', 'strike'], // 加粗,斜体,下划线,删除线\n['blockquote', 'code-block'], //引用,代码块\n[{\n header: 1\n}, {\n header: 2\n}], // 几级标题\n[{\n list: 'ordered'\n}, {\n list: 'bullet'\n}], // 字体大小\n[{\n header: [1, 2, 3, 4, 5, 6, false]\n}], // 标题\n[{\n color: []\n}], // 颜色选择\n['clean'], // 清除样式,\n['link', 'image'] // 上传图片、上传视频\n];\nexport default {\n name: 'questionListMenuDialog',\n components: {\n quillEditor: quillEditor,\n subjectDialog: subjectDialog\n },\n data: function data() {\n return {\n visible: false,\n uploadUrl: window.context.portal + '/file/v1/uploadFileForConfig',\n // 服务器上传地址\n acceptImg: '.jpg,.jpeg,.png,.JPG,.JPEG,.gif,.PNG,.GIF',\n params: {\n difficulty: \"\",\n memo: \"\",\n options: [{\n optionContent: \"\",\n optionKey: \"A\"\n }, {\n optionContent: \"\",\n optionKey: \"B\"\n }, {\n optionContent: \"\",\n optionKey: \"C\"\n }, {\n optionContent: \"\",\n optionKey: \"D\"\n }],\n parsing: null,\n question: \"\",\n rightOption: \"\",\n subId: \"\",\n type: \"\"\n },\n title: '',\n subject: '',\n subjectList: [],\n //难度\n difficultyList: [],\n // 评卷方式\n focusNum: false,\n focusJ: false,\n rules: {\n subId: [{\n required: true,\n message: '请输入',\n trigger: 'blur'\n }]\n },\n // 富文本配置\n editorOption: {\n placeholder: '请输入题目',\n theme: 'snow',\n //主题 snow/bubble\n modules: {\n history: {\n delay: 1000,\n maxStack: 50,\n userOnly: false\n },\n toolbar: {\n container: toolbarOptions,\n handlers: {\n image: function image(value) {\n if (value) {\n // 调用element的图片上传组件\n document.querySelector('.avatar-qeuploader input').click();\n } else {\n this.quill.format('image', false);\n }\n }\n }\n }\n }\n }\n };\n },\n created: function created() {\n // 难度\n this.difficultyList = dictUtils.getDictItemsFromCache('stnd'); //题目类型\n\n this.typeList = dictUtils.getDictItemsFromCache('sttx'); //评卷方式\n // this.markTypeList = dictUtils.getDictItemsFromCache('pjfs')\n },\n computed: mapState({\n header: function header(state) {\n return {\n Authorization: \"Bearer \".concat(state.login.currentUser.token)\n };\n }\n }),\n mounted: function mounted() {},\n methods: {\n add: function add(id, list) {\n console.log(id, list);\n this.title = '新增';\n this.visible = true;\n this.subjectList = [];\n this.subject = [];\n\n if (id.length > 0 && list.length > 0) {\n this.subjectList.push({\n id: list[0].id,\n name: list[0].name\n });\n this.subject = list[0].id;\n }\n\n this.params.difficulty = this.difficultyList[0].value;\n this.params.type = this.typeList[0].value; // this.params.markType = this.markTypeList[0].value\n },\n edit: function edit(val) {\n var _this = this;\n\n questionListMenu.detailId(val.id, function (res) {\n if (res) {\n _this.params = res;\n _this.focusNum = true;\n _this.focusJ = true;\n\n _this.params.options.map(function (e) {\n e.focusNum = true;\n });\n\n if (_this.params.type == 2) {\n _this.params.rightOption = _this.params.rightOption.split(',');\n }\n\n _this.subjectList.push({\n id: _this.params.subId,\n name: _this.params.subjectName\n });\n\n _this.subject = _this.params.subId;\n _this.title = '修改';\n _this.visible = true;\n }\n });\n },\n //打开课目弹框\n subjectDUsers: function subjectDUsers() {\n this.$refs.subjectDialog.add(this.subjectList);\n },\n // 课目树选中ID\n handleChange: function handleChange(val) {\n var ArrIds = [];\n ArrIds = val;\n\n if (ArrIds.length == 0) {\n this.params.subId = ArrIds[0];\n } else {\n this.params.subId = ArrIds[val.length - 1];\n }\n },\n focus: function focus(val, index) {\n console.log(1);\n\n if (val == 't') {\n this.focusNum = true;\n } else if (val == 'j') {\n this.focusJ = true;\n } else {\n val.focusNum = true;\n this.$set(this.params.options, index, this.params.options[index]);\n }\n },\n getUser: function getUser(val) {\n console.log(val);\n this.subjectList = [];\n this.subject = val.id;\n this.$set(this.subjectList, 0, val);\n console.log(this.subjectList);\n },\n generateBig: function generateBig() {\n var ch_big = 'A';\n var str_big = '';\n\n for (var i = 0; i < 26; i++) {\n str_big += String.fromCharCode(ch_big.charCodeAt(0) + i);\n }\n\n this.params.options.push({\n optionKey: str_big[this.params.options.length],\n optionContent: '',\n focusNum: true\n });\n },\n //删除选择\n deleteOption: function deleteOption(index) {\n if (index > 0) {\n this.params.options.splice(index, 1);\n }\n },\n // 关闭新增人员窗口\n handleClose: function handleClose() {\n this.focusNum = false;\n this.focusJ = false;\n this.params = {\n difficulty: \"\",\n groupFlag: \"\",\n // markType: \"\",\n memo: \"\",\n options: [{\n optionContent: \"\",\n optionKey: \"A\"\n }, {\n optionContent: \"\",\n optionKey: \"B\"\n }, {\n optionContent: \"\",\n optionKey: \"C\"\n }, {\n optionContent: \"\",\n optionKey: \"D\"\n }],\n parsing: \"\",\n question: \"\",\n rightOption: \"\",\n subId: \"\",\n type: \"\"\n };\n this.subjectList = [];\n this.subject = '';\n this.visible = false;\n this.$emit('loadData');\n },\n topicType: function topicType(val) {\n var _this2 = this;\n\n if (this.params.question != '') {\n this.$confirm('您确定要修改题目类型吗?切换后原有的题目将清空', '温馨提示', {\n confirmButtonText: '是',\n cancelButtonText: '否',\n type: 'warning'\n }).then(function () {\n _this2.params.type = val.value;\n _this2.focusNum = false;\n _this2.focusJ = false;\n _this2.params.question = '';\n _this2.params.parsing = '';\n\n if (_this2.params.type == 2) {\n _this2.params.rightOption = [];\n } else {\n _this2.params.rightOption = '';\n }\n\n if (_this2.params.type == '1' || _this2.params.type == '2') {\n _this2.params.options = [{\n optionContent: \"\",\n optionKey: \"A\"\n }, {\n optionContent: \"\",\n optionKey: \"B\"\n }, {\n optionContent: \"\",\n optionKey: \"C\"\n }, {\n optionContent: \"\",\n optionKey: \"D\"\n }];\n\n _this2.$set(_this2.params.options);\n } else {\n _this2.params.options = [];\n }\n }).catch(function () {});\n } else {\n this.params.type = val.value;\n this.focusNum = false;\n this.focusJ = false;\n this.params.question = '';\n this.params.parsing = '';\n\n if (this.params.type == 2) {\n this.params.rightOption = [];\n } else {\n this.params.rightOption = '';\n }\n\n if (this.params.type == '1' || this.params.type == '2') {\n this.params.options = [{\n optionContent: \"\",\n optionKey: \"A\"\n }, {\n optionContent: \"\",\n optionKey: \"B\"\n }, {\n optionContent: \"\",\n optionKey: \"C\"\n }, {\n optionContent: \"\",\n optionKey: \"D\"\n }];\n this.$set(this.params.options);\n } else {\n this.params.options = [];\n }\n }\n },\n // 保存\n handleSave: function handleSave(val) {\n var _this3 = this;\n\n this.typeList.forEach(function (item) {\n if (item.name == _this3.params.type) {\n _this3.params.type = item.value;\n }\n });\n\n if (_typeof(this.params.rightOption) == 'object') {\n this.params.rightOption = this.params.rightOption.toString();\n }\n\n this.params.subId = this.subject;\n this.$refs.formInfo.validate(function (valid) {\n if (valid) {\n var method;\n\n if (_this3.title === '新增') {\n method = questionListMenu.addQuestions;\n }\n\n if (_this3.title === '修改') {\n method = questionListMenu.editQuestions;\n }\n\n method(_this3.params, function (response) {\n if (response.state) {\n _this3.$notify({\n type: 'success',\n message: _this3.title + '成功',\n duration: 2000\n });\n\n if (val == 1) {\n _this3.params.options = [{\n optionContent: \"\",\n optionKey: \"A\"\n }, {\n optionContent: \"\",\n optionKey: \"B\"\n }, {\n optionContent: \"\",\n optionKey: \"C\"\n }, {\n optionContent: \"\",\n optionKey: \"D\"\n }];\n _this3.params.parsing = '';\n _this3.params.question = '';\n\n if (_this3.params.type == 2) {\n _this3.params.rightOption = [];\n } else {\n _this3.params.rightOption = '';\n }\n } else if (val == 2) {\n _this3.handleClose();\n }\n } else {\n _this3.$message.warning(response.message);\n }\n });\n }\n });\n },\n //继续添加\n continueAdd: function continueAdd() {},\n qeuploadSuccess: function qeuploadSuccess(res) {\n // 获取富文本组件实例\n var quill = this.$refs.QuillEditor.quill; // 如果上传成功\n\n if (res) {\n // 获取光标所在位置\n var fileId = res.fileId;\n var url = this.previewUrl + fileId;\n var length = quill.getSelection().index; // 插入图片,res为服务器返回的图片链接地址\n\n quill.insertEmbed(length, 'image', url); // 调整光标到最后\n\n quill.setSelection(length + 1);\n } else {\n // 提示信息,需引入Message\n this.$message.error('图片插入失败!');\n }\n },\n beforeUpload: function beforeUpload(file) {\n return true;\n },\n // 失去焦点\n onEditorBlur: function onEditorBlur(editor) {},\n // 获得焦点\n onEditorFocus: function onEditorFocus(editor) {},\n // 开始\n onEditorReady: function onEditorReady(editor) {},\n // 值发生变化\n onEditorChange: function onEditorChange(editor) {}\n }\n};",null]}