| | |
| | | console.log(`第${index + 1}张图片已加载,URL为:${url}`, dom); |
| | | }; |
| | | // 可以使用createImgPreview返回的 PreviewActions 来控制预览逻辑,实现类似幻灯片、自动旋转之类的骚操作 |
| | | const Keys = Object.getOwnPropertyNames(others.value); |
| | | let path = ''; |
| | | dataSource.map((item) => { |
| | | for (const k in Keys) { |
| | | if (item[Keys[k]] == others.value[Keys[k]] && !isNullOrEmpty(others.value[Keys[k]])) { |
| | | path = item['LABEL_VIEW_PATH']; |
| | | return; |
| | | } |
| | | } |
| | | }); |
| | | if(isNullOrEmpty(path)){ |
| | | path = dataSource.filter((q) => isNullOrEmpty(q.WORK_ORDER) || isNullOrEmpty(q.PROD_CODE))[0].LABEL_VIEW_PATH; |
| | | } |
| | | createImgPreview({ |
| | | imageList: [ |
| | | dataSource.filter((q) => q.WORK_ORDER == others.value.WORK_ORDER)[0].LABEL_VIEW_PATH, |
| | | ], |
| | | imageList: [path], |
| | | defaultWidth: 700, |
| | | rememberState: true, |
| | | onImgLoad, |
| | |
| | | * @return {*} |
| | | */ |
| | | function handleDel(record: EditRecordRow) { |
| | | if (!isNullOrEmpty(record.WORK_ORDER)) { |
| | | if (!isNullOrEmpty(record.WORK_ORDER) || !isNullOrEmpty(record.PROD_CODE)) { |
| | | //删除 |
| | | DeleteEntity(record, ctype.value).then((action) => { |
| | | if (action.IsSuccessed) { |
| | |
| | | reload(); |
| | | } |
| | | }); |
| | | }else{ |
| | | } else { |
| | | msg.error({ content: t('没有需要删除的变量'), key: 'saving' }); |
| | | } |
| | | } |