<template>
|
<el-button icon="Download" type="success" @click="dialogVisible = true"
|
>导出报告</el-button
|
>
|
<el-dialog v-model="dialogVisible" :title="name" width="500">
|
<el-text tag="b" size="large">数据范围确认</el-text>
|
<el-text tag="div">区域:{{ locationText }}</el-text>
|
<el-text tag="div">类型:{{ scenetype.label }}</el-text>
|
<el-text tag="div">时间:{{ timeText }}</el-text>
|
<template #footer>
|
<div class="dialog-footer">
|
<el-row align="middle">
|
<el-checkbox v-model="forceUpdate" label="强制生成新报告" />
|
<el-tooltip placement="bottom-start" effect="light">
|
<template #content>
|
<el-text tag="b" size="small">不勾选:</el-text><br />
|
<el-text size="small"
|
>不勾选时,如果已生成过相同区域的报告,则直接获取该份报告记录</el-text
|
><br />
|
<el-text tag="b" size="small">勾选:</el-text><br />
|
<el-text size="small"
|
>勾选时,无论是否有历史记录,都会启动报告生成任务覆盖旧记录,可在后台任务界面查看任务进度</el-text
|
><br />
|
</template>
|
<el-icon
|
class="m-l-8 cursor-p"
|
:size="16"
|
color="var(--el-color-warning)"
|
><QuestionFilled
|
/></el-icon>
|
</el-tooltip>
|
</el-row>
|
<div>
|
<el-button @click="dialogVisible = false">取消</el-button>
|
<el-button type="primary" @click="handleSubmit">确定</el-button>
|
</div>
|
</div>
|
</template>
|
</el-dialog>
|
</template>
|
|
<script>
|
import dayjs from 'dayjs';
|
|
export default {
|
props: ['name', 'locations', 'time', 'scenetype'],
|
emits: ['submit'],
|
data() {
|
return {
|
dialogVisible: false,
|
forceUpdate: false
|
};
|
},
|
computed: {
|
locationText() {
|
const loc = this.locations;
|
let text = '';
|
text = loc.pName == loc.cName ? loc.pName : loc.pName + loc.cName;
|
text += loc.dName;
|
return text;
|
},
|
timeText() {
|
return dayjs(this.time).format('YYYY年MM月');
|
}
|
},
|
methods: {
|
handleSubmit() {
|
this.$emit('submit', this.forceUpdate);
|
}
|
}
|
};
|
</script>
|
<style scoped>
|
.dialog-footer {
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
gap: 2px;
|
}
|
</style>
|