| | |
| | | :key="index" |
| | | class="todo-item" |
| | | :class="`status-${item.status}`" |
| | | @click="jumporder()" |
| | | @click="jumporder(item)" |
| | | > |
| | | <div class="status-indicator"></div> |
| | | |
| | | <div class="content-wrapper"> |
| | | <div class="main-content"> |
| | | <span class="status-tag">{{ statusMap[item.status] }}</span> |
| | | <span class="todo-text">{{ item.event_name }}</span> |
| | | <span class="todo-text">{{ item.event_name || item.dept_name}}</span> |
| | | </div> |
| | | |
| | | <div class="action-area"> |
| | | <img :src="st7" alt="" /> |
| | | <span class="todo-date">{{ item.job_create_time?.slice(0,10) }}</span> |
| | | <span class="todo-date">{{ item.job_create_time?.slice(0, 10) || item.begin_time?.slice(0, 10)}}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <script setup> |
| | | import st7 from '@/assets/images/workbench/st7.png'; |
| | | import { getList } from '@/api/tickets/ticket'; |
| | | import { getList as getListLog } from '@/api/tickets/orderLog'; |
| | | import { onMounted } from 'vue'; |
| | | import { useRouter } from 'vue-router' |
| | | import { useRouter } from 'vue-router'; |
| | | import { useStore } from 'vuex'; |
| | | const router = useRouter(); |
| | | const store = useStore(); |
| | | const permission = computed(() => store.getters.permission); |
| | | console.log(permission.value.o_and_m_p_jump, 'permission'); |
| | | const todos = ref([]); |
| | | const router = useRouter() |
| | | const jumporder = () => { |
| | | console.log('tiao'); |
| | | router.push({ |
| | | path: '/tickets/ticket', |
| | | }) |
| | | const jumporder = val => { |
| | | console.log('tiao', val); |
| | | |
| | | console.log('orderNumber', orderNumber); |
| | | if (permission.value.o_and_m_p_jump === true) { |
| | | const orderNumber = val.job_info_num; |
| | | router.push({ |
| | | path: `/tickets/orderLog?orderNumber=${orderNumber}`, |
| | | }); |
| | | } else { |
| | | const orderNumber = val.event_num; |
| | | router.push({ |
| | | path: `/tickets/ticket?orderNumber=${orderNumber}`, |
| | | }); |
| | | } |
| | | }; |
| | | const statusMap = { |
| | | 2: '待审核', |
| | |
| | | 4: '已完成', |
| | | }; |
| | | const getListMatter = async () => { |
| | | const res = await getList({}); |
| | | todos.value=res.data.data.records?.slice(0,5) |
| | | if (permission.value.o_and_m_p_jump === true) { |
| | | const res = await getListLog({}); |
| | | console.log('2222', res.data.data.records); |
| | | |
| | | todos.value = res.data.data.records?.slice(0, 5); |
| | | } else { |
| | | const res = await getList({}); |
| | | todos.value = res.data.data.records?.slice(0, 5); |
| | | } |
| | | }; |
| | | onMounted(() => { |
| | | getListMatter(); |