无人机管理后台前端(已迁走)
chenyao
2025-11-17 233e4fc4f35bd00a36ee34a7fbf5e47b41db26db
src/views/wel/components/backlog.vue
@@ -30,9 +30,10 @@
            </div>
            <div class="action-area">
              <!-- <img :src="st7" alt="" /> -->
              <!-- <span class="todo-date">{{ item.date?.slice(0, 10).replace(/-/g, '.') }}</span> -->
          <span class="todo-date">{{ item.name }}</span>
          <!-- <span class="todo-date">{{ item.name }}</span> -->
          <el-tooltip effect="dark" :content="item.name" placement="top">
            <span class="todo-date">{{item.name}}</span>
          </el-tooltip>
            </div>
          </div>
        </div>
@@ -59,7 +60,9 @@
import { onMounted } from 'vue'
import { useRouter } from 'vue-router'
import { useStore } from 'vuex'
const userInfo = computed(() => store.getters.userInfo)
const todos = ref([])
const loading = ref(false)
const router = useRouter()
const store = useStore()
const permission = computed(() => store.getters.permission)
@@ -82,12 +85,11 @@
])
const titleClick = async (item, index) => {
todos.value =[]
  checked.value = item.name
  await getListMatter()
}
const userInfo = computed(() => store.getters.userInfo)
const todos = ref([])
const loading = ref(false)
// * 事件工单中2=待审核,0=待处理,3=处理中
// * 智飞工单中1: 待审核,2=已驳回,3=已通过
const statusMap = {
@@ -110,16 +112,7 @@
  2: { color: '#4200DD', backgroundImage: db5, borderLeftColor: '#4200DD' },
  3: { color: '#FF472F', backgroundImage: db2, borderLeftColor: '#FF472F' },
}
// 根据状态获取图标
// const getStatusBackground = statusIndex => {
//   if (checked.value === '智飞工单') {
//     const style = zfstatusMapColor[statusIndex];
//     return style ? `url(${style.backgroundImage})` : 'none';
//   } else {
//     const style = statusMapColor[statusIndex];
//     return style ? `url(${style.backgroundImage})` : 'none';
//   }
// };
const getStatus = statusIndex => {
  if (checked.value === '智飞工单') {
    const style = zfstatusMapColor[statusIndex]
@@ -163,7 +156,7 @@
  if (checked.value === '智飞工单') {
    const id = val.id
    getaddOrderRecord(id)
    router.push({
    router.replace({
      path: `/tickets/orderLog`,
      query: {
        id,
@@ -172,12 +165,10 @@
  } else {
    getaddOrderRecord(val.id)
    const orderNumber = val.event_num
    router.push({
      path: `/tickets/ticket`,
      query: {
        orderNumber,
      },
    })
    router.replace({
    path: `/tickets/ticket`,
    query: { orderNumber },
})
  }
}
// 标记事件工单或智飞工单已读
@@ -222,8 +213,8 @@
  try {
    const res = await getOrderOrEventApi(todosParams)
    const data = res.data.data || []
    todos.value = data
    todosCache[checked.value] = data
    todos.value = data.sort((a, b) => a.is_read - b.is_read)
    todosCache[checked.value] = todos.value
  } finally {
    loading.value = false
  }
@@ -408,7 +399,7 @@
      .action-area {
        display: flex;
        align-items: center;
        margin-right: 42px;
        margin-right: 22px;
        img {
          width: 15px;
@@ -417,9 +408,14 @@
        .todo-date {
          font-weight: 400;
        font-size: 14px;
color: #343434;
          margin-left: 2px;
      font-size: 14px;
      color: #343434;
      margin-left: 2px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 200px;
      display: inline-block;
        }
      }
    }