{"remainingRequest":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\examine-fvue\\src\\views\\questionManage\\questionListMenu.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\examine-fvue\\src\\views\\questionManage\\questionListMenu.vue","mtime":1686814052230},{"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":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 req from \"@/request.js\";\nimport dictUtils from '@/components/dict/DictSelectUtils.js'\nimport {\n\tTableMixin\n} from '@/mixins/tableMixin'\nimport questionListMenuDialog from './components/questionListMenuDialog.vue'\nimport subMenu from '@/api/examination/subMenu.js'\nimport questionListMenu from '@/api/examination/questionListMenu.js'\nexport default {\n\tmixins: [TableMixin],\n\tname: 'questionListMenu',\n\tcomponents: {\n\t\tquestionListMenuDialog\n\t},\n\tdata() {\n\t\treturn {\n\t\t\turl: {\n\t\t\t\tdelete: '/exam/questions/info/'\n\t\t\t},\n\t\t\tquerys: [{\n\t\t\t\t\tgroup: 'main',\n\t\t\t\t\toperation: 'LIKE',\n\t\t\t\t\tparentGroup: '',\n\t\t\t\t\tproperty: 'question',\n\t\t\t\t\trelation: 'AND',\n\t\t\t\t\tvalue: ''\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tgroup: 'main',\n\t\t\t\t\toperation: 'LIKE',\n\t\t\t\t\tparentGroup: '',\n\t\t\t\t\tproperty: 'ps.full_id_',\n\t\t\t\t\trelation: 'AND',\n\t\t\t\t\tvalue: ''\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tgroup: 'main',\n\t\t\t\t\toperation: 'EQUAL',\n\t\t\t\t\tparentGroup: '',\n\t\t\t\t\tproperty: 'type',\n\t\t\t\t\trelation: 'AND',\n\t\t\t\t\tvalue: ''\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tgroup: 'main',\n\t\t\t\t\toperation: 'EQUAL',\n\t\t\t\t\tparentGroup: '',\n\t\t\t\t\tproperty: 'difficulty',\n\t\t\t\t\trelation: 'AND',\n\t\t\t\t\tvalue: ''\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tgroup: 'main',\n\t\t\t\t\toperation: 'EQUAL',\n\t\t\t\t\tparentGroup: '',\n\t\t\t\t\tproperty: 'q.IS_DELE_',\n\t\t\t\t\trelation: 'AND',\n\t\t\t\t\tvalue: '0'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tgroup: 'main',\n\t\t\t\t\toperation: 'EQUAL',\n\t\t\t\t\tparentGroup: '',\n\t\t\t\t\tproperty: 'IS_DELE_',\n\t\t\t\t\trelation: 'AND',\n\t\t\t\t\tvalue: '0'\n\t\t\t\t}\n\t\t\t],\n\t\t\tdefaultProps: {\n\t\t\t\tchildren: 'children',\n\t\t\t\tlabel: 'name'\n\t\t\t},\n\t\t\ttableData: [],\n\t\t\tmultipleSelection: [],\n\t\t\ttypeList: [],\n\t\t\tmarkTypeList: [],\n\t\t\tdifficultyList: [],\n\t\t\tfileList: [],\n\t\t\tsearch: '',\n\t\t\ttreeData: [],\n\t\t\tcurrentKey: null,\n\t\t\tsubjectId: [],\n\t\t\tsubjectList: [],\n\t\t\ttype: '',\n\t\t\tfilterText: '',\n\t\t\texpandAll: false\n\t\t}\n\t},\n\tcreated() {\n\t\tthis.getSubjects()\n\t\tthis.difficultyList = dictUtils.getDictItemsFromCache('stnd')\n\t\tthis.typeList = dictUtils.getDictItemsFromCache('sttx')\n\t\tconsole.log(this.typeList);\n\t\tthis.markTypeList = dictUtils.getDictItemsFromCache('pjfs')\n\t},\n\tmounted() {},\n\twatch: {\n\t\tcurrentKey: {\n\t\t\thandler(value) {\n\t\t\t\tif (value) {\n\t\t\t\t\tthis.$nextTick(\n\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\tthis.$refs.tree.setCurrentKey(this.currentKey);\n\t\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t},\n\t\t\timmediate: true,\n\t\t\tvalType: false\n\t\t},\n\t\tfilterText(val) {\n\t\t\tthis.$refs.tree.filter(val);\n\t\t}\n\t},\n\tmethods: {\n\t\texpandHandle() {\n\t\t\tconsole.log(this.$refs.tree.store);\n\t\t\tthis.expandAll = !this.expandAll;\n\t\t\tthis.expandNodes(this.$refs.tree.store.root);\n\t\t},\n\t\t// 遍历树形数据,设置每一项的expanded属性,实现展开收起\n\t\texpandNodes(node) {\n\t\t\tnode.expanded = this.expandAll;\n\t\t\tfor (let i = 0; i < node.childNodes.length; i++) {\n\t\t\t\tnode.childNodes[i].expanded = this.expandAll;\n\t\t\t\tif (node.childNodes[i].childNodes.length > 0) {\n\t\t\t\t\tthis.expandNodes(node.childNodes[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tfilterNode(value, data) {\n\t\t\t// console.log(data);\n\t\t\tif (!value) return true;\n\t\t\treturn data.name.indexOf(value) !== -1;\n\t\t},\n\t\timportData() {\n\t\t\tthis.$message({\n\t\t\t\tmessage: '请选择课目',\n\t\t\t\ttype: 'warning'\n\t\t\t});\n\t\t},\n\t\t// 获取list\n\t\tloadData(page) {\n\t\t\tif (page) {\n\t\t\t\tthis.queryParam.pageBean.page = page\n\t\t\t}\n\t\t\tthis.loading = true\n\t\t\tthis.tableData = []\n\t\t\tthis.queryParam.querys = []\n\t\t\tthis.queryParam.sorter = [{\n\t\t\t\tdirection: \"DESC\",\n\t\t\t\tproperty: \"createTime\"\n\t\t\t}]\n\t\t\tif (this.querys[0].value) {\n\t\t\t\tthis.queryParam.querys.push(this.querys[0])\n\t\t\t}\n\t\t\tif (this.querys[1].value) {\n\t\t\t\tthis.queryParam.querys.push(this.querys[1])\n\t\t\t}\n\t\t\tif (this.querys[2].value) {\n\t\t\t\tthis.queryParam.querys.push(this.querys[2])\n\t\t\t}\n\t\t\tif (this.querys[3].value) {\n\t\t\t\tthis.queryParam.querys.push(this.querys[3])\n\t\t\t}\n\t\t\tif (this.querys[4].value) {\n\t\t\t\tthis.queryParam.querys.push(this.querys[4])\n\t\t\t}\n\n\t\t\tquestionListMenu.getQuestions(this.queryParam, res => {\n\t\t\t\tthis.total = res.total\n\t\t\t\tthis.tableData = res.rows\n\t\t\t\tthis.tableData.forEach(item => {\n\t\t\t\t\tif (this.typeList) {\n\t\t\t\t\t\tthis.typeList.forEach(tt => {\n\t\t\t\t\t\t\tif (item.type == tt.value) {\n\t\t\t\t\t\t\t\titem[\"typeName\"] = tt.name\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t\tif (this.difficultyList) {\n\t\t\t\t\t\tthis.difficultyList.forEach(dd => {\n\t\t\t\t\t\t\tif (item.difficulty == dd.value) {\n\t\t\t\t\t\t\t\titem[\"difficultyName\"] = dd.name\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t\tif (this.markTypeList) {\n\t\t\t\t\t\tthis.markTypeList.forEach(mm => {\n\t\t\t\t\t\t\tif (item.markType == mm.value) {\n\t\t\t\t\t\t\t\titem[\"markTypeName\"] = mm.name\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\tthis.$set(this.tableData)\n\t\t\t\tthis.loading = false\n\t\t\t})\n\t\t},\n\t\t// 打开搜索更多\n\t\topenMore() {\n\t\t\tthis.showMore = !this.showMore\n\t\t},\n\t\t//获取课目\n\t\tgetSubjects() {\n\t\t\tthis.currentKey = null\n\t\t\tquestionListMenu.getSubjects({}, res => {\n\t\t\t\tif (res.value) {\n\t\t\t\t\tthis.treeData = res.value\n\t\t\t\t\tthis.currentKey = this.treeData[0].id\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\thandleAdd() {\n\t\t\tif (this.type == 3) {\n\t\t\t\tthis.$refs.formModal.add(this.subjectId, this.subjectList)\n\t\t\t} else {\n\t\t\t\tthis.$message.warning('请先选择课目')\n\t\t\t}\n\t\t},\n\t\t// 导入\n\t\thandleAvatarSuccess() {},\n\t\tbeforeAvatarUpload() {},\n\t\ttableRowClassName({\n\t\t\trow,\n\t\t\trowIndex\n\t\t}) {\n\t\t\tif (rowIndex % 2 == 0) {\n\t\t\t\treturn 'warning-row'\n\t\t\t} else {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t},\n\t\t//导入\n\t\thandleChange(file, fileList) {\n\t\t\tconsole.log(1);\n\t\t\tif (fileList.length > 1) {\n\t\t\t\tfileList.splice(0, 1)\n\t\t\t}\n\t\t\tif (file.raw.name.split('.')[1] == 'xlsx' || file.raw.name.split('.')[1] == 'xls' || file.raw.name.split(\n\t\t\t\t\t'.')[1] == 'xlsm') {\n\t\t\t\tthis.upLoadFile(file.raw)\n\t\t\t} else {\n\t\t\t\tthis.$message.warning('请上传xls,xlsx,xlsm格式文件!')\n\t\t\t\tfileList.splice(0)\n\t\t\t}\n\t\t},\n\t\t//自定义上传方法(覆盖默认上传行为)\n\t\tupLoadFile(file) {\n\t\t\tlet formData = new FormData()\n\t\t\tformData.append('file', file)\n\t\t\tformData.append('subjectId', this.querys[1].value)\n\t\t\t// subjectId:this.querys[1].value,\n\t\t\tquestionListMenu.importExcel(formData, (res) => {\n\t\t\t\tif (res.state) {\n\t\t\t\t\tthis.$notify({\n\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\tmessage: '导入成功',\n\t\t\t\t\t\tduration: 2000,\n\t\t\t\t\t})\n\t\t\t\t\tthis.loadData(1)()\n\t\t\t\t} else {\n\t\t\t\t\tthis.$notify({\n\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\tmessage: res.message,\n\t\t\t\t\t\tduration: 2000,\n\t\t\t\t\t\toffset: 80,\n\t\t\t\t\t})\n\t\t\t\t\tthis.loadData(1)\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\texportFile() {\n\t\t\tlet params=JSON.parse(JSON.stringify(this.queryParam))\n\t\t\tparams.querys=[]\n\t\t\tif (this.querys[0].value) {\n\t\t\t\tparams.querys.push(this.querys[0])\n\t\t\t}\n\t\t\tif (this.querys[1].value) {\n\t\t\t\tparams.querys.push(this.querys[1])\n\t\t\t}\n\t\t\tif (this.querys[2].value) {\n\t\t\t\tparams.querys.push(this.querys[2])\n\t\t\t}\n\t\t\tif (this.querys[3].value) {\n\t\t\t\tparams.querys.push(this.querys[3])\n\t\t\t}\n\t\t\tif (this.querys[5].value) {\n\t\t\t\tparams.querys.push(this.querys[5])\n\t\t\t}\n\t\t\tquestionListMenu.export(params, res => {\n\t\t\t\tif (res) {\n\n\t\t\t\t}\n\t\t\t})\n\n\t\t},\n\t\tfilterNode(value, data) {\n\t\t\tif (!value) return true;\n\t\t\treturn data.name.indexOf(value) !== -1;\n\t\t},\n\n\t\t// 点击树查看数据\t\t\t\t\n\t\thandleNodeClick(data) {\n\t\t\tthis.subjectId = []\n\t\t\tthis.subjectList = []\n\t\t\tthis.type = data.type\n\t\t\tthis.querys[1].value = data.id\n\t\t\tthis.subjectId.push(data.id)\n\t\t\tthis.subjectList.push(data)\n\t\t\tthis.loadData(1)\n\t\t},\n\t}\n}\n",null]}