Commit e5e9ed9e by chenwq

refactor(teamWork): 重构团队工作接口,临时隐藏底部导航并调整页面逻辑

- 注释App.vue中的TabBar组件相关代码,临时隐藏底部全局导航
- 合并原有两个接口为getMissionData,替换为统一的工作台数据接口
- 适配teamList页面使用新接口,调整请求参数并临时简化渲染逻辑
1 parent a29122db
...@@ -11,18 +11,18 @@ ...@@ -11,18 +11,18 @@
</transition> </transition>
<!-- 底部全局 TabBar --> <!-- 底部全局 TabBar -->
<tab-bar v-if="$route.meta.showTabBar"></tab-bar> <!-- <tab-bar v-if="$route.meta.showTabBar"></tab-bar> -->
</template> </template>
</div> </div>
</template> </template>
<script> <script>
import TabBar from '@/components/tabBar/index.vue' // import TabBar from '@/components/tabBar/index.vue'
export default { export default {
name: 'App', name: 'App',
components: { // components: {
TabBar // TabBar
}, // },
data() { data() {
return { return {
showWindow: false showWindow: false
......
...@@ -6,11 +6,11 @@ export default { ...@@ -6,11 +6,11 @@ export default {
// return post('dj.api.staff.h5.recruitment.demand.technicalSupervisor.page', data, 'djStaffUrl') // return post('dj.api.staff.h5.recruitment.demand.technicalSupervisor.page', data, 'djStaffUrl')
// } // }
// 获取督导团队概况数据 // 获取督导团队概况数据
getSupervisorStaticData(data) { // getSupervisorStaticData(data) {
return api.post('dj.api.supervisor.mini.get.teamOverview', data, 'supervisorUrl') // return api.post('dj.api.supervisor.mini.get.teamOverview', data, 'supervisorUrl')
}, // },
// 获取任务列表数据 // 获取数据看板和任务列表数据
getMissionList(data) { getMissionData(data) {
return api.post('dj.api.supervisor.mini.page.task', data, 'supervisorUrl') return api.post('dj.api.supervisor.mini.get.workbenchReport', data, 'supervisorUrl')
} }
} }
...@@ -41,64 +41,7 @@ ...@@ -41,64 +41,7 @@
<div class="list" v-if="list.length > 0"> <div class="list" v-if="list.length > 0">
<div class="item content" v-for="(item, index) in list" :key="index"> <div class="item content" v-for="(item, index) in list" :key="index">
<!-- 顶部状态和标题 --> <!-- 顶部状态和标题 -->
<div class="item-top"> 1
<div class="status text-center" :style="{ color: statusMap[item.taskStatus].color, backgroundColor: statusMap[item.taskStatus].background }">
{{statusMap[item.taskStatus].name}}
</div>
<div class="name" v-if="item.taskType != 4">
{{missionMap[item.taskType].name}}
<span v-if="item.taskType == 5">-{{item.storeManagerName || '-'}}</span>
</div>
<div class="name" v-else>{{item.merchantName || '-'}}</div>
</div>
<div v-if="(item.taskType == 0 || item.taskType == 1 || item.taskType == 2) && item.taskStatus == 2" class="list-item">
<img class="icon" :src="IMG_URL + 'task-icon.png'" alt="" />
<div class="label">{{['日报内容:', '复盘内容:', '月度计划:'][item.taskType]}}</div>
<div class="text-hide">{{item.taskContext || '-'}}</div>
</div>
<template v-if="item.taskType == 4">
<div class="list-item">
<img class="icon" :src="IMG_URL + 'matter-icon.png'" alt="" />
<div class="label">事项描述:</div>
<div class="text-hide">{{item.taskDesc || '-'}}</div>
</div>
<div v-if="item.taskStatus == 2" class="list-item">
<img class="icon" :src="IMG_URL + 'task-icon.png'" alt="" />
<div class="label">专项任务:</div>
<div class="text-hide">{{item.taskContext || '-'}}</div>
</div>
<div v-else class="list-item">
<img class="icon" :src="IMG_URL + 'time-icon.png'" alt="" />
<div class="label">创建时间:</div>
<div>{{item.createTime || '-'}}</div>
</div>
</template>
<div v-if="item.taskType != 4 || (item.taskType == 4 && item.taskStatus == 2)" class="list-item">
<img class="icon" :src="IMG_URL + 'time-icon.png'" alt="" />
<div class="label">完成时间:</div>
<div>{{item.updatedDate || '-'}}</div>
</div>
<div v-if="item.taskType == 3" class="list-item">
<div class="progress">
<div class="progress-line"></div>
<div class="progress-item" :style="{ width: (item.audioReviewCompletedCount / item.audioReviewTotalCount * 100) + '%' }"></div>
<div class="num">{{item.audioReviewCompletedCount + '/' + item.audioReviewTotalCount}}</div>
</div>
</div>
<!-- 底部按钮 -->
<div class="btn-box">
<div @click="jump(item)" class="btn" :class="{ 'primary': item.taskStatus != 2 }">
{{item.taskStatus == 2 ? '查看' : '去执行'}}
</div>
</div>
</div> </div>
</div> </div>
...@@ -185,7 +128,7 @@ export default { ...@@ -185,7 +128,7 @@ export default {
}, },
created() { created() {
this.userInfo = (this.$util && this.$util.getUserInfo()) || { name: '' } this.userInfo = (this.$util && this.$util.getUserInfo()) || { name: '' }
this.getStaticData() // this.getStaticData()
this.onRefresh() this.onRefresh()
}, },
methods: { methods: {
...@@ -200,7 +143,7 @@ export default { ...@@ -200,7 +143,7 @@ export default {
return isNeg ? `-${res}` : res return isNeg ? `-${res}` : res
}, },
getStaticData() { getStaticData() {
api.getSupervisorStaticData({}).then(res => { api.getMissionData({}).then(res => {
let { code, data, message } = res let { code, data, message } = res
if (code === 0) { if (code === 0) {
data.staffCount = (data.staffCount ?? '') === '' ? '-' : this.formatThousands(data.staffCount) data.staffCount = (data.staffCount ?? '') === '' ? '-' : this.formatThousands(data.staffCount)
...@@ -262,38 +205,39 @@ export default { ...@@ -262,38 +205,39 @@ export default {
onRefresh() { onRefresh() {
this.finished = false this.finished = false
this.loading = true this.loading = true
this.pageNum = 1 // this.pageNum = 1
this.list = [] this.list = []
this.getList() this.getList()
}, },
onLoadMore() { onLoadMore() {
if (this.finished) return if (this.finished) return
this.pageNum++ // this.pageNum++
this.getList() this.getList()
}, },
getList() { getList() {
const taskList = [[0, 3, 5], [1], [2], [4]] const taskList = [1, 2, 3, 4]
if (this.$toast && this.$toast.loading) { if (this.$toast && this.$toast.loading) {
this.$toast.loading({ duration: 0, forbidClick: true, message: '加载中...' }) this.$toast.loading({ duration: 0, forbidClick: true, message: '加载中...' })
} }
let params = { const params = {
taskTypeList: taskList[this.tabIndex], reportType: taskList[this.tabIndex],
startDate: this.startStr, startDate: this.startStr,
endDate: this.endStr, endDate: this.endStr,
pageNum: this.pageNum, // pageNum: this.pageNum,
pageSize: 10, // pageSize: 10,
keyword: this.searchKeyword keyword: this.searchKeyword
} }
api.getMissionList(params).then(res => { api.getMissionData(params).then(res => {
this.loading = false this.loading = false
this.refreshing = false this.refreshing = false
if (this.$toast && this.$toast.clear) { if (this.$toast && this.$toast.clear) {
this.$toast.clear() this.$toast.clear()
} }
let { code, data, message } = res console.log(res, 'res-----')
const { code, data, message } = res
if (code === 0) { if (code === 0) {
const newList = data?.list || [] const newList = data?.list || []
newList.forEach(val => { newList.forEach(val => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!