From 0915a758776119e5d7be3ebe661029bbcfe1e819 Mon Sep 17 00:00:00 2001 From: zhutianqi Date: Tue, 16 Nov 2021 14:31:17 +0800 Subject: [PATCH] commit --- .../enterpriseStandardPlan/index.vue | 138 ++++++++++++++---- .../components/workingGroup1/index.vue | 8 +- .../components/workingGroup2/index.vue | 8 +- 3 files changed, 118 insertions(+), 36 deletions(-) diff --git a/src/pages/regulatoryRepository/enterpriseStandardPlan/index.vue b/src/pages/regulatoryRepository/enterpriseStandardPlan/index.vue index c9ca4c51b..fd9e116ff 100644 --- a/src/pages/regulatoryRepository/enterpriseStandardPlan/index.vue +++ b/src/pages/regulatoryRepository/enterpriseStandardPlan/index.vue @@ -55,17 +55,17 @@ size="mini" @click="addData">新增 - 导入 - - 导出 - - 下载 - + + + + + + + + + + + 删除 @@ -189,40 +189,44 @@ - + - - + + - - + + - + - + - + @@ -245,18 +249,19 @@ placeholder="请选择计划标准发布时间"> - + - - - + + + + + + @@ -304,9 +309,37 @@ draftTime: '', // 计划标准初稿完成时间 releaseTime: '', // 计划标准发布时间 drafter: '', // 起草人 - remake: '', // 备注 + // remarks: '', // 备注 + }, + addFormRules: { + unit: [ + {required: true, message: '请输入单位', trigger: 'blur'}, + ], + esName: [ + {required: true, message: '请输入企标名称', trigger: 'blur'}, + ], + planStatus: [ + {required: true, message: '请选择计划状态', trigger: 'change'}, + ], + reviseStatus: [ + {required: true, message: '请选择制修订状态', trigger: 'change'}, + ], + resPerson: [ + {required: true, message: '请输入评审责任人', trigger: 'blur'}, + ], + wgLeader: [ + {required: true, message: '请输入工作组组长', trigger: 'blur'}, + ], + draftTime: [ + {required: true, message: '请输入计划标准初稿完成时间', trigger: 'blur'}, + ], + releaseTime: [ + {required: true, message: '请输入计划标准发布时间', trigger: 'blur'}, + ], + drafter: [ + {required: true, message: '请输入起草人', trigger: 'blur'}, + ], }, - addFormRules: {}, form: { page: 1, pageSize: this.$store.getters.userInfo.configContent, @@ -323,12 +356,42 @@ props: {}, watch: {}, methods: { - addDrawerSubmit () {}, + addDrawerSubmit () { + this.$refs['addForm'].validate((valid) => { + if (valid) { + this.submitLoading = true + let url = '' + let tips = '' + if (this.DrawerType === 'edit') { + url = 'esRevisePlan/es-revise-plan/modPlan' + tips = '编辑' + }else if (this.DrawerType === 'add') { + url = 'esRevisePlan/es-revise-plan/addPlan' + tips = '添加' + } + this.$http.post(url, this.addForm, { + _this: this + }, res => { + this.submitLoading = false + if (res.ok) { + this.addDrawer = false + this.$message.success(tips + '成功') + this.getData() + } else { + this.$message.warning(tips + '添加失败') + } + }) + } else { + this.$message.warning('请检查表单是否填写正确') + } + }) + }, addDrawerClose () { this.addDrawer = false }, addData () { this.addDrawerTitle = '新增' + this.addForm = {} this.DrawerType = 'add' this.addDrawer = true }, // 新增数据 @@ -394,6 +457,18 @@ this.addDrawerTitle = '编辑' this.DrawerType = 'edit' this.addDrawer = true + this.addForm = { + id: command[0].id, + unit: command[0].unit, // 单位 + esName: command[0].esName, // 企标名称 + planStatus: command[0].planStatus, // 计划状态 + reviseStatus: command[0].reviseStatus, // 制修订状态 + resPerson: command[0].resPerson, // 评审责任人 + wgLeader: command[0].wgLeader, // 工作组组长 + draftTime: command[0].draftTime, // 计划标准初稿完成时间 + releaseTime: command[0].releaseTime, // 计划标准发布时间 + drafter: command[0].drafter, // 起草人 + } break case '删除': this.$confirm('您是否确认删除选中数据?', '提示', { @@ -422,6 +497,7 @@ this.addDrawerTitle = '查看' this.DrawerType = 'see' this.addDrawer = true + this.addForm = command[0] break } }, @@ -454,7 +530,9 @@ height: calc(~'100% - 20px') !important; } } - height: 100%; + /deep/.el-form-item__content { + width: calc(~'100% - 180px'); + } display: flex; flex-direction: column; .content-center { diff --git a/src/pages/regulatoryRepository/workingGroup/components/workingGroup1/index.vue b/src/pages/regulatoryRepository/workingGroup/components/workingGroup1/index.vue index 6b188da70..8683ac293 100644 --- a/src/pages/regulatoryRepository/workingGroup/components/workingGroup1/index.vue +++ b/src/pages/regulatoryRepository/workingGroup/components/workingGroup1/index.vue @@ -1863,9 +1863,11 @@ .drawerTable { height: calc(~'100% - 126px'); } - /*/deep/.el-form-item__content {*/ - /* width: calc(~'100% - 120px');*/ - /*}*/ + .add-form-item { + /deep/.el-form-item__content { + width: calc(~'100% - 120px'); + } + } /deep/.el-form-item__label { height: 100%; line-height: 50px; diff --git a/src/pages/regulatoryRepository/workingGroup/components/workingGroup2/index.vue b/src/pages/regulatoryRepository/workingGroup/components/workingGroup2/index.vue index cfc3274fb..243d764c0 100644 --- a/src/pages/regulatoryRepository/workingGroup/components/workingGroup2/index.vue +++ b/src/pages/regulatoryRepository/workingGroup/components/workingGroup2/index.vue @@ -1714,9 +1714,11 @@ .drawerTable { height: calc(~'100% - 126px'); } - /*/deep/.el-form-item__content {*/ - /* width: calc(~'100% - 120px');*/ - /*}*/ + .add-form-item { + /deep/.el-form-item__content { + width: calc(~'100% - 120px'); + } + } /deep/.el-form-item__label { height: 100%; line-height: 50px;