feat:对详情中的日期进行了排序
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
import { reactive, shallowRef } from 'vue';
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import WorkDialog from '../components/WorkDialog.vue';
|
||||
import { orderdDetele, orderdClose, orderAdd } from "@/api/order/order.js"
|
||||
import { orderdDetele, orderdClose} from "@/api/order/order.js"
|
||||
|
||||
const rowData = ref()
|
||||
const workDialogRef = ref()
|
||||
@@ -263,7 +263,7 @@ const handleDetail = (row) => {
|
||||
}
|
||||
|
||||
const handleClose = async (row) => {
|
||||
// console.log(row.orderNumber);
|
||||
console.log(row);
|
||||
|
||||
ElMessageBox.confirm(
|
||||
'确定要关单吗?',
|
||||
@@ -276,6 +276,7 @@ const handleClose = async (row) => {
|
||||
)
|
||||
.then(async () => {
|
||||
await orderdClose(row.orderNumber)
|
||||
router.push('/task/management/all-work-order');
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '关闭成功',
|
||||
@@ -302,6 +303,7 @@ const handleDelete = async (row) => {
|
||||
)
|
||||
.then(async () => {
|
||||
await orderdDetele(row.orderNumber)
|
||||
router.push('/task/management/all-work-order');
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功',
|
||||
|
||||
@@ -52,7 +52,7 @@ watch(() => props.rowData, (newRowData) => {
|
||||
if (newRowData) {
|
||||
// console.log(getData(newRowData));
|
||||
getData(newRowData).then((data) => {
|
||||
opsCallList.value=[]
|
||||
opsCallList.value = []
|
||||
orderData.value = data.data
|
||||
//电话拨打记录
|
||||
const dataDetails = data.data.opsCallList
|
||||
@@ -73,13 +73,15 @@ watch(() => props.rowData, (newRowData) => {
|
||||
})
|
||||
});
|
||||
theData.pop()
|
||||
// theData[0].data.sort((a, b) => b.answer_time- a.answer_time)
|
||||
// console.log(theData);
|
||||
theData.forEach(item => {
|
||||
item.data.sort((a, b) => b.answer_time- a.answer_time)
|
||||
opsCallList.value.push(item)
|
||||
})
|
||||
//工单时间线
|
||||
orderContent.value=[]
|
||||
console.log(orderData.value);
|
||||
orderContent.value = []
|
||||
// console.log(orderData.value);
|
||||
content.map((item, index) => {
|
||||
if (index === 0) {
|
||||
item.timestamp = orderData.value.operationTime || '--'
|
||||
@@ -93,10 +95,10 @@ watch(() => props.rowData, (newRowData) => {
|
||||
|
||||
})
|
||||
content.forEach(item => {
|
||||
orderContent.value.push(item)
|
||||
orderContent.value.push(item)
|
||||
})
|
||||
|
||||
console.log(orderContent.value);
|
||||
|
||||
// console.log(orderContent.value);
|
||||
|
||||
})
|
||||
}
|
||||
@@ -207,10 +209,9 @@ defineExpose({
|
||||
<el-scrollbar height="20vh">
|
||||
<el-timeline style="max-width: 99%" class="timeline">
|
||||
<el-timeline-item v-for="(activity, index) in opsCallList" :key="index"
|
||||
:icon="activity.icon" :type="activity.type" :color="activity.color"
|
||||
:size="activity.size">
|
||||
icon="MoreFilled" type="primary" size="large">
|
||||
<div class="custom-card">
|
||||
<div>{{ activity.createTime }}</div>
|
||||
<div style="font-weight: bold">{{ activity.createTime }}</div>
|
||||
<div v-for="(info, index) in activity.data" :key="index">
|
||||
<div>
|
||||
<span :style="{ color: '#a8abb2' }">{{ info.callIdNumber
|
||||
|
||||
@@ -278,6 +278,7 @@ const handleClose = async (row) => {
|
||||
)
|
||||
.then(async () => {
|
||||
await orderdClose(row.orderNumber)
|
||||
router.push('/task/management/historical-work-order');
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '关闭成功',
|
||||
@@ -304,6 +305,7 @@ const handleDelete = async (row) => {
|
||||
)
|
||||
.then(async () => {
|
||||
await orderdDetele(row.orderNumber)
|
||||
router.push('/task/management/historical-work-order');
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功',
|
||||
|
||||
@@ -278,6 +278,7 @@ const handleClose = async (row) => {
|
||||
)
|
||||
.then(async () => {
|
||||
await orderdClose(row.orderNumber)
|
||||
router.push('/task/management/pending-work-order');
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '关闭成功',
|
||||
@@ -304,6 +305,7 @@ const handleDelete = async (row) => {
|
||||
)
|
||||
.then(async () => {
|
||||
await orderdDetele(row.orderNumber)
|
||||
router.push('/task/management/pending-work-order');
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功',
|
||||
|
||||
Reference in New Issue
Block a user