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

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

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

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

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

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

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

Loading…
Cancel
Save