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

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

@ -1,13 +1,14 @@
<template>
<aside :class="['aui-sidebar', `aui-sidebar--${$store.state.sidebarLayoutSkin}`]">
<div class="aui-sidebar__inner">
<el-menu
:default-active="$store.state.sidebarMenuActiveName"
:collapse="$store.state.sidebarFold"
:unique-opened="true"
:collapseTransition="false"
class="aui-sidebar__menu">
<sub-menu v-for="menu in $store.state.sidebarMenuList" :key="menu.id" :menu="menu" />
<el-menu :default-active="$store.state.sidebarMenuActiveName"
:collapse="false"
:unique-opened="true"
:collapseTransition="false"
class="aui-sidebar__menu">
<sub-menu v-for="menu in $store.state.sidebarMenuList"
:key="menu.id"
:menu="menu" />
</el-menu>
</div>
</aside>
@ -25,6 +26,7 @@ export default {
},
created () {
this.$store.state.sidebarMenuList = window.SITE_CONFIG['menuList']
console.log(this.$store.state.sidebarMenuList)
}
}
</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.realName = res.data.realName
this.$store.state.user.superAdmin = res.data.superAdmin
this.$store.state.user.customerId = ''
this.$store.state.user.gender = data.gender
localStorage.setItem('customerId', '')
}).catch(() => { })
},
//
@ -122,8 +123,8 @@ export default {
this.$store.state.user.id = data.id
this.$store.state.user.realName = data.realName
this.$store.state.user.superAdmin = data.superAdmin
this.$store.state.user.customerId = data.customerId
console.log(this.$store.state.user)
this.$store.state.user.gender = data.gender
},
(rspMsg, data) => {

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

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

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

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

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

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

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

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

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

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

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

@ -94,13 +94,29 @@
</main>
</div>
<c-dialog :showFooter='false'
:title="'客户列表'"
:title="'选择客户'"
:isNest="false"
:visible="diaVisible"
:dialogHeight="1.1"
:width="40"
:dialogHeight="0.8"
:width="30"
:top="'120px'"
@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"
border
style="width: 100%;">
@ -116,11 +132,11 @@
align="right">
<template slot-scope="scope">
<el-button size="small"
@click="selectCustomer(scope.row.customerId)">选择</el-button>
@click="selectCustomer(scope.row)">选择</el-button>
</template>
</el-table-column>
</el-table>
</el-table> -->
</c-dialog>
</div>
</template>
@ -202,7 +218,7 @@ export default {
this.$message.error('账号不存在')
this.endLoading()
} else if (data.length === 1) {
this.selectCustomer(data[0].customerId)
this.selectCustomer(data[0])
} else {
this.endLoading()
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()
// const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/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 }) => {
if (res.code !== 0) {
@ -274,4 +292,35 @@ export default {
.p_tip {
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>

Loading…
Cancel
Save