Showing
4 changed files
with
13 additions
and
36 deletions
| @@ -97,7 +97,6 @@ | @@ -97,7 +97,6 @@ | ||
| 97 | // 状态->编辑 | 97 | // 状态->编辑 |
| 98 | const handleSwitch = async (e: any, record: any) => { | 98 | const handleSwitch = async (e: any, record: any) => { |
| 99 | switchLoading.value = true; | 99 | switchLoading.value = true; |
| 100 | - console.log(e, record); | ||
| 101 | await deviceProfileCategory({ ...record, status: e }); | 100 | await deviceProfileCategory({ ...record, status: e }); |
| 102 | switchLoading.value = false; | 101 | switchLoading.value = false; |
| 103 | createMessage.success('操作成功'); | 102 | createMessage.success('操作成功'); |
| @@ -185,7 +184,6 @@ | @@ -185,7 +184,6 @@ | ||
| 185 | </template> | 184 | </template> |
| 186 | </BasicTable> | 185 | </BasicTable> |
| 187 | <classModal @register="registerModal" @handleReload="handleReload" /> | 186 | <classModal @register="registerModal" @handleReload="handleReload" /> |
| 188 | - <!-- <physicalModel @register="registerDetailDrawer" :record /> --> | ||
| 189 | <BasicDrawer title="物模型" @register="registerDetailDrawer" width="60%" destroy-on-close> | 187 | <BasicDrawer title="物模型" @register="registerDetailDrawer" width="60%" destroy-on-close> |
| 190 | <PhysicalModelManagementStep :record="registerDetailRecord" /> | 188 | <PhysicalModelManagementStep :record="registerDetailRecord" /> |
| 191 | </BasicDrawer> | 189 | </BasicDrawer> |
| @@ -21,7 +21,10 @@ | @@ -21,7 +21,10 @@ | ||
| 21 | class="flex justify-center items-center" | 21 | class="flex justify-center items-center" |
| 22 | > | 22 | > |
| 23 | <div class="flex flex-col justify-center items-center"> | 23 | <div class="flex flex-col justify-center items-center"> |
| 24 | - <img :src="JSONImage" alt="avatar" class="w-20 h-20" /> | 24 | + <Tooltip> |
| 25 | + <template #title>使用从物模型TSL导出的JSON进行导入</template> | ||
| 26 | + <img :src="JSONImage" alt="avatar" class="w-20 h-20" /> | ||
| 27 | + </Tooltip> | ||
| 25 | </div> | 28 | </div> |
| 26 | </Upload> | 29 | </Upload> |
| 27 | <Upload | 30 | <Upload |
| @@ -31,7 +34,10 @@ | @@ -31,7 +34,10 @@ | ||
| 31 | class="flex justify-center items-center" | 34 | class="flex justify-center items-center" |
| 32 | > | 35 | > |
| 33 | <div class="flex flex-col justify-center items-center"> | 36 | <div class="flex flex-col justify-center items-center"> |
| 34 | - <img :src="CSVImage" alt="avatar" class="w-20 h-20" /> | 37 | + <Tooltip> |
| 38 | + <template #title>使用下载的模板编辑之后在进行导入</template> | ||
| 39 | + <img :src="CSVImage" alt="avatar" class="w-20 h-20" /> | ||
| 40 | + </Tooltip> | ||
| 35 | </div> | 41 | </div> |
| 36 | </Upload> | 42 | </Upload> |
| 37 | </div> | 43 | </div> |
| @@ -40,7 +46,7 @@ | @@ -40,7 +46,7 @@ | ||
| 40 | </template> | 46 | </template> |
| 41 | <script lang="ts" setup> | 47 | <script lang="ts" setup> |
| 42 | import { ref, unref } from 'vue'; | 48 | import { ref, unref } from 'vue'; |
| 43 | - import { Upload } from 'ant-design-vue'; | 49 | + import { Upload, Tooltip } from 'ant-design-vue'; |
| 44 | import { BasicModal, useModalInner } from '/@/components/Modal'; | 50 | import { BasicModal, useModalInner } from '/@/components/Modal'; |
| 45 | import { DeviceRecord } from '/@/api/device/model/deviceModel'; | 51 | import { DeviceRecord } from '/@/api/device/model/deviceModel'; |
| 46 | import { useMessage } from '/@/hooks/web/useMessage'; | 52 | import { useMessage } from '/@/hooks/web/useMessage'; |
| @@ -162,6 +168,7 @@ | @@ -162,6 +168,7 @@ | ||
| 162 | }); | 168 | }); |
| 163 | flag && createMessage.info(flag?.message); | 169 | flag && createMessage.info(flag?.message); |
| 164 | } catch (msg) { | 170 | } catch (msg) { |
| 171 | + // eslint-disable-next-line no-console | ||
| 165 | console.log(msg, 'msg'); | 172 | console.log(msg, 'msg'); |
| 166 | } finally { | 173 | } finally { |
| 167 | closeLoading(); | 174 | closeLoading(); |
| @@ -75,35 +75,6 @@ export const columnsDrawer: BasicColumn[] = [ | @@ -75,35 +75,6 @@ export const columnsDrawer: BasicColumn[] = [ | ||
| 75 | }, | 75 | }, |
| 76 | ellipsis: true, | 76 | ellipsis: true, |
| 77 | }, | 77 | }, |
| 78 | - // { | ||
| 79 | - // title: '事件类型', | ||
| 80 | - // dataIndex: 'eventType', | ||
| 81 | - // customRender({ text }) { | ||
| 82 | - // return h( | ||
| 83 | - // Tag, | ||
| 84 | - // { | ||
| 85 | - // color: EventTypeColor[text as EventType], | ||
| 86 | - // }, | ||
| 87 | - // () => EventTypeName[text as EventType] | ||
| 88 | - // ); | ||
| 89 | - // }, | ||
| 90 | - // ellipsis: true, | ||
| 91 | - // }, | ||
| 92 | - // { | ||
| 93 | - // title: '状态', | ||
| 94 | - // dataIndex: 'status', | ||
| 95 | - // width: 100, | ||
| 96 | - // customRender: (value: Record<'text', number>) => { | ||
| 97 | - // const { text } = value; | ||
| 98 | - // return h( | ||
| 99 | - // Tag, | ||
| 100 | - // { | ||
| 101 | - // color: text ? 'green' : 'red', | ||
| 102 | - // }, | ||
| 103 | - // () => (text ? '已发布' : '待发布') | ||
| 104 | - // ); | ||
| 105 | - // }, | ||
| 106 | - // }, | ||
| 107 | ]; | 78 | ]; |
| 108 | 79 | ||
| 109 | export const searchFormSchema: FormSchema[] = [ | 80 | export const searchFormSchema: FormSchema[] = [ |
| @@ -121,7 +92,6 @@ export const searchFormSchema: FormSchema[] = [ | @@ -121,7 +92,6 @@ export const searchFormSchema: FormSchema[] = [ | ||
| 121 | labelField: 'itemText', | 92 | labelField: 'itemText', |
| 122 | valueField: 'itemValue', | 93 | valueField: 'itemValue', |
| 123 | placeholder: '请选择领域', | 94 | placeholder: '请选择领域', |
| 124 | - // getPopupContainer: () => document.body, | ||
| 125 | }; | 95 | }; |
| 126 | }, | 96 | }, |
| 127 | }, | 97 | }, |
| @@ -186,7 +186,9 @@ | @@ -186,7 +186,9 @@ | ||
| 186 | selectType: props.record.ifShowClass ? 'category' : undefined, | 186 | selectType: props.record.ifShowClass ? 'category' : undefined, |
| 187 | }); | 187 | }); |
| 188 | }, | 188 | }, |
| 189 | - columns: physicalColumn, | 189 | + columns: props.record.ifShowClass |
| 190 | + ? physicalColumn.filter((item) => item.dataIndex !== 'status') | ||
| 191 | + : physicalColumn, | ||
| 190 | showIndexColumn: false, | 192 | showIndexColumn: false, |
| 191 | clickToRowSelect: false, | 193 | clickToRowSelect: false, |
| 192 | showTableSetting: true, | 194 | showTableSetting: true, |