| | |
| | | <template> |
| | | <BasicModal |
| | | :width="width" |
| | | :height="650" |
| | | :height="750" |
| | | v-bind="$attrs" |
| | | @register="register" |
| | | :title="title" |
| | |
| | | } from '/@/components/Table'; |
| | | import { useI18n } from '/@/hooks/web/useI18n'; |
| | | import { createImgPreview } from '/@/components/Preview'; |
| | | import { getListByPage, SaveEntity } from '/@/api/tigerapi/system'; |
| | | import { DeleteEntity, getListByPage, SaveEntity } from '/@/api/tigerapi/system'; |
| | | import { useMessage } from '/@/hooks/web/useMessage'; |
| | | import { cloneDeep, isFunction } from 'lodash-es'; |
| | | import { isNullOrUnDef } from '/@/utils/is'; |
| | |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | fixed: 'right', |
| | | }, //自定义操作列 |
| | | }, |
| | | }); |
| | | const { createMessage: msg } = useMessage(); |
| | | const currentEditKeyRef = ref(''); |
| | |
| | | console.log(`第${index + 1}张图片已加载,URL为:${url}`, dom); |
| | | }; |
| | | // 可以使用createImgPreview返回的 PreviewActions 来控制预览逻辑,实现类似幻灯片、自动旋转之类的骚操作 |
| | | createImgPreview({ imageList: [dataSource[0].LABEL_VIEW_PATH], defaultWidth: 700, rememberState: true, onImgLoad }); |
| | | createImgPreview({ |
| | | imageList: [dataSource[0].LABEL_VIEW_PATH], |
| | | defaultWidth: 700, |
| | | rememberState: true, |
| | | onImgLoad, |
| | | }); |
| | | } |
| | | |
| | | async function onDataReceive(data) { |
| | |
| | | } |
| | | |
| | | /** |
| | | * @description: 删除行 |
| | | * @param {*} record |
| | | * @return {*} |
| | | */ |
| | | function handleDel(record: EditRecordRow) { |
| | | //删除 |
| | | DeleteEntity(record, ctype.value).then((action) => { |
| | | if (action.IsSuccessed) { |
| | | reload(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * @description: 取消编辑 |
| | | * @param {*} record |
| | | * @return {*} |
| | |
| | | onClick: handleEdit.bind(null, record), |
| | | name: '', |
| | | }, |
| | | { |
| | | label: '删除', |
| | | color: 'error', |
| | | disabled: currentEditKeyRef.value ? currentEditKeyRef.value !== record.key : false, |
| | | onClick: handleDel.bind(null, record), |
| | | name: '', |
| | | }, |
| | | ]; |
| | | } |
| | | return [ |