参数模板

This commit is contained in:
zhaomeijing
2022-05-04 17:27:46 +08:00
parent 4936d1e271
commit 271a45b99a
4 changed files with 35 additions and 31 deletions
@@ -93,11 +93,12 @@
<a-row :gutter="24">
<a-col :span="24">
<a-form-model-item class="itemModel" prop="paramsTemplateName">
<span class="title-text-text"
:title="$t('parameterTemplate')">{{$t('parameterTemplate')}}</span>
<a-input class="box-input"
<span class="title-text-text"
:title="$t('templateName')">{{$t('templateName')}}
</span>
<a-input class="box-input add-input"
v-model="paramsTemplateName"
:placeholder="$t('PleaseEnter')+$t('parameterTemplate')"/>
:placeholder="$t('PleaseEnter')+$t('templateName')"/>
</a-form-model-item>
</a-col>
</a-row>
@@ -202,15 +203,20 @@ export default {
this.areaVisible=false
},
handleSubmit() {
getAction(this.url.copy + `?id=${this.selectedRowKeys[0]}&paramsTemplateName=${this.paramsTemplateName}`, {}).then((res) => {
if (res.success) {
this.areaVisible=false
this.$message.success(res.message)
this.getList()
} else {
this.$message.warning(res.message)
}
})
if(this.paramsTemplateName.trim() === '') {
this.$message.warning(this.$t('templateName') + this.$t('cannotEmpty'))
} else {
getAction(this.url.copy + `?id=${this.selectedRowKeys[0]}&paramsTemplateName=${this.paramsTemplateName}`, {}).then((res) => {
if (res.success) {
this.areaVisible=false
this.$message.success(res.message)
this.getList()
} else {
this.$message.warning(res.message)
}
})
}
console.log(this.paramsTemplateName,'this.paramsTemplateName')
},
handleToggleSearch() {
this.toggleSearchStatus = !this.toggleSearchStatus
@@ -392,7 +398,9 @@ export default {
height: 38px;
margin-top: 2px;
}
.add-input{
width: 82%;
}
.box-button {
height: 38px;
/*margin-top: 2px;*/