import dayjs from 'dayjs';
|
import dataResponseLevel from '../../../common/clue/dataResponseLevel';
|
import dataTravelMode from '../../../common/clue/dataTravelMode';
|
|
/**
|
* 线索任务列表展示相关逻辑
|
*/
|
export const useTasks = Behavior({
|
data: {},
|
methods: {
|
/**
|
* 格式化
|
*/
|
formatClueTask() {
|
const { clueTaskList } = this.data;
|
clueTaskList.forEach(t => {
|
t._taskTime = dayjs(t.taskTime).format('YYYY-MM-DD')
|
let note = '';
|
note += t.provinceName ? t.provinceName : '';
|
note += t.provinceName == t.cityName ? '' : t.cityName ? `/${t.cityName}` : '';
|
note += t.districtName ? `/${t.districtName}` : '';
|
note += t.townName ? `/${t.townName}` : '';
|
t._location = note;
|
t._resLevelTxt = dataResponseLevel.toLabel2(t.responseLevel);
|
t._travelModeTxt = dataTravelMode.toLabel2(t.travelMode);
|
t._hasUavTxt = t.hasUav ? '有' : '无';
|
});
|
this.setData({ clueTaskList });
|
},
|
},
|
});
|