Commit ee1c181a authored by zhangrui123's avatar zhangrui123

123

parents 2b397df8 a04a98be
...@@ -15,10 +15,8 @@ console.log(process.env.NODE_ENV) ...@@ -15,10 +15,8 @@ console.log(process.env.NODE_ENV)
let env let env
if (process.env.NODE_ENV === 'sit') { if (process.env.NODE_ENV === 'sit') {
env = require('../config/sit.env') env = require('../config/sit.env')
} else if (process.env.NODE_ENV === 'uat') { } else if (process.env.NODE_ENV === 'production') {
env = require('../config/uat.env') env = require('../config/prod.env')
} else if (process.env.NODE_ENV === 'devol') {
env = require('../config/devOnline.env')
} else if (process.env.NODE_ENV === 'pudong-sit') { } else if (process.env.NODE_ENV === 'pudong-sit') {
env = require('../config/pudong/sit.env') env = require('../config/pudong/sit.env')
} else if (process.env.NODE_ENV === 'pudong-prod') { } else if (process.env.NODE_ENV === 'pudong-prod') {
......
'use strict'
module.exports = {
NODE_ENV: '"devol"'
}
...@@ -28,7 +28,7 @@ module.exports = { ...@@ -28,7 +28,7 @@ module.exports = {
}, },
// Various Dev Server settings // Various Dev Server settings
host: '0.0.0.0', // can be overwritten by process.env.HOST host: 'localhost', // can be overwritten by process.env.HOST
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false, autoOpenBrowser: false,
errorOverlay: true, errorOverlay: true,
......
...@@ -9,7 +9,8 @@ ...@@ -9,7 +9,8 @@
"start": "npm run dev", "start": "npm run dev",
"lint": "eslint --fix --ext .js,.vue src", "lint": "eslint --fix --ext .js,.vue src",
"build": "cross-env NODE_ENV='production' node build/build.js", "build": "cross-env NODE_ENV='production' node build/build.js",
"build:devol": "cross-env NODE_ENV='devol' node build/build.js", "build:sit": "cross-env NODE_ENV='sit' node build/build.js",
"build:prod": "cross-env NODE_ENV='production' node build/build.js",
"build:pudong-sit": "cross-env NODE_ENV='pudong-sit' node build/build.js", "build:pudong-sit": "cross-env NODE_ENV='pudong-sit' node build/build.js",
"build:pudong-prod": "cross-env NODE_ENV='pudong-prod' node build/build.js", "build:pudong-prod": "cross-env NODE_ENV='pudong-prod' node build/build.js",
"build:xuhui-sit": "cross-env NODE_ENV='xuhui-sit' node build/build.js", "build:xuhui-sit": "cross-env NODE_ENV='xuhui-sit' node build/build.js",
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<!-- 传统子项目在iframe中渲染 --> <!-- 传统子项目在iframe中渲染 -->
<iframe v-if="webviewSrc" :src="webviewSrc" frameborder="0" style="width:100%;height:96%;overflow:hidden;" /> <iframe v-if="webviewSrc" :src="webviewSrc" frameborder="0" style="width:100%;height:96%;overflow:hidden;" />
<!-- 本项目的子页面在此渲染 --> <!-- 本项目的子页面在此渲染 -->
<router-view v-else /> <router-view v-else :key="$route.path" />
</template> </template>
<ChangePassword @on-close='closeChangePwdModal' :resetPwdShow='isShowChangePwd'></ChangePassword> <ChangePassword @on-close='closeChangePwdModal' :resetPwdShow='isShowChangePwd'></ChangePassword>
......
...@@ -76,7 +76,7 @@ import MutSelect from '@/views/components/mutSelect' // 多选框(控制表格 ...@@ -76,7 +76,7 @@ import MutSelect from '@/views/components/mutSelect' // 多选框(控制表格
import tableAndMut from '@/views/components/tableAndMut' // 多选框(控制表格展示列) import tableAndMut from '@/views/components/tableAndMut' // 多选框(控制表格展示列)
import BatchOperation from '@/views/components/BatchOperation' // 多选框(控制表格展示列) import BatchOperation from '@/views/components/BatchOperation' // 多选框(控制表格展示列)
import micSystemsList from '@/router/micSystemsList.json' import micSystemsList from '@/router/micSystemsList.js'
// 由于日期组件默认是英文的,需要本地化 // 由于日期组件默认是英文的,需要本地化
import moment from 'moment' import moment from 'moment'
...@@ -192,49 +192,9 @@ const render = ({appContent, loading} = {}) => { // 渲染方法 ...@@ -192,49 +192,9 @@ const render = ({appContent, loading} = {}) => { // 渲染方法
} }
// 动态加载子项目的url // 动态加载子项目的url
let system //= micSystemsList let system
let env = process.env.NODE_ENV system = micSystemsList
console.log(system, '注册的子项目列表')
// console.log(process.env.NODE_ENV, 'NODE_ENV')
switch (env) {
// case env.indexOf('pudong') > -1: // 根据当前打包的项目调用该项目对应的路由
case 'pudong-sit':
system = micSystemsList.sit
break
case 'pudong-prod':
system = micSystemsList.prod
break
// case env.indexOf('xuhui') > -1:
case 'xuhui-sit':
system = micSystemsList.sit
break
case 'xuhui-prod':
system = micSystemsList.prod
break
case 'huangpu-sit':
system = micSystemsList.sit
break
case 'huangpu-prod':
system = micSystemsList.prod
break
case 'yangpu-sit':
system = micSystemsList.sit
break
case 'yangpu-prod':
system = micSystemsList.prod
break
default: // 当前仅可使用pudong / xuhui-sit/uat进行打包
system = micSystemsList.sit
break
}
let projects = [] let projects = []
for (let i = 0; i < system.length; i++) { for (let i = 0; i < system.length; i++) {
......
{
"Layout": [
]
}
\ No newline at end of file
This diff is collapsed.
...@@ -6,80 +6,82 @@ import yangpu from '@/router/yangpuRoutes.json' ...@@ -6,80 +6,82 @@ import yangpu from '@/router/yangpuRoutes.json'
import ajax from '@/server/ajax' import ajax from '@/server/ajax'
import api from '@/server/api' import api from '@/server/api'
import documents from '@/router/documentsRoutes.json' import documents from '@/router/documentsRoutes.json'
import defaultRoutes from '@/router/defaultRoutes.json'
// import removeRoutes from '@/router/getRoutesChoose.js'
import routeByFilter from '@/router/routeByFilter.json'
import Store from '@/store/index' import Store from '@/store/index'
async function GetRoutes(router) { /**
*
* @param { defaultRoutes , documentsRoutes} 私有菜单(子项目) , 公共菜单(子项目)
* 1. 当打包命令没有指定对应的区局,选用默认私有菜单文件 defaultRoutes(空的菜单) , 在下方会耦合 documentsRoutes(公共菜单) 内的全部菜单做展示
* 2. 打包命令包含区局的情况下, 选用对应区局的私有菜单文件, 并在getRoutesChoose文件中过滤需要展示的documentsRoutes内的菜单,在下方耦合
*
*/
console.log(routeByFilter)
function GetRoutes(router) {
let env = process.env.NODE_ENV let env = process.env.NODE_ENV
// console.log(env) // console.log(env)
let MicRouters let MicRouters
switch (env) { switch (env) {
// case env.indexOf('pudong') > -1: // 根据当前打包的项目调用该项目对应的路由
case 'pudong-sit': case 'pudong-sit':
pudong.Layout = pudong.Layout.concat('pudong' in routeByFilter ? routeByFilter.pudong : documents.Layout )
MicRouters = pudong MicRouters = pudong
break break
case 'pudong-prod': case 'pudong-prod':
pudong.Layout = pudong.Layout.concat('pudong' in routeByFilter ? routeByFilter.pudong : documents.Layout )
MicRouters = pudong MicRouters = pudong
break break
// case env.indexOf('xuhui') > -1:
case 'xuhui-sit': case 'xuhui-sit':
xuhui.Layout = xuhui.Layout.concat('xuhui' in routeByFilter ? routeByFilter.xuhui : documents.Layout )
MicRouters = xuhui MicRouters = xuhui
break break
case 'xuhui-prod': case 'xuhui-prod':
xuhui.Layout = xuhui.Layout.concat('xuhui' in routeByFilter ? routeByFilter.xuhui : documents.Layout )
MicRouters = xuhui MicRouters = xuhui
break break
case 'huangpu-sit': case 'huangpu-sit':
huangpu.Layout = huangpu.Layout.concat('huangpu' in routeByFilter ? routeByFilter.huangpu : documents.Layout )
MicRouters = huangpu MicRouters = huangpu
break break
case 'huangpu-prod': case 'huangpu-prod':
huangpu.Layout = huangpu.Layout.concat('huangpu' in routeByFilter ? routeByFilter.huangpu : documents.Layout )
MicRouters = huangpu MicRouters = huangpu
break break
case 'yangpu-sit': case 'yangpu-sit':
yangpu.Layout = yangpu.Layout.concat('yangpu' in routeByFilter ? routeByFilter.yangpu : documents.Layout )
MicRouters = yangpu MicRouters = yangpu
break break
case 'yangpu-prod': case 'yangpu-prod':
yangpu.Layout = yangpu.Layout.concat('yangpu' in routeByFilter ? routeByFilter.yangpu : documents.Layout )
MicRouters = yangpu MicRouters = yangpu
break break
case 'development': // 本地开发展示对应的子项目路由 -- 本地调试子项目展示的对应菜单在此切换
default: // 当前仅可使用pudong / xuhui-sit/uat进行打包 xuhui.Layout = xuhui.Layout.concat('xuhui' in routeByFilter ? routeByFilter.xuhui : documents.Layout )
MicRouters = xuhui MicRouters = xuhui
break break
default: // 当命令没有指定的情况下会选用空的私有菜单
MicRouters = documents
break
} }
await function() { // await function() {
ajax.get({ // ajax.get({
url: api.GET_USER_INFO, // url: api.GET_USER_INFO,
}).then(res => { // }).then(res => {
// 本地存储用户基本信息 // // 本地存储用户基本信息
if (env.indexOf('xuhui') != -1 && res.data.content.isAllPerm) { // if (env.indexOf('xuhui') != -1 && res.data.content.isAllPerm) {
let newArr= [] // let newArr= []
MicRouters.Layout.forEach((item) => { // MicRouters.Layout.forEach((item) => {
if (item.name != 'tousu' && item.name != 'Disposal' ) { // if (item.name != 'tousu' && item.name != 'Disposal' ) {
newArr.push(item) // newArr.push(item)
} // }
}) // })
MicRouters.Layout = newArr // MicRouters.Layout = newArr
}
})
}()
// 徐汇区的子项目要看当前用户是否是超管,否则不展示 处置单和投诉
// console.log(Store.state.userInfos)
// if (env.indexOf('xuhui') != -1 ) {
// let newArr= []
// MicRouters.Layout.forEach((item) => {
// if (item.name != 'tousu' && item.name != 'Disposal' ) {
// newArr.push(item)
// } // }
// }) // })
// MicRouters.Layout = newArr // }()
// }
const micSystemRoutersConfigs = Object.assign({}, MicRouters) const micSystemRoutersConfigs = Object.assign({}, MicRouters)
const { routes } = router.options const { routes } = router.options
...@@ -99,22 +101,6 @@ async function GetRoutes(router) { ...@@ -99,22 +101,6 @@ async function GetRoutes(router) {
} }
} }
for(let key in documents) {
for (let i = 0; i < documents[key].length; i++) {
let firstRouter = Object.assign({}, documents[key][i])
if (
!!firstRouter.meta.openMode &&
firstRouter.meta.openMode == 'outsite'
) {
firstRouter.component = TipsOutsite
}
parent.children.push(Object.assign({}, firstRouter))
router.addRoutes([ parent ])
}
}
// console.log(router)
} }
export default GetRoutes export default GetRoutes
{ {
"Layout": [ "Layout": [
{
"path": "/hp_order/month", "name": "month",
"meta": { "title": "检查单","menuIcon": "profile", "menuPath":false, "hideInBread":false },
"children":[
{
"path": "/hp_order/month/monthList", "name": "month",
"meta": { "title": "房办月查列表","menuIcon": "profile", "menuPath":false, "hideInBread":false },
"children": [
{
"path": "/hp_order/month/monthInfo", "name": "monthInfo",
"meta": { "title": "检查详情", "menuPath":false, "hideInBread":false }
}
]
}
]
},
{
"path": "/hp_question/repair", "name": "repairList",
"meta": { "title": "应急报修","menuIcon": "profile", "menuPath":false, "hideInBread":false },
"children":[
{
"path": "/hp_question/repair/repairList", "name": "repairList",
"meta": { "title": "应急报修列表","menuIcon": "profile", "menuPath":false, "hideInBread":false },
"children": [
{
"path": "/hp_question/repair/repairInfo", "name": "repairInfo",
"meta": { "title": "报修详情", "menuPath":false, "hideInBread":false }
}
]
}
]
},
{
"path": "/hp_question/tousu", "name": "tousu",
"meta": { "title": "投诉信息", "menuPath": true, "menuIcon": "profile", "hideInBread": true },
"children": [
{
"path": "/hp_question/tousu/tousuQuestion", "name": "tousuQuestion",
"meta": { "title": "投诉问题排行", "menuPath":true, "hideInBread":false},
"children":[
{
"path": "/hp_question/tousu/tousuQuestion/questionInfo", "name": "questionInfo",
"meta": { "title": "投诉问题列表", "menuPath":false, "hideInBread":false }
},
{
"path": "/hp_question/tousu/tousuQuestion/tousuDetails", "name": "tousuDetails",
"meta": { "title": "投诉问题详情", "menuPath":false, "hideInBread":false }
}
]
},
{
"path": "/hp_question/tousu/tousuDensity", "name": "tousuDensity",
"meta": { "title": "投诉密度排行", "menuPath":true, "hideInBread":false}
}
]
}
] ]
} }
\ No newline at end of file
...@@ -14,7 +14,6 @@ const router = new Router({ ...@@ -14,7 +14,6 @@ const router = new Router({
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
// TODO // TODO
// console.log(to.path)
store.commit('setWebviewSrc', to.meta && to.meta.src) // 判断有src的话为需要嵌入iframe的子项目 store.commit('setWebviewSrc', to.meta && to.meta.src) // 判断有src的话为需要嵌入iframe的子项目
const token = Cookie.get('token') const token = Cookie.get('token')
...@@ -26,4 +25,4 @@ router.beforeEach((to, from, next) => { ...@@ -26,4 +25,4 @@ router.beforeEach((to, from, next) => {
} }
}) })
export default router export default router
\ No newline at end of file
import micSystemsList from '@/router/micSystemsList.json'
function GetSystemList() {
let system = [] //子项目列表
let prodSystemList=micSystemsList.prod // 生产环境的子项目
let districtName //区局名称
let env = process.env.NODE_ENV //打包命令
let url = window.location.origin //当前访问的浏览器地址
// 1. 当打生产包的时候,
if ( env.indexOf('-prod')!= -1 ) {
// 2. 获取区局名称
districtName = env.split('-')[0]
// 3. 在生产环境的子项目list
prodSystemList.forEach((item, index) => {
if (item.districtName == districtName || item.districtName == 'common') {
prodSystemList[index].entry = url + item.entry
system.push(item)
}
})
return system
}else {
system = micSystemsList.sit
}
return system
}
export default GetSystemList()
{ {
"prod":[ { "prod":[ {
"districtName": "pudong",
"name": "pudong", "name": "pudong",
"entry": "http://10.220.105.137:81/elvweb", "entry": "http://10.220.105.137:81/elvweb",
"activeRule": "/pudong" "activeRule": "/pudong"
}, },
{ {
"districtName": "pudong",
"name": "danger", "name": "danger",
"entry": "http://10.220.105.137:81/dangerweb", "entry": "http://10.220.105.137:81/dangerweb",
"activeRule": "/danger" "activeRule": "/danger"
}, },
{ {
"districtName": "xuhui",
"name": "order", "name": "order",
"entry": "http://31.0.161.39/order", "entry": "http://31.0.161.39/order",
"activeRule": "/order" "activeRule": "/order"
}, },
{ {
"districtName": "common",
"name": "documents", "name": "documents",
"entry": "http://10.216.118.142/documents", "entry": "http://10.216.118.142/documents",
"activeRule": "/documents" "activeRule": "/documents"
} }
], ],
"sit":[ "sit":[
{ {
"districtName": "pudong",
"name": "pudong", "name": "pudong",
"entry": "http://pudong.hm.omniview.pro/elvweb", "entry": "http://pudong.hm.omniview.pro/elvweb",
"activeRule": "/pudong" "activeRule": "/pudong"
}, },
{ {
"districtName": "pudong",
"name": "danger", "name": "danger",
"entry": "http://pudong.hm.omniview.pro/dangerweb", "entry": "http://pudong.hm.omniview.pro/dangerweb",
"activeRule": "/danger" "activeRule": "/danger"
}, },
{ {
"districtName": "xuhui",
"name": "order", "name": "order",
"entry": "http://xuhui.hm.omniview.pro/order", "entry": "http://xuhui.hm.omniview.pro/order",
"activeRule": "/order" "activeRule": "/order"
}, },
{ {
"districtName": "common",
"name": "documents", "name": "documents",
"entry": "http://yangpu-hm.omniview.pro/documents", "entry": "http://yangpu-hm.omniview.pro/documents",
"activeRule": "/documents" "activeRule": "/documents"
} }
] ]
} }
\ No newline at end of file
...@@ -111,6 +111,16 @@ ...@@ -111,6 +111,16 @@
"meta": { "title": "修改手机号", "menuPath": false, "menuIcon": "profile", "hideInBread": false } "meta": { "title": "修改手机号", "menuPath": false, "menuIcon": "profile", "hideInBread": false }
} }
] ]
},
{
"path": "/danger/propertyScore/dealManSpecList", "name": "dealManSpecList",
"meta": { "title": "处置人员配置", "menuPath": true, "menuIcon": "profile", "hideInBread": false},
"children": [
{
"path": "/danger/propertyScore/dealManSpecList/dealManSpecModify", "name": "dealManSpecModify",
"meta": { "title": "修改处置人员配置", "menuPath": false, "menuIcon": "profile", "hideInBread": false }
}
]
} }
] ]
} }
......
This diff is collapsed.
...@@ -175,12 +175,20 @@ const appRoutes = [ ...@@ -175,12 +175,20 @@ const appRoutes = [
}, },
] ]
}, },
{ // 标签管理
path: '/systemManagement/lvot', name: 'lvot', component: resolve => require(['@/views/label/labelList'], resolve), //Tbls,
meta: { title: '标签管理', menuPath: true, menuIcon: 'setting', hideInBread: false, },
},
] ]
}, },
{ {
path: '/house', name: 'house', component: resolve => require(['@/components/Layout/content-wrapper'], resolve), // ContentWrapper, path: '/house', name: 'house', component: resolve => require(['@/components/Layout/content-wrapper'], resolve), // ContentWrapper,
meta: { title: '住宅信息', menuPath: true, menuIcon: 'home', hideInBread: true, requirePerm: false, authCode: '0001' }, meta: { title: '住宅信息', menuPath: true, menuIcon: 'profile', hideInBread: true, requirePerm: false },
children: [ children: [
{
path: '/houseData/basicInfoByLabel', name: 'basicInfoByLabel', component: resolve => require(['@/views/houseData/basicInfoByLabel'], resolve), //basicInfo,
meta: { title: '小区列表-标签', menuPath: true, hideInBread: false, },
},
{ // 小区列表 { // 小区列表
path: '/houseData/basicInfo', name: 'basicInfo', component: resolve => require(['@/views/houseData/basicInfo'], resolve), //basicInfo, path: '/houseData/basicInfo', name: 'basicInfo', component: resolve => require(['@/views/houseData/basicInfo'], resolve), //basicInfo,
meta: { title: '住宅小区', menuPath: true, hideInBread: false, authCode: '000101', menuIcon: 'home'}, meta: { title: '住宅小区', menuPath: true, hideInBread: false, authCode: '000101', menuIcon: 'home'},
......
let BASE_URL = '', MOCK_URL='', let BASE_URL = '', MOCK_URL='',
FANGDI_URL = 'http://962121.fgj.sh.gov.cn/wyweb/shanghaiwuye' FANGDI_URL = 'http://962121.fgj.sh.gov.cn/wyweb/shanghaiwuye'
/**
* todo
* 1、此处配置当前项目在不同环境下的API请求前缀
* 2、前端服务间、后端服务间需做跨域处理
*/
// console.log(window.location)
console.log(window.location)
switch (process.env.NODE_ENV) {
case 'devol': // 本地线上部署环境下
BASE_URL = 'http://xuhui.hm.omniview.pro/api/v2'
break
switch (process.env.NODE_ENV) {
case 'pudong-sit': case 'pudong-sit':
BASE_URL = 'http://pudong.hm.omniview.pro/api/v2', BASE_URL = '/api/v2'
FANGDI_URL = 'http://962121.fgj.sh.gov.cn/wyweb/shanghaiwuye'
break break
case 'pudong-prod': case 'pudong-prod':
// BASE_URL = 'http://211.136.105.193/apiv2', BASE_URL = '/api'
BASE_URL = 'http://10.220.105.137:81/api'
FANGDI_URL = 'http://962121.fgj.sh.gov.cn/wyweb/shanghaiwuye'
break break
case 'xuhui-sit': case 'xuhui-sit':
BASE_URL = 'http://xuhui.hm.omniview.pro/api/v2', BASE_URL = '/api/v2'
FANGDI_URL = 'http://962121.fgj.sh.gov.cn/wyweb/shanghaiwuye'
break break
case 'xuhui-prod': case 'xuhui-prod':
BASE_URL = 'http://31.0.161.39/apiv2', BASE_URL = '/apiv2'
FANGDI_URL = 'http://962121.fgj.sh.gov.cn/wyweb/shanghaiwuye'
break break
case 'yangpu-sit': case 'yangpu-sit':
BASE_URL = 'http://yangpu-hm.omniview.pro/api/v2', BASE_URL = '/api/v2'
FANGDI_URL = 'http://962121.fgj.sh.gov.cn/wyweb/shanghaiwuye'
break break
case 'yangpu-prod': case 'yangpu-prod':
BASE_URL = 'http://10.216.118.142/api', BASE_URL = '/api'
FANGDI_URL = 'http://962121.fgj.sh.gov.cn/wyweb/shanghaiwuye'
break break
case 'huangpu-sit': case 'huangpu-sit':
BASE_URL = 'http://huangpu.hm.omniview.pro/api/v2', BASE_URL = '/api/v2'
FANGDI_URL = 'http://962121.fgj.sh.gov.cn/wyweb/shanghaiwuye'
break break
case 'huangpu-prod': case 'huangpu-prod':
BASE_URL = 'http://172.82.26.1/api', BASE_URL = '/api'
FANGDI_URL = 'http://962121.fgj.sh.gov.cn/wyweb/shanghaiwuye'
break break
default: // 默认环境下(开发环境) default: // 默认环境下(开发环境)
// BASE_URL = 'http://31.0.161.39/apiv2' // BASE_URL = 'http://31.0.161.39/apiv2'
// BASE_URL = 'http://211.136.105.193/apiv2' // BASE_URL = 'http://211.136.105.193/apiv2'
// BASE_URL = 'http://yangpu-hm.omniview.pro/api/v2' // BASE_URL = 'http://yangpu-hm.omniview.pro/api/v2'
BASE_URL = 'http://yangpu-hm.omniview.pro/api/v2' BASE_URL = 'http://yangpu-hm.omniview.pro/api/v2'
// BASE_URL = 'http://pudong.hm.omniview.pro/api/v2' // BASE_URL = 'http://pudong.hm.omniview.pro/api/v2'
// BASE_URL = 'http://xuhui.hm.omniview.pro/api/v2'
BASE_URL = 'http://yangpu-hm.omniview.pro/api/v2'
// BASE_URL = 'http://211.136.105.193/apiv2' // BASE_URL = 'http://211.136.105.193/apiv2'
MOCK_URL = 'https://yapi.omniview.pro/mock/283'
break break
} }
/** /**
...@@ -205,8 +178,6 @@ export default { ...@@ -205,8 +178,6 @@ export default {
get_specialInspection: '/service-documents-ddd/statistical/specialInspection', //行业督查数字 get_specialInspection: '/service-documents-ddd/statistical/specialInspection', //行业督查数字
get_month_check: 'service-documents-ddd/dashboard/house/month', get_month_check: 'service-documents-ddd/dashboard/house/month',
GET_LABEL_LIST: MOCK_URL + '/service-customkey-ddd/labels', // 获取标签列表
GET_FB_WY_MANAGE_CHECK: '/service-documents-ddd/checkOrder/dahboard/countDatas', //首页-房办月查-物业双周查-经理自查 GET_FB_WY_MANAGE_CHECK: '/service-documents-ddd/checkOrder/dahboard/countDatas', //首页-房办月查-物业双周查-经理自查
//角色管理 //角色管理
...@@ -243,4 +214,19 @@ export default { ...@@ -243,4 +214,19 @@ export default {
GET_RIZHI_INFO: '/service-log/operateRecord/{id}', //日志详情 GET_RIZHI_INFO: '/service-log/operateRecord/{id}', //日志详情
GET_XIAOQUTOTAL: '/service-basicdatasync-ddd/summary/community/totare', //查询小区住宅面积,总楼栋数,总户数信息 GET_XIAOQUTOTAL: '/service-basicdatasync-ddd/summary/community/totare', //查询小区住宅面积,总楼栋数,总户数信息
GET_LABEL_LIST: '/service-customkey-ddd/label/tree', // 获取标签列表
GET_LABEL_DETAIL: '/service-customkey-ddd/label/{id}', // 查看标签详情
DELETE_SINGLE_LABEL: '/service-customkey-ddd/label/{id}', // 根据id删除某个标签
POST_SINGLE_LABEL: '/service-customkey-ddd/label', // 新增标签
PUT_LABEL_INFO: '/service-customkey-ddd/label/{id}', // 修改标签信息
POST_AVAILABLE_KEY: '/service-customkey-ddd/entityKeyDic', // 可查询字段新增
PUT_AVAILABLE_KEY: '/service-customkey-ddd/entityKeyDic/{id}', // 可查询字段修改
GET_AVAILABLE_KEY_LIST: '/service-customkey-ddd/entityKeyDics', // 可查询字段列表
DELETE_AVAILABLE_KEY: '/service-customkey-ddd/entityKeyDic/{id}', // 删除字段
GET_SINGLE_KEY_INFO: '/service-customkey-ddd/entityKeyDic/{id}', //可查询字段详情
GET_LABEL_BIND_FILTER_RESULT: '/service-customkey-ddd/labelResource', // 点击保存后查询是否有结果,有结果则调用绑定接口
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'
} }
This diff is collapsed.
...@@ -397,8 +397,8 @@ export default { ...@@ -397,8 +397,8 @@ export default {
this.getStreet() this.getStreet()
}, },
mounted(){ mounted(){
console.log(this.$api.BASE_URL.indexOf('10.220.105.137')!=-1 ) console.log(this.$api.BASE_URL.indexOf('211.136.105')!=-1 )
console.log(this.$parent)
if(this.$route.name == 'basicInfo'){ if(this.$route.name == 'basicInfo'){
this.$nextTick(function () { this.$nextTick(function () {
// setTimeout(() => { // setTimeout(() => {
......
This diff is collapsed.
<template>
<div class="routerWapper">
<div class="portalDetailTitle" v-if="$route.name=='lvot'">
<span class="title">标签维护</span>
<!-- {{currentState}} -->
<div class="detailOperations">
<a-button @click="backPage"> 返回 </a-button>
</div>
</div>
<div class="layoutMargin layoutPadding" v-if="$route.name == 'lvot'">
<a-row v-if="$route.name=='lvot'">
<a-col :span="4" style="border-right:1px solid #ccc;height:100%; position:relative">
<span style="display: block; width: 90%; color:#1890ff; font-size: 16px; font-weight: 500; padding-bottom:5px;"><a-button style="width: 100%" type="default" @click="addLabel"> <a-icon type="plus" />添加标签 </a-button></span>
<a-tree
style="height: 700px"
:tree-data="treeData"
:replace-fields="replaceFields"
:selected-keys="selectedKeys"
@select="onSelect"
/>
</a-col>
<a-col :span="19" :offset="1">
<RightPanel v-if="currentState == 'create'" :trigger-type='currentState' @finish='getFinishState' />
<RightPanel v-else-if="currentState == 'loadChildLabel'" :trigger-type='currentState' :label-id='labelId' @finish='getFinishState' />
<ParentRightPanel v-else-if="currentState == 'loadParentLabel'" :trigger-type='currentState' :label-id='labelId' @finish='getFinishState' />
<EmptyRightPanel v-else />
</a-col>
</a-row>
</div>
<!-- <div v-if="$route.name=='lvot'">
<a-row>
<a-col :span='4' class="layoutMargin layoutPadding" style="height: 680px">
<a-row style="height: 36px">
<a-button style="width: 100%" size='small' type="default" @click="addLabel"> <a-icon type="plus" />添加标签 </a-button>
</a-row>
<a-tree
:tree-data="treeData"
:replace-fields="replaceFields"
:selected-keys="selectedKeys"
@select="onSelect"
/>
</a-col>
<a-col :span='1'></a-col>
<a-col :span='18' class="layoutMargin layoutPadding" style="height: 680px">
<RightPanel v-if="currentState == 'create'" :trigger-type='currentState' @finish='getFinishState' />
<RightPanel v-else-if="currentState == 'loadChildLabel'" :trigger-type='currentState' :label-id='labelId' @finish='getFinishState' />
<ParentRightPanel v-else-if="currentState == 'loadParentLabel'" :trigger-type='currentState' :label-id='labelId' @finish='getFinishState' />
<EmptyRightPanel v-else />
</a-col>
</a-row>
</div> -->
<RouterWapper v-else />
</div>
</template>
<script>
import RightPanel from '@/views/label/labelRightSide.vue'
import ParentRightPanel from '@/views/label/parentLabelRightPanel.vue'
import EmptyRightPanel from '@/views/label/labelRightSideEmpty.vue'
const treeData = []
export default {
name: 'lvot',
components: {
RightPanel,
EmptyRightPanel,
ParentRightPanel
},
data() {
return {
treeData,
replaceFields: {
children: 'children',
title: 'labelName',
key: 'id'
},
selectedKeys: [],
currentState: null,
labelId: null
}
},
mounted() {
this.getLabelList()
},
methods: {
getFinishState(state) {
if(state == true) {
this.currentState = null
this.getLabelList()
}
},
getLabelList() {
this.$ajax.get({
url: this.$api.GET_LABEL_LIST,
}).then(res => {
if (res.code == 200) {
this.treeData = this.$com.confirm(res, 'data.content', [])
console.log(JSON.stringify(this.treeData))
}
})
},
backPage(){ // 返回按钮
this.$router.back()
},
onSelect(selectedKeys, node) {
console.log(selectedKeys, node.node.$children.length)
this.$ajax.get({
url: this.$api.GET_LABEL_DETAIL.replace('{id}', selectedKeys[0]),
}).then(res => {
if (res.code == 200) {
let result = this.$com.confirm(res, 'data.content', [])
this.labelId = selectedKeys[0]
console.log(result.parentId, node.node.$children.length)
if(result.parentId !== '0' && node.node.$children.length == 0 || result.parentId == '0' && node.node.$children.length == 0) { // 为二级菜单
this.currentState = 'loadChildLabel'
} else { // 为一级菜单
this.currentState = 'loadParentLabel'
}
}
})
},
onCheck(checkedKeys, info) {
console.log('onCheck', checkedKeys, info)
},
addLabel() {
this.currentState = 'create'
console.log('add')
}
},
}
</script>
<style>
.ant-tree li {
margin: 0;
padding: 10px 0;
white-space: nowrap;
list-style: none;
outline: 0;
}
.ant-tree-child-tree > li:first-child {
padding-top: 20px;
}
</style>
This diff is collapsed.
<template>
<div style="position: relative">
<div style="border: 1px dotted lightgrey; padding: 150px;">
<a-row style="text-align: center; margin-bottom: 50px;">
<img src="@/assets/icon/labelNone.png" />
</a-row>
<a-row style="text-align: center; font-weight: bold; font-size: 16px">
<span>请先在左侧选择一个标签或添加标签。</span>
</a-row>
</div>
</div>
</template>
<script>
export default {
}
</script>
\ No newline at end of file
<template>
<div class="routerWapper">
<!-- {{labelId}} -->
<div>
<a-row>
<a-col :span='1'>
<div class="detailOperations">
<a-button @click="backPage"> 返回 </a-button>
</div>
</a-col>
<a-col :span='1' :offset='1'>
<a-button type='primary' @click="save()">保存</a-button>
</a-col>
<a-col :span='19'></a-col>
</a-row>
</div>
<div>
<a-divider type='horizontal' />
<a-form :form='labelForm'>
<a-form-item label='标签名' :label-col="{span:2}" :wrapper-col="{span:14}">
<a-input v-decorator="['labelName',{validateTrigger:'blur', initialValue: '', rules: [{required: true, message: '请填写标签名!'}]}]"></a-input>
</a-form-item>
</a-form>
</div>
</div>
</template>
<script>
export default {
data() {
return {
labelForm: this.$form.createForm(this),
labelList: {},
finish: false,
}
},
props: [
'triggerType',
'labelId'
],
mounted() {
this.getLabelInfo()
},
watch: {
triggerType: {
handler: function(newV, oldV) {
this.resetFormFields()
this.getLabelInfo()
},
immediate: true
},
labelId: {
handler: function(newV, oldV) {
this.resetFormFields()
this.getLabelInfo()
},
immediate: true
}
},
methods: {
getLabelInfo() {
if(!!this.labelId) {
this.$ajax.get({
url: this.$api.GET_LABEL_DETAIL.replace('{id}', this.labelId),
}).then(res => {
if (res.code == 200) {
this.labelList = res.data.content
this.labelForm.setFieldsValue({
labelName: res.data.content.labelName
})
}
})
}
},
resetFormFields() {
this.labelForm.resetFields()
},
backPage(){ // 返回按钮
this.finish = true
this.$emit('finish', this.finish)
},
save() {
this.labelForm.validateFields((err1, values) => {
if(!err1) {
this.labelList.labelName = this.labelForm.getFieldValue('labelName')
this.$ajax.put({
url: this.$api.PUT_LABEL_INFO.replace('{id}', this.labelId),
params: Object.assign(this.labelList, {id: this.labelId})
}).then(res => {
if (res.code == 200) {
this.$message.success('修改成功!')
this.resetFormFields()
this.finish = true
this.$emit('finish', this.finish)
} else {
this.$message.success('修改失败!')
}
})
}
})
},
},
}
</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