[update] 禅道bug

This commit is contained in:
zhaomeijing
2022-06-16 14:14:10 +08:00
parent dd6168c739
commit e07dfe9ceb
@@ -400,7 +400,7 @@ export default {
SelectChangelabel: false, // 控件校验 SelectChangelabel: false, // 控件校验
inputChangelabel: false, // 控件备选值校验 inputChangelabel: false, // 控件备选值校验
buttonChangelabel: false, // 模板校验 buttonChangelabel: false, // 模板校验
contentListedEdit: [], // 认证类别编辑 contentListStart: [], // 认证类别编辑
} }
}, },
mounted() { mounted() {
@@ -408,6 +408,22 @@ export default {
this.getSysCategoryTree() this.getSysCategoryTree()
}, },
methods: { methods: {
getcontentListedEdit() {
getAction('sys/dict/getDictItems/cert_category', { }).then((res) => {
if (res.success) {
let tt = []
res.result.forEach((item) => {
let obj = {
isdisable: false,
certCategory: item.value
}
tt.push(Object.assign(obj,item))
})
this.contentListStart = tt
// this.contentList = tt
}
})
},
uploadSuccess(data) { uploadSuccess(data) {
let attIdList = [] let attIdList = []
if (data && data.length > 0) { if (data && data.length > 0) {
@@ -431,43 +447,20 @@ export default {
}) })
}, },
Onchangelabel(val) { Onchangelabel(val) {
// 新增 let _tt = []
if(this.title === '新增') { this.contentListStart.forEach((itemVal) => {
let _tt = []
val.forEach((item) => { val.forEach((item) => {
_tt.push({ if(itemVal.value === item.value) {
textVal: item.text, // tab _tt.push(itemVal)
certCategory: item.value, // 所属认证类别 }
paramsNumber: '', // 编号
paramsName: '', // 参数名称
description: ''// 参数说明
})
}) })
this.contentList = _tt })
} else { this.contentList = _tt
let _val = []
val.map((itemVal) => {
this.contentListedEdit.forEach((item) => {
if(item.certCategory == itemVal.value) {
itemVal.textVal = item.textVal
itemVal.certCategory = item.value
itemVal.paramsNumber = item.nioNumber
itemVal.paramsName = item.paramsName
itemVal.description = item.description
}
})
_val.push(itemVal)
})
this.contentList = _val
}
}, },
Onchange(val) { Onchange(val) {
if(this.formInline.certCategory == '') { if(this.formInline.certCategory == '') {
this.contentList = [] this.contentList = []
} }
},
callback() {
}, },
getSysCategoryTree() { getSysCategoryTree() {
getAction('/sys/category/getSysCategoryTree', {}).then((res) => { getAction('/sys/category/getSysCategoryTree', {}).then((res) => {
@@ -491,6 +484,8 @@ export default {
this.visible = true this.visible = true
this.title = '新增' this.title = '新增'
this.formInline = {} this.formInline = {}
// 获取认证类别
this.getcontentListedEdit()
this.formInline.isMust = '0' this.formInline.isMust = '0'
this.formInline = {...this.formInline} this.formInline = {...this.formInline}
this.contentListed = [] // 防止编辑数据带出 this.contentListed = [] // 防止编辑数据带出
@@ -500,6 +495,7 @@ export default {
}) })
}, },
editModel(value) { editModel(value) {
this.contentList = []
this.contentListed = [] this.contentListed = []
this.visible = true this.visible = true
this.formInline = value this.formInline = value
@@ -509,7 +505,7 @@ export default {
this.contentListed.push(item) this.contentListed.push(item)
}) })
this.contentList = this.contentListed this.contentList = this.contentListed
this.contentListedEdit = this.contentListed console.log(this.contentList,'lllll')
}, },
handleCancel() { handleCancel() {
this.visible = false this.visible = false
@@ -546,11 +542,13 @@ export default {
falg = 0 falg = 0
return return
} }
// 参数说明的限制 if(item.description !== undefined && item.description !== null){
if(item.description.length > 200){ // 参数说明的限制
this.$message.warning(this.$t('ParameterDescription')+this.$t('cantExeed')+'200'+this.$t('Characters')) if(item.description.length > 200){
falg = 0 this.$message.warning(this.$t('ParameterDescription')+this.$t('cantExeed')+'200'+this.$t('Characters'))
return falg = 0
return
}
} }
}) })
if(falg === 1) { if(falg === 1) {