|
|
@ -129,13 +129,18 @@ export default {
|
|
|
|
this.id = record.id
|
|
|
|
this.id = record.id
|
|
|
|
this.visible = true
|
|
|
|
this.visible = true
|
|
|
|
setTimeout(() => {
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
|
|
let cateCode = []
|
|
|
|
|
|
|
|
record.cateCode.split('[').forEach(item => {
|
|
|
|
|
|
|
|
if (item) {
|
|
|
|
|
|
|
|
item.split(']').forEach(item2 => {
|
|
|
|
|
|
|
|
if (item2) {
|
|
|
|
|
|
|
|
cateCode.push(item2)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
this.form.setFieldsValue({
|
|
|
|
this.form.setFieldsValue({
|
|
|
|
cateCode: record.cateCode
|
|
|
|
cateCode: record.cateCode ? cateCode : null,
|
|
|
|
? record.cateCode
|
|
|
|
|
|
|
|
.split('[')[1]
|
|
|
|
|
|
|
|
.split(']')[0]
|
|
|
|
|
|
|
|
.split(',')
|
|
|
|
|
|
|
|
: null,
|
|
|
|
|
|
|
|
cateName: record.cateName,
|
|
|
|
cateName: record.cateName,
|
|
|
|
displayName: record.displayName,
|
|
|
|
displayName: record.displayName,
|
|
|
|
tenantId: record.tenantId,
|
|
|
|
tenantId: record.tenantId,
|
|
|
@ -171,9 +176,9 @@ export default {
|
|
|
|
values.cateName = cateName
|
|
|
|
values.cateName = cateName
|
|
|
|
let cateCode = ''
|
|
|
|
let cateCode = ''
|
|
|
|
values.cateCode.forEach(item => {
|
|
|
|
values.cateCode.forEach(item => {
|
|
|
|
cateCode ? (cateCode = `${cateCode},${item}`) : (cateCode = item)
|
|
|
|
cateCode = `${cateCode}[${item}]`
|
|
|
|
})
|
|
|
|
})
|
|
|
|
values.cateCode = `[${cateCode}]`
|
|
|
|
values.cateCode = cateCode
|
|
|
|
for (const key in values) {
|
|
|
|
for (const key in values) {
|
|
|
|
console.log(key, 1)
|
|
|
|
console.log(key, 1)
|
|
|
|
if (typeof values[key] === 'object' && !(values[key] === null)) {
|
|
|
|
if (typeof values[key] === 'object' && !(values[key] === null)) {
|
|
|
|