Browse Source

模板

master
jiangyy 5 years ago
parent
commit
d27d085229
  1. 2
      epmet-oper-web/.env.development
  2. 13
      epmet-oper-web/src/views/modules/customer/customize/ConfigItem.vue
  3. 259
      epmet-oper-web/src/views/modules/customer/init/RegisterList.vue
  4. 4
      epmet-oper-web/src/views/modules/partner/app/edit.vue
  5. 8
      epmet-oper-web/src/views/modules/productConfig/subscribe/MyTempList.vue
  6. 4
      epmet-oper-web/src/views/modules/productConfig/subscribe/TempEdit.vue
  7. 131
      epmet-oper-web/src/views/modules/productConfig/subscribe/TempList.vue

2
epmet-oper-web/.env.development

@ -1,5 +1,5 @@
NODE_ENV=development
# VUE_APP_API_SERVER = http://192.168.1.130:8080/api
VUE_APP_API_SERVER = http://10.10.10.50:8080/api
VUE_APP_API_SERVER = http://10.10.10.17:8080/api
# VUE_APP_API_SERVER = https://epmet-dev.elinkservice.cn/api
VUE_APP_NODE_ENV=dev

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

@ -508,14 +508,15 @@ export default {
const url = "/epmetuser/govstaffrole/resigovrolelist"
// const url = "https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/epmetuser/govstaffrole/resigovrolelist"
const params = {}
const { data, code, msg } = await requestPost(url, params)
const { data, code, msg, internalMsg } = await requestPost(url, params)
if (code === 0) {
this.roleList = data
this.roleAllList = this.activeName === 'resi' ? data.resiRoleList : data.govRoleList
this.roleAllList.forEach(item => {
this.roleCheckedArray.push(item.roleKey)
})
} else {
this.$message.error(msg + ":" + internalMsg)
}
this.endLoading()
},
@ -673,7 +674,7 @@ export default {
const url = "/oper/customize/customerfunctionrole/customerfunctionrolelist"
// this.upOrDownForm.roleList = roleList
const { data, code, msg } = await requestPost(url, this.upOrDownForm)
const { data, code, msg, internalMsg } = await requestPost(url, this.upOrDownForm)
if (code === 0) {
this.roleCheckedArray = []
@ -695,7 +696,7 @@ export default {
} else {
this.$message.error(m)
this.$message.error(msg + ":" + internalMsg)
}
this.endLoading()
@ -726,13 +727,13 @@ export default {
// const url = "https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfunctionrole/savecustomerfunctionrole"
// this.upOrDownForm.roleList = roleList
const { data, code, msg } = await requestPost(url, this.upOrDownForm)
const { data, code, msg, internalMsg } = await requestPost(url, this.upOrDownForm)
if (code === 0) {
this.$message.success('操作成功')
this.upOrDownDia.visible = false
} else {
this.$message.error(msg)
this.$message.error(msg + ":" + internalMsg)
}
this.endLoading()
},

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

@ -26,7 +26,8 @@
:tableHeight="tableHeight"
@init="init"
@delete="del"
@showToken="showToken">
@showToken="showToken"
@showSubscribe="showSubscribe">
</c-table>
</div>
</el-card>
@ -45,36 +46,132 @@
<el-form-item label="客户名称"
prop="customerName">
<div class="item_width_1">
<span>{{tokenForm.customerName}}</span></div>
<span>{{tokenForm.customerName}}</span>
</div>
</el-form-item>
<el-form-item label="开发token"
prop="componentAccessToken">
<div class="item_width_1">
<span>{{tokenForm.componentAccessToken}}</span></div>
<span>{{tokenForm.componentAccessToken}}</span>
</div>
</el-form-item>
<el-form-item label="工作端token"
prop="workAuthorizerToken">
<div class="item_width_1">
<span>{{tokenForm.workAuthorizerToken}}</span></div>
<span>{{tokenForm.workAuthorizerToken}}</span>
</div>
</el-form-item>
<el-form-item label="居民端token"
prop="resiAuthorizerToken">
<div class="item_width_1">
<span>{{tokenForm.resiAuthorizerToken}}</span></div>
<span>{{tokenForm.resiAuthorizerToken}}</span>
</div>
</el-form-item>
</div>
</el-form>
</c-dialog>
<c-dialog :showFooter='false'
:title="'订阅消息'"
:isNest="false"
:visible="diaSubVisible"
:dialogHeight="1.1"
:width="60"
@cancel="diaSubCancel">
<div style=" position: relative;">
<div class="div_btn">
<el-button type="primary"
size="mini"
@click="syncSub">同步默认订阅消息</el-button>
</div>
<el-tabs v-model="activeName"
class="el-tabs">
<el-tab-pane label="居民端"
name="resi">
<el-table ref="ref_publictable_resi"
v-loading="dataListLoading"
:data="resiDataList"
border
style="width: 100%;">
<el-table-column prop="priTmplId"
label="模板ID"
header-align="left"
:min-width="150"
align="left"></el-table-column>
<el-table-column prop="title"
label="标题"
header-align="left"
:min-width="120"
align="left"></el-table-column>
<el-table-column prop="state"
label="状态"
header-align="left"
:min-width="80">
<template slot-scope="scope">
<span v-if="scope.row.state==='0'"
style="color: red">未同步</span>
<span v-else-if="scope.row.state==='1'">同步</span>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="工作端"
name="gov">
<el-table ref="ref_publictable_gov"
v-loading="dataListLoading"
:data="workDataList"
border
style="width: 100%;">
<el-table-column prop="priTmplId"
label="模板ID"
header-align="left"
:min-width="150"
align="left"></el-table-column>
<el-table-column prop="title"
label="标题"
header-align="left"
:min-width="120"
align="left"></el-table-column>
<el-table-column prop="state"
label="状态"
header-align="left"
:min-width="80">
<template slot-scope="scope">
<span v-if="scope.row.state==='0'"
style="color: red">未同步</span>
<span v-else-if="scope.row.state==='1'">同步</span>
</template>
</el-table-column>
<!-- <el-table-column prop="stateShow"
label="状态"
header-align="left"
:min-width="100"
align="left"></el-table-column> -->
</el-table>
</el-tab-pane>
</el-tabs>
</div>
</c-dialog>
</div>
</template>
<script>
import CDialog from '@c/CDialog'
import CTable from '@c/CTable'
import config from "@/js/dai/config";
import { requestPost } from "@/js/dai/request";
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
@ -85,6 +182,8 @@ export default {
dataForm: {
name: '' //
},
workAppid: '',
resiAppid: '',
//
tableUrl:
'https://epmet-cloud.elinkservice.cn/api/third/pacustomer/registerinfo',
@ -114,6 +213,26 @@ export default {
}
}
},
{
lable: '订阅消息', //
size: 'mini',
style: 'margin: 0 6px;',
type: 'text',
slot: '',
plain: false,
methodName: 'showSubscribe', //
isShow: (row) => {
if (
row.initState === 0 &&
row.resiAuth === 1 &&
row.workAuth === 1
) {
return true
} else {
return false
}
}
},
{
lable: '删除', //
size: 'mini',
@ -145,7 +264,8 @@ export default {
// return false
// }
}
}
},
],
//
@ -159,7 +279,17 @@ export default {
componentAccessToken: '',
resiAuthorizerToken: '',
workAuthorizerToken: ''
}
},
//
selCustomerId: '',
diaSubVisible: false,
activeName: 'resi',
dataListLoading: false,
resiDataList: [],
workDataList: [],
resiTempIdList: [],//
workDataList: [],//
}
},
components: {
@ -172,6 +302,18 @@ export default {
},
mounted () {
this.tableParams.source = this.env
if (this.env === 'test') {//
this.workAppid = config.appId.devWorkAppid
this.resiAppid = config.appId.devResiAppid
} else if (this.env === 'prod') {//
this.workAppid = config.appId.testWorkAppid
this.resiAppid = config.appId.testResiAppid
} else {//
this.workAppid = config.appId.devWorkAppid
this.resiAppid = config.appId.devResiAppid
}
// eslint-disable-next-line
this.loadData()
},
@ -268,6 +410,93 @@ export default {
this.diaVisible = false
},
//
showSubscribe (row) {
this.diaSubVisible = true
this.$nextTick(() => {
this.loadSubscribeData(row) //
})
},
//
async loadSubscribeData (row) {
this.dataListLoading = true
this.selCustomerId = row.customerId
// const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/getcustomerlist',
const url = '/third/subscribe/getcustomerlist'
let params = {
customerId: row.customerId,
workAppId: this.workAppid,
resiAppId: this.resiAppid,
}
const { data, code, msg, internalMsg } = await requestPost(url, params)
if (code === 0) {
this.resiDataList = data.resiList
this.workDataList = data.workList
this.resiTempIdList = []
this.workTempIdList = []
this.resiDataList.forEach(element => {
if (element.state === '0') {
this.resiTempIdList.push(element.priTmplId)
}
})
this.workDataList.forEach(element => {
if (element.state === '0') {
this.workTempIdList.push(element.priTmplId)
}
})
} else {
this.$message.error(msg + ":" + internalMsg)
}
this.dataListLoading = false
},
//
async syncSubSure () {
this.$confirm('确认同步客户的订阅消息为默认订阅消息', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.syncSub()
}).catch(() => {
})
},
async syncSub () {
this.startLoading()
const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/init'
// const url = '/third/subscribe/init'
let params = {
customerId: this.selCustomerId,
workAppId: this.workAppid,
resiAppId: this.resiAppid,
resiTempIdList: this.resiTempIdList,
workTempIdList: this.workTempIdList,
}
const { data, code, msg, internalMsg } = await requestPost(url, params)
if (code === 0) {
this.$message.success('同步成功')
} else {
this.$message.error(msg + ":" + internalMsg)
}
this.endLoading()
},
//
diaSubCancel () {
this.diaSubVisible = false
},
//
startLoading () {
loading = Loading.service({
@ -290,15 +519,11 @@ export default {
.aaa {
height: 100px;
}
/* .register .el-table .el-table__header-wrapper {
.div_btn {
z-index: 10;
position: absolute;
top: 0;
left: 0;
}*/
/*
.register .el-table .el-table__fixed-body-wrapper {
height: calc(100% - 44px);
margin-top: 44px;
overflow-y: auto !important;
} */
right: 10px;
top: 5px;
/* margin: 0 0 20px 0; */
}
</style>

4
epmet-oper-web/src/views/modules/partner/app/edit.vue

@ -111,7 +111,7 @@ export default {
//
async queryExternalCustomerList () {
debugger
const { data, code, msg } = await requestPost(
const { data, code, msg, internalMsg } = await requestPost(
requestUrlPrefix + "/commonservice/externalcustomer/list",
{
pageNo: 1,
@ -121,6 +121,8 @@ export default {
if (code === 0) {
this.customerList = data.list;
} else {
this.$message.error(msg + ":" + internalMsg)
}
},
//

8
epmet-oper-web/src/views/modules/productConfig/subscribe/MyTempList.vue

@ -104,12 +104,12 @@ export default {
appId: this.appId
}
const { data, code, msg } = await requestPost(url, params)
const { data, code, msg, internalMsg } = await requestPost(url, params)
if (code === 0) {
this.dataList = data
} else {
this.$message.error(msg)
this.$message.error(msg + ":" + internalMsg)
}
this.dataListLoading = false
},
@ -147,13 +147,13 @@ export default {
priTmplId: row.priTmplId
}
const { data, code, msg } = await requestPost(url, params)
const { data, code, msg, internalMsg } = await requestPost(url, params)
if (code === 0) {
this.$message.success('删除成功')
this.loadData()
} else {
this.$message.error(msg)
this.$message.error(msg + ":" + internalMsg)
}
this.endLoading()
},

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

@ -223,13 +223,13 @@ export default {
this.dataForm.kidList = this.kidSelIdList
this.dataForm.nameList = this.kidSelNameList
console.log(this.dataForm)
const { data, code, msg } = await requestPost(url, this.dataForm)
const { data, code, msg, internalMsg } = await requestPost(url, this.dataForm)
if (code === 0) {
let clientType = this.dataForm.appId === this.resiAppid ? 'resi' : 'gov'
this.$emit('editDiaOK', clientType)
this.handleClose()
} else {
this.$message.error(msg)
this.$message.error(msg + ":" + internalMsg)
}

131
epmet-oper-web/src/views/modules/productConfig/subscribe/TempList.vue

@ -12,6 +12,38 @@
</el-tab-pane>
<el-tab-pane label="公共模板"
name="public">
<el-form :inline="true"
:model="tableParams">
<el-form-item>
<el-input v-model="tableParams.title"
placeholder="标题"
clearable>
</el-input>
</el-form-item>
<el-form-item>
<el-select v-model="tableParams.ids"
placeholder="类目"
clearable>
<el-option v-for="item in categoryList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary"
@click="loadData()">查询</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary"
@click="syncSub()">同步公共模板库</el-button>
</el-form-item>
</el-form>
<el-table ref="ref_publictable"
v-loading="dataListLoading"
:data="dataList"
@ -22,11 +54,11 @@
header-align="left"
:min-width="100"
align="left"></el-table-column>
<el-table-column prop="keywordsShow"
<!-- <el-table-column prop="keywordsShow"
label="关键词"
header-align="left"
:min-width="500"
align="left"></el-table-column>
align="left"></el-table-column> -->
<el-table-column prop="typeShow"
label="类型"
header-align="left"
@ -92,12 +124,14 @@ export default {
tableParams: {
pageNo: 1,
pageSize: 10
pageSize: 10,
title: '',
ids: ''
},
categoryList: [],
//
// tableUrl: 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfootbar/customerfootbars',
tableUrl: '/oper/customize/customerfootbar/customerfootbars4oper',
dataListLoading: false,
dataList: [],
@ -121,6 +155,8 @@ export default {
this.workAppid = config.appId.devWorkAppid
this.resiAppid = config.appId.devResiAppid
}
this.renderSelData()
this.tabClick()
@ -142,6 +178,21 @@ export default {
})
},
methods: {
async renderSelData () { // //
debugger
const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/getcategory'
// const url = '/third/subscribe/getcategory'
let params = {
appId: this.resiAppid
}
const { data, code, msg, internalMsg } = await requestPost(url, params)
if (code === 0) {
this.categoryList = data
} else {
this.$message.error('获取类目信息失败')
}
},
//
async loadData () {
@ -149,42 +200,24 @@ export default {
// const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/getpubtemplatetitles'
const url = '/third/subscribe/getpubtemplatetitles'
this.tableParams.appId = this.resiAppid
this.tableParams.ids = '794'
// this.tableParams.ids = '794'
const { data, code, msg } = await requestPost(url, this.tableParams)
const { data, code, msg, internalMsg } = await requestPost(url, this.tableParams)
if (code === 0) {
this.total = data.total
this.dataList = data.list
this.dataList.forEach(element => {
element.typeShow = element.type === 2 ? '一次性订阅' : '长期订阅'
element.keywordsShow = element.keywords.join()
// element.keywordsShow = element.keywords.join()
})
} else {
this.$message.error(msg)
// this.$message.error(msg + "" + internalMsg)
}
this.dataListLoading = false
},
loadData2 () {
this.total = 10
this.dataList = [
{
"tid": 484,
"title": "新的评论提醒",
"type": 2,
"categoryId":
"794",
"keywords": ["文章标题", "评论内容", "评论时间", "取消提醒", "评论用户", "帖子内容", "评论类型", "评论人数", "备注"]
},
{ "tid": 523, "title": "评论成功提醒", "type": 2, "categoryId": "794", "keywords": ["时间", "评论人", "温馨提示"] }, { "tid": 529, "title": "便民信息审核结果通知", "type": 2, "categoryId": "794", "keywords": ["审核结果", "审核人员", "联系电话", "审核时间", "拒绝理由"] }, { "tid": 569, "title": "签到提醒", "type": 2, "categoryId": "794", "keywords": ["签到人", "签到时间", "活动名称", "温馨提示", "连续签到", "待领奖励", "累计签到"] }, { "tid": 572, "title": "活动成功通知", "type": 2, "categoryId": "794", "keywords": ["活动标题", "完成时间", "参与人数", "执行情况"] }, { "tid": 577, "title": "挑战开始提醒", "type": 2, "categoryId": "794", "keywords": ["挑战名称", "开始时间", "结束时间", "挑战目标", "奖金池"] }, { "tid": 579, "title": "动态点赞通知", "type": 2, "categoryId": "794", "keywords": ["点赞用户", "点赞时间", "帖子标题", "被赞次数", "温馨提示", "帖子内容", "动态标题", "动态内容"] }, { "tid": 688, "title": "挑战结果通知", "type": 2, "categoryId": "794", "keywords": ["挑战名称", "挑战结果", "当前排名", "挑战项目", "挑战时间", "奖励信息", "备注"] }, { "tid": 696, "title": "新的回复提醒", "type": 2, "categoryId": "794", "keywords": ["留言主题", "回复内容", "回复时间", "留言分区", "取消提醒", "用户"] }, { "tid": 726, "title": "审核通过提醒", "type": 2, "categoryId": "794", "keywords": ["审核结果", "帖子主题", "会员昵称", "通过时间", "备注", "活动名称", "活动时间", "组队发起人", "报名时间", "申请方"] }
]
this.dataList.forEach(element => {
element.typeShow = element.type === 2 ? '一次性订阅' : '长期订阅'
element.keywordsShow = element.keywords.join()
})
},
tabClick () {
if (this.activeName === 'mine') {
@ -192,11 +225,46 @@ export default {
}
if (this.activeName === 'public') {
if (this.dataList.length === 0) {
this.loadData2()
this.loadData()
}
}
},
//
async syncSubSure () {
this.$confirm('确认同步本地公共模板库为微信的公共模板库', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.syncSub()
}).catch(() => {
})
},
//
async syncSub () {
this.startLoading()
const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/syncpubtemplatetitles'
// const url = '/third/subscribe/syncpubtemplatetitles'
let params = {
customerId: this.selCustomerId,
workAppId: this.workAppid,
resiAppId: this.resiAppid,
resiTempIdList: this.resiTempIdList,
workTempIdList: this.workTempIdList,
}
const { data, code, msg, internalMsg } = await requestPost(url, params)
if (code === 0) {
this.$message.success('同步成功')
} else {
this.$message.error(msg + ":" + internalMsg)
}
this.endLoading()
},
//
selTempShow (row) {
@ -232,11 +300,6 @@ export default {
},
async renderSelData () { // //
},
//
startLoading () {
loading = Loading.service({

Loading…
Cancel
Save