Merge pull request 'wxy' (#69) from wxy into master

Reviewed-on: http://git.feashow.cn/feashow/SmartOpsWeb/pulls/69
This commit is contained in:
springlog
2024-09-15 19:20:38 +00:00
4 changed files with 49 additions and 20 deletions

View File

@@ -9,7 +9,7 @@
import { reactive, shallowRef } from 'vue'; import { reactive, shallowRef } from 'vue';
import fvSelect from '@/fvcomponents/fvSelect/index.vue' import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import WorkDialog from '../components/WorkDialog.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 rowData = ref()
const workDialogRef = ref() const workDialogRef = ref()
@@ -263,7 +263,7 @@ const handleDetail = (row) => {
} }
const handleClose = async (row) => { const handleClose = async (row) => {
// console.log(row.orderNumber); console.log(row);
ElMessageBox.confirm( ElMessageBox.confirm(
'确定要关单吗?', '确定要关单吗?',
@@ -276,12 +276,14 @@ const handleClose = async (row) => {
) )
.then(async () => { .then(async () => {
await orderdClose(row.orderNumber) await orderdClose(row.orderNumber)
tableIns.value.refresh()
ElMessage({ ElMessage({
type: 'success', type: 'success',
message: '关闭成功', message: '关闭成功',
}) })
}) })
.catch(() => { .catch(() => {
// tableIns.value.refresh()
ElMessage({ ElMessage({
type: 'info', type: 'info',
message: '关闭失败', message: '关闭失败',
@@ -302,12 +304,14 @@ const handleDelete = async (row) => {
) )
.then(async () => { .then(async () => {
await orderdDetele(row.orderNumber) await orderdDetele(row.orderNumber)
tableIns.value.refresh()
ElMessage({ ElMessage({
type: 'success', type: 'success',
message: '删除成功', message: '删除成功',
}) })
}) })
.catch(() => { .catch(() => {
// tableIns.value.refresh()
ElMessage({ ElMessage({
type: 'info', type: 'info',
message: '删除失败', message: '删除失败',

View File

@@ -52,7 +52,7 @@ watch(() => props.rowData, (newRowData) => {
if (newRowData) { if (newRowData) {
// console.log(getData(newRowData)); // console.log(getData(newRowData));
getData(newRowData).then((data) => { getData(newRowData).then((data) => {
opsCallList.value=[] opsCallList.value = []
orderData.value = data.data orderData.value = data.data
//电话拨打记录 //电话拨打记录
const dataDetails = data.data.opsCallList const dataDetails = data.data.opsCallList
@@ -73,13 +73,15 @@ watch(() => props.rowData, (newRowData) => {
}) })
}); });
theData.pop() theData.pop()
// theData[0].data.sort((a, b) => b.answer_time- a.answer_time)
// console.log(theData); // console.log(theData);
theData.forEach(item => { theData.forEach(item => {
item.data.sort((a, b) => b.answer_time- a.answer_time)
opsCallList.value.push(item) opsCallList.value.push(item)
}) })
//工单时间线 //工单时间线
orderContent.value=[] orderContent.value = []
console.log(orderData.value); // console.log(orderData.value);
content.map((item, index) => { content.map((item, index) => {
if (index === 0) { if (index === 0) {
item.timestamp = orderData.value.operationTime || '--' item.timestamp = orderData.value.operationTime || '--'
@@ -93,10 +95,10 @@ watch(() => props.rowData, (newRowData) => {
}) })
content.forEach(item => { content.forEach(item => {
orderContent.value.push(item) orderContent.value.push(item)
}) })
console.log(orderContent.value); // console.log(orderContent.value);
}) })
} }
@@ -207,20 +209,19 @@ defineExpose({
<el-scrollbar height="20vh"> <el-scrollbar height="20vh">
<el-timeline style="max-width: 99%" class="timeline"> <el-timeline style="max-width: 99%" class="timeline">
<el-timeline-item v-for="(activity, index) in opsCallList" :key="index" <el-timeline-item v-for="(activity, index) in opsCallList" :key="index"
:icon="activity.icon" :type="activity.type" :color="activity.color" icon="MoreFilled" type="primary" size="large">
:size="activity.size">
<div class="custom-card"> <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 v-for="(info, index) in activity.data" :key="index">
<div> <div class="timeline-row">
<span :style="{ color: '#a8abb2' }">{{ info.callIdNumber <span :style="{ color: '#a8abb2' }">{{ info.callIdNumber
}}</span> }}</span>
<PointTag dictType="call_status" :value="info.callState" /> <PointTag dictType="call_status" :value="info.callState" class="tag"/>
<span :style="{ <!-- <span :style="{
color: info.callState === '通话中' ? '#6cc23a' : '#409eff' color: info.callState === '通话中' ? '#6cc23a' : '#409eff'
}">{{ info.callState }}</span> }">{{ info.callState }}</span> -->
<span class="span-3th" :style="{ color: '#a8abb2' }">{{ <span class="span-3th" :style="{ color: '#a8abb2' }">{{
info.answer_time }}</span> info.answer_time ||'00 : 00'}}</span>
</div> </div>
</div> </div>
</div> </div>
@@ -318,6 +319,26 @@ defineExpose({
} }
.main-content .timeline-row{
// border: 1px solid #000;
display: flex;
// justify-content: space-between;
// border: 1px solid #000;
}
.main-content .tag{
align-items: center;
// background-color: red;
margin-left: 30px;
}
.main-content .span-3th{
// flex-grow: 1;
// margin-right:;
flex: 1;
text-align: right;
margin-right: 100px;
}
.custom-card { .custom-card {
width: 100%; width: 100%;
font-size: 16px; font-size: 16px;
@@ -329,8 +350,4 @@ defineExpose({
margin: 2px; margin: 2px;
} }
.custom-card .span-3th {
float: right;
}
</style> </style>

View File

@@ -278,12 +278,14 @@ const handleClose = async (row) => {
) )
.then(async () => { .then(async () => {
await orderdClose(row.orderNumber) await orderdClose(row.orderNumber)
tableIns.value.refresh()
ElMessage({ ElMessage({
type: 'success', type: 'success',
message: '关闭成功', message: '关闭成功',
}) })
}) })
.catch(() => { .catch(() => {
// tableIns.value.refresh()
ElMessage({ ElMessage({
type: 'info', type: 'info',
message: '关闭失败', message: '关闭失败',
@@ -304,12 +306,14 @@ const handleDelete = async (row) => {
) )
.then(async () => { .then(async () => {
await orderdDetele(row.orderNumber) await orderdDetele(row.orderNumber)
tableIns.value.refresh()
ElMessage({ ElMessage({
type: 'success', type: 'success',
message: '删除成功', message: '删除成功',
}) })
}) })
.catch(() => { .catch(() => {
// tableIns.value.refresh()
ElMessage({ ElMessage({
type: 'info', type: 'info',
message: '删除失败', message: '删除失败',

View File

@@ -278,12 +278,14 @@ const handleClose = async (row) => {
) )
.then(async () => { .then(async () => {
await orderdClose(row.orderNumber) await orderdClose(row.orderNumber)
tableIns.value.refresh()
ElMessage({ ElMessage({
type: 'success', type: 'success',
message: '关闭成功', message: '关闭成功',
}) })
}) })
.catch(() => { .catch(() => {
// tableIns.value.refresh()
ElMessage({ ElMessage({
type: 'info', type: 'info',
message: '关闭失败', message: '关闭失败',
@@ -304,12 +306,14 @@ const handleDelete = async (row) => {
) )
.then(async () => { .then(async () => {
await orderdDetele(row.orderNumber) await orderdDetele(row.orderNumber)
tableIns.value.refresh()
ElMessage({ ElMessage({
type: 'success', type: 'success',
message: '删除成功', message: '删除成功',
}) })
}) })
.catch(() => { .catch(() => {
// tableIns.value.refresh()
ElMessage({ ElMessage({
type: 'info', type: 'info',
message: '删除失败', message: '删除失败',