故障查询调整

This commit is contained in:
joylink_zhaoerwei 2024-11-12 17:28:58 +08:00
parent 9ac2c2dc59
commit 52fbdba1af

View File

@ -53,19 +53,18 @@
}}
</div>
<div class="text">
<span class="textHead"> 消息名称(故障现象)</span>{{
clickRowInfo.faultNameShower
}}
<span class="textHead"> {{ showTitle.faultNameShower }}</span
>{{ clickRowInfo.faultNameShower }}
</div>
<q-card class="box-card">
<div class="head">司机处理结果(服务故障现象)</div>
<div class="head">{{ showTitle.faultDriverShower }}</div>
<q-separator />
<div>
<div class="detail">{{ clickRowInfo.faultDriverShower }}</div>
</div>
</q-card>
<q-card class="box-card">
<div class="head">司机关键点(退出服务地点)</div>
<div class="head">{{ showTitle.resultMsg }}</div>
<q-separator />
<div>
<div class="detail">{{ clickRowInfo.resultMsg }}</div>
@ -199,6 +198,7 @@ const onRequest: QTable['onRequest'] = async (props) => {
pagination.value.rowsNumber = resp.total;
pagination.value.rowsPerPage = resp.size;
rows.splice(0, rows.length, ...(resp.records as []));
handleRowClick(rows[0]);
} catch (err) {
$q.notify({
type: 'negative',
@ -216,7 +216,21 @@ const clickRowInfo = reactive({
faultDriverShower: '',
resultMsg: '',
});
const showTitle = reactive({
faultNameShower: '',
faultDriverShower: '',
resultMsg: '',
});
function handleRowClick(row: FaultQueryListItem) {
if (row.faultType.includes('FAULT_EMERGENCY_GUIDE')) {
showTitle.faultNameShower = '故障现象';
showTitle.faultDriverShower = '司机处理结果';
showTitle.resultMsg = '行调提醒司机关键点';
} else {
showTitle.faultNameShower = '故障名称';
showTitle.faultDriverShower = '故障现象';
showTitle.resultMsg = '退出服务地点';
}
clickRowInfo.id = row?.id as number;
clickRowInfo.faultType = getFaultTypeName(row) as string;
clickRowInfo.faultNameShower = row.faultNameShower;
@ -281,7 +295,7 @@ const onDialogShow = () => {
<style lang='scss' scoped>
.changeBackground {
background-color: orange; /* 浅蓝色 */
background-color: #31ccec;
}
.custom-column {
overflow: hidden;