{"remainingRequest":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\examine-fvue\\src\\views\\mainDataMenu\\subMenu.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\examine-fvue\\src\\views\\mainDataMenu\\subMenu.vue","mtime":1675655021227},{"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//\n//\n//\n\nimport req from \"@/request.js\";\nimport {\n\tTableMixin\n} from '@/mixins/tableMixin'\nimport subMenuDialog from './components/subMenuDialog.vue'\nimport SubjectClassDialog from './components/SubjectClassDialog.vue'\nimport subMenu from '@/api/examination/subMenu.js'\nimport dictUtils from '@/components/dict/DictSelectUtils.js'\nimport equSysMenu from '@/api/examination/equSysMenu.js'\nexport default {\n\tname: 'subMenu',\n\tcomponents: {\n\t\tsubMenuDialog,\n\t\tSubjectClassDialog\n\t},\n\tmixins: [TableMixin],\n\tdata() {\n\t\treturn {\n\t\t\turl: {\n\t\t\t\tdelete: '/exam/subject/info/'\n\t\t\t},\n\t\t\tsearch: '',\n\t\t\ttableData: [],\n\t\t\tfilterText: '',\n\t\t\ttreeData: [],\n\t\t\ttreeNode: {\n\t\t\t\tcode: '',\n\t\t\t\tid: '0',\n\t\t\t\tname: '课目分类管理',\n\t\t\t\ttype: 0,\n\t\t\t\tchildren: []\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\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: 'name',\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: 'trainType',\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: 'typeId',\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: 'po.full_id_ ',\n\t\t\t\t\trelation: 'AND',\n\t\t\t\t\tvalue: ''\n\t\t\t\t}\n\t\t\t],\n\t\t\tTrainTypeList: [],\n\t\t\tTrainLevelList: [],\n\t\t\tpositionList: [],\n\t\t\tsortList: {},\n\t\t\tfileList: [],\n\t\t\tequSys: [],\n\t\t\tcurrentKey: '',\n\t\t\t// parentId: ''\n\t\t\torgId: '',\n\t\t\tmajorId: '',\n\t\t\tpositionId: '',\n\t\t\texpandAll: false\n\n\n\t\t}\n\t},\n\tcreated() {\n\t\tthis.TrainTypeList = dictUtils.getDictItemsFromCache('xllb')\n\t\tthis.TrainLevelList = dictUtils.getDictItemsFromCache('xljb')\n\t\tthis.getEqu()\n\t},\n\tmounted() {},\n\tmethods: {\n\t\texpandHandle() {\n\t\t console.log(this.$refs.tree.store);\n\t\t this.expandAll = !this.expandAll;\n\t\t this.expandNodes(this.$refs.tree.store.root);\n\t\t },\n\t\t // 遍历树形数据,设置每一项的expanded属性,实现展开收起\n\t\t expandNodes(node) {\n\t\t node.expanded = this.expandAll;\n\t\t for (let i = 0; i < node.childNodes.length; i++) {\n\t\t node.childNodes[i].expanded = this.expandAll;\n\t\t if (node.childNodes[i].childNodes.length > 0) {\n\t\t this.expandNodes(node.childNodes[i]);\n\t\t }\n\t\t }\n\t\t },\n\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\t\t// 保存排序\n\t\tsavePropertyf() {\n\t\t\tsubMenu.saveSort(this.sortList, (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: res.message,\n\t\t\t\t\t\tduration: 2000,\n\t\t\t\t\t})\n\t\t\t\t\tthis.loadData()\n\t\t\t\t} else {\n\t\t\t\t\tthis.$message.warning(res.message)\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\tgetEqu() {\n\t\t\tthis.currentKey = null\n\t\t\tequSysMenu.geteqTree({\n\t\t\t\tpageBean: {\n\t\t\t\t\tpageSize: -1,\n\t\t\t\t\tpage: -1\n\t\t\t\t}\n\t\t\t}, res => {\n\t\t\t\tthis.treeData = res.value\n\t\t\t\tthis.currentKey = res.value[0].id\n\t\t\t\tthis.orgId = res.value[0].id\n\t\t\t\tthis.querys[3].value = this.currentKey\n\t\t\t\tthis.$set(this.querys)\n\t\t\t\tthis.$set(this.treeData)\n\t\t\t\tthis.loadData(1)\n\t\t\t})\n\t\t},\n\t\tinsort(val) {\n\t\t\tlet id = val.id\n\t\t\tlet value = val.sn\n\t\t\tthis.sortList[id] = value\n\t\t},\n\t\treload() {\n\t\t\tthis.loadData()\n\t\t},\n\t\thandleAdd() {\n\t\t\tthis.$refs.formModal.add(this.orgId, this.majorId, this.positionId)\n\t\t},\n\t\thandleDbClick(val) {\n\t\t\tthis.$refs.formModal.edit(val,this.orgId, this.majorId, this.positionId)\n\t\t},\n\t\t// 重置\n\t\tclearQuerys() {\n\t\t\tthis.querys[0].value = ''\n\t\t\tthis.querys[1].value = ''\n\t\t\tthis.querys[2].value = ''\n\t\t\tthis.loadData(1)\n\t\t},\n\t\thandleNodeClick(data) {\n\t\t\tconsole.log(data);\n\t\t\tif (data.type == 1) {\n\t\t\t\tthis.orgId = data.id\n\t\t\t\tthis.majorId = ''\n\t\t\t\tthis.positionId = ''\n\t\t\t} else if (data.type == 2) {\n\t\t\t\tthis.orgId = data.parentId\n\t\t\t\tthis.majorId = data.id\n\t\t\t\tthis.positionId = ''\n\t\t\t} else if (data.type == 3) {\n\t\t\t\tthis.orgId = data.orgId\n\t\t\t\tthis.majorId = data.parentId\n\t\t\t\tthis.positionId = data.id\n\t\t\t}\n\t\t\t// this.parentId = data.parentId\n\t\t\tthis.querys[3].value = data.id\n\t\t\tthis.loadData(1)\n\t\t},\n\t\t// 获取岗位信息\n\t\tgetPostion() {\n\t\t\tlet obj = {\n\t\t\t\tpageBean: {\n\t\t\t\t\tpage: 1,\n\t\t\t\t\tpageSize: -1,\n\t\t\t\t\ttotal: 0\n\t\t\t\t}\n\t\t\t}\n\t\t\tsubMenu.getPosition(obj, res => {\n\t\t\t\tthis.positionList = res.rows\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\tsubMenu.getSubjects(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\tthis.TrainLevelList.forEach(ee => {\n\t\t\t\t\t\tif (item.trainLevel == ee.value) {\n\t\t\t\t\t\t\titem['trainLevelName'] = ee.name\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\tthis.TrainTypeList.forEach(ee => {\n\t\t\t\t\t\tif (item.trainType == ee.value) {\n\t\t\t\t\t\t\titem['trainTypeName'] = ee.name\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\tthis.positionList.forEach(ee => {\n\t\t\t\t\t\tif (item.positionId == ee.id) {\n\t\t\t\t\t\t\titem['positionName'] = ee.name\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\n\t\t// 获取树\n\t\tgetTreen() {\n\t\t\tsubMenu.getSubTree({\n\t\t\t\tid: '0'\n\t\t\t}, res => {\n\t\t\t\tthis.treeData[0].children = res.value\n\t\t\t\tthis.$set(this.treeData)\n\t\t\t})\n\t\t},\n\n\t\t// 新增\n\t\tappend(data, type) {\n\t\t\tif (type != 'father') {\n\t\t\t\tthis.$refs.SubClassModal.add(data)\n\t\t\t} else {\n\t\t\t\tthis.$refs.SubClassModal.add(data)\n\t\t\t}\n\t\t},\n\t\t// 修改\n\t\tupDateinfo(data, type) {\n\t\t\tthis.$refs.SubClassModal.edit(data)\n\t\t},\n\t\t// 删除单个\n\t\tremove(item) {\n\t\t\tthis.$confirm('确定删除选中数据?', '提示', {\n\t\t\t\t\tdistinguishCancelAndClose: true,\n\t\t\t\t\tconfirmButtonText: '确 定',\n\t\t\t\t\tcancelButtonText: '取 消',\n\t\t\t\t\ttype: 'warning'\n\t\t\t\t})\n\t\t\t\t.then(() => {\n\t\t\t\t\tsubMenu.deleteSubjectClass(item.id).then(res => {\n\t\t\t\t\t\tif (res.data.state) {\n\t\t\t\t\t\t\tthis.$notify({\n\t\t\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\t\t\tmessage: '删除成功',\n\t\t\t\t\t\t\t\tduration: 2000\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\tthis.loadData(1)\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t\t.catch(action => {\n\t\t\t\t\tthis.$notify({\n\t\t\t\t\t\ttype: 'info',\n\t\t\t\t\t\tmessage: action === 'cancel' ? '已取消删除' : '停留在当前页面'\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t},\n\t\tsearchName() {\n\t\t\tlet querys = {\n\t\t\t\tname: ''\n\t\t\t}\n\t\t\tquerys.name = this.search\n\t\t\tsubMenu.getSubTree(querys, res => {\n\t\t\t\tthis.treeData[0].children = res.value\n\t\t\t\tthis.$set(this.treeData)\n\t\t\t})\n\t\t},\n\t\t//导入\n\t\thandleChange(file, fileList) {\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\tsubMenu.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\tsubMenu.export(this.queryParam, res => {\n\t\t\t\tif (res) {\n\n\t\t\t\t}\n\t\t\t})\n\n\t\t}\n\t}\n}\n",null]}