fix: 文件入参调整

main
wx-jincw 5 days ago
parent 78f926e3e6
commit 5efd904a86

@ -62,3 +62,16 @@ export function sysdicttypeListApi(params) {
})
}
/**
* sysdicttype详情
* @param pram
*/
export function sysdicttypeTypesApi(types) {
return request({
url: `autogencode/sysdicttype/types`,
method: 'GET',
params: {
types,
}
})
}

@ -1,7 +1,7 @@
import Vue from 'vue'
import store from '@/store'
import DataDict from '@/utils/dict'
import { getDicts as getDicts, getBatchDicts } from '@/api/system/dict/data'
import { sysdicttypeTypesApi } from '@/api/system/dict/data'
function searchDictByKey(dict, key) {
if (key == null && key == "") {
@ -48,7 +48,7 @@ function install() {
timer = null;
isRequesting = true;
// 批量获取字典
getBatchDicts(requesting.map(item => item.type)).then(res => {
sysdicttypeTypesApi(requesting.map(item => item.type)).then(res => {
const datas = res.data || {};
requesting.forEach(item => {
store.dispatch('dict/setDict', { key: item.type, value: datas[item.type] || [] });

@ -237,7 +237,6 @@ export default {
// SystemAttachment
// attIdfileId
attId: fileInfo.attId || fileInfo.id || '', // 使attIdfallbackid
fileId: fileInfo.fileId || fileInfo.id || '', // 使fileIdfallbackid
//
debugInfo: {
originalFileInfo: JSON.parse(JSON.stringify(fileInfo)),
@ -250,7 +249,7 @@ export default {
attachFileUrl: fileInfo.url || fileInfo.path || '',
remark: _this.uploadParame.remark || '',
// SystemAttachment
attSize: param.file.size ? param.file.size.toString() : '', //
attSize: param.file.size, //
attType: param.file.name ? param.file.name.split('.').pop().toLowerCase() : '' //
};
_this.uploadList.push(newFile);

@ -354,13 +354,11 @@ export default {
}
// ID
const attId = file.id || file.fileId || ''
const fileId = file.id || file.fileId || ''
const attId = file.attId || '';
return {
// SystemAttachment
attId: attId.toString(), //
fileId: fileId.toString(), //
attId: attId, //
name: file.name || file.fileName || '',
oldName: file.name || file.fileName || '',
attachFileUrl: attachFileUrl,
@ -398,13 +396,11 @@ export default {
}
// IDInteger
const attId = file.id || file.fileId || ''
const fileId = file.id || file.fileId || ''
const attId = file.id || file.attId || ''
return {
// SystemAttachment
attId: attId.toString(), //
fileId: fileId.toString(), // id
attId: attId, //
name: file.name || file.oldName || '', //
attDir: attDir, //
attSize: file.attSize || '', //

Loading…
Cancel
Save