{"remainingRequest":"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\\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\nimport req from \"@/request.js\";\nimport {\n\tTableMixin\n} 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\tname: 'ndbbMenu',\n\tmixins: [TableMixin],\n\tcomponents: {\n\t\tgradeDialog\n\t},\n\tdata() {\n\t\treturn {\n\t\t\turl: {\n\t\t\t\tdelete: '/exam/year/EvaluationmentSub/'\n\t\t\t},\n\t\t\tsearch: '',\n\t\t\ttableData: [],\n\t\t\ttreeData: [],\n\t\t\tdefaultProps: {\n\t\t\t\tchildren: 'children',\n\t\t\t\tlabel: 'name'\n\t\t\t},\n\t\t\tparentId: null, \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: 'positionId',\n\t\t\t\t\trelation: 'AND',\n\t\t\t\t\tvalue: ''\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: 'e.user_name_',\n\t\t\t\t\trelation: 'AND',\n\t\t\t\t\tvalue: ''\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: 'e.year_',\n\t\t\t\t\trelation: 'AND',\n\t\t\t\t\tvalue: moment().format('YYYY')\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: 'e.level_',\n\t\t\t\t\trelation: 'AND',\n\t\t\t\t\tvalue: ''\n\t\t\t\t}\n\n\n\t\t\t],\n\t\t\tsortList: {},\n\t\t\tsubjectsList: [],\n\t\t\tpjdjeList: [],\n\t\t\tcurrentKey: null,\n\t\t\tfilterText: '',\n\t\t\tfileList: [],\n\t\t\ttype:'',\n\t\t\tid:'',\n\t\t\texpandAll:false\n\t\t}\n\t},\n\tcreated() {\n\t\tthis.pjdjeList = dictUtils.getDictItemsFromCache('pjdj')\n\n\t},\n\t\n\twatch: {\n\t\tfilterText(val) {\n\t\t\tthis.$refs.tree.filter(val);\n\t\t},\n\t\t// currentKey: {\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},\n\tmounted() {\t\t\tthis.getTreen()},\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\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\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\tndbbMenu.updateEvaluation(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.getData()\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\topenGrade() {\n\t\t\tconsole.log(1,this.currentKey)\n\t\t\tthis.$refs.gradeDialog.open(this.currentKey)\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.getData(1)\n\t\t},\n\t\thandleClick(val) {\n\t\t\tthis.$router.push({\n\t\t\t\tname: 'ndbbMenuDetails',\n\t\t\t\tparams: val\n\n\t\t\t})\n\t\t},\n\t\ttoPreview() {\n\n\t\t},\n\t\thandleAdd() {\n\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\t\tformData.append('orgId', this.parentId)\n\t\t\t// subjectId:this.querys[1].value,\n\t\t\tndbbMenu.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\tif(this.type==2){\n\t\t\t\tndbbMenu.export(this.currentKey, res => {\n\t\t\t\t\tif (res) {\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}else{\n\t\t\t\tthis.$message({\n\t\t\t\t\tmessage: '请选择课目',\n\t\t\t\t\ttype: 'warning'\n\t\t\t\t});\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t},\n\t\thandleNodeClick(data) {\n\t\t\tconsole.log(data);\n\t\t\tthis.type=data.type\n\t\t\tif(data.type==1){\n\t\t\t\tthis.parentId = data.id\n\t\t\t}else{\n\t\t\t\tthis.parentId=''\n\t\t\t}\n\t\t\tthis.currentKey=data.id\n\t\t\tif (data.id == '0') {\n\t\t\t\tthis.querys[0].value = ''\n\t\t\t\tthis.getData(1)\n\t\t\t} else {\n\t\t\t\tthis.querys[0].value = data.id\n\t\t\t\tthis.getData(1)\n\t\t\t}\n\t\t\tconsole.log(2,this.currentKey)\n\t\t\tsessionStorage.setItem('currentKey', data.id) \n\t\t\tsessionStorage.setItem('type', this.type) \n\t\t},\n\t\t// 获取树\n\t\tgetTreen() {\n\t\t\tthis.currentKey = ''\n\t\t\tndbbMenu.getPositionPage({}, res => {\n\t\t\t\tthis.treeData = res\n\t\t\t// \tif (sessionStorage.getItem('currentKey')) {\n\t\t\t// \t\tthis.currentKey = sessionStorage.getItem('currentKey') //不是第一次了,取出来\n\t\t\t// \t\tconsole.log(this.currentKey);\n\t\t\t// \t\tthis.type = sessionStorage.getItem('type') \n\t\t\t// \t} else {\n\t\t\t\t\tthis.currentKey = res[0].id\n\t\t\t\t\tthis.type =res[0].type\n\t\t\t\n\t\t\t// \t}\n\t\t\t\tconsole.log(this.currentKey);\n\t\t\t\tthis.querys[0].value = this.currentKey\n\t\t\t\tthis.$set(this.querys[0])\n\t\t\t\tthis.$set(this.treeData)\n\t\t\t\tthis.getData(1)\n\t\t\t})\n\t\t},\n\t\tloadData() {\n\n\t\t},\n\t\t// 获取list\n\t\tgetData(page) {\n\t\t\tconsole.log(this.querys[0].value);\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\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\tndbbMenu.queryEvaluation(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.pjdjeList.forEach(ee => {\n\t\t\t\t\t\tif (item.level == ee.value) {\n\t\t\t\t\t\t\titem['levelName'] = 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\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}\n}\n",null]}