Showing
4 changed files
with
42 additions
and
18 deletions
| @@ -37,9 +37,9 @@ export const columns: BasicColumn[] = [ | @@ -37,9 +37,9 @@ export const columns: BasicColumn[] = [ | ||
| 37 | width: 120, | 37 | width: 120, |
| 38 | }, | 38 | }, |
| 39 | { | 39 | { |
| 40 | - title: '摄像头编号', | 40 | + title: '摄像头编号/监控点编号', |
| 41 | dataIndex: 'sn', | 41 | dataIndex: 'sn', |
| 42 | - width: 120, | 42 | + width: 220, |
| 43 | }, | 43 | }, |
| 44 | { | 44 | { |
| 45 | title: '视频流', | 45 | title: '视频流', |
| @@ -54,18 +54,13 @@ export const columns: BasicColumn[] = [ | @@ -54,18 +54,13 @@ export const columns: BasicColumn[] = [ | ||
| 54 | { | 54 | { |
| 55 | title: '接受方式', | 55 | title: '接受方式', |
| 56 | dataIndex: 'accessMode', | 56 | dataIndex: 'accessMode', |
| 57 | - width: 160, | 57 | + width: 100, |
| 58 | slots: { customRender: 'accessMode' }, | 58 | slots: { customRender: 'accessMode' }, |
| 59 | }, | 59 | }, |
| 60 | { | 60 | { |
| 61 | title: '创建时间', | 61 | title: '创建时间', |
| 62 | dataIndex: 'createTime', | 62 | dataIndex: 'createTime', |
| 63 | - width: 180, | ||
| 64 | - }, | ||
| 65 | - { | ||
| 66 | - title: '更新时间', | ||
| 67 | - dataIndex: 'updateTime', | ||
| 68 | - width: 180, | 63 | + width: 140, |
| 69 | }, | 64 | }, |
| 70 | ]; | 65 | ]; |
| 71 | 66 |
| @@ -39,13 +39,9 @@ | @@ -39,13 +39,9 @@ | ||
| 39 | /> | 39 | /> |
| 40 | </template> | 40 | </template> |
| 41 | <template #accessMode="{ record }"> | 41 | <template #accessMode="{ record }"> |
| 42 | - <span>{{ | ||
| 43 | - record.accessMode === AccessMode.ManuallyEnter | ||
| 44 | - ? '手动输入' | ||
| 45 | - : record.accessMode === AccessMode.Streaming | ||
| 46 | - ? '流媒体获取' | ||
| 47 | - : '' | ||
| 48 | - }}</span> | 42 | + <Tag :color="record.accessMode === AccessMode.ManuallyEnter ? 'cyan' : 'blue'">{{ |
| 43 | + record.accessMode === AccessMode.ManuallyEnter ? '手动输入' : '流媒体获取' | ||
| 44 | + }}</Tag> | ||
| 49 | </template> | 45 | </template> |
| 50 | <template #action="{ record }"> | 46 | <template #action="{ record }"> |
| 51 | <TableAction | 47 | <TableAction |
| @@ -96,6 +92,7 @@ | @@ -96,6 +92,7 @@ | ||
| 96 | import { Authority } from '/@/components/Authority'; | 92 | import { Authority } from '/@/components/Authority'; |
| 97 | import { useBatchDelete } from '/@/hooks/web/useBatchDelete'; | 93 | import { useBatchDelete } from '/@/hooks/web/useBatchDelete'; |
| 98 | import { Popconfirm } from 'ant-design-vue'; | 94 | import { Popconfirm } from 'ant-design-vue'; |
| 95 | + import { Tag } from 'ant-design-vue'; | ||
| 99 | 96 | ||
| 100 | export default defineComponent({ | 97 | export default defineComponent({ |
| 101 | components: { | 98 | components: { |
| @@ -108,6 +105,7 @@ | @@ -108,6 +105,7 @@ | ||
| 108 | TableImg, | 105 | TableImg, |
| 109 | Authority, | 106 | Authority, |
| 110 | Popconfirm, | 107 | Popconfirm, |
| 108 | + Tag, | ||
| 111 | }, | 109 | }, |
| 112 | setup() { | 110 | setup() { |
| 113 | const searchInfo = reactive<Recordable>({}); | 111 | const searchInfo = reactive<Recordable>({}); |
| 1 | import { BasicColumn, FormSchema } from '/@/components/Table'; | 1 | import { BasicColumn, FormSchema } from '/@/components/Table'; |
| 2 | import { getOrganizationList } from '/@/api/system/system'; | 2 | import { getOrganizationList } from '/@/api/system/system'; |
| 3 | import { copyTransFun } from '/@/utils/fnUtils'; | 3 | import { copyTransFun } from '/@/utils/fnUtils'; |
| 4 | +export enum Platform { | ||
| 5 | + PHONE = 'phone', | ||
| 6 | + PC = 'pc', | ||
| 7 | +} | ||
| 4 | 8 | ||
| 5 | // 表格列数据 | 9 | // 表格列数据 |
| 6 | export const columns: BasicColumn[] = [ | 10 | export const columns: BasicColumn[] = [ |
| @@ -15,6 +19,12 @@ export const columns: BasicColumn[] = [ | @@ -15,6 +19,12 @@ export const columns: BasicColumn[] = [ | ||
| 15 | width: 160, | 19 | width: 160, |
| 16 | }, | 20 | }, |
| 17 | { | 21 | { |
| 22 | + title: '平台', | ||
| 23 | + dataIndex: 'platform', | ||
| 24 | + width: 100, | ||
| 25 | + slots: { customRender: 'platform' }, | ||
| 26 | + }, | ||
| 27 | + { | ||
| 18 | title: '备注', | 28 | title: '备注', |
| 19 | dataIndex: 'remark', | 29 | dataIndex: 'remark', |
| 20 | width: 200, | 30 | width: 200, |
| @@ -70,6 +80,20 @@ export const formSchema: FormSchema[] = [ | @@ -70,6 +80,20 @@ export const formSchema: FormSchema[] = [ | ||
| 70 | }, | 80 | }, |
| 71 | }, | 81 | }, |
| 72 | { | 82 | { |
| 83 | + field: 'platform', | ||
| 84 | + label: '平台', | ||
| 85 | + required: true, | ||
| 86 | + component: 'RadioGroup', | ||
| 87 | + defaultValue: Platform.PC, | ||
| 88 | + componentProps: { | ||
| 89 | + defaultValue: Platform.PC, | ||
| 90 | + options: [ | ||
| 91 | + { label: 'PC端', value: Platform.PC }, | ||
| 92 | + { label: '移动端', value: Platform.PHONE }, | ||
| 93 | + ], | ||
| 94 | + }, | ||
| 95 | + }, | ||
| 96 | + { | ||
| 73 | field: 'remark', | 97 | field: 'remark', |
| 74 | label: '备注', | 98 | label: '备注', |
| 75 | component: 'InputTextArea', | 99 | component: 'InputTextArea', |
| @@ -9,6 +9,11 @@ | @@ -9,6 +9,11 @@ | ||
| 9 | :searchInfo="searchInfo" | 9 | :searchInfo="searchInfo" |
| 10 | class="w-3/4 xl:w-4/5" | 10 | class="w-3/4 xl:w-4/5" |
| 11 | > | 11 | > |
| 12 | + <template #platform="{ record }"> | ||
| 13 | + <Tag :color="record.platform === Platform.PHONE ? 'cyan' : 'blue'"> | ||
| 14 | + {{ record.platform === Platform.PHONE ? '移动端' : 'PC端' }} | ||
| 15 | + </Tag> | ||
| 16 | + </template> | ||
| 12 | <template #toolbar> | 17 | <template #toolbar> |
| 13 | <Authority value="api:yt:admin:addConfiguration"> | 18 | <Authority value="api:yt:admin:addConfiguration"> |
| 14 | <a-button type="primary" @click="handleCreateOrEdit(null)"> 新增组态 </a-button> | 19 | <a-button type="primary" @click="handleCreateOrEdit(null)"> 新增组态 </a-button> |
| @@ -73,7 +78,7 @@ | @@ -73,7 +78,7 @@ | ||
| 73 | import { useDrawer } from '/@/components/Drawer'; | 78 | import { useDrawer } from '/@/components/Drawer'; |
| 74 | import ContactDrawer from './ConfigurationCenterDrawer.vue'; | 79 | import ContactDrawer from './ConfigurationCenterDrawer.vue'; |
| 75 | import { useResetOrganizationTree, OrganizationIdTree } from '/@/views/common/organizationIdTree'; | 80 | import { useResetOrganizationTree, OrganizationIdTree } from '/@/views/common/organizationIdTree'; |
| 76 | - import { searchFormSchema, columns } from './center.data'; | 81 | + import { searchFormSchema, columns, Platform } from './center.data'; |
| 77 | import { | 82 | import { |
| 78 | getPage, | 83 | getPage, |
| 79 | deleteConfigurationCenter, | 84 | deleteConfigurationCenter, |
| @@ -82,7 +87,7 @@ | @@ -82,7 +87,7 @@ | ||
| 82 | import { getAppEnvConfig, isDevMode } from '/@/utils/env'; | 87 | import { getAppEnvConfig, isDevMode } from '/@/utils/env'; |
| 83 | import { Authority } from '/@/components/Authority'; | 88 | import { Authority } from '/@/components/Authority'; |
| 84 | import { Popconfirm } from 'ant-design-vue'; | 89 | import { Popconfirm } from 'ant-design-vue'; |
| 85 | - | 90 | + import { Tag } from 'ant-design-vue'; |
| 86 | export default defineComponent({ | 91 | export default defineComponent({ |
| 87 | components: { | 92 | components: { |
| 88 | PageWrapper, | 93 | PageWrapper, |
| @@ -92,6 +97,7 @@ | @@ -92,6 +97,7 @@ | ||
| 92 | ContactDrawer, | 97 | ContactDrawer, |
| 93 | Authority, | 98 | Authority, |
| 94 | Popconfirm, | 99 | Popconfirm, |
| 100 | + Tag, | ||
| 95 | }, | 101 | }, |
| 96 | setup() { | 102 | setup() { |
| 97 | const { VITE_GLOB_CONFIGURATION } = getAppEnvConfig(); | 103 | const { VITE_GLOB_CONFIGURATION } = getAppEnvConfig(); |
| @@ -171,6 +177,7 @@ | @@ -171,6 +177,7 @@ | ||
| 171 | }; | 177 | }; |
| 172 | 178 | ||
| 173 | return { | 179 | return { |
| 180 | + Platform, | ||
| 174 | searchInfo, | 181 | searchInfo, |
| 175 | hasBatchDelete, | 182 | hasBatchDelete, |
| 176 | handleCreateOrEdit, | 183 | handleCreateOrEdit, |