Commit 09dd9b75 by xuyl

去掉标签管理的Name参数

1 parent 10623846
import { getCustomersList, exportLabelList } from '@/api/modules/tagsManage' import {
import { getStaffList } from '@/api/modules/clientManage' getCustomersList,
exportLabelList
} from '@/api/modules/tagsManage'
import {
getStaffList
} from '@/api/modules/clientManage'
export default { export default {
data() { data() {
return { return {
...@@ -24,15 +29,20 @@ export default { ...@@ -24,15 +29,20 @@ export default {
this.tagHeight = 0 this.tagHeight = 0
} }
this.allListParams = [] this.allListParams = []
this.sopListParams = []
const tagNode = this.$common.utils.deepClone(this.tagCheckItem) const tagNode = this.$common.utils.deepClone(this.tagCheckItem)
tagNode.forEach(group_item => { tagNode.forEach(group_item => {
group_item.children.forEach(label_item => { group_item.children.forEach(label_item => {
if (label_item) { if (label_item) {
this.allListParams.push({ this.allListParams.push({
groupId: group_item.id, groupId: group_item.id,
groupName: group_item.name, // groupName: group_item.name,
groupType: group_item.labelType, groupType: group_item.labelType,
labelId: label_item.id, labelId: label_item.id,
// labelName: label_item.name
})
this.sopListParams.push({
labelGroupName: group_item.name,
labelName: label_item.name labelName: label_item.name
}) })
} }
...@@ -71,7 +81,10 @@ export default { ...@@ -71,7 +81,10 @@ export default {
value: item.staffName value: item.staffName
} }
}) })
staff.unshift({ label: '全部', value: '' }) staff.unshift({
label: '全部',
value: ''
})
this.$nextTick(() => { this.$nextTick(() => {
this.tagsPartFormList[id].optionList = staff this.tagsPartFormList[id].optionList = staff
...@@ -136,7 +149,9 @@ export default { ...@@ -136,7 +149,9 @@ export default {
//导出 //导出
handleExport() { handleExport() {
const params = { const params = {
...JSON.parse(JSON.stringify({ tagLists: this.allListParams })), ...JSON.parse(JSON.stringify({
tagLists: this.allListParams
})),
...this.searchForm, ...this.searchForm,
combineType: 2 combineType: 2
} }
...@@ -154,7 +169,9 @@ export default { ...@@ -154,7 +169,9 @@ export default {
const tagLists = this.$common.utils.deepClone(this.allListParams) const tagLists = this.$common.utils.deepClone(this.allListParams)
this.userLoading = true this.userLoading = true
const params = { const params = {
...JSON.parse(JSON.stringify({ tagLists })), ...JSON.parse(JSON.stringify({
tagLists
})),
...JSON.parse(JSON.stringify(this.searchForm)), ...JSON.parse(JSON.stringify(this.searchForm)),
combineType: 2, combineType: 2,
pageSize: this.$refs.viewCustomers.page.pageSize, pageSize: this.$refs.viewCustomers.page.pageSize,
...@@ -195,7 +212,10 @@ export default { ...@@ -195,7 +212,10 @@ export default {
const tagCombine = this.allListParams.reduce((prev, cur) => { const tagCombine = this.allListParams.reduce((prev, cur) => {
const index = prev.findIndex(group => cur.groupId == group.groupId) const index = prev.findIndex(group => cur.groupId == group.groupId)
if (index == -1) { if (index == -1) {
return prev.concat({ groupId: cur.groupId, labelIdList: [cur.labelId] }) return prev.concat({
groupId: cur.groupId,
labelIdList: [cur.labelId]
})
} else { } else {
prev[index].labelIdList.push(cur.labelId) prev[index].labelIdList.push(cur.labelId)
return prev return prev
......
...@@ -615,9 +615,13 @@ export default { ...@@ -615,9 +615,13 @@ export default {
let getDatas = JSON.parse( let getDatas = JSON.parse(
JSON.stringify(this.allListParams) JSON.stringify(this.allListParams)
.replace(/groupId/g, 'labelGroupId') .replace(/groupId/g, 'labelGroupId')
.replace(/groupName/g, 'labelGroupName') // .replace(/groupName/g, 'labelGroupName')
.replace(/groupType/g, 'labelGroupType') .replace(/groupType/g, 'labelGroupType')
) )
let mergeDatas = getDatas.map((item,index) => {
return {...item,...this.sopListParams[index]}
})
console.log(getDatas)
var params = { var params = {
addOrEdit: 'add', addOrEdit: 'add',
fromPage: '/custom/tagsManage/index', fromPage: '/custom/tagsManage/index',
...@@ -625,7 +629,7 @@ export default { ...@@ -625,7 +629,7 @@ export default {
info: { info: {
// 标签 // 标签
customerOptType: 3, customerOptType: 3,
labelList: [...getDatas] labelList: [...mergeDatas]
} }
} }
this.$common.utils.storage.set('sopInfo', params) this.$common.utils.storage.set('sopInfo', params)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!