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