|
|
@ -146,12 +146,12 @@
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<vxe-column type="checkbox" width="60"></vxe-column>
|
|
|
|
<vxe-column type="checkbox" width="60"></vxe-column>
|
|
|
|
<vxe-column type="seq" width="60"></vxe-column>
|
|
|
|
<vxe-column type="seq" width="60"></vxe-column>
|
|
|
|
<vxe-column field="roleCode" title="角色" :edit-render="{}">
|
|
|
|
<vxe-column field="WroleCode" title="角色" :edit-render="{}">
|
|
|
|
<template #default="{ row }">
|
|
|
|
<template #default="{ row }">
|
|
|
|
<span>{{ formatRole(row.roleCode) }}</span>
|
|
|
|
<span>{{ formatRole(row.WroleCode) }}</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<template #edit="{ row }">
|
|
|
|
<template #edit="{ row }">
|
|
|
|
<vxe-select v-model="row.roleCode" transfer>
|
|
|
|
<vxe-select v-model="row.WroleCode" multiple transfer>
|
|
|
|
<vxe-option v-for="item in TypeData" :key="item.code" :value="item.code" :label="item.value"></vxe-option>
|
|
|
|
<vxe-option v-for="item in TypeData" :key="item.code" :value="item.code" :label="item.value"></vxe-option>
|
|
|
|
</vxe-select>
|
|
|
|
</vxe-select>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
@ -300,14 +300,22 @@ export default {
|
|
|
|
this.form.setFieldsValue({
|
|
|
|
this.form.setFieldsValue({
|
|
|
|
...res.data
|
|
|
|
...res.data
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
res.data.contacts.forEach((item, index) => {
|
|
|
|
res.data.contacts.forEach((item, index) => {
|
|
|
|
item.WebKey = index
|
|
|
|
item.WebKey = index
|
|
|
|
|
|
|
|
let data = []
|
|
|
|
|
|
|
|
item.roleCode.split(']').forEach(item => {
|
|
|
|
|
|
|
|
if (item) {
|
|
|
|
|
|
|
|
data.push(item.split('[')[1])
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
item.WroleCode = data
|
|
|
|
|
|
|
|
console.log(item.WroleCode)
|
|
|
|
this.ContactsData.push(item)
|
|
|
|
this.ContactsData.push(item)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
sysDictDataPage({ pageNo: 1, pageSize: 999, typeId: '346103538081861' }).then(res => {
|
|
|
|
sysDictDataPage({ pageNo: 1, pageSize: 999, typeId: '346103538081861' }).then(res => {
|
|
|
|
this.TypeData = res.data.rows
|
|
|
|
this.TypeData = res.data.rows
|
|
|
|
console.log(this.TypeData)
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
@ -333,12 +341,15 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
formatRole(value) {
|
|
|
|
formatRole(value) {
|
|
|
|
let RData = ''
|
|
|
|
let RData = ''
|
|
|
|
|
|
|
|
if (value) {
|
|
|
|
this.TypeData.forEach(item => {
|
|
|
|
this.TypeData.forEach(item => {
|
|
|
|
console.log(item.code, value)
|
|
|
|
value.forEach(item2 => {
|
|
|
|
if (item.code == value) {
|
|
|
|
if (item.code == item2) {
|
|
|
|
RData = item.value
|
|
|
|
RData == '' ? (RData = item.value) : (RData = RData + ',' + item.value)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
return RData
|
|
|
|
return RData
|
|
|
|
},
|
|
|
|
},
|
|
|
|
formatSex(value) {
|
|
|
|
formatSex(value) {
|
|
|
@ -375,6 +386,15 @@ export default {
|
|
|
|
values[key] = JSON.stringify(values[key])
|
|
|
|
values[key] = JSON.stringify(values[key])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
this.ContactsData.forEach(item => {
|
|
|
|
|
|
|
|
if (item.WroleCode.length) {
|
|
|
|
|
|
|
|
let data = ''
|
|
|
|
|
|
|
|
item.WroleCode.forEach(item => {
|
|
|
|
|
|
|
|
data = `${data}[${item}]`
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
item.roleCode = data
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
DjyCustomerEdit({ ...this.Data, ...values, contacts: this.ContactsData })
|
|
|
|
DjyCustomerEdit({ ...this.Data, ...values, contacts: this.ContactsData })
|
|
|
|
.then(res => {
|
|
|
|
.then(res => {
|
|
|
|
if (res.success) {
|
|
|
|
if (res.success) {
|
|
|
|