fix:知识库动态列错乱显示bug
This commit is contained in:
parent
25c45024f7
commit
1a300b0ce7
|
@ -28,39 +28,25 @@
|
|||
<el-button @click="reset">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle"
|
||||
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" :key="Math.random()"
|
||||
style="width: 100%" height="650px">
|
||||
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
||||
<af-table-column :show-overflow-tooltip="true" width="280" prop="name" label="名称" header-align="center"
|
||||
align="center"></af-table-column>
|
||||
<af-table-column :show-overflow-tooltip="true" prop="description" label="描述" header-align="center"
|
||||
align="center"></af-table-column>
|
||||
<!-- <af-table-column :show-overflow-tooltip="true" width="280" prop="deptName" label="归属部门" header-align="center"
|
||||
align="center"></af-table-column>
|
||||
<af-table-column :show-overflow-tooltip="true" width="280" prop="deptContacts" label="部门联系人"
|
||||
<el-table-column type="selection" header-align="center" align="center" width="50">
|
||||
</el-table-column>
|
||||
<af-table-column :show-overflow-tooltip="true" width="280" prop="name" label="名称"
|
||||
header-align="center" align="center"></af-table-column>
|
||||
<af-table-column :show-overflow-tooltip="true" width="280" prop="deptPhone" label="部门联系人电话"
|
||||
<af-table-column :show-overflow-tooltip="true" prop="description" label="描述"
|
||||
header-align="center" align="center"></af-table-column>
|
||||
<af-table-column :show-overflow-tooltip="true" width="280" prop="shareCondition" label="共享条件"
|
||||
header-align="center" align="center"></af-table-column> -->
|
||||
|
||||
<template v-if="dataList[0] && dataList[0].infoList2">
|
||||
<af-table-column
|
||||
:show-overflow-tooltip="true"
|
||||
width="280"
|
||||
v-for="(item, index) in dataList[0].infoList2"
|
||||
:key="index"
|
||||
:label="item.attrType"
|
||||
header-align="center"
|
||||
align="center"
|
||||
>
|
||||
<af-table-column :show-overflow-tooltip="true" width="280" v-for="(item, index) in dataList[0].infoList2"
|
||||
:key="index" :label="item.attrType" header-align="center" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ findValue(scope.row.infoList2, item.attrType) }}
|
||||
</template>
|
||||
</af-table-column>
|
||||
</template>
|
||||
|
||||
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
|
||||
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center"
|
||||
width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="$hasPermission('ability:knowledgeBase:update')" type="text" size="small"
|
||||
@click="UpdateData(scope.row)">{{ $t('update') }}</el-button>
|
||||
|
@ -164,6 +150,7 @@ export default {
|
|||
mounted() {
|
||||
// window.addEventListener('resize', this.a)
|
||||
// this.fullScreen()
|
||||
this.reset()
|
||||
},
|
||||
methods: {
|
||||
reset() {
|
||||
|
@ -405,7 +392,12 @@ export default {
|
|||
this.submitFrom.infoList = this.submitFrom.infoList.sort(
|
||||
(a, b) => arr.indexOf(a.attrType) - arr.indexOf(b.attrType)
|
||||
)
|
||||
console.log('this.submitFrom------------>', this.submitFrom);
|
||||
this.submitFrom.infoList.forEach(v => {
|
||||
if (v.attrType == '知识库类型') {
|
||||
v.attrValue = v.attrValue || this.radio
|
||||
}
|
||||
})
|
||||
console.log('this.submitFrom-----表单提交------->', this.submitFrom.infoList);
|
||||
this.notFilled = []
|
||||
if (!this.submitFrom.name) {
|
||||
this.notFilled.push('标准名称')
|
||||
|
@ -480,9 +472,14 @@ export default {
|
|||
(item) => item.name === '知识库'
|
||||
)[0]
|
||||
console.log('this.insertList-------www----->', this.insertList);
|
||||
this.radio = item.infoList.filter(
|
||||
let _knowType = item.infoList.find((val) => val.attrType === '知识库类型') || {};
|
||||
console.log('_knowType------------>', _knowType);
|
||||
|
||||
this.radio = item.infoList.find(
|
||||
(val) => val.attrType === '知识库类型'
|
||||
)[0].attrValue
|
||||
).attrValue
|
||||
console.log('item.infoList------------>', item.infoList);
|
||||
console.log('this.radio---www--------->', this.radio);
|
||||
this.putOnTheShelfList = this.insertList.children.filter(
|
||||
(item) => item.name === this.radio
|
||||
)[0].children;
|
||||
|
|
Loading…
Reference in New Issue