From 12eed3629aa19fd7e0fddda81f71eda6df1dab56 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Sat, 12 Oct 2019 17:15:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=90=E8=A1=8C=E5=9B=BE=20=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E5=AE=A1=E6=A0=B8=E6=B5=81=E7=A8=8B=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/langs/en/approval.js | 3 ++- src/i18n/langs/zh/approval.js | 3 ++- src/views/approval/runPlan/index.vue | 7 ++++++- src/views/approval/runPlan/operate.vue | 10 +++++----- src/views/approval/script/operate.vue | 8 ++++---- src/views/scriptManage/home.vue | 3 +++ 6 files changed, 22 insertions(+), 12 deletions(-) diff --git a/src/i18n/langs/en/approval.js b/src/i18n/langs/en/approval.js index 77a39ae47..6d3a8b7be 100644 --- a/src/i18n/langs/en/approval.js +++ b/src/i18n/langs/en/approval.js @@ -24,5 +24,6 @@ export default { runPlanName: 'Run Plan Name', passedRunPlan: 'Passed Run Plan', rejectRunPlan: 'Reject Run Plan', - runPlanPreview: 'RunPlan Preview' + runPlanPreview: 'RunPlan Preview', + inputRunPlanName: 'Please input run plan name' }; diff --git a/src/i18n/langs/zh/approval.js b/src/i18n/langs/zh/approval.js index fdf6cbcdf..eae503ae9 100644 --- a/src/i18n/langs/zh/approval.js +++ b/src/i18n/langs/zh/approval.js @@ -24,5 +24,6 @@ export default { runPlanName: '运行图名称', passedRunPlan: '通过运行图', rejectRunPlan: '驳回运行图', - runPlanPreview: '预览' + runPlanPreview: '预览', + inputRunPlanName: '请输入运行图名称' }; diff --git a/src/views/approval/runPlan/index.vue b/src/views/approval/runPlan/index.vue index dce9a0f0f..09c5a2b30 100644 --- a/src/views/approval/runPlan/index.vue +++ b/src/views/approval/runPlan/index.vue @@ -146,8 +146,13 @@ }, handleConfirmPass(data){ publishRunPlan(data.id,data).then(resp => { + if(resp.data.length<=0){ + this.$message.success(this.$t('approval.passedScriptSuccess')); + } + else{ + this.$messageBox(`${this.$t('approval.passedScriptFailed')}: ${resp.data[0]}`); + } this.reloadTable(); - this.$message.success(this.$t('approval.passedScriptSuccess')); }).catch(error => { this.$messageBox(`${this.$t('approval.passedScriptFailed')}: ${error.message}`); }) diff --git a/src/views/approval/runPlan/operate.vue b/src/views/approval/runPlan/operate.vue index bb1a63b61..f2bcb9c37 100644 --- a/src/views/approval/runPlan/operate.vue +++ b/src/views/approval/runPlan/operate.vue @@ -16,7 +16,7 @@ return { dialogVisible: false, formModel:{ - name:'', + runPlanName:'', id:'', explanation:'', }, @@ -34,7 +34,7 @@ form = { labelWidth: '150px', items: [ - { prop: 'name', label: this.$t('approval.scriptName'), type: 'text', required: true}, + { prop: 'runPlanName', label: this.$t('approval.runPlanName'), type: 'text', required: true}, ] } } @@ -53,8 +53,8 @@ let crules ={}; if(this.type=="applyPassed"){ crules={ - name: [ - { required: true, message: this.$t('approval.inputScriptName'), trigger: 'blur' }, + runPlanName: [ + { required: true, message: this.$t('approval.inputRunPlanName'), trigger: 'blur' }, ] } } @@ -71,7 +71,7 @@ methods: { doShow(row) { if(this.type=="applyPassed"){ - this.formModel.name=row.name; + this.formModel.runPlanName=row.name; } this.formModel.id=row.id; this.dialogVisible = true diff --git a/src/views/approval/script/operate.vue b/src/views/approval/script/operate.vue index bb1a63b61..fab9380b3 100644 --- a/src/views/approval/script/operate.vue +++ b/src/views/approval/script/operate.vue @@ -16,7 +16,7 @@ return { dialogVisible: false, formModel:{ - name:'', + scriptName:'', id:'', explanation:'', }, @@ -34,7 +34,7 @@ form = { labelWidth: '150px', items: [ - { prop: 'name', label: this.$t('approval.scriptName'), type: 'text', required: true}, + { prop: 'scriptName', label: this.$t('approval.scriptName'), type: 'text', required: true}, ] } } @@ -53,7 +53,7 @@ let crules ={}; if(this.type=="applyPassed"){ crules={ - name: [ + scriptName: [ { required: true, message: this.$t('approval.inputScriptName'), trigger: 'blur' }, ] } @@ -71,7 +71,7 @@ methods: { doShow(row) { if(this.type=="applyPassed"){ - this.formModel.name=row.name; + this.formModel.scriptName=row.name; } this.formModel.id=row.id; this.dialogVisible = true diff --git a/src/views/scriptManage/home.vue b/src/views/scriptManage/home.vue index 36a3eada5..33cea9bd6 100644 --- a/src/views/scriptManage/home.vue +++ b/src/views/scriptManage/home.vue @@ -99,6 +99,9 @@ export default { // '$store.state.scriptRecord.scriptId': function (val) { // this.formModel.mapId=val; // } + '$route' () { + this.loadInitData(); + } }, mounted() { this.loadInitData();