Browse Source

pc工作端

master
jiangyy 5 years ago
parent
commit
a79ea8ac44
  1. BIN
      epmet-oper-web/src/assets/img/staff-default-avatar-boy.png
  2. BIN
      epmet-oper-web/src/assets/img/staff-default-avatar-girl.png
  3. 42
      epmet-oper-web/src/views/main-navbar.vue
  4. 16
      epmet-oper-web/src/views/main-sidebar.vue
  5. 7
      epmet-oper-web/src/views/main.vue
  6. 21
      epmet-oper-web/src/views/modules/customer/customize/ConfigItem.vue
  7. 9
      epmet-oper-web/src/views/modules/customer/customize/CustomerList.vue
  8. 13
      epmet-oper-web/src/views/modules/customer/customize/MiniHome.vue
  9. 4
      epmet-oper-web/src/views/modules/customer/manage/CustomerInfo.vue
  10. 6
      epmet-oper-web/src/views/modules/customer/miniProAgent/version/OperHistory.vue
  11. 67
      epmet-oper-web/src/views/pages/loginWork.vue

BIN
epmet-oper-web/src/assets/img/staff-default-avatar-boy.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

BIN
epmet-oper-web/src/assets/img/staff-default-avatar-girl.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

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

@ -5,7 +5,7 @@
<h1 class="aui-navbar__brand" <h1 class="aui-navbar__brand"
@click="$router.push({ name: 'home' })"> @click="$router.push({ name: 'home' })">
<a class="aui-navbar__brand-lg" <a class="aui-navbar__brand-lg"
href="javascript:;">{{ $t('brand.lg') }}</a> href="javascript:;">{{ userType==='work'?customerName :$t('brand.lg') }}</a>
<a class="aui-navbar__brand-mini" <a class="aui-navbar__brand-mini"
href="javascript:;">{{ $t('brand.mini') }}</a> href="javascript:;">{{ $t('brand.mini') }}</a>
</h1> </h1>
@ -20,17 +20,11 @@
<use xlink:href="#icon-outdent"></use> <use xlink:href="#icon-outdent"></use>
</svg> </svg>
</el-menu-item> </el-menu-item>
<el-menu-item index="2"
@click="refresh()">
<svg class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--refresh"
aria-hidden="true">
<use xlink:href="#icon-sync"></use>
</svg>
</el-menu-item>
</el-menu> </el-menu>
<el-menu class="aui-navbar__menu" <el-menu class="aui-navbar__menu"
mode="horizontal"> mode="horizontal">
<el-menu-item index="1"> <!-- <el-menu-item index="1">
<el-dropdown placement="bottom" <el-dropdown placement="bottom"
:show-timeout="0"> :show-timeout="0">
<el-button size="mini">{{ $t('_lang') }}</el-button> <el-button size="mini">{{ $t('_lang') }}</el-button>
@ -40,8 +34,8 @@
@click.native="$i18n.locale = key">{{ val._lang }}</el-dropdown-item> @click.native="$i18n.locale = key">{{ val._lang }}</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</el-menu-item> </el-menu-item> -->
<el-menu-item index="2"> <!-- <el-menu-item index="2">
<a href="//www.renren.io/" <a href="//www.renren.io/"
target="_blank"> target="_blank">
<svg class="icon-svg aui-navbar__icon-menu" <svg class="icon-svg aui-navbar__icon-menu"
@ -49,20 +43,31 @@
<use xlink:href="#icon-earth"></use> <use xlink:href="#icon-earth"></use>
</svg> </svg>
</a> </a>
</el-menu-item> </el-menu-item> -->
<el-menu-item index="3" <!-- <el-menu-item index="3"
@click="fullscreenHandle()"> @click="fullscreenHandle()">
<svg class="icon-svg aui-navbar__icon-menu" <svg class="icon-svg aui-navbar__icon-menu"
aria-hidden="true"> aria-hidden="true">
<use xlink:href="#icon-fullscreen"></use> <use xlink:href="#icon-fullscreen"></use>
</svg> </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>
<el-menu-item index="4" <el-menu-item index="4"
class="aui-navbar__avatar"> class="aui-navbar__avatar">
<el-dropdown placement="bottom" <el-dropdown placement="bottom"
:show-timeout="0"> :show-timeout="0">
<span class="el-dropdown-link"> <span class="el-dropdown-link">
<img src="~@/assets/img/avatar.png"> <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> <span>{{ $store.state.user.realName }}</span>
<i class="el-icon-arrow-down"></i> <i class="el-icon-arrow-down"></i>
</span> </span>
@ -98,6 +103,15 @@ export default {
UpdatePassword UpdatePassword
}, },
computed: { computed: {
userType () {
return localStorage.getItem('userType')
},
customerName () {
// console.log(localStorage.getItem('userType'))
return localStorage.getItem('customerName')
}
}, },
methods: { methods: {
// //

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

@ -1,13 +1,14 @@
<template> <template>
<aside :class="['aui-sidebar', `aui-sidebar--${$store.state.sidebarLayoutSkin}`]"> <aside :class="['aui-sidebar', `aui-sidebar--${$store.state.sidebarLayoutSkin}`]">
<div class="aui-sidebar__inner"> <div class="aui-sidebar__inner">
<el-menu <el-menu :default-active="$store.state.sidebarMenuActiveName"
:default-active="$store.state.sidebarMenuActiveName" :collapse="false"
:collapse="$store.state.sidebarFold" :unique-opened="true"
:unique-opened="true" :collapseTransition="false"
:collapseTransition="false" class="aui-sidebar__menu">
class="aui-sidebar__menu"> <sub-menu v-for="menu in $store.state.sidebarMenuList"
<sub-menu v-for="menu in $store.state.sidebarMenuList" :key="menu.id" :menu="menu" /> :key="menu.id"
:menu="menu" />
</el-menu> </el-menu>
</div> </div>
</aside> </aside>
@ -25,6 +26,7 @@ export default {
}, },
created () { created () {
this.$store.state.sidebarMenuList = window.SITE_CONFIG['menuList'] this.$store.state.sidebarMenuList = window.SITE_CONFIG['menuList']
console.log(this.$store.state.sidebarMenuList)
} }
} }
</script> </script>

7
epmet-oper-web/src/views/main.vue

@ -108,7 +108,8 @@ export default {
this.$store.state.user.id = res.data.id this.$store.state.user.id = res.data.id
this.$store.state.user.realName = res.data.realName this.$store.state.user.realName = res.data.realName
this.$store.state.user.superAdmin = res.data.superAdmin this.$store.state.user.superAdmin = res.data.superAdmin
this.$store.state.user.customerId = '' this.$store.state.user.gender = data.gender
localStorage.setItem('customerId', '')
}).catch(() => { }) }).catch(() => { })
}, },
// //
@ -122,8 +123,8 @@ export default {
this.$store.state.user.id = data.id this.$store.state.user.id = data.id
this.$store.state.user.realName = data.realName this.$store.state.user.realName = data.realName
this.$store.state.user.superAdmin = data.superAdmin this.$store.state.user.superAdmin = data.superAdmin
this.$store.state.user.customerId = data.customerId this.$store.state.user.gender = data.gender
console.log(this.$store.state.user)
}, },
(rspMsg, data) => { (rspMsg, data) => {

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

@ -1,7 +1,8 @@
<!-- 配置详情 --> <!-- 配置详情 -->
<template> <template>
<div style=" position: relative;"> <div style=" position: relative;">
<div class="div_btn"> <div v-if="userType==='opea'"
class="div_btn">
<span style="margin-right:20px">{{customerName}}</span> <span style="margin-right:20px">{{customerName}}</span>
<el-button type="default" <el-button type="default"
size="mini" size="mini"
@ -132,7 +133,8 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-table :data="resiNoList" <el-table v-if="userType==='opea'"
:data="resiNoList"
border border
v-loading="noLoading" v-loading="noLoading"
element-loading-text="正在加载中" element-loading-text="正在加载中"
@ -298,7 +300,8 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-table :data="workNoList" <el-table v-if="userType==='opea'"
:data="workNoList"
border border
v-loading="noLoading" v-loading="noLoading"
element-loading-text="正在加载中" element-loading-text="正在加载中"
@ -419,11 +422,19 @@ export default {
CDialog, ConfigEdit CDialog, ConfigEdit
}, },
mounted () { mounted () {
this.initData(localStorage.getItem('customerId'), localStorage.getItem('customerName'))
}, },
computed: { computed: {
userType () {
return localStorage.getItem('userType')
},
tableHeight1 () { tableHeight1 () {
return (this.clientHeight - 220) / 2 + 50 if (this.userType === 'opea') {
return (this.clientHeight - 220) / 2 + 50
} else {
return (this.clientHeight - 220)
}
}, },
tableHeight2 () { tableHeight2 () {
return (this.clientHeight - 220) / 2 - 60 return (this.clientHeight - 220) / 2 - 60

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

@ -117,7 +117,16 @@ export default {
RoleList RoleList
}, },
created () { created () {
},
mounted () {
// const userType = localStorage.getItem('userType')
// if (userType === 'work') {
// this.showMiniHome(localStorage.getItem('customerId'), localStorage.getItem('customerName'), 0)
// } else {
this.queryCustomerList() this.queryCustomerList()
// }
}, },
methods: { methods: {
queryCustomerList () { queryCustomerList () {

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

@ -3,7 +3,8 @@
<div class="m-wx_index" <div class="m-wx_index"
v-show="step==2"> v-show="step==2">
<el-button type="default" <el-button v-if="userType==='oper'"
type="default"
@click="cancleBack">取消返回</el-button> @click="cancleBack">取消返回</el-button>
<el-button type="info" <el-button type="info"
@click="isInPreview = true">预览</el-button> @click="isInPreview = true">预览</el-button>
@ -520,6 +521,9 @@ export default {
}, },
computed: { computed: {
userType () {
return localStorage.getItem('userType')
},
cptTypeListTiled () { cptTypeListTiled () {
const { cptTypeList } = this const { cptTypeList } = this
let list = [] let list = []
@ -544,6 +548,13 @@ export default {
return this.cptList.filter(item => this.checkCptRegion(item) === 'fixed') return this.cptList.filter(item => this.checkCptRegion(item) === 'fixed')
} }
}, },
mounted () {
const userType = localStorage.getItem('userType')
if (userType === 'work') {
this.startSetWxIndex(localStorage.getItem('customerId'), localStorage.getItem('customerName'), 0)
}
},
methods: { methods: {
cancleBack () { cancleBack () {

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

@ -162,8 +162,8 @@ export default {
mounted () { mounted () {
this.$nextTick(() => { this.$nextTick(() => {
console.log(this.$store.state.user.customerId)
this.customerId = this.$store.state.user.customerId this.customerId = localStorage.getItem('customerId')
this.loadData() this.loadData()
}) })

6
epmet-oper-web/src/views/modules/customer/miniProAgent/version/OperHistory.vue

@ -81,6 +81,7 @@ export default {
activeName: 'oper', activeName: 'oper',
params: {}, params: {},
customerId: '',//id customerId: '',//id
clientType: '',//
// //
tableUrl: 'https://epmet-cloud.elinkservice.cn/api/third/code/history', tableUrl: 'https://epmet-cloud.elinkservice.cn/api/third/code/history',
// tableUrl: '/third/code/history', // tableUrl: '/third/code/history',
@ -126,7 +127,9 @@ export default {
initData (params) { initData (params) {
// { this.customerId, this.clientType } = params // { this.customerId, this.clientType } = params
this.customerId = params.customerId this.customerId = params.customerId
this.clientType = params.clientType
this.tableParams.customerId = params.customerId this.tableParams.customerId = params.customerId
this.tableParams.clientType = params.clientType
this.diaVisible = true this.diaVisible = true
@ -139,7 +142,8 @@ export default {
const url = 'https://epmet-cloud.elinkservice.cn/api/third/code/reason' const url = 'https://epmet-cloud.elinkservice.cn/api/third/code/reason'
// const url = '/third/code/reason' // const url = '/third/code/reason'
const param = { const param = {
codeId: this.codeId customerId: this.customerId,
clientType: this.clientType
} }
window.app.ajax.post(url, param, window.app.ajax.post(url, param,
(data, rspMsg) => { (data, rspMsg) => {

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

@ -94,13 +94,29 @@
</main> </main>
</div> </div>
<c-dialog :showFooter='false' <c-dialog :showFooter='false'
:title="'客户列表'" :title="'选择客户'"
:isNest="false" :isNest="false"
:visible="diaVisible" :visible="diaVisible"
:dialogHeight="1.1" :dialogHeight="0.8"
:width="40" :width="30"
:top="'120px'"
@cancel="diaCancel"> @cancel="diaCancel">
<el-table v-loading="tableLoading" <div class="div_total">
<div v-for="(item,index) in tableData"
:key=index
class="div_row">
<!-- <i class="el-icon-user-solid i_icon"></i> -->
<span @click="selectCustomer(item)"
class="span_name">{{item.customerName}}</span>
<!-- <el-button class="btn_sel"
size="small"
type="primary"
plain
@click="selectCustomer(item)">选择</el-button> -->
</div>
</div>
<!-- <el-table v-loading="tableLoading"
:data="tableData" :data="tableData"
border border
style="width: 100%;"> style="width: 100%;">
@ -116,11 +132,11 @@
align="right"> align="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="small" <el-button size="small"
@click="selectCustomer(scope.row.customerId)">选择</el-button> @click="selectCustomer(scope.row)">选择</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table> -->
</c-dialog> </c-dialog>
</div> </div>
</template> </template>
@ -202,7 +218,7 @@ export default {
this.$message.error('账号不存在') this.$message.error('账号不存在')
this.endLoading() this.endLoading()
} else if (data.length === 1) { } else if (data.length === 1) {
this.selectCustomer(data[0].customerId) this.selectCustomer(data[0])
} else { } else {
this.endLoading() this.endLoading()
this.diaVisible = true this.diaVisible = true
@ -221,11 +237,13 @@ export default {
}) })
}, },
// //
selectCustomer (customerId) { selectCustomer (row) {
localStorage.setItem('customerId', row.customerId)
localStorage.setItem('customerName', row.customerName)
this.startLoading() this.startLoading()
// const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/auth/govweb/login' // const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/auth/govweb/login'
const url = '/auth/govweb/login' const url = '/auth/govweb/login'
this.dataForm.customerId = customerId this.dataForm.customerId = row.customerId
this.$http.post(url, this.dataForm).then(({ data: res }) => { this.$http.post(url, this.dataForm).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
@ -274,4 +292,35 @@ export default {
.p_tip { .p_tip {
color: rgb(255, 80, 80); color: rgb(255, 80, 80);
} }
.div_total {
height: 80%;
width: 100%;
text-align: center;
}
.div_row {
height: 50px;
width: 50%;
text-align: center;
line-height: 50px;
margin: 10px 0 10px 150px;
/* width: 100px; */
/* background-color: rgb(241, 241, 241); */
}
.div_row:hover {
color: rgb(2, 119, 173);
font-weight: bold;
text-decoration: underline;
}
.i_icon {
width: 15px;
height: 15px;
margin-right: 10px;
float: left;
}
.span_name {
font-size: 20px;
cursor: pointer;
/* color: rgb(37, 156, 235); */
float: left;
}
</style> </style>

Loading…
Cancel
Save