<template>
|
<el-card shadow="never">
|
<template #header>
|
<div><el-text tag="b" size="large">产品生成选项</el-text></div>
|
</template>
|
<SearchBar
|
v-show="active"
|
ref="refSearchBar"
|
:btn-show="false"
|
:init="false"
|
@on-submit="search"
|
>
|
</SearchBar>
|
<template #footer>
|
<el-row v-show="active" justify="space-around">
|
<el-button
|
type="primary"
|
size="default"
|
:loading="loading"
|
@click="submit"
|
>生成</el-button
|
>
|
</el-row>
|
</template>
|
</el-card>
|
</template>
|
<script setup>
|
import { ref, computed } from 'vue';
|
import dayjs from 'dayjs';
|
|
const props = defineProps({
|
loading: {
|
type: Boolean,
|
default: false
|
},
|
active:{
|
type: Boolean,
|
default: true
|
}
|
});
|
const emit = defineEmits(['submit']);
|
|
const refSearchBar = ref(null);
|
|
const submit = () => {
|
refSearchBar.value.onSubmit();
|
};
|
|
const search = (options) => {
|
const opt = {
|
topTaskId: options.topTask.tguid,
|
provinceCode: options.topTask.provincecode,
|
cityCode: options.topTask.citycode,
|
districtCode: options.topTask.districtcode,
|
townCode: options.topTask.towncode,
|
startTime: dayjs(options.topTask.starttime).format('YYYY-MM-DD HH:mm:ss'),
|
endTime: dayjs(options.topTask.endtime)
|
.add(1, 'day')
|
.add(-1, 'second')
|
.format('YYYY-MM-DD HH:mm:ss'),
|
sceneTypeId: options.sceneTypeId,
|
needCache: true
|
};
|
emit('submit', opt);
|
};
|
</script>
|