{"remainingRequest":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\reform-fvue\\src\\views\\ProjectActionIteration\\components\\MeasureDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\views\\ProjectActionIteration\\components\\MeasureDialog.vue","mtime":1684719591276},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\reform-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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport org from '@/api/org.js'\r\nimport utils from '@/utils.js'\r\nimport dictUtils from '@/components/dict/DictSelectUtils.js'\r\nimport measureIterationApplication from '@/api/projectActionIteration/measureIterationApplication.js'\r\nimport ApplyForDialog from './ApplyForDialog.vue'\r\nimport MonthlyPlanDialog from './MonthlyPlanDialog.vue'\r\nimport ActionDetailsDialog from './ActionDetailsDialog.vue'\r\nexport default {\r\n name: 'MeasureDialog',\r\n components: {\r\n ApplyForDialog,\r\n MonthlyPlanDialog,\r\n ActionDetailsDialog\r\n },\r\n data() {\r\n return {\r\n visible: false,\r\n title: '新增',\r\n loading: false,\r\n saveloading: false,\r\n submitloading: false,\r\n tableData: [],\r\n tableData1: [],\r\n showType: false,\r\n activeName: 0,\r\n queryParam: {\r\n pageBean: {\r\n page: 1,\r\n pageSize: -1\r\n }\r\n },\r\n querys: [],\r\n parameter: {},\r\n pilotSpecificMeasuresList1: [],\r\n activeCollapse: '1'\r\n }\r\n },\r\n created() {\r\n // console.log(dictUtils.getDictItemsFromCache('shzt'))\r\n },\r\n mounted() {},\r\n methods: {\r\n handleFlowLish() {},\r\n handleMonthlyPlan(row, index, iterationType) {\r\n this.$refs.MonthlyPlanDialog.open(row, index, iterationType)\r\n },\r\n getData(val, index) {\r\n if (val.iteration === 0) {\r\n if (index >= 0) {\r\n this.$set(this.parameter.pilotSpecificMeasuresList, index, val)\r\n } else {\r\n this.parameter.pilotSpecificMeasuresList.push(val)\r\n this.$set(this.parameter)\r\n }\r\n } else {\r\n this.$set(this.pilotSpecificMeasuresList1, index, val)\r\n }\r\n },\r\n getDataMonthlyPlan(val, index, iterationType) {\r\n console.log(val, index, iterationType)\r\n if (this.activeName == '0') {\r\n this.$set(this.parameter.pilotSpecificMeasuresList, index, val)\r\n // if (index > 0) {\r\n // this.$set(this.parameter.pilotSpecificMeasuresList, index, val)\r\n // } else {\r\n // this.parameter.pilotSpecificMeasuresList.push(val)\r\n // this.$set(this.parameter)\r\n // }\r\n } else {\r\n this.$set(this.pilotSpecificMeasuresList1, index, val)\r\n }\r\n },\r\n getDictName(code, value) {\r\n return utils.getDictName(code, value)\r\n },\r\n //表格选中\r\n handleSelectionChange(val) {\r\n this.multipleSelection = []\r\n this.$refs.multipleSelection.selection.forEach(item => {\r\n this.multipleSelection.push(item.id)\r\n })\r\n },\r\n //新增\r\n handleAdd() {\r\n this.$refs.ApplyForDialog.add(this.parameter.pkVal)\r\n },\r\n add(val) {\r\n this.parameter = JSON.parse(JSON.stringify(val))\r\n // this.querys[0].value = this.parameter.id\r\n this.title = '迭代'\r\n this.visible = true\r\n this.measureData()\r\n // this.updateData()\r\n },\r\n tabClick(e) {\r\n // this.measureData()\r\n if (this.activeName == 0) {\r\n this.measureData()\r\n } else {\r\n this.updateData()\r\n }\r\n },\r\n //新增举措列表\r\n measureData() {\r\n // if (condition) {\r\n\r\n // }\r\n // this.parameter.pilotSpecificMeasuresList = []\r\n if (\r\n this.parameter.id &&\r\n (!this.parameter.pilotSpecificMeasuresList ||\r\n !this.parameter.pilotSpecificMeasuresList.length)\r\n ) {\r\n this.loading = true\r\n let arr = [\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'h.project_id_',\r\n relation: 'AND',\r\n value: this.parameter.id\r\n }\r\n ]\r\n\r\n this.queryParam.querys = arr\r\n measureIterationApplication.getMeasuresList(this.queryParam, res => {\r\n if (res && res.rows) {\r\n this.parameter.pilotSpecificMeasuresList = res.rows\r\n }\r\n this.loading = false\r\n })\r\n }\r\n },\r\n // 更新迭代列表\r\n updateData() {\r\n this.loading = true\r\n this.queryParam.querys = []\r\n this.pilotSpecificMeasuresList1 = []\r\n let obj = [\r\n // {\r\n // group: 'main',\r\n // operation: 'EQUAL',\r\n // parentGroup: '',\r\n // property: 'm.DISTRIBUTION_TYPE_',\r\n // relation: 'AND',\r\n // value: 0\r\n // },\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'm.project_id_',\r\n relation: 'AND',\r\n value: this.parameter.id\r\n }\r\n ]\r\n this.queryParam.querys = obj\r\n measureIterationApplication.getUpdateMeasures(this.queryParam, res => {\r\n if (res && res.rows) {\r\n this.pilotSpecificMeasuresList1 = res.rows\r\n }\r\n this.loading = false\r\n })\r\n },\r\n // 关闭新增人员窗口\r\n handleClose() {\r\n this.showType = false\r\n this.activeName = '0'\r\n this.visible = false\r\n this.pilotSpecificMeasuresList1 = []\r\n this.parameter = {}\r\n this.title = ''\r\n },\r\n //编辑\r\n handleDbClick(val, index, iteration) {\r\n console.log(val)\r\n this.$refs.ApplyForDialog.edit(val, index, iteration)\r\n },\r\n // 查看详情\r\n handleDetail(val) {\r\n this.$refs.ActionDetailsDialog.edit(val)\r\n },\r\n // 历史\r\n handleDbDetail(row) {\r\n this.$refs.ApplyForDialog.detail(row, this.activeName)\r\n },\r\n //提交\r\n submit() {\r\n this.saveloading = true\r\n measureIterationApplication.isSaveAndReport(this.parameter.id, res => {\r\n if (res.state) {\r\n let arr = []\r\n let overData = []\r\n if (this.pilotSpecificMeasuresList1) {\r\n overData = [\r\n ...this.parameter.pilotSpecificMeasuresList,\r\n ...this.pilotSpecificMeasuresList1\r\n ]\r\n } else {\r\n overData = this.parameter.pilotSpecificMeasuresList\r\n }\r\n overData.forEach(e => {\r\n if (e.status == 0 || !e.id || e.edit) {\r\n arr.push(e)\r\n }\r\n })\r\n if (arr.length == 0) {\r\n this.$message.warning('暂无可提交数据')\r\n this.saveloading = false\r\n return\r\n }\r\n // arr.forEach(item => {\r\n // if (item.specificMeasuresId) {\r\n // item.distributionType = 0\r\n // }\r\n // })\r\n measureIterationApplication.measureSubmit(arr, res => {\r\n if (res.state) {\r\n this.$message.success('提交成功')\r\n this.saveloading = false\r\n this.handleClose()\r\n } else {\r\n this.saveloading = false\r\n }\r\n })\r\n } else {\r\n this.saveloading = false\r\n }\r\n })\r\n },\r\n //更新迭代\r\n handleShow() {\r\n this.showType = true\r\n },\r\n // 保存\r\n handleSave() {\r\n // this.saveloading = true\r\n // let addList = JSON.parse(JSON.parse(this.parameter.pilotSpecificMeasuresList))\r\n // let upadeList = JSON.parse(JSON.parse(this.pilotSpecificMeasuresList1))\r\n let arr = [\r\n ...this.parameter.pilotSpecificMeasuresList,\r\n ...this.pilotSpecificMeasuresList1\r\n ]\r\n let measuresList = arr.filter(\r\n item => item.status == '-1' || item.status == '0'\r\n )\r\n // measuresList.forEach(item => {\r\n // if (item.specificMeasuresId) {\r\n // item.distributionType = 0\r\n // }\r\n // })\r\n // this.parameter.pilotSpecificMeasuresList.forEach(e => {\r\n // if (e.status == '-1' || e.status == '0') {\r\n // arr.push(e)\r\n // }\r\n // })\r\n // this.pilotSpecificMeasuresList1.forEach(e => {\r\n // if (e.status == '-1' || e.status == '0') {\r\n // arr.push(e)\r\n // }\r\n // })\r\n if (measuresList.length == 0) {\r\n this.$message.warning('暂无可保存数据')\r\n this.saveloading = false\r\n return\r\n }\r\n console.log(measuresList, '保存的数据')\r\n measureIterationApplication.measureSave(measuresList, res => {\r\n if (res.state) {\r\n this.$message.success('保存成功')\r\n this.saveloading = false\r\n this.handleClose()\r\n }\r\n this.saveloading = false\r\n })\r\n },\r\n // 删除\r\n deleteMeasuresById(row, index) {\r\n this.$confirm('确认删除吗?', this.$t('common.tips'), {\r\n confirmButtonText: this.$t('common.confirm'),\r\n cancelButtonText: this.$t('common.cancel'),\r\n type: 'error'\r\n }).then(() => {\r\n if (row.id) {\r\n measureIterationApplication.deleteMeasuresById(row.id, res => {\r\n if (res.state) {\r\n if (this.activeName == '0') {\r\n this.parameter.pilotSpecificMeasuresList.splice(index, 1)\r\n // this.measureData()\r\n } else {\r\n this.parameter.pilotSpecificMeasuresList1.splice(index, 1)\r\n // this.updateData()\r\n }\r\n this.$message.success('删除成功')\r\n }\r\n })\r\n } else {\r\n if (this.activeName == '0') {\r\n this.parameter.pilotSpecificMeasuresList.splice(index, 1)\r\n } else {\r\n this.parameter.pilotSpecificMeasuresList1.splice(index, 1)\r\n }\r\n this.$message.success('删除成功')\r\n }\r\n })\r\n }\r\n }\r\n}\r\n",null]}