{"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\\bbtjMenu\\ndbbMenu.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\examine-fvue\\src\\views\\bbtjMenu\\ndbbMenu.vue","mtime":1675656016347},{"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/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//\nimport req from \"@/request.js\";\nimport { TableMixin } from '@/mixins/tableMixin';\nimport moment from 'moment';\nimport ndbbMenu from '@/api/examination/ndbbMenu.js';\nimport dictUtils from '@/components/dict/DictSelectUtils.js';\nimport gradeDialog from \"./components/gradeDialog.vue\";\nexport default {\n  name: 'ndbbMenu',\n  mixins: [TableMixin],\n  components: {\n    gradeDialog: gradeDialog\n  },\n  data: function data() {\n    return {\n      url: {\n        delete: '/exam/year/EvaluationmentSub/'\n      },\n      search: '',\n      tableData: [],\n      treeData: [],\n      defaultProps: {\n        children: 'children',\n        label: 'name'\n      },\n      parentId: null,\n      querys: [{\n        group: 'main',\n        operation: 'LIKE',\n        parentGroup: '',\n        property: 'positionId',\n        relation: 'AND',\n        value: ''\n      }, {\n        group: 'main',\n        operation: 'LIKE',\n        parentGroup: '',\n        property: 'e.user_name_',\n        relation: 'AND',\n        value: ''\n      }, {\n        group: 'main',\n        operation: 'LIKE',\n        parentGroup: '',\n        property: 'e.year_',\n        relation: 'AND',\n        value: moment().format('YYYY')\n      }, {\n        group: 'main',\n        operation: 'EQUAL',\n        parentGroup: '',\n        property: 'e.level_',\n        relation: 'AND',\n        value: ''\n      }],\n      sortList: {},\n      subjectsList: [],\n      pjdjeList: [],\n      currentKey: null,\n      filterText: '',\n      fileList: [],\n      type: '',\n      id: '',\n      expandAll: false\n    };\n  },\n  created: function created() {\n    this.pjdjeList = dictUtils.getDictItemsFromCache('pjdj');\n  },\n  watch: {\n    filterText: function filterText(val) {\n      this.$refs.tree.filter(val);\n    } // currentKey: {\n    // \thandler(value) {\n    // \t\tif (value) {\n    // \t\t\tthis.$nextTick(\n    // \t\t\t\t() => {\n    // \t\t\t\t\tthis.$refs.tree.setCurrentKey(this.currentKey);\n    // \t\t\t\t});\n    // \t\t}\n    // \t},\n    // \timmediate: true,\n    // \tvalType: false\n    // },\n\n  },\n  mounted: function mounted() {\n    this.getTreen();\n  },\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    importData: function importData() {\n      this.$message({\n        message: '请选择课目',\n        type: 'warning'\n      });\n    },\n    filterNode: function filterNode(value, data) {\n      if (!value) return true;\n      return data.name.indexOf(value) !== -1;\n    },\n    // 保存排序\n    savePropertyf: function savePropertyf() {\n      var _this = this;\n\n      ndbbMenu.updateEvaluation(this.sortList, function (res) {\n        if (res.state) {\n          _this.$notify({\n            type: 'success',\n            message: res.message,\n            duration: 2000\n          });\n\n          _this.getData();\n        } else {\n          _this.$message.warning(res.message);\n        }\n      });\n    },\n    openGrade: function openGrade() {\n      console.log(1, this.currentKey);\n      this.$refs.gradeDialog.open(this.currentKey);\n    },\n    insort: function insort(val) {\n      var id = val.id;\n      var value = val.sn;\n      this.sortList[id] = value;\n    },\n    reload: function reload() {\n      this.getData(1);\n    },\n    handleClick: function handleClick(val) {\n      this.$router.push({\n        name: 'ndbbMenuDetails',\n        params: val\n      });\n    },\n    toPreview: function toPreview() {},\n    handleAdd: function handleAdd() {},\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 _this2 = this;\n\n      var formData = new FormData();\n      formData.append('file', file);\n      formData.append('orgId', this.parentId); // subjectId:this.querys[1].value,\n\n      ndbbMenu.importExcel(formData, function (res) {\n        if (res.state) {\n          _this2.$notify({\n            type: 'success',\n            message: '导入成功',\n            duration: 2000\n          });\n\n          _this2.loadData(1)();\n        } else {\n          _this2.$notify({\n            type: 'error',\n            message: res.message,\n            duration: 2000,\n            offset: 80\n          });\n\n          _this2.loadData(1);\n        }\n      });\n    },\n    exportFile: function exportFile() {\n      if (this.type == 2) {\n        ndbbMenu.export(this.currentKey, function (res) {\n          if (res) {}\n        });\n      } else {\n        this.$message({\n          message: '请选择课目',\n          type: 'warning'\n        });\n      }\n    },\n    handleNodeClick: function handleNodeClick(data) {\n      console.log(data);\n      this.type = data.type;\n\n      if (data.type == 1) {\n        this.parentId = data.id;\n      } else {\n        this.parentId = '';\n      }\n\n      this.currentKey = data.id;\n\n      if (data.id == '0') {\n        this.querys[0].value = '';\n        this.getData(1);\n      } else {\n        this.querys[0].value = data.id;\n        this.getData(1);\n      }\n\n      console.log(2, this.currentKey);\n      sessionStorage.setItem('currentKey', data.id);\n      sessionStorage.setItem('type', this.type);\n    },\n    // 获取树\n    getTreen: function getTreen() {\n      var _this3 = this;\n\n      this.currentKey = '';\n      ndbbMenu.getPositionPage({}, function (res) {\n        _this3.treeData = res; // \tif (sessionStorage.getItem('currentKey')) {\n        // \t\tthis.currentKey = sessionStorage.getItem('currentKey') //不是第一次了，取出来\n        // \t\tconsole.log(this.currentKey);\n        // \t\tthis.type = sessionStorage.getItem('type') \n        // \t} else {\n\n        _this3.currentKey = res[0].id;\n        _this3.type = res[0].type; // \t}\n\n        console.log(_this3.currentKey);\n        _this3.querys[0].value = _this3.currentKey;\n\n        _this3.$set(_this3.querys[0]);\n\n        _this3.$set(_this3.treeData);\n\n        _this3.getData(1);\n      });\n    },\n    loadData: function loadData() {},\n    // 获取list\n    getData: function getData(page) {\n      var _this4 = this;\n\n      console.log(this.querys[0].value);\n\n      if (page) {\n        this.queryParam.pageBean.page = page;\n      }\n\n      this.loading = true;\n      this.tableData = [];\n      this.queryParam.querys = [];\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      ndbbMenu.queryEvaluation(this.queryParam, function (res) {\n        _this4.total = res.total;\n        _this4.tableData = res.rows;\n\n        _this4.tableData.forEach(function (item) {\n          _this4.pjdjeList.forEach(function (ee) {\n            if (item.level == ee.value) {\n              item['levelName'] = ee.name;\n            }\n          });\n        });\n\n        _this4.$set(_this4.tableData);\n\n        _this4.loading = false;\n      });\n    },\n    // 新增\n    append: function append(data, type) {\n      if (type != 'father') {\n        this.$refs.SubClassModal.add(data);\n      } else {\n        this.$refs.SubClassModal.add(data);\n      }\n    },\n    // 修改\n    upDateinfo: function upDateinfo(data, type) {\n      this.$refs.SubClassModal.edit(data);\n    }\n  }\n};",null]}