修改禅道bug
This commit is contained in:
@@ -229,7 +229,7 @@
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24" >
|
||||
<a-tabs>
|
||||
<a-tab-pane v-for='(item,index) in contentList' :tab="item.textVal === undefined ? item.text : item.textVal" :key="index + 1">
|
||||
<a-tab-pane v-for='(item,index) in contentList' :tab="item.cut == 'cn' ? item.text : item.textEn" :key="index + 1">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
@@ -398,6 +398,7 @@ export default {
|
||||
disabled: false,
|
||||
projectNameList: [],
|
||||
title: '',
|
||||
cut:'',
|
||||
stateOne: '',
|
||||
contentList : [],
|
||||
contentListed: [], // 编辑 contentList 所带出来的数据
|
||||
@@ -411,6 +412,14 @@ export default {
|
||||
mounted() {
|
||||
this.getNameList()
|
||||
this.getSysCategoryTree()
|
||||
let long = localStorage.getItem('language')
|
||||
this.cut = ''
|
||||
if (long && long == 'zh-cn') {
|
||||
this.cut = 'cn'
|
||||
} else if (long && long == 'en-us') {
|
||||
this.cut = 'en'
|
||||
}
|
||||
console.log(this.cut)
|
||||
},
|
||||
methods: {
|
||||
getcontentListedEdit() {
|
||||
@@ -427,6 +436,7 @@ export default {
|
||||
tt.push(Object.assign(obj,item))
|
||||
})
|
||||
this.contentListStart = tt
|
||||
console.log(this.contentListStart)
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -455,42 +465,86 @@ export default {
|
||||
Onchangelabel(val) {
|
||||
let _tt = []
|
||||
if(this.flag == 1) {
|
||||
this.contentListStart.forEach((itemVal) => {
|
||||
val.forEach((item) => {
|
||||
if(itemVal.value === item.value) {
|
||||
_tt.push(itemVal)
|
||||
}
|
||||
if(this.cut == 'cn'){
|
||||
this.contentListStart.forEach((itemVal) => {
|
||||
val.forEach((item) => {
|
||||
if(itemVal.value === item.value) {
|
||||
itemVal.cut = 'cn'
|
||||
_tt.push(itemVal)
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}else {
|
||||
this.contentListStart.forEach((itemVal) => {
|
||||
val.forEach((item) => {
|
||||
if(itemVal.value === item.value) {
|
||||
itemVal.cut = 'en'
|
||||
_tt.push(itemVal)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
this.contentList = _tt
|
||||
|
||||
} else {
|
||||
let _mm = []
|
||||
this.contentListStart.forEach((itemVal) => {
|
||||
val.forEach((item) => {
|
||||
if(itemVal.value === item.value) {
|
||||
_mm.push(itemVal)
|
||||
}
|
||||
if(this.cut == 'cn'){
|
||||
this.contentListStart.forEach((itemVal) => {
|
||||
val.forEach((item) => {
|
||||
if(itemVal.value === item.value) {
|
||||
itemVal.cut = 'cn'
|
||||
_mm.push(itemVal)
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
_mm.forEach((item) => {
|
||||
this.contentListed.forEach((itemVal) => {
|
||||
// 原编辑的数据
|
||||
if(itemVal.certCategory === item.value) {
|
||||
_mm.forEach((item) => {
|
||||
this.contentListed.forEach((itemVal) => {
|
||||
// 原编辑的数据
|
||||
if(itemVal.certCategory === item.value) {
|
||||
item.textVal= itemVal.textVal,
|
||||
item.certCategory= itemVal.certCategory,
|
||||
item.paramsNumber= itemVal.paramsNumber, // 编号
|
||||
item.paramsName= itemVal.paramsName, //参数名称
|
||||
item.description= itemVal.description // 描述
|
||||
}
|
||||
item.certCategory= itemVal.certCategory,
|
||||
item.paramsNumber= itemVal.paramsNumber, // 编号
|
||||
item.paramsName= itemVal.paramsName, //参数名称
|
||||
item.cut= itemVal.cut, //中英文标识
|
||||
item.description= itemVal.description // 描述
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}else {
|
||||
this.contentListStart.forEach((itemVal) => {
|
||||
val.forEach((item) => {
|
||||
if(itemVal.value === item.value) {
|
||||
itemVal.cut = 'en'
|
||||
_mm.push(itemVal)
|
||||
}
|
||||
})
|
||||
})
|
||||
_mm.forEach((item) => {
|
||||
this.contentListed.forEach((itemVal) => {
|
||||
// 原编辑的数据
|
||||
if(itemVal.certCategory === item.value) {
|
||||
item.textVal= itemVal.textVal,
|
||||
item.certCategory= itemVal.certCategory,
|
||||
item.paramsNumber= itemVal.paramsNumber, // 编号
|
||||
item.paramsName= itemVal.paramsName, //参数名称
|
||||
item.cut= itemVal.cut, //中英文标识
|
||||
item.description= itemVal.description // 描述
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
this.contentList = _mm
|
||||
console.log(this.contentList)
|
||||
}
|
||||
},
|
||||
Onchange(val) {
|
||||
if(this.formInline.certCategory == '') {
|
||||
this.contentList = []
|
||||
console.log(this.formInline)
|
||||
if(this.formInline.certCategory == '' && this.flag == 1) {
|
||||
console.log(1111)
|
||||
this.contentList= []
|
||||
}
|
||||
|
||||
},
|
||||
getSysCategoryTree() {
|
||||
getAction('/sys/category/getSysCategoryTree', {}).then((res) => {
|
||||
@@ -540,10 +594,19 @@ export default {
|
||||
// 获取认证类别
|
||||
this.getcontentListedEdit()
|
||||
value.certCategoryParamsInfoEOList.map((item, index) => {
|
||||
item.textVal = item.certCategory_dictText
|
||||
this.contentListed.push(item)
|
||||
if(this.cut == 'cn'){
|
||||
item.cut = 'cn'
|
||||
this.contentListed.push(item)
|
||||
item.text = item.certCategory_dictText
|
||||
}else {
|
||||
item.cut = 'en'
|
||||
this.contentListed.push(item)
|
||||
item.textEn = item.certCategory_dictText
|
||||
}
|
||||
|
||||
})
|
||||
this.contentList = this.contentListed
|
||||
console.log(this.contentList)
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
|
||||
@@ -229,7 +229,7 @@ export default {
|
||||
if (res.success) {
|
||||
this.$message.success(res.result)
|
||||
} else {
|
||||
this.$message.warning(res.result)
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user