Commit 318dc872 by chenwq

refactor(teamWork): 替换专项任务页面默认van图标为自定义静态图标

- 提取BASE_IMG_URL常量统一管理静态图片基础路径
- 简化配置项中的箭头函数,移除多余的参数括号
- 更新专项任务详情页适配自定义图标资源
1 parent 79505a8a
......@@ -101,29 +101,33 @@ export const DETAIL_CONFIG_MAP = {
]
}
// 静态图片基础路径
export const BASE_IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/supervise-wecom/'
// 专项任务卡片配置
export const SPECIAL_TASK_CARD_CONFIG = [
{
icon: 'orders-o',
icon: BASE_IMG_URL + 'matter-icon.png',
getLabel: () => '事项描述:',
getValue: (task) => task.taskDesc,
isShow: (task) => !!task.taskDesc
getValue: task => task.taskDesc,
isShow: task => !!task.taskDesc
},
{
icon: 'passed',
icon: BASE_IMG_URL + 'task-icon.png',
getLabel: () => '专项任务:',
getValue: (task) => task.taskContext,
isShow: (task) => task.taskStatus === 2 && !!task.taskContext
getValue: task => task.taskContext,
isShow: task => task.taskStatus === 2 && !!task.taskContext
},
{
icon: 'clock-o',
getLabel: (task) => task.taskStatus === 2 ? '完成时间:' : '创建时间:',
getValue: (task) => task.taskStatus === 2 ? task.updatedDate : task.createTime,
isShow: (task) => !!(task.taskStatus === 2 ? task.updatedDate : task.createTime)
icon: BASE_IMG_URL + 'time-icon.png',
getLabel: task => (task.taskStatus === 2 ? '完成时间:' : '创建时间:'),
getValue: task => (task.taskStatus === 2 ? task.updatedDate : task.createTime),
isShow: task => !!(task.taskStatus === 2 ? task.updatedDate : task.createTime)
}
]
export default {
BASE_IMG_URL,
STATIC_CARD_MAP,
TAB_LIST,
COMPLETION_STATUS_MAP,
......
......@@ -13,14 +13,14 @@
<div class="card-body">
<div class="info-row" v-if="task.taskDesc">
<van-icon name="orders-o" class="icon" />
<van-icon :name="imgBaseUrl + 'matter-icon.png'" class="icon" />
<div class="content-wrapper">
<span class="label">事项描述:</span>
<span class="value">{{ task.taskDesc }}</span>
</div>
</div>
<div class="info-row" v-if="task.taskStatus === 2 ? task.updatedDate : task.createTime">
<van-icon name="clock-o" class="icon" />
<van-icon :name="imgBaseUrl + 'time-icon.png'" class="icon" />
<div class="content-wrapper">
<span class="label">{{ task.taskStatus === 2 ? '完成时间:' : '创建时间:' }}</span>
<span class="value">{{ task.taskStatus === 2 ? task.updatedDate : task.createTime }}</span>
......@@ -46,7 +46,8 @@ export default {
name: 'SpecialTaskDetail',
data() {
return {
task: {}
task: {},
imgBaseUrl: constantData.BASE_IMG_URL
}
},
created() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!