Commit e741450b by 冒粤蓉

fix

1 parent a311b8b5
......@@ -33,9 +33,17 @@ export default {
name: 'app',
data() {
return {
isQiankun: window.__POWERED_BY_QIANKUN__,
logo: require('images/logo.png')
}
},
watch: {
$route(to, from) {
if(this.isQiankun) {
this.getBreadcrumb();
}
}
},
mounted(){
// store.dispatch('getDeviceResources')
// store.dispatch('getLoginUser').then((res)=>{
......@@ -66,6 +74,29 @@ export default {
])
},
methods: {
getBreadcrumb() {
let matched = this.$route.matched.filter(item => item.name); // this.$route.matched 可以获取到一个数组,包含当前路由的所有嵌套路径片段的路由记录
const first = matched[0];
const { meta, path } = first;
const basePath = '/oEshield#';
let breadcrumb = [];
if(meta) {
const { title, parentTitle, parentPath } = meta;
if(parentTitle) {
breadcrumb.push({
name: parentTitle,
path: basePath + parentPath
})
}
if(title) {
breadcrumb.push({
name: title,
path: basePath + path
})
}
this.$root.parentVuex.dispatch('menu/setBreadCrumb', breadcrumb);
}
},
toggle(){
this.toggleCollapse()
},
......
......@@ -51,27 +51,6 @@ function render({ data = {} , container } = {}) {
},
render: h => h(App),
}).$mount(container ? container.querySelector('#glsx-sub-system') : '#glsx-sub-system');
router.beforeEach((to, from, next)=>{
const metaTitle = to.meta.title;
const thisBreadCrumb = data.store.getters.curBreadCrumb;
if(metaTitle) {
if(thisBreadCrumb) {
let nextChildren = {};
nextChildren = {
active: true,
menuName: metaTitle,
path: '/oEshield#' + to.path,
params: to.params
};
thisBreadCrumb.children.children = nextChildren;
}
} else {
thisBreadCrumb.children.children = '';
}
data.store.dispatch('menu/setBreadCrumb', thisBreadCrumb);
next();
})
}
if (!window.__POWERED_BY_QIANKUN__) {
......
......@@ -46,7 +46,7 @@
<el-form-item label="区域类型" prop="shapeType">
<el-radio-group v-model="form.shapeType" @change="shapeTypeChange" >
<!-- <el-radio-button label="4" value="4" >行政区域</el-radio-button> -->
<el-radio-button label="1" value="1" :disabled="readonlyStatus">圆形</el-radio-button>
<!-- <el-radio-button label="1" value="1" :disabled="readonlyStatus">圆形</el-radio-button> -->
<el-radio-button label="3" value="3" :disabled="readonlyStatus">多边形</el-radio-button>
</el-radio-group>
</el-form-item>
......@@ -407,7 +407,7 @@ export default{
form: {
fenceName: '',
bizFenceType: '12',
shapeType: 1,
shapeType: 3,
specialShopId: '',
specialShopName: '',
// fenceNo: '',
......@@ -508,7 +508,13 @@ export default{
userListModalVisible:false,
selectedIds: [],
mapData: null,
polygonPath: []
polygonPath: [
["113.989993", "22.588762"],
["113.993298", "22.590585"],
["113.996431", "22.58892"],
["113.99274", "22.586622"],
["113.99008", "22.585592"]
]
}
},
......@@ -597,7 +603,8 @@ export default{
// });
this.$refs.fenceMap.initFence({
fenceType: 'circle'
fenceType: 'polygon',
polygonPath: this.polygonPath
});
this.restainFenceName = undefined;
......@@ -804,7 +811,7 @@ export default{
const params = this.getParams();
params.id = this.fenceId;
MONITOR_SERVICE.updateFence(JSON.stringify(params)).then((res)=>{
MONITOR_SERVICE.updateFence(params).then((res)=>{
if(res.code == 200){
//this.closeDialog();
......
......@@ -126,7 +126,8 @@
<el-table-column prop="shopLevel" label="店级别" min-width="120" align="center"></el-table-column>
<el-table-column prop="fenceName" label="围栏名称" min-width="120" align="center"></el-table-column>
<el-table-column prop="bizFenceType" label="围栏类型" min-width="100" align="center"></el-table-column>
<el-table-column prop="checkResult" label="审核结果" min-width="120" align="center"></el-table-column>
<el-table-column prop="approvalResult" label="审核结果" min-width="120" align="center"></el-table-column>
<el-table-column prop="approvalRemark" label="审核结果备注" min-width="120" align="center"></el-table-column>
<el-table-column fixed="right" label="操作" min-width="120" align="center">
<template slot-scope="scope">
<el-button @click="deleteFence(scope.row.fenceId)" type="text" size="medium">删除</el-button>
......
......@@ -11,7 +11,7 @@
<el-select v-model="form.termType" slot="prepend" style="width:100px;" placeholder="请选择" size="small">
<el-option label="设备号" value="1"></el-option>
<el-option label="车架号" value="2"></el-option>
<el-option label="姓名" value="3"></el-option>
<!-- <el-option label="姓名" value="3"></el-option> -->
<!-- <el-option label="工单号" value="4"></el-option> -->
</el-select>
</el-input>
......@@ -199,7 +199,7 @@ export default{
highSearchVisible: false,
userImportModalVisible: false,
pageNumber: 1,
pageSize: 10,
pageSize: 50,
total: 0,
maxPage: 1,
resultList: [],
......@@ -448,7 +448,6 @@ export default{
return params;
},
infiniteHandler($state){
if(this.pageNumber> this.maxPage){
$state.complete();
return;
......@@ -462,15 +461,15 @@ export default{
const { list } = data;
if(list && list.length > 0) {
list.map((obj)=>{
if(obj.sn){
obj.sns = obj.sn.split(',')
if(obj.sns){
obj.sns = obj.sns.split(',')
}else{
obj.sns = [];
}
});
this.resultList = this.resultList.concat(list);
this.total = res.recordsTotal;
this.maxPage = Math.ceil(this.total/this.pageSize);
this.total = data.totalElements;
this.maxPage = data.totalPages;
this.pageNumber++;
$state.loaded()
} else {
......@@ -490,7 +489,7 @@ export default{
BUSINESS_SERVICE.getWorkOrderList(params).then((response)=>{
if(Array.isArray(response.data)){
this.tableData = response.data;
this.total = response.recordsTotal;
this.total = totalElements;
}else{
this.tableData = [];
this.total = 0;
......
......@@ -232,13 +232,17 @@ const routes = [
{
path: 'fenceManagement',
name: 'fenceManagement',
meta: {title:'围栏管理'},
meta: {title:'试驶线路管理'},
component: fenceManagement
},
{
path: 'editFence',
name: 'editFence',
meta: {title:'新增围栏'},
meta: {
title:'新增围栏',
parentTitle: '试驶线路管理',
parentPath: '/monitor/fenceManagement'
},
component: editFence,
notMenu: true,
},{
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!