Showing
4 changed files
with
13 additions
and
36 deletions
... | ... | @@ -97,7 +97,6 @@ |
97 | 97 | // 状态->编辑 |
98 | 98 | const handleSwitch = async (e: any, record: any) => { |
99 | 99 | switchLoading.value = true; |
100 | - console.log(e, record); | |
101 | 100 | await deviceProfileCategory({ ...record, status: e }); |
102 | 101 | switchLoading.value = false; |
103 | 102 | createMessage.success('操作成功'); |
... | ... | @@ -185,7 +184,6 @@ |
185 | 184 | </template> |
186 | 185 | </BasicTable> |
187 | 186 | <classModal @register="registerModal" @handleReload="handleReload" /> |
188 | - <!-- <physicalModel @register="registerDetailDrawer" :record /> --> | |
189 | 187 | <BasicDrawer title="物模型" @register="registerDetailDrawer" width="60%" destroy-on-close> |
190 | 188 | <PhysicalModelManagementStep :record="registerDetailRecord" /> |
191 | 189 | </BasicDrawer> | ... | ... |
... | ... | @@ -21,7 +21,10 @@ |
21 | 21 | class="flex justify-center items-center" |
22 | 22 | > |
23 | 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 | 28 | </div> |
26 | 29 | </Upload> |
27 | 30 | <Upload |
... | ... | @@ -31,7 +34,10 @@ |
31 | 34 | class="flex justify-center items-center" |
32 | 35 | > |
33 | 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 | 41 | </div> |
36 | 42 | </Upload> |
37 | 43 | </div> |
... | ... | @@ -40,7 +46,7 @@ |
40 | 46 | </template> |
41 | 47 | <script lang="ts" setup> |
42 | 48 | import { ref, unref } from 'vue'; |
43 | - import { Upload } from 'ant-design-vue'; | |
49 | + import { Upload, Tooltip } from 'ant-design-vue'; | |
44 | 50 | import { BasicModal, useModalInner } from '/@/components/Modal'; |
45 | 51 | import { DeviceRecord } from '/@/api/device/model/deviceModel'; |
46 | 52 | import { useMessage } from '/@/hooks/web/useMessage'; |
... | ... | @@ -162,6 +168,7 @@ |
162 | 168 | }); |
163 | 169 | flag && createMessage.info(flag?.message); |
164 | 170 | } catch (msg) { |
171 | + // eslint-disable-next-line no-console | |
165 | 172 | console.log(msg, 'msg'); |
166 | 173 | } finally { |
167 | 174 | closeLoading(); | ... | ... |
... | ... | @@ -75,35 +75,6 @@ export const columnsDrawer: BasicColumn[] = [ |
75 | 75 | }, |
76 | 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 | 80 | export const searchFormSchema: FormSchema[] = [ |
... | ... | @@ -121,7 +92,6 @@ export const searchFormSchema: FormSchema[] = [ |
121 | 92 | labelField: 'itemText', |
122 | 93 | valueField: 'itemValue', |
123 | 94 | placeholder: '请选择领域', |
124 | - // getPopupContainer: () => document.body, | |
125 | 95 | }; |
126 | 96 | }, |
127 | 97 | }, | ... | ... |
... | ... | @@ -186,7 +186,9 @@ |
186 | 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 | 192 | showIndexColumn: false, |
191 | 193 | clickToRowSelect: false, |
192 | 194 | showTableSetting: true, | ... | ... |