{"remainingRequest":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\jd_cgpt_fvue\\src\\views\\Normal\\BasicDataManagement\\evaluationSystem\\component\\methodAddDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\src\\views\\Normal\\BasicDataManagement\\evaluationSystem\\component\\methodAddDialog.vue","mtime":1719866430339},{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.array.sort\";\nimport \"core-js/modules/web.dom.iterable\";\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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 Breadcrumb from '@/components/Breadcrumb/index.vue';\nimport methodUnits from \"./methodUnits.vue\";\nimport basicData from '@/api/basicData';\nexport default {\n name: 'domesticDialog',\n components: {\n Breadcrumb: Breadcrumb,\n methodUnits: methodUnits\n },\n props: {\n editData: Object\n },\n data: function data() {\n return {\n treeData: [],\n loading: false,\n contentScoreData: [],\n centralizedData: [{\n name: '是',\n id: 1\n }, {\n name: '否',\n id: 0\n }],\n breadcrumbOpt: [{\n breadcrumbName: '综合评标法'\n }, {\n breadcrumbName: '新增'\n }],\n rules: {\n preparedOrgName: [{\n required: true,\n message: '请输入编制单位',\n trigger: 'blur'\n }],\n name: [{\n required: true,\n message: '请输入名称',\n trigger: 'blur'\n }]\n },\n useOrgListValue: '',\n methodUnitsList: [],\n parameter: {\n evaluatingMethods: 1,\n useOrgList: [],\n preparedOrgId: '',\n remarks: '',\n descriptionList: []\n }\n };\n },\n created: function created() {\n this.selectTree();\n this.addModifyBtn();\n this.currentUser = JSON.parse(sessionStorage.getItem('currentUserDetail'));\n this.parameter.preparedOrgId = this.currentUser.org[0].orgId;\n this.parameter.preparedOrgName = this.currentUser.org[0].orgName;\n this.parameter.preparedOrgCode = this.currentUser.org[0].orgCode;\n },\n mounted: function mounted() {},\n methods: {\n //使用单位\n purchasingUnitsBtn: function purchasingUnitsBtn() {\n this.$refs.troubleshooting.add();\n },\n addDetail: function addDetail(list) {\n this.methodUnitsList = list;\n this.parameter.useOrgList = list.map(function (item) {\n return {\n orgId: item.id\n };\n });\n this.useOrgListValue = list.map(function (item) {\n return item.name;\n }).join(',');\n },\n //评分因素选择\n factorChangeContent: function factorChangeContent(val, index, list) {\n var _this = this;\n\n list.forEach(function (item) {\n if (item.subjectCode === val) {\n _this.parameter.descriptionList[index].evaluationItemId = item.id;\n }\n });\n },\n //评分因素选择\n factorChange: function factorChange(val, index) {\n var _this2 = this;\n\n this.treeData.forEach(function (item) {\n if (item.subjectCode === val) {\n // this.contentScoreData = item.children\n _this2.parameter.descriptionList[index].contentScoreData = item.children;\n }\n });\n },\n //查询物料分类树结构\n selectTree: function selectTree() {\n var _this3 = this;\n\n basicData.bizEvaluationItemSelectTree().then(function (res) {\n _this3.treeData = res.value[0].children;\n\n _this3.treeData.forEach(function (val) {\n if (val.children && val.children.length) {\n val.children.forEach(function (e) {\n if (val.id == e.pcode) {\n _this3.parameter.descriptionList.push({\n evaluationItemName: e.subjectName,\n evaluationItemPname: val.subjectName,\n evaluationStandard: '',\n evaluationScore: null,\n evaluationItemPid: val.id,\n evaluationItemCode: e.subjectCode,\n evaluationItemId: e.id\n });\n }\n });\n }\n });\n });\n },\n //编辑\n addModifyBtn: function addModifyBtn() {\n if (this.$route.query.editRows) {\n console.log();\n this.breadcrumbOpt[1].breadcrumbName = '编辑';\n this.modifychoData(this.$route.query.editRows);\n } else {\n this.breadcrumbOpt[1].breadcrumbName = '新增';\n }\n },\n //获取修改回显数据\n modifychoData: function modifychoData(val) {\n var _this4 = this;\n\n basicData.bizEvaluationSystemId(val.id).then(function (res) {\n console.log(res, 'resss');\n _this4.parameter = res.value;\n\n _this4.parameter.orgs.forEach(function (item) {\n delete item.isParent;\n });\n\n _this4.methodUnitsList = res.value.orgs;\n _this4.useOrgListValue = res.value.orgs.map(function (item) {\n return item.name;\n }).join(',');\n _this4.parameter.useOrgList = res.value.orgs.map(function (item) {\n return {\n orgId: item.id\n };\n });\n\n _this4.treeData.forEach(function (val) {\n val.children.forEach(function (e) {\n _this4.parameter.descriptionList.forEach(function (i) {\n if (i.evaluationItemId == e.id) {\n i.evaluationItemPname = i.scoringFactors;\n i.evaluationItemName = i.scoringContent;\n i.evaluationItemPid = val.id;\n }\n });\n });\n });\n\n _this4.parameter.descriptionList.sort(function (a, b) {\n if (a['evaluationItemPid'] != b['evaluationItemPid']) {\n return a['evaluationItemPid'].localeCompare(b['evaluationItemPid']);\n }\n });\n });\n },\n // 关闭//面包屑点击\n handleClose: function handleClose() {\n if (this.breadcrumbOpt[1].breadcrumbName === '编辑') {\n this.$router.push({\n name: 'evaluationSystem',\n params: {\n tabsActiveName: 'methodComprehensive',\n pageBean: this.$route.query.pageBean\n }\n });\n } else {\n this.$router.push({\n name: 'evaluationSystem',\n params: {\n tabsActiveName: 'methodComprehensive'\n }\n });\n }\n\n this.parameter = {};\n },\n objectSpanMethod: function objectSpanMethod(_ref) {\n var row = _ref.row,\n column = _ref.column,\n rowIndex = _ref.rowIndex,\n columnIndex = _ref.columnIndex;\n\n if (columnIndex === 0) {\n var rows = this.parameter.descriptionList.filter(function (item) {\n return item.evaluationItemPid === row.evaluationItemPid;\n });\n\n if (rowIndex === 0 || this.parameter.descriptionList[rowIndex - 1].evaluationItemPid !== row.evaluationItemPid) {\n return {\n rowspan: rows.length,\n colspan: 1\n };\n } else {\n return {\n rowspan: 0,\n colspan: 0\n };\n }\n }\n },\n // 保存\n handleSave: function handleSave() {\n var _this5 = this;\n\n var sum = 0;\n this.parameter.descriptionList.forEach(function (item) {\n sum += item.evaluationScore;\n });\n\n if (sum > 101) {\n this.$message.warning('评分表分值总数不能超过100');\n return;\n }\n\n this.$refs.formInfo.validate(function (valid) {\n if (valid) {\n _this5.loading = true;\n basicData.bizEvaluationSaveOrUpdate(_this5.parameter).then(function (res) {\n if (res.state) {\n _this5.$message.success(res.message);\n\n if (_this5.breadcrumbOpt[1].breadcrumbName === '编辑') {\n _this5.$router.push({\n name: 'evaluationSystem',\n params: {\n tabsActiveName: 'methodComprehensive',\n pageBean: _this5.$route.query.pageBean\n }\n });\n } else {\n _this5.$router.push({\n name: 'evaluationSystem',\n params: {\n tabsActiveName: 'methodComprehensive'\n }\n });\n }\n }\n\n _this5.loading = false;\n });\n }\n });\n }\n }\n};",null]}