{"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\\MonthlyPlanDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\views\\ProjectActionIteration\\components\\MonthlyPlanDialog.vue","mtime":1682688895021},{"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\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 majorProjects from '@/api/MajorReformProjects/majorProjects.js'\r\nimport moment from 'moment'\r\nimport {TableMixin} from '@/mixins/tableMixin'\r\nexport default {\r\n name: 'ApplyForDialog',\r\n mixins: [TableMixin],\r\n data() {\r\n return {\r\n activeCollapse1: '1',\r\n visible: false,\r\n title: '月度计划',\r\n disabled: false,\r\n index: null,\r\n saveloading: false,\r\n rules: {\r\n planContent: [\r\n {\r\n required: true,\r\n // message: '请输入具体举措',\r\n trigger: 'change'\r\n }\r\n ],\r\n planType: [\r\n {\r\n required: true,\r\n // message: '请输入具体举措',\r\n trigger: 'change'\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 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 open(JCItem, JCIndex, iterationType) {\r\n // console.log(JCItem)\r\n if (JCItem.pilotSpecificScheduleList) {\r\n let tempData = utils.deepClone(JCItem.pilotSpecificScheduleList)\r\n tempData.forEach(item => {\r\n item.planYear = item.planYear.toString()\r\n item.planMonth = item.planMonth.toString()\r\n })\r\n this.parameter.pilotSpecificScheduleList = tempData\r\n } else {\r\n if (JCItem.id) {\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: JCItem.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.$set(this.parameter, 'pilotSpecificScheduleList', res.rows)\r\n console.log(this.parameter);\r\n }\r\n })\r\n }\r\n }\r\n // console.log(\r\n // this.parameter.pilotSpecificScheduleList,\r\n // 'this.parameter.pilotSpecificScheduleList.............'\r\n // )\r\n this.visible = true\r\n this.JCIndex = JCIndex\r\n this.JCItem = JCItem\r\n this.iterationType = iterationType\r\n if (this.iterationType == 'detail') {\r\n this.disabled = true\r\n } else {\r\n this.disabled = false\r\n }\r\n },\r\n tableAdd(type) {\r\n length = this.parameter.pilotSpecificScheduleList.length\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 handleClose() {\r\n this.visible = false\r\n this.saveloading = false\r\n this.disabled = false\r\n this.parameter = {\r\n pilotSpecificScheduleList: []\r\n }\r\n },\r\n\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 },\r\n edit(val, index, active) {\r\n this.index = index\r\n this.title = '编辑'\r\n this.visible = true\r\n this.parameter = {\r\n ...val,\r\n edit: true,\r\n iteration: active == 0 ? 0 : 1\r\n }\r\n },\r\n getParentsById(list, id) {\r\n console.log(111)\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\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 handleSave() {\r\n if (this.parameter.pilotSpecificScheduleList.length) {\r\n this.$refs.formInfo.validate(valid => {\r\n if (valid) {\r\n console.log(this.parameter.pilotSpecificScheduleList)\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.handleClose()\r\n }\r\n })\r\n }\r\n\r\n // this.saveloading=true\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\r\n // this.$refs.formInfo.validate((valid) => {\r\n // \tif (valid) {\r\n // \t\tif (this.title === '添加' || this.title === 'add') {\r\n // \t\t\tmeasureIterationApplication.addData(this.parameter, (res) => {\r\n // \t\t\t\tif (res.state) {\r\n // \t\t\t\t\tthis.$notify({\r\n // \t\t\t\t\t\ttype: 'success',\r\n // \t\t\t\t\t\tmessage: '添加成功',\r\n // \t\t\t\t\t\tduration: 2000,\r\n // \t\t\t\t\t})\r\n // \t\t\t\t\tthis.$emit('getData')\r\n // \t\t\t\t\tthis.handleClose()\r\n // \t\t\t\t}\r\n // \t\t\t})\r\n // \t\t} else if (this.title === '编辑' || this.title === 'edit') {\r\n // \t\t\tmeasureIterationApplication.editData(this.parameter, (res) => {\r\n // \t\t\t\tif (res.state) {\r\n // \t\t\t\t\tthis.$notify({\r\n // \t\t\t\t\t\ttype: 'success',\r\n // \t\t\t\t\t\tmessage: '修改成功',\r\n // \t\t\t\t\t\tduration: 2000,\r\n // \t\t\t\t\t})\r\n // \t\t\t\t\tthis.$emit('getData')\r\n // \t\t\t\t\tthis.handleClose()\r\n // \t\t\t\t}\r\n // \t\t\t})\r\n // \t\t}\r\n // \t}\r\n // })\r\n }\r\n }\r\n}\r\n",null]}