Commit 84b708de by crushh

update: 可见配置抽出

parent df166eca
......@@ -15,6 +15,7 @@
</el-radio>
</el-radio-group>
<el-date-picker
v-if="giftForm.releaseType === 2"
v-model="giftForm.limitTimeBegin"
type="datetimerange"
range-separator="至"
......@@ -57,27 +58,31 @@
<i class="iconfont icon-xinxixianshi" style="color:#1890ff" />
</el-tooltip>
<vue-gic-store-linkage
v-if="setting.useNewStoreWidget === 0&&setting.creatorId"
v-show="(setting.useNewStoreWidget === 0&&setting.creatorId) || showComponent"
style="margin-left:10px"
:creatorId="setting.creatorId"
:disabled="true"
:msg="giftForm.sendChildData"
:openFlag="setting.openFlag"
@getDisGroupList="getDisGroupList"
:msg="setting.sendChildData"
ref="selectTree"
/>
<vue-gic-store-card
v-if="setting.useNewStoreWidget === 1"
v-show="setting.useNewStoreWidget === 1"
style="margin-left:10px"
class="pt10"
ref="storeCard"
:readonly="true"
:uuid.sync="setting.uuid"
scenes
/>
<span v-if="sendChildData.storeType === 1" class="store-tip">若选中的父分组下有新增的门店分组,系统不会默认选中此新增门店分组,请重新确认选择并保存礼品</span>
<span v-if="setting.sendChildData.storeType === 1" class="store-tip">若选中的父分组下有新增的门店分组,系统不会默认选中此新增门店分组,请重新确认选择并保存礼品</span>
</el-form-item>
</el-form>
</template>
<script>
// import request from '@/service/request.js';
export default {
props: {
form: Object,
......@@ -86,13 +91,35 @@ export default {
type: Boolean,
default: false,
},
isAdd: Boolean,
},
data () {
return {
giftForm: {}, // 表单的值
setting: {}, // 各种组件的配置
setting: {
useNewStoreWidget: 1,
openFlag: false,
creatorId: '',
sendChildData: {
storeType: 1,
storeGroupIds: '',
storeIds: [],
},
uuid: '',
}, // 各种组件的配置
groupIdDisableList: [],
pickerOptions: {
disabledDate (time) {
return time.getTime() < Date.now() - 24 * 3600 * 1000;
},
},
};
},
computed: {
showComponent () {
return this.isAdd === true;
},
},
watch: {
form (val) {
if (val) {
......@@ -101,10 +128,36 @@ export default {
},
configuration (val) {
if (val) {
console.log(val);
this.setting = JSON.parse(JSON.stringify(val));
if (this.setting.useNewStoreWidget == 1) {
this.$nextTick(_ => {
this.$refs.storeCard.init();
});
}
// if (this.setting.sendChildData.storeType === 1) {
// const arr = this.sendChildData.storeGroupIds;
// // console.log(222, this.groupIdDisableList);
// for (let i = 0; i < arr.length; i++) {
// if (this.groupIdDisableList.indexOf(arr[i]) !== -1) {
// arr.splice(i, 1);
// i--;
// }
// }
// this.sendChildData.storeGroupIds = arr.join(',');
// }
}
},
},
mounted () {
},
methods: {
getDisGroupList (arr) {
this.groupIdDisableList = arr;
},
},
};
</script>
......
......@@ -45,17 +45,17 @@ const router = new Router({
{
path: '/giftAdd',
name: 'giftAdd',
component: giftInfo,
component: giftDetail,
},
{
path: '/giftInfo',
name: 'giftInfo',
component: giftInfo,
component: giftDetail,
},
{
path: '/giftDetail',
name: 'giftDetail',
component: giftDetail,
component: giftInfo,
},
{
path: '/coupon',
......
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