Commit b60e8d59aaf106f680cf84ef1ed29f63846342d1

Authored by xp.Huang
2 parents 390ee0dd 8d26e345

Merge branch 'fix/DEFECT-1761' into 'main_dev'

fix: 看板组件删除添加确认弹框

See merge request yunteng/thingskit-front!1016
... ... @@ -222,6 +222,14 @@
222 222 </div>
223 223 </template>
224 224 <template class="ant-card-actions" #actions>
  225 + <Tooltip title="预览">
  226 + <AuthIcon
  227 + :auth="ConfigurationTemplatePermission.PREVIEW"
  228 + class="!text-lg"
  229 + icon="ant-design:eye-outlined"
  230 + @click="handlePreview(item)"
  231 + />
  232 + </Tooltip>
225 233 <Tooltip v-if="!isCustomerUser" title="设计">
226 234 <AuthIcon
227 235 :auth="ConfigurationTemplatePermission.DESIGN"
... ...
... ... @@ -22,7 +22,6 @@
22 22 >
23 23 <div class="flex flex-col justify-center items-center">
24 24 <img :src="JSONImage" alt="avatar" class="w-20 h-20" />
25   - <!-- <Button type="primary" :loading="importLoading" class="mt-2"> JSON导入 </Button> -->
26 25 </div>
27 26 </Upload>
28 27 <Upload
... ... @@ -33,7 +32,6 @@
33 32 >
34 33 <div class="flex flex-col justify-center items-center">
35 34 <img :src="CSVImage" alt="avatar" class="w-20 h-20" />
36   - <!-- <Button type="primary" class="mt-2">CSV导入</Button> -->
37 35 </div>
38 36 </Upload>
39 37 </div>
... ...
... ... @@ -268,68 +268,8 @@
268 268 }
269 269 };
270 270
271   - // const paseJSON = (string: string) => {
272   - // let data = null;
273   - // let flag = false;
274   - // try {
275   - // if (!isString(string)) return { flag: false, data };
276   - // data = JSON.parse(string);
277   - // flag = true;
278   - // if (!isObject(data)) flag = false;
279   - // } catch (error) {}
280   - // return { flag, data };
281   - // };
282   -
283 271 const isEmptyObject = (value: any) => isObject(value) && !Object.keys(value).length;
284 272
285   - // const importLoading = ref(false);
286   - // const handleImportModel = async (data: { file: File }) => {
287   - // const fileReader = new FileReader();
288   -
289   - // fileReader.onload = async () => {
290   - // const { flag, data } = paseJSON(fileReader.result as string);
291   - // if (!flag) {
292   - // createMessage.warning('JSON解析失败,请导入正确的JSON~');
293   - // return;
294   - // }
295   - // try {
296   - // importLoading.value = true;
297   -
298   - // Object.keys(data || {}).forEach((key) => {
299   - // const value = (data || {})[key];
300   - // if (value && isEmptyObject(value)) {
301   - // (data || {})[key] = [];
302   - // }
303   - // });
304   -
305   - // const result =
306   - // (unref(isPlatformAdmin) || unref(isSysadmin)) && props.record.ifShowClass
307   - // ? await importModelCategory({
308   - // categoryId: props.record.id,
309   - // data: data!,
310   - // functionType: 'all',
311   - // })
312   - // : await importModelOfMatter({
313   - // tkDeviceProfileId: props.record.id,
314   - // data: data!,
315   - // functionType: 'all',
316   - // });
317   -
318   - // result
319   - // ? createMessage.success('导入成功~')
320   - // : createMessage.error('JSON解析失败,请导入正确的JSON~');
321   -
322   - // result && reload();
323   - // } catch (error) {
324   - // throw error;
325   - // } finally {
326   - // importLoading.value = false;
327   - // }
328   - // };
329   -
330   - // fileReader.readAsText(data.file, 'utf-8');
331   - // };
332   -
333 273 // 选择导入物模型的方式
334 274 const handleSelectImport = () => {
335 275 openModalSelect(true, {
... ...
... ... @@ -60,7 +60,10 @@
60 60 event: DataActionModeEnum.DELETE,
61 61 icon: 'ant-design:delete-outlined',
62 62 auth: VisualComponentPermission.DELETE,
63   - onClick: handleDelete,
  63 + popconfirm: {
  64 + title: '是否确认删除操作?',
  65 + onConfirm: handleDelete.bind(null),
  66 + },
64 67 },
65 68 ]);
66 69
... ...