更新
This commit is contained in:
parent
ca55e50c9c
commit
28479396f9
@ -36,9 +36,9 @@ VITE_REFRESH_ROLE = true
|
|||||||
|
|
||||||
# 后端接口地址
|
# 后端接口地址
|
||||||
#VITE_APP_API_ADDRESS=http://47.110.53.196:28080
|
#VITE_APP_API_ADDRESS=http://47.110.53.196:28080
|
||||||
VITE_APP_API_ADDRESS=http://10.10.90.12:10500
|
VITE_APP_API_ADDRESS=http://10.10.10.103:10500
|
||||||
|
|
||||||
# websocket地址
|
# websocket地址
|
||||||
VITE_WEBSOCKET_URL=http://10.10.90.12:10500/signalr/notification
|
VITE_WEBSOCKET_URL=http://10.10.10.103:10500/signalr/notification
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -112,7 +112,6 @@ export type ComponentType =
|
|||||||
| 'DatePicker'
|
| 'DatePicker'
|
||||||
| 'DefaultButton'
|
| 'DefaultButton'
|
||||||
| 'DeviceSelect'
|
| 'DeviceSelect'
|
||||||
| 'StandardThingModelCodeSelect'
|
|
||||||
| 'Divider'
|
| 'Divider'
|
||||||
| 'IconPicker'
|
| 'IconPicker'
|
||||||
| 'Input'
|
| 'Input'
|
||||||
@ -126,6 +125,7 @@ export type ComponentType =
|
|||||||
| 'Rate'
|
| 'Rate'
|
||||||
| 'Select'
|
| 'Select'
|
||||||
| 'Space'
|
| 'Space'
|
||||||
|
| 'StandardThingModelCodeSelect'
|
||||||
| 'Switch'
|
| 'Switch'
|
||||||
| 'Textarea'
|
| 'Textarea'
|
||||||
| 'TimePicker'
|
| 'TimePicker'
|
||||||
@ -172,11 +172,17 @@ async function initComponentAdapter() {
|
|||||||
DatePicker,
|
DatePicker,
|
||||||
// 自定义设备选择组件
|
// 自定义设备选择组件
|
||||||
DeviceSelect: defineAsyncComponent(
|
DeviceSelect: defineAsyncComponent(
|
||||||
() => import('#/views/iotdbdatamanagement/deviceData/DeviceSelect.vue') as any,
|
() =>
|
||||||
|
import(
|
||||||
|
'#/views/iotdbdatamanagement/deviceData/DeviceSelect.vue'
|
||||||
|
) as any,
|
||||||
),
|
),
|
||||||
// 自定义标准物模型编码选择组件(分页搜索)
|
// 自定义标准物模型编码选择组件(分页搜索)
|
||||||
StandardThingModelCodeSelect: defineAsyncComponent(
|
StandardThingModelCodeSelect: defineAsyncComponent(
|
||||||
() => import('#/views/devicemanagement/thingmodelinfo/StandardThingModelCodeSelect.vue') as any,
|
() =>
|
||||||
|
import(
|
||||||
|
'#/views/thingmodelinfo/ioTPlatformThingModelInfo/StandardThingModelCodeSelect.vue'
|
||||||
|
) as any,
|
||||||
),
|
),
|
||||||
// 自定义默认按钮
|
// 自定义默认按钮
|
||||||
DefaultButton: (props, { attrs, slots }) => {
|
DefaultButton: (props, { attrs, slots }) => {
|
||||||
|
|||||||
@ -12,18 +12,17 @@ import { message as Message, Tag } from 'ant-design-vue';
|
|||||||
import { useVbenForm } from '#/adapter/form';
|
import { useVbenForm } from '#/adapter/form';
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
postFilesDownload,
|
|
||||||
postFilesUpload,
|
|
||||||
postCtWingProductDeleteAsync,
|
postCtWingProductDeleteAsync,
|
||||||
postCtWingProductInsertAsync,
|
postCtWingProductInsertAsync,
|
||||||
postCtWingProductListAsync,
|
postCtWingProductListAsync,
|
||||||
postCtWingProductModifyAsync,
|
postCtWingProductModifyAsync,
|
||||||
postCtWingProductProductStatusChangeAsync,
|
postCtWingProductProductStatusChangeAsync,
|
||||||
|
postFilesDownload,
|
||||||
|
postFilesUpload,
|
||||||
} from '#/api-client';
|
} from '#/api-client';
|
||||||
import { TableAction } from '#/components/table-action';
|
import { TableAction } from '#/components/table-action';
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
|
import ThingModelInfoModal from '#/views/thingmodelinfo/ioTPlatformThingModelInfo/index.vue';
|
||||||
import ThingModelInfoModal from '#/views/devicemanagement/thingmodelinfo/index.vue';
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
addProductFormSchema,
|
addProductFormSchema,
|
||||||
@ -179,7 +178,8 @@ async function submit() {
|
|||||||
if (fileInfo && fileInfo.id) {
|
if (fileInfo && fileInfo.id) {
|
||||||
formValues.deviceThingModelFileId = fileInfo.id;
|
formValues.deviceThingModelFileId = fileInfo.id;
|
||||||
// 设置文件名
|
// 设置文件名
|
||||||
formValues.deviceThingModelFileName = fileInfo.fileName || selectedFile.name;
|
formValues.deviceThingModelFileName =
|
||||||
|
fileInfo.fileName || selectedFile.name;
|
||||||
} else {
|
} else {
|
||||||
Message.error('文件上传成功但未获取到文件ID');
|
Message.error('文件上传成功但未获取到文件ID');
|
||||||
userModalApi.setState({ loading: false, confirmLoading: false });
|
userModalApi.setState({ loading: false, confirmLoading: false });
|
||||||
@ -336,7 +336,8 @@ function closeThingModelModal() {
|
|||||||
<Page auto-content-height>
|
<Page auto-content-height>
|
||||||
<Grid>
|
<Grid>
|
||||||
<template #toolbar-actions>
|
<template #toolbar-actions>
|
||||||
<TableAction :actions="[
|
<TableAction
|
||||||
|
:actions="[
|
||||||
{
|
{
|
||||||
label: $t('common.add'),
|
label: $t('common.add'),
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
@ -344,26 +345,34 @@ function closeThingModelModal() {
|
|||||||
onClick: openAddModal.bind(null),
|
onClick: openAddModal.bind(null),
|
||||||
auth: ['AbpIdentity.Users.Create'],
|
auth: ['AbpIdentity.Users.Create'],
|
||||||
},
|
},
|
||||||
]" />
|
]"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #isEnable="{ row }">
|
<template #isEnable="{ row }">
|
||||||
<component :is="h(Tag, { color: row.isEnabled ? 'green' : 'red' }, () =>
|
<component
|
||||||
row.isEnabled ? $t('common.yes') : $t('common.no'),
|
:is="
|
||||||
|
h(Tag, { color: row.isEnabled ? 'green' : 'red' }, () =>
|
||||||
|
row.isEnabled ? $t('common.yes') : $t('common.no'),
|
||||||
)
|
)
|
||||||
" />
|
"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #deviceThingModelFileName="{ row }">
|
<template #deviceThingModelFileName="{ row }">
|
||||||
<a v-if="row.deviceThingModelFileName && row.deviceThingModelFileId" @click="onDownloadFile(row)"
|
<a
|
||||||
style="color: #1890ff; text-decoration: underline; cursor: pointer">
|
v-if="row.deviceThingModelFileName && row.deviceThingModelFileId"
|
||||||
|
@click="onDownloadFile(row)"
|
||||||
|
style="color: #1890ff; text-decoration: underline; cursor: pointer"
|
||||||
|
>
|
||||||
{{ row.deviceThingModelFileName }}
|
{{ row.deviceThingModelFileName }}
|
||||||
</a>
|
</a>
|
||||||
<span v-else>{{ row.deviceThingModelFileName || '-' }}</span>
|
<span v-else>{{ row.deviceThingModelFileName || '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #action="{ row }">
|
<template #action="{ row }">
|
||||||
<TableAction :actions="[
|
<TableAction
|
||||||
|
:actions="[
|
||||||
{
|
{
|
||||||
label: $t('common.edit'),
|
label: $t('common.edit'),
|
||||||
type: 'link',
|
type: 'link',
|
||||||
@ -377,18 +386,19 @@ function closeThingModelModal() {
|
|||||||
size: 'small',
|
size: 'small',
|
||||||
onClick: onThingModelManagement.bind(null, row),
|
onClick: onThingModelManagement.bind(null, row),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: row.isEnabled ? '禁用' : '启用',
|
label: row.isEnabled ? '禁用' : '启用',
|
||||||
type: 'link',
|
type: 'link',
|
||||||
danger: row.isEnabled,
|
danger: row.isEnabled,
|
||||||
size: 'small',
|
size: 'small',
|
||||||
auth: ['AbpIdentity.Users.Update'],
|
auth: ['AbpIdentity.Users.Update'],
|
||||||
popConfirm: {
|
popConfirm: {
|
||||||
title: `确定要${row.isEnabled ? '禁用' : '启用'}该产品吗?`,
|
title: `确定要${row.isEnabled ? '禁用' : '启用'}该产品吗?`,
|
||||||
confirm: onStatusChange.bind(null, row),
|
confirm: onStatusChange.bind(null, row),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
]"
|
||||||
]" :drop-down-actions="[
|
:drop-down-actions="[
|
||||||
{
|
{
|
||||||
label: $t('common.delete'),
|
label: $t('common.delete'),
|
||||||
icon: 'ant-design:delete-outlined',
|
icon: 'ant-design:delete-outlined',
|
||||||
@ -399,10 +409,14 @@ function closeThingModelModal() {
|
|||||||
confirm: onDel.bind(null, row),
|
confirm: onDel.bind(null, row),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]" />
|
]"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</Grid>
|
</Grid>
|
||||||
<UserModal :title="editRow.id ? $t('common.edit') : $t('common.add')" class="w-[800px]">
|
<UserModal
|
||||||
|
:title="editRow.id ? $t('common.edit') : $t('common.add')"
|
||||||
|
class="w-[800px]"
|
||||||
|
>
|
||||||
<component :is="editRow.id ? EditForm : AddForm" />
|
<component :is="editRow.id ? EditForm : AddForm" />
|
||||||
</UserModal>
|
</UserModal>
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ import {
|
|||||||
import { TableAction } from '#/components/table-action';
|
import { TableAction } from '#/components/table-action';
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
|
|
||||||
import ThingModelInfoModal from '#/views/devicemanagement/thingmodelinfo/index.vue';
|
import ThingModelInfoModal from '#/views/thingmodelinfo/ioTPlatformThingModelInfo/index.vue';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
addProductFormSchema,
|
addProductFormSchema,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user