[参数项列表] 复制

This commit is contained in:
zhaomeijing
2022-04-29 16:57:57 +08:00
parent 9881a40a1e
commit 608176f4fd
3 changed files with 52 additions and 3 deletions
+2
View File
@@ -706,6 +706,8 @@ module.exports = {
uploadTime: 'Upload time',
enclosure: 'enclosure',
// 认证
pleaseSelectData: 'please Select Data',
templateCopy: 'template Copy',
NiOnumberalreadyexists: 'NiO number already exists, please replace NiO number',
attachmentTemplate: 'attachment Template',
controlAlternatives: 'control Alternatives',
+2
View File
@@ -712,6 +712,8 @@ module.exports = {
uploadTime:'上传时间',
enclosure:'附件',
// 认证
pleaseSelectData: '请选择数据',
templateCopy: '模板复制',
NiOnumberalreadyexists: 'NIO编号已存在,请更换NIO编号',
attachmentTemplate: '附件模板',
controlAlternatives: '控件备选值',
@@ -88,6 +88,25 @@
/>
</div>
<addModel :url="url" ref="addModelRef" @addModelList="addModelList"/>
<a-modal class="show-copy" v-model="areaVisible" :title="$t('templateCopy')" :footer="null" @cancel="hideModal">
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<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"
v-model="paramsTemplateName"
:placeholder="$t('PleaseEnter')+$t('parameterTemplate')"/>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
<div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div>
</a-modal>
</a-card>
</template>
@@ -120,7 +139,8 @@ export default {
add: 'params/template/add',
edit: 'params/template/edit',
deleteBatch: 'params/template/delete',
deleteAll: 'params/template/deleteBatch'
deleteAll: 'params/template/deleteBatch',
copy: 'params/template/copyById'
},
total: 0,
pageSize: 10,
@@ -169,13 +189,29 @@ export default {
scopedSlots: { customRender: 'operation' }
}
],
queryParam: {}
queryParam: {},
areaVisible:false,
paramsTemplateName: '',
}
},
mounted() {
this.getList()
},
methods: {
handleCancel() {
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)
}
})
},
handleToggleSearch() {
this.toggleSearchStatus = !this.toggleSearchStatus
},
@@ -189,7 +225,16 @@ export default {
},
// 复制
handlecody(){
if (this.selectedRowKeys.length > 1) {
this.$message.warning(this.$t('OnlyOneSelected'))
} else if(this.selectedRowKeys.length == 0){
this.$message.warning(this.$t('pleaseSelectData'))
} else {
this.areaVisible=true
}
},
hideModal(){
this.visible = false;
},
//批量删除
handleDel() {