Commit 352a1fb5 authored by levante's avatar levante

Initial commit

parent 02d5c89b
......@@ -18,18 +18,17 @@
</div>
<div>
<!-- <a-badge :count="0" showZero><a><a-icon type="bell" /></a></a-badge> -->
<a-dropdown class="navdropmenu" style="margin-right:20px;">
<!-- <a-dropdown class="navdropmenu" style="margin-right:20px;">
<span>
<a-icon type="user" />
<span class="name">{{username}}</span>
<a-icon type="down" />
</span>
<a-menu slot="overlay" @click="handleClick">
<!-- <a-menu-item key="1">个人中心</a-menu-item> -->
<a-menu-item key="changePwd" @click="showChangePwdModal">修改密码</a-menu-item>
<a-menu-item key="2">退出登录</a-menu-item>
</a-menu>
</a-dropdown>
</a-dropdown> -->
</div>
</a-layout-header>
<a-layout-content class="layout-content">
......@@ -157,8 +156,8 @@ export default {
},
},
created(){
this.getLogo()
this.getInfo()
// this.getLogo()
// this.getInfo()
},
methods: {
showChangePwdModal(){
......
......@@ -299,9 +299,9 @@ export default {
},
created(){
this.getLogo()
// this.getLogo()
this.getInfo()
// this.getInfo()
/** 持久化存储vuex 使其页面刷新后数据不丢失 */
//在页面加载时读取sessionStorage里的状态信息
......
......@@ -54,7 +54,7 @@ export default {
return {
openKeys: [],
selectedKeys: [],
// menus: [],
menus: [],
isAllPerm: false
}
},
......@@ -68,76 +68,37 @@ export default {
},
},
mounted(){
// this.$ajax.get({
// url: this.$api.GET_USER_INFO,
// }).then(res => {
// if(res.code == 200) {
// this.isAllPerm = res.data.content.isAllPerm
// console.log(this.isAllPerm)
// let menus=[]
// let tempmenu = []
// let isLoadExtendMenu = this.$cookie.get('customKeyEnable')
// for(let i=0;i<routes.length;i++){
// if(!!routes[i].children){
// for(let j=0;j<routes[i].children.length;j++){
// if(!!this.isAllPerm) { // 超管访问
// if(!!routes[i].children[j].meta.menuIcon && routes[i].children[j].name == 'systemManagement' && isLoadExtendMenu == 'false'){
// let target = routes[i].children[j].children
// if(target.length > 0) {
// for(let k = 0 ; k < target.length; k++) {
// if(target[k].name == 'tbls') {
// if(isLoadExtendMenu == 'true') {
// tempmenu.push(target[k])
// }
// } else {
// tempmenu.push(target[k])
// }
// }
// }
// let lusso = routes[i].children[j]
// lusso.children = []
// lusso.children = tempmenu
// menus.push(lusso)
// } else if (!!routes[i].children[j].meta.menuIcon) {
// menus.push(routes[i].children[j])
// }
let menus = []
let tempmenu = []
for(let i=0;i<routes.length;i++){
if(!!routes[i].children){
for(let j=0;j<routes[i].children.length;j++){
if(!!routes[i].children[j].meta.menuIcon && routes[i].children[j].name == 'systemManagement' && isLoadExtendMenu == 'false'){
let target = routes[i].children[j].children
if(target.length > 0) {
for(let k = 0 ; k < target.length; k++) {
tempmenu.push(target[k])
}
}
let lusso = routes[i].children[j]
lusso.children = []
lusso.children = tempmenu
menus.push(lusso)
} else if (!!routes[i].children[j].meta.menuIcon) {
menus.push(routes[i].children[j])
}
// } else if(!this.isAllPerm) { // 非超管访问
// if(routes[i].children[j].meta.isAllPerm == false) {
// if(!!routes[i].children[j].meta.menuIcon && routes[i].children[j].name == 'systemManagement' && isLoadExtendMenu == 'false'){
// let target = routes[i].children[j].children
// if(target.length > 0) {
// for(let k = 0 ; k < target.length; k++) {
// if(target[k].name == 'tbls') {
// if(isLoadExtendMenu == 'true') {
// tempmenu.push(target[k])
// }
// } else {
// tempmenu.push(target[k])
// }
// }
// }
// let lusso = routes[i].children[j]
// lusso.children = []
// lusso.children = tempmenu
// menus.push(lusso)
// } else if (!!routes[i].children[j].meta.menuIcon) {
// menus.push(routes[i].children[j])
// }
// }
// }
// }
// }
// }
// this.menus=menus
// }
// })
}
}
}
this.menus = menus
},
computed: {
menus(){
// console.log(this.$store.state.menuList)
return this.$store.state.menuList
}
// menus(){
// // console.log(this.$store.state.menuList)
// return this.$store.state.menuList
// }
},
methods: {
// 点击菜单,收起其他展开的菜单
......
......@@ -87,19 +87,19 @@ function GetRoutes(router) {
const { routes } = router.options
const parent = routes.find(item => item.name === 'Layout')
for (let key in micSystemRoutersConfigs) {
for (let i = 0; i < micSystemRoutersConfigs[key].length; i++) {
let firstRouter = Object.assign({}, micSystemRoutersConfigs[key][i])
if (
!!firstRouter.meta.openMode &&
firstRouter.meta.openMode == 'outsite'
) {
firstRouter.component = TipsOutsite
}
parent.children.push(Object.assign({}, firstRouter))
router.addRoutes([ parent ])
}
}
// for (let key in micSystemRoutersConfigs) {
// for (let i = 0; i < micSystemRoutersConfigs[key].length; i++) {
// let firstRouter = Object.assign({}, micSystemRoutersConfigs[key][i])
// if (
// !!firstRouter.meta.openMode &&
// firstRouter.meta.openMode == 'outsite'
// ) {
// firstRouter.component = TipsOutsite
// }
// parent.children.push(Object.assign({}, firstRouter))
// router.addRoutes([ parent ])
// }
// }
}
......
......@@ -12,17 +12,17 @@ const router = new Router({
routes,
})
router.beforeEach((to, from, next) => {
// TODO
store.commit('setWebviewSrc', to.meta && to.meta.src) // 判断有src的话为需要嵌入iframe的子项目
// router.beforeEach((to, from, next) => {
// // TODO
// store.commit('setWebviewSrc', to.meta && to.meta.src) // 判断有src的话为需要嵌入iframe的子项目
const token = Cookie.get('token')
// 当前无token且不在login页面则推到登录页面
if (to.path != '/login' && !token) {
next('/login')
} else {
next()
}
})
// const token = Cookie.get('token')
// // 当前无token且不在login页面则推到登录页面
// if (to.path != '/login' && !token) {
// next('/login')
// } else {
// next()
// }
// })
export default router
This diff is collapsed.
......@@ -103,6 +103,7 @@ const errorHandler = (err) => {
Axios.interceptors.request.use(config => {
const token = Cookie.get('token') || Store.state.token
console.log(token)
if (token) {
config.headers.Authorization = token
}
......
let BASE_URL = '', MOCK_URL='',
let BASE_URL = '', MOCK_URL='', WBX_URL = '',
FANGDI_URL = 'http://962121.fgj.sh.gov.cn/wyweb/shanghaiwuye'
switch (process.env.NODE_ENV) {
......@@ -38,6 +38,7 @@ default: // 默认环境下(开发环境)
// BASE_URL = 'http://31.0.161.39/apiv2'
// BASE_URL = 'http://211.136.105.193/apiv2'
// BASE_URL = 'http://yangpu-hm.omniview.pro/api/v2'
WBX_URL = 'http://wbx.omniview.pro'
BASE_URL = 'http://yangpu-hm.omniview.pro/api/v2'
// BASE_URL = 'http://pudong.hm.omniview.pro/api/v2'
// BASE_URL = 'http://xuhui.hm.omniview.pro/api/v2'
......@@ -228,5 +229,6 @@ export default {
POST_LABEL_RESULT_PREVIEW: '/service-customkey-ddd/findLabelObject', // 标签预览
POST_LABEL_CREATE_CONFIRM: '/service-customkey-ddd/label/confirm',
GET_ID_INFO_BY_LABEL: '/service-customkey-ddd/label/resource/datas',
GET_WY_AND_YWH_LIST: '/service-customkey-ddd/datas'
GET_WY_AND_YWH_LIST: '/service-customkey-ddd/datas',
GET_RESERVATION_LIST: WBX_URL + '/api/service-documents/repair/reservations'
}
......@@ -714,27 +714,27 @@ export default {
mounted(){
this.getConfig()
this.getList()
this.$ajax.get({
url: this.$api.GET_USER_INFO,
}).then(res => {
if(res.code == 200) {
if(!!res.data.content.isAllPerm) {
this.getDisposal()
this.getHouthMonth()
this.getCheckData()
this.getCheckPeople()
this.getSectNum()
this.getReceiptsNum()
this.getRepair()
this.getTousuQuestion('M')
this.getTousuQuestion('Y')
this.getTousuQuestion('S')
this.getTousuDensity('M')
this.getTousuDensity('Y')
this.getTousuDensity('S')
}
}
})
// this.$ajax.get({
// url: this.$api.GET_USER_INFO,
// }).then(res => {
// if(res.code == 200) {
// if(!!res.data.content.isAllPerm) {
// this.getDisposal()
// this.getHouthMonth()
// this.getCheckData()
// this.getCheckPeople()
// this.getSectNum()
// this.getReceiptsNum()
// this.getRepair()
// this.getTousuQuestion('M')
// this.getTousuQuestion('Y')
// this.getTousuQuestion('S')
// this.getTousuDensity('M')
// this.getTousuDensity('Y')
// this.getTousuDensity('S')
// }
// }
// })
// })
// if (this.$store.state.userinfos && this.$store.state.userinfos.isAllPerm) { // 不是全部权限dashboard下方的模块不展示
// this.getDisposal()
......
......@@ -715,27 +715,27 @@ export default {
mounted(){
this.getConfig()
this.getList()
this.$ajax.get({
url: this.$api.GET_USER_INFO,
}).then(res => {
if(res.code == 200) {
if(!!res.data.content.isAllPerm) {
this.getDisposal()
this.getHouthMonth()
this.getCheckData()
this.getCheckPeople()
this.getSectNum()
this.getReceiptsNum()
this.getRepair()
this.getTousuQuestion('M')
this.getTousuQuestion('Y')
this.getTousuQuestion('S')
this.getTousuDensity('M')
this.getTousuDensity('Y')
this.getTousuDensity('S')
}
}
})
// this.$ajax.get({
// url: this.$api.GET_USER_INFO,
// }).then(res => {
// if(res.code == 200) {
// if(!!res.data.content.isAllPerm) {
// this.getDisposal()
// this.getHouthMonth()
// this.getCheckData()
// this.getCheckPeople()
// this.getSectNum()
// this.getReceiptsNum()
// this.getRepair()
// this.getTousuQuestion('M')
// this.getTousuQuestion('Y')
// this.getTousuQuestion('S')
// this.getTousuDensity('M')
// this.getTousuDensity('Y')
// this.getTousuDensity('S')
// }
// }
// })
// })
// if (this.$store.state.userinfos && this.$store.state.userinfos.isAllPerm) { // 不是全部权限dashboard下方的模块不展示
// this.getDisposal()
......
......@@ -81,7 +81,7 @@ export default {
},
created(){
this.getLogo()
this.getInfo()
// this.getInfo()
},
methods: {
getInfo() {
......
<template>
<div class="routerWapper">
<div class="portalDetailTitle" v-if="$route.name=='receiptList'">
<span class="title">预约列表</span>
</div>
<div v-if="$route.name=='receiptList'" class="layoutMargin layoutPadding">
<div class="portalTableOperates">
<a-table bordered class="portalTable" :dataSource="receiptList" :columns="columns" size="small" :pagination="pagination" rowKey="id">
<span slot="homeDate" slot-scope="text,record" align="center">
{{!!record.homeDate? record.homeDate.split(' ')[0]: ''}}
</span>
</a-table>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
receiptList: [],
pagination: {//分页
pageNo: 1,
pageSize: 10,
total: 10,
current: 1,
defaultCurrent: 1,
showQuickJumper: true,
onChange: this.pageChange
},
columns: [
{
title: '小区名称',
dataIndex: 'stNameFrst',
align: 'center',
key: 'stNameFrst',
},
{
title: '门牌详细地址',
dataIndex: 'addrFrst',
align: 'center',
key: 'addrFrst',
},
{
title: '报修部位',
dataIndex: 'place',
align: 'center',
key: 'place',
},
{
title: '报修类型',
dataIndex: 'type',
align: 'center',
key: 'type',
},
{
title: '描述',
dataIndex: 'dscr',
align: 'center',
key: 'dscr',
},
{
title: '上门日期',
dataIndex: 'homeDate',
align: 'center',
key: 'homeDate',
scopedSlots: {
customRender: 'homeDate',
},
},
{
title: '上门时间',
dataIndex: 'homeTime',
align: 'center',
key: 'homeTime',
},
]
}
},
mounted() {
this.getList()
},
methods: {
getList() {
this.$ajax.get({
url: this.$api.GET_RESERVATION_LIST,
params: {
pageNo: this.pagination.current,
pageSize: this.pagination.pageSize,
homeDate_desc: 'desc'
}
}).then(res => {
if (res.code == 200) {
//先获取全部的自定义字段列表
this.receiptList = this.$com.confirm(res, 'data.content', [])
this.pagination.total=res.data.totalRows
// console.log(this.extList)
}
})
},
pageChange(val) {
this.pagination.pageNo = val
this.pagination.current = val
this.getList()
},
}
}
</script>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment