{"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\\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\\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 _defineProperty from \"D:/jenkins/workspace/examine-fvue/node_modules/@babel/runtime/helpers/esm/defineProperty\";\nimport \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.function.name\";\n\nvar _methods;\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 { TableMixin } 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  mixins: [TableMixin],\n  name: 'questionListMenu',\n  components: {\n    questionListMenuDialog: questionListMenuDialog\n  },\n  data: function data() {\n    return {\n      url: {\n        delete: '/exam/questions/info/'\n      },\n      querys: [{\n        group: 'main',\n        operation: 'LIKE',\n        parentGroup: '',\n        property: 'question',\n        relation: 'AND',\n        value: ''\n      }, {\n        group: 'main',\n        operation: 'LIKE',\n        parentGroup: '',\n        property: 'ps.full_id_',\n        relation: 'AND',\n        value: ''\n      }, {\n        group: 'main',\n        operation: 'EQUAL',\n        parentGroup: '',\n        property: 'type',\n        relation: 'AND',\n        value: ''\n      }, {\n        group: 'main',\n        operation: 'EQUAL',\n        parentGroup: '',\n        property: 'difficulty',\n        relation: 'AND',\n        value: ''\n      }, {\n        group: 'main',\n        operation: 'EQUAL',\n        parentGroup: '',\n        property: 'q.IS_DELE_',\n        relation: 'AND',\n        value: '0'\n      }, {\n        group: 'main',\n        operation: 'EQUAL',\n        parentGroup: '',\n        property: 'IS_DELE_',\n        relation: 'AND',\n        value: '0'\n      }],\n      defaultProps: {\n        children: 'children',\n        label: 'name'\n      },\n      tableData: [],\n      multipleSelection: [],\n      typeList: [],\n      markTypeList: [],\n      difficultyList: [],\n      fileList: [],\n      search: '',\n      treeData: [],\n      currentKey: null,\n      subjectId: [],\n      subjectList: [],\n      type: '',\n      filterText: '',\n      expandAll: false\n    };\n  },\n  created: function created() {\n    this.getSubjects();\n    this.difficultyList = dictUtils.getDictItemsFromCache('stnd');\n    this.typeList = dictUtils.getDictItemsFromCache('sttx');\n    console.log(this.typeList);\n    this.markTypeList = dictUtils.getDictItemsFromCache('pjfs');\n  },\n  mounted: function mounted() {},\n  watch: {\n    currentKey: {\n      handler: function handler(value) {\n        var _this = this;\n\n        if (value) {\n          this.$nextTick(function () {\n            _this.$refs.tree.setCurrentKey(_this.currentKey);\n          });\n        }\n      },\n      immediate: true,\n      valType: false\n    },\n    filterText: function filterText(val) {\n      this.$refs.tree.filter(val);\n    }\n  },\n  methods: (_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      // console.log(data);\n      if (!value) return true;\n      return data.name.indexOf(value) !== -1;\n    },\n    importData: function importData() {\n      this.$message({\n        message: '请选择课目',\n        type: 'warning'\n      });\n    },\n    // 获取list\n    loadData: function loadData(page) {\n      var _this2 = this;\n\n      if (page) {\n        this.queryParam.pageBean.page = page;\n      }\n\n      this.loading = true;\n      this.tableData = [];\n      this.queryParam.querys = [];\n      this.queryParam.sorter = [{\n        direction: \"DESC\",\n        property: \"createTime\"\n      }];\n\n      if (this.querys[0].value) {\n        this.queryParam.querys.push(this.querys[0]);\n      }\n\n      if (this.querys[1].value) {\n        this.queryParam.querys.push(this.querys[1]);\n      }\n\n      if (this.querys[2].value) {\n        this.queryParam.querys.push(this.querys[2]);\n      }\n\n      if (this.querys[3].value) {\n        this.queryParam.querys.push(this.querys[3]);\n      }\n\n      if (this.querys[4].value) {\n        this.queryParam.querys.push(this.querys[4]);\n      }\n\n      questionListMenu.getQuestions(this.queryParam, function (res) {\n        _this2.total = res.total;\n        _this2.tableData = res.rows;\n\n        _this2.tableData.forEach(function (item) {\n          if (_this2.typeList) {\n            _this2.typeList.forEach(function (tt) {\n              if (item.type == tt.value) {\n                item[\"typeName\"] = tt.name;\n              }\n            });\n          }\n\n          if (_this2.difficultyList) {\n            _this2.difficultyList.forEach(function (dd) {\n              if (item.difficulty == dd.value) {\n                item[\"difficultyName\"] = dd.name;\n              }\n            });\n          }\n\n          if (_this2.markTypeList) {\n            _this2.markTypeList.forEach(function (mm) {\n              if (item.markType == mm.value) {\n                item[\"markTypeName\"] = mm.name;\n              }\n            });\n          }\n        });\n\n        _this2.$set(_this2.tableData);\n\n        _this2.loading = false;\n      });\n    },\n    // 打开搜索更多\n    openMore: function openMore() {\n      this.showMore = !this.showMore;\n    },\n    //获取课目\n    getSubjects: function getSubjects() {\n      var _this3 = this;\n\n      this.currentKey = null;\n      questionListMenu.getSubjects({}, function (res) {\n        if (res.value) {\n          _this3.treeData = res.value;\n          _this3.currentKey = _this3.treeData[0].id;\n        }\n      });\n    },\n    handleAdd: function handleAdd() {\n      if (this.type == 3) {\n        this.$refs.formModal.add(this.subjectId, this.subjectList);\n      } else {\n        this.$message.warning('请先选择课目');\n      }\n    },\n    // 导入\n    handleAvatarSuccess: function handleAvatarSuccess() {},\n    beforeAvatarUpload: function beforeAvatarUpload() {},\n    tableRowClassName: function tableRowClassName(_ref) {\n      var row = _ref.row,\n          rowIndex = _ref.rowIndex;\n\n      if (rowIndex % 2 == 0) {\n        return 'warning-row';\n      } else {\n        return '';\n      }\n    },\n    //导入\n    handleChange: function handleChange(file, fileList) {\n      console.log(1);\n\n      if (fileList.length > 1) {\n        fileList.splice(0, 1);\n      }\n\n      if (file.raw.name.split('.')[1] == 'xlsx' || file.raw.name.split('.')[1] == 'xls' || file.raw.name.split('.')[1] == 'xlsm') {\n        this.upLoadFile(file.raw);\n      } else {\n        this.$message.warning('请上传xls,xlsx,xlsm格式文件！');\n        fileList.splice(0);\n      }\n    },\n    //自定义上传方法（覆盖默认上传行为）\n    upLoadFile: function upLoadFile(file) {\n      var _this4 = this;\n\n      var formData = new FormData();\n      formData.append('file', file);\n      formData.append('subjectId', this.querys[1].value); // subjectId:this.querys[1].value,\n\n      questionListMenu.importExcel(formData, function (res) {\n        if (res.state) {\n          _this4.$notify({\n            type: 'success',\n            message: '导入成功',\n            duration: 2000\n          });\n\n          _this4.loadData(1)();\n        } else {\n          _this4.$notify({\n            type: 'error',\n            message: res.message,\n            duration: 2000,\n            offset: 80\n          });\n\n          _this4.loadData(1);\n        }\n      });\n    },\n    exportFile: function exportFile() {\n      var params = JSON.parse(JSON.stringify(this.queryParam));\n      params.querys = [];\n\n      if (this.querys[0].value) {\n        params.querys.push(this.querys[0]);\n      }\n\n      if (this.querys[1].value) {\n        params.querys.push(this.querys[1]);\n      }\n\n      if (this.querys[2].value) {\n        params.querys.push(this.querys[2]);\n      }\n\n      if (this.querys[3].value) {\n        params.querys.push(this.querys[3]);\n      }\n\n      if (this.querys[5].value) {\n        params.querys.push(this.querys[5]);\n      }\n\n      questionListMenu.export(params, function (res) {\n        if (res) {}\n      });\n    }\n  }, _defineProperty(_methods, \"filterNode\", function filterNode(value, data) {\n    if (!value) return true;\n    return data.name.indexOf(value) !== -1;\n  }), _defineProperty(_methods, \"handleNodeClick\", function handleNodeClick(data) {\n    this.subjectId = [];\n    this.subjectList = [];\n    this.type = data.type;\n    this.querys[1].value = data.id;\n    this.subjectId.push(data.id);\n    this.subjectList.push(data);\n    this.loadData(1);\n  }), _methods)\n};",null]}