实现受众的复制功能

This commit is contained in:
weinan2087
2023-02-10 17:31:52 +08:00
parent 9611f70c26
commit 3569345d09

View File

@@ -60,7 +60,7 @@
<el-form ref="copyForm" :rules="copyRules" :model="copyForm" label-width="100px">
<el-form-item label="受众名称:" prop="name">
<el-input
v-model="copyForm.name"
v-model="copyForm.audienceName"
placeholder="请输入受众名称"
maxlength="50"
></el-input>
@@ -121,8 +121,8 @@
// 表格数据
tableData: [],
copyUserGroupShow:false,
copyRules:{ name: [{ required: true, message: "请输入名称", trigger: "blur" }]},
copyForm:{name:'',id:''},
copyRules:{ audienceName: [{ required: true, message: "请输入名称", trigger: "blur" }]},
copyForm:{audienceName:'',audienceId:''},
}
},
mounted() {
@@ -330,13 +330,13 @@
},
copyDialog(row){
this.copyUserGroupShow = true;
this.copyForm.id = row.id;
this.copyForm.name = row.name;
this.copyForm.audienceId = row.id;
this.copyForm.audienceName = row.name;
},
copy(){
this.$refs.copyForm.validate((valid) => {
if (valid) {
usergroupApi.copy(this.copyForm).then((res) => {
apiAudience.copy(this.copyForm).then((res) => {
if (res.status == 200) {
this.$message({ type: "success", message: "复制受众成功" ,offset:50});
this.loadData(this.page,this.query);