|
@ -87,7 +87,7 @@ |
|
|
|
|
|
|
|
|
<el-button type="primary" |
|
|
<el-button type="primary" |
|
|
size="mini" |
|
|
size="mini" |
|
|
@click="syncSub">同步默认订阅消息</el-button> |
|
|
@click="syncSubSure">同步默认订阅消息</el-button> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
<el-tabs v-model="activeName" |
|
|
<el-tabs v-model="activeName" |
|
@ -99,7 +99,7 @@ |
|
|
:data="resiDataList" |
|
|
:data="resiDataList" |
|
|
border |
|
|
border |
|
|
style="width: 100%;"> |
|
|
style="width: 100%;"> |
|
|
<el-table-column prop="priTmplId" |
|
|
<el-table-column prop="tmplId" |
|
|
label="模板ID" |
|
|
label="模板ID" |
|
|
header-align="left" |
|
|
header-align="left" |
|
|
:min-width="150" |
|
|
:min-width="150" |
|
@ -131,7 +131,7 @@ |
|
|
:data="workDataList" |
|
|
:data="workDataList" |
|
|
border |
|
|
border |
|
|
style="width: 100%;"> |
|
|
style="width: 100%;"> |
|
|
<el-table-column prop="priTmplId" |
|
|
<el-table-column prop="tmplId" |
|
|
label="模板ID" |
|
|
label="模板ID" |
|
|
header-align="left" |
|
|
header-align="left" |
|
|
:min-width="150" |
|
|
:min-width="150" |
|
@ -223,9 +223,7 @@ export default { |
|
|
methodName: 'showSubscribe', // 回调方法名称 |
|
|
methodName: 'showSubscribe', // 回调方法名称 |
|
|
isShow: (row) => { |
|
|
isShow: (row) => { |
|
|
if ( |
|
|
if ( |
|
|
row.initState === 0 && |
|
|
row.initState === 1 |
|
|
row.resiAuth === 1 && |
|
|
|
|
|
row.workAuth === 1 |
|
|
|
|
|
) { |
|
|
) { |
|
|
return true |
|
|
return true |
|
|
} else { |
|
|
} else { |
|
@ -413,19 +411,21 @@ export default { |
|
|
//订阅消息 |
|
|
//订阅消息 |
|
|
showSubscribe (row) { |
|
|
showSubscribe (row) { |
|
|
this.diaSubVisible = true |
|
|
this.diaSubVisible = true |
|
|
|
|
|
this.resiDataList = [] |
|
|
|
|
|
this.workDataList = [] |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
this.loadSubscribeData(row) // 解决表格错位 |
|
|
this.loadSubscribeData(row.customerId) // 解决表格错位 |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//加载列表数据 |
|
|
//加载列表数据 |
|
|
async loadSubscribeData (row) { |
|
|
async loadSubscribeData (customerId) { |
|
|
this.dataListLoading = true |
|
|
this.dataListLoading = true |
|
|
this.selCustomerId = row.customerId |
|
|
this.selCustomerId = customerId |
|
|
// const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/getcustomerlist', |
|
|
// const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/getcustomerlist', |
|
|
const url = '/third/subscribe/getcustomerlist' |
|
|
const url = '/third/subscribe/getcustomerlist' |
|
|
let params = { |
|
|
let params = { |
|
|
customerId: row.customerId, |
|
|
customerId: customerId, |
|
|
workAppId: this.workAppid, |
|
|
workAppId: this.workAppid, |
|
|
resiAppId: this.resiAppid, |
|
|
resiAppId: this.resiAppid, |
|
|
} |
|
|
} |
|
@ -439,13 +439,13 @@ export default { |
|
|
this.workTempIdList = [] |
|
|
this.workTempIdList = [] |
|
|
this.resiDataList.forEach(element => { |
|
|
this.resiDataList.forEach(element => { |
|
|
if (element.state === '0') { |
|
|
if (element.state === '0') { |
|
|
this.resiTempIdList.push(element.priTmplId) |
|
|
this.resiTempIdList.push(element.id) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
this.workDataList.forEach(element => { |
|
|
this.workDataList.forEach(element => { |
|
|
if (element.state === '0') { |
|
|
if (element.state === '0') { |
|
|
this.workTempIdList.push(element.priTmplId) |
|
|
this.workTempIdList.push(element.id) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
@ -472,8 +472,8 @@ export default { |
|
|
async syncSub () { |
|
|
async syncSub () { |
|
|
|
|
|
|
|
|
this.startLoading() |
|
|
this.startLoading() |
|
|
const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/init' |
|
|
// const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/init' |
|
|
// const url = '/third/subscribe/init' |
|
|
const url = '/third/subscribe/init' |
|
|
|
|
|
|
|
|
let params = { |
|
|
let params = { |
|
|
customerId: this.selCustomerId, |
|
|
customerId: this.selCustomerId, |
|
@ -486,6 +486,7 @@ export default { |
|
|
const { data, code, msg, internalMsg } = await requestPost(url, params) |
|
|
const { data, code, msg, internalMsg } = await requestPost(url, params) |
|
|
if (code === 0) { |
|
|
if (code === 0) { |
|
|
this.$message.success('同步成功') |
|
|
this.$message.success('同步成功') |
|
|
|
|
|
this.loadSubscribeData(this.selCustomerId) |
|
|
} else { |
|
|
} else { |
|
|
this.$message.error(msg + ":" + internalMsg) |
|
|
this.$message.error(msg + ":" + internalMsg) |
|
|
} |
|
|
} |
|
|