Showing
9 changed files
with
83 additions
and
37 deletions
| @@ -16,7 +16,7 @@ VITE_PUBLIC_PATH = / | @@ -16,7 +16,7 @@ VITE_PUBLIC_PATH = / | ||
| 16 | # VITE_PROXY = [["/api","http://localhost:8080/api"],["/thingskit-drawio","http://localhost:3000/"]] | 16 | # VITE_PROXY = [["/api","http://localhost:8080/api"],["/thingskit-drawio","http://localhost:3000/"]] |
| 17 | VITE_PROXY = [["/api","https://dev.thingskit.com/api"],["/thingskit-drawio","http://localhost:3000/"]] | 17 | VITE_PROXY = [["/api","https://dev.thingskit.com/api"],["/thingskit-drawio","http://localhost:3000/"]] |
| 18 | # VITE_PROXY = [["/api","http://121.37.251.8:8080/api"],["/thingskit-drawio","http://localhost:3000/"]] | 18 | # VITE_PROXY = [["/api","http://121.37.251.8:8080/api"],["/thingskit-drawio","http://localhost:3000/"]] |
| 19 | -# VITE_PROXY = [["/api","http://192.168.10.111:8080/api"],["/thingskit-drawio","http://192.168.10.106:8080/api"]] | 19 | +# VITE_PROXY = [["/api","http://192.168.10.136:8080/api"],["/thingskit-drawio","http://192.168.10.136:8080/api"]] |
| 20 | 20 | ||
| 21 | # 实时数据的ws地址 | 21 | # 实时数据的ws地址 |
| 22 | # VITE_WEB_SOCKET = ws://localhost:8080/api/ws/plugins/telemetry?token= | 22 | # VITE_WEB_SOCKET = ws://localhost:8080/api/ws/plugins/telemetry?token= |
| @@ -16,6 +16,11 @@ | @@ -16,6 +16,11 @@ | ||
| 16 | </Popconfirm> | 16 | </Popconfirm> |
| 17 | </Authority> | 17 | </Authority> |
| 18 | </template> | 18 | </template> |
| 19 | + <template #remark="{ record }"> | ||
| 20 | + <Tooltip :title="record.remark"> | ||
| 21 | + <div class="truncate w-full">{{ record.remark }}</div> | ||
| 22 | + </Tooltip> | ||
| 23 | + </template> | ||
| 19 | <template #action="{ record }"> | 24 | <template #action="{ record }"> |
| 20 | <TableAction | 25 | <TableAction |
| 21 | :actions="[ | 26 | :actions="[ |
| @@ -51,11 +56,11 @@ | @@ -51,11 +56,11 @@ | ||
| 51 | import EmailDetail from './EmailDetail.vue'; | 56 | import EmailDetail from './EmailDetail.vue'; |
| 52 | import { useBatchDelete } from '/@/hooks/web/useBatchDelete'; | 57 | import { useBatchDelete } from '/@/hooks/web/useBatchDelete'; |
| 53 | import { Authority } from '/@/components/Authority'; | 58 | import { Authority } from '/@/components/Authority'; |
| 54 | - import { Popconfirm } from 'ant-design-vue'; | 59 | + import { Popconfirm, Tooltip } from 'ant-design-vue'; |
| 55 | 60 | ||
| 56 | export default defineComponent({ | 61 | export default defineComponent({ |
| 57 | name: 'EmailLog', | 62 | name: 'EmailLog', |
| 58 | - components: { EmailDetail, BasicTable, TableAction, Authority, Popconfirm }, | 63 | + components: { EmailDetail, BasicTable, TableAction, Authority, Popconfirm, Tooltip }, |
| 59 | setup() { | 64 | setup() { |
| 60 | const [registerModal, { openModal }] = useModal(); | 65 | const [registerModal, { openModal }] = useModal(); |
| 61 | const [registerTable, { reload, setProps }] = useTable({ | 66 | const [registerTable, { reload, setProps }] = useTable({ |
| @@ -16,6 +16,11 @@ | @@ -16,6 +16,11 @@ | ||
| 16 | </Popconfirm> | 16 | </Popconfirm> |
| 17 | </Authority> | 17 | </Authority> |
| 18 | </template> | 18 | </template> |
| 19 | + <template #remark="{ record }"> | ||
| 20 | + <Tooltip :title="record.remark"> | ||
| 21 | + <div class="truncate w-full">{{ record.remark }}</div> | ||
| 22 | + </Tooltip> | ||
| 23 | + </template> | ||
| 19 | <template #action="{ record }"> | 24 | <template #action="{ record }"> |
| 20 | <TableAction | 25 | <TableAction |
| 21 | :actions="[ | 26 | :actions="[ |
| @@ -45,7 +50,7 @@ | @@ -45,7 +50,7 @@ | ||
| 45 | import { defineComponent, h, nextTick } from 'vue'; | 50 | import { defineComponent, h, nextTick } from 'vue'; |
| 46 | import { BasicTable, useTable, TableAction } from '/@/components/Table'; | 51 | import { BasicTable, useTable, TableAction } from '/@/components/Table'; |
| 47 | import { columns, searchFormSchema } from './sms.data'; | 52 | import { columns, searchFormSchema } from './sms.data'; |
| 48 | - import { Modal, Popconfirm } from 'ant-design-vue'; | 53 | + import { Modal, Popconfirm, Tooltip } from 'ant-design-vue'; |
| 49 | import { smsLogPage, deleteSmsLog } from '/@/api/message/records'; | 54 | import { smsLogPage, deleteSmsLog } from '/@/api/message/records'; |
| 50 | import { JsonPreview } from '/@/components/CodeEditor'; | 55 | import { JsonPreview } from '/@/components/CodeEditor'; |
| 51 | import { useBatchDelete } from '/@/hooks/web/useBatchDelete'; | 56 | import { useBatchDelete } from '/@/hooks/web/useBatchDelete'; |
| @@ -53,7 +58,7 @@ | @@ -53,7 +58,7 @@ | ||
| 53 | 58 | ||
| 54 | export default defineComponent({ | 59 | export default defineComponent({ |
| 55 | name: 'SmsLog', | 60 | name: 'SmsLog', |
| 56 | - components: { BasicTable, TableAction, Authority, Popconfirm }, | 61 | + components: { BasicTable, TableAction, Authority, Popconfirm, Tooltip }, |
| 57 | setup() { | 62 | setup() { |
| 58 | const [registerTable, { reload, setProps }] = useTable({ | 63 | const [registerTable, { reload, setProps }] = useTable({ |
| 59 | title: '短信发送列表', | 64 | title: '短信发送列表', |
| @@ -86,7 +91,7 @@ | @@ -86,7 +91,7 @@ | ||
| 86 | }); | 91 | }); |
| 87 | function handleQuery(record: Recordable) { | 92 | function handleQuery(record: Recordable) { |
| 88 | Modal.info({ | 93 | Modal.info({ |
| 89 | - title: '当前配置', | 94 | + title: '消息内容', |
| 90 | width: 480, | 95 | width: 480, |
| 91 | centered: true, | 96 | centered: true, |
| 92 | maskClosable: true, | 97 | maskClosable: true, |
| @@ -36,6 +36,14 @@ export const columns: BasicColumn[] = [ | @@ -36,6 +36,14 @@ export const columns: BasicColumn[] = [ | ||
| 36 | width: 160, | 36 | width: 160, |
| 37 | }, | 37 | }, |
| 38 | { | 38 | { |
| 39 | + title: '备注', | ||
| 40 | + dataIndex: 'remark', | ||
| 41 | + width: 120, | ||
| 42 | + slots: { | ||
| 43 | + customRender: 'remark', | ||
| 44 | + }, | ||
| 45 | + }, | ||
| 46 | + { | ||
| 39 | title: '发送时间', | 47 | title: '发送时间', |
| 40 | dataIndex: 'sendTime', | 48 | dataIndex: 'sendTime', |
| 41 | width: 180, | 49 | width: 180, |
| @@ -36,6 +36,14 @@ export const columns: BasicColumn[] = [ | @@ -36,6 +36,14 @@ export const columns: BasicColumn[] = [ | ||
| 36 | }, | 36 | }, |
| 37 | }, | 37 | }, |
| 38 | { | 38 | { |
| 39 | + title: '备注', | ||
| 40 | + dataIndex: 'remark', | ||
| 41 | + width: 120, | ||
| 42 | + slots: { | ||
| 43 | + customRender: 'remark', | ||
| 44 | + }, | ||
| 45 | + }, | ||
| 46 | + { | ||
| 39 | title: '发送时间', | 47 | title: '发送时间', |
| 40 | dataIndex: 'sendTime', | 48 | dataIndex: 'sendTime', |
| 41 | width: 160, | 49 | width: 160, |
| @@ -14,6 +14,7 @@ | @@ -14,6 +14,7 @@ | ||
| 14 | const props = defineProps<{ | 14 | const props = defineProps<{ |
| 15 | id: string; | 15 | id: string; |
| 16 | record: DataSource[]; | 16 | record: DataSource[]; |
| 17 | + panelName: string; | ||
| 17 | }>(); | 18 | }>(); |
| 18 | const { hasPermission } = usePermission(); | 19 | const { hasPermission } = usePermission(); |
| 19 | const dropMenuList = computed<DropMenu[]>(() => { | 20 | const dropMenuList = computed<DropMenu[]>(() => { |
| @@ -54,37 +55,40 @@ | @@ -54,37 +55,40 @@ | ||
| 54 | </script> | 55 | </script> |
| 55 | 56 | ||
| 56 | <template> | 57 | <template> |
| 57 | - <div class="flex justify-between w-full p-5"> | ||
| 58 | - <div class="flex" :style="{ width: `calc(100% - 60px)` }"> | ||
| 59 | - <div | ||
| 60 | - v-for="(item, index) in props.record" | ||
| 61 | - class="box-border truncate" | ||
| 62 | - :style="{ width: `${100 / props.record.length}%` }" | ||
| 63 | - :key="index" | ||
| 64 | - > | ||
| 65 | - <Tooltip :title="item.deviceName" placement="topLeft"> | ||
| 66 | - <div class="flex p-1"> | ||
| 67 | - <!-- <SvgIcon name="" prefix="iconfont" class="!fill-emerald-400" /> --> | ||
| 68 | - <div class="truncate font-bold">{{ item.deviceRename || item.deviceName }}</div> | ||
| 69 | - </div> | ||
| 70 | - </Tooltip> | 58 | + <div> |
| 59 | + <div class="text-center pt-5 px-5 pb-3 font-bold text-lg">{{ props.panelName || '' }}</div> | ||
| 60 | + <div class="flex justify-between w-full px-5 pb-5"> | ||
| 61 | + <div class="flex" :style="{ width: `calc(100% - 60px)` }"> | ||
| 62 | + <div | ||
| 63 | + v-for="(item, index) in props.record" | ||
| 64 | + class="box-border truncate" | ||
| 65 | + :style="{ width: `${100 / props.record.length}%` }" | ||
| 66 | + :key="index" | ||
| 67 | + > | ||
| 68 | + <Tooltip :title="item.deviceName" placement="topLeft"> | ||
| 69 | + <div class="flex p-1"> | ||
| 70 | + <!-- <SvgIcon name="" prefix="iconfont" class="!fill-emerald-400" /> --> | ||
| 71 | + <div class="truncate font-bold">{{ item.deviceRename || item.deviceName }}</div> | ||
| 72 | + </div> | ||
| 73 | + </Tooltip> | ||
| 74 | + </div> | ||
| 75 | + </div> | ||
| 76 | + <div class="flex items-center gap-5"> | ||
| 77 | + <slot name="moreAction"></slot> | ||
| 78 | + <Dropdown | ||
| 79 | + v-if="dropMenuList.length" | ||
| 80 | + :drop-menu-list="dropMenuList" | ||
| 81 | + :trigger="['click']" | ||
| 82 | + @menu-event="handleMenuEvent" | ||
| 83 | + > | ||
| 84 | + <Tooltip title="更多"> | ||
| 85 | + <MoreOutlined | ||
| 86 | + v-if="!getIsSharePage" | ||
| 87 | + class="transform rotate-90 cursor-pointer w-4.5 h-4.5 text-lg" | ||
| 88 | + /> | ||
| 89 | + </Tooltip> | ||
| 90 | + </Dropdown> | ||
| 71 | </div> | 91 | </div> |
| 72 | - </div> | ||
| 73 | - <div class="flex items-center gap-5"> | ||
| 74 | - <slot name="moreAction"></slot> | ||
| 75 | - <Dropdown | ||
| 76 | - v-if="dropMenuList.length" | ||
| 77 | - :drop-menu-list="dropMenuList" | ||
| 78 | - :trigger="['click']" | ||
| 79 | - @menu-event="handleMenuEvent" | ||
| 80 | - > | ||
| 81 | - <Tooltip title="更多"> | ||
| 82 | - <MoreOutlined | ||
| 83 | - v-if="!getIsSharePage" | ||
| 84 | - class="transform rotate-90 cursor-pointer w-4.5 h-4.5 text-lg" | ||
| 85 | - /> | ||
| 86 | - </Tooltip> | ||
| 87 | - </Dropdown> | ||
| 88 | </div> | 92 | </div> |
| 89 | </div> | 93 | </div> |
| 90 | </template> | 94 | </template> |
| @@ -203,6 +203,21 @@ | @@ -203,6 +203,21 @@ | ||
| 203 | }, | 203 | }, |
| 204 | }); | 204 | }); |
| 205 | 205 | ||
| 206 | + if (options.length && options.at(0)?.value) { | ||
| 207 | + const value = options.at(0)!.value; | ||
| 208 | + getDeviceDataKey(value); | ||
| 209 | + try { | ||
| 210 | + deviceAttrs.value = (await getDeviceAttributes({ deviceId: value })) || []; | ||
| 211 | + method.updateSchema({ | ||
| 212 | + field: SchemaFiled.KEYS, | ||
| 213 | + componentProps: { | ||
| 214 | + options: unref(deviceAttrs).map((item) => ({ label: item, value: item })), | ||
| 215 | + }, | ||
| 216 | + }); | ||
| 217 | + await method.setFieldsValue({ [SchemaFiled.DEVICE_ID]: value }); | ||
| 218 | + } catch (error) {} | ||
| 219 | + } | ||
| 220 | + | ||
| 206 | await handleModalOpen(); | 221 | await handleModalOpen(); |
| 207 | }); | 222 | }); |
| 208 | </script> | 223 | </script> |
| @@ -32,7 +32,7 @@ export const basicSchema: FormSchema[] = [ | @@ -32,7 +32,7 @@ export const basicSchema: FormSchema[] = [ | ||
| 32 | field: BasicConfigField.NAME, | 32 | field: BasicConfigField.NAME, |
| 33 | label: '组件名称', | 33 | label: '组件名称', |
| 34 | component: 'Input', | 34 | component: 'Input', |
| 35 | - rules: [{ required: true, message: '组件名称为必填项' }], | 35 | + // rules: [{ required: true, message: '组件名称为必填项' }], |
| 36 | componentProps: { | 36 | componentProps: { |
| 37 | placeholder: '请输入组件名称', | 37 | placeholder: '请输入组件名称', |
| 38 | }, | 38 | }, |
| @@ -443,6 +443,7 @@ | @@ -443,6 +443,7 @@ | ||
| 443 | <BaseWidgetHeader | 443 | <BaseWidgetHeader |
| 444 | :record="item.record.dataSource" | 444 | :record="item.record.dataSource" |
| 445 | :id="item.record.id" | 445 | :id="item.record.id" |
| 446 | + :panel-name="item.record.name" | ||
| 446 | @action="handleMoreAction" | 447 | @action="handleMoreAction" |
| 447 | > | 448 | > |
| 448 | <template #moreAction> | 449 | <template #moreAction> |