Commit 3a6e10a1 authored by levante's avatar levante

123

parents 0f65ef1d fadafc1e
This diff is collapsed.
...@@ -25,4 +25,4 @@ router.beforeEach((to, from, next) => { ...@@ -25,4 +25,4 @@ router.beforeEach((to, from, next) => {
} }
}) })
export default router export default router
\ No newline at end of file
...@@ -6,7 +6,6 @@ function GetSystemList() { ...@@ -6,7 +6,6 @@ function GetSystemList() {
let prodSystemList=micSystemsList.prod // 生产环境的子项目 let prodSystemList=micSystemsList.prod // 生产环境的子项目
let districtName //区局名称 let districtName //区局名称
let env = process.env.NODE_ENV //打包命令 let env = process.env.NODE_ENV //打包命令
let url = window.location.origin //当前访问的浏览器地址
// 1. 当打生产包的时候, // 1. 当打生产包的时候,
if ( env.indexOf('-prod')!= -1 ) { if ( env.indexOf('-prod')!= -1 ) {
...@@ -15,7 +14,7 @@ function GetSystemList() { ...@@ -15,7 +14,7 @@ function GetSystemList() {
// 3. 在生产环境的子项目list // 3. 在生产环境的子项目list
prodSystemList.forEach((item, index) => { prodSystemList.forEach((item, index) => {
if (item.districtName == districtName || item.districtName == 'common') { if (item.districtName == districtName || item.districtName == 'common') {
prodSystemList[index].entry = url + item.entry prodSystemList[index].entry =item.entry
system.push(item) system.push(item)
} }
}) })
......
...@@ -111,16 +111,6 @@ ...@@ -111,16 +111,6 @@
"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 }
}
]
} }
] ]
} }
......
...@@ -46,42 +46,7 @@ const appRoutes = [ ...@@ -46,42 +46,7 @@ const appRoutes = [
{ // 拓展信息管理 { // 拓展信息管理
path: '/systemManagement/tbls', name: 'tbls', component: resolve => require(['@/views/houseData/tbls'], resolve), //Tbls, path: '/systemManagement/tbls', name: 'tbls', component: resolve => require(['@/views/houseData/tbls'], resolve), //Tbls,
meta: { title: '拓展信息管理', menuPath: true, menuIcon: 'setting', authCode: '000002', hideInBread: false, }, meta: { title: '拓展信息管理', menuPath: true, menuIcon: 'setting', authCode: '000002', hideInBread: false, },
}, },
// //角色权限配置
// {
// path: '/systemManagement/permissionConfig',
// name: '/systemManagement/permissionConfig',
// component: resolve => require(['@/views/permissionConfig/index'], resolve),
// meta: { title: '角色权限配置', menuPath: true, authCode: '', menuIcon: 'cluster', hideInBread: false, openMode: 'normal' },
// children: [{
// path: '/systemManagement/permissionConfig/point',
// name: '/systemManagement/permissionConfig/point',
// component: resolve => require(['@/views/permissionConfig/point'], resolve),
// meta: { title: '功能点管理', menuPath: false, authCode: '', menuIcon: 'cluster', hideInBread: false, openMode: 'normal' },
// children: [
// {
// path: '/systemManagement/permissionConfig/point/add',
// name: '/systemManagement/permissionConfig/point/add',
// component: resolve => require(['@/views/permissionConfig/addPoint'], resolve),
// meta: { title: '添加功能点', menuPath: false, authCode: '', menuIcon: 'cluster', hideInBread: false, openMode: 'normal' },
// },
// {
// path: '/systemManagement/permissionConfig/point/addBatch',
// name: '/systemManagement/permissionConfig/point/addBatch',
// component: resolve => require(['@/views/permissionConfig/editPoint'], resolve),
// meta: { title: '批量添加功能点', menuPath: false, authCode: '', menuIcon: 'cluster', hideInBread: false, openMode: 'normal' },
// },
// {
// path: '/systemManagement/permissionConfig/point/edit',
// name: '/systemManagement/permissionConfig/point/edit',
// component: resolve => require(['@/views/permissionConfig/index'], resolve),
// meta: { title: '编辑功能点', menuPath: false, authCode: '', menuIcon: 'cluster', hideInBread: false, openMode: 'normal' },
// }
// ]
// },
// ]
// },
{ // 角色管理 { // 角色管理
path: '/systemManagement/role', name: 'role', component: resolve => require(['@/views/personal/role/list'], resolve), //role, path: '/systemManagement/role', name: 'role', component: resolve => require(['@/views/personal/role/list'], resolve), //role,
meta: { title: '角色管理', authCode: '000903', menuPath: true, menuIcon: 'cluster', hideInBread: false, }, meta: { title: '角色管理', authCode: '000903', menuPath: true, menuIcon: 'cluster', hideInBread: false, },
...@@ -175,20 +140,12 @@ const appRoutes = [ ...@@ -175,20 +140,12 @@ 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: 'profile', hideInBread: true, requirePerm: false }, meta: { title: '住宅信息', menuPath: true, menuIcon: 'home', hideInBread: true, requirePerm: false, authCode: '0001' },
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'},
......
...@@ -37,11 +37,10 @@ case 'huangpu-prod': ...@@ -37,11 +37,10 @@ case 'huangpu-prod':
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://pudong.hm.omniview.pro/api/v2' // BASE_URL = 'http://huangpu.hm.omniview.pro/api/v2'
// BASE_URL = 'http://xuhui.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://pudong.hm.omniview.pro/api/v2'
// BASE_URL = 'http://211.136.105.193/apiv2' // BASE_URL = 'http://211.136.105.193/apiv2'
break break
} }
...@@ -186,10 +185,6 @@ export default { ...@@ -186,10 +185,6 @@ export default {
GET_USER_PEIMISSION: '/service-permission/user/perms', // 当前用户角色权限树 -- 传userId GET_USER_PEIMISSION: '/service-permission/user/perms', // 当前用户角色权限树 -- 传userId
GET_ALL_PEIMISSION: '/service-permission/perms', // 全部角色权限树 GET_ALL_PEIMISSION: '/service-permission/perms', // 全部角色权限树
GET_ALL_ROLE: '/service-permission/menu/tree', //获取权限 GET_ALL_ROLE: '/service-permission/menu/tree', //获取权限
GET_PREMSPOINT_LIST: '/service-permission/perm/points', //获取功能点清单
POST_PREMSBRANCH: '/service-permission/perm/perm', //单个新增权限分支
DELETE_PREMSPOINT: '/service-permission/perm/point/{id}', //删除功能点
SYSTEM_LIST_ALL_GET: '/service-user/user/systems', //查询系统列表
GET_USER_CODE: '/service-permission/user/menus/code', //获取用户权限 GET_USER_CODE: '/service-permission/user/menus/code', //获取用户权限
GET_USER_PERM: '/service-permission/user/menus/{id}', GET_USER_PERM: '/service-permission/user/menus/{id}',
...@@ -214,19 +209,4 @@ export default { ...@@ -214,19 +209,4 @@ 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'
} }
...@@ -56,7 +56,4 @@ export default { ...@@ -56,7 +56,4 @@ export default {
SET_TABNAME(state, tabName) { SET_TABNAME(state, tabName) {
state.tabName = tabName state.tabName = tabName
}, },
SET_CURRENTROLEID(state, roleId) {
state.roleId = roleId
}
} }
...@@ -19,5 +19,4 @@ export default { ...@@ -19,5 +19,4 @@ export default {
content: null, content: null,
openKeys: [], openKeys: [],
isXuhui: false, // 是否为徐汇项目 isXuhui: false, // 是否为徐汇项目
currentRoleId: ''
} }
<template> <template>
<div class="content"> <div class="content">
<xuhui v-if="($api.BASE_URL).indexOf('xuhui') > -1 || ($api.BASE_URL).indexOf('31.0.161.39') > -1||($api.BASE_URL).indexOf('pudong') > -1 || ($api.BASE_URL).indexOf('211.136.105.193') > -1" /> <xuhui v-if="(url).indexOf('xuhui') > -1 || (url).indexOf('31.0.161.39') > -1||(url).indexOf('pudong') > -1 || (url).indexOf('211.136.105.193') > -1" />
<!-- <xuhui v-if="($api.BASE_URL).indexOf('xuhui') > -1 ||
($api.BASE_URL).indexOf('31.0.161.39') > -1||($api.BASE_URL).indexOf('pudong') > -1 || ($api.BASE_URL).indexOf('211.136.105.193') > -1" /> -->
<home v-else /> <home v-else />
</div> </div>
...@@ -9,11 +11,20 @@ ...@@ -9,11 +11,20 @@
<script> <script>
import xuhui from '@/views/homeXuhui' import xuhui from '@/views/homeXuhui'
import home from '@/views/home' import home from '@/views/home'
export default { export default {
components: { components: {
xuhui, xuhui,
home home
},
data () {
return {
url: window.location.origin
}
},
mounted() {
console.log(window.location.origin)
console.log(this.$api.BASE_URL)
} }
} }
......
...@@ -14,10 +14,10 @@ ...@@ -14,10 +14,10 @@
@selKeysNew ="selKeysNew" @selKeysNew ="selKeysNew"
/> />
<p style="textAlign:left;margin:-10px;marginLeft:10px;" v-if="$route.name == 'basicInfo'"> <p style="textAlign:left;margin:-10px;marginLeft:10px;" v-if="$route.name == 'basicInfo'">
小区总数: {{pagination.total != '' ? pagination.total+'个': '暂无数据'}},&nbsp;&nbsp;&nbsp; 小区总数: {{paginationshow.total != '' ? paginationshow.total+'个': '暂无数据'}},&nbsp;&nbsp;&nbsp;
房屋总面积: {{pagination.totStCnstArea != '0' ? pagination.totStCnstArea+'平方米': '暂无数据'}} ,&nbsp;&nbsp;&nbsp; 房屋总面积: {{paginationshow.totStCnstArea != '0' ? paginationshow.totStCnstArea+'平方米': '暂无数据'}} ,&nbsp;&nbsp;&nbsp;
总门牌数: {{pagination.totUnits != '0' ? pagination.totUnits+'幢': '暂无数据'}} ,&nbsp;&nbsp;&nbsp; 总门牌数: {{paginationshow.totUnits != '0' ? paginationshow.totUnits+'幢': '暂无数据'}} ,&nbsp;&nbsp;&nbsp;
总分户数: {{pagination.totHous != '0' ? pagination.totHous+'户': '暂无数据'}}&nbsp;&nbsp;&nbsp; 总分户数: {{paginationshow.totHous != '0' ? paginationshow.totHous+'户': '暂无数据'}}&nbsp;&nbsp;&nbsp;
</p> </p>
<a-table class="portalTable" <a-table class="portalTable"
size="small" size="small"
...@@ -68,6 +68,9 @@ export default { ...@@ -68,6 +68,9 @@ export default {
pagination: { pagination: {
type: Object type: Object
}, },
paginationshow: {
type: Object
},
tbl: { tbl: {
type: String type: String
}, },
......
<template> <template>
<div> <div>
<!-- 浦东 --> <!-- 浦东 -->
<div id="home" class="layoutPadding" v-if="(this.$api.BASE_URL).indexOf('pudong') > -1 || (this.$api.BASE_URL).indexOf('211.136.105.193') > -1"> <div id="home" class="layoutPadding" v-if="(url).indexOf('pudong') > -1 || (url).indexOf('211.136.105.193') > -1">
<div class="topBox-l"> <div class="topBox-l">
<div class="inner" style=""> <div class="inner" style="">
<div> <div>
...@@ -657,6 +657,7 @@ export default { ...@@ -657,6 +657,7 @@ export default {
}, },
data() { data() {
return{ return{
url: window.location.origin,
ok, ok,
nm, nm,
date: new Date(), date: new Date(),
......
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
</a-form> </a-form>
<!-- <p class="gayLine noline" /> --> <!-- <p class="gayLine noline" /> -->
<div class="portalTableOperates"> <div class="portalTableOperates">
<tableAndMut ref="childTab" :tableData="tableData" :pagination="pagination" :tbl="tbl" /> <tableAndMut ref="childTab" :paginationshow="paginationshow" :tableData="tableData" :pagination="pagination" :tbl="tbl" />
</div> </div>
</div> </div>
<RouterWapper v-else></RouterWapper> <RouterWapper v-else></RouterWapper>
...@@ -353,6 +353,23 @@ export default { ...@@ -353,6 +353,23 @@ export default {
totUnits: '', // 总门牌数 幢 totUnits: '', // 总门牌数 幢
totHous: '', // 总分户数 户 totHous: '', // 总分户数 户
}, },
paginationshow: { // 分页信息
pageNo: 1,
pageSize: 20,
current: 1,
defaultCurrent: 1,
defaultPageSize: 20,
showQuickJumper: true,
onChange: this.pageChange,
showSizeChanger: true,
onShowSizeChange: this.showSizeChange,
pageSizeOptions: ['10', '20', '50', '100'],
total: 0, // 小区总数
showTotal: total => `总条数: ${total}`,
totStCnstArea: '', // 房屋总面积 平方米
totUnits: '', // 总门牌数 幢
totHous: '', // 总分户数 户
},
tableData: [], tableData: [],
stLevel: '', stLevel: '',
cspServiceType: '', cspServiceType: '',
...@@ -397,8 +414,8 @@ export default { ...@@ -397,8 +414,8 @@ export default {
this.getStreet() this.getStreet()
}, },
mounted(){ mounted(){
console.log(this.$api.BASE_URL.indexOf('211.136.105')!=-1 ) console.log(this.$api.BASE_URL.indexOf('10.220.105.137')!=-1 )
console.log(this.$parent)
if(this.$route.name == 'basicInfo'){ if(this.$route.name == 'basicInfo'){
this.$nextTick(function () { this.$nextTick(function () {
// setTimeout(() => { // setTimeout(() => {
...@@ -425,11 +442,12 @@ export default { ...@@ -425,11 +442,12 @@ export default {
url: this.$api.GET_XIAOQUTOTAL, url: this.$api.GET_XIAOQUTOTAL,
}).then(res => { }).then(res => {
if (res.code == '200') { if (res.code == '200') {
console.log(res)
const contentTotal = res.data.content const contentTotal = res.data.content
this.pagination.total= contentTotal.sectCount this.paginationshow.total= contentTotal.sectCount
this.pagination.totStCnstArea= contentTotal.stCnstArea this.paginationshow.totStCnstArea= contentTotal.stCnstArea
this.pagination.totUnits= contentTotal.totUnits this.paginationshow.totUnits= contentTotal.totUnits
this.pagination.totHous= contentTotal.totHous this.paginationshow.totHous= contentTotal.totHous
} }
}) })
}, },
...@@ -585,6 +603,7 @@ export default { ...@@ -585,6 +603,7 @@ export default {
}) })
}).then(res => { }).then(res => {
if (res.code == 200 ) { if (res.code == 200 ) {
/** /**
* 存导出的数据? 暂时废弃 * 存导出的数据? 暂时废弃
*/ */
...@@ -594,10 +613,15 @@ export default { ...@@ -594,10 +613,15 @@ export default {
// a = a+k+'='+ searchParams[k]+ '&' // a = a+k+'='+ searchParams[k]+ '&'
// } // }
// this.exportParams = a // this.exportParams = a
// 小区的展示统计量信息数据 // 小区的展示统计量信息数据
if(this.$store.state.userInfos.orgType == 2){ if(this.$store.state.userInfos.orgType == 2){
this.showCom = false this.showCom = false
} }
this.pagination.total= this.$com.confirm(res, 'data.totalRows', 0)
this.pagination.totStCnstArea= this.$com.confirm(res, 'data.totStCnstArea', 0)
this.pagination.totUnits= this.$com.confirm(res, 'data.totUnits', 0)
this.pagination.totHous= this.$com.confirm(res, 'data.totHous', 0)
this.tableData = this.$com.confirm(res, 'data.content', []) this.tableData = this.$com.confirm(res, 'data.content', [])
// 处理显示的字段 // 处理显示的字段
...@@ -844,6 +868,8 @@ export default { ...@@ -844,6 +868,8 @@ export default {
}, },
changeServiceType(val) { changeServiceType(val) {
this.cspServiceType = val this.cspServiceType = val
this.pagination.current = 1
this.pagination.pageNo = 1
this.getList() this.getList()
}, },
changeNeighbourType(val) { changeNeighbourType(val) {
......
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>
<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
...@@ -515,4 +515,4 @@ export default { ...@@ -515,4 +515,4 @@ export default {
</style> </style>
<style> <style>
</style> </style>
\ 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