|
@@ -10,13 +10,24 @@
|
|
|
$router.push({name: '271b733b-f08c-4628-bc98-eae5a40887da'}) :
|
|
|
$router.push({name: '258df2a8-c2db-4fc6-9f9e-3845b58b9dd3'})">查看更多》</div>
|
|
|
</template>
|
|
|
- <div class="list">
|
|
|
- <template v-for="item in list">
|
|
|
- <div class="item __hover" @click="onView(item)">
|
|
|
- <img src="@/assets/images/business/clue-icon.png"/>
|
|
|
- <div class="title __text-ellipsis">{{item.title}}</div>
|
|
|
- <div class="time">{{Handle.formatDate(item.time)}}</div>
|
|
|
- </div>
|
|
|
+ <div class="list" v-loading="loading">
|
|
|
+ <template v-if="sourceType === '1'">
|
|
|
+ <template v-for="item in dailyList">
|
|
|
+ <div class="item __hover" @click="onView('daily', item)">
|
|
|
+ <img src="@/assets/images/business/clue-icon.png"/>
|
|
|
+ <div class="title __text-ellipsis">{{item.title}}</div>
|
|
|
+ <div class="time">{{Handle.formatDate(item.submitTime)}}</div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <template v-for="item in weeklyList">
|
|
|
+ <div class="item __hover" @click="onView('weekly', item)">
|
|
|
+ <img src="@/assets/images/business/clue-icon.png"/>
|
|
|
+ <div class="title __text-ellipsis">{{item.title}}</div>
|
|
|
+ <div class="time">{{Handle.formatDate(item.submitTime)}}</div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</template>
|
|
|
</div>
|
|
|
<DailyManageDetailCom v-model:show="showDaily" :transfer="transferDaily"/>
|
|
@@ -44,6 +55,7 @@ import ButtonSwitchCom from '../../common/button-switch.vue'
|
|
|
import * as Handle from '../../common/handle'
|
|
|
import DailyManageDetailCom from '@/views/system/daily-manage/detail.vue'
|
|
|
import WeeklyManageDetailCom from '@/views/system/weekly-manage/detail.vue'
|
|
|
+import {ElMessage} from "element-plus";
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: '',
|
|
@@ -60,27 +72,17 @@ export default defineComponent({
|
|
|
const that = (getCurrentInstance() as ComponentInternalInstance).appContext.config.globalProperties
|
|
|
const state = reactive({
|
|
|
Handle: Handle,
|
|
|
- list: [
|
|
|
- {type: 1, title: '日、系统新版本升级V1.1通知,新功能系统新版本升级V1.1通知,新功能', time: '2023-09-01 13:22:33'},
|
|
|
- {type: 2, title: '周、系统新版本升级V1.1通知,新功能系统新版本升级V1.1通知,新功能', time: '2023-11-22 13:22:33'},
|
|
|
- {type: 1, title: '日、系统新版本升级V1.1通知', time: '2023-11-01 13:22:33'},
|
|
|
- {type: 1, title: '日、系统新版本升级V1.1通知', time: '2023-11-01 13:22:33'},
|
|
|
- {type: 1, title: '日、系统新版本升级V1.1通知', time: '2023-11-01 13:22:33'},
|
|
|
- {type: 2, title: '周、系统新版本升级V1.1通知', time: '2023-11-01 13:22:33'},
|
|
|
- {type: 1, title: '日、系统新版本升级V1.1通知', time: '2023-11-01 13:22:33'},
|
|
|
- {type: 1, title: '日、系统新版本升级V1.1通知', time: '2023-11-01 13:22:33'},
|
|
|
- {type: 2, title: '周、系统新版本升级V1.1通知', time: '2023-11-01 13:22:33'},
|
|
|
- {type: 1, title: '日、系统新版本升级V1.1通知', time: '2023-11-01 13:22:33'},
|
|
|
- {type: 1, title: '日、系统新版本升级V1.1通知', time: '2023-11-01 13:22:33'},
|
|
|
- ],
|
|
|
+ loading: false,
|
|
|
+ dailyList: [],
|
|
|
+ weeklyList: [],
|
|
|
sourceType: '1',
|
|
|
showDaily: false,
|
|
|
transferDaily: {},
|
|
|
showWeekly: false,
|
|
|
transferWeekly: {}
|
|
|
})
|
|
|
- const onView = (val) => {
|
|
|
- if (val.type === 1) {
|
|
|
+ const onView = (type, val) => {
|
|
|
+ if (type === 'daily') {
|
|
|
state.transferDaily = {
|
|
|
method: 'view',
|
|
|
detail: val
|
|
@@ -94,6 +96,41 @@ export default defineComponent({
|
|
|
state.showWeekly = true
|
|
|
}
|
|
|
}
|
|
|
+ const initDaily = async () => {
|
|
|
+ await that.$api.getDailyReportList({
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 11,
|
|
|
+ }).then((res: any) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ state.dailyList = res.rows
|
|
|
+ } else {
|
|
|
+ ElMessage.error(res.message)
|
|
|
+ }
|
|
|
+ }).catch(() => {
|
|
|
+ })
|
|
|
+ }
|
|
|
+ const initWeekly = async () => {
|
|
|
+ await that.$api.getWeekReportList({
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 11,
|
|
|
+ }).then((res: any) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ state.weeklyList = res.rows
|
|
|
+ } else {
|
|
|
+ ElMessage.error(res.message)
|
|
|
+ }
|
|
|
+ }).catch(() => {
|
|
|
+ })
|
|
|
+ }
|
|
|
+ onMounted(() => {
|
|
|
+ state.loading = true
|
|
|
+ Promise.all([
|
|
|
+ initDaily(),
|
|
|
+ initWeekly()
|
|
|
+ ]).then(() => {
|
|
|
+ state.loading = false
|
|
|
+ })
|
|
|
+ })
|
|
|
return {
|
|
|
...toRefs(state),
|
|
|
onView
|