{"remainingRequest":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\reform-fvue\\src\\views\\Worktable\\components\\ReformProjectDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\views\\Worktable\\components\\ReformProjectDialog.vue","mtime":1681724620244},{"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\nimport org from '@/api/org.js'\nimport utils from '@/utils.js'\nimport worktable from '@/api/worktable/worktable.js'\nexport default {\n\tname: 'ApplyForDialog',\n\tdata() {\n\t\treturn {\n\t\t\tactiveCollapse1: '1',\n\t\t\tvisible: false,\n\t\t\ttitle: '新增',\n\t\t\tdisabled: false,\n\t\t\tindex: null,\n\t\t\tparameter: {\n\t\t\t\tprojectName: '',\n\t\t\t\tdeployDate: '',\n\t\t\t\tdemandField: '',\n\t\t\t\tdemandRunway: '',\n\t\t\t\tdemandContent: '',\n\t\t\t\tobjective: '',\n\t\t\t\tmeasures: '',\n\t\t\t\tresult: '',\n\t\t\t\tunitName: '',\n\t\t\t},\n\t\t\trules: {\n\t\t\t\tprojectName: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请输入项目名称',\n\t\t\t\t\ttrigger: 'blur',\n\t\t\t\t}, ],\n\t\t\t\tdeployDate: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '选请择部署时间',\n\t\t\t\t\ttrigger: 'blur',\n\t\t\t\t}, ],\n\t\t\t\tdemandField: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请选择所属领域',\n\t\t\t\t\ttrigger: 'blur',\n\t\t\t\t}, ],\n\t\t\t\tdemandRunway: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请选择所属跑道',\n\t\t\t\t\ttrigger: 'blur',\n\t\t\t\t}, ],\n\t\t\t\t// demandContent: [{\n\t\t\t\t// \trequired: true,\n\t\t\t\t// \tmessage: '请输入改革需求',\n\t\t\t\t// \ttrigger: 'blur',\n\t\t\t\t// }, ],\n\t\t\t\t// objective: [{\n\t\t\t\t// \trequired: true,\n\t\t\t\t// \tmessage: '请输入总体目标',\n\t\t\t\t// \ttrigger: 'blur',\n\t\t\t\t// }, ],\n\t\t\t\t// measures: [{\n\t\t\t\t// \trequired: true,\n\t\t\t\t// \tmessage: '请输入主要举措',\n\t\t\t\t// \ttrigger: 'blur',\n\t\t\t\t// }, ],\n\t\t\t\t// progress: [{\n\t\t\t\t// \trequired: true,\n\t\t\t\t// \tmessage: '请输入进度详情',\n\t\t\t\t// \ttrigger: 'blur',\n\t\t\t\t// }, ],\n\t\t\t\t// result: [{\n\t\t\t\t// \trequired: true,\n\t\t\t\t// \tmessage: '请输入主要成果',\n\t\t\t\t// \ttrigger: 'blur',\n\t\t\t\t// }, ],\n\t\t\t\tleader: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请输入牵头领导',\n\t\t\t\t\ttrigger: 'blur',\n\t\t\t\t}, ],\n\t\t\t\tunitName: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请选择主责单位',\n\t\t\t\t\ttrigger: 'blur',\n\t\t\t\t}, ],\n\t\t\t},\n\t\t\tunitValue:[],\n\t\t\tqueryParam: {\n\t\t\t\tpageBean: {\n\t\t\t\t\tpage: 1,\n\t\t\t\t\tpageSize: -1,\n\t\t\t\t},\n\t\t\t},\n\t\t\ttreeData: [],\n\t\t}\n\t},\n\tcreated() {\n\t\t//获取主责单位\n\t\tthis.treeData=JSON.parse(sessionStorage.getItem('responsibilityTree'))\n\t},\n\tmounted() {},\n\tmethods: {\n\t\tadd(val) {\n\t\t\tthis.title = '新增'\n\t\t\tthis.visible = true\n\t\t},\n\t\tedit(val) {\n\t\t\tthis.title = '编辑'\n\t\t\tthis.visible = true\n\t\t\tworktable.detailId(val, res => {\n\t\t\t\tif (res) {\n\t\t\t\t\tthis.parameter = res\n\t\t\t\t\tthis.unitValue = this.getParentsById(this.treeData, this.parameter.unitName)\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\t//处理主责单位数据\n\t\tchangeUnit(value) {\n\t\t\tlet nodesObj = this.$refs['cascader'].getCheckedNodes()\n\t\t\tif (nodesObj != []) {\n\t\t\t\tthis.parameter.unitName = nodesObj[0].label\n\t\t\t} else {\n\t\t\t\t// this.parameter.unitId = ''\n\t\t\t\tthis.parameter.unitName = ''\n\t\t\t\t// this.parameter.unitCode = ''\n\t\t\t\t// this.parameter.unitGrade = ''\n\t\t\t}\n\t\t},\n\t\t//主责单位回显\n\t\tgetParentsById(list, id) {\n\t\t\tfor (let i in list) {\n\t\t\t\tif (list[i].name == id) { //这里的name根据你的需求可进行改变\n\t\t\t\t\t//查询到就返回该数组对象的value\n\t\t\t\t\treturn [list[i].name];\n\t\t\t\t}\n\t\t\t\tif (list[i].children) {\n\t\t\t\t\tlet node = this.getParentsById(list[i].children, id);\n\t\t\t\t\tif (node !== undefined) {\n\t\t\t\t\t\t//查询到把父节把父节点加到数组前面\n\t\t\t\t\t\tnode.unshift(list[i].name);\n\t\t\t\t\t\treturn node;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t// 关闭新增人员窗口\n\t\thandleClose() {\n\t\t\tthis.visible = false\n\t\t\tthis.title = ''\n\t\t\tthis.parameter = {\n\t\t\t\tprojectName: '',\n\t\t\t\tdeployDate: '',\n\t\t\t\tdemandField: '',\n\t\t\t\tdemandRunway: '',\n\t\t\t\tdemandContent: '',\n\t\t\t\tobjective: '',\n\t\t\t\tmeasures: '',\n\t\t\t\tprogress: '',\n\t\t\t\tresult: '',\n\t\t\t\tleader: '',\n\t\t\t\tunitName: '',\n\t\t\t}\n\t\t},\n\t\t// 保存\n\t\thandleSave() {\n\t\t\t// console.log(this.parameter);\n\t\t\t// if (this.title == '新增') {\n\t\t\t// \tthis.$emit('getData', this.parameter)\n\t\t\t// } else {\n\t\t\t// \tconsole.log(this.parameter);\n\t\t\t// \tthis.parameter.iteration = 1\n\t\t\t// \tthis.parameter.status = -1\n\t\t\t// \tthis.$emit('getData', this.parameter, this.index)\n\t\t\t// }\n\t\t\t// this.handleClose()\n\t\t\tthis.$refs.formInfo.validate((valid) => {\n\t\t\t\tif (valid) {\n\t\t\t\t\tif (this.title === '新增') {\n\t\t\t\t\t\tworktable.addData(this.parameter, (res) => {\n\t\t\t\t\t\t\tif (res.state) {\n\t\t\t\t\t\t\t\tthis.$notify({\n\t\t\t\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\t\t\t\tmessage: '添加成功',\n\t\t\t\t\t\t\t\t\tduration: 2000,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\tthis.$emit('getData')\n\t\t\t\t\t\t\t\tthis.handleClose()\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t} else if (this.title === '编辑') {\n\t\t\t\t\t\tworktable.editData(this.parameter, (res) => {\n\t\t\t\t\t\t\tif (res.state) {\n\t\t\t\t\t\t\t\tthis.$notify({\n\t\t\t\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\t\t\t\tmessage: '修改成功',\n\t\t\t\t\t\t\t\t\tduration: 2000,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\tthis.$emit('getData')\n\t\t\t\t\t\t\t\tthis.handleClose()\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t},\n}\n",null]}