riku
2025-04-22 45be153eaef9e1c1a3fe21515e9cbd785fba8e1f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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 });
    },
  },
});