Commit 2da652bc by chenwq

feat: 新增团队工作台业务模块及相关依赖

详细变更如下:
- 新增团队工作台页面,包含概览数据、任务列表、多维度筛选功能
- 新增日期筛选组件date-screen(含小程序和Web两种实现),支持日/周/月三种时间维度选择
- 新建接口请求封装工具、基础接口文件和团队工作台专属API
- 重构路由配置:移除废弃的PC路由和移动端首页,修改默认重定向路径为团队工作台
- 更新ESLint配置,关闭indent和template-curly-spacing规则
- 调整PostCSS视口转换配置,仅排除node_modules目录
- 简化登录逻辑,注释废弃的登录校验代码
- 清理部分老旧无用的代码文件
1 parent db2c081d
......@@ -66,13 +66,7 @@ module.exports = {
}
],
'handle-callback-err': [2, '^(err|error)$'],
indent: [
2,
2,
{
SwitchCase: 1
}
],
indent: 'off',
'jsx-quotes': [2, 'prefer-single'],
'key-spacing': [
2,
......@@ -241,7 +235,7 @@ module.exports = {
markers: ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
}
],
'template-curly-spacing': [2, 'never'],
'template-curly-spacing': 'off',
'use-isnan': 2,
'valid-typeof': 2,
'wrap-iife': [2, 'any'],
......
......@@ -12,14 +12,11 @@ module.exports = ({file}) => {
viewportWidth: 375, // 视窗的宽度,对应的是我们设计稿的宽度,一般是750
unitPrecision: 3, // 指定`px`转换为视窗单位值的小数位数(很多时候无法整除)
viewportUnit: 'vw', // 指定需要转换成的视窗单位,建议使用vw
selectorBlackList: ['.ignore', '.hairlines', 'ign-','pc-'], // 指定不转换为视窗单位的类,可以自定义,可以无限添加,建议定义一至两个通用的类名
selectorBlackList: ['.ignore', '.hairlines', 'ign-', 'pc-'], // 指定不转换为视窗单位的类,可以自定义,可以无限添加,建议定义一至两个通用的类名
minPixelValue: 1, // 小于或等于`1px`不转换为视窗单位,你也可以设置为你想要的值
mediaQuery: false, // 允许在媒体查询中转换`px`
exclude: [
/node_modules/,
/src\/views\/pc/,
],
exclude: [/node_modules/]
}
}
}
......
import api from './request'
export default {
// 获取周数据
getWeekSelectData(data) {
return api.post('dj.api.supervisor.mini.get.generateWeeklyRanges', data, 'supervisorUrl')
}
}
import { util } from 'utils'
const urlObj = {
djStaffUrl: '/rop-dj-staff-miniprogram/router',
supervisorUrl: '/rop-dj-supervisor-mini/router'
}
/**
* 通用的 POST 请求方法
* 封装了针对特定业务格式的数据提交
*
* @param {String} method - 接口调用的 method 参数
* @param {Object} data - 请求负载数据
* @param {String} url - 请求的 URL 地址
* @param {Object} options - 额外的请求配置项
* @returns {Promise}
*/
function post(method, data = {}, url = 'djStaffUrl', options = {}) {
// 合并 method 到 data 中,适应后端要求的格式
const payload = {
method,
// technicalSupervisorName: util.getLocalStorage('ww_params_name') || '', // 技术督导姓名
// technicalSupervisorPhone: util.getLocalStorage('ww_params_phone') || '', // 技术督导手机号
// sessionId: '8bcad25d-8bfa-41a8-a5e8-ef06ace89ee8',
...data
}
return window.$DJ_HTTP({
url: urlObj[url],
data: payload,
...options
})
}
export default {
post
}
const ssoUrl = '/rop-scrm-sso/router',
biUrl = 'rop-dj-pe-analysis/router'
biUrl = 'rop-dj-pe-analysis/router'
export default {
login (data = {}) {
login(data = {}) {
data.method = 'scrm.api.sso.ww.bioauth.login'
data.productCode = 'PC00025'
return window.$SCRM_HTTP({
......@@ -11,11 +11,11 @@ export default {
returnAll: true
})
},
loginByPhone(data = {}){
loginByPhone(data = {}) {
data.method = 'dj.api.smartcarlife.peAnalysis.loginByPhone'
return window.$DJ_HTTP({
url: biUrl,
data,
data
// returnAll: true
})
}
......
import api from './request'
export default {
// 获取招聘管理列表数据
// getRecruitList(data) {
// return post('dj.api.staff.h5.recruitment.demand.technicalSupervisor.page', data, 'djStaffUrl')
// }
// 获取督导团队概况数据
getSupervisorStaticData(data) {
return api.post('dj.api.supervisor.mini.get.teamOverview', data, 'supervisorUrl')
},
// 获取任务列表数据
getMissionList(data) {
return api.post('dj.api.supervisor.mini.page.task', data, 'supervisorUrl')
}
}
{
"component": true,
"usingComponents": {
"van-icon": "@vant/weapp/icon/index",
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
"van-calendar": "@vant/weapp/calendar/index",
"van-picker": "@vant/weapp/picker/index"
}
}
\ No newline at end of file
/* components/dateScreen/dateScreen.wxss */
.date-screen {
display: flex;
align-items: center;
justify-content: center;
.tab-section {
box-sizing: border-box;
width: 278rpx;
height: 56rpx;
display: flex;
align-items: center;
background: #FFFFFF;
border-radius: 56rpx;
font-size: 26rpx;
color: #999999;
padding: 4rpx;
&.isSticky {
background: #F7F8FA;
}
.tab {
flex: 1;
text-align: center;
height: 48rpx;
line-height: 48rpx;
border-radius: 48rpx;
&.active{
color: #2C66F7;
font-weight: 500;
background: #2c66f71a;
}
}
}
.date-section {
box-sizing: border-box;
height: 56rpx;
flex: 1;
max-width: calc(100% - 278rpx);
display: flex;
align-items: center;
justify-content: space-around;
.date-text {
font-size: 26rpx;
text-align: center;
width: 320rpx;
flex-shrink: 0;
}
.arrow {
width: 32rpx;
}
}
}
\ No newline at end of file
<!--components/dateScreen/dateScreen.wxml-->
<view class="date-screen">
<view class="tab-section {{isSticky ? 'isSticky' : ''}}" style="background: {{customBackground}};" wx:if="{{!tabSelected || tabSelected == 3}}">
<block wx:for="{{dateList}}" wx:key="index">
<view class="tab {{item.index==dateCurrent?'active':''}}" data-index="{{item.index}}" bind:tap="selectDate">{{item.title}}</view>
</block>
</view>
<view class="date-section">
<view class="arrow left">
<van-icon wx:if="{{!leftCurrent}}" class="arrow-left" name="arrow-left" bind:tap="last" />
</view>
<view class="date-text" bind:tap="onDisplayDate">{{date}}</view>
<view class="arrow right">
<van-icon wx:if="{{!rightCurrent}}" class="arrow-right" name="arrow" bind:tap="next" />
</view>
</view>
</view>
<!-- 年月日 -->
<block wx:if="{{dateShow}}">
<popup bindcancel="cancel" bindconfirm="confirm" show="{{dateShow}}" title="{{titleEnum[timeType]}}" height="60vh">
<block wx:if="{{timeType == 'date' || timeType == 'year-month'}}">
<van-datetime-picker id="datePicker" show-toolbar="{{false}}" min-date="{{ minDate }}" max-date="{{ maxDate }}" model:value="{{ currentDate }}" type="{{timeType=='date'?'date':'year-month'}}" bind:change="onChange" bind:input="onInput" />
</block>
<!-- 周 -->
<block wx:if="{{timeType == 'week'}}">
<van-picker id="weekPicker" show-toolbar="{{false}}" model:value="{{ currentDate }}" default-index="{{defaultIndex}}" value-key="label" columns="{{ weekColumns }}" bind:change="onWeekChange" />
</block>
</popup>
</block>
<block wx:if="{{show}}">
<van-calendar
id="calendar"
max-range="{{ 31 }}"
min-date="{{ minDate }}"
max-date="{{ maxDate }}"
show="{{ show }}"
type="range"
color="#2C66F7"
bind:confirm="onConfirm"
bind:close="onClose"
/>
</block>
export const mobilePages = {
mobile: [
teamWork: [
{
name: 'index'
}
],
recruitManage: [
{
name: 'recruitManage/recruitManage',
path: '/recruitManage/recruitManage',
meta: {
title: '招聘管理'
}
},
{
name: 'recruitInsert/recruitInsert',
path: '/recruitManage/recruitInsert',
meta: {
title: '添加招聘需求'
}
},
{
name: 'recruitDetail/recruitDetail',
path: '/recruitManage/recruitDetail',
meta: {
title: '招聘详情'
}
},
{
name: 'recruitResult/recruitResult',
path: '/recruitManage/recruitResult',
meta: {
title: '提交成功'
}
},
{
name: 'recruitmentReview/recruitmentReview',
path: '/recruitManage/recruitmentReview',
name: 'teamWork/teamList',
path: '/teamWork/teamList',
meta: {
title: '招聘审核'
title: '团队工作台'
}
}
]
// recruitManage: [
// {
// name: 'recruitManage/recruitManage',
// path: '/recruitManage/recruitManage',
// meta: {
// title: '团队工作台'
// }
// },
// {
// name: 'recruitInsert/recruitInsert',
// path: '/recruitManage/recruitInsert',
// meta: {
// title: '添加招聘需求'
// }
// },
// {
// name: 'recruitDetail/recruitDetail',
// path: '/recruitManage/recruitDetail',
// meta: {
// title: '招聘详情'
// }
// },
// {
// name: 'recruitResult/recruitResult',
// path: '/recruitManage/recruitResult',
// meta: {
// title: '提交成功'
// }
// },
// {
// name: 'recruitmentReview/recruitmentReview',
// path: '/recruitManage/recruitmentReview',
// meta: {
// title: '招聘审核'
// }
// }
// ]
}
export const pcPages = {
pc: [
{
name: 'index'
}
]
}
\ No newline at end of file
import { mobilePages } from './mobile'
import { pcPages } from './pc'
const keepAlives = []
// 合并所有页面配置
const pages = { ...mobilePages, ...pcPages }
const pages = { ...mobilePages }
let routes = [
{
path: '/',
redirect: '/recruitManage/recruitManage' // 默认重定向到 mobile,或者根据需求改为其他
redirect: '/teamWork/teamList' // 默认重定向到 mobile,或者根据需求改为其他
}
]
Object.keys(pages).map(parent => {
pages[parent].map(val => {
let childrenPath = `${parent}/${val.name}`
console.log(childrenPath)
let { meta } = val
const path = val.path || `/${val.name == 'index' ? parent : childrenPath}`
const name = val.name == 'index' ? parent : val.name
......
......@@ -36,36 +36,44 @@ const actions = {
paramsPhone = util.getLocalStorage('ww_params_phone'),
{ loginUrl } = window.$fetchConfig
if (wwCode) {
const { code, data, message } = await ssoApi.login({
code: wwCode,
corpId,
getUserInfoFlag: false
})
if (code == 0) {
if (data.loginList && data.loginList.length) {
let [item] = data.loginList
if (item.loginList && item.loginList.length) {
let [userInfo] = item.loginList,
{ phone } = userInfo
if (paramsPhone == phone) {
// const res = await ssoApi.loginByPhone({
// phone,
// })
// if (res) {
let route = state.lastPath || '',
[jumpUrl] = window.location.href.split('/#/')
route = route.replace('.', '/')
util.setLocalStorage('ww_userInfo', userInfo)
// util.setSessionId(res.sessionId)
// dispatch('registerHttp', res.sessionId)
state.showWindow = true
console.log(jumpUrl)
window.location.replace(`${jumpUrl}/#/${route}`)
// } else throw ''
} else throw '手机号不一致'
} else throw ''
} else throw ''
} else throw message
let route = state.lastPath || ''
let [jumpUrl] = window.location.href.split('/#/')
route = route.replace('.', '/')
// util.setLocalStorage('ww_userInfo', userInfo)
// util.setSessionId(res.sessionId)
// dispatch('registerHttp', res.sessionId)
state.showWindow = true
window.location.replace(`${jumpUrl}/#/${route}`)
// const { code, data, message } = await ssoApi.login({
// code: wwCode,
// corpId,
// getUserInfoFlag: false
// })
// if (code == 0) {
// if (data.loginList && data.loginList.length) {
// let [item] = data.loginList
// if (item.loginList && item.loginList.length) {
// let [userInfo] = item.loginList,
// { phone } = userInfo
// if (paramsPhone == phone) {
// // const res = await ssoApi.loginByPhone({
// // phone,
// // })
// // if (res) {
// let route = state.lastPath || '',
// [jumpUrl] = window.location.href.split('/#/')
// route = route.replace('.', '/')
// util.setLocalStorage('ww_userInfo', userInfo)
// // util.setSessionId(res.sessionId)
// // dispatch('registerHttp', res.sessionId)
// state.showWindow = true
// console.log(jumpUrl)
// window.location.replace(`${jumpUrl}/#/${route}`)
// // } else throw ''
// } else throw '手机号不一致'
// } else throw ''
// } else throw ''
// } else throw message
} else window.location.href = `${loginUrl}?redirect_uri=${encodeURIComponent(window.location.href)}&corpId=${corpId}&agentId=${agentId}&backLoginCode=BACKCODE`
} catch (error) {
if (!error) error = '登录失败或无权限'
......
<template>
<div class="layout">
这个是移动端首页
</div>
</template>
<script type='text/ecmascript-6'>
export default {
name: '',
data () {
return {
}
},
mounted () {
},
methods: {
}
}
</script>
<style scoped lang='scss'>
</style>
\ No newline at end of file
import api from '~/api/index/index'
import dayjs from 'dayjs'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/'
Page({
/**
* 页面的初始数据
*/
data: {
IMG_URL,
navBarHeight: 84,
navStyle: 'background-color: rgba(0,0,0,0);',
navTitleStyle: 'font-weight: 600; font- size: 32rpx; color: #000;',
userInfo: {},
staticList: [{
label: '驻店人员',
width: '208',
key: 'staffCount',
background: 'linear-gradient(90deg, #42CCCF 0%, #36D9A5 100%)'
}, {
label: '门店数量',
width: '192',
key: 'shopCount',
background: 'linear-gradient(90deg, #5E69FF 0%, #4079FF 100%)'
}, {
label: '总产值',
key: 'totalValue',
background: 'linear-gradient(90deg, #3D76FC 0%, #4DA6FF 100%)'
}],
tabList: [{
text: '每日任务'
}, {
text: '本周任务'
}, {
text: '月度任务'
}, {
text: '专项任务'
}],
tabIndex: 0,
statusMap: {
0: {name: '待完成', color: '#2C66F7', background: '#2c66f71a'},
1: {name: '进行中', color: '#FF9D0A', background: '#ff9d0a1a'},
2: {name: '已完成', color: '#35C376', background: '#35c3761a'},
},
missionMap: {
3: {name: '录音复盘'},
5: {name: '人员带教'},
0: {name: '督导日报'},
1: {name: '本周复盘'},
2: {name: '督导月度计划'},
4: {name: '专项任务'},
},
list: [],
scrollTop: 0
},
onTabItemTap(e) {
// 点击埋点
wx.$track.setTrackData(0, 'supervisor_index_page', {}, '')
},
navbarReady(e) {
let navBarHeight = e.detail.height
this.setData({
navBarHeight
})
},
onScroll(e) {
this.setData({
scrollTop: e.detail.scrollTop
})
const {navBarHeight} = this.data
const query = wx.createSelectorQuery().in(this)
query.select('.data-container').boundingClientRect()
query.exec(res => {
this.setData({
isSticky: res[0].top <= navBarHeight
})
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let userInfo = wx.$util.getUserInfo()
this.setData({userInfo})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow () {
this.getStaticData()
this.setData({
list: [],
pageNum: 1,
flag: false,
nothing: false
}, () => {
this.getList(true)
})
},
formatThousands (v) {
const s = String(v)
if (!s) return s
const isNeg = s[0] === '-'
const raw = isNeg ? s.slice(1) : s
const [intPart, decPart] = raw.split('.')
const intFmt = String(intPart || '0').replace(/\B(?=(\d{3})+(?!\d))/g, ',')
const res = decPart ? `${intFmt}.${decPart}` : intFmt
return isNeg ? `-${res}` : res
},
getStaticData() {
api.getSupervisorStaticData({}).then(res => {
let { code, data, message } = res
if (code == 0) {
data.staffCount = (data.staffCount ?? '') === '' ? '-' : this.formatThousands(data.staffCount)
data.shopCount = (data.shopCount ?? '') === '' ? '-' : this.formatThousands(data.shopCount)
data.totalValue = (data.totalValue ?? '') === '' ? '-' : this.formatThousands(data.totalValue)
this.setData({staticData: data})
} else {
wx.$util.showToast(message)
}
})
},
tabClick(e) {
let eventCode = ['supervisor_dayTask_tab', 'supervisor_weeklyTask_tab', 'supervisor_monthlyTask_tab', 'supervisor_specificTask_tab']
// 点击埋点
wx.$track.setTrackData(0, eventCode[e.detail], {}, '')
this.setData({
tabIndex: e.detail
})
},
jump(e) {
const { target } = e.currentTarget.dataset
const pageUrl = {
3: '/packageIndex/pages/recordingReview/recordingReview',
5: '/packageCrew/pages/mentoring/mentoring',
0: '/packageIndex/pages/dailySupervisionReport/dailySupervisionReport',
1: '/packageIndex/pages/weeklyReview/weeklyReview',
2: '/packageIndex/pages/monthlyPlan/monthlyPlan',
4: '/packageIndex/pages/specialTask/specialTask'
}
const eventCode = {
3: {view: 'supervisor_recording_view', execute: 'supervisor_recording_execute'},
5: {view: 'supervisor_mentoring_view', execute: 'supervisor_mentoring_execute'},
0: {view: 'supervisor_report_view', execute: 'supervisor_report_execute'},
1: {view: 'supervisor_weeklyReview_view', execute: 'supervisor_weeklyReview_execute'},
2: {view: 'supervisor_monthlyPlan_view', execute: 'supervisor_monthlyPlan_execute'},
4: {view: 'supervisor_specificTask_view', execute: 'supervisor_specificTask_execute'},
}
let status = target.taskStatus != 2 ? 'execute' : 'view'
console.log(eventCode[target.taskType][status])
wx.$track.setTrackData(0, eventCode[target.taskType][status], {}, '')
wx.navigateTo({
url: `${pageUrl[target.taskType]}?taskStatus=${target.taskStatus}&id=${target.id}`,
})
},
search(e) {
this.setData({
list: [],
pageNum: 1,
flag: false,
nothing: false,
startStr: e.detail.startDay?.replace(/\//g, '-'),
endStr: e.detail.endDay?.replace(/\//g, '-')
}, () => {
this.getList(true)
})
},
scrollonReachBottom() {
this.getList()
},
// 获取列表数据
getList(repload) {
let { pageNum, nothing, startStr, endStr, tabIndex, topBoxHeight, scrollTop } = this.data
if (nothing) return
const taskList = [[0, 3, 5], [1], [2], [4]]
wx.$util.showLoading()
let params = {
taskTypeList: taskList[tabIndex],
startDate: startStr,
endDate: endStr,
pageNum,
pageSize: 10
}
api.getMissionList(params).then(res => {
wx.$util.hideLoading()
let total = 0
let list = []
let {
code,
data,
message
} = res
data?.list?.forEach(val => {
val.updatedDate = val.updatedDate ? dayjs(val.updatedDate).format('YYYY-MM-DD HH:mm:ss') : ''
val.createTime = val.createTime ? dayjs(val.createTime).format('YYYY-MM-DD HH:mm:ss') : ''
})
if (code == 0) {
list = data.list
total = data.total
} else {
wx.$util.showToast(message)
}
if (total != 0) {
this.setData({
[`list[${pageNum - 1}]`]: list
})
}
// if (repload) {
// const query = wx.createSelectorQuery().in(this)
// query.select('.top-box').boundingClientRect()
// query.exec(res => {
// let topBoxHeight = res[0].height
// if (scrollTop >= topBoxHeight) {
// setTimeout(() => {
// this.setData({
// setScrollTop: topBoxHeight
// })
// }, 200)
// }
// })
// }
this.setData({
total,
flag: true,
triggered: false,
pageNum: pageNum + 1,
nothing: pageNum == data?.pages
})
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {},
onShareTimeline: function () {}
})
{
"navigationStyle": "custom",
"usingComponents": {
"date-screen": "/components/dateScreen/dateScreen",
"van-icon": "@vant/weapp/icon/index"
}
}
page {
background: #F2F3F7;
}
.page-title {
font-size: var(--fontSize34);
color: #222222;
font-weight: 600;
}
.bg {
width: 100%;
height: var(--fontSize480);
background: url('https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/page-bg.png') no-repeat;
background-size: 100% var(--fontSize480);
position: fixed;
left: 0;
top: 0;
z-index: -1;
}
.container {
height: 100vh;
box-sizing: border-box;
.user-info {
padding: 8rpx 40rpx;
display: flex;
align-items: center;
font-size: 32rpx;
color: #222222;
font-weight: 500;
image {
flex-shrink: 0;
width: 56rpx;
height: 56rpx;
border-radius: 50%;
overflow: hidden;
margin-right: 16rpx;
}
}
.static-info {
display: flex;
align-items: center;
gap: 6rpx;
padding: 16rpx 24rpx 24rpx;
.static-item {
box-sizing: border-box;
padding: 24rpx;
flex: 1;
border-radius: 16rpx;
font-size: 28rpx;
color: #FFFFFF;
.label {
margin-bottom: 8rpx;
}
.value {
font-size: 40rpx;
font-family: 'numberBold';
}
}
}
.date {
padding: 16rpx 24rpx;
}
.data-container {
.sticky-box {
position: sticky;
top: 0;
z-index: 100;
&.is-sticky {
.tab-box {
background: #FFFFFF;
}
.date {
background: #FFFFFF;
}
}
}
.number {
height: 30rpx;
font-size: 24rpx;
color: #999999;
background: #F2F3F7;
padding: 16rpx 24rpx;
}
.content-box {
padding: 0 24rpx;
box-sizing: border-box;
.list {
.item {
border-radius: 12px;
background: #FFFFFF;
padding: 24rpx;
margin-bottom: 24rpx;
&:last-child{
margin-bottom: 0;
}
.item-top {
display: flex;
align-items: center;
.status {
font-size: 22rpx;
padding: 8rpx 12rpx;
border-radius: 8rpx;
}
.name {
margin-left: 12rpx;
font-size: 28rpx;
font-weight: 500;
color: #222222;
}
}
.list-item {
margin: 24rpx 0;
display: flex;
align-items: center;
font-size: 24rpx;
color: #999999;
.label{
flex-shrink: 0;
}
.icon {
margin-right: 8rpx;
width: 32rpx;
height: 32rpx;
flex-shrink: 0;
}
.break-all {
width: calc(100% - 170rpx);
display: inline-block;
word-break: break-all;
}
.progress {
display: flex;
align-items: center;
justify-content: space-between;
position: relative;
width: 100%;
.progress-line {
width: calc(100% - 82rpx);
height: 12rpx;
border-radius: 12rpx;
opacity: 1;
background: #f2f3f7;
}
.progress-item {
position: absolute;
top: 50%;
transform: translateY(-50%);
height: 12rpx;
border-radius: 12rpx;
background: linear-gradient(270deg, #3d76fc 0%, #4da6ff 100%);
max-width: calc(100% - 82rpx);
}
.num {
font-size: 24rpx;
color: #999999;
}
}
}
.btn-box {
display: flex;
justify-content: flex-end;
.btn {
width: 144rpx;
box-sizing: border-box;
text-align: center;
padding: 12rpx 0;
border-radius: 60rpx;
opacity: 1;
border: 1rpx solid #2c66f780;
color: #2C66F7;
font-size: 26rpx;
font-weight: 500;
&.primary {
background: #2c66f71a;
border: none;
}
}
}
}
}
}
}
}
\ No newline at end of file
<!--pages/tab/index/index.wxml-->
<navigation-bar bindnavbarReady="navbarReady"
class="navigation-header"
navStyle="background-color:{{isSticky ? '#FFFFFF' : 'transparent'}};box-shadow:none;">
<view class="page-title">
工作台
</view>
</navigation-bar>
<view class="bg" wx:if="{{!isSticky}}"></view>
<scroll-view class="container" scroll-y enable-back-to-top
scroll-top="{{setScrollTop}}"
bind:scroll="onScroll"
bindrefresherrefresh="search"
bindscrolltolower="scrollonReachBottom"
enhanced="{{true}}"
show-scrollbar="{{false}}" style="padding-top: {{navBarHeight}}px;">
<view class="top-box">
<view class="user-info">
<image src="{{IMG_URL}}default-avatar.png" />
<view>督导{{userInfo.name}}</view>
</view>
<view class="static-info">
<view class="static-item" style="flex: {{item.width}}rpx 0 0;background: {{item.background}};" wx:for="{{staticList}}" wx:key="index">
<view class="label">{{item.label}}</view>
<view class="value">{{staticData[item.key]}}</view>
</view>
</view>
</view>
<view class="data-container">
<view class="sticky-box {{isSticky ? 'is-sticky' : ''}}">
<view class="tab-box">
<tab-bar tabList="{{ tabList }}" bindclick="tabClick" activeIndex="{{ tabIndex }}" />
</view>
<view class="date">
<date-screen tabSelected="{{tabIndex}}" isSticky="{{isSticky}}" bind:search="search"></date-screen>
</view>
<view class="number">共{{total || 0}}条任务</view>
</view>
<view class="content-box">
<view class="list">
<block wx:if="{{ list.length > 0 }}">
<block wx:for="{{ list }}" wx:for-item="val" wx:for-index="sIndex" wx:key="sIndex">
<block wx:for="{{val}}" wx:key="index">
<view class="item content">
<!-- 顶部状态和标题 -->
<view class="item-top">
<view
class="status text-center"
style="color: {{statusMap[item.taskStatus].color}}; background-color: {{statusMap[item.taskStatus].background}};"
>
{{statusMap[item.taskStatus].name}}
</view>
<view class="name" wx:if="{{item.taskType != 4}}">
{{missionMap[item.taskType].name}}
<text wx:if="{{item.taskType == 5}}">-{{item.storeManagerName || '-'}}</text>
</view>
<view class="name" wx:else>{{item.merchantName || '-'}}</view>
</view>
<view wx:if="{{(item.taskType == 0 || item.taskType == 1 || item.taskType == 2) && item.taskStatus == 2}}" class="list-item">
<image class="icon" src="{{IMG_URL}}task-icon.png" mode="" />
<view class="label">{{['日报内容:', '复盘内容:', '月度计划:'][item.taskType]}}</view>
<view class="text-hide">{{item.taskContext || '-'}}</view>
</view>
<block wx:if="{{item.taskType == 4}}">
<view class="list-item">
<image class="icon" src="{{IMG_URL}}matter-icon.png" mode="" />
<view class="label">事项描述:</view>
<view class="text-hide">{{item.taskDesc || '-'}}</view>
</view>
<view wx:if="{{item.taskStatus == 2}}" class="list-item">
<image class="icon" src="{{IMG_URL}}task-icon.png" mode="" />
<view class="label">专项任务:</view>
<view class="text-hide">{{item.taskContext || '-'}}</view>
</view>
<view wx:else class="list-item">
<image class="icon" src="{{IMG_URL}}time-icon.png" mode="" />
<view class="label">创建时间:</view>
<view>{{item.createTime || '-'}}</view>
</view>
</block>
<view wx:if="{{item.taskType != 4 || (item.taskType == 4 && item.taskStatus == 2)}}" class="list-item">
<image class="icon" src="{{IMG_URL}}time-icon.png" mode="" />
<view class="label">完成时间:</view>
<view>{{item.updatedDate || '-'}}</view>
</view>
<view wx:if="{{item.taskType == 3}}" class="list-item">
<view class="progress">
<view class="progress-line"></view>
<view
class="progress-item"
style="width: {{ (item.audioReviewCompletedCount / item.audioReviewTotalCount * 100) + '%' }}"
></view>
<view class="num">{{item.audioReviewCompletedCount + '/' + item.audioReviewTotalCount}}</view>
</view>
</view>
<!-- 底部按钮 -->
<view class="btn-box">
<view
bindtap="jump"
data-target="{{item}}"
class="btn {{item.taskStatus == 2 ? '' : 'primary'}}"
>
{{item.taskStatus == 2 ? '查看' : '去执行'}}
</view>
</view>
</view>
</block>
</block>
<block wx:if="{{ nothing }}">
<view class="list-nothing">到底了~</view>
</block>
</block>
<block wx:else>
<empty-data />
</block>
</view>
</view>
</view>
</scroll-view>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!