|
@ -194,8 +194,9 @@ |
|
|
:width="600" |
|
|
:width="600" |
|
|
:maxHeight="900" |
|
|
:maxHeight="900" |
|
|
:style="{height:'600px'}" |
|
|
:style="{height:'600px'}" |
|
|
|
|
|
:key="dialogFormKey" |
|
|
> |
|
|
> |
|
|
<el-form ref="fileDialogUploadRef" :model="fileDialogUploadData" :key="dialogFormKey"> |
|
|
<el-form ref="fileDialogUploadRef" :model="fileDialogUploadData" > |
|
|
<el-form-item label="文件选择"> |
|
|
<el-form-item label="文件选择"> |
|
|
<UploadFile v-model="fileDialogUploadData.filePathList" :limit="20" /> |
|
|
<UploadFile v-model="fileDialogUploadData.filePathList" :limit="20" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
@ -220,6 +221,8 @@ import BasicForm from '@/components/BasicForm/src/BasicForm.vue' |
|
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
import DetailTable from '@/components/DetailTable/src/DetailTable.vue' |
|
|
import DetailTable from '@/components/DetailTable/src/DetailTable.vue' |
|
|
import { useUserStoreWithOut } from '@/store/modules/user' |
|
|
import { useUserStoreWithOut } from '@/store/modules/user' |
|
|
|
|
|
import * as fileApi from '@/api/infra/file' |
|
|
|
|
|
import { el } from 'element-plus/es/locale' |
|
|
|
|
|
|
|
|
defineOptions({ name: 'Detail' }) |
|
|
defineOptions({ name: 'Detail' }) |
|
|
|
|
|
|
|
@ -242,6 +245,7 @@ const dialogUploadNumber = ref() |
|
|
const dialogUploadBusiCode = ref() |
|
|
const dialogUploadBusiCode = ref() |
|
|
const dialogFormKey = ref(0) |
|
|
const dialogFormKey = ref(0) |
|
|
const milestoneUpdateKey = ref(0) |
|
|
const milestoneUpdateKey = ref(0) |
|
|
|
|
|
const fileDialogUploadRef = ref() |
|
|
const props = defineProps({ |
|
|
const props = defineProps({ |
|
|
// 标签参数 |
|
|
// 标签参数 |
|
|
tabs: { |
|
|
tabs: { |
|
@ -472,6 +476,9 @@ const change = (item, index) => { |
|
|
subIndex.value = 'A' |
|
|
subIndex.value = 'A' |
|
|
formKey.value += 1 |
|
|
formKey.value += 1 |
|
|
getImage() |
|
|
getImage() |
|
|
|
|
|
} else if (item.prop == 'Milestone') { |
|
|
|
|
|
imageParmas.value.funcCode = props.milestoneFuncCode |
|
|
|
|
|
getImage() |
|
|
} else { |
|
|
} else { |
|
|
imageParmas.value.funcCode = '' |
|
|
imageParmas.value.funcCode = '' |
|
|
imageParmas.value.fileBusiType = '' |
|
|
imageParmas.value.fileBusiType = '' |
|
@ -591,6 +598,7 @@ defineExpose({ openDetail }) // 提供 open 方法,用于打开弹窗 |
|
|
// 获取图片详情 |
|
|
// 获取图片详情 |
|
|
const formKey = ref(0) |
|
|
const formKey = ref(0) |
|
|
const getImage = () => { |
|
|
const getImage = () => { |
|
|
|
|
|
fileApi.selectList().then((response) => { |
|
|
props |
|
|
props |
|
|
.getImageApi({ |
|
|
.getImageApi({ |
|
|
number: masterParmas.value.number, |
|
|
number: masterParmas.value.number, |
|
@ -603,11 +611,48 @@ const getImage = () => { |
|
|
imageFormData.value.filePathList = res |
|
|
imageFormData.value.filePathList = res |
|
|
} else { |
|
|
} else { |
|
|
console.log(444,res) |
|
|
console.log(444,res) |
|
|
fileFormData.value.filePathList = res |
|
|
fileFormData.value.filePathList = res.map(item=>{ |
|
|
|
|
|
response.forEach(element=>{ |
|
|
|
|
|
if(item.url == element.url){ |
|
|
|
|
|
item.name = element.name |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
return item |
|
|
|
|
|
}) |
|
|
formKey.value += 1 |
|
|
formKey.value += 1 |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const getImageDialog = () => { |
|
|
|
|
|
fileApi.selectList().then((response) => { |
|
|
|
|
|
props |
|
|
|
|
|
.getImageApi({ |
|
|
|
|
|
number: masterParmas.value.number, |
|
|
|
|
|
funcCode: imageParmas.value.funcCode, |
|
|
|
|
|
fileBusiType: imageParmas.value.fileBusiType |
|
|
|
|
|
}) |
|
|
|
|
|
.then((res) => { |
|
|
|
|
|
nextTick(() => { |
|
|
|
|
|
if (imageParmas.value.funcCode == 'device_mould_picture') { |
|
|
|
|
|
imageFormData.value.filePathList = res |
|
|
|
|
|
} else { |
|
|
|
|
|
console.log(444,res) |
|
|
|
|
|
fileDialogUploadData.value.filePathList = res.map(item=>{ |
|
|
|
|
|
response.forEach(element=>{ |
|
|
|
|
|
if(item.url == element.url){ |
|
|
|
|
|
item.name = element.name |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
return item |
|
|
|
|
|
}) |
|
|
|
|
|
formKey.value += 1 |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const tableObjectRef = ref() |
|
|
const tableObjectRef = ref() |
|
@ -771,7 +816,6 @@ const uploadImage = async () => { |
|
|
// if (!elForm) return |
|
|
// if (!elForm) return |
|
|
// const valid = await elForm.validate() |
|
|
// const valid = await elForm.validate() |
|
|
// if (!valid) return |
|
|
// if (!valid) return |
|
|
imageFormData |
|
|
|
|
|
let data = { |
|
|
let data = { |
|
|
number: masterParmas.value.number, |
|
|
number: masterParmas.value.number, |
|
|
filePathList: imageFormData.value.filePathList.map((item) => item.url), |
|
|
filePathList: imageFormData.value.filePathList.map((item) => item.url), |
|
@ -916,7 +960,7 @@ const submitDialogForm = async (type, row) => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function openDialogUpload(row) { |
|
|
function openDialogUpload(row) { |
|
|
dialogUploadVisible.value = true |
|
|
// dialogUploadVisible.value = true |
|
|
getDialogUpload(row) |
|
|
getDialogUpload(row) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -929,13 +973,27 @@ const openDialogForm = async (type: string, row?: number) => { |
|
|
const getDialogUpload = (row) => { |
|
|
const getDialogUpload = (row) => { |
|
|
dialogUploadNumber.value = row.number |
|
|
dialogUploadNumber.value = row.number |
|
|
dialogUploadBusiCode.value = row.milestoneStage |
|
|
dialogUploadBusiCode.value = row.milestoneStage |
|
|
|
|
|
masterParmas.value.number = row.number, |
|
|
|
|
|
imageParmas.value.fileBusiType = row.milestoneStage |
|
|
props.getImageApi({ |
|
|
props.getImageApi({ |
|
|
number: row.number, |
|
|
number: row.number, |
|
|
funcCode: props.milestoneFuncCode |
|
|
funcCode: props.milestoneFuncCode |
|
|
}) |
|
|
}) |
|
|
.then((res) => { |
|
|
.then((res) => { |
|
|
fileDialogUploadData.value.filePathList = res |
|
|
fileApi.selectList().then(response=>{ |
|
|
|
|
|
fileDialogUploadData.value.filePathList = res.map(item=>{ |
|
|
|
|
|
response.forEach(element=>{ |
|
|
|
|
|
if(item.url == element.url){ |
|
|
|
|
|
item.name = element.name |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
return item |
|
|
|
|
|
}) |
|
|
|
|
|
dialogUploadVisible.value = true |
|
|
dialogFormKey.value += 1 |
|
|
dialogFormKey.value += 1 |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -949,7 +1007,7 @@ function dialogUploadFile() { |
|
|
props.uploadImage(data).then((res) => { |
|
|
props.uploadImage(data).then((res) => { |
|
|
message.success('修改成功') |
|
|
message.success('修改成功') |
|
|
getImage() |
|
|
getImage() |
|
|
dialogUploadVisible.value = false |
|
|
// dialogUploadVisible.value = false |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|