From cb7d0f1d6883c185d3af3de40206e46dd0bf3152 Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期六, 26 八月 2023 16:53:09 +0800 Subject: [PATCH] 修改 --- src/components/AddControl.vue | 34 ++++++++++++++-------------------- 1 files changed, 14 insertions(+), 20 deletions(-) diff --git a/src/components/AddControl.vue b/src/components/AddControl.vue index 5883121..c3a3672 100644 --- a/src/components/AddControl.vue +++ b/src/components/AddControl.vue @@ -54,17 +54,16 @@ export default { components: {}, props: { - id:{ - type: [Number,String], + Arr:{ + type: [Array], default: () => { - return ''; + return []; }, } }, data() { return { islook: false, - Arr:[] }; }, mounted() { @@ -73,19 +72,11 @@ watch: { islook(val) { if (val) { - this.getStartInfo() - } }, }, methods: { - getStartInfo(){ - startTask({id:this.id}).then(res=>{ - if(res.code==200){ - this.Arr=res.data.params; - } - }) - }, + validatorNum(rule, value, callback) { if (value) { if (value == undefined || value == null) { @@ -105,13 +96,16 @@ onSubmit() { - - sendProcessParams({id:this.id}).then(res=>{ - if(res.code==200){ - this.$message.success("涓嬪彂鎴愬姛锛�"); - this.shutdown(); - } - }) + if(this.id){ + sendProcessParams({id:this.id}).then(res=>{ + if(res.code==200){ + this.$message.success("涓嬪彂鎴愬姛锛�"); + this.shutdown(); + } + }) + }else{ + this.$message.error("褰撳墠璁惧娌℃湁宸ュ簭锛�"); + } }, shutdown() { this.islook = false; -- Gitblit v1.8.0