|
|
@@ -33,7 +33,8 @@
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item>
|
|
|
<template slot="label"> 材质 </template>
|
|
|
- {{ info.category.extendField && JSON.parse(info.category.extendField).texture }}
|
|
|
+ {{getDictValue('周转车材质', info.category.materialQuality)}}
|
|
|
+ <!-- {{ info.category.extendField && JSON.parse(info.category.extendField).texture }} -->
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item>
|
|
|
<template slot="label"> 型号 </template>
|
|
|
@@ -88,11 +89,7 @@
|
|
|
<span class="border-span">文档信息</span>
|
|
|
</div>
|
|
|
<div class="upload-container">
|
|
|
- <!-- <UploadImg
|
|
|
- @getImgs="cbUploadImg"
|
|
|
- :assetName="`周转车`"
|
|
|
- ref="UploadImg"
|
|
|
- /> -->
|
|
|
+ <WithView v-model="imageUrl" :limit="1" :assetName="'周转车'"/>
|
|
|
</div>
|
|
|
<div class="basic-details-title border-none">
|
|
|
<span class="border-span">扩展信息</span>
|
|
|
@@ -151,7 +148,13 @@
|
|
|
<script>
|
|
|
import { getAssetInfo , saveOrEdit } from '@/api/ledgerAssets';
|
|
|
import { listOrganizations } from '@/api/system/organization';
|
|
|
+ import WithView from '@/components/upload/WithView';
|
|
|
+ import dictMixins from '@/mixins/dictMixins';
|
|
|
export default {
|
|
|
+ mixins: [dictMixins],
|
|
|
+ components: {
|
|
|
+ WithView
|
|
|
+ },
|
|
|
data () {
|
|
|
return {
|
|
|
formData: {},
|
|
|
@@ -163,7 +166,7 @@
|
|
|
itemForm: {
|
|
|
addList: []
|
|
|
},
|
|
|
- imageUrl: null,
|
|
|
+ imageUrl: {},
|
|
|
treeData:[],
|
|
|
btnLoading: false,
|
|
|
};
|
|
|
@@ -172,6 +175,7 @@
|
|
|
let id = this.$route.query.id;
|
|
|
this.getDetilInfo(id);
|
|
|
this.query();
|
|
|
+ this.requestDict('周转车材质');
|
|
|
},
|
|
|
methods: {
|
|
|
// 树形结构数据
|
|
|
@@ -191,20 +195,13 @@
|
|
|
async getDetilInfo (id) {
|
|
|
const res = await getAssetInfo(id);
|
|
|
if (res) {
|
|
|
- this.info = res.data;
|
|
|
- this.$set(this.info, 'category', res.data.category);
|
|
|
- // this.$set(this.info, 'warehouseDetail', res.data.warehouseDetail);
|
|
|
- // this.$set(this.info, 'imgUrl', res.data.imageUrl)
|
|
|
+ this.info = res;
|
|
|
+ this.$set(this.info, 'category', res.category);
|
|
|
this.itemForm.addList = this.info.extInfoSelf
|
|
|
? this.info.extInfoSelf
|
|
|
: [];
|
|
|
// 设备图片
|
|
|
- this.imageUrl = res.data.imageUrl;
|
|
|
- if (this.imageUrl) {
|
|
|
- imageView(this.imageUrl).then((res) => {
|
|
|
- this.$refs.UploadImg.setImg(res);
|
|
|
- });
|
|
|
- }
|
|
|
+ this.imageUrl = res.imageUrl?res.imageUrl:{}
|
|
|
}
|
|
|
},
|
|
|
|
|
|
@@ -238,12 +235,12 @@
|
|
|
id: this.info.id,
|
|
|
code: this.info.code,
|
|
|
fixCode: this.info.fixCode,
|
|
|
- // imageUrl: this.imageUrl,
|
|
|
+ imageUrl: this.imageUrl || {},
|
|
|
extInfoSelf: extendField,
|
|
|
ownershipGroupId: this.info.ownershipGroupId,
|
|
|
rootCategoryLevelId:this.info.rootCategoryLevelId,
|
|
|
categoryId:this.info.categoryId,
|
|
|
- positionIds: JSON.parse(this.info.category.categoryLevelPathId).join(',')
|
|
|
+ positionIds: typeof this.info.category.categoryLevelPathId == 'string'? this.info.category.categoryLevelPathId : JSON.parse(this.info.category.categoryLevelPathId).join(',')
|
|
|
};
|
|
|
this.btnLoading = true;
|
|
|
this.$refs['formCustom'].validate((valid) => {
|