update 标签管理可配模块数据字典字段处理
This commit is contained in:
@@ -6,9 +6,13 @@ import Vue from 'vue'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import store from '@/store'
|
||||
import { isHasPermission } from '../utils/hasPermission.js'
|
||||
import { FieldType } from '../enums/commonEnums.js'
|
||||
|
||||
let importModalLoading
|
||||
|
||||
// 需要数据字段翻译的属性类型
|
||||
const NEED_DICT_FIELD_TYPE = [FieldType.USER_SINGLE.value, FieldType.ORGAN_SINGLE.value, FieldType.STANDARD_MORE.value, FieldType.ORGAN_MORE.value, FieldType.OPTION_SINGLE.value, FieldType.OPTION_MORE.value, FieldType.TREE.value]
|
||||
|
||||
export const ConfigurableTableMixin = {
|
||||
data () {
|
||||
return {
|
||||
@@ -96,6 +100,7 @@ export const ConfigurableTableMixin = {
|
||||
this.getTableHeaderFunc(params).then(res => {
|
||||
if (res.success) {
|
||||
this.columns = this.dealColumns(res.result || [])
|
||||
console.log(this.columns)
|
||||
this.isTrue = false
|
||||
this.$nextTick(() => {
|
||||
this.isTrue = true
|
||||
@@ -112,12 +117,7 @@ export const ConfigurableTableMixin = {
|
||||
const tempColumns = []
|
||||
columns.forEach(item => {
|
||||
// 可点击项加入插槽
|
||||
// 标准编号和标准名称可以跳转详情页
|
||||
if (item.dbFieldName === 'standard_number' || item.dbFieldName === 'standard_name') {
|
||||
item.scopedSlots = {
|
||||
customRender: 'detailClick'
|
||||
}
|
||||
} else if (item.urlClick === 'true') {
|
||||
if (item.urlClick === 'true') {
|
||||
item.scopedSlots = {
|
||||
customRender: 'urlClick'
|
||||
}
|
||||
@@ -126,7 +126,11 @@ export const ConfigurableTableMixin = {
|
||||
item.sorter = item.sortFlag === 1
|
||||
item.width = 215
|
||||
item.title = item.dbFieldTxt
|
||||
item.dataIndex = item.dbFieldName
|
||||
if (NEED_DICT_FIELD_TYPE.includes(item.fieldShowType)) {
|
||||
item.dataIndex = item.dbFieldName + '_dictText'
|
||||
} else {
|
||||
item.dataIndex = item.dbFieldName
|
||||
}
|
||||
// 在各自页面写此页面需要使用插槽的字段
|
||||
if (this.tableSlotField && this.tableSlotField.includes(item.dbFieldName)) {
|
||||
item.scopedSlots = {
|
||||
|
||||
Reference in New Issue
Block a user