{"remainingRequest":"D:\\jenkins\\workspace\\cqlt-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\cqlt-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\cqlt-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\cqlt-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\cqlt-fvue\\src\\views\\configureInfo\\dialog\\subject.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\cqlt-fvue\\src\\views\\configureInfo\\dialog\\subject.vue","mtime":1682499219976},{"path":"D:\\jenkins\\workspace\\cqlt-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cqlt-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cqlt-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\cqlt-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cqlt-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/es6.object.keys\";\nimport \"core-js/modules/web.dom.iterable\";\nimport _defineProperty from \"D:/jenkins/workspace/cqlt-fvue/node_modules/@babel/runtime/helpers/esm/defineProperty\";\nimport \"core-js/modules/es6.function.name\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 pagination from '@/components/pagination';\nimport tree from '@/components/tree';\nimport req from '@/request.js';\nimport org from '@/api/org.js';\nimport uc from '@/api/uc.js';\nvar portal = window.context.portal;\nimport internationalSubject from '@/api/basicInfo/internationalSubject.js';\nimport domesticSubject from '@/api/basicInfo/domesticSubject.js';\nexport default {\n name: 'authDailog',\n components: {\n pagination: pagination,\n tree: tree\n },\n data: function data() {\n return {\n activeName: 'domestic',\n reportId: '',\n treeData: [],\n tabsList: [{\n value: 'international',\n name: this.$t('reportManagement.international')\n }, {\n value: 'domestic',\n name: this.$t('reportManagement.domestic')\n }],\n title: '',\n visible: false,\n searchForm: {},\n tableData: [],\n pageResult: {\n page: 1,\n pageSize: 20,\n total: 0\n },\n params: {\n pageBean: {\n page: 1,\n pageSize: 20\n }\n },\n treeParams: {},\n checkeds: [],\n treeKey: 'domestic',\n iType: false,\n dType: false\n };\n },\n watch: {\n checkeds: {\n handler: function handler(newValue, oldValue) {\n if (this.activeName == 'international' && this.checkeds.length > 0) {\n this.dType = true;\n this.iType = false;\n } else if (this.activeName == 'domestic' && this.checkeds.length > 0) {\n this.iType = true;\n this.dType = false;\n } else {\n this.dType = false;\n this.iType = false;\n }\n }\n }\n },\n methods: {\n handleNodeClick: function handleNodeClick(item) {\n this.searchForm.parentId = item.id;\n this.handleSearch(this.searchForm);\n },\n loadDataTree: function loadDataTree(key) {\n var _this = this;\n\n if (key == 'international') {\n internationalSubject.treeData({}, function (res) {\n if (res.state) {\n _this.treeData = [{\n id: '0',\n name: _this.$t('international.tree'),\n children: []\n }];\n _this.treeData[0].children = res.value;\n }\n });\n } else {\n domesticSubject.treeData({}, function (res) {\n if (res.state) {\n _this.treeData = [{\n id: '0',\n name: _this.$t('domestic.tree'),\n children: []\n }];\n _this.treeData[0].children = res.value;\n }\n });\n }\n },\n handleTabClick: function handleTabClick(tab) {\n console.log(this.activeName);\n this.checkedArrs = [];\n this.checkeds = [];\n this.treeKey = tab.name;\n this.params = {\n pageBean: {\n page: 1,\n pageSize: 20\n }\n };\n this.loadData(this.params, tab.name);\n this.loadDataTree(tab.name);\n },\n open: function open(reportId) {\n this.reportId = reportId;\n this.title = this.$t('reportManagement.subject');\n this.visible = true;\n this.checkeds = [];\n this.getSubjectData();\n this.loadDataTree('domestic');\n },\n getSubjectData: function getSubjectData() {\n var _this2 = this;\n\n var params = {\n pageBean: {\n page: 1,\n pageSize: -1\n }\n };\n req.post(portal + '/qfReportSubject/v1/getList', params).then(function (res) {\n _this2.checkeds = res && res.data && res.data.value && res.data.value.rows || [];\n _this2.checkeds = res.data.value.rows.map(function (item) {\n return _objectSpread({\n code: item.subjectCode,\n name: item.subjectName,\n nameEn: item.subjectNameEn\n }, item);\n });\n\n _this2.loadData(_this2.params, 'domestic');\n });\n },\n loadData: function loadData(params, key) {\n var _this3 = this;\n\n var api;\n\n if (key == 'international') {\n api = '/qf/subject/international/info/query';\n } else {\n api = '/qf/subject/info/query';\n }\n\n req.post(portal + api, params).then(function (res) {\n _this3.tableData = res && res.data && res.data.rows || [];\n _this3.pageResult = {\n page: res && res.data && res.data.page || 1,\n pageSize: res && res.data && res.data.pageSize || 20,\n total: res && res.data && res.data.total || 0\n };\n\n _this3.$nextTick(function () {\n _this3.checkeds.forEach(function (s) {\n _this3.tableData.forEach(function (u) {\n if (s.code == u.code) {\n if (_this3.treeKey == 'international') {\n _this3.$refs.multipleTable.toggleRowSelection(u);\n } else {\n _this3.$refs.multipleTable1.toggleRowSelection(u);\n }\n }\n });\n });\n });\n\n _this3.$set(_this3.tableData);\n });\n },\n handleClose: function handleClose() {\n this.visible = false;\n },\n handleSearch: function handleSearch() {\n var obj = this.searchForm;\n var querys = [];\n\n for (var i in obj) {\n if (obj[i]) {\n querys.push({\n group: 'main',\n operation: 'LIKE',\n parentGroup: '',\n property: i,\n relation: 'AND',\n value: obj[i]\n });\n }\n }\n\n this.params.querys = querys;\n this.loadData(this.params, this.treeKey);\n },\n handleSelectionChange: function handleSelectionChange(rows) {\n console.log(rows);\n this.checkeds = rows;\n console.log(this.checkeds);\n },\n manualSelection: function manualSelection(selection, row) {\n var _this4 = this;\n\n var flag = selection.some(function (item) {\n if (row.id == item.id) return true;\n });\n var userFlag = true;\n this.checkeds.forEach(function (s, si) {\n if (s.id == row.id) {\n userFlag = false;\n }\n });\n\n if (flag && userFlag) {\n var params = {\n subjectCode: row.code,\n subjectName: row.name,\n subjectNameEn: row.nameEn,\n reportId: this.reportId\n };\n req.post(portal + '/qfReportSubject/v1/insertInfo', [params]).then(function (res) {\n _this4.getSubjectData();\n });\n } else if (flag && !userFlag) {} else {// this.selectUser.forEach((s, si) => {\n // \tif (s.objectId == row.id) {\n // \t\tthis.handleRightDelete(row)\n // \t}\n // })\n } //先判断当前操作flag\n //true勾选还是false取消\n // let flag = selection.some((item) => {\n // \tif (row.id == item.id) return true;\n // })\n // if (flag) {\n // \tconsole.log(row);\n // \trow.reportId = this.reportId\n // \tthis.checkeds.push(row)\n // } else {\n // \tthis.checkeds.forEach((s, si) => {\n // \t\tif (s.id == row.id) {\n // \t\t\tthis.checkeds.splice(si, 1)\n // \t\t}\n // \t})\n // }\n // console.log(this.checkeds);\n\n },\n // // 去重\n // uniqueFunc(arr, uniId) {\n // \tconst res = new Map()\n // \treturn arr.filter(\n // \t\titem => !res.has(item[uniId]) && res.set(item[uniId], 1)\n // \t)\n // },\n handleSizeChange: function handleSizeChange(pageSize) {\n this.params.pageBean = _objectSpread(_objectSpread({}, this.params.pageBean), {}, {\n pageSize: pageSize\n });\n this.loadData(this.params, this.treeKey);\n },\n handleCurrentChange: function handleCurrentChange(page) {\n this.params.pageBean = _objectSpread(_objectSpread({}, this.params.pageBean), {}, {\n page: page\n });\n this.loadData(this.params, this.treeKey);\n },\n handleRightDelete: function handleRightDelete(val) {\n var _this5 = this;\n\n req.get(portal + '/qfReportSubject/v1/deleteByIds' + '?ids=' + val.id).then(function (res) {\n _this5.getSubjectData();\n });\n },\n submit: function submit() {\n var _this6 = this;\n\n var param = {};\n var codes = [];\n this.checkeds.forEach(function (item) {\n codes.push({\n subjectCode: item.code,\n subjectName: item.name,\n subjectNameEn: item.nameEn,\n reportId: _this6.reportId\n });\n });\n param = codes;\n req.post(portal + '/qfReportSubject/v1/insertInfo', param).then(function (res) {\n _this6.visible = false;\n\n _this6.$emit('upDataSubject');\n });\n }\n }\n};",null]}