import { useI18n } from '/@/hooks/web/useI18n'; const { t } = useI18n(); import { Time } from '/@/components/Time'; import { BasicColumn } from '/@/components/Table/src/types/table'; import { h } from 'vue'; export const getSchemas = () => { return [ { field: 'sceneName', label: '场景标题', component: 'Input', componentProps: { maxLength: 100, }, colProps: { xl: 7, xxl: 7, }, }, { field: 'sceneCodes', label: '作品码', component: 'Input', componentProps: { maxLength: 100, }, colProps: { xl: 7, xxl: 7, }, }, { field: 'num', label: '场景码', component: 'Input', componentProps: { maxLength: 100, }, colProps: { xl: 7, xxl: 7, }, }, { field: 'snCode', label: 'SN码', component: 'Input', componentProps: { maxLength: 100, }, colProps: { xl: 7, xxl: 7, }, }, { field: 'userName', label: '绑定账号', component: 'Input', componentProps: { maxLength: 100, }, colProps: { xl: 7, xxl: 7, }, }, { field: 'timeList', label: '拍摄时间段', component: 'RangePicker', componentProps: { maxLength: 100, minWidth: '385px', format: 'YYYY-MM-DD', valueFormat: 'YYYY-MM-DD', showTime: true, }, colProps: { xl: 8, xxl: 8, }, }, ]; }; export const getviewSchemas = () => { return [ { field: 'sceneName', label: '作品标题', component: 'Input', componentProps: { maxLength: 100, }, colProps: { xl: 7, xxl: 7, }, }, { field: 'sceneCodes', label: '作品码', component: 'Input', componentProps: { maxLength: 100, }, colProps: { xl: 7, xxl: 7, }, }, { field: 'userName', label: '用户账号', component: 'Input', componentProps: { maxLength: 100, }, colProps: { xl: 6, xxl: 6, }, }, { field: 'timeList', label: '创建时间', component: 'RangePicker', componentProps: { maxLength: 100, minWidth: '385px', format: 'YYYY-MM-DD', valueFormat: 'YYYY-MM-DD', showTime: true, }, colProps: { xl: 8, xxl: 8, }, }, ]; }; export const getviewColumns = () => { return [ { title: '作品标题', dataIndex: 'name', slots: { customRender: 'href' }, width: 150, // customRender: ({ record }) => { // return record.name ? h('span', record.name) : '-'; // }, }, { title: '作品码', dataIndex: 'sceneCodes', ellipsis: true, width: 180, }, { title: '用户账号', dataIndex: 'userId', width: 100, }, { title: '创建时间', dataIndex: 'createTime', sorter: true, width: 180, customRender: ({ record }) => { return record.createTime ? h(Time, { value: record.createTime, mode: 'datetime', }) : '-'; }, }, { title: '最新编辑时间', dataIndex: 'updateTime', width: 180, customRender: ({ record }) => { return record.updateTime ? h(Time, { value: record.updateTime, mode: 'datetime', }) : '-'; }, }, { title: '是否加密', dataIndex: 'status', width: 80, customRender: ({ record }) => { return record.isPassword == 1 ? '是' : '否'; }, }, { title: '浏览量', dataIndex: 'visit', sorter: true, width: 80, }, { title: '操作', dataIndex: 'action', slots: { customRender: 'action' }, ifShow: true, fixed: 'right', flag: 'ACTION', width: 50, }, ]; }; export const getColumns = (isobj) => { return [ { title: '场景标题', dataIndex: 'sceneName', slots: { customRender: 'href' }, width: 150, }, { title: '场景码', dataIndex: 'num', ellipsis: true, width: 180, }, { title: '拍摄时间', dataIndex: 'createTime', sorter: true, width: 180, customRender: ({ record }) => { return ( record.createTime && h(Time, { value: record.createTime, mode: 'datetime', }) ); }, }, { title: 'obj生成状态', dataIndex: 'isObj', ellipsis: true, ifShow: isobj, width: 180, customRender: ({ record }) => { return record.isObj == 0 ? '未生成' : record.isObj == 1 ? '已生成' : '计算中'; }, }, { title: '计算完成时间', dataIndex: 'amount', width: 180, customRender: ({ record }) => { return ( (record.algorithmTime && h(Time, { value: record.algorithmTime, mode: 'datetime', })) || '-' ); }, }, { title: 'SN码', dataIndex: 'snCode', width: 180, }, { title: '点位数量', dataIndex: 'shootCount', width: 80, // customRender: ({ record }) => { // return ( tableType.value == 2 || tableType.value == 6 )||!record.shootCount ? '-' : record.shootCount // }, }, { 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: 'addressComponent', width: 100, customRender: ({ record }) => { if (!record.addressComponent) { return ''; } return record && record.addressComponent && record.addressComponent.city; // + district + township; }, }, { title: '是否复制', dataIndex: 'isCopy', width: 80, customRender: ({ record }) => { return record.isCopy ? '是' : '否'; }, }, { title: '复制时间', dataIndex: 'copyTime', width: 180, customRender: ({ record }) => { return record.copyTime ? h(Time, { value: record.copyTime, mode: 'datetime', }) : '-'; }, }, { title: '绑定账号', dataIndex: 'userName', width: 100, }, { title: '浏览量', dataIndex: 'viewCount', sorter: true, width: 80, }, { title: '状态', dataIndex: 'statusString', width: 120, slots: { customRender: 'status' }, }, { title: '操作', dataIndex: 'action', slots: { customRender: 'action' }, ifShow: true, fixed: 'right', flag: 'ACTION', width: 280, }, ]; }; export const getVrColumns = () => { return [ { title: '作品标题', dataIndex: 'sceneName', slots: { customRender: 'href' }, width: 150, }, { title: '作品码', dataIndex: 'sceneCodes', ellipsis: true, width: 200, }, { title: '场景码', dataIndex: 'num', ellipsis: true, width: 180, }, { title: '拍摄时间', dataIndex: 'createTime', sorter: true, width: 180, customRender: ({ record }) => { return ( record.createTime && h(Time, { value: record.createTime, mode: 'datetime', }) ); }, }, { title: '计算完成时间', dataIndex: 'amount', width: 180, customRender: ({ record }) => { return ( (record.algorithmTime && h(Time, { value: record.algorithmTime, mode: 'datetime', })) || '-' ); }, }, { title: 'SN码', dataIndex: 'snCode', width: 180, }, { title: '点位数量', dataIndex: 'shootCount', width: 80, // customRender: ({ record }) => { // return ( tableType.value == 2 || tableType.value == 6 )||!record.shootCount ? '-' : record.shootCount // }, }, { title: '拍摄位置', dataIndex: 'addressComponent', width: 100, customRender: ({ record }) => { if (!record.addressComponent) { return ''; } return record && record.addressComponent && record.addressComponent.city; // + district + township; }, }, { title: '绑定账号', dataIndex: 'userName', width: 100, }, { title: '浏览量', dataIndex: 'viewCount', sorter: true, width: 80, }, { title: '状态', dataIndex: 'statusString', width: 120, slots: { customRender: 'status' }, }, { title: '操作', dataIndex: 'action', slots: { customRender: 'action' }, ifShow: true, fixed: 'right', flag: 'ACTION', width: 280, }, ]; };