dai_siki 5 years ago
parent
commit
d1b7626680
  1. 1
      epmet-oper-web/package.json
  2. 2
      epmet-oper-web/src/App.vue
  3. 12
      epmet-oper-web/src/js/ajax.js
  4. 62
      epmet-oper-web/src/router/index.js
  5. 183
      epmet-oper-web/src/views/main-navbar.vue
  6. 3
      epmet-oper-web/src/views/main-sidebar.vue
  7. 26
      epmet-oper-web/src/views/modules/customer/customize/CustomerList.vue
  8. 4
      epmet-oper-web/src/views/modules/customer/customize/FootbarList.vue
  9. 4
      epmet-oper-web/src/views/modules/customer/customize/MiniHome.vue
  10. 23
      epmet-oper-web/src/views/modules/customer/feedback/DetailForm.vue
  11. 287
      epmet-oper-web/src/views/modules/customer/init/RegisterList.vue
  12. 268
      epmet-oper-web/src/views/modules/customer/init/TempList.vue
  13. 10
      epmet-oper-web/src/views/modules/customer/manage/CustomerInfo.vue
  14. 107
      epmet-oper-web/src/views/modules/customer/miniProAgent/MiniProList.vue
  15. 370
      epmet-oper-web/src/views/modules/customer/role.vue
  16. 6
      epmet-oper-web/src/views/modules/productConfig/autoTest/autoTestList.vue
  17. 564
      epmet-oper-web/src/views/modules/productConfig/mostedit/MostList.vue
  18. 38
      epmet-oper-web/src/views/modules/productConfig/subscribe/MyTempList.vue
  19. 11
      epmet-oper-web/src/views/modules/productConfig/subscribe/TempEdit.vue
  20. 0
      epmet-oper-web/src/views/modules/sys/calender-add-or-update.vue
  21. 0
      epmet-oper-web/src/views/modules/sys/calender.vue
  22. 0
      epmet-oper-web/src/views/modules/sys/dept-add-or-update.vue
  23. 0
      epmet-oper-web/src/views/modules/sys/dept.vue
  24. 0
      epmet-oper-web/src/views/modules/sys/dict-data-add-or-update.vue
  25. 0
      epmet-oper-web/src/views/modules/sys/dict-data.vue
  26. 0
      epmet-oper-web/src/views/modules/sys/dict-type-add-or-update.vue
  27. 0
      epmet-oper-web/src/views/modules/sys/dict-type.vue
  28. 0
      epmet-oper-web/src/views/modules/sys/log-error.vue
  29. 0
      epmet-oper-web/src/views/modules/sys/log-login.vue
  30. 0
      epmet-oper-web/src/views/modules/sys/log-operation.vue
  31. 0
      epmet-oper-web/src/views/modules/sys/menu-add-or-update.vue
  32. 0
      epmet-oper-web/src/views/modules/sys/menu.vue
  33. 0
      epmet-oper-web/src/views/modules/sys/news-add-or-update.vue
  34. 0
      epmet-oper-web/src/views/modules/sys/news.vue
  35. 0
      epmet-oper-web/src/views/modules/sys/params-add-or-update.vue
  36. 0
      epmet-oper-web/src/views/modules/sys/params.vue
  37. 0
      epmet-oper-web/src/views/modules/sys/region-add-or-update.vue
  38. 0
      epmet-oper-web/src/views/modules/sys/region.vue
  39. 0
      epmet-oper-web/src/views/modules/sys/role-add-or-update.vue
  40. 0
      epmet-oper-web/src/views/modules/sys/role.vue
  41. 0
      epmet-oper-web/src/views/modules/sys/user-add-or-update.vue
  42. 4
      epmet-oper-web/src/views/modules/sys/user.vue
  43. 120
      epmet-oper-web/src/views/pages/loginWork.vue

1
epmet-oper-web/package.json

@ -27,6 +27,7 @@
"gulp-rename": "^1.4.0",
"gulp-sass": "^4.0.2",
"js-cookie": "^2.2.0",
"jsencrypt": "^3.0.3",
"lodash": "^4.17.15",
"node-sass": "^4.12.0",
"portfinder": "^1.0.21",

2
epmet-oper-web/src/App.vue

@ -50,7 +50,7 @@ export default {
localStorage.setItem('userType', 'oper')
}
console.log("为空后设置默认值::::" + localStorage.getItem('userType'))
//console.log("" + localStorage.getItem('userType'))
const that = this
let envShow = process.env.VUE_APP_NODE_ENV
let env = 'dev'

12
epmet-oper-web/src/js/ajax.js

@ -88,9 +88,17 @@ axios.interceptors.request.use(
*/
axios.interceptors.response.use(
(response) => {
if (response.data.code === 401 || response.data.code === 10001) {
if (response.data.code === 401 || response.data.code === 10001 || response.data.code === 10005) {
debugger;
clearLoginInfo()
router.replace({ name: 'login' })
localStorage.setItem('userType', 'work')
let userType = localStorage.getItem("userType");
if (userType === 'work'){
router.replace({ name: 'loginWork' })
}else {
router.replace({ name: 'login' })
}
return Promise.reject(response.data.msg)
}
return response

62
epmet-oper-web/src/router/index.js

@ -119,10 +119,62 @@ router.beforeEach((to, from, next) => {
// 获取菜单列表, 添加并全局变量保存
const userType = localStorage.getItem('userType')
console.log('获取菜单::::' + localStorage.getItem('userType'))
if (userType === 'work') {
http
const customerId=localStorage.getItem('customerId')
console.log('customerId:' ,customerId)
if(customerId==='1e68188b8f7e9ab15658c164bd5b3676'){
// if(customerId==='45687aa479955f9d06204d415238f7cc'){
const menuList=[
{
children: [],
createdBy: "a76fc711807ac9827d7611b0f94ec220",
createdTime: "2020-08-26 16:38",
delFlag: null,
icon: "icon-database",
id: "abe812eb350f6b5eda575e268e50ac1c",
name: "定制功能配置",
parentName: null,
permissions: "",
pid: "0",
resourceList: null,
revision: 0,
showFlag: 1,
sort: 2,
type: 0,
updatedBy: "a76fc711807ac9827d7611b0f94ec220",
updatedTime: "2020-09-02 14:49",
url: "customer/customize/ConfigItem",
},
{
children: [],
createdBy: "a76fc711807ac9827d7611b0f94ec220",
createdTime: "2020-08-26 16:38",
delFlag: null,
icon: "icon-file-text",
id: "8e55eba74c920c00c44c125e3bc73ddc",
name: "居民端首页配置",
parentName: null,
permissions: "",
pid: "0",
resourceList: null,
revision: 0,
showFlag: 1,
sort: 3,
type: 0,
updatedBy: "a76fc711807ac9827d7611b0f94ec220",
updatedTime: "2020-09-02 14:49",
url: "customer/customize/MiniHome",
}
]
window.SITE_CONFIG['menuList'] = menuList
fnAddDynamicMenuRoutes(window.SITE_CONFIG['menuList'])
// next({ ...to, replace: true })
next({ ...to, replace: true })
}else{
http
.get('/gov/access/menu/nav')
.then(({ data: res }) => {
if (res.code !== 0) {
@ -137,6 +189,12 @@ router.beforeEach((to, from, next) => {
.catch(() => {
next({ name: 'loginWork' })
})
}
// localStorage.getItem('customerId')
// 1e68188b8f7e9ab15658c164bd5b3676
} else {
http
.get('/oper/access/menu/nav')

183
epmet-oper-web/src/views/main-navbar.vue

@ -1,88 +1,94 @@
<template>
<nav class="aui-navbar"
:class="`aui-navbar--${$store.state.navbarLayoutType}`">
<div class="aui-navbar__header">
<h1 class="aui-navbar__brand"
@click="$router.push({ name: 'home' })">
<a class="aui-navbar__brand-lg"
href="javascript:;">{{ userType==='work'?customerName :$t('brand.lg') }}</a>
<a class="aui-navbar__brand-mini"
href="javascript:;">{{ $t('brand.mini') }}</a>
</h1>
</div>
<div class="aui-navbar__body">
<el-menu class="aui-navbar__menu mr-auto"
mode="horizontal">
<el-menu-item index="1"
@click="$store.state.sidebarFold = !$store.state.sidebarFold">
<svg class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--switch"
aria-hidden="true">
<use xlink:href="#icon-outdent"></use>
</svg>
</el-menu-item>
<div>
<nav v-if="showHeader"
class="aui-navbar"
:class="`aui-navbar--${$store.state.navbarLayoutType}`">
<div class="aui-navbar__header">
<h1 class="aui-navbar__brand"
@click="$router.push({ name: 'home' })">
<a class="aui-navbar__brand-lg"
href="javascript:;">{{ userType==='work'?customerName :$t('brand.lg') }}</a>
<a class="aui-navbar__brand-mini"
href="javascript:;">{{ $t('brand.mini') }}</a>
</h1>
</div>
<div class="aui-navbar__body">
<el-menu class="aui-navbar__menu mr-auto"
mode="horizontal">
<el-menu-item index="1"
@click="$store.state.sidebarFold = !$store.state.sidebarFold">
<svg class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--switch"
aria-hidden="true">
<use xlink:href="#icon-outdent"></use>
</svg>
</el-menu-item>
</el-menu>
<el-menu class="aui-navbar__menu"
mode="horizontal">
<!-- <el-menu-item index="1">
<el-dropdown placement="bottom"
:show-timeout="0">
<el-button size="mini">{{ $t('_lang') }}</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="(val, key) in i18nMessages"
:key="key"
@click.native="$i18n.locale = key">{{ val._lang }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-menu-item> -->
<!-- <el-menu-item index="2">
<a href="//www.renren.io/"
target="_blank">
</el-menu>
<el-menu class="aui-navbar__menu"
mode="horizontal">
<!-- <el-menu-item index="1">
<el-dropdown placement="bottom"
:show-timeout="0">
<el-button size="mini">{{ $t('_lang') }}</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="(val, key) in i18nMessages"
:key="key"
@click.native="$i18n.locale = key">{{ val._lang }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-menu-item> -->
<!-- <el-menu-item index="2">
<a href="//www.renren.io/"
target="_blank">
<svg class="icon-svg aui-navbar__icon-menu"
aria-hidden="true">
<use xlink:href="#icon-earth"></use>
</svg>
</a>
</el-menu-item> -->
<!-- <el-menu-item index="3"
@click="fullscreenHandle()">
<svg class="icon-svg aui-navbar__icon-menu"
aria-hidden="true">
<use xlink:href="#icon-fullscreen"></use>
</svg>
</el-menu-item> -->
<el-menu-item index="2"
@click="refresh()">
<svg class="icon-svg aui-navbar__icon-menu"
aria-hidden="true">
<use xlink:href="#icon-earth"></use>
<use xlink:href="#icon-sync"></use>
</svg>
</a>
</el-menu-item> -->
<!-- <el-menu-item index="3"
@click="fullscreenHandle()">
<svg class="icon-svg aui-navbar__icon-menu"
aria-hidden="true">
<use xlink:href="#icon-fullscreen"></use>
</svg>
</el-menu-item> -->
<el-menu-item index="2"
@click="refresh()">
<svg class="icon-svg aui-navbar__icon-menu"
aria-hidden="true">
<use xlink:href="#icon-sync"></use>
</svg>
</el-menu-item>
<el-menu-item index="4"
class="aui-navbar__avatar">
<el-dropdown placement="bottom"
:show-timeout="0">
<span class="el-dropdown-link">
<img v-if="$store.state.user.gender ==='2'"
src="~@/assets/img/staff-default-avatar-girl.png">
<img v-else
src="~@/assets/img/staff-default-avatar-boy.png">
<span>{{ $store.state.user.realName }}</span>
<i class="el-icon-arrow-down"></i>
</span>
<el-dropdown-menu slot="dropdown">
<!-- <el-dropdown-item @click.native="updatePasswordHandle()">{{ $t('updatePassword.title') }}</el-dropdown-item> -->
<el-dropdown-item @click.native="logoutHandle()">{{ $t('logout') }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-menu-item>
</el-menu>
</div>
<!-- 弹窗, 修改密码 -->
<update-password v-if="updatePassowrdVisible"
ref="updatePassowrd"></update-password>
</nav>
</el-menu-item>
<el-menu-item index="4"
class="aui-navbar__avatar">
<el-dropdown placement="bottom"
:show-timeout="0">
<span class="el-dropdown-link">
<img v-if="$store.state.user.gender ==='2'"
src="~@/assets/img/staff-default-avatar-girl.png">
<img v-else
src="~@/assets/img/staff-default-avatar-boy.png">
<span>{{ $store.state.user.realName }}</span>
<i class="el-icon-arrow-down"></i>
</span>
<el-dropdown-menu slot="dropdown">
<!-- <el-dropdown-item @click.native="updatePasswordHandle()">{{ $t('updatePassword.title') }}</el-dropdown-item> -->
<el-dropdown-item @click.native="logoutHandle()">{{ $t('logout') }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-menu-item>
</el-menu>
</div>
<!-- 弹窗, 修改密码 -->
<update-password v-if="updatePassowrdVisible"
ref="updatePassowrd"></update-password>
</nav>
<nav v-else
class="aui-navbar main-line"></nav>
</div>
</template>
<script>
@ -95,6 +101,7 @@ export default {
inject: ['refresh'],
data () {
return {
showHeader: true,
i18nMessages: messages,
updatePassowrdVisible: false,
customerName: localStorage.getItem('customerName')
@ -105,6 +112,12 @@ export default {
components: {
UpdatePassword
},
created () {
let platformToken = localStorage.getItem('showHeader') || '';
if (typeof platformToken !== 'undefined' && platformToken !== 'undefined' && platformToken !== '') {
this.showHeader = false
}
},
computed: {
userType () {
return localStorage.getItem('userType')
@ -149,7 +162,10 @@ export default {
this.$http.post('/auth/login/logout').then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
// 退
if (res.code !== 10007){
this.$message.error(res.msg)
}
}
clearLoginInfo()
@ -166,3 +182,10 @@ export default {
}
}
</script>
<style lang="scss" scoped>
.main-line {
height: 50px;
background: #eeeeee;
}
</style>

3
epmet-oper-web/src/views/main-sidebar.vue

@ -30,7 +30,8 @@ export default {
}
</script>
<style>
.el-menu--collapse .el-submenu__title span, .el-menu--collapse .el-menu-item span {
.el-menu--collapse .el-submenu__title span,
.el-menu--collapse .el-menu-item span {
display: none;
}
</style>

26
epmet-oper-web/src/views/modules/customer/customize/CustomerList.vue

@ -42,7 +42,7 @@
fixed="right"
header-align="center"
align="center"
width="400">
width="500">
<template slot-scope="scope">
<el-button type="text"
size="small"
@ -59,9 +59,9 @@
<el-button type="text"
size="small"
@click="showLimitConfig(scope.row.customerId,scope.row.customerName)">角色权限</el-button>
<el-button type="text"
size="small"
@click="showMost(scope.row.customerId,scope.row.customerName)">最高配置</el-button>
<el-button type="text"
size="small"
@click="showMost(scope.row.customerId,scope.row.customerName)">最高配置</el-button>
</template>
</el-table-column>
</el-table>
@ -87,6 +87,10 @@
:tableKeywork="'FootBarCustomize'"
@cancleBack="cancleBack"></footbar-list>
</div>
<div v-show="showType==='mostedit'">
<most-list ref="ref_mostlist"
@cancleBack="cancleBack"></most-list>
</div>
<el-dialog :visible.sync="funcVisible"
title="功能列表"
@ -133,7 +137,8 @@ export default {
ConfigItem,
MiniHome,
RoleList,
FootbarList
FootbarList,
MostList
},
activated () {
if (this.showType === 'footbar') {
@ -205,13 +210,14 @@ export default {
this.showType = 'footbar'
this.$refs['ref_footbarlist'].initData(customerId, customerName)
},
// footbar
showMost (customerId, customerName) {
this.showType = 'mostedit'
//this.$refs['ref_footbarlist'].initData(customerId, customerName)
},
// most
showMost (customerId, customerName) {
this.showType = 'mostedit'
//this.$refs['ref_mostlist'].initData(customerId, customerName)
},
//
showLimitConfig (customerId, customerName) {
this.customerId = customerId

4
epmet-oper-web/src/views/modules/customer/customize/FootbarList.vue

@ -244,7 +244,7 @@ export default {
if (index > 0) {
this.tableData = this.$refs.table.getTableData() //
console.log(this.tableData)
//console.log(this.tableData)
this.startLoading()
let resultList = []
let one = {}
@ -266,7 +266,7 @@ export default {
resultList.push(obj)
}
}
console.log(resultList)
//console.log(resultList)
// const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfunctiondetail/updatedisplayorder'
const url = '/oper/customize/customerfunctiondetail/updatedisplayorder'

4
epmet-oper-web/src/views/modules/customer/customize/MiniHome.vue

@ -632,7 +632,7 @@ export default {
}
})]
this.cptTypeList = list
console.log('可用组件列表', list)
//console.log('', list)
}
}).catch((err) => {
console.log(err)
@ -658,7 +658,7 @@ export default {
]
this.cptList = list.map(this.processBackendCptData)
this.lastSavedCptList = cloneDeep(this.cptList)
console.log('用户储存组件列表', list)
//console.log('', list)
}
}).catch((err) => {
console.log(err)

23
epmet-oper-web/src/views/modules/customer/feedback/DetailForm.vue

@ -143,11 +143,17 @@
<div class="form-title margin2">{{'建议图片'}}</div>
</el-col>
<el-col :span="span2Con">
<img v-for="(item,index) in adviceData.imgList"
<el-image v-for="(item,index) in adviceData.imgList"
style="width:70px;height:70px;margin-right:15px"
:key="index"
:src="item"
:preview-src-list="adviceData.imgList">
</el-image>
<!-- <img v-for="(item,index) in adviceData.imgList"
:key="index"
:src="item"
style="width:70px;height:70px;margin-right:15px"
class="function-icon">
class="function-icon"> -->
</el-col>
@ -229,12 +235,17 @@
<div class="form-title margin2">{{'政府回复取证'}}</div>
</el-col>
<el-col :span="span2Con">
<img v-for="(item,index) in adviceData.govImgList"
<el-image v-for="(item,index) in adviceData.govImgList"
style="width:70px;height:70px;margin-right:15px"
:key="index"
:src="item"
:preview-src-list="adviceData.govImgList">
</el-image>
<!-- <img v-for="(item,index) in adviceData.govImgList"
:key="index"
:src="item"
style="width:70px;height:70px;margin-right:15px"
class="function-icon">
class="function-icon"> -->
</el-col>
@ -355,6 +366,8 @@ export default {
span2Title: 3,
span2Con: 20,
srcList: [],
diaVisible: false,
adviceId: '',//id
adviceData: {

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

@ -36,7 +36,7 @@
:isNest="false"
:visible="diaVisible"
:dialogHeight="1.1"
:width="40"
:width="60"
@cancel="diaCancel">
<el-form :inline="false"
:model="tokenForm"
@ -75,91 +75,88 @@
</el-form>
</c-dialog>
<c-dialog :showFooter='false'
<c-dialog class="dialogSub"
:showFooter='false'
:title="'订阅消息'"
:isNest="false"
:visible="diaSubVisible"
:dialogHeight="1.1"
:width="60"
:dialogHeight="1.3"
:width="80"
@cancel="diaSubCancel">
<div style=" position: relative;">
<div class="div_btn">
<div ref="ref_sub"
style=" position: relative;">
<el-button type="primary"
size="mini"
@click="syncSubSure">同步默认订阅消息</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="tmplId"
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>
<!-- <div class="div_sub_table">
<div class="span_sub_title">已添加模板</div>
<el-button class="btn_sub"
type="primary"
size="mini"
@click="delSubSure()">删除订阅消息</el-button> -->
<temp-list ref="temp_list_resi_has"
:showCustomerTempId="true"
:tableType="'sync'"
:talbeTitle="'已同步模板'"
:btnName="'删除订阅模板'"
:activeName="'resi'"
@refresh="loadSubscribeData"></temp-list>
<!-- </div> -->
<!-- <div class="div_sub_table table2 ">
<div class="span_sub_title">未添加模板</div>
<el-button class="btn_sub"
type="primary"
size="mini"
@click="syncSubSure()">同步订阅消息</el-button> -->
<temp-list ref="temp_list_resi_no"
:showCustomerTempId="false"
:tableType="'nosync'"
:talbeTitle="'未同步模板'"
:btnName="'同步订阅模板'"
@refresh="loadSubscribeData"
:activeName="'resi'"></temp-list>
<!-- </div> -->
</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="tmplId"
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>
name="work">
<!-- <div class="div_sub_table">
<div class="span_sub_title">已添加模板</div>
<el-button class="btn_sub"
type="primary"
size="mini"
@click="delSubSure()">删除订阅消息</el-button> -->
<temp-list ref="temp_list_work_has"
:showCustomerTempId="true"
:tableType="'sync'"
:talbeTitle="'已同步模板'"
:btnName="'删除订阅模板'"
@refresh="loadSubscribeData"
:activeName="'work'"></temp-list>
<!-- </div> -->
<!-- <div class="div_sub_table table2 ">
<div class="span_sub_title">未添加模板</div>
<el-button class="btn_sub"
type="primary"
size="mini"
@click="syncSubSure()">同步订阅消息</el-button> -->
<temp-list ref="temp_list_work_no"
:showCustomerTempId="false"
:tableType="'nosync'"
:talbeTitle="'未同步模板'"
:btnName="'同步订阅模板'"
@refresh="loadSubscribeData"
:activeName="'work'"></temp-list>
<!-- </div> -->
</el-tab-pane>
</el-tabs>
</div>
@ -171,6 +168,7 @@
import CDialog from '@c/CDialog'
import CTable from '@c/CTable'
import config from "@/js/dai/config";
import TempList from "./TempList";
import { requestPost } from "@/js/dai/request";
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
@ -283,7 +281,7 @@ export default {
selCustomerId: '',
diaSubVisible: false,
activeName: 'resi',
dataListLoading: false,
resiDataList: [],
workDataList: [],
resiTempIdList: [],//
@ -291,7 +289,7 @@ export default {
}
},
components: {
CTable, CDialog
CTable, CDialog, TempList
},
activated () {
this.$nextTick(() => {
@ -301,8 +299,8 @@ export default {
mounted () {
this.tableParams.source = this.env
console.log("客户初始化列表------本地环境-----------------")
console.log(this.env)
if (this.env === 'test') {//
this.workAppid = config.appId.testWorkAppid
this.resiAppid = config.appId.testResiAppid
@ -314,10 +312,19 @@ export default {
this.resiAppid = config.appId.devResiAppid
}
console.log("工作端appId")
console.log(this.workAppid)
console.log("居民端appId")
console.log(this.resiAppid)
// eslint-disable-next-line
this.loadData()
},
computed: {
subTabHeight () {
return this.clientHeight * 0.57 / 2
},
tableHeight () {
return this.clientHeight - 60 - 80 - 80 - 50
},
@ -416,84 +423,69 @@ export default {
this.resiDataList = []
this.workDataList = []
this.$nextTick(() => {
this.loadSubscribeData(row.customerId) //
this.selCustomerId = row.customerId
this.loadSubscribeData()
})
},
//
async loadSubscribeData (customerId) {
this.dataListLoading = true
this.selCustomerId = customerId
// const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/getcustomerlist',
async loadSubscribeData () {
this.$refs.temp_list_resi_has.setTableLoading()
this.$refs.temp_list_resi_no.setTableLoading()
this.$refs.temp_list_work_has.setTableLoading()
this.$refs.temp_list_work_no.setTableLoading()
// const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/getcustomerlist'
const url = 'https://epmet-cloud.elinkservice.cn/api/third/subscribe/getcustomerlist'
let params = {
customerId: customerId,
workAppId: this.workAppid,
customerId: this.selCustomerId,
resiAppId: this.resiAppid,
workAppId: this.workAppid
// sync: sync
}
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 => {
let resiList = []
let resiList_sync = []
let resiList_sync_no = []
let workList = []
let workList_sync = []
let workList_sync_no = []
data.resiList.forEach(element => {
if (element.state === '0') {
this.resiTempIdList.push(element.id)
resiList_sync_no.push(element)
} else {
resiList_sync.push(element)
}
})
this.workDataList.forEach(element => {
data.workList.forEach(element => {
if (element.state === '0') {
this.workTempIdList.push(element.id)
workList_sync_no.push(element)
} else {
workList_sync.push(element)
}
})
this.$refs.temp_list_resi_has.setTableData(resiList_sync, this.selCustomerId, this.resiAppid, this.workAppid)
this.$refs.temp_list_resi_no.setTableData(resiList_sync_no, this.selCustomerId, this.resiAppid, this.workAppid)
this.$refs.temp_list_work_has.setTableData(workList_sync, this.selCustomerId, this.resiAppid, this.workAppid)
this.$refs.temp_list_work_no.setTableData(workList_sync_no, this.selCustomerId, this.resiAppid, this.workAppid)
} 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 = 'https://epmet-cloud.elinkservice.cn/api/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('同步成功')
this.loadSubscribeData(this.selCustomerId)
} else {
this.$message.error(msg + ":" + internalMsg)
}
this.endLoading()
this.$refs.temp_list_resi_has.setTableLoading()
this.$refs.temp_list_resi_no.setTableLoading()
this.$refs.temp_list_work_has.setTableLoading()
this.$refs.temp_list_work_no.setTableLoading()
},
//
@ -518,9 +510,9 @@ export default {
}
}
</script>
<style lang="css">
.aaa {
height: 100px;
<style lang="css" scoped >
.dialogSub .el-dialog__body {
padding: 0 20px 10px 20px;
}
.div_btn {
z-index: 10;
@ -529,4 +521,25 @@ export default {
top: 5px;
/* margin: 0 0 20px 0; */
}
.el-tabs {
/* height: 2000px; */
}
.div_sub_table {
/* margin: 10px 10px; */
position: relative;
}
.table2 {
margin-top: 20px;
}
.span_sub_title {
/* height: 30px;
line-height: 30px; */
font-size: 16px;
padding: 5px 0 10px 0;
}
.btn_sub {
position: absolute;
right: 10px;
top: 0px;
}
</style>

268
epmet-oper-web/src/views/modules/customer/init/TempList.vue

@ -0,0 +1,268 @@
<template>
<div :class="['div_sub_table',{'table2': tableType==='nosync'}]">
<div class="span_sub_title">{{talbeTitle}}</div>
<el-button class="btn_sub"
type="primary"
size="mini"
@click="tableType==='sync'?delSubSure():syncSubSure()">{{btnName}}</el-button>
<el-table :height="subTabHeight"
ref="ref_table"
v-loading="tableLoading"
:data="tableData"
border
style="width: 100%;"
@selection-change="handleSelectionChange">
<el-table-column type="selection"
width="55">
</el-table-column>
<el-table-column prop="tmplId"
label="公共模板ID"
header-align="left"
:min-width="150"
align="left"></el-table-column>
<el-table-column v-if="showCustomerTempId"
prop="personalTempId"
label="客户模板ID"
header-align="left"
:min-width="160"
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>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
let loading //
export default {
data () {
return {
tableLoading: false,
selCustomerId: '',
resiAppid: '',
workAppid: '',
tableData: [],
selList: [],//list
title: "aaa"
}
},
components: {},
activated () {
},
mounted () {
},
computed: {
subTabHeight () {
return this.clientHeight * 0.57 / 2
},
...mapGetters(['clientHeight', 'env'])
},
methods: {
handleSelectionChange (val) {
this.selList = val
},
setTableLoading () {
this.tableLoading = !this.tableLoading
},
getSelIdList () {
let selIdList = []
this.selList.forEach(element => {
selIdList.push(element.id)
})
return selIdList
},
getSelPersonalIdList () {
let personalIdList = []
this.selList.forEach(element => {
personalIdList.push(element.personalId)
})
return personalIdList
},
setTableData (tableData, selCustomerId, resiAppid, workAppid) {
this.tableData = tableData
this.selCustomerId = selCustomerId
this.workAppid = workAppid
this.resiAppid = resiAppid
},
//
async syncSubSure (message, type) {
this.$confirm('确认同步客户的订阅消息', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let selList = this.getSelIdList()
if (selList.length === 0) {
this.$message.info("请选择要同步的模板")
} else {
console.log(selList)
this.syncSub(selList)
}
}).catch(() => {
})
},
//
async delSubSure () {
this.$confirm('确认删除客户的订阅消息', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let selList = this.getSelPersonalIdList()
if (selList.length === 0) {
this.$message.info("请选择要删除的模板")
} else {
this.delSub(selList)
}
}).catch(() => {
})
},
async syncSub (selList) {
this.startLoading()
// const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/init'
const url = 'https://epmet-cloud.elinkservice.cn/api/third/subscribe/init'
let params = {
customerId: this.selCustomerId,
workAppId: this.workAppid,
resiAppId: this.resiAppid
}
if (this.activeName === 'resi') {
params.resiTempIdList = selList
} else {
params.workTempIdList = selList
}
const { data, code, msg, internalMsg } = await requestPost(url, params)
if (code === 0) {
this.$message.success('同步成功')
this.$emit('refresh')
} else {
this.$message.error(msg + ":" + internalMsg)
}
this.endLoading()
},
async delSub (selList) {
this.startLoading()
// const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/delpersonaltemp'
const url = 'https://epmet-cloud.elinkservice.cn/api/third/subscribe/delpersonaltemp'
let params = {
customerId: this.selCustomerId,
clientType: this.activeName,
tempIdList: selList
}
const { data, code, msg, internalMsg } = await requestPost(url, params)
if (code === 0) {
this.$message.success('删除成功')
this.$emit('refresh')
} else {
this.$message.error(msg + ":" + internalMsg)
}
this.endLoading()
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
props: {
//id
showCustomerTempId: {
type: Boolean,
default: true
},
// sync nosync
tableType: {
type: String,
default: 'sync'
},
//
talbeTitle: {
type: String,
default: '已同步模板'
},
//
btnName: {
type: String,
default: '删除订阅模板'
},
activeName: {
type: String,
default: 'resi'
}
}
}
</script>
<style lang="css" >
.div_sub_table {
/* margin: 10px 10px; */
position: relative;
}
.table2 {
margin-top: 20px;
}
.span_sub_title {
/* height: 30px;
line-height: 30px; */
font-size: 16px;
padding: 5px 0 10px 0;
}
.btn_sub {
position: absolute;
right: 10px;
top: 0px;
}
</style>

10
epmet-oper-web/src/views/modules/customer/manage/CustomerInfo.vue

@ -315,11 +315,11 @@ export default {
},
showGender (key) {
if (key === '1') {
return '女'
} else if (key === '0') {
return '男'
} else {
return key
} else if (key === '2') {
return '女'
}else {
return '未知'
}
}
}
@ -333,4 +333,4 @@ export default {
.btn_save {
margin: 0 50px;
}
</style>
</style>

107
epmet-oper-web/src/views/modules/customer/miniProAgent/MiniProList.vue

@ -1,70 +1,71 @@
<!-- 代小程序管理 -->
<template>
<div>
<el-card shadow="never"
class="aui-card--fill">
<div v-show="!showVersion"
class="mod-demo__demo}">
<div v-show="!showVersion"
class="mod-demo__demo}">
<el-form :inline="true"
:model="tableParams">
<el-form-item>
<el-select v-model="tableParams.customerId"
placeholder="客户"
clearable>
<el-option v-for="item in form.data['customerId']"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-select v-model="tableParams.clientType"
placeholder="类型"
clearable>
<el-option v-for="item in form.data['clientType']"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form :inline="true"
:model="tableParams">
<el-form-item>
<el-select v-model="tableParams.customerId"
placeholder="客户"
clearable>
<el-option v-for="item in form.data['customerId']"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-select v-model="tableParams.clientType"
placeholder="类型"
clearable>
<el-option v-for="item in form.data['clientType']"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button @click="loadTableData()">查询</el-button>
</el-form-item>
<!-- <el-form-item>
<el-form-item>
<el-button @click="loadTableData()">查询</el-button>
</el-form-item>
<!-- <el-form-item>
<el-button type="primary"
@click="commitCodeDiaShow('')">上传代码</el-button>
</el-form-item> -->
</el-form>
<c-table column-type="index"
ref="table"
:url="tableUrl"
:params="tableParams"
keyword="MiniProList"
:operations="operations"
:tableHeight="tableHeight"
@versionManage="versionManage"
@setweappsupportversion="setweappsupportversion"
@basicinfo="basicinfo"
@getcategory="getcategory">
</c-table>
</el-form>
</div>
<c-table column-type="index"
ref="table"
:url="tableUrl"
:params="tableParams"
keyword="MiniProList"
:operations="operations"
:tableHeight="tableHeight"
@versionManage="versionManage"
@setweappsupportversion="setweappsupportversion"
@basicinfo="basicinfo"
@getcategory="getcategory">
</c-table>
<version-item v-show="showVersion"
ref="ref_version_item"
@okVersion="okVersion"
@cancelVersion="cancelVersion"></version-item>
</div>
<low-version ref="ref_version_form"></low-version>
<version-item v-show="showVersion"
ref="ref_version_item"
@okVersion="okVersion"
@cancelVersion="cancelVersion"></version-item>
<basic-info ref="ref_basic_info"></basic-info>
<low-version ref="ref_version_form"></low-version>
<category ref="ref_catefoty"></category>
<basic-info ref="ref_basic_info"></basic-info>
<category ref="ref_catefoty"></category>
</el-card>
</div>
</template>

370
epmet-oper-web/src/views/modules/customer/role.vue

@ -0,0 +1,370 @@
<template>
<div class="role-container">
<el-card class="flex1">
<!-- <div class="now-name">
当前客户: {{customerName}}
<el-button type="primary" size="small" @click="handleSaveSort">保存顺序</el-button>
</div> -->
<el-table ref="roleTable" v-loading="loading1" :data="roleList" row-key="roleKey" border style="width: 100%">
<el-table-column type="index" width="50"></el-table-column>
<!-- <el-table-column prop="roleId" label="角色ID"></el-table-column> -->
<el-table-column prop="roleName" label="角色名称" width="160">
<template slot-scope="scope">
<el-input v-if="scope.row.isEdit" v-model="scope.row.roleName" clearable>
</el-input>
<span v-else>{{scope.row.constName}}</span>
</template>
</el-table-column>
<el-table-column v-if="!funcShow" prop="roleKey" label="角色Key"></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="toOperationConfig(scope.row.roleKey, scope.row.roleName)">功能权限</el-button>
<!-- <span v-if="scope.row.isEdit" style="display: inline-block; margin-left: 10px;">
<el-button type="primary" size="small" @click="handleSaveChange(scope.row)">保存</el-button>
<el-button size="small" @click="scope.row.isEdit=false">取消</el-button>
</span>
<el-button v-else type="primary" size="mini" @click="handleChangeName(scope.row)">修改名称</el-button> -->
</template>
</el-table-column>
</el-table>
</el-card>
<el-dialog :visible.sync="funcShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="70%"
top="30px"
title="功能列表"
@closed="handleDialogClosed">
<div class="role-flex" v-if="funcShow">
<el-card class="flex1">
<div class="now-name">当前角色: {{roleName}}</div>
<div class="now-name">
<el-button type="primary" size="small" @click="saveOperations4Role">保存功能</el-button>
</div>
<el-table
v-loading="loading2"
height="580"
ref="opeTable"
:data="opeList"
border
@select="handleSelectionChange"
>
<el-table-column type="selection" width="55"></el-table-column>
<!-- <el-table-column prop="operationKey" label="操作Key"></el-table-column> -->
<el-table-column prop="operationName" label="操作名称"></el-table-column>
<!-- <el-table-column prop="brief" label="简介"></el-table-column> -->
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="primary" size="small" @click="toScopeConfig(scope.row.operationKey, scope.row.operationName)">范围配置</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<el-card v-show="roleShow" style="width: 250px; margin-left: 10px;">
<div class="now-name">当前功能: {{funcName}}</div>
<div class="now-name"><el-button type="primary" size="small" @click="saveSettings">保存范围</el-button></div>
<div>
<el-row :gutter="12">
<el-col v-loading="loading3">
<el-card shadow="hover">
<el-checkbox-group class="t" v-model="checkedScopes" @change="roleChange">
<el-checkbox
v-for="scope in scopeOptions"
:label="scope.scopeKey"
:key="scope.scopeKey"
>{{scope.scopeName}}</el-checkbox>
</el-checkbox-group>
</el-card>
</el-col>
</el-row>
</div>
</el-card>
</div>
</el-dialog>
</div>
</template>
<script>
import Sortable from 'sortablejs'
export default {
name: 'RoleList',
props: {
customerId: {
type: String,
default: ''
},
customerName: {
type: String,
default: ''
}
},
data () {
return {
loading1: false,
loading2: false,
loading3: false,
funcShow: false,
roleShow: false,
roleName: '',
funcName: '',
roleList: [],
opeList: [],
roleKey: '',
operationKey: '',
scopeOptions: [],
settingOptions: [],
checkedScopes: [],
checkedSettings: [],
operateSection: [], //
scopeSection: [] //
}
},
created () {
this.listRolesByCustomerId()
},
mounted () {
this.dragRoleSort()
},
beforeDestroy () {
let _data = this.$data
for (let n in _data) {
if (typeof _data[n] === 'boolean') _data[n] = false
if (typeof _data[n] === 'string') _data[n] = ''
if (typeof _data[n] === 'object') _data[n] = []
}
},
methods: {
handleDialogClosed () {
this.roleName = ''
this.roleKey = ''
this.funcName = ''
this.operateSection = []
this.scopeSection = []
this.funcShow = false
this.roleShow = false
},
listRolesByCustomerId (customerId) {
this.loading1 = true
this.$http
.post('/epmetuser/govstaffrole/roletemplates')
.then(({ data: res }) => {
console.log('ressss', res)
if (res.code === 0) {
this.roleList = res.data.map(item => {
return {
...item,
constName: item.roleName,
isEdit: false
}
})
}
setTimeout(() => {
this.loading1 = false
}, 500)
})
},
listOperations4AccessConfig (roleKey) {
this.roleKey = roleKey
this.loading2 = true
this.$http.post('/gov/access/config/roledefaultops/' + roleKey).then((resp) => {
this.opeList = resp.data.data
this.$nextTick(function () {
this.defaultCheck() //
})
setTimeout(() => {
this.loading2 = false
}, 500)
})
},
listSettingOptions (operationKey) {
let params = {
roleKey: this.roleKey,
operationKey: operationKey
}
console.log('checkedScopes', this.checkedScopes)
this.loading3 = true
this.$http
.post('/gov/access/config/opedefaultscopes/list', params)
.then(resp => {
console.log('scopeOptions', resp.data)
this.scopeOptions = resp.data.data
resp.data.data.forEach(item => {
if (item.assigned) this.checkedScopes.push(item.scopeKey)
})
console.log('checkedScopes222', this.checkedScopes)
this.settingOptions = resp.data.data
setTimeout(() => {
this.loading3 = false
}, 500)
})
},
defaultCheck () {
for (var index in this.opeList) {
let role = this.opeList[index]
if (role.assigned) {
this.$refs.opeTable.toggleRowSelection(role, true)
}
}
},
toOperationConfig (roleKey, roleName) {
this.roleName = roleName
this.funcShow = true
this.opeList = []
this.listOperations4AccessConfig(roleKey)
},
toScopeConfig (operationKey, operationName) {
this.roleShow = true
this.operationKey = operationKey
this.funcName = operationName
this.checkedScopes = []
this.listSettingOptions(operationKey)
},
saveOperations4Role () {
let param = {
roleKey: this.roleKey,
operationKeys: this.operateSection.map(item => item.operationKey)
}
this.$http.post('/gov/access/config/roledefaultopes/save', param).then(
resp => {
const { code, msg } = resp.data
if (code === 0 && msg === 'success') {
this.$message({
message: '操作成功',
type: 'success'
})
this.listOperations4AccessConfig(this.roleKey)
} else {
this.$message({
message: msg,
type: 'error'
})
}
}
)
},
saveSettings () {
let param = {
roleKey: this.roleKey,
operationKey: this.operationKey,
scopeKeys: this.scopeSection
}
this.$http.post('/gov/access/config/opedefaultscopes/save', param).then(
resp => {
const { code, msg } = resp.data
if (code === 0 && msg === 'success') {
this.$message({
type: 'success',
message: '保存成功'
})
this.listSettingOptions(this.operationKey)
} else {
this.$message({
message: msg,
type: 'error'
})
}
}
)
},
roleChange (val) {
// console.log('valooo', val)
this.scopeSection = val
// this.saveSettings(val)
},
handleSelectionChange (val) {
// console.log('val', val)
this.operateSection = val
// this.saveOperations4Role(val)
},
handleChangeName (row) {
row.isEdit = true
},
handleSaveChange (row) {
let data = {
roleKey: row.roleKey,
roleName: row.roleName
}
this.$http
.post('/epmetuser/govstaffrole/update-role', data)
.then(({ data: res }) => {
console.log('ressss', res)
if (res.code === 0 && res.msg === 'success') {
this.$message({
type: 'success',
message: '保存成功'
})
this.listRolesByCustomerId(this.customerId)
} else {
this.$message({
type: 'error',
message: res.internalMsg
})
}
})
},
dragRoleSort () {
const el = this.$refs.roleTable.$el.querySelectorAll('.el-table__body-wrapper > table > tbody')[0]
this.sortTable = Sortable.create(el, {
group: 'dragTable',
ghostClass: 'sortable-ghost', // Class name for the drop placeholder,
// setData: function(dataTransfer, dragEl) {
// dataTransfer.setData("Text", dragEl.textContent);
// },
delay: 0,
onChange: evt => {
// console.log(evt)
},
onEnd: evt => {
const targetRow = this.roleList.splice(evt.oldIndex, 1)[0]
this.roleList.splice(evt.newIndex, 0, targetRow)
}
})
},
handleSaveSort () {
let data = {
roleIdList: this.roleList.map(item => {
return item.roleKey
})
}
this.$http
.post('/epmetuser/govstaffrole/save-sortorder', data)
.then(({ data: res }) => {
console.log('ressss', res)
if (res.code === 0 && res.msg === 'success') {
this.$message({
type: 'success',
message: '保存成功'
})
this.listRolesByCustomerId(this.customerId)
} else {
this.$message({
type: 'error',
message: res.internalMsg
})
}
})
}
}
}
</script>
<style>
.role-container, .role-flex {
display: flex;
}
.flex1 {
flex: 1;
}
.now-name {
/* display: flex;
justify-content: space-between; */
margin-bottom: 10px;
}
.aui-wrapper .el-card + .el-card {
margin-top: 0;
}
.role-container .el-dialog__body {
padding: 0 20px 20px;
}
</style>

6
epmet-oper-web/src/views/modules/productConfig/autoTest/autoTestList.vue

@ -156,8 +156,8 @@
label="账号"
header-align="center"
min-width="140"></el-table-column>
</el-table> -->
<el-tag type="info"
@ -422,7 +422,7 @@ export default {
list = this.addCommunity("0", 1)
}
this.dataTableList.push(list)
console.log(this.dataTableList)
//console.log(this.dataTableList)
},
methods: {
//

564
epmet-oper-web/src/views/modules/productConfig/mostedit/MostList.vue

@ -1,19 +1,559 @@
<template>
<div>
ffffffffff
</div>
<!-- 项目滞留超期提醒 -->
<div v-show="showType==='customize'" class="m-body">
<el-tag class="mh">
<div class="h-left">
<div class="line">
项目滞留超期提醒
</div>
</div>
<div class="h-right">
<button class="h-right-two" @click="one_two()">保存设置</button>
<button class="h-right-one" @click="stayover()">恢复默认</button>
<el-button class="diaCancel" @click="diaCancel()">取消返回</el-button>
</div>
</el-tag>
<!-- 设定核算单位prefix-icon="el-icon-date" -->
<div class="mh-child">
<el-tag class="set-accont">设定核算单位天/日起止时间</el-tag>
<el-time-picker
class="overtime-input"
arrow-control
prefix-icon=el-icon-date
v-model="startTime"
:picker-options="{
selectableRange: '00:00:00'+ '-' + '23:59:59' ,
}"
placeholder="任意时间点"
value-format="HH:mm:ss">
</el-time-picker>
<text-align style=" padding: 20px;"></text-align>
<el-time-picker
class="overtime-input"
arrow-control
prefix-icon=el-icon-date
v-model="endTime"
:picker-options="{
selectableRange: startTime + '-' + '23:59:59' ,
}"
placeholder="任意时间点"
value-format="HH:mm:ss">
</el-time-picker>
</div>
<!-- 设定滞留超期时间 start: '08:30:00',
step: '00:15:00',
end: '23:30:00' -->
<div class="mh-child">
<el-tag class="set-overtime">设定滞留超期时间</el-tag>
<el-from-item class="el-from-item">
<button class="btn btn-delet" @click="staytime_subtract()">-</button>
</el-from-item>
<el-input class="overtime-input" v-model="detentionDays"></el-input>
<el-from-item class="el-from-item">
<button class="btn btn-add" @click="staytime_add()">+</button>
</el-from-item>
<el-tag style="padding-left: 14px;padding-right: 14px;font-size: 15px;background-color: white;border: 0px;color: #000000;">/</el-tag>
<el-select v-model="value" placeholder="请选择" class="overtime-input">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
<!-- 设定即将超期时间提醒 -->
<div class="mh-child">
<el-tag class="set-overtime">设定即将超期时间提醒</el-tag>
<el-from-item class="el-from-item">
<button class="btn btn-delet" @click="subtract_remind()">-</button>
</el-from-item>
<el-from-item>
<el-input class="overtime-input" v-model="remindTime" ></el-input>
</el-from-item>
<el-from-item class="el-from-item">
<button class="btn btn-add" @click="add_remind()">+</button>
</el-from-item>
<el-tag style="font-size: 14px; background-color: white;border: white;color: black;">单位天</el-tag>
</div>
<!-- 统一定时消息推送时间 -->
<div class="mh-child">
<el-tag class="set-overtime">统一定时消息推送时间</el-tag>
<el-time-select
class="overtime-input"
v-model="pushTime"
:picker-options="{
start: '06:00',
step: '00:05',
end: '23:00'
}"
placeholder="选择时间">
</el-time-select>
</div>
<!-- 议题发布前经网络员审核-->
<el-tag class="mh">
<div class="h-left">
<div class="line">
议题发布前经网络员审核
</div>
</div>
<div class="h-right">
<button class="h-right-two">保存设置</button>
<button class="h-right-one" @click="yitimoren()">恢复默认</button>
</div>
</el-tag>
<!-- 议题发布前经网络员审核 -->
<div class="mh-child">
<el-tag class="set-overtime">议题发布前经网络员审核</el-tag>
<el-switch
v-model="button1"
active-text="开启"
inactive-text="关闭"
element style="width: 200px;">
</el-switch>
</div>
<!-- 待办事项短信通知 -->
<el-tag class="mh">
<div class="h-left">
<div class="line">
待办事项短信通知
</div>
</div>
<div class="h-right">
<button class="h-right-two">保存设置</button>
<button class="h-right-one" @click="daibanshi()">恢复默认</button>
</div>
</el-tag>
<!-- 代办事项发送短信通知 -->
<div class="mh-child">
<el-tag class="set-overtime">待办事项发送短信通知</el-tag>
<el-switch
v-model="button2"
active-text="开启"
inactive-text="关闭">
</el-switch>
</div>
<!-- 剩余短信数量-->
<div class="mh-child">
<el-tag class="set-overtime">剩余短信数量</el-tag>
<el-input
placeholder="请输入内容"
v-model="input"
clearable
class="overtime-input">
</el-input>
<el-tag style="font-size: 14px; background-color: white;border: white;color: black;">单位条</el-tag>
</div>
<!-- 小组审核机制-->
<el-tag class="mh">
<div class="h-left">
<div class="line">
小组审核机制
</div>
</div>
<div class="h-right">
<button class="h-right-two">保存设置</button>
<button class="h-right-one">恢复默认</button>
</div>
</el-tag>
<!-- 新建小组进组需小组审核-->
<div class="mh-child">
<el-tag class="set-overtime">新建小组进组需小组审核</el-tag>
<el-switch
v-model="button3"
active-text="开启"
inactive-text="关闭">
</el-switch>
</div>
<!-- 其他设置-->
<el-tag class="mh">
<div class="h-left">
<div class="line">
其他设置
</div>
</div>
<div class="h-right">
<button class="h-right-two">保存设置</button>
<button class="h-right-one">恢复默认</button>
</div>
</el-tag>
</div>
</template>
<script>
export default {
data() {
return {
options:[{
value: 'work',
label: '工作日'
}, {
value: 'rest',
label: '休息日'
}],
value: 'rest',
button1: false,
button2: true,
button3: true,
input: 2,
startTime: '10:10:10',
endTime:'12:15:16',
code: ' ',
auditSwitch: "",
customerId: '81776', // id
customerName: '', //
detentionDays:'1',
calculation: '',
remindTime: '1',
pushTime: "18:10",
showType:'customize',
}
},
watch: {
input: function(val){
this.input = val.replace(/\D/g,'')
},
detentionDays: function(val){
this.detentionDays = val.replace(/\D/g,'')
},
remindTime: function(val){
this.remindTime = val.replace(/\D/g,'')
}
},
// mounted:function(){
// this.one_one();
// },
methods:{
staytime_subtract:function(detentionDays){
if(this.detentionDays>=1){
this.detentionDays--
}
else if(this.detentionDays==0){
alert("已达最小值","注意","ss");
}
},
staytime_add:function(detentionDays){
this.detentionDays++;
},
subtract_remind:function(remindTime){
if(this.remindTime>=1){
this.remindTime--;
}
else if(this.remindTime==0){
alert("已达最小值","注意","ss");
}
},
add_remind:function(remindTime){
this.remindTime++;
},
//
// cancleBack:function(){
// this.showType = 'customize';
// },
diaCancel() {
this.$emit('cancleBack')
},
//
yitimoren (row) {
this.$confirm('确认恢复默认值', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const url = '/gov/issue/parameter/reviewinit'
const param = {
customerId: this.customerId,
}
window.app.ajax.post(url, param,
(data, rspMsg) => { //data
this.$message.success('初始化成功' + rspMsg,) //
// console.log(data.auditSwitch)
// console.log('-----------------')
// console.log(this.button1)
if(data.auditSwitch==='open'){
this.button1= true
}else{
this.button1=false
}
},
(rspMsg, data) => {
this.$message.error(rspMsg)
})
}).catch(() => {
})
},
//
stayover (row) {
this.$confirm('确认恢复默认值', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const url = '/gov/project/parameter/remindinit'
const param = {
customerId: this.customerId,
detentionDays: this.detentionDays,
calculation: this.calculation,
remindTime: this.remindTime,
pushTime: this.pushTime,
startTime: this.startTime,
endTime: this.endTime,
}
window.app.ajax.post(url, param,
(data, rspMsg) => { //data
this.$message.success('初始化成功' + rspMsg,) //
// console.log(data.detentionDays)
// console.log(data.calculation)
// console.log(data.remindTime)
// console.log(data.pushTime)
// console.log(data.startTime)
// console.log(data.endTime)
// console.log('-----------------')
// console.log(this.pushTime)
this.remindTime = parseInt(data.remindTime)
this.detentionDays = parseInt(data.detentionDays)
if(data.calculation=='work'){
this.value= 'work';
}else{
this.value='work'
}
this.pushTime = data.pushTime
this.startTime = data.startTime
this.endTime = data.endTime
},
(rspMsg, data) => {
this.$message.error(rspMsg)
})
}).catch(() => {
})
},
// ------
},
}
</script>
<style>
<style lang="scss" scoped>
.line{
position: relative;
width: 120px;
border-bottom: 3px solid #17b3a3;
}
.el-card__body{
padding: 0px;
}
.m-body{
height: 790px;
width: 100%;
padding-top: 0px;
}
.select-date{
margin-left: 100px;
}
.mh{
width: 100%;
height: 50px;
display: flex;
background-color: white;
border-color: white;
color: black;
padding: 0px;
border-bottom: 2px solid #eeeeee;
}
.mh-child{
margin-top: 30px;
position: relative;
}
/* div.el-switch.is-checked{
} */
div.el-switch{
margin-left: 60px;
}
.el-switch__core{
height: 25px;
width: 50px;
border-radius: 25px;
}
.el-switch__core:after{
width: 20px;
height: 20px;
}
.el-switch.is-checked .el-switch__core::after{
margin-left: -20px;
}
.h-left{
padding: 9px;
margin: auto 0;
font-size: 15px;
position: relative;
width: 70%;
padding-left: 0px;
padding-top: 15px;
padding-bottom: 2px;
}
.h-right{
padding-bottom: 2px;
padding-top: 8px;
font-size: 15px;
position: relative;
width: 30%;
}
.h-right-one{
background-color: #d4d2ce;
color: black;
border: 0px;
width:30%;
height: 30px;
text-align: center;
padding-left: 2px;
padding-right: 2px;
border-radius: 4px;
float: right;
}
.h-right-one:hover {
background-color: #deddda;
color: black;
border: 0px;
width:30%;
height: 30px;
text-align: center;
padding-left: 2px;
padding-right: 2px;
border-radius: 4px;
float: right;
}
.h-right-two{
background-color: #17b3a3;
color: white;
width:30%;
height: 30px;
border: 0px;
margin-left: 10px;
text-align: center;
padding-left: 2px;
padding-right: 2px;
border-radius: 4px;
float: right;
}
.h-right-two:hover {
background-color: #18bfac;
}
.diaCancel{
float: right;
margin-right: 10px;
width: 30%;
height: 30px;
padding: 0px;
font-size: 15px;
}
.set-accont{
width: 250px;
text-align: right;
font-size: 15px;
padding-right: 30px;
background-color: white;
color: black;
border-color: white;
}
.set-overtime{
width: 250px;
text-align: right;
font-size: 16px;
padding-right: 30px;
background-color: white;
color: black;
border-color: white;
}
.overtime-input{
width: 280px;
border-radius: 0px;
}
.el-input--medium{
text-align: center;
}
input.el-input__inner{
border-radius: 0px;
text-align: center;
padding-right: 5px;
}
.btn{
background-color: #f1f1f1;
border: 1px solid #DCDFE6;
}
.el-from-item :hover {
background-color:#f7f7f7 !important;
border: 1px solid #DCDFE6;
}
.btn-add{
font-size: 20px;
height: 36px;
padding-top: 2px;
padding-left: 8px;
padding-right: 22px;
padding-bottom: 6px;
border-radius: 0px;
border-bottom-right-radius: 5px;
border-top-right-radius: 5px;
width: 10px;
}
.btn-delet{
font-size: 20px;
height: 36px;
padding-top: 2px;
padding-left: 12px;
padding-right: 18px;
padding-bottom: 6px;
border-radius: 0px;
border-bottom-left-radius: 5px;
border-top-left-radius: 5px;
width: 10px;
}
div.set-overtime.el-input.el-input--medium.el-input--suffix{
padding-right: 0px;
}
</style>

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

@ -27,6 +27,9 @@
align="center"
width="150">
<template slot-scope="scope">
<el-button type="text"
size="small"
@click="showSync(scope.row)">同步</el-button>
<el-button type="text"
size="small"
@click="detailShow(scope.row)">详情</el-button>
@ -58,7 +61,7 @@ export default {
data () {
return {
activeName: 'resi',
appIdL: '',//
appId: '',//
//
dataListLoading: false,
@ -82,7 +85,6 @@ export default {
methods: {
doLayout () {
this.$nextTick(() => {
this.$refs['ref_table'].doLayout() //
@ -90,9 +92,7 @@ export default {
},
init (appId) {
this.appId = appId
this.loadData()
},
@ -120,7 +120,37 @@ export default {
this.appId = appId
this.loadData()
},
//
showSync (row) {
this.$confirm('确认同步模板到所有客户', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.syncToAll(row)
}).catch(() => {
})
},
async syncToAll (row) {
this.startLoading()
// const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/initall'
const url = 'https://epmet-cloud.elinkservice.cn/api/third/subscribe/initall'
const params = {
appId: this.appId,
tempId: row.priTmplId
}
const { data, code, msg, internalMsg } = await requestPost(url, params)
if (code === 0) {
this.$message.success('同步成功')
// this.loadData()
} else {
this.$message.error(msg + ":" + internalMsg)
}
this.endLoading()
},
//
detailShow (row) {
this.$refs['ref_edit'].init(row)

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

@ -46,6 +46,11 @@
ref="dataForm"
:label-width="'120px'">
<el-form-item label=""
prop="isSync">
<el-checkbox v-model="dataForm.isSync">同步到所有客户</el-checkbox>
</el-form-item>
<el-form-item label="App类型"
prop="appId">
<el-select class="item_width_1"
@ -130,6 +135,7 @@ export default {
resiAppid: '',
dataForm: {
isSync: true,
appId: '',
tid: '',
title: '',
@ -158,6 +164,7 @@ export default {
this.dataForm.tid = row.tid
this.dataForm.type = row.type
this.dataForm.title = row.title
this.dataForm.isSync = true
this.visible = true
@ -222,7 +229,7 @@ export default {
const url = 'https://epmet-cloud.elinkservice.cn/api/third/subscribe/addtemplate'
this.dataForm.kidList = this.kidSelIdList
this.dataForm.nameList = this.kidSelNameList
console.log(this.dataForm)
//console.log(this.dataForm)
const { data, code, msg, internalMsg } = await requestPost(url, this.dataForm)
if (code === 0) {
let clientType = this.dataForm.appId === this.resiAppid ? 'resi' : 'gov'
@ -245,6 +252,7 @@ export default {
//
resetData () {
this.dataForm = {
isSync: true,
appId: '',
tid: '',
sceneDesc: '',
@ -350,4 +358,3 @@ export default {
padding: 0 0 0 10px;
}
</style>

0
epmet-oper-web/src/views/modules/customer/sys/calender-add-or-update.vue → epmet-oper-web/src/views/modules/sys/calender-add-or-update.vue

0
epmet-oper-web/src/views/modules/customer/sys/calender.vue → epmet-oper-web/src/views/modules/sys/calender.vue

0
epmet-oper-web/src/views/modules/customer/sys/dept-add-or-update.vue → epmet-oper-web/src/views/modules/sys/dept-add-or-update.vue

0
epmet-oper-web/src/views/modules/customer/sys/dept.vue → epmet-oper-web/src/views/modules/sys/dept.vue

0
epmet-oper-web/src/views/modules/customer/sys/dict-data-add-or-update.vue → epmet-oper-web/src/views/modules/sys/dict-data-add-or-update.vue

0
epmet-oper-web/src/views/modules/customer/sys/dict-data.vue → epmet-oper-web/src/views/modules/sys/dict-data.vue

0
epmet-oper-web/src/views/modules/customer/sys/dict-type-add-or-update.vue → epmet-oper-web/src/views/modules/sys/dict-type-add-or-update.vue

0
epmet-oper-web/src/views/modules/customer/sys/dict-type.vue → epmet-oper-web/src/views/modules/sys/dict-type.vue

0
epmet-oper-web/src/views/modules/customer/sys/log-error.vue → epmet-oper-web/src/views/modules/sys/log-error.vue

0
epmet-oper-web/src/views/modules/customer/sys/log-login.vue → epmet-oper-web/src/views/modules/sys/log-login.vue

0
epmet-oper-web/src/views/modules/customer/sys/log-operation.vue → epmet-oper-web/src/views/modules/sys/log-operation.vue

0
epmet-oper-web/src/views/modules/customer/sys/menu-add-or-update.vue → epmet-oper-web/src/views/modules/sys/menu-add-or-update.vue

0
epmet-oper-web/src/views/modules/customer/sys/menu.vue → epmet-oper-web/src/views/modules/sys/menu.vue

0
epmet-oper-web/src/views/modules/customer/sys/news-add-or-update.vue → epmet-oper-web/src/views/modules/sys/news-add-or-update.vue

0
epmet-oper-web/src/views/modules/customer/sys/news.vue → epmet-oper-web/src/views/modules/sys/news.vue

0
epmet-oper-web/src/views/modules/customer/sys/params-add-or-update.vue → epmet-oper-web/src/views/modules/sys/params-add-or-update.vue

0
epmet-oper-web/src/views/modules/customer/sys/params.vue → epmet-oper-web/src/views/modules/sys/params.vue

0
epmet-oper-web/src/views/modules/customer/sys/region-add-or-update.vue → epmet-oper-web/src/views/modules/sys/region-add-or-update.vue

0
epmet-oper-web/src/views/modules/customer/sys/region.vue → epmet-oper-web/src/views/modules/sys/region.vue

0
epmet-oper-web/src/views/modules/customer/sys/role-add-or-update.vue → epmet-oper-web/src/views/modules/sys/role-add-or-update.vue

0
epmet-oper-web/src/views/modules/customer/sys/role.vue → epmet-oper-web/src/views/modules/sys/role.vue

0
epmet-oper-web/src/views/modules/customer/sys/user-add-or-update.vue → epmet-oper-web/src/views/modules/sys/user-add-or-update.vue

4
epmet-oper-web/src/views/modules/customer/sys/user.vue → epmet-oper-web/src/views/modules/sys/user.vue

@ -56,7 +56,9 @@
header-align="center"
align="center">
<template slot-scope="scope">
{{ scope.row.gender==='0'?'男':'女'}}
<span v-if="scope.row.gender===0"></span>
<span v-else-if="scope.row.gender===1"></span>
<span v-else>保密</span>
</template>
</el-table-column>
<el-table-column prop="status"

120
epmet-oper-web/src/views/pages/loginWork.vue

@ -1,5 +1,5 @@
<template>
<div class="aui-wrapper aui-page__login">
<div v-if="isShowLogin" class="aui-wrapper aui-page__login">
<div class="aui-content__wrapper">
<main class="aui-content">
@ -142,11 +142,14 @@ import debounce from 'lodash/debounce'
import { messages } from '@/i18n'
import { getUUID } from '@/utils'
import { Loading } from 'element-ui' // Loading
import JSEncrypt from 'jsencrypt'//
let loading //
export default {
data () {
return {
pubKey: null, //
isShowLogin: true,
i18nMessages: messages,
captchaPath: '',
dataForm: {
@ -184,17 +187,39 @@ export default {
}
},
created () {
this.getCaptcha()
//
if (this.$route.query.platformToken) {
this.isShowLogin = false;
this.getAutoLogin(this.$route.query.platformToken)
}else{
this.getCaptcha()
//
this.getPubKey()
}
},
mounted() {
localStorage.removeItem('showHeader');
},
methods: {
//
getPubKey() {
this.$http.post('/auth/govweb/getKey').then(({data: res}) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.pubKey = res.data; // ;
}).catch(() => {
})
},
//
getCaptcha () {
this.dataForm.uuid = getUUID()
this.captchaPath = `${window.SITE_CONFIG['apiURL']}/auth/login/captcha?uuid=${this.dataForm.uuid}`
},
//
dataFormSubmitHandle () {
dataFormSubmitHandle() {
this.$refs['dataForm'].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj)
@ -206,41 +231,62 @@ export default {
phone: this.dataForm.phone
}
window.app.ajax.post(
url, params,
(data, rspMsg) => {
if (data.length === 0) {//
this.$message.error('账号不存在')
this.endLoading()
} else if (data.length === 1) {
this.selectCustomer(data[0])
} else {
this.endLoading()
this.diaVisible = true
this.$nextTick(() => {
this.tableData = data
})
}
},
(rspMsg, data) => {
this.endLoading()
this.$message.error(rspMsg)
})
url, params,
(data, rspMsg) => {
if (data.length === 0) {//
this.$message.error('账号不存在')
this.endLoading()
} else if (data.length === 1) {
this.selectCustomer(data[0])
} else {
this.endLoading()
this.diaVisible = true
this.$nextTick(() => {
this.tableData = data
})
}
},
(rspMsg, data) => {
this.endLoading()
this.$message.error(rspMsg)
})
})
},
//
getAutoLogin(platformToken) {
this.dataForm.thirdToken = platformToken;
this.dataForm.platform = "pyld";
this.$http.post(`/auth/sso/oper/third/login`, this.dataForm).then(({data: res}) => {
if (res.code !== 0) {
if (res.code == 8302) {
return this.$message.error(res.internalMsg)
}
return this.$message.error(res.msg)
}
localStorage.setItem('customerId', res.data.customerId)
localStorage.setItem('userType', 'work')
localStorage.setItem('showHeader', '0')
Cookies.set('token', res.data.token)
this.$router.replace({name: 'home'})
}).catch(() => {
})
// epmet-ext9.elinkservice.cn/platform-admin
},
//
selectCustomer (row) {
selectCustomer(row) {
localStorage.setItem('customerId', row.customerId)
localStorage.setItem('customerName', row.customerName)
this.startLoading()
// const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/auth/govweb/login'
const url = '/auth/govweb/login'
this.dataForm.customerId = row.customerId
this.$http.post(url, this.dataForm).then(({ data: res }) => {
let param = {};
Object.assign(param,this.dataForm);
param.password = this.encryptedData(this.pubKey, this.dataForm.password);
this.$http.post(url, param).then(({data: res}) => {
if (res.code !== 0) {
this.getCaptcha()
return this.$message.error(res.msg)
@ -250,18 +296,19 @@ export default {
localStorage.setItem('userType', 'work')
Cookies.set('token', res.data.token)
this.$router.replace({ name: 'home' })
}).catch(() => { })
this.$router.replace({name: 'home'})
}).catch(() => {
})
this.endLoading()
},
//
diaCancel () {
diaCancel() {
this.diaVisible = false
},
//
startLoading () {
startLoading() {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
@ -269,13 +316,22 @@ export default {
})
},
//
endLoading () {
endLoading() {
// clearTimeout(timer);
if (loading) {
loading.close()
}
},
//
encryptedData(key, data) {
debugger
// JSEncrypt
let encryptor = new JSEncrypt();
//
encryptor.setPublicKey(key);
//
return encryptor.encrypt(data);
}
}
}

Loading…
Cancel
Save