Commit 2e2bc3d6 by wangzhihui

修复群名_R:问题

1 parent c1916355
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</div> </div>
</div> </div>
<transition name="el-zoom-in-top" v-if="!isAutomatic"> <transition name="el-zoom-in-top" v-if="!isAutomatic">
<gl-select-menu :domEl="automaticEl" @changeStatu="hideSelect" style="width:432px"> <gl-select-menu :domEl="automaticEl" @changeStatu="hideSelect" style="width: 432px">
<el-form-item class="search-groomname"> <el-form-item class="search-groomname">
<el-input placeholder="请输入搜索关键词" v-model="filterText"></el-input> <el-input placeholder="请输入搜索关键词" v-model="filterText"></el-input>
</el-form-item> </el-form-item>
...@@ -249,18 +249,31 @@ export default { ...@@ -249,18 +249,31 @@ export default {
let groupHideAttr = 'clewWordReport' let groupHideAttr = 'clewWordReport'
if (!groupHideAttr) return if (!groupHideAttr) return
if (item.groupId) { if (item.groupId) {
if (item.groupId.split('_R:')[1] && item.groupId.split('_R:')[1] == item.groupName) { const separatorIndex = item.groupId.indexOf('_R:')
groupHideAttr && this.groupCofListInput[groupHideAttr + 'Value'].push({ name: item.groupName }) if (separatorIndex !== -1) {
this.idBefEncryption = item.groupId.split('_R:')[0] const cloudId = item.groupId.substring(0, separatorIndex)
} else if (item.groupName) { const groupNameFromId = item.groupId.substring(separatorIndex + 3) // 3 是 "_R:" 的长度
groupHideAttr && if (groupNameFromId && groupNameFromId == item.groupName) {
this.groupCofList[groupHideAttr].push({ groupHideAttr && this.groupCofListInput[groupHideAttr + 'Value'].push({ name: item.groupName })
groupId: item.groupId, this.idBefEncryption = cloudId
roomName: item.groupName } else if (item.groupName) {
}) groupHideAttr &&
this.groupCofList[groupHideAttr].push({
groupId: item.groupId,
roomName: item.groupName
})
} else {
this.idBefEncryption = cloudId
groupHideAttr && this.groupCofListInput[groupHideAttr + 'Value'].push({ name: '' })
}
} else { } else {
this.idBefEncryption = item.groupId.split('_R:')[0] if (item.groupName) {
groupHideAttr && this.groupCofListInput[groupHideAttr + 'Value'].push({ name: '' }) groupHideAttr &&
this.groupCofList[groupHideAttr].push({
groupId: item.groupId,
roomName: item.groupName
})
}
} }
} }
}) })
......
...@@ -151,7 +151,7 @@ export default { ...@@ -151,7 +151,7 @@ export default {
wordReport: [], wordReport: [],
regionalOperationsReport: [], regionalOperationsReport: [],
extendedRevenueReport: [], extendedRevenueReport: [],
sceneReport:[] sceneReport: []
}, },
switchList: { switchList: {
xiReport: [], xiReport: [],
...@@ -425,7 +425,7 @@ export default { ...@@ -425,7 +425,7 @@ export default {
InvoicingReport: [], InvoicingReport: [],
regionalOperationsReport: [], regionalOperationsReport: [],
extendedRevenueReport: [], extendedRevenueReport: [],
sceneReport:[] sceneReport: []
} }
this.groupCofListInput = { this.groupCofListInput = {
xiReportValue: [], xiReportValue: [],
...@@ -437,7 +437,7 @@ export default { ...@@ -437,7 +437,7 @@ export default {
wordReportValue: [], wordReportValue: [],
regionalOperationsReportValue: [], regionalOperationsReportValue: [],
extendedRevenueReportValue: [], extendedRevenueReportValue: [],
sceneReportValue:[] sceneReportValue: []
} }
// 编辑 // 编辑
if (sign) { if (sign) {
...@@ -451,22 +451,36 @@ export default { ...@@ -451,22 +451,36 @@ export default {
let groupHideAttr = this.groupToType.find(k => k.type == item.actionReportType)?.attr let groupHideAttr = this.groupToType.find(k => k.type == item.actionReportType)?.attr
if (!groupHideAttr) return if (!groupHideAttr) return
if (item.groupId) { if (item.groupId) {
if (item.groupId.split('_R:')[1] && item.groupId.split('_R:')[1] == item.groupName) { const separatorIndex = item.groupId.indexOf('_R:')
groupHideAttr && this.groupCofListInput[groupHideAttr + 'Value'].push({ name: item.groupName }) if (separatorIndex !== -1) {
this.idBefEncryption = item.groupId.split('_R:')[0] const cloudId = item.groupId.substring(0, separatorIndex)
} else if (item.groupName) { const groupNameFromId = item.groupId.substring(separatorIndex + 3) // 3 是 "_R:" 的长度
groupHideAttr && if (groupNameFromId && groupNameFromId == item.groupName) {
this.groupCofList[groupHideAttr].push({ groupHideAttr && this.groupCofListInput[groupHideAttr + 'Value'].push({ name: item.groupName })
groupId: item.groupId, this.idBefEncryption = cloudId
roomName: item.groupName } else if (item.groupName) {
}) groupHideAttr &&
this.groupCofList[groupHideAttr].push({
groupId: item.groupId,
roomName: item.groupName
})
} else {
this.idBefEncryption = cloudId
groupHideAttr && this.groupCofListInput[groupHideAttr + 'Value'].push({ name: '' })
}
} else { } else {
this.idBefEncryption = item.groupId.split('_R:')[0] if (item.groupName) {
groupHideAttr && this.groupCofListInput[groupHideAttr + 'Value'].push({ name: '' }) groupHideAttr &&
this.groupCofList[groupHideAttr].push({
groupId: item.groupId,
roomName: item.groupName
})
}
} }
if (item.sendTime) { if (item.sendTime) {
this.pushRadio = 2 this.pushRadio = 2
this.pushTimeValue = item.sendTime this.pushTimeValue = item.sendTime
} }
} }
}) })
...@@ -510,7 +524,7 @@ export default { ...@@ -510,7 +524,7 @@ export default {
wordReport: [], wordReport: [],
regionalOperationsReport: [], regionalOperationsReport: [],
extendedRevenueReport: [], extendedRevenueReport: [],
sceneReport:[] sceneReport: []
} }
} }
} }
...@@ -536,7 +550,7 @@ export default { ...@@ -536,7 +550,7 @@ export default {
wordReport: [], wordReport: [],
regionalOperationsReport: [], regionalOperationsReport: [],
extendedRevenueReport: [], extendedRevenueReport: [],
sceneReport:[] sceneReport: []
} }
}, },
async getDepartmentTree() { async getDepartmentTree() {
......
...@@ -97,7 +97,7 @@ export default { ...@@ -97,7 +97,7 @@ export default {
isDialogVisible: false, isDialogVisible: false,
merchantName: '', merchantName: '',
paramsData: this.$route.query, paramsData: this.$route.query,
routeParams: {}, routeParams: {},
dialogComponent: '', dialogComponent: '',
merchantList: [], merchantList: [],
automaticData: [], automaticData: [],
...@@ -118,11 +118,11 @@ export default { ...@@ -118,11 +118,11 @@ export default {
}, },
groupCofList: { groupCofList: {
trainingReport: [], trainingReport: [],
sceneClue: [] sceneClue: []
}, },
groupCofListInput: { groupCofListInput: {
trainingReportValue: [], trainingReportValue: [],
sceneClueValue: [], sceneClueValue: []
}, },
groupToType: [ groupToType: [
{ {
...@@ -132,7 +132,7 @@ export default { ...@@ -132,7 +132,7 @@ export default {
{ {
attr: 'sceneClue', attr: 'sceneClue',
type: 27 type: 27
}, }
], ],
buttetinList: [ buttetinList: [
{ {
...@@ -140,7 +140,7 @@ export default { ...@@ -140,7 +140,7 @@ export default {
storageList: 'trainingReportValue', storageList: 'trainingReportValue',
componentName: '' componentName: ''
}, },
{ {
label: '.场景线索', label: '.场景线索',
storageList: 'sceneClueValue', storageList: 'sceneClueValue',
...@@ -165,7 +165,7 @@ export default { ...@@ -165,7 +165,7 @@ export default {
mounted() { mounted() {
let { data, sign } = this.paramsData let { data, sign } = this.paramsData
data = JSON.parse(data) data = JSON.parse(data)
this.routeParams = data this.routeParams = data
this.merchantName = data.merchantName + data.merchantId this.merchantName = data.merchantName + data.merchantId
this.getMerchantList(sign) this.getMerchantList(sign)
this.handleStaffOn(data, sign) this.handleStaffOn(data, sign)
...@@ -246,7 +246,7 @@ export default { ...@@ -246,7 +246,7 @@ export default {
} }
this.groupCofListInput = { this.groupCofListInput = {
trainingReportValue: [], trainingReportValue: [],
sceneClueValue: [], sceneClueValue: []
} }
this.battleVisible = true this.battleVisible = true
// 编辑 // 编辑
...@@ -260,18 +260,31 @@ export default { ...@@ -260,18 +260,31 @@ export default {
let groupHideAttr = this.groupToType.find(k => k.type == item.actionReportType)?.attr let groupHideAttr = this.groupToType.find(k => k.type == item.actionReportType)?.attr
if (!groupHideAttr) return if (!groupHideAttr) return
if (item.groupId) { if (item.groupId) {
if (item.groupId.split('_R:')[1] && item.groupId.split('_R:')[1] == item.groupName) { const separatorIndex = item.groupId.indexOf('_R:')
groupHideAttr && this.groupCofListInput[groupHideAttr + 'Value'].push({ name: item.groupName }) if (separatorIndex !== -1) {
this.idBefEncryption = item.groupId.split('_R:')[0] const cloudId = item.groupId.substring(0, separatorIndex)
} else if (item.groupName) { const groupNameFromId = item.groupId.substring(separatorIndex + 3) // 3 是 "_R:" 的长度
groupHideAttr && if (groupNameFromId && groupNameFromId == item.groupName) {
this.groupCofList[groupHideAttr].push({ groupHideAttr && this.groupCofListInput[groupHideAttr + 'Value'].push({ name: item.groupName })
groupId: item.groupId, this.idBefEncryption = cloudId
roomName: item.groupName } else if (item.groupName) {
}) groupHideAttr &&
this.groupCofList[groupHideAttr].push({
groupId: item.groupId,
roomName: item.groupName
})
} else {
this.idBefEncryption = cloudId
groupHideAttr && this.groupCofListInput[groupHideAttr + 'Value'].push({ name: '' })
}
} else { } else {
this.idBefEncryption = item.groupId.split('_R:')[0] if (item.groupName) {
groupHideAttr && this.groupCofListInput[groupHideAttr + 'Value'].push({ name: '' }) groupHideAttr &&
this.groupCofList[groupHideAttr].push({
groupId: item.groupId,
roomName: item.groupName
})
}
} }
} }
}) })
...@@ -294,7 +307,7 @@ export default { ...@@ -294,7 +307,7 @@ export default {
// InvoicingReportValue: [{ name: '' }], // InvoicingReportValue: [{ name: '' }],
// saReportValue: [{ name: '' }], // saReportValue: [{ name: '' }],
trainingReportValue: [{ name: '' }], trainingReportValue: [{ name: '' }],
sceneClueValue: [{ name: '' }], sceneClueValue: [{ name: '' }]
// scheduleReportValue: [{ name: '' }], // scheduleReportValue: [{ name: '' }],
// zhanReportValue: [{ name: '' }], // zhanReportValue: [{ name: '' }],
// saasReportValue: [{ name: '' }] // saasReportValue: [{ name: '' }]
...@@ -308,7 +321,7 @@ export default { ...@@ -308,7 +321,7 @@ export default {
if (isReset) { if (isReset) {
this.groupCofList = { this.groupCofList = {
trainingReport: [], trainingReport: [],
sceneClue: [] sceneClue: []
} }
} }
} }
...@@ -326,7 +339,7 @@ export default { ...@@ -326,7 +339,7 @@ export default {
} }
this.groupCofList = { this.groupCofList = {
trainingReport: [], trainingReport: [],
sceneClue: [] sceneClue: []
} }
}, },
async getDepartmentTree() { async getDepartmentTree() {
...@@ -414,14 +427,14 @@ export default { ...@@ -414,14 +427,14 @@ export default {
return true return true
} }
var params = { var params = {
residentStaffPhone: this.routeParams.residentStaffPhone, residentStaffPhone: this.routeParams.residentStaffPhone,
enterpriseMerchantId: this.config.merchantId, enterpriseMerchantId: this.config.merchantId,
enterpriseMerchantName: this.config.merchantName, enterpriseMerchantName: this.config.merchantName,
staffId: this.wechat.staffId, staffId: this.wechat.staffId,
staffName: this.wechat.automaticName, staffName: this.wechat.automaticName,
groupMerchantId: this.config.merchantId, groupMerchantId: this.config.merchantId,
updatedBy: this.$globalState.session.accountName, updatedBy: this.$globalState.session.accountName,
groupConfigList: [], groupConfigList: []
} }
Object.keys(this.groupCofList).map(item => { Object.keys(this.groupCofList).map(item => {
let type = this.groupToType.find(k => k.attr == item).type let type = this.groupToType.find(k => k.attr == item).type
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!