fix-0609-xwk
向文可 3 years ago
parent e2204323df
commit 7d7fa4a629

@ -164,22 +164,22 @@
const condition1 = ref([]); const condition1 = ref([]);
watch(condition1, (value) => { watch(condition1, (value) => {
store.dispatch('home/loadChartData1', { store.dispatch('home/loadChartData1', {
beginDateTime: value[0].split(' ')[0], beginDate: value[0].split(' ')[0],
endDateTime: value[1].split(' ')[0], endDate: value[1].split(' ')[0],
}); });
}); });
const condition2 = ref([]); const condition2 = ref([]);
watch(condition2, (value) => { watch(condition2, (value) => {
store.dispatch('home/loadChartData2', { store.dispatch('home/loadChartData2', {
beginDateTime: value[0].split(' ')[0], beginDate: value[0].split(' ')[0],
endDateTime: value[1].split(' ')[0], endDate: value[1].split(' ')[0],
}); });
}); });
const condition3 = ref([]); const condition3 = ref([]);
watch(condition3, (value) => { watch(condition3, (value) => {
store.dispatch('home/loadChartData3', { store.dispatch('home/loadChartData3', {
beginDateTime: value[0].split(' ')[0], beginDate: value[0].split(' ')[0],
endDateTime: value[1].split(' ')[0], endDate: value[1].split(' ')[0],
}); });
}); });
const handleValue = (item) => { const handleValue = (item) => {

@ -147,7 +147,9 @@
watch( watch(
() => form.jumpType, () => form.jumpType,
() => { () => {
form.jumpUrl = null; if (!unref(loading)) {
form.jumpUrl = null;
}
}, },
{ immediate: true } { immediate: true }
); );
@ -161,7 +163,9 @@
res.dateRange = [res.advertisementStartTime, res.advertisementEndTime]; res.dateRange = [res.advertisementStartTime, res.advertisementEndTime];
Object.assign(form, res); Object.assign(form, res);
} }
loading.value = false; nextTick(() => {
loading.value = false;
});
} }
}; };
onActivated(handleLoad); onActivated(handleLoad);
@ -191,18 +195,6 @@
isEnable: false, isEnable: false,
}); });
} else { } else {
Object.assign(form, {
id: null,
platform: 1,
location: 1,
productCategoryId: null,
name: null,
dateRange: [],
pictureUrl: null,
jumpType: 1,
jumpUrl: null,
isEnable: false,
});
store.commit('layout/closeTab', { current: true }); store.commit('layout/closeTab', { current: true });
handleClose(); handleClose();
} }
@ -221,6 +213,18 @@
} }
}; };
const handleClose = () => { const handleClose = () => {
Object.assign(form, {
id: null,
platform: 1,
location: 1,
productCategoryId: null,
name: null,
dateRange: [],
pictureUrl: null,
jumpType: 1,
jumpUrl: null,
isEnable: false,
});
router.push({ name: 'AdvertiseManagement' }); router.push({ name: 'AdvertiseManagement' });
}; };
</script> </script>

@ -5,7 +5,7 @@
:code="code" :code="code"
:config="config" :config="config"
:data="list" :data="list"
:operation="['create', 'search']" :operation="['create', 'search', 'remove']"
:reset="handleReset" :reset="handleReset"
title="广告" title="广告"
:total="total" :total="total"
@ -107,6 +107,10 @@
const config = reactive({ const config = reactive({
// //
columns: [ columns: [
{
type: 'selection',
width: 60,
},
{ {
label: 'ID', label: 'ID',
prop: 'id', prop: 'id',

@ -115,6 +115,9 @@
/* 列表配置 */ /* 列表配置 */
const config = reactive({ const config = reactive({
table: {
height: '500px',
},
columns: [ columns: [
{ {
label: '编号', label: '编号',

Loading…
Cancel
Save