参数模板

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
+1
View File
@@ -706,6 +706,7 @@ module.exports = {
uploadTime: 'Upload time',
enclosure: 'enclosure',
// 认证
templateName: 'template Name',
pleaseSelectData: 'please Select Data',
templateCopy: 'template Copy',
NiOnumberalreadyexists: 'NiO number already exists, please replace NiO number',
+1
View File
@@ -712,6 +712,7 @@ module.exports = {
uploadTime:'上传时间',
enclosure:'附件',
// 认证
templateName: '模板名称',
pleaseSelectData: '请选择数据',
templateCopy: '模板复制',
NiOnumberalreadyexists: 'NIO编号已存在,请更换NIO编号',
@@ -64,7 +64,8 @@
:title="$t('contentDescription')">{{$t('contentDescription')}}</span>
</div>
<a-form-model-item class="itemModel" prop="description">
<a-input class="box-input"
<a-input class="box-input add-input"
type="textarea"
:disabled="disabled"
v-model="formInline.description"
:placeholder="$t('PleaseEnter')+$t('contentDescription')"/>
@@ -97,23 +98,12 @@ export default {
confirmLoading: false,
visible: false,
rules: {
ipdInfo: [
{
pattern: /(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&amp;%$#_]*)?/,
message: this.$t('pleaseEnterTheCorrectWebAddress')
}
paramsTemplateName:[
{ required: true, message: this.$t('PleaseEnter')+this.$t('parameterTemplate'), trigger: 'change' },
{ min:1, max: 50, message: this.$t('cantExeed')+'50'+this.$t('characters'), trigger: 'blur' },
],
vehicleDevelopmentPlan: [
{
pattern: /(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&amp;%$#_]*)?/,
message: this.$t('pleaseEnterTheCorrectWebAddress')
}
],
attestationPlan: [
{
pattern: /(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&amp;%$#_]*)?/,
message: this.$t('pleaseEnterTheCorrectWebAddress')
}
description:[
{ min:1, max: 300, message: this.$t('cantExeed')+'300'+this.$t('characters'), trigger: 'blur' },
]
},
disabled: false,
@@ -138,6 +128,7 @@ export default {
this.visible = true
this.title = '新增'
this.formInline = {}
this.formInline.state = '1'
},
editModel(value) {
this.visible = true
@@ -306,6 +297,9 @@ export default {
background: #fff;
border-radius: 0 0 2px 2px;
}
/deep/.add-input{
min-height: 135px!important;
}
</style>
<style>
.ant-input-disabled {
@@ -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;*/