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

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

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

Loading…
Cancel
Save