NEZ-3178 fix:software asset 列表页面无法正常显示数据 以及样式调整
This commit is contained in:
@@ -41,3 +41,10 @@
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
.right-box-editSoftwareAsset .right-box__container {
|
||||
.el-form .form__dotted-item {
|
||||
padding: 0;
|
||||
border: none;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div v-clickoutside="{obj: editSoftwareAsset, func: esc}" class="right-box right-box-editSoftwareAsset right-box-edit-endpoint ">
|
||||
<div v-clickoutside="{obj: editSoftwareAsset,oldData:oldData, func: esc}" class="right-box right-box-editSoftwareAsset right-box-edit-endpoint ">
|
||||
<div class="right-box__header">
|
||||
<div class="header__title">{{editSoftwareAsset.id ? $t('softwareAsset.edit') : $t('softwareAsset.create')}}</div>
|
||||
<div class="header__operation">
|
||||
@@ -184,6 +184,7 @@ export default {
|
||||
return {
|
||||
assetConstants,
|
||||
disabled: false,
|
||||
oldData: {},
|
||||
editSoftwareAsset: {
|
||||
id: '',
|
||||
name: '',
|
||||
@@ -252,13 +253,17 @@ export default {
|
||||
this.isEdit = true
|
||||
const editSoftwareAsset = JSON.parse(JSON.stringify(n))
|
||||
editSoftwareAsset.paramObj = []
|
||||
if (editSoftwareAsset.projectId === -1) {
|
||||
editSoftwareAsset.projectId = ''
|
||||
}
|
||||
editSoftwareAsset.assetId = ''
|
||||
// if (editSoftwareAsset.params) {
|
||||
// Object.keys(editSoftwareAsset.params).forEach(key => {
|
||||
// editSoftwareAsset.paramObj.push(editSoftwareAsset.params[key])
|
||||
// })
|
||||
// }
|
||||
editSoftwareAsset.assetId = ''
|
||||
this.editSoftwareAsset = editSoftwareAsset
|
||||
this.oldData = this.$lodash.cloneDeep(this.editSoftwareAsset)
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -269,7 +274,10 @@ export default {
|
||||
},
|
||||
mounted () {
|
||||
setTimeout(() => {
|
||||
if (this.obj.assetId && this.obj.assetId !== -1) {
|
||||
this.editSoftwareAsset.assetId = this.obj.assetId + ''
|
||||
this.oldData = this.$lodash.cloneDeep(this.editSoftwareAsset)
|
||||
}
|
||||
}, 500)
|
||||
},
|
||||
methods: {
|
||||
@@ -381,6 +389,7 @@ export default {
|
||||
}
|
||||
this.editSoftwareAsset.paramObj.push(findItem.params[key])
|
||||
})
|
||||
this.oldData = this.$lodash.cloneDeep(this.editSoftwareAsset)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
</div>
|
||||
<el-form-item prop="paramObj">
|
||||
<div v-for="(label, i) in editSoftwareType.paramObj" :key="i" class="form__dotted-item form__dotted-item-required">
|
||||
<el-form-item :prop="'paramObj.' + i + '.value.0'" :rules="[ { required: JSON.parse(label.param).required === '1', message: $t('validate.required'), trigger: 'blur' }]">
|
||||
<el-form-item :prop="'paramObj.' + i + '.value.0'" :rules="[]">
|
||||
<template v-slot:label>
|
||||
<div class="form__labels-label">
|
||||
<span>{{label.name}}</span>
|
||||
|
||||
@@ -44,7 +44,8 @@
|
||||
</copy>
|
||||
</template>
|
||||
<template v-else-if="item.prop === 'asset'">
|
||||
<div class="document-copy-block">
|
||||
<div>
|
||||
<div class="document-copy-block" v-if="scope.row.asset">
|
||||
<span
|
||||
class="document-copy-text"
|
||||
:title="scope.row.asset&&scope.row.asset.name"
|
||||
@@ -55,6 +56,8 @@
|
||||
</span>
|
||||
<i v-if="scope.row.asset&&scope.row.asset.name" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row.asset.name)" :title="$t('overall.copyText')"></i>
|
||||
</div>
|
||||
<span v-else>--</span>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="item.prop === 'category'">
|
||||
<div>
|
||||
@@ -62,7 +65,8 @@
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="item.prop === 'project'">
|
||||
<div class="document-copy-block">
|
||||
<div>
|
||||
<div class="document-copy-block" v-if="scope.row.project">
|
||||
<span class="document-copy-text"
|
||||
:title="scope.row[item.prop].name"
|
||||
@mouseenter="labelHover(scope.row, item.prop, true,true, $event)"
|
||||
@@ -71,6 +75,8 @@
|
||||
</span>
|
||||
<i v-if="scope.row[item.prop].name" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row[item.prop].name)" :title="$t('overall.copyText')"></i>
|
||||
</div>
|
||||
<span v-else>--</span>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="item.prop === 'type'">
|
||||
{{scope.row.type ? scope.row.type.name : '-'}}
|
||||
|
||||
Reference in New Issue
Block a user