|
@@ -34,7 +34,12 @@
|
|
|
<a-tabs v-model:activeKey="tableType" @change="changeTable">
|
|
<a-tabs v-model:activeKey="tableType" @change="changeTable">
|
|
|
<a-tab-pane :key="0" tab="场景列表" :disabled="loading" />
|
|
<a-tab-pane :key="0" tab="场景列表" :disabled="loading" />
|
|
|
<a-tab-pane :key="1" tab="场景共享" :disabled="loading" />
|
|
<a-tab-pane :key="1" tab="场景共享" :disabled="loading" />
|
|
|
- <a-tab-pane :key="2" v-if="getCheckPerm('scenes-All')" tab="全域核查" :disabled="loading" />
|
|
|
|
|
|
|
+ <a-tab-pane
|
|
|
|
|
+ :key="2"
|
|
|
|
|
+ v-if="getCheckPerm('scenes-All')"
|
|
|
|
|
+ tab="全域核查"
|
|
|
|
|
+ :disabled="loading"
|
|
|
|
|
+ />
|
|
|
<!-- <a-tab-pane :key="3" tab="四维双目Lite" :disabled="loading"/>
|
|
<!-- <a-tab-pane :key="3" tab="四维双目Lite" :disabled="loading"/>
|
|
|
<a-tab-pane :key="4" tab="四维全景" :disabled="loading"/> -->
|
|
<a-tab-pane :key="4" tab="四维全景" :disabled="loading"/> -->
|
|
|
-->
|
|
-->
|
|
@@ -48,14 +53,24 @@
|
|
|
<div class="desc-wrap-BasicTable">
|
|
<div class="desc-wrap-BasicTable">
|
|
|
<BasicTable @register="registerTable">
|
|
<BasicTable @register="registerTable">
|
|
|
<template #toolbar>
|
|
<template #toolbar>
|
|
|
- <a-button type="primary" v-if="tableType == 0 && getCheckPerm('scenes-upload')" @click="handleUpload"> 上传</a-button>
|
|
|
|
|
|
|
+ <a-button
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ v-if="tableType == 0 && getCheckPerm('scenes-upload')"
|
|
|
|
|
+ @click="handleUpload"
|
|
|
|
|
+ >
|
|
|
|
|
+ 上传</a-button
|
|
|
|
|
+ >
|
|
|
<!-- <a-button type="primary" @click="exportExcel"> 导出1</a-button> -->
|
|
<!-- <a-button type="primary" @click="exportExcel"> 导出1</a-button> -->
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<template #href="{ record }">
|
|
<template #href="{ record }">
|
|
|
<span v-if="tableType == 2">{{ record.sceneName }}</span>
|
|
<span v-if="tableType == 2">{{ record.sceneName }}</span>
|
|
|
<a
|
|
<a
|
|
|
- v-else-if="record.status == 1 || record.status == 6 || (record.status == -2 && record.payStatus == 1)"
|
|
|
|
|
|
|
+ v-else-if="
|
|
|
|
|
+ record.status == 1 ||
|
|
|
|
|
+ record.status == 6 ||
|
|
|
|
|
+ (record.status == -2 && record.payStatus == 1)
|
|
|
|
|
+ "
|
|
|
target="_blank"
|
|
target="_blank"
|
|
|
:title="record.sceneName"
|
|
:title="record.sceneName"
|
|
|
:href="record.webSite"
|
|
:href="record.webSite"
|
|
@@ -117,7 +132,8 @@
|
|
|
label: '下载',
|
|
label: '下载',
|
|
|
ifShow:
|
|
ifShow:
|
|
|
getTypeCheckPerm('scenes-download') &&
|
|
getTypeCheckPerm('scenes-download') &&
|
|
|
- tableType != 1 && record.uploadType != 'offline' &&
|
|
|
|
|
|
|
+ tableType != 1 &&
|
|
|
|
|
+ record.uploadType != 'offline' &&
|
|
|
(record.userName == userInfo.userName ||
|
|
(record.userName == userInfo.userName ||
|
|
|
userInfo.roleId == 1 ||
|
|
userInfo.roleId == 1 ||
|
|
|
userInfo.roleId == 45 ||
|
|
userInfo.roleId == 45 ||
|
|
@@ -128,9 +144,13 @@
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
label: '重算',
|
|
label: '重算',
|
|
|
- disabled: record.status == 0 || record.status == 6 || (record.status == -2 && record.payStatus != 1),
|
|
|
|
|
|
|
+ disabled:
|
|
|
|
|
+ record.status == 0 ||
|
|
|
|
|
+ record.status == 6 ||
|
|
|
|
|
+ (record.status == -2 && record.payStatus != 1),
|
|
|
ifShow:
|
|
ifShow:
|
|
|
- getTypeCheckPerm('scenes-recalculate') && record.uploadType != 'offline' &&
|
|
|
|
|
|
|
+ getTypeCheckPerm('scenes-recalculate') &&
|
|
|
|
|
+ record.uploadType != 'offline' &&
|
|
|
tableType != 1 &&
|
|
tableType != 1 &&
|
|
|
(userInfo.roleId == 1 || userInfo.roleId == 45 || userInfo.roleId == 48),
|
|
(userInfo.roleId == 1 || userInfo.roleId == 45 || userInfo.roleId == 48),
|
|
|
popConfirm: {
|
|
popConfirm: {
|
|
@@ -142,7 +162,8 @@
|
|
|
label: '复制',
|
|
label: '复制',
|
|
|
disabled: !(record.status == 1 || (record.status == -2 && record.payStatus == 1)),
|
|
disabled: !(record.status == 1 || (record.status == -2 && record.payStatus == 1)),
|
|
|
ifShow:
|
|
ifShow:
|
|
|
- getTypeCheckPerm('scenes-copy') && record.uploadType != 'offline' &&
|
|
|
|
|
|
|
+ getTypeCheckPerm('scenes-copy') &&
|
|
|
|
|
+ record.uploadType != 'offline' &&
|
|
|
tableType != 1 &&
|
|
tableType != 1 &&
|
|
|
(record.userName == userInfo.userName ||
|
|
(record.userName == userInfo.userName ||
|
|
|
userInfo.roleId == 1 ||
|
|
userInfo.roleId == 1 ||
|
|
@@ -229,6 +250,7 @@
|
|
|
import { Time } from '/@/components/Time';
|
|
import { Time } from '/@/components/Time';
|
|
|
import { Descriptions, Tabs, Progress, Tooltip } from 'ant-design-vue';
|
|
import { Descriptions, Tabs, Progress, Tooltip } from 'ant-design-vue';
|
|
|
import { useI18n } from '/@/hooks/web/useI18n';
|
|
import { useI18n } from '/@/hooks/web/useI18n';
|
|
|
|
|
+ import { searchFormData, columns, columnsAll } from './data';
|
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
import { SCENE_TYPE } from '/@/settings/siteSetting';
|
|
import { SCENE_TYPE } from '/@/settings/siteSetting';
|
|
|
import { useModal } from '/@/components/Modal';
|
|
import { useModal } from '/@/components/Modal';
|
|
@@ -288,328 +310,16 @@
|
|
|
ios: 'http://fir.4dage.com/jmjjios?release_id=67779a9423389f7d79fd886a',
|
|
ios: 'http://fir.4dage.com/jmjjios?release_id=67779a9423389f7d79fd886a',
|
|
|
android: 'http://fir.4dage.com/zpnv?release_id=677ba62423389f143d2594f5',
|
|
android: 'http://fir.4dage.com/zpnv?release_id=677ba62423389f143d2594f5',
|
|
|
});
|
|
});
|
|
|
- const columns: BasicColumn[] = [
|
|
|
|
|
- {
|
|
|
|
|
- title: '场景标题',
|
|
|
|
|
- dataIndex: 'sceneName',
|
|
|
|
|
- ellipsis: true,
|
|
|
|
|
- slots: { customRender: 'href' },
|
|
|
|
|
- resizable: true,
|
|
|
|
|
- minWidth: 150,
|
|
|
|
|
- width: 150,
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: '人员编号',
|
|
|
|
|
- dataIndex: 'userName',
|
|
|
|
|
- width: 100,
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: t('routes.staff.userName'),
|
|
|
|
|
- dataIndex: 'nickName',
|
|
|
|
|
- width: 100,
|
|
|
|
|
- customRender: ({ record }) => {
|
|
|
|
|
- return record.nickName || '-';
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: '浏览量',
|
|
|
|
|
- dataIndex: 'viewCount',
|
|
|
|
|
- width: 80,
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: '状态',
|
|
|
|
|
- dataIndex: 'status',
|
|
|
|
|
- slots: { customRender: 'status' },
|
|
|
|
|
- width: 120,
|
|
|
|
|
- // customRender: ({ record }) => {
|
|
|
|
|
- // let str;
|
|
|
|
|
- // switch (record.status - 0) {
|
|
|
|
|
- // case 0:
|
|
|
|
|
- // str = '计算中';
|
|
|
|
|
- // break;
|
|
|
|
|
- // case 1:
|
|
|
|
|
- // str = '计算成功';
|
|
|
|
|
- // break;
|
|
|
|
|
- // case -2:
|
|
|
|
|
- // str = '计算成功';
|
|
|
|
|
- // break;
|
|
|
|
|
- // case -1:
|
|
|
|
|
- // str = '计算失败';
|
|
|
|
|
- // break;
|
|
|
|
|
- // }
|
|
|
|
|
- // return record.payStatus == -2 ? '封存' : str;
|
|
|
|
|
- // },
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: '相机类型',
|
|
|
|
|
- dataIndex: 'type',
|
|
|
|
|
- defaultHidden: true,
|
|
|
|
|
- width: 120,
|
|
|
|
|
- customRender: ({ record }) => {
|
|
|
|
|
- let str;
|
|
|
|
|
- switch (record.type) {
|
|
|
|
|
- case 0:
|
|
|
|
|
- str = SCENE_TYPE[1];
|
|
|
|
|
- break;
|
|
|
|
|
- case 1:
|
|
|
|
|
- str = SCENE_TYPE[0];
|
|
|
|
|
- break;
|
|
|
|
|
- case 2:
|
|
|
|
|
- str = SCENE_TYPE[2];
|
|
|
|
|
- break;
|
|
|
|
|
- case 5:
|
|
|
|
|
- str = SCENE_TYPE[4];
|
|
|
|
|
- break;
|
|
|
|
|
- case 6:
|
|
|
|
|
- str = SCENE_TYPE[3];
|
|
|
|
|
- break;
|
|
|
|
|
- case 7:
|
|
|
|
|
- str = SCENE_TYPE[3];
|
|
|
|
|
- break;
|
|
|
|
|
- case 8:
|
|
|
|
|
- str = SCENE_TYPE[4];
|
|
|
|
|
- break;
|
|
|
|
|
- case 9:
|
|
|
|
|
- str = SCENE_TYPE[0];
|
|
|
|
|
- break;
|
|
|
|
|
- case 10:
|
|
|
|
|
- str = SCENE_TYPE[2];
|
|
|
|
|
- break;
|
|
|
|
|
- case 11:
|
|
|
|
|
- str = SCENE_TYPE[3];
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
- return str;
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: '场景码',
|
|
|
|
|
- dataIndex: 'num',
|
|
|
|
|
- ellipsis: true,
|
|
|
|
|
- width: 180,
|
|
|
|
|
- defaultHidden: true,
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: '拍摄时间',
|
|
|
|
|
- dataIndex: 'createTime',
|
|
|
|
|
- width: 180,
|
|
|
|
|
- customRender: ({ record }) => {
|
|
|
|
|
- return (
|
|
|
|
|
- record.createTime &&
|
|
|
|
|
- h(Time, {
|
|
|
|
|
- value: record.createTime,
|
|
|
|
|
- mode: 'datetime',
|
|
|
|
|
- })
|
|
|
|
|
- );
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: '是否复制',
|
|
|
|
|
- dataIndex: 'isCopy',
|
|
|
|
|
- width: 80,
|
|
|
|
|
- defaultHidden: true,
|
|
|
|
|
- customRender: ({ record }) => {
|
|
|
|
|
- return record.isCopy ? '是' : '否';
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: '计算完成时间',
|
|
|
|
|
- dataIndex: 'amount',
|
|
|
|
|
- width: 180,
|
|
|
|
|
- customRender: ({ record }) => {
|
|
|
|
|
- return (
|
|
|
|
|
- (record.algorithmTime &&
|
|
|
|
|
- h(Time, {
|
|
|
|
|
- value: record.algorithmTime,
|
|
|
|
|
- mode: 'datetime',
|
|
|
|
|
- })) ||
|
|
|
|
|
- '-'
|
|
|
|
|
- );
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: '计算时长',
|
|
|
|
|
- dataIndex: 'amountdf',
|
|
|
|
|
- width: 180,
|
|
|
|
|
- customRender: ({ record }) => {
|
|
|
|
|
- let startBuildTime = record.startBuildTime;
|
|
|
|
|
- if(!record.algorithmTime || !startBuildTime) return '-'
|
|
|
|
|
- let seconds = dayjs(record.algorithmTime).diff(dayjs(startBuildTime), 'seconds')
|
|
|
|
|
- if(record.statusString == '计算中'){
|
|
|
|
|
- seconds = dayjs().diff(dayjs(startBuildTime), 'seconds')
|
|
|
|
|
- }
|
|
|
|
|
- return convertSeconds(seconds);
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: 'SN码',
|
|
|
|
|
- dataIndex: 'snCode',
|
|
|
|
|
- defaultHidden: true,
|
|
|
|
|
- width: 180,
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: '场景大小',
|
|
|
|
|
- dataIndex: 'sceneSize',
|
|
|
|
|
- width: 80,
|
|
|
|
|
- customRender: ({ record }) => {
|
|
|
|
|
- return record.sceneSize && record.sceneSize != 0
|
|
|
|
|
- ? h('span', { class: 'sceneSize' }, Math.ceil(record.sceneSize / 1024 / 1024) + 'M')
|
|
|
|
|
- : '-';
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: '复制时间',
|
|
|
|
|
- dataIndex: 'copyTime',
|
|
|
|
|
- width: 180,
|
|
|
|
|
- defaultHidden: true,
|
|
|
|
|
- customRender: ({ record }) => {
|
|
|
|
|
- return record.copyTime
|
|
|
|
|
- ? h(Time, {
|
|
|
|
|
- value: record.copyTime,
|
|
|
|
|
- mode: 'datetime',
|
|
|
|
|
- })
|
|
|
|
|
- : '-';
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: '操作',
|
|
|
|
|
- dataIndex: 'action',
|
|
|
|
|
- slots: { customRender: 'action' },
|
|
|
|
|
- // fixed: 'right',
|
|
|
|
|
- flag: 'ACTION',
|
|
|
|
|
- width: 400,
|
|
|
|
|
- },
|
|
|
|
|
- ];
|
|
|
|
|
const searchForm: Partial<FormProps> = {
|
|
const searchForm: Partial<FormProps> = {
|
|
|
labelWidth: 80,
|
|
labelWidth: 80,
|
|
|
autoSubmitOnEnter: true,
|
|
autoSubmitOnEnter: true,
|
|
|
autoAdvancedLine: 2,
|
|
autoAdvancedLine: 2,
|
|
|
- schemas: [
|
|
|
|
|
- {
|
|
|
|
|
- field: 'sceneName',
|
|
|
|
|
- label: '场景标题',
|
|
|
|
|
- component: 'Input',
|
|
|
|
|
- componentProps: {
|
|
|
|
|
- maxLength: 100,
|
|
|
|
|
- },
|
|
|
|
|
- colProps: {
|
|
|
|
|
- span: 6,
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- field: 'userName',
|
|
|
|
|
- label: '人员编号',
|
|
|
|
|
- component: 'Input',
|
|
|
|
|
- componentProps: {
|
|
|
|
|
- maxLength: 100,
|
|
|
|
|
- },
|
|
|
|
|
- colProps: {
|
|
|
|
|
- span: 6,
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- field: 'type',
|
|
|
|
|
- label: '相机类型',
|
|
|
|
|
- component: 'ApiSelect',
|
|
|
|
|
- componentProps: {
|
|
|
|
|
- style: { maxWidth: '250px', placeholder: '全部' },
|
|
|
|
|
- placeholder: '全部',
|
|
|
|
|
- api: sceneGroupCount,
|
|
|
|
|
- immediate: false,
|
|
|
|
|
- resultField: 'list',
|
|
|
|
|
- labelField: 'name',
|
|
|
|
|
- valueField: 'id',
|
|
|
|
|
- params: { type: 'camera' },
|
|
|
|
|
- },
|
|
|
|
|
- colProps: {
|
|
|
|
|
- span: 6,
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- // {
|
|
|
|
|
- // field: 'type',
|
|
|
|
|
- // label: '相机类型',
|
|
|
|
|
- // component: 'Select',
|
|
|
|
|
- // // defaultValue: '7',
|
|
|
|
|
- // componentProps: {
|
|
|
|
|
- // options: [
|
|
|
|
|
- // {
|
|
|
|
|
- // label: SCENE_TYPE[1],
|
|
|
|
|
- // value: '0',
|
|
|
|
|
- // key: '0',
|
|
|
|
|
- // },
|
|
|
|
|
- // {
|
|
|
|
|
- // label: SCENE_TYPE[0],
|
|
|
|
|
- // value: '1',
|
|
|
|
|
- // key: '1',
|
|
|
|
|
- // },
|
|
|
|
|
- // {
|
|
|
|
|
- // label: SCENE_TYPE[2],
|
|
|
|
|
- // value: '5',
|
|
|
|
|
- // key: '5',
|
|
|
|
|
- // },
|
|
|
|
|
- // {
|
|
|
|
|
- // label: SCENE_TYPE[3],
|
|
|
|
|
- // value: '7',
|
|
|
|
|
- // key: '7',
|
|
|
|
|
- // },
|
|
|
|
|
- // {
|
|
|
|
|
- // label: SCENE_TYPE[4],
|
|
|
|
|
- // value: '8',
|
|
|
|
|
- // key: '8',
|
|
|
|
|
- // },
|
|
|
|
|
- // ],
|
|
|
|
|
- // },
|
|
|
|
|
- // colProps: {
|
|
|
|
|
- // xl: 6,
|
|
|
|
|
- // xxl: 6,
|
|
|
|
|
- // },
|
|
|
|
|
- // },
|
|
|
|
|
- {
|
|
|
|
|
- field: 'num',
|
|
|
|
|
- label: '场景码',
|
|
|
|
|
- component: 'Input',
|
|
|
|
|
- componentProps: {
|
|
|
|
|
- maxLength: 100,
|
|
|
|
|
- },
|
|
|
|
|
- colProps: {
|
|
|
|
|
- span: 6,
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- field: 'snCode',
|
|
|
|
|
- label: 'SN 码',
|
|
|
|
|
- component: 'Input',
|
|
|
|
|
- componentProps: {
|
|
|
|
|
- maxLength: 100,
|
|
|
|
|
- },
|
|
|
|
|
- colProps: {
|
|
|
|
|
- span: 6,
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- field: 'platformId',
|
|
|
|
|
- label: '平台',
|
|
|
|
|
- component: 'ApiSelect',
|
|
|
|
|
- show: false,
|
|
|
|
|
- componentProps: {
|
|
|
|
|
- style: { maxWidth: '250px', placeholder: '全部' },
|
|
|
|
|
- placeholder: '全部',
|
|
|
|
|
- api: sceneGroupCount,
|
|
|
|
|
- immediate: false,
|
|
|
|
|
- resultField: 'list',
|
|
|
|
|
- labelField: 'name',
|
|
|
|
|
- valueField: 'id',
|
|
|
|
|
- },
|
|
|
|
|
- colProps: {
|
|
|
|
|
- span: 6,
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- ],
|
|
|
|
|
|
|
+ schemas: searchFormData(),
|
|
|
};
|
|
};
|
|
|
function cancelDownload() {
|
|
function cancelDownload() {
|
|
|
downloadOption.value = {};
|
|
downloadOption.value = {};
|
|
|
}
|
|
}
|
|
|
- function handleUpload(){
|
|
|
|
|
|
|
+ function handleUpload() {
|
|
|
openUplodaModal(true, {});
|
|
openUplodaModal(true, {});
|
|
|
}
|
|
}
|
|
|
const [registerDownModal, { openModal: openDownModal, closeModal }] = useModal();
|
|
const [registerDownModal, { openModal: openDownModal, closeModal }] = useModal();
|
|
@@ -617,7 +327,7 @@
|
|
|
const [registerUplodaModal, { openModal: openUplodaModal }] = useModal();
|
|
const [registerUplodaModal, { openModal: openUplodaModal }] = useModal();
|
|
|
const [registerPowersModal, { openModal: openPowersModal }] = useModal();
|
|
const [registerPowersModal, { openModal: openPowersModal }] = useModal();
|
|
|
const [registerCaseListModal, { openModal: openCaseListModal }] = useModal();
|
|
const [registerCaseListModal, { openModal: openCaseListModal }] = useModal();
|
|
|
- const [registerTable, { reload, getForm }] = useTable({
|
|
|
|
|
|
|
+ const [registerTable, { reload: reload1 }] = useTable({
|
|
|
api: operateSceneList,
|
|
api: operateSceneList,
|
|
|
title: `场景列表`,
|
|
title: `场景列表`,
|
|
|
// titleHelpMessage: ['已启用expandRowByClick', '已启用stopButtonPropagation'],
|
|
// titleHelpMessage: ['已启用expandRowByClick', '已启用stopButtonPropagation'],
|
|
@@ -644,19 +354,61 @@
|
|
|
},
|
|
},
|
|
|
canResize: true,
|
|
canResize: true,
|
|
|
});
|
|
});
|
|
|
|
|
+ const [registerTable1, { reload: reload2 }] = useTable({
|
|
|
|
|
+ api: operateSceneList,
|
|
|
|
|
+ title: `场景列表`,
|
|
|
|
|
+ columns: columnsAll,
|
|
|
|
|
+ useSearchForm: true,
|
|
|
|
|
+ formConfig: {
|
|
|
|
|
+ labelWidth: 80,
|
|
|
|
|
+ autoSubmitOnEnter: true,
|
|
|
|
|
+ autoAdvancedLine: 2,
|
|
|
|
|
+ schemas: searchFormData(true),
|
|
|
|
|
+ },
|
|
|
|
|
+ showTableSetting: true,
|
|
|
|
|
+ showIndexColumn: false,
|
|
|
|
|
+ beforeFetch: (T) => {
|
|
|
|
|
+ loading.value = true;
|
|
|
|
|
+ return T;
|
|
|
|
|
+ },
|
|
|
|
|
+ afterFetch: (T) => {
|
|
|
|
|
+ loading.value = false;
|
|
|
|
|
+ return T;
|
|
|
|
|
+ },
|
|
|
|
|
+ rowKey: 'id',
|
|
|
|
|
+ fetchSetting: {
|
|
|
|
|
+ pageField: 'pageNum',
|
|
|
|
|
+ sizeField: 'pageSize',
|
|
|
|
|
+ listField: 'list',
|
|
|
|
|
+ totalField: 'total',
|
|
|
|
|
+ },
|
|
|
|
|
+ canResize: true,
|
|
|
|
|
+ });
|
|
|
function changeTable(val: string) {
|
|
function changeTable(val: string) {
|
|
|
tableType.value = val;
|
|
tableType.value = val;
|
|
|
- getForm().updateSchema([
|
|
|
|
|
- { field: 'platformId', show: val == '2' },
|
|
|
|
|
- // { field: 'snCode', colProps: {
|
|
|
|
|
- // span: val == '2' ? 5 : 6,
|
|
|
|
|
- // }, },
|
|
|
|
|
- // { field: 'sceneName', colProps: {
|
|
|
|
|
- // span: val == '2' ? 5 : 6,
|
|
|
|
|
- // }, },
|
|
|
|
|
- ]);
|
|
|
|
|
|
|
+ // getForm().updateSchema({ field: 'platform', show: val == '2' });
|
|
|
|
|
+ // let listColumns = columns.map((item) => {
|
|
|
|
|
+ // if (item.dataIndex == 'action') {
|
|
|
|
|
+ // return {
|
|
|
|
|
+ // ...item,
|
|
|
|
|
+ // ifShow: val == '2' ? false : true,
|
|
|
|
|
+ // };
|
|
|
|
|
+ // }
|
|
|
|
|
+ // if (item.dataIndex == 'platformName') {
|
|
|
|
|
+ // return {
|
|
|
|
|
+ // ...item,
|
|
|
|
|
+ // ifShow: val == '2' ? true : false,
|
|
|
|
|
+ // };
|
|
|
|
|
+ // }
|
|
|
|
|
+ // return item;
|
|
|
|
|
+ // });
|
|
|
|
|
+ // setColumns(listColumns);
|
|
|
reload();
|
|
reload();
|
|
|
}
|
|
}
|
|
|
|
|
+ function reload() {
|
|
|
|
|
+ reload1();
|
|
|
|
|
+ // reload2();
|
|
|
|
|
+ }
|
|
|
async function handleCopy(record: Recordable) {
|
|
async function handleCopy(record: Recordable) {
|
|
|
createConfirm({
|
|
createConfirm({
|
|
|
title: '复制场景',
|
|
title: '复制场景',
|
|
@@ -688,13 +440,15 @@
|
|
|
// });
|
|
// });
|
|
|
}
|
|
}
|
|
|
function convertSeconds(seconds) {
|
|
function convertSeconds(seconds) {
|
|
|
- if(seconds == 'NaN') return
|
|
|
|
|
- var days =seconds>(3600*24)? Math.floor(seconds / (3600*24)):0;
|
|
|
|
|
- var hours = seconds>3600?Math.floor((seconds % (3600*24)) / 3600):0;
|
|
|
|
|
- var minutes = Math.floor((seconds % 3600) / 60);
|
|
|
|
|
- var remainingSeconds = seconds % 60;
|
|
|
|
|
- return `${ days && (days + '天')||''} ${hours && (hours + '小时')||''} ${minutes ||'0'}分钟 ${remainingSeconds||'0'}秒`
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (seconds == 'NaN') return;
|
|
|
|
|
+ var days = seconds > 3600 * 24 ? Math.floor(seconds / (3600 * 24)) : 0;
|
|
|
|
|
+ var hours = seconds > 3600 ? Math.floor((seconds % (3600 * 24)) / 3600) : 0;
|
|
|
|
|
+ var minutes = Math.floor((seconds % 3600) / 60);
|
|
|
|
|
+ var remainingSeconds = seconds % 60;
|
|
|
|
|
+ return `${(days && days + '天') || ''} ${(hours && hours + '小时') || ''} ${
|
|
|
|
|
+ minutes || '0'
|
|
|
|
|
+ }分钟 ${remainingSeconds || '0'}秒`;
|
|
|
|
|
+ }
|
|
|
async function handleMove(record: Recordable) {
|
|
async function handleMove(record: Recordable) {
|
|
|
openMoveModal(true, {
|
|
openMoveModal(true, {
|
|
|
...record,
|
|
...record,
|
|
@@ -829,17 +583,17 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
async function handlePowers(record: Recordable) {
|
|
async function handlePowers(record: Recordable) {
|
|
|
- let res = await getCaseByNum({ num: record.num, authType: 0, });
|
|
|
|
|
|
|
+ let res = await getCaseByNum({ num: record.num, authType: 0 });
|
|
|
// if (res && res.length) {
|
|
// if (res && res.length) {
|
|
|
// openCaseListModal(true, {
|
|
// openCaseListModal(true, {
|
|
|
// list: res,
|
|
// list: res,
|
|
|
// });
|
|
// });
|
|
|
// } else {
|
|
// } else {
|
|
|
- openPowersModal(true, {
|
|
|
|
|
- ...record,
|
|
|
|
|
- sourceType: 'scene',
|
|
|
|
|
- tableType: tableType.value,
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ openPowersModal(true, {
|
|
|
|
|
+ ...record,
|
|
|
|
|
+ sourceType: 'scene',
|
|
|
|
|
+ tableType: tableType.value,
|
|
|
|
|
+ });
|
|
|
// }
|
|
// }
|
|
|
}
|
|
}
|
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|