Browse Source

订阅消息

dev
jiangyy 5 years ago
committed by 13176889840
parent
commit
974d3d58e0
  1. 11
      epmet-oper-web/src/views/modules/customer/customize/ConfigItem.vue
  2. 29
      epmet-oper-web/src/views/modules/customer/init/RegisterList.vue
  3. 8
      epmet-oper-web/src/views/modules/customer/manage/ConfigForm.vue
  4. 6
      epmet-oper-web/src/views/modules/productConfig/subscribe/TempDetail.vue
  5. 4
      epmet-oper-web/src/views/modules/productConfig/subscribe/TempEdit.vue

11
epmet-oper-web/src/views/modules/customer/customize/ConfigItem.vue

@ -684,7 +684,7 @@ export default {
const { data, code, msg, internalMsg } = await requestPost(url, this.upOrDownForm)
if (code === 0) {
debugger
this.roleCheckedArray = []
data.forEach(item => {
@ -746,12 +746,11 @@ export default {
this.endLoading()
},
handleCheckAllChange (val) {
this.roleCheckedArray = []
if (val) {
this.roleAllList.forEach(item => {
this.roleCheckedArray.push(item.roleKey)
})
} else {
this.roleCheckedArray = []
}
this.isIndeterminate = false;
@ -790,8 +789,7 @@ export default {
let one = {}
for (let i = 0; i < this.resiHaveList.length; i++) {
let obj = {}
// eslint-disable-next-line
// debugger
if (i === index - 1) {
one.customerId = this.resiHaveList[i].customerId
one.functionId = this.resiHaveList[i].functionId
@ -839,8 +837,7 @@ export default {
let one = {}
for (let i = 0; i < this.workHaveList.length; i++) {
let obj = {}
// eslint-disable-next-line
// debugger
if (i === index - 1) {
one.customerId = this.workHaveList[i].customerId
one.functionId = this.workHaveList[i].functionId

29
epmet-oper-web/src/views/modules/customer/init/RegisterList.vue

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

8
epmet-oper-web/src/views/modules/customer/manage/ConfigForm.vue

@ -2,18 +2,18 @@
<div>
<c-dialog :title="'修改配置信息'"
:visible="diaVisible"
:dialogHeight="0.8"
:width="45"
@ok="save"
@cancel="diaCancel">
<el-card shadow="never"
class="aui-card--fill">
<div style="margin:30px">
<c-form ref="ref_form"
keyword="ConfigForm"
:labelWidth="150"
:itemWidth="'300px'"
:method="'U'"
:option-data="optionData"></c-form>
</el-card>
</div>
</c-dialog>
</div>
</template>

6
epmet-oper-web/src/views/modules/productConfig/subscribe/TempDetail.vue

@ -160,7 +160,7 @@ export default {
loadData () {
//
this.exampleArray = []
let array = this.dataForm.example.split('\\n')
let array = this.dataForm.example.split(/[(\r\n)\r\n]+/)
for (let i = 0; i < array.length - 1; i++) {
let oneArray = array[i].split(':')
let obj = {}
@ -172,7 +172,7 @@ export default {
//
this.contentArray = []
let arrayContent = this.dataForm.content.split(' ')
let arrayContent = this.dataForm.content.split(/[(\r\n)\r\n]+/)
for (let i = 0; i < arrayContent.length - 1; i++) {
let oneArray = arrayContent[i].split(':')
let obj = {}
@ -245,7 +245,7 @@ export default {
border-radius: 5px;
}
.div_left_title {
margin: 10px 10px;
margin: 10px 10px 30px 10px;
font-size: 18px;
}
.padding_10 {

4
epmet-oper-web/src/views/modules/productConfig/subscribe/TempEdit.vue

@ -230,6 +230,10 @@ export default {
this.handleClose()
} else {
this.$message.error(msg + ":" + internalMsg)
let clientType = this.dataForm.appId === this.resiAppid ? 'resi' : 'gov'
this.$emit('editDiaOK', clientType)
this.handleClose()
}

Loading…
Cancel
Save