{"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\\ApplyForDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\views\\ProjectActionIteration\\components\\ApplyForDialog.vue","mtime":1683620203198},{"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\r\nimport utils from '@/utils.js'\r\nimport moment from 'moment'\r\nimport measureIterationApplication from '@/api/projectActionIteration/measureIterationApplication.js'\r\nexport default {\r\n name: 'ApplyForDialog',\r\n data() {\r\n return {\r\n monthLoading: false,\r\n activeNames: ['1', '2'],\r\n activeCollapse:['1','2'],\r\n visible: false,\r\n title: '新增',\r\n disabled: false,\r\n index: null,\r\n saveloading: false,\r\n rules: {\r\n reformSpecificMeasures: [\r\n {\r\n required: true,\r\n message: '请输入具体举措',\r\n trigger: 'blur'\r\n }\r\n ],\r\n iterationAccording: [\r\n {\r\n required: true,\r\n message: '请输入迭代依据',\r\n trigger: 'blur'\r\n }\r\n ]\r\n },\r\n queryParam: {\r\n pageBean: {\r\n page: 1,\r\n pageSize: -1\r\n }\r\n },\r\n parameter: {\r\n iterationAccording: '',\r\n reformSpecificMeasures: '',\r\n iteration: '',\r\n status: -1,\r\n pilotSpecificScheduleList: []\r\n },\r\n newData: null,\r\n oldData: null,\r\n //月度计划相关\r\n // parameter: {\r\n // pilotSpecificScheduleList: []\r\n // },\r\n JCIndex: null,\r\n JCItem: null,\r\n iterationType: 0\r\n }\r\n },\r\n created() {},\r\n mounted() {},\r\n methods: {\r\n add(val) {\r\n this.title = '新增'\r\n this.visible = true\r\n this.parameter.projectId = val\r\n this.parameter.iteration = 0\r\n this.parameter.distributionType = 1\r\n },\r\n edit(val, index, iteration) {\r\n this.index = index\r\n this.title = '编辑'\r\n this.parameter = {\r\n ...val,\r\n edit: true,\r\n iteration\r\n }\r\n // if (val.pilotSpecificScheduleList&&val.pilotSpecificScheduleList.length) {\r\n // this.parameter = val\r\n // }\r\n if (\r\n val.id &&\r\n (!val.pilotSpecificScheduleList ||\r\n !val.pilotSpecificScheduleList.length)\r\n ) {\r\n let data = {\r\n pageBean: {\r\n page: 1,\r\n pageSize: -1\r\n },\r\n querys: [\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'MEASURES_ID_',\r\n relation: 'AND',\r\n value: val.id\r\n }\r\n ]\r\n }\r\n measureIterationApplication.getMonthDetails(data, res => {\r\n if (res.rows.length) {\r\n res.rows.forEach(item => {\r\n item.planYear = item.planYear.toString()\r\n item.planMonth = item.planMonth.toString()\r\n })\r\n this.$nextTick(() => {\r\n this.$set(this.parameter, 'pilotSpecificScheduleList', res.rows)\r\n })\r\n } else {\r\n this.$nextTick(() => {\r\n this.$set(this.parameter, 'pilotSpecificScheduleList', [])\r\n })\r\n }\r\n this.monthLoading = false\r\n })\r\n }\r\n this.visible = true\r\n },\r\n detail(item) {\r\n this.newData = item\r\n this.newData.createTime = moment(this.newData.createTime).format(\r\n 'YYYY-MM-DD'\r\n )\r\n if (item.specificMeasuresId) {\r\n // let arr = [\r\n // {\r\n // group: 'main',\r\n // operation: 'EQUAL',\r\n // parentGroup: '',\r\n // property: 'id_',\r\n // relation: 'AND',\r\n // value: item.specificMeasuresId\r\n // }\r\n // ]\r\n // this.queryParam.querys = arr\r\n measureIterationApplication.getHistoryById(\r\n item.specificMeasuresId,\r\n res => {\r\n if (res.length > 1) {\r\n this.oldData = res[1]\r\n this.oldData.createTime = moment(this.oldData.createTime).format(\r\n 'YYYY-MM-DD'\r\n )\r\n }\r\n }\r\n )\r\n }\r\n\r\n this.visible = true\r\n this.title = '历史记录'\r\n },\r\n getParentsById(list, id) {\r\n for (let i in list) {\r\n if (list[i].id == id) {\r\n //这里的no根据你的需求可进行改变\r\n //查询到就返回该数组对象的value\r\n return [list[i].id]\r\n }\r\n if (list[i].children) {\r\n let node = this.getParentsById(list[i].children, id)\r\n if (node !== undefined) {\r\n //查询到把父节把父节点加到数组前面\r\n node.unshift(list[i].id)\r\n console.log(node)\r\n return node\r\n }\r\n }\r\n }\r\n },\r\n changeUnit(value) {\r\n let nodesObj = this.$refs['cascader'].getCheckedNodes()\r\n if (nodesObj != []) {\r\n this.parameter.unitId = nodesObj[0].data.id\r\n this.parameter.unitName = nodesObj[0].label\r\n this.parameter.unitCode = nodesObj[0].data.code\r\n this.parameter.unitGrade = nodesObj[0].level\r\n } else {\r\n this.parameter.unitId = ''\r\n this.parameter.unitName = ''\r\n this.parameter.unitCode = ''\r\n this.parameter.unitGrade = ''\r\n }\r\n },\r\n // 关闭新增人员窗口\r\n handleClose() {\r\n this.visible = false\r\n this.saveloading = false\r\n this.title = ''\r\n this.parameter = {\r\n iterationAccording: '',\r\n reformSpecificMeasures: '',\r\n iteration: '',\r\n status: -1\r\n }\r\n this.newData = null\r\n this.oldData = null\r\n this.parameter = {\r\n pilotSpecificScheduleList: []\r\n }\r\n this.JCIndex = null\r\n this.JCItem = null\r\n this.iterationType = 0\r\n },\r\n // 保存\r\n handleSave() {\r\n this.$refs.formInfo.validate(valid => {\r\n if (valid) {\r\n // if (this.parameter.iteration === 1) {\r\n // this.parameter.status = 0\r\n // } else {\r\n // this.parameter.status = -1\r\n // }\r\n this.parameter.status = 0\r\n if (this.title == '新增') {\r\n this.$emit('getData', this.parameter)\r\n } else {\r\n this.$emit('getData', this.parameter, this.index)\r\n }\r\n this.handleClose()\r\n }\r\n })\r\n },\r\n // 月度计划\r\n tableAdd(type) {\r\n length = this.parameter.pilotSpecificScheduleList\r\n this.parameter.pilotSpecificScheduleList.push({\r\n key: length + new Date(),\r\n planYear: moment().format('YYYY'),\r\n planMonth: moment().format('M'),\r\n progressStatus: 1,\r\n planType: '',\r\n planContent: ''\r\n })\r\n },\r\n tableDel(type, row) {\r\n if (!row.id) {\r\n this.parameter.pilotSpecificScheduleList = this.parameter.pilotSpecificScheduleList.filter(\r\n item => item.key !== row.key\r\n )\r\n } else {\r\n console.log(type)\r\n this.$confirm('确认删除这条记录?', '提示', {\r\n cancelButtonText: '关闭',\r\n type: 'error'\r\n }).then(() => {\r\n majorProjects.deleteJdjh(row.id, res => {\r\n if (res.state) {\r\n this.$message.success('删除数据成功')\r\n this.parameter[type] = this.parameter[type].filter(\r\n item => item.id !== row.id\r\n )\r\n }\r\n })\r\n })\r\n }\r\n },\r\n // 保存月度计划\r\n handleSaveMonth() {\r\n if (this.parameter.pilotSpecificScheduleList.length) {\r\n this.$refs.formInfo.validate(valid => {\r\n if (valid) {\r\n this.JCItem.pilotSpecificScheduleList = utils.deepClone(\r\n this.parameter.pilotSpecificScheduleList\r\n )\r\n this.JCItem.edit = true\r\n this.JCItem.pilotSpecificScheduleList.forEach(item => {\r\n delete item.key\r\n if (this.JCItem.id) {\r\n item.measuresId = this.JCItem.id\r\n }\r\n })\r\n this.parameter.pilotSpecificScheduleList = []\r\n this.$emit(\r\n 'getData',\r\n this.JCItem,\r\n this.JCIndex - 0,\r\n this.iterationType\r\n )\r\n this.handleSave()\r\n // this.handleClose()\r\n }\r\n })\r\n }\r\n }\r\n }\r\n}\r\n",null]}