123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455 |
- 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,
- },
- ];
- };
|