修复PSAP需求

This commit is contained in:
lai
2025-07-18 15:02:39 +08:00
parent 3372d9929b
commit 03082ba11f
6 changed files with 887 additions and 74 deletions

View File

@@ -368,6 +368,10 @@ export default {
updateTime:'Update Time',
msdData:'MSD Info',
agentName: 'Agent Name',
comment: 'Comment',
agentEmail: 'Agent Email',
agentMobile: 'Agent Mobile',
title: ' Ticket List',
}
},
cbc:{
@@ -508,7 +512,28 @@ export default {
sgwcVolumeGPRSUplink: 'GPRS Uplink',
sgwcVolumeGPRSDownlink: 'GPRS Downlink',
recordPath:'Record Path',
msd:'MSD',
msd:' MSD',
automaticActivation: 'Automatic Activation',
positionCanBeTrusted: 'Position Can Be Trusted',
testCall: 'Test Call',
vehicleType:'Vehicle Type',
messageIdentifier: 'Message Identifier',
numberOfOccupants: 'Number Of Occupants',
n1latitudeDelta:'Recent Vehicle Location N1-Latitude Delta',
n1longitudeDelta: 'Recent Vehicle Location N1-Longitude Delta',
n2latitudeDelta:'Recent Vehicle Location N2-Latitude Delta',
n2longitudeDelta: 'Recent Vehicle Location N2-Longitude Delta',
timestamp: 'Timestamp',
vehicleDirection: 'Vehicle Direction',
isovds: 'Vehicle Descriptor Section',
isovisModelyear:'Vehicle Identifier Section Year',
isovisSeqPlant: 'Vehicle Identifier Section Serial Factory',
isowmi: 'World Manufacturer Identifier',
positionLatitude: 'Position Latitude',
positionLongitude: 'Position Longitude',
dieselTankPresent: 'Diesel Tank Present',
electricEnergyStorage: 'Electric Energy Storage',
gasolineTankPresent: 'Gasoline Tank Present',
},
ue: {
eventType: "Event Type",

View File

@@ -372,6 +372,10 @@ export default {
updateTime:'更新时间',
msdData:'MSD内容',
agentName: '座席名称',
comment: '备注',
agentEmail: '座席邮箱',
agentMobile: '座席手机',
title: '工单列表',
}
},
cbc:{
@@ -513,6 +517,27 @@ export default {
sgwcVolumeGPRSDownlink: 'GPRS 下行链路',
recordPath:'录音文件路径',
msd:'最小数据集',
automaticActivation: '自动激活',
positionCanBeTrusted: '位置可信',
testCall: '测试呼叫',
vehicleType:'车辆类型',
messageIdentifier: '消息标识',
numberOfOccupants: '乘员数量',
n1latitudeDelta:'最近车辆位置N1-纬度增量',
n1longitudeDelta: '最近车辆位置N1-经度增量',
n2latitudeDelta:' 最近车辆位置N2-纬度增量',
n2longitudeDelta: '最近车辆位置N2-经度增量',
timestamp: '时间戳',
vehicleDirection: '车辆行驶方向',
isovds: '车辆描述段',
isovisModelyear:'车辆描述段',
isovisSeqPlant: '车辆标识段序列工厂',
isowmi: '世界制造商标识',
positionLatitude: '位置纬度',
positionLongitude: '位置经度',
dieselTankPresent: '柴油罐存在',
electricEnergyStorage: '电力储能',
gasolineTankPresent: '汽油罐存在',
},
ue: {
eventType: "事件类型",

View File

@@ -6,11 +6,15 @@ import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import { ColumnsType } from 'ant-design-vue/es/table';
import { parseDateToStr, parseStrToDate } from '@/utils/date-utils';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { listCallBack } from '@/api/agentManage/callback';
import { listCallBack, updateStatus } from '@/api/agentManage/callback';
import useNeInfoStore from '@/store/modules/neinfo';
import useDictStore from '@/store/modules/dict';
import useI18n from '@/hooks/useI18n';
import { message } from 'ant-design-vue';
import { ProModal } from 'antdv-pro-modal';
import { create } from 'domain';
import { commentProps } from 'ant-design-vue/es/comment';
const { getDict } = useDictStore();
const { t } = useI18n();
let dictStatus = ref<DictType[]>([]);
@@ -36,7 +40,6 @@ let queryParams = reactive({
pageSize: 20,
});
/**查询参数重置 */
function fnQueryReset() {
queryParams = Object.assign(queryParams, {
@@ -104,6 +107,7 @@ let tableColumns: ColumnsType = [
{
title: t('views.agentManage.callback.status'),
dataIndex: 'status',
key: 'status',
align: 'center',
width: 4,
},
@@ -127,10 +131,16 @@ let tableColumns: ColumnsType = [
return parseDateToStr(opt.value / 1000);
},
},
// {
// title: t('views.agentManage.callback.msdData'),
// dataIndex: 'msdData',
// align: 'center',
// width: 6,
// },
{
title: t('views.agentManage.callback.msdData'),
dataIndex: 'msdData',
align: 'center',
title: t('common.operate'),
key: 'callbackId',
align: 'left',
width: 6,
},
];
@@ -186,7 +196,11 @@ function fnGetList(pageNum?: number) {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
tablePagination.total = res.total;
tableState.data = res.data;
if (tablePagination.total <= (queryParams.pageNum - 1) * tablePagination.pageSize && queryParams.pageNum !== 1) {
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
queryParams.pageNum !== 1
) {
tableState.loading = false;
fnGetList(queryParams.pageNum - 1);
}
@@ -195,6 +209,84 @@ function fnGetList(pageNum?: number) {
});
}
/**对话框对象信息状态类型 */
type ModalStateType = {
/**详情框是否显示 */
openByView: boolean;
/**新增框或修改框是否显示 */
openByEdit: boolean;
/**标题 */
title: string;
/**表单数据 */
from: Record<string, any>;
/**确定按钮 loading */
confirmLoading: boolean;
/**更新加载数据按钮 loading */
loadDataLoading: boolean;
};
/**对话框对象信息状态 */
let modalState: ModalStateType = reactive({
openByView: false,
openByEdit: false,
title: 'callback',
from: {
id: undefined,
ticketId: '',
agentName: '',
callerNumber: '',
calleeNumber: '',
agentEmail: '',
agentMobile: '',
status: '',
createdAt: '',
comment: '',
},
confirmLoading: false,
loadDataLoading: false,
});
function fnModalVisibleByEdit(record: any) {
modalState.title = t('common.viewText') + t('views.agentManage.callback.title');
modalState.openByEdit = true;
modalState.from = Object.assign(modalState.from, record, {
createdAt: record.createdAt ? parseDateToStr(record.createdAt / 1000) : '',
});
}
function fnModalOk() {
const from = Object.assign({}, toRaw(modalState.from));
modalState.confirmLoading = true;
const hide = message.loading(t('common.loading'), 0);
updateStatus(from)
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
content: t('common.msgSuccess', { msg: modalState.title }),
duration: 3,
});
fnGetList(1);
} else {
message.error({
content: `${res.msg}`,
duration: 3,
});
}
})
.finally(() => {
hide();
fnModalCancel();
modalState.confirmLoading = false;
});
}
function fnModalCancel() {
modalState.openByEdit = false;
//modalState.openByView = false;
//modalStateFrom.resetFields();
}
onMounted(() => {
getDict('callback_status').then(res => {
dictStatus.value = res;
@@ -232,26 +324,46 @@ onMounted(() => {
<template>
<PageContainer>
<a-card v-show="tableState.seached" :bordered="false" :body-style="{ marginBottom: '24px', paddingBottom: 0 }">
<a-card
v-show="tableState.seached"
:bordered="false"
:body-style="{ marginBottom: '24px', paddingBottom: 0 }"
>
<!-- 表格搜索栏 -->
<a-form :model="queryParams" name="queryParams" layout="horizontal">
<a-row :gutter="16">
<a-col :lg="6" :md="12" :xs="24">
<a-form-item label="PSAP对象" name="neId ">
<a-select v-model:value="queryParams.neId" :options="neOtions" :placeholder="t('common.selectPlease')"
@change="fnGetList(1)" />
<a-select
v-model:value="queryParams.neId"
:options="neOtions"
:placeholder="t('common.selectPlease')"
@change="fnGetList(1)"
/>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :xs="24">
<a-form-item :label="t('views.agentManage.callback.callerIdNumber')" name="callerNumber">
<a-input v-model:value="queryParams.callerNumber" allow-clear
:placeholder="t('common.inputPlease')"></a-input>
<a-form-item
:label="t('views.agentManage.callback.callerIdNumber')"
name="callerNumber"
>
<a-input
v-model:value="queryParams.callerNumber"
allow-clear
:placeholder="t('common.inputPlease')"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :xs="24">
<a-form-item :label="t('views.agentManage.callback.agentName')" name="agentName">
<a-input v-model:value="queryParams.agentName" allow-clear
:placeholder="t('common.inputPlease')"></a-input>
<a-form-item
:label="t('views.agentManage.callback.agentName')"
name="agentName"
>
<a-input
v-model:value="queryParams.agentName"
allow-clear
:placeholder="t('common.inputPlease')"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :xs="24">
@@ -273,15 +385,32 @@ onMounted(() => {
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :xs="24">
<a-form-item :label="t('views.agentManage.callback.status')" name="status">
<a-select v-model:value="queryParams.status" :options="dictStatus">
<a-form-item
:label="t('views.agentManage.callback.status')"
name="status"
>
<a-select
v-model:value="queryParams.status"
:options="dictStatus"
:allow-clear="true"
>
</a-select>
</a-form-item>
</a-col>
<a-col :lg="8" :md="12" :xs="24">
<a-form-item :label="t('views.agentManage.callback.startTime')" name="queryRangePicker">
<a-range-picker v-model:value="queryRangePicker" allow-clear bordered :show-time="{ format: 'HH:mm:ss' }"
format="YYYY-MM-DD HH:mm:ss" value-format="x" style="width: 100%"></a-range-picker>
<a-form-item
:label="t('views.agentManage.callback.startTime')"
name="queryRangePicker"
>
<a-range-picker
v-model:value="queryRangePicker"
allow-clear
bordered
:show-time="{ format: 'HH:mm:ss' }"
format="YYYY-MM-DD HH:mm:ss"
value-format="x"
style="width: 100%"
></a-range-picker>
</a-form-item>
</a-col>
</a-row>
@@ -312,7 +441,10 @@ onMounted(() => {
</template>
</a-button>
<template #overlay>
<a-menu :selected-keys="[tableState.size as string]" @click="fnTableSize">
<a-menu
:selected-keys="[tableState.size as string]"
@click="fnTableSize"
>
<a-menu-item key="default">
{{ t('common.size.default') }}
</a-menu-item>
@@ -330,11 +462,176 @@ onMounted(() => {
</template>
<!-- 表格列表 -->
<a-table class="table" row-key="id" :columns="tableColumns" :loading="tableState.loading"
:data-source="tableState.data" :size="tableState.size" :pagination="tablePagination"
:scroll="{ x: 1500, y: 400 }">
<a-table
class="table"
row-key="id"
:columns="tableColumns"
:loading="tableState.loading"
:data-source="tableState.data"
:size="tableState.size"
:pagination="tablePagination"
:scroll="{ x: 1500, y: 400 }"
>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'status'">
<DictTag :options="dictStatus" :value="record.status" />
</template>
<template v-if="column.key === 'callbackId'">
<a-space :size="8" align="center">
<a-tooltip>
<template #title>{{ t('common.viewText') }}</template>
<a-button
type="link"
@click.prevent="fnModalVisibleByEdit(record)"
>
<template #icon><InfoCircleOutlined /></template>
</a-button>
</a-tooltip>
</a-space>
</template>
</template>
</a-table>
</a-card>
<ProModal
:drag="true"
:width="800"
:destroyOnClose="true"
style="top: 0px"
:body-style="{ maxHeight: '600px', 'overflow-y': 'auto' }"
:keyboard="false"
:mask-closable="false"
:open="modalState.openByEdit"
:title="modalState.title"
:confirm-loading="modalState.confirmLoading"
@cancel="fnModalCancel"
@ok="fnModalOk"
:okText=" t('views.faultManage.activeAlarm.confirm') "
>
<a-form
name="modalStateFrom"
layout="horizontal"
:label-col="{ span: 6 }"
:labelWrap="true"
>
<a-row>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.agentManage.callback.ticketId')"
name="ticketId"
>
<a-input
:disabled="true"
v-model:value="modalState.from.ticketId"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.agentManage.callback.agentName')"
name="agentName"
>
<a-input
:disabled="true"
v-model:value="modalState.from.agentName"
></a-input>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.agentManage.callback.callerIdNumber')"
name="callerNumber"
>
<a-input
:disabled="true"
v-model:value="modalState.from.callerNumber"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.agentManage.callback.calleeIdNumber')"
name="calleeNumber"
>
<a-input
:disabled="true"
v-model:value="modalState.from.calleeNumber"
></a-input>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.agentManage.callback.agentEmail')"
name="agentEmail"
>
<a-input
:disabled="true"
v-model:value="modalState.from.agentEmail"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.agentManage.callback.agentMobile')"
name="agentMobile"
>
<a-input
:disabled="true"
v-model:value="modalState.from.agentMobile"
></a-input>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.agentManage.callback.status')"
name="status"
>
<a-input
:disabled="true"
v-model:value="modalState.from.status"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.agentManage.callback.startTime')"
name="createdAt"
>
<a-input
:disabled="true"
v-model:value="modalState.from.createdAt"
></a-input>
</a-form-item>
</a-col>
</a-row>
<a-form-item
:label="t('views.agentManage.callback.comment')"
:label-col="{ span: 3 }"
name="comment"
>
<a-input
:disabled="true"
v-model:value="modalState.from.comment"
></a-input>
</a-form-item>
</a-form>
</ProModal>
</PageContainer>
</template>

View File

@@ -82,12 +82,6 @@ let tableColumns: ColumnsType = [
align: 'center',
width: 5,
},
{
title: t('views.agentManage.callings.msdData'),
dataIndex: 'msdData',
align: 'center',
width: 6,
},
];
/**表格分页器参数 */

View File

@@ -12,17 +12,15 @@ import {
} from '@/constants/result-constants';
import useDictStore from '@/store/modules/dict';
import useNeInfoStore from '@/store/modules/neinfo';
import {
delMFDataCDR,
exportMFDataCDR,
listMFDataCDR,
} from '@/api/neData/mf';
import { delMFDataCDR, exportMFDataCDR, listMFDataCDR } from '@/api/neData/mf';
import { parseDateToStr, parseDuration } from '@/utils/date-utils';
import { OptionsType, WS } from '@/plugins/ws-websocket';
import saveAs from 'file-saver';
import PQueue from 'p-queue';
import { useClipboard } from '@vueuse/core';
import dayjs, { type Dayjs } from 'dayjs';
import { ProModal } from 'antdv-pro-modal';
const { copy } = useClipboard({ legacy: true });
const { t } = useI18n();
const { getDict } = useDictStore();
@@ -216,12 +214,12 @@ let tableColumns: ColumnsType = [
{
title: t('views.dashboard.cdr.msd'),
dataIndex: 'cdrJSON',
key: 'msd',
key: 'msdData',
align: 'left',
width: 100,
customRender(opt) {
const cdrJSON = opt.value;
return cdrJSON.msd;
return cdrJSON.msdData;
},
},
{
@@ -301,12 +299,64 @@ type ModalStateType = {
confirmLoading: boolean;
/**最大ID值 */
maxId: number;
/**详情框是否显示 */
openByView: boolean;
/**标题 */
title: string;
/**表单数据 */
from: Record<string, any>;
/**确定按钮 loading */
/**更新加载数据按钮 loading */
loadDataLoading: boolean;
};
/**对话框对象信息状态 */
let modalState: ModalStateType = reactive({
confirmLoading: false,
maxId: 0,
openByView: false,
title: 'mfCDR',
from: {
control: {
automaticActivation: true,
positionCanBeTrusted: true,
testCall: false,
vehicleType: '',
},
messageIdentifier: 0,
numberOfOccupants: 0,
recentVehicleLocationN1: {
latitudeDelta: 0,
longitudeDelta: 0,
},
recentVehicleLocationN2: {
latitudeDelta: 0,
longitudeDelta: 0,
},
timestamp: 0,
vehicleDirection: 0,
vehicleIdentificationNumber: {
isovds: '',
isovisModelyear: '',
isovisSeqPlant: '',
isowmi: '',
},
vehicleLocation: {
positionLatitude: 0,
positionLongitude: 0,
},
vehiclePropulsionStorageType: {
dieselTankPresent: false,
electricEnergyStorage: true,
gasolineTankPresent: true,
},
},
loadDataLoading: false,
});
/**
@@ -376,6 +426,7 @@ function fnGetList(pageNum?: number) {
) {
queryParams.startTime = queryRangePicker.value[0].valueOf();
queryParams.endTime = queryRangePicker.value[1].valueOf();
console.log(queryRangePicker.value[0].valueOf());
} else {
queryParams.startTime = undefined;
queryParams.endTime = undefined;
@@ -514,6 +565,34 @@ function wsMessage(res: Record<string, any>) {
}
}
function fnModalVisibleByEdit(record: Record<string, any>) {
modalState.title = t('common.viewText') + t('views.dashboard.cdr.msd');
modalState.openByView = true;
modalState.from = Object.assign(modalState.from, record.cdrJSON.msdData);
console.log(record, modalState.from);
// if (!record || !record.cdrJSON) return;
// const cdrJSON = record.cdrJSON;
// Modal.info({
// title: t('views.dashboard.cdr.msdData'),
// width: '80%',
// content: (
// <pre style="white-space: pre-wrap; word-break: break-all;">
// {JSON.stringify(cdrJSON, null, 2)}
// </pre>
// ),
// okText: t('common.copy'),
// onOk() {
// fnRecordCopy(JSON.stringify(cdrJSON, null, 2));
// },
// });
}
function fnModalCancel() {
// modalState.openByEdit = false;
modalState.openByView = false;
//modalStateFrom.resetFields();
}
onMounted(() => {
// 初始字典数据
Promise.allSettled([getDict('cdr_sip_code'), getDict('cdr_call_type')]).then(
@@ -565,26 +644,46 @@ onBeforeUnmount(() => {
<template>
<PageContainer>
<a-card v-show="tableState.seached" :bordered="false" :body-style="{ marginBottom: '24px', paddingBottom: 0 }">
<a-card
v-show="tableState.seached"
:bordered="false"
:body-style="{ marginBottom: '24px', paddingBottom: 0 }"
>
<!-- 表格搜索栏 -->
<a-form :model="queryParams" name="queryParams" layout="horizontal">
<a-row :gutter="16">
<a-col :lg="6" :md="12" :xs="24">
<a-form-item label="MF" name="neId ">
<a-select v-model:value="queryParams.neId" :options="neOtions" :placeholder="t('common.selectPlease')"
@change="fnQueryReset()" />
<a-select
v-model:value="queryParams.neId"
:options="neOtions"
:placeholder="t('common.selectPlease')"
@change="fnQueryReset()"
/>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :xs="24">
<a-form-item :label="t('views.dashboard.cdr.called')" name="calledParty">
<a-input v-model:value="queryParams.calledParty" allow-clear
:placeholder="t('common.inputPlease')"></a-input>
<a-form-item
:label="t('views.dashboard.cdr.called')"
name="calledParty"
>
<a-input
v-model:value="queryParams.calledParty"
allow-clear
:placeholder="t('common.inputPlease')"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :xs="24">
<a-form-item :label="t('views.dashboard.cdr.caller')" name="callerParty ">
<a-input v-model:value="queryParams.callerParty" allow-clear
:placeholder="t('common.inputPlease')"></a-input>
<a-form-item
:label="t('views.dashboard.cdr.caller')"
name="callerParty "
>
<a-input
v-model:value="queryParams.callerParty"
allow-clear
:placeholder="t('common.inputPlease')"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="4" :md="12" :xs="24">
@@ -606,16 +705,33 @@ onBeforeUnmount(() => {
</a-form-item>
</a-col>
<a-col :lg="8" :md="12" :xs="24">
<a-form-item :label="t('views.dashboard.cdr.recordType')" name="recordType">
<a-select v-model:value="recordTypes" mode="multiple" :options="['MOC', 'MTC'].map(v => ({ value: v }))"
:placeholder="t('common.selectPlease')" @change="fnQueryRecordTypeChange"></a-select>
<a-form-item
:label="t('views.dashboard.cdr.recordType')"
name="recordType"
>
<a-select
v-model:value="recordTypes"
mode="multiple"
:options="['MOC', 'MTC'].map(v => ({ value: v }))"
:placeholder="t('common.selectPlease')"
@change="fnQueryRecordTypeChange"
></a-select>
</a-form-item>
</a-col>
<a-col :lg="8" :md="12" :xs="24">
<a-form-item :label="t('views.dashboard.cdr.time')" name="queryRangePicker">
<a-range-picker v-model:value="queryRangePicker" :presets="rangePickerPresets" :bordered="true"
:allow-clear="false" style="width: 100%" :show-time="{ format: 'HH:mm:ss' }"
format="YYYY-MM-DD HH:mm:ss"></a-range-picker>
<a-form-item
:label="t('views.dashboard.cdr.time')"
name="queryRangePicker"
>
<a-range-picker
v-model:value="queryRangePicker"
:presets="rangePickerPresets"
:bordered="true"
:allow-clear="false"
style="width: 100%"
:show-time="{ format: 'HH:mm:ss' }"
format="YYYY-MM-DD HH:mm:ss"
></a-range-picker>
</a-form-item>
</a-col>
</a-row>
@@ -626,10 +742,17 @@ onBeforeUnmount(() => {
<!-- 插槽-卡片左侧侧 -->
<template #title>
<a-space :size="8" align="center">
<a-popconfirm placement="bottomLeft" :title="!realTimeData
? t('views.dashboard.cdr.realTimeDataStart')
: t('views.dashboard.cdr.realTimeDataStop')
" ok-text="Yes" cancel-text="No" @confirm="fnRealTime()">
<a-popconfirm
placement="bottomLeft"
:title="
!realTimeData
? t('views.dashboard.cdr.realTimeDataStart')
: t('views.dashboard.cdr.realTimeDataStop')
"
ok-text="Yes"
cancel-text="No"
@confirm="fnRealTime()"
>
<a-button type="primary" :danger="realTimeData">
<template #icon>
<FundOutlined />
@@ -642,8 +765,14 @@ onBeforeUnmount(() => {
</a-button>
</a-popconfirm>
<a-button type="default" danger :disabled="tableState.selectedRowKeys.length <= 0"
:loading="modalState.confirmLoading" @click.prevent="fnRecordDelete('0')" v-perms:has="['cdr:ne:remove']">
<a-button
type="default"
danger
:disabled="tableState.selectedRowKeys.length <= 0"
:loading="modalState.confirmLoading"
@click.prevent="fnRecordDelete('0')"
v-perms:has="['cdr:ne:remove']"
>
<template #icon>
<DeleteOutlined />
</template>
@@ -664,8 +793,13 @@ onBeforeUnmount(() => {
<a-space :size="8" align="center">
<a-tooltip>
<template #title>{{ t('common.searchBarText') }}</template>
<a-switch v-model:checked="tableState.seached" :checked-children="t('common.switch.show')"
:un-checked-children="t('common.switch.hide')" size="small" :disabled="realTimeData" />
<a-switch
v-model:checked="tableState.seached"
:checked-children="t('common.switch.show')"
:un-checked-children="t('common.switch.hide')"
size="small"
:disabled="realTimeData"
/>
</a-tooltip>
<a-tooltip>
<template #title>{{ t('common.reloadText') }}</template>
@@ -684,7 +818,10 @@ onBeforeUnmount(() => {
</template>
</a-button>
<template #overlay>
<a-menu :selected-keys="[tableState.size as string]" @click="fnTableSize">
<a-menu
:selected-keys="[tableState.size as string]"
@click="fnTableSize"
>
<a-menu-item key="default">
{{ t('common.size.default') }}
</a-menu-item>
@@ -702,21 +839,42 @@ onBeforeUnmount(() => {
</template>
<!-- 表格列表 -->
<a-table class="table" row-key="id" :columns="tableColumns" :loading="tableState.loading"
:data-source="tableState.data" :size="tableState.size" :pagination="tablePagination"
:scroll="{ x: tableColumns.length * 150, y: 'calc(100vh - 480px)' }" :row-selection="{
<a-table
class="table"
row-key="id"
:columns="tableColumns"
:loading="tableState.loading"
:data-source="tableState.data"
:size="tableState.size"
:pagination="tablePagination"
:scroll="{ x: tableColumns.length * 150, y: 'calc(100vh - 480px)' }"
:row-selection="{
type: 'checkbox',
columnWidth: '48px',
selectedRowKeys: tableState.selectedRowKeys,
onChange: fnTableSelectedRowKeys,
}">
}"
>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'msdData'">
<a-button type="link" @click.prevent="fnModalVisibleByEdit(record)">
<template #icon><InfoCircleOutlined /></template>
</a-button>
</template>
<template v-if="column.key === 'callType'">
<DictTag :options="dict.cdrCallType" :value="record.cdrJSON.callType" />
<DictTag
:options="dict.cdrCallType"
:value="record.cdrJSON.callType"
/>
</template>
<template v-if="column.key === 'cause'">
<span v-if="record.cdrJSON.callType !== 'sms'">
<DictTag :options="dict.cdrSipCode" :value="record.cdrJSON.cause" value-default="0" />
<DictTag
:options="dict.cdrSipCode"
:value="record.cdrJSON.cause"
value-default="0"
/>
</span>
<span v-else>
{{ t('views.dashboard.cdr.resultOk') }}
@@ -726,7 +884,10 @@ onBeforeUnmount(() => {
<a-space :size="8" align="center">
<a-tooltip>
<template #title>{{ t('common.copyText') }}</template>
<a-button type="link" @click.prevent="fnRecordCopy(record.cdrJSON)">
<a-button
type="link"
@click.prevent="fnRecordCopy(record.cdrJSON)"
>
<template #icon>
<CopyOutlined />
</template>
@@ -734,7 +895,11 @@ onBeforeUnmount(() => {
</a-tooltip>
<a-tooltip>
<template #title>{{ t('common.deleteText') }}</template>
<a-button type="link" @click.prevent="fnRecordDelete(record.id)" v-perms:has="['cdr:ne:remove']">
<a-button
type="link"
@click.prevent="fnRecordDelete(record.id)"
v-perms:has="['cdr:ne:remove']"
>
<template #icon>
<DeleteOutlined />
</template>
@@ -774,7 +939,10 @@ onBeforeUnmount(() => {
</a-divider>
<div>
<span>{{ t('views.dashboard.cdr.type') }}: </span>
<DictTag :options="dict.cdrCallType" :value="record.cdrJSON.callType" />
<DictTag
:options="dict.cdrCallType"
:value="record.cdrJSON.callType"
/>
</div>
<div>
<span>{{ t('views.dashboard.cdr.duration') }}: </span>
@@ -794,7 +962,11 @@ onBeforeUnmount(() => {
<div>
<span>{{ t('views.dashboard.cdr.result') }}: </span>
<span v-if="record.cdrJSON.callType !== 'sms'">
<DictTag :options="dict.cdrSipCode" :value="record.cdrJSON.cause" value-default="0" />
<DictTag
:options="dict.cdrSipCode"
:value="record.cdrJSON.cause"
value-default="0"
/>
</span>
<span v-else>
{{ t('views.dashboard.cdr.resultOk') }}
@@ -825,6 +997,302 @@ onBeforeUnmount(() => {
</template>
</a-table>
</a-card>
<ProModal
:drag="true"
:width="800"
:destroyOnClose="true"
style="top: 0px"
:body-style="{ maxHeight: '600px', 'overflow-y': 'auto' }"
:keyboard="false"
:mask-closable="false"
:open="modalState.openByView"
:title="modalState.title"
:confirm-loading="modalState.confirmLoading"
@cancel="fnModalCancel"
:footer="null"
>
<a-form
name="modalStateFrom"
layout="horizontal"
:label-col="{ span: 6 }"
:labelWrap="true"
>
<a-row>
<a-col :lg="24" :md="24" :xs="24">
<a-form-item
:label="t('views.dashboard.cdr.automaticActivation')"
name="automaticActivation"
>
<a-input
:disabled="true"
v-model:value="modalState.from.control.automaticActivation"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="24" :md="24" :xs="24">
<a-form-item
:label="t('views.dashboard.cdr.positionCanBeTrusted')"
name="positionCanBeTrusted"
>
<a-input
:disabled="true"
v-model:value="modalState.from.control.positionCanBeTrusted"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="24" :md="24" :xs="24">
<a-form-item
:label="t('views.dashboard.cdr.testCall')"
name="testCall"
>
<a-input
:disabled="true"
v-model:value="modalState.from.control.testCall"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="24" :md="24" :xs="24">
<a-form-item
:label="t('views.dashboard.cdr.vehicleType')"
name="ticketId"
>
<a-input
:disabled="true"
v-model:value="modalState.from.control.vehicleType"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="24" :md="24" :xs="24">
<a-form-item
:label="t('views.dashboard.cdr.messageIdentifier')"
name="messageIdentifier"
>
<a-input
:disabled="true"
v-model:value="modalState.from.messageIdentifier"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="24" :md="24" :xs="24">
<a-form-item
:label="t('views.dashboard.cdr.numberOfOccupants')"
name="ticketId"
>
<a-input
:disabled="true"
v-model:value="modalState.from.numberOfOccupants"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="24" :md="24" :xs="24">
<a-form-item
:label="t('views.dashboard.cdr.n1latitudeDelta')"
name="n1latitudeDelta"
>
<a-input
:disabled="true"
v-model:value="
modalState.from.recentVehicleLocationN1.latitudeDelta
"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="24" :md="24" :xs="24">
<a-form-item
:label="t('views.dashboard.cdr.n1longitudeDelta')"
name="n1longitudeDelta"
>
<a-input
:disabled="true"
v-model:value="
modalState.from.recentVehicleLocationN1.longitudeDelta
"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="24" :md="24" :xs="24">
<a-form-item
:label="t('views.dashboard.cdr.n2latitudeDelta')"
name="n2latitudeDelta"
>
<a-input
:disabled="true"
v-model:value="
modalState.from.recentVehicleLocationN2.latitudeDelta
"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="24" :md="24" :xs="24">
<a-form-item
:label="t('views.dashboard.cdr.n2longitudeDelta')"
name="n2longitudeDelta"
>
<a-input
:disabled="true"
v-model:value="
modalState.from.recentVehicleLocationN2.longitudeDelta
"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="24" :md="24" :xs="24">
<a-form-item
:label="t('views.dashboard.cdr.timestamp')"
name="timestamp"
>
<a-input
:disabled="true"
v-model:value="modalState.from.timestamp"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="24" :md="24" :xs="24">
<a-form-item
:label="t('views.dashboard.cdr.vehicleDirection')"
name="vehicleDirection"
>
<a-input
:disabled="true"
v-model:value="modalState.from.vehicleDirection"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="24" :md="24" :xs="24">
<a-form-item :label="t('views.dashboard.cdr.isovds')" name="isovds">
<a-input
:disabled="true"
v-model:value="
modalState.from.vehicleIdentificationNumber.isovds
"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="24" :md="24" :xs="24">
<a-form-item
:label="t('views.dashboard.cdr.isovisModelyear')"
name="isovisModelyear"
>
<a-input
:disabled="true"
v-model:value="
modalState.from.vehicleIdentificationNumber.isovisModelyear
"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="24" :md="24" :xs="24">
<a-form-item
:label="t('views.dashboard.cdr.isovisSeqPlant')"
name="isovisSeqPlant"
>
<a-input
:disabled="true"
v-model:value="
modalState.from.vehicleIdentificationNumber.isovisSeqPlant
"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="24" :md="24" :xs="24">
<a-form-item
:label="t('views.dashboard.cdr.isovisModelyear')"
name="isowmi"
>
<a-input
:disabled="true"
v-model:value="
modalState.from.vehicleIdentificationNumber.isowmi
"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="24" :md="24" :xs="24">
<a-form-item
:label="t('views.dashboard.cdr.positionLatitude')"
name="positionLatitude"
>
<a-input
:disabled="true"
v-model:value="modalState.from.vehicleLocation.positionLatitude"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="24" :md="24" :xs="24">
<a-form-item
:label="t('views.dashboard.cdr.positionLongitude')"
name="positionLongitude"
>
<a-input
:disabled="true"
v-model:value="
modalState.from.vehicleLocation.positionLongitude
"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="24" :md="24" :xs="24">
<a-form-item
:label="t('views.dashboard.cdr.dieselTankPresent')"
name="dieselTankPresent"
>
<a-input
:disabled="true"
v-model:value="
modalState.from.vehiclePropulsionStorageType.dieselTankPresent
"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="24" :md="24" :xs="24">
<a-form-item
:label="t('views.dashboard.cdr.electricEnergyStorage')"
name="electricEnergyStorage"
>
<a-input
:disabled="true"
v-model:value="
modalState.from.vehiclePropulsionStorageType
.electricEnergyStorage
"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="24" :md="24" :xs="24">
<a-form-item
:label="t('views.dashboard.cdr.gasolineTankPresent')"
name="gasolineTankPresent"
>
<a-input
:disabled="true"
v-model:value="
modalState.from.vehiclePropulsionStorageType
.gasolineTankPresent
"
></a-input>
</a-form-item>
</a-col>
</a-row>
</a-form>
</ProModal>
</PageContainer>
</template>

View File

@@ -13,6 +13,7 @@ import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { getNeConfigData } from '@/api/ne/neConfig';
import { listCallings } from '@/api/agentManage/callings';
import { useRouter } from 'vue-router';
import useUserStore from '@/store/modules/user';
const { t } = useI18n();
const router = useRouter();
@@ -295,6 +296,9 @@ function fnGetList() {
/**栏目信息跳转 */
function fnToRouter(name: string, query?: any) {
if (useUserStore().roles.includes('agent')) {
return;
}
router.push({ name, query });
}
@@ -369,7 +373,7 @@ onBeforeUnmount(() => {
<a-col :xs="24" :sm="24" :lg="8">
<a-card :bordered="false" class="metric-card" @click="fnToRouter('Callings_2201')">
<a-card :bordered="false" class="metric-card" @click="fnToRouter('Callings_20001')">
<div class="card-title">{{ t('views.dashboard.overview.parallelUser') }}</div>
<div class="card-content">
<div class="trend-chart">