| | |
| | | <template> |
| | | <div class="list-card"> |
| | | <div class="list-card" |
| | | @click="itemClick"> |
| | | <!-- 头部行 点击事件 --> |
| | | <div class="order-info" |
| | | @click="itemClick" |
| | | title="点击查看详情" |
| | | > |
| | | <div class="order-info"> |
| | | <div class=""> |
| | | <span>工单编号: {{data.orderId}}</span> |
| | | <span>工单生成时间: {{data.createTime}}</span> |
| | | </div> |
| | | <div class="timer">处理时限: ---</div> |
| | | <div class="timer">处理时限: {{data.workflowAlarm || '---'}}</div> |
| | | </div> |
| | | <!-- 内容 --> |
| | | <div class="contain"> |
| | |
| | | <div class="item"> |
| | | <div class="inner"> |
| | | <div class="state">{{orderStatus}}</div> |
| | | <el-button type="primary" |
| | | v-if="!data.linkList[0].dealUserId" |
| | | class="btn" size="mini" @click="receiveOrder">接单</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | methods: { |
| | | itemClick () { |
| | | this.$emit('itemclick', this.data); |
| | | }, |
| | | receiveOrder (e) { |
| | | e.stopPropagation(); |
| | | this.$emit('receiveOrder', this.data); |
| | | } |
| | | } |
| | | }; |
| | |
| | | .list-card { |
| | | border: 1px #ababab solid; |
| | | background: #f3f4f6;; |
| | | cursor: pointer; |
| | | } |
| | | .order-info { |
| | | color: #04409a; |
| | |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | cursor: pointer; |
| | | } |
| | | .order-info span { |
| | | font-size: 20px; |
| | |
| | | .inner { |
| | | flex: 1; |
| | | } |
| | | .btn >>> span { |
| | | font-size: 14px; |
| | | } |
| | | .order-title { |
| | | flex: 1.6; |
| | | align-items: left; |
| | |
| | | import axios from '@/assets/js/axios'; |
| | | |
| | | /** |
| | | * 获取工单列表 |
| | | * @param {*} param |
| | | * @param {*} data |
| | | * @returns |
| | | */ |
| | | export const getList = function (param, data) { |
| | | return axios({ |
| | | method: 'POST', |
| | |
| | | data: data |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * 更新节点 接单 |
| | | * @param {*} param |
| | | * @param {*} data |
| | | * @returns |
| | | */ |
| | | export const updateLink = function (data) { |
| | | return axios({ |
| | | method: 'PUT', |
| | | url: '/workflow/updateLink', |
| | | data: data |
| | | }); |
| | | } |
| | |
| | | v-for="(item, idx) in list" |
| | | :key="'list_' + idx" |
| | | @itemclick="details" |
| | | @receiveOrder="updateLink" |
| | | :data="item" |
| | | ></list-card> |
| | | <el-empty :image-size="200" v-if="!list.length"></el-empty> |
| | |
| | | import ListCard from "./components/listCard.vue"; |
| | | |
| | | import { |
| | | getList |
| | | getList, |
| | | updateLink |
| | | } from './js/api'; |
| | | |
| | | export default { |
| | |
| | | }).catch((err) => { |
| | | console.error(err); |
| | | }); |
| | | }, |
| | | |
| | | // 接单 |
| | | updateLink (o) { |
| | | let param = { |
| | | dealType: 0, |
| | | // TODO 当前用户的Id |
| | | dealUserId: 1023, |
| | | id: o.linkList[0].id |
| | | }; |
| | | updateLink(param).then((res) => { |
| | | res = res.data; |
| | | this.$message({ |
| | | type: res.data ? 'success' : 'warning', |
| | | message: res.msg |
| | | }); |
| | | this.getList(); |
| | | }); |
| | | } |
| | | |
| | | }, |