diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue
index 8cc85c7..831eb70 100644
--- a/src/components/BasicForm/src/BasicForm.vue
+++ b/src/components/BasicForm/src/BasicForm.vue
@@ -380,8 +380,10 @@ const open = async (type: string, row?: any, masterParmas?: any) => {
formLoading.value = true
try {
nextTick(() => {
+ console.log('row11',row)
formRef.value.setValues(row)
})
+
} finally {
formLoading.value = false
}
diff --git a/src/components/Detail/src/DetailDeviceLedger.vue b/src/components/Detail/src/DetailDeviceLedger.vue
index 0d352d6..cf0a09a 100644
--- a/src/components/Detail/src/DetailDeviceLedger.vue
+++ b/src/components/Detail/src/DetailDeviceLedger.vue
@@ -594,6 +594,7 @@ const getImage = () => {
if (imageParmas.value.funcCode == 'device_mould_picture') {
imageFormData.value.filePathList = res
} else {
+ console.log(444,res)
fileFormData.value.filePathList = res
formKey.value += 1
}
diff --git a/src/components/UploadFile/src/UploadFile.vue b/src/components/UploadFile/src/UploadFile.vue
index 464a54a..2047ff7 100644
--- a/src/components/UploadFile/src/UploadFile.vue
+++ b/src/components/UploadFile/src/UploadFile.vue
@@ -6,7 +6,7 @@
name="file"
v-model="valueRef"
v-model:file-list="fileList"
- :show-file-list="true"
+ :show-file-list="isShowFileList"
:auto-upload="autoUpload"
:action="updateUrl"
:headers="uploadHeaders"
@@ -28,6 +28,7 @@
格式为 {{ fileType.join('/') }} 的文件
+
@@ -42,6 +43,7 @@ import { PropType } from 'vue'
import { propTypes } from '@/utils/propTypes'
import { getAccessToken, getTenantId } from '@/utils/auth'
import type { UploadInstance, UploadUserFile, UploadProps, UploadRawFile } from 'element-plus'
+import Preview1 from '@/components/UploadFile/src/Preview.vue'
defineOptions({ name: 'UploadFile' })
@@ -63,19 +65,25 @@ const props = defineProps({
drag: propTypes.bool.def(false), // 拖拽上传
isShowTip: propTypes.bool.def(true), // 是否显示提示
isShowFile: propTypes.bool.def(true), // 是否显示上传的文件
+ // isShowFileList: propTypes.bool.def(true), // 是否显示自己上传的文件
})
// ========== 上传相关 ==========
+// setTimeout(()=>{
+
+// console.log('props.modelValue',props.modelValue)
+// },2000)
const valueRef = ref(props.modelValue)
const uploadRef = ref()
const uploadList = ref([])
-console.log('88',props.modelValue)
+
const fileList = props.modelValue && props.modelValue.length > 0 ? ref(props.modelValue) : ref([])
const uploadNumber = ref(0)
const uploadHeaders = ref({
Authorization: 'Bearer ' + getAccessToken(),
'tenant-id': getTenantId()
})
+
// 文件上传之前判断
const beforeUpload: UploadProps['beforeUpload'] = (file: UploadRawFile) => {
if (fileList.value.length >= props.limit) {
@@ -149,6 +157,14 @@ const listToString = (list: UploadUserFile[], separator?: string) => {
}
return strs != '' ? strs.substr(0, strs.length - 1) : ''
}
+watch(
+ () => props.modelValue,
+ (val) => {
+ // if (val === unref(colorVal)) return
+ valueRef.value = val
+ fileList.value = val && val.length > 0 ?val:[]
+ }
+)