|
|
@@ -21,36 +21,14 @@
|
|
|
|
|
|
<el-form-item label="报表周期:" prop="statisticType" required>
|
|
|
<el-radio-group v-model="form.statisticType" :disabled="disableType.statisticTypeDisable">
|
|
|
- <el-tooltip :visible="weekVisible" placement="top">
|
|
|
- <template #content>
|
|
|
- <span>每次推送上个自然周数据</span><br />
|
|
|
- <div style="text-align: center">(每周一至周日)</div>
|
|
|
- </template>
|
|
|
- <el-radio :value="1" @mouseenter="weekVisible = true" @mouseleave="weekVisible = false">周报</el-radio>
|
|
|
- </el-tooltip>
|
|
|
-
|
|
|
- <el-tooltip :visible="monthVisible" placement="top">
|
|
|
- <template #content>
|
|
|
- <span>每次推送上个自然月数据</span><br />
|
|
|
- <div style="text-align: center">(每月第一天至最后一天)</div>
|
|
|
- </template>
|
|
|
- <el-radio :value="2" @mouseenter="monthVisible = true" @mouseleave="monthVisible = false">月报</el-radio>
|
|
|
- </el-tooltip>
|
|
|
-
|
|
|
- <el-tooltip :visible="yearVisible" placement="top">
|
|
|
- <template #content>
|
|
|
- <span>每次推送上一整年的数据</span>
|
|
|
- </template>
|
|
|
- <el-radio :value="4" @mouseenter="yearVisible = true" @mouseleave="yearVisible = false">年报</el-radio>
|
|
|
- </el-tooltip>
|
|
|
-
|
|
|
- <el-tooltip :visible="customVisible" placement="top">
|
|
|
- <template #content>
|
|
|
- <span>根据个人需求按开始和结束日期进行统计</span>
|
|
|
- </template>
|
|
|
- <el-radio el-radio :value="5" @mouseenter="customVisible = true"
|
|
|
- @mouseleave="customVisible = false">自定义</el-radio>
|
|
|
- </el-tooltip>
|
|
|
+ <StatisticOption
|
|
|
+ v-for="option in ReportOptions"
|
|
|
+ :key="option.value"
|
|
|
+ :value="option.value"
|
|
|
+ :tooltip-content="option.tooltipContent"
|
|
|
+ :tooltip-placement="option.tooltipPlacement"
|
|
|
+ :label="option.label"
|
|
|
+ />
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
|
|
|
@@ -101,7 +79,8 @@ import { addMassage, searchMassage, editMassage } from '@/api/message/report-mes
|
|
|
import { useUserStore } from '@/store/modules/user';
|
|
|
import { useFormList } from './store/useFormList';
|
|
|
import { reportMessage, toReportMessage, reportMessageToFinal } from './class';
|
|
|
-import { OperationTypeEnum, StatisticTypeEnum, OperationTypeNames,PushMessageTypeEnum, Default_Value } from '@/types/message/constant';
|
|
|
+import { OperationTypeEnum, StatisticTypeEnum, OperationTypeNames, PushMessageTypeEnum, Default_Value,ReportOptions } from '@/types/message/constant';
|
|
|
+import StatisticOption from "./components/StatisticOption.vue";
|
|
|
import DesignatedPersonSelection from './components/DesignatedPersonSelection.vue';
|
|
|
import TemplateExample from './TemplateExample.vue';
|
|
|
import WeekReport from './WeekReport.vue';
|
|
|
@@ -115,10 +94,6 @@ const FormList = useFormList();
|
|
|
const { info } = storeToRefs(useUser);
|
|
|
const { type } = storeToRefs(FormList);
|
|
|
let operater = info.value.realname;
|
|
|
-const weekVisible = ref(false); // 控制Tooltip显示
|
|
|
-const monthVisible = ref(false); // 控制Tooltip显示
|
|
|
-const yearVisible = ref(false); // 控制Tooltip显示
|
|
|
-const customVisible = ref(false); // 控制Tooltip显示
|
|
|
let disableType = ref({ statisticTypeDisable: false, contentDisable: false }); // 控制是否可编辑
|
|
|
const formSize = ref('default'); // 校验表单
|
|
|
const ruleFormRef = ref();
|
|
|
@@ -151,6 +126,7 @@ const form = reactive<reportMessage>({
|
|
|
customUserList: [],
|
|
|
});
|
|
|
|
|
|
+
|
|
|
// 根据报表周期展示不同组件
|
|
|
const ComponentEnum = {
|
|
|
[StatisticTypeEnum.WEEK_REPORT]: WeekReport,
|