Commit 237608ef by crushh

update: dist

parent 6305bb28
...@@ -60,10 +60,10 @@ ...@@ -60,10 +60,10 @@
/> --> /> -->
<dm-store-selector <dm-store-selector
:creatorId="ruleForm.creatorId" :creatorId="ruleForm.creatorId"
ref="storeGroup" ref="storeGroup"
@store-change="storeChange" @store-change="storeChange"
v-if="uuid" v-if="canShowStoreSelector"
:uuid.sync="uuid"> :uuid="uuid">
</dm-store-selector> </dm-store-selector>
</el-form-item> </el-form-item>
<vue-gic-people <vue-gic-people
...@@ -164,6 +164,9 @@ export default { ...@@ -164,6 +164,9 @@ export default {
return !(this.memberType == 3 || this.memberType == 2) && this.memberTypeTotal >= 20; return !(this.memberType == 3 || this.memberType == 2) && this.memberTypeTotal >= 20;
} }
}, },
canShowStoreSelector () {
return this.uuid || this.isAdd || this.memberType == 3 || this.memberType == 2;
},
}, },
mounted () { mounted () {
if (!this.isAdd) { if (!this.isAdd) {
...@@ -192,27 +195,28 @@ export default { ...@@ -192,27 +195,28 @@ export default {
this.loading = true; this.loading = true;
request.get('/api-integral-mall/get-rule', { params: { integralMallProRuleId } }).then(res => { request.get('/api-integral-mall/get-rule', { params: { integralMallProRuleId } }).then(res => {
if (res.data.result) { if (res.data.result) {
this.ruleForm = res.data.result; const data = res.data.result;
this.memberType = this.ruleForm.memberType; this.memberType = data.memberType;
if (this.ruleForm.memberType == 3) { // 人群筛选器回显 if (data.memberType == 3) { // 人群筛选器回显
this.hasSearchData = this.ruleForm.filterJson; this.hasSearchData = data.filterJson;
this.useId = this.ruleForm.searchId; this.useId = data.searchId;
if (this.isCopy) { if (this.isCopy) {
const form = new FormData(); const form = new FormData();
form.append('requestProject', 'integral-mall'); form.append('requestProject', 'integral-mall');
form.append('id', this.ruleForm.searchId); form.append('id', data.searchId);
request.post('/api-plug/get-screening-detail', form).then(res => { request.post('/api-plug/get-screening-detail', form).then(res => {
this.ruleForm.searchJson = res.data.result && res.data.result.detail; data.searchJson = res.data.result && res.data.result.detail;
}); });
} }
} else if (this.ruleForm.memberType == 4) { // 门店筛选器回显 } else if (data.memberType == 4) { // 门店筛选器回显
this.uuid = JSON.parse(this.ruleForm.filterJson).storeWidgetId; this.uuid = JSON.parse(data.filterJson).storeWidgetId;
} else if (this.ruleForm.memberType == 2) { } else if (data.memberType == 2) {
this.selectedGroupIds = this.ruleForm.filterJson; this.selectedGroupIds = data.filterJson;
} }
if (this.isCopy) { if (this.isCopy) {
this.ruleForm.creatorId = localStorage.getItem('useId'); data.creatorId = localStorage.getItem('useId');
} }
this.ruleForm = data;
} }
}).finally(() => { }).finally(() => {
this.loading = false; this.loading = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment