|
|
@ -191,8 +191,7 @@ import { |
|
|
|
SaveList, |
|
|
|
selectByOrgSid |
|
|
|
} from '@/api/cheliang/basevehiclemodel' |
|
|
|
import {fetchBySid} from '@/api/cheliang/dictcommons' |
|
|
|
import { typeValues } from '@/api/cheliang/dictcommons' |
|
|
|
import { fetchBySid, typeValues } from '@/api/cheliang/dictcommons' |
|
|
|
import Upload from '@/components/uploadFile/uploadImg.vue' |
|
|
|
|
|
|
|
export default { |
|
|
@ -353,7 +352,41 @@ export default { |
|
|
|
this.setDetaList() |
|
|
|
this.getChang() |
|
|
|
}, |
|
|
|
|
|
|
|
showQuickAdd(sid) { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs['dataForm'].clearValidate() |
|
|
|
}) |
|
|
|
this.dialogStatus = 'add' |
|
|
|
this.stateId = 0 |
|
|
|
this.viewTitle = '【新增】常用配置信息' |
|
|
|
// 此时数据必须修改才能保存 |
|
|
|
const userSid = window.sessionStorage.getItem('userSid') |
|
|
|
getAll({ sid: sid, userSid: userSid }).then(resp => { |
|
|
|
if (resp.success) { |
|
|
|
const data = resp.data |
|
|
|
this.temp = data |
|
|
|
this.temp = JSON.parse(JSON.stringify(this.temp).replace( |
|
|
|
/baseVehicleModelAppendixVos/g, |
|
|
|
'baseVehicleModelAppendixDtos' |
|
|
|
) |
|
|
|
) |
|
|
|
this.temp.sid = '' |
|
|
|
if (this.temp.baseVehicleModelAppendixDtos.length > 0) { |
|
|
|
for (var i = 0; i < this.temp.baseVehicleModelAppendixDtos.length; i++) { |
|
|
|
var imgName = this.temp.baseVehicleModelAppendixDtos[i].filePath.split('/') |
|
|
|
this.imgList.push({ |
|
|
|
name: imgName[imgName.length - 1], |
|
|
|
url: this.temp.baseVehicleModelAppendixDtos[i].filePath |
|
|
|
}) |
|
|
|
} |
|
|
|
console.log('123123', this.imgList) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
this.getPathSid() |
|
|
|
this.setDetaList() |
|
|
|
this.getChang() |
|
|
|
}, |
|
|
|
showEdit(sid, row) { |
|
|
|
console.log(sid) |
|
|
|
console.log('imgList', this.imgList) |
|
|
@ -426,13 +459,15 @@ export default { |
|
|
|
}, |
|
|
|
getUrl() { |
|
|
|
console.log('已有图片', this.imgList) |
|
|
|
var img_file = [] |
|
|
|
for (var i = 0; i < this.imgList.length; i++) { |
|
|
|
console.log(this.temp) |
|
|
|
this.temp.baseVehicleModelAppendixDtos.push({ |
|
|
|
img_file.push({ |
|
|
|
modelSid: this.temp.sid, |
|
|
|
filePath: this.imgList[i].url |
|
|
|
}) |
|
|
|
} |
|
|
|
this.temp.baseVehicleModelAppendixDtos = img_file |
|
|
|
}, |
|
|
|
updateUrl() { |
|
|
|
console.log('回显', this.imgList) |
|
|
|