Browse Source

<feat>:死亡代码提交

master
黄潇军 3 months ago
parent
commit
f5ef1cde0e
  1. 3
      packages/robot-system/src/config/app/proxy.js
  2. 189
      packages/robot-system/src/modules/RobotSystemManage/ScreenViewManage/TaskScreenView/MapComponent.vue
  3. 181
      packages/robot-system/src/modules/RobotSystemManage/ScreenViewManage/TaskScreenView/components/InfoCard.vue
  4. 0
      packages/robot-system/src/modules/RobotSystemManage/ScreenViewManage/TaskScreenView/components/MapComponent copy.vue
  5. 295
      packages/robot-system/src/modules/RobotSystemManage/ScreenViewManage/TaskScreenView/index.vue
  6. 9
      packages/robot-system/src/modules/RobotSystemManage/ScreenViewManage/TaskScreenView/route.js
  7. 45
      packages/robot-system/src/modules/RobotSystemManage/ScreenViewManage/TaskScreenView/utils/index.js
  8. 2
      packages/robot-system/src/modules/RobotSystemManage/ScreenViewManage/route.js
  9. 2
      packages/robot-system/src/modules/RobotSystemManage/route.js
  10. 13
      packages/robot-system/src/modules/SysConfig/Tenant/index.vue
  11. 1
      packages/robot-system/src/modules/systemCheckout/index.vue
  12. 172
      packages/robot-system/src/router/index.js
  13. 15
      packages/robot-system/src/routerGuards.js
  14. 13
      packages/robot-system/src/saas/mixins.js
  15. 7
      packages/robot-system/src/utils/request/index.js
  16. 5
      packages/robot-system/src/utils/route/index.js

3
packages/robot-system/src/config/app/proxy.js

@ -25,7 +25,8 @@ module.exports = { @@ -25,7 +25,8 @@ module.exports = {
// 8010是前端应用做的代理转发,所以带api
'/api': {
// target: 'http://fawkes.bw.chienli.cn/', // 测试
target: 'http://117.72.194.64:8010/', //菲律宾
target: 'http://117.72.194.64:8020/', //机器人项目
// target: 'http://117.72.194.64:8010/', //菲律宾
// target: 'http://117.72.194.64:18200/', //菲律宾
// target: 'http://60.204.250.115:8808/', //新测试
// target: 'http://60.204.250.115/', // 正式

189
packages/robot-system/src/modules/RobotSystemManage/ScreenViewManage/TaskScreenView/MapComponent.vue

@ -4,20 +4,15 @@ @@ -4,20 +4,15 @@
<script>
import AMapLoader from '@amap/amap-jsapi-loader';
import InfoCard from './components/InfoCard.vue';
import { STATUS_STYLE, isDevice } from './utils/index.js';
import { devicePopupColumns } from './utils';
import { areaPopupColumns } from './utils';
/**
* props.rectangles: Array<{ id, name, status, geomWkt }>
* - geomWkt: "POLYGON((lng lat,lng lat,...))"
* - status: 施工中 | 已施工 | 未施工 | 故障 | 运行中 | 停机
*/
const STATUS_STYLE = {
施工中: { stroke: 'rgba(41,169,253,1)', fill: 'rgba(41,169,253,0.45)' },
已施工: { stroke: 'rgba(82,196,26,1)', fill: 'rgba(82,196,26,0.45)' },
未施工: { stroke: 'rgba(250,173,20,1)', fill: 'rgba(250,173,20,0.45)' },
故障: { stroke: 'rgba(219,77,77,1)', fill: 'rgba(219,77,77,0.6)' },
运行中: { stroke: 'rgba(19,194,194,1)', fill: 'rgba(19,194,194,0.45)' },
停机: { stroke: 'rgba(99,99,99,1)', fill: 'rgba(0,0,0,0.45)' }
};
export default {
name: 'TaskMapPolygon',
@ -38,7 +33,9 @@ export default { @@ -38,7 +33,9 @@ export default {
AMapIns: null,
polygons: [],
texts: [],
pointAll: { lng: [], lat: [] }
pointAll: { lng: [], lat: [] },
_infoWindow: null,
_infoVm: null
};
},
watch: {
@ -57,6 +54,7 @@ export default { @@ -57,6 +54,7 @@ export default {
this.initAMap();
},
beforeUnmount() {
this.closeInfoWindow(true);
this.map?.destroy();
},
methods: {
@ -75,16 +73,18 @@ export default { @@ -75,16 +73,18 @@ export default {
})
.then((AMap) => {
this.AMapIns = AMap;
this.map = new AMap.Map('map', {
viewMode: '2D',
zoom: 12,
center: defaultCenterPoint,
mapStyle: 'amap://styles/dark', // 使
layers: []
});
this.map = new AMap.Map('map', {
viewMode: '2D',
zoom: 12,
center: defaultCenterPoint,
mapStyle: 'amap://styles/dark', // 使
layers: []
});
if (this.rectangles?.length) {
this.formatData(this.rectangles);
}
//
this.map.on('click', () => this.closeInfoWindow());
})
.catch(console.error);
},
@ -128,33 +128,57 @@ export default { @@ -128,33 +128,57 @@ export default {
createPolygon(item) {
const { path, status, name } = item;
const style = STATUS_STYLE[status] || STATUS_STYLE['未施工'];
const polygon = new this.AMapIns.Polygon({
path,
strokeColor: style.stroke,
strokeWeight: 2,
strokeOpacity: 1,
strokeStyle: 'solid',
fillColor: style.fill,
fillOpacity: 0.45,
cursor: 'pointer',
zIndex: 100 //
});
const polygon = new this.AMapIns.Polygon({
path,
strokeColor: style.stroke,
strokeWeight: 2,
strokeOpacity: 1,
strokeStyle: 'solid',
fillColor: style.fill,
fillOpacity: 0.45,
cursor: 'pointer',
zIndex: 100 //
});
console.log(polygon, 'polygon');
this.map.add(polygon);
this.polygons.push(polygon);
//
const text = new this.AMapIns.Text({
text: name || '',
anchor: 'center',
style: { 'background-color': 'transparent', border: 'none', color: '#ffffff', 'font-size': '12px' },
zIndex: 101 //
});
//
// ->
const mid = path[Math.floor(path.length / 2)] || path[0];
if (mid) text.setPosition(mid);
text.setMap(this.map);
this.texts.push(text);
const isDev = isDevice(item);
const html = isDev
? `<div style="position: relative;transform: translate(-60%, 60%); display:flex;align-items:center;gap:8px;padding:0;border:none;background:transparent;color:#EBFAFF;">
<div style="width:36px;height:36px;border-radius:50%;background: radial-gradient(closest-side, rgba(63,233,197,.9), rgba(63,233,197,.4));display:flex;align-items:center;justify-content:center;">
<span style="display:block;width:18px;height:18px;background:#fff;border-radius:2px"></span>
</div>
<div style="min-width:120px;">
<div style="font-weight:700;font-size:16px;line-height:1.2;">${name || '-'}</div>
<div style="opacity:.95;font-size:12px;margin-top:2px;display:flex;justify-content:space-between;">
<span>檩条安装进度</span><span>10%</span>
</div>
<div style="opacity:.95;font-size:12px;margin-top:2px;display:flex;justify-content:space-between;">
<span>组件安装进度</span><span>10%</span>
</div>
</div>
</div>`
: `<div style="position: relative; left: 50%; top: 50%; transform: translate(-50%, -50%); padding:0;border:none;background:transparent;color:#EBFAFF;min-width:160px;">
<div style="font-weight:700;font-size:18px;text-align:center;line-height:1.2;margin-bottom:6px;">${name || '-'}</div>
<div style="font-size:12px;display:flex;justify-content:space-between;margin-top:4px;">
<span>檩条安装进度</span><span>10%</span>
</div>
<div style="font-size:12px;display:flex;justify-content:space-between;margin-top:4px;">
<span>组件安装进度</span><span>10%</span>
</div>
</div>`
const marker = new this.AMapIns.Marker({
position: mid,
anchor: 'center',
offset: new this.AMapIns.Pixel(0, 0),
zIndex: 101,
content: html
})
marker.setMap(this.map)
this.texts.push(marker)
// hover
polygon.on('mouseover', () => {
@ -163,6 +187,92 @@ export default { @@ -163,6 +187,92 @@ export default {
polygon.on('mouseout', () => {
polygon.setOptions({ fillOpacity: 0.35 });
});
// click
polygon.on('click', () => {
const pos = mid ? new this.AMapIns.LngLat(mid[0], mid[1]) : undefined;
this.openInfoWindow({ ...item }, pos);
});
},
// geomWkt
openInfoWindowByDetail(detail) {
if (!detail) return;
const center = this.getCenterFromWKT(detail.geomWkt);
const pos = center ? new this.AMapIns.LngLat(center[0], center[1]) : undefined;
this.openInfoWindow(detail, pos);
},
getCenterFromWKT(wkt) {
if (!wkt) return null;
const raw = String(wkt)
.replace(/POLYGON\(\(/i, '')
.replace(/\)\)$/i, '')
.trim();
if (!raw) return null;
const points = raw
.split(',')
.map((s) => s.trim().split(/\s+/).map(Number))
.filter((arr) => arr.length === 2 && !isNaN(arr[0]) && !isNaN(arr[1]));
if (points.length === 0) return null;
let sumLng = 0,
sumLat = 0;
points.forEach(([lng, lat]) => {
sumLng += lng;
sumLat += lat;
});
return [sumLng / points.length, sumLat / points.length];
},
openInfoWindow(detail, position) {
this.closeInfoWindow();
const color = (STATUS_STYLE[detail.status] || {}).stroke || '#29a9fd';
const RootCtor = this.$root.constructor;
//
const kvColumns = isDevice(detail) ? devicePopupColumns : areaPopupColumns;
const tableData = [];
// const tableData = detail.alarmList || [];
this._infoVm = new RootCtor({
render: (h) =>
h(InfoCard, {
props: {
title: '设备信息',
color,
status: detail.status,
kvColumns,
kvData: detail,
tableTitle: '报警信息记录',
// tableColumns,
tableData
}
})
}).$mount();
this._infoWindow = new this.AMapIns.InfoWindow({
isCustom: true,
content: this._infoVm.$el,
offset: new this.AMapIns.Pixel(0, -10),
anchor: 'bottom-center'
});
//
this._infoWindow.on('close', () => this.closeInfoWindow());
if (position) {
this._infoWindow.open(this.map, position);
}
},
closeInfoWindow(force = false) {
try {
if (this._infoWindow) {
//
if (!force && this._infoWindow.getIsOpen && this._infoWindow.getIsOpen()) {
this._infoWindow.close();
}
}
} catch (e) {}
if (this._infoVm) {
try {
this._infoVm.$destroy();
} catch (e) {}
this._infoVm = null;
}
this._infoWindow = null;
}
}
};
@ -173,5 +283,4 @@ export default { @@ -173,5 +283,4 @@ export default {
width: 100%;
height: 100%;
}
</style>

181
packages/robot-system/src/modules/RobotSystemManage/ScreenViewManage/TaskScreenView/components/InfoCard.vue

@ -0,0 +1,181 @@ @@ -0,0 +1,181 @@
<template>
<div class="info-card">
<div class="hd">
<span class="title">{{ title }}</span>
<span class="detail-btn">查看详情</span>
</div>
<!-- 键值对信息块 -->
<div v-if="kvColumns.length" class="kv">
<div class="kv-row" v-for="(col, idx) in kvColumns" :key="idx">
<div class="kv-label">{{ col.label }}</div>
<div class="kv-value">{{ safeGet(kvData, col.key) }}</div>
</div>
</div>
<!-- 状态行可选 -->
<!-- <div v-if="status" class="status-row">
<span class="status-label">设备状态</span>
<span class="status-value" :style="{ color }">{{ status }}</span>
</div> -->
<!-- 原生表格报警信息记录等 -->
<div v-if="tableColumns.length && tableData.length" class="table-wrap">
<div class="table-title">{{ tableTitle }}</div>
<table class="native-table">
<thead>
<tr>
<th v-for="(c, i) in tableColumns" :key="i" :style="{ width: c.width ? c.width + 'px' : 'auto' }">{{ c.label }}</th>
</tr>
</thead>
<tbody>
<tr v-for="(row, r) in tableData" :key="r">
<td v-for="(c, i) in tableColumns" :key="i">{{ safeGet(row, c.key) }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</template>
<script>
export default {
name: 'InfoCard',
props: {
title: { type: String, default: '设备信息' },
color: { type: String, default: '#29a9fd' },
status: { type: String, default: '' },
// columns + data
kvColumns: { type: Array, default: () => [] }, // [{ label, key }]
kvData: { type: Object, default: () => ({}) },
// columns + data
tableTitle: { type: String, default: '报警信息记录' },
tableColumns: { type: Array, default: () => [] }, // [{ label, key, width? }]
tableData: { type: Array, default: () => [] }
},
methods: {
safeGet(obj, path) {
if (!obj || !path) return '-';
const segs = path.split('.');
let cur = obj;
for (let i = 0; i < segs.length; i++) {
if (cur == null) return '-';
cur = cur[segs[i]];
}
if (cur === undefined || cur === null || cur === '') return '-';
return cur;
}
}
};
</script>
<style scoped>
.info-card {
display: inline-block;
min-width: 320px;
max-width: 480px;
border-radius: 8px;
background: rgba(245, 248, 253, 0.98);
border: 1px solid rgba(255, 255, 255, 1);
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
padding: 16px;
}
.hd {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 8px;
}
.title {
height: 20px;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
font-size: 14px;
color: #000000;
text-align: left;
font-style: normal;
text-transform: none;
}
.detail-btn {
font-family: PingFang SC, PingFang SC;
font-weight: 400;
font-size: 14px;
color: #0d79e8;
text-align: left;
font-style: normal;
text-transform: none;
}
.kv {
margin-top: 6px;
}
.kv-row {
display: flex;
align-items: baseline;
padding: 6px 0;
justify-content: space-between;
}
.kv-label {
font-family: PingFang SC, PingFang SC;
font-weight: 400;
font-size: 14px;
color: #999999;
text-align: left;
font-style: normal;
text-transform: none;
}
.kv-value {
font-family: PingFang SC, PingFang SC;
font-weight: 400;
font-size: 14px;
color: #333333;
text-align: left;
font-style: normal;
text-transform: none;
}
.status-row {
margin: 8px 0 4px;
font-size: 18px;
font-weight: 600;
}
.status-label {
color: #7a869a;
font-size: 14px;
font-weight: 400;
margin-right: 8px;
}
.status-value {
font-size: 18px;
}
.table-wrap {
margin-top: 10px;
}
.table-title {
font-size: 14px;
color: #2b2f36;
font-weight: 600;
margin-bottom: 6px;
}
.native-table {
width: 100%;
border-collapse: collapse;
background: #fff;
}
.native-table th {
text-align: left;
background: #f4f6f8;
color: #6b778c;
font-weight: 600;
font-size: 13px;
padding: 8px 10px;
}
.native-table td {
color: #2b2f36;
font-size: 13px;
padding: 10px;
}
.native-table tr + tr td {
border-top: 1px solid #edf0f3;
}
</style>

0
packages/robot-system/src/modules/RobotSystemManage/ScreenViewManage/TaskScreenView/MapComponent copy.vue → packages/robot-system/src/modules/RobotSystemManage/ScreenViewManage/TaskScreenView/components/MapComponent copy.vue

295
packages/robot-system/src/modules/RobotSystemManage/ScreenViewManage/TaskScreenView/index.vue

@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
<template>
<div class="task-screen">
<div class="map-wrap">
<MapComponent :rectangles="rectangles" />
<MapComponent ref="taskMap" :rectangles="deviceTable" />
<div class="legend">
<div class="legend-item" v-for="(item, i) in legends" :key="i">
<template v-if="item.imgList">
<img v-for="img in item.imgList" :src="img" alt="" />
</template>
<template v-else>
<span class="rect" :style="{ '--rect-color': item.color }"></span>
<span class="rect" :style="{ '--rect-color': item.color, '--rect-fill': item.fill }"></span>
</template>
<span class="text">{{ item.label }}</span>
</div>
@ -36,12 +36,23 @@ @@ -36,12 +36,23 @@
<div class="num">{{ p.value }}</div>
</div>
</div>
<fks-table :data="areaTable" border height="220">
<fks-table-column prop="name" label="工区名称" min-width="74" />
<fks-table-column prop="pile" label="桩条安装进度(%)" width="90" />
<fks-table-column prop="module" label="组件安装进度(%)" width="90" />
<fks-table-column prop="year" label="10号车" width="74" />
<fks-table :data="areaTable" border height="330" @row-click="onAreaRowClick">
<fks-table-column prop="name" label="工区名称" width="60" />
<fks-table-column prop="pilePercent" label="桩条安装进度(%)" width="100" />
<fks-table-column prop="modulePercent" label="组件安装进度(%)" width="100" />
<fks-table-column prop="year" label="10号车" />
</fks-table>
<InfoCard
v-if="areaCardVisible"
class="area-card"
:title="'工区信息'"
:color="'#137ee9'"
:status="''"
:kv-columns="areaPopupColumns"
:kv-data="areaCardData"
:table-columns="[]"
:table-data="[]"
/>
</div>
</div>
@ -51,9 +62,9 @@ @@ -51,9 +62,9 @@
<span>更多</span>
</template>
</BlockTitle>
<fks-table :data="materialTable" border height="300">
<fks-table :data="materialTable" border height="330">
<fks-table-column prop="name" label="材料名称" min-width="100" />
<fks-table-column prop="used" label="日消耗量" width="120" />
<fks-table-column prop="used" label="日消耗量" width="120" />
<fks-table-column prop="stock" label="库存量" width="100" />
</fks-table>
</div>
@ -92,23 +103,27 @@ @@ -92,23 +103,27 @@
</div>
</div>
<div class="kpi-item-title">今日设备信息</div>
<fks-table :data="deviceTable" border height="208">
<fks-table-column prop="id" label="设备ID" />
<fks-table-column prop="area" label="所属工区" />
<fks-table-column prop="team" label="工作小组" />
<fks-table-column prop="dayWork" label="当日工作量" width="80" />
<fks-table-column prop="runtime" label="运行时长(h)" width="85" />
<fks-table :data="deviceTable" border height="300" @row-click="onDeviceRowClick">
<fks-table-column :prop="item.key" :label="item.label" v-for="item in deviceTableColumns" :key="item.key" :width="item.width" />
</fks-table>
</div>
<div class="panel">
<div class="panel" ref="alarmPanel" style="position: relative" @click.stop v-clickoutside="closeHandler">
<BlockTitle title="安全预警"> </BlockTitle>
<fks-table :data="alarmTable" border height="208">
<fks-table-column prop="code" label="预警类别" />
<fks-table-column prop="device" label="设备编码" />
<fks-table-column prop="desc" label="报警内容" />
<fks-table-column prop="time" label="报警时间" width="160" />
<fks-table :data="alarmTable" border height="300" @row-click="onAlarmRowClick">
<fks-table-column :prop="item.key" :label="item.label" v-for="item in alarmTableColumns" :key="item.key" />
</fks-table>
<InfoCard
v-if="alarmCardVisible"
class="alarm-card"
:title="'报警信息'"
:color="'#f56c6c'"
:status="''"
:kv-columns="alarmKvColumns"
:kv-data="alarmCardData"
:table-columns="[]"
:table-data="[]"
/>
</div>
</div>
</div>
@ -117,6 +132,7 @@ @@ -117,6 +132,7 @@
<script>
import Mix from '@/mixins/module';
import MapComponent from './MapComponent.vue';
import InfoCard from './components/InfoCard.vue';
import BlockTitle from './components/BlockTitle.vue';
import error1 from './images/error-1.png';
import error2 from './images/error-2.png';
@ -124,11 +140,12 @@ import running1 from './images/running-1.png'; @@ -124,11 +140,12 @@ import running1 from './images/running-1.png';
import running2 from './images/running-2.png';
import warning1 from './images/warning-1.png';
import warning2 from './images/warning-2.png';
import { deviceTableColumns, devicePopupColumns, alarmTableColumns, areaPopupColumns, STATUS_STYLE } from './utils';
export default {
name: 'TaskScreenView',
mixins: [Mix],
components: { MapComponent, BlockTitle },
components: { MapComponent, BlockTitle, InfoCard },
data() {
return {
titleIcon: require('@/assets/img/Automated/titleIcon1.png'),
@ -138,12 +155,13 @@ export default { @@ -138,12 +155,13 @@ export default {
{ name: '组件安装进度(%)', value: 10 }
],
areaTable: [
{ name: 'xxx', pile: 10, module: 10, owner: '10号车', year: '10号车' },
{ name: 'xxx', pile: 10, module: 10, owner: '10号车', year: '10号车' },
{ name: 'xxx', pile: 10, module: 10, owner: '10号车', year: '10号车' },
{ name: 'xxx', pile: 10, module: 10, owner: '10号车', year: '10号车' },
{ name: 'xxx', pile: 10, module: 10, owner: '10号车', year: '10号车' },
{ name: 'xxx', pile: 10, module: 10, owner: '10号车', year: '10号车' }
{ name: 'xxx', pilePercent: 10, modulePercent: 10, owner: '10号车', year: '10号车', pileCount: '10/300', moduleCount: '10/300' },
{ name: 'xxx', pilePercent: 10, modulePercent: 10, owner: '10号车', year: '10号车', pileCount: '10/300', moduleCount: '10/3' },
{ name: 'xxx', pilePercent: 10, modulePercent: 10, owner: '10号车', year: '10号车', pileCount: '10/300', moduleCount: '10/3' },
{ name: 'xxx', pilePercent: 10, modulePercent: 10, owner: '10号车', year: '10号车', pileCount: '10/300', moduleCount: '10/3' },
{ name: 'xxx', pilePercent: 10, modulePercent: 10, owner: '10号车', year: '10号车', pileCount: '10/300', moduleCount: '10/3' },
{ name: 'xxx', pilePercent: 10, modulePercent: 10, owner: '10号车', year: '10号车', pileCount: '10/300', moduleCount: '10/3' },
{ name: 'xxx', pilePercent: 10, modulePercent: 10, owner: '10号车', year: '10号车', pileCount: '10/300', moduleCount: '10/3' }
],
materialTable: [
{ name: 'xxx', used: 128, stock: 3 },
@ -155,46 +173,173 @@ export default { @@ -155,46 +173,173 @@ export default {
],
deviceStats: {
online: 2234,
component: 2234,
installing: 2234,
// percent: '10%',
component: 2234,
moduleInstalled: 2234
// componentPercent: '10%'
},
deviceTable: [
{ id: '001', area: 'xxx', team: 'xxx', dayWork: 128, runtime: 18 },
{ id: '002', area: 'xxx', team: 'xxx', dayWork: 325, runtime: 18 },
{ id: '003', area: 'xxx', team: 'xxx', dayWork: 1900, runtime: 18 },
{ id: '004', area: 'xxx', team: 'xxx', dayWork: 1900, runtime: 18 },
{ id: '005', area: 'xxx', team: 'xxx', dayWork: 325, runtime: 18 }
],
deviceTableColumns,
alarmTableColumns,
deviceTable: Array.from({ length: 8 }).map((_, i) => ({
name: String(i + 1).padStart(3, '0'),
area: 'xxx',
team: 'xxx',
dayWork: 100 + i * 10,
runtime: 12 + i,
position: 'xx工区/组串编号/安装位置编号',
type: '组件安装机器人',
percent1: '10%',
percent2: '10%',
status: ['故障', '运行中', '停机'][i % 3],
geomWkt: ''
})),
alarmTable: [
{ code: 'A001', device: 'xxx', desc: '报警内容', time: '2024-01-01 12:01' },
{ code: 'A002', device: 'xxx', desc: '报警内容', time: '2024-01-01 12:10' },
{ code: 'A003', device: 'xxx', desc: '报警内容', time: '2024-01-01 12:35' },
{ code: 'A004', device: 'xxx', desc: '报警内容', time: '2024-01-01 12:58' }
],
rectangles: [
// 西
{ id: '1', name: '西湖区', status: '施工中', geomWkt: 'POLYGON((120.0000 30.1500,120.2500 30.1500,120.2500 30.3700,120.0000 30.3700,120.0000 30.1500))' }
//
// { id: '2', name: '', status: '', geomWkt: 'POLYGON((120.0900 30.3000,120.2300 30.3000,120.2300 30.4200,120.0900 30.4200,120.0900 30.3000))' },
// //
// { id: '3', name: '', status: '', geomWkt: 'POLYGON((120.1400 30.2000,120.2600 30.2000,120.2600 30.3100,120.1400 30.3100,120.1400 30.2000))' },
// //
// { id: '4', name: '', status: '', geomWkt: 'POLYGON((120.0900 30.1400,120.2700 30.1400,120.2700 30.2400,120.0900 30.2400,120.0900 30.1400))' },
// //
// { id: '5', name: '', status: '', geomWkt: 'POLYGON((120.1800 30.0200,120.5300 30.0200,120.5300 30.3300,120.1800 30.3300,120.1800 30.0200))' },
// //
// { id: '6', name: '', status: '', geomWkt: 'POLYGON((119.8000 30.1800,120.1000 30.1800,120.1000 30.5000,119.8000 30.5000,119.8000 30.1800))' }
],
// rectangles: [
// // 西
// { id: '1', name: '西', status: '', geomWkt: 'POLYGON((120.0000 30.1500,120.2500 30.1500,120.2500 30.3700,120.0000 30.3700,120.0000 30.1500))' },
// //
// { id: '2', name: '', status: '', geomWkt: 'POLYGON((120.0900 30.3000,120.2300 30.3000,120.2300 30.4200,120.0900 30.4200,120.0900 30.3000))' },
// //
// { id: '3', name: '', status: '', geomWkt: 'POLYGON((120.1400 30.2000,120.2600 30.2000,120.2600 30.3100,120.1400 30.3100,120.1400 30.2000))' },
// // //
// { id: '4', name: '', status: '', geomWkt: 'POLYGON((120.0900 30.1400,120.2700 30.1400,120.2700 30.2400,120.0900 30.2400,120.0900 30.1400))' },
// //
// { id: '5', name: '', status: '', geomWkt: 'POLYGON((120.1800 30.0200,120.5300 30.0200,120.5300 30.3300,120.1800 30.3300,120.1800 30.0200))' },
// //
// { id: '6', name: '', status: '', geomWkt: 'POLYGON((119.8000 30.1800,120.1000 30.1800,120.1000 30.5000,119.8000 30.5000,119.8000 30.1800))' }
// ],
legends: [
{ label: '施工中', color: '#137EE9' },
{ label: '已施工', color: '#1AD59A' },
{ label: '未施工', color: '#FFBC48' },
{ label: '故障', color: '#ff4d4f', imgList: [error1, error2] },
{ label: '运行中', color: '#13c2c2', imgList: [running1, running2] },
{ label: '停机', color: '#bfbfbf', imgList: [warning1, warning2] }
{ label: '施工中', color: STATUS_STYLE['施工中'].stroke, fill: STATUS_STYLE['施工中'].fill },
{ label: '已施工', color: STATUS_STYLE['已施工'].stroke, fill: STATUS_STYLE['已施工'].fill },
{ label: '未施工', color: STATUS_STYLE['未施工'].stroke, fill: STATUS_STYLE['未施工'].fill },
{ label: '故障', imgList: [error1, error2] },
{ label: '运行中', imgList: [running1, running2] },
{ label: '停机', imgList: [warning1, warning2] }
],
// InfoCard
areaCardVisible: false,
areaCardData: {},
areaPopupColumns,
// InfoCard
alarmCardVisible: false,
alarmCardData: {},
alarmKvColumns: [
{ label: '预警类别', key: 'code' },
{ label: '设备编码', key: 'device' },
{ label: '报警内容', key: 'desc' },
{ label: '报警时间', key: 'time' }
]
};
},
mounted() {
// 4x4 8 geomWkt
const bbox = { minLng: 119.8, maxLng: 120.6, minLat: 30.0, maxLat: 30.5 };
const rects = this.generateGridRects(bbox, 4, 4);
const picked = this.pickUnique(rects, 8);
this.deviceTable = this.deviceTable.map((dev, idx) => ({
...dev,
geomWkt: this.rectToWkt(picked[idx] || picked[picked.length - 1])
}));
},
beforeDestroy() {
this.unbindAlarmOutside();
this.unbindAreaOutside();
},
methods: {
generateGridRects(bbox, rows = 4, cols = 4) {
const { minLng, maxLng, minLat, maxLat } = bbox;
const cellW = (maxLng - minLng) / cols;
const cellH = (maxLat - minLat) / rows;
const rects = [];
for (let r = 0; r < rows; r++) {
for (let c = 0; c < cols; c++) {
const lng1 = minLng + c * cellW;
const lat1 = minLat + r * cellH;
const lng2 = lng1 + cellW;
const lat2 = lat1 + cellH;
rects.push({ lng1, lat1, lng2, lat2 });
}
}
return rects;
},
rectToWkt(rect) {
if (!rect) return '';
const { lng1, lat1, lng2, lat2 } = rect;
return `POLYGON((${lng1.toFixed(4)} ${lat1.toFixed(4)},${lng2.toFixed(4)} ${lat1.toFixed(4)},${lng2.toFixed(4)} ${lat2.toFixed(4)},${lng1.toFixed(4)} ${lat2.toFixed(4)},${lng1.toFixed(
4
)} ${lat1.toFixed(4)}))`;
},
pickUnique(arr, n) {
const copy = arr.slice();
for (let i = copy.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[copy[i], copy[j]] = [copy[j], copy[i]];
}
return copy.slice(0, n);
},
onDeviceRowClick(row) {
try {
this.$refs.taskMap && this.$refs.taskMap.openInfoWindowByDetail(row);
} catch (e) {}
},
onAreaRowClick(row) {
//
this.areaCardData = { ...row };
this.areaCardVisible = true;
this.bindAreaOutside();
},
onAlarmRowClick(row) {
//
this.alarmCardData = { ...row };
this.alarmCardVisible = true;
this.bindAlarmOutside();
},
bindAreaOutside() {
if (this._areaOutsideHandler) return;
this._areaOutsideHandler = (e) => {
const panel = this.$refs.areaPanel;
if (!panel) return;
if (!panel.contains(e.target)) {
this.areaCardVisible = false;
this.unbindAreaOutside();
}
};
document.addEventListener('click', this._areaOutsideHandler, true);
},
unbindAreaOutside() {
if (this._areaOutsideHandler) {
document.removeEventListener('click', this._areaOutsideHandler, true);
this._areaOutsideHandler = null;
}
},
bindAlarmOutside() {
if (this._alarmOutsideHandler) return;
this._alarmOutsideHandler = (e) => {
const panel = this.$refs.alarmPanel;
if (!panel) return;
if (!panel.contains(e.target)) {
this.alarmCardVisible = false;
this.unbindAlarmOutside();
}
};
document.addEventListener('click', this._alarmOutsideHandler, true);
},
unbindAlarmOutside() {
if (this._alarmOutsideHandler) {
document.removeEventListener('click', this._alarmOutsideHandler, true);
this._alarmOutsideHandler = null;
}
},
closeHandler() {
this.alarmCardVisible = false;
this.unbindAlarmOutside();
}
}
};
</script>
@ -212,14 +357,14 @@ export default { @@ -212,14 +357,14 @@ export default {
}
::v-deep .fks-table {
table {
.cell {
padding: 0 !important;
}
th {
font-size: 12px !important;
padding: 4px 0 !important;
color: #999 !important;
background: #f9f9f9 !important;
.cell {
padding: 0 !important;
}
}
}
}
@ -263,8 +408,7 @@ export default { @@ -263,8 +408,7 @@ export default {
display: block;
width: 100%;
height: 100%;
opacity: 0.4;
background: var(--rect-color);
background: var(--rect-fill);
position: absolute;
top: 0;
left: 0;
@ -287,6 +431,7 @@ export default { @@ -287,6 +431,7 @@ export default {
box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.1);
border-radius: 4px;
background: #fff;
z-index: 1000;
.panel + .panel {
margin-top: 20px;
}
@ -376,18 +521,18 @@ export default { @@ -376,18 +521,18 @@ export default {
}
}
}
.kpi-item-title {
font-family: PingFang SC, PingFang SC;
font-weight: 400;
font-size: 14px;
color: #000000;
margin-bottom: 8px;
}
.kpi-box {
margin-bottom: 12px;
display: flex;
flex-direction: column;
.kpi-item-title {
font-family: PingFang SC, PingFang SC;
font-weight: 400;
font-size: 14px;
color: #000000;
margin-bottom: 8px;
}
.kpi-item-group {
display: flex;
gap: 0 16px;
@ -418,4 +563,16 @@ export default { @@ -418,4 +563,16 @@ export default {
}
}
}
.alarm-card {
position: fixed;
bottom: 60px;
right: 420px;
z-index: 110;
}
.area-card {
position: fixed;
top: 330px;
left: 420px;
z-index: 110;
}
</style>

9
packages/robot-system/src/modules/RobotSystemManage/ScreenViewManage/TaskScreenView/route.js

@ -1,11 +1,12 @@ @@ -1,11 +1,12 @@
const route =
{
path: '/ScreenViewManage',
name: 'ScreenViewManage',
path: '/RobotSystemManage/ScreenViewManage/TaskScreenView',
name: 'TaskScreenView',
component: () => import('./index.vue'),
title: 'SECOND_MENU_ROBOT_TASK_SCREEN_VIEW', // 使用翻译键
title: '大屏任务', // 使用翻译键
// title: 'SECOND_MENU_ROBOT_TASK_SCREEN_VIEW', // 使用翻译键
meta: {
title: 'SECOND_MENU_ROBOT_TASK_SCREEN_VIEW' // 也在meta中使用翻译键
title: '大屏任务' // 也在meta中使用翻译键
}
}

45
packages/robot-system/src/modules/RobotSystemManage/ScreenViewManage/TaskScreenView/utils/index.js

@ -0,0 +1,45 @@ @@ -0,0 +1,45 @@
// 设备列表表格列
export const deviceTableColumns = [
{ label: '设备ID', key: 'name', width: 60 },
{ label: '当前区域', key: 'area', width: 60 },
{ label: '工作人员', key: 'team', width: 60 },
{ label: '今日工作量', key: 'dayWork', width: 60 },
{ label: '今日运行时长(h)', key: 'runtime' }
];
// 设备弹窗表格列
export const devicePopupColumns = [
{ label: '设备编号', key: 'name' },
{ label: '设备类型', key: 'type' },
{ label: '设备位置', key: 'position' },
{ label: '操作人员', key: 'team' },
{ label: '今日安装量', key: 'dayWork' },
{ label: '设备状态', key: 'status' },
{ label: '运行时长(h)', key: 'runtime' }
];
export const areaPopupColumns = [
{ label: '工区编号', key: 'name' },
{ label: '工区状态', key: 'name' },
{ label: '桩条安装数量', key: 'pileCount' },
{ label: '组件安装数量', key: 'moduleCount' }
];
export const alarmTableColumns = [
{ label: '预警类别', key: 'code' },
{ label: '设备编码', key: 'device' },
{ label: '报警内容', key: 'desc' },
{ label: '报警时间', key: 'time' }
];
export const STATUS_STYLE = {
施工中: { stroke: 'rgba(19, 126, 233, 1)', fill: 'rgba(19, 126, 233, 0.4)' },
已施工: { stroke: 'rgba(26, 213, 154, 1)', fill: 'rgba(26, 213, 154, 0.4)' },
未施工: { stroke: 'rgba(255, 188, 72, 1)', fill: 'rgba(255, 188, 72, 0.4)' },
故障: { stroke: 'rgba(219,77,77,1)', fill: 'rgba(219,77,77,0.4)' },
运行中: { stroke: 'rgba(19,194,194,1)', fill: 'rgba(19,194,194,0.4)' },
停机: { stroke: 'rgba(243,180,71,1)', fill: 'rgba(243,180,71,0.4)' }
};
export const isDevice = (item) => {
return ['故障', '运行中', '停机'].includes(item.status);
};
export const isArea = (item) => {
return ['施工中', '已施工', '未施工'].includes(item.status);
};

2
packages/robot-system/src/modules/RobotSystemManage/ScreenViewManage/route.js

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
const route =
{
path: '/ScreenViewManage',
path: '/RobotSystemManage/ScreenViewManage',
name: 'ScreenViewManage',
component: () => import('./index.vue'),
title: 'ScreenViewManage',

2
packages/robot-system/src/modules/RobotSystemManage/route.js

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
const route =
{
path: '/RobotSystemManage',
path: 'RobotSystemManage',
name: 'RobotSystemManage',
component: () => import('./index.vue'),
title: 'RobotSystemManage',

13
packages/robot-system/src/modules/SysConfig/Tenant/index.vue

@ -3,8 +3,8 @@ @@ -3,8 +3,8 @@
* @Version: 1.0
* @Autor: chen_yt
* @Date: 2022-07-11 13:43:40
* @LastEditors: 江荣宝 jiangrongbao@bysoft.com
* @LastEditTime: 2025-05-19 15:15:40
* @LastEditors: XiaoJun
* @LastEditTime: 2025-08-26 17:44:52
-->
<template>
<component :is="getMainComponent"></component>
@ -31,10 +31,11 @@ export default { @@ -31,10 +31,11 @@ export default {
//saas
//saasSAAS_TYPE.NOT_SAAS
beforeRouteEnter(to, from, next) {
if (saasPermission([SAAS_TYPE.TENANT, SAAS_TYPE.NOT_SAAS])) {
next('/404')
return
}
// #delete
// if (saasPermission([SAAS_TYPE.TENANT, SAAS_TYPE.NOT_SAAS])) {
// next('/404')
// return
// }
next()
return
}

1
packages/robot-system/src/modules/systemCheckout/index.vue

@ -234,7 +234,6 @@ export default { @@ -234,7 +234,6 @@ export default {
},
changeSystem(path,name) {
console.log(path,name)
debugger
if(name){
localStorage.setItem('systemname',name.replace(/<br>/g, ''))

172
packages/robot-system/src/router/index.js

@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@
/*
* @Author: wei_jt@ecidi.com
* @Date: 2019-11-01 11:28:49
* @LastEditors: chen_yt
* @LastEditTime: 2022-11-08 14:15:22
* @LastEditors: XiaoJun
* @LastEditTime: 2025-08-26 17:59:16
* @Description: 路由根配置
*/
import Vue from 'vue'
import Router from 'vue-router'
import { addAlias } from '@/utils/route'
import Vue from 'vue';
import Router from 'vue-router';
import { addAlias } from '@/utils/route';
Vue.use(Router)
Vue.use(Router);
/**
* Note: sub-menu only appear when route children.length >= 1
@ -72,12 +72,12 @@ export const constantRoutes = [ @@ -72,12 +72,12 @@ export const constantRoutes = [
}
]
}
]
];
/**
* @description: 被qiankun访问时加载
* @description: 被qiankun访问时加载
*/
export const microappRoutes = []
export const microappRoutes = [];
/**
* @description: 非qiankun下加载
@ -90,7 +90,7 @@ export const independentRoutes = [ @@ -90,7 +90,7 @@ export const independentRoutes = [
},
{
path: '/distribute',
name:'distribute',
name: 'distribute',
component: () => import('@/modules/Error/distribute'),
meta: { config: ['fullScreen'], keepOrigin: true }
},
@ -119,8 +119,7 @@ export const independentRoutes = [ @@ -119,8 +119,7 @@ export const independentRoutes = [
{
path: '/unified',
name: 'unified',
component: () =>
import('@/modules/UnifiedAuthentication/UnifiedLogin/index'),
component: () => import('@/modules/UnifiedAuthentication/UnifiedLogin/index'),
meta: { config: ['fullScreen'] }
},
//统一认证-单点登录登录
@ -134,8 +133,7 @@ export const independentRoutes = [ @@ -134,8 +133,7 @@ export const independentRoutes = [
{
path: '/authenticationSuccess',
name: 'authenticationSuccess',
component: () =>
import('@/modules/UnifiedAuthentication/authenticationSuccess/index'),
component: () => import('@/modules/UnifiedAuthentication/authenticationSuccess/index'),
meta: { config: ['fullScreen'] }
},
//回调跳转内部系统示例
@ -200,61 +198,81 @@ export const independentRoutes = [ @@ -200,61 +198,81 @@ export const independentRoutes = [
{
path: 'profile',
name: 'privacyCenter',
component: () =>
import('@/modules/PersonalCenter/PrivacyCenter/index.vue'),
component: () => import('@/modules/PersonalCenter/PrivacyCenter/index.vue'),
title: 'PERSONAL_CENTER'
},
{
path: 'message',
name: 'MessageCenter',
component: () =>
import('@/modules/PersonalCenter/MessageCenter/index.vue'),
component: () => import('@/modules/PersonalCenter/MessageCenter/index.vue'),
title: 'MESSAGE_CENTER'
}
]
},
{
path: '/error',
name: 'error',
redirect: '/404',
component: () => import('@/modules/Error/index.vue'),
meta: { config: ['fullScreen'] },
path: 'RobotSystemManage',
name: 'RobotSystemManage',
component: () => import('@/modules/RobotSystemManage/index.vue'),
title: 'RobotSystemManage',
children: [
{
name: '404',
path: '/404',
component: () => import('@/modules/Error/Error.vue'),
props: { type: 404 },
meta: { config: ['fullScreen'] }
},
{
name: '403',
path: '/403',
component: () => import('@/modules/Error/Error.vue'),
props: { type: 403 },
meta: { config: ['fullScreen'] }
},
{
name: '500',
path: '/500',
component: () => import('@/modules/Error/Error.vue'),
props: { type: 500 },
meta: { config: ['fullScreen'] }
path: '/RobotSystemManage/ScreenViewManage',
name: 'ScreenViewManage',
component: () => import('@/modules/RobotSystemManage/ScreenViewManage/index.vue'),
title: 'ScreenViewManage',
children: [
{
path: '/RobotSystemManage/ScreenViewManage/TaskScreenView',
name: 'TaskScreenView',
component: () => import('@/modules/RobotSystemManage/ScreenViewManage/TaskScreenView/index.vue'),
title: '大屏任务'
}
]
}
]
}
]
// {
// path: '/error',
// name: 'error',
// redirect: '/404',
// component: () => import('@/modules/Error/index.vue'),
// meta: { config: ['fullScreen'] },
// children: [
// {
// name: '404',
// path: '/404',
// component: () => import('@/modules/Error/Error.vue'),
// props: { type: 404 },
// meta: { config: ['fullScreen'] }
// },
// {
// name: '403',
// path: '/403',
// component: () => import('@/modules/Error/Error.vue'),
// props: { type: 403 },
// meta: { config: ['fullScreen'] }
// },
// {
// name: '500',
// path: '/500',
// component: () => import('@/modules/Error/Error.vue'),
// props: { type: 500 },
// meta: { config: ['fullScreen'] }
// }
// ]
// }
];
export function createRouter() {
//作为子应用运行时不加载基础路由
let newBaseRoutes = Vue.prototype.$InQianKun ? microappRoutes : independentRoutes
let newBaseRoutes = Vue.prototype.$InQianKun ? microappRoutes : independentRoutes;
//加载自定义路由
newBaseRoutes = newBaseRoutes.concat(constantRoutes)
newBaseRoutes = newBaseRoutes.concat(constantRoutes);
if (Vue.prototype.$subApp) {
for (let i = 0; i < newBaseRoutes.length; i++) {
addAlias(newBaseRoutes[i])
addAlias(newBaseRoutes[i]);
}
}
return new Router({
@ -264,85 +282,77 @@ export function createRouter() { @@ -264,85 +282,77 @@ export function createRouter() {
}),
routes: [...newBaseRoutes]
// base:'app'
})
});
}
// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
export function resetRouter() {
let newRouter = createRouter()
router.matcher = newRouter.matcher // reset router
newRouter = null
let newRouter = createRouter();
router.matcher = newRouter.matcher; // reset router
newRouter = null;
}
export function setRoutes(routes) {
resetRouter()
resetRouter();
if (Vue.prototype.$subApp) {
for (let i = 0; i < routes.length; i++) {
addAlias(routes[i])
addAlias(routes[i]);
}
}
if (router.addRoutes) {
router.addRoutes(routes)
return
router.addRoutes(routes);
return;
}
routes.forEach(item => router.addRoute(item))
routes.forEach((item) => router.addRoute(item));
}
// 重写Push方法
const originalPush = Router.prototype.push
const originalPush = Router.prototype.push;
Router.prototype.push = function push(location, onResolve, onReject) {
let prefix = Vue.prototype.$appBasePath
let prefix = Vue.prototype.$appBasePath;
if (typeof location === 'string' && !location.includes(prefix)) {
location = prefix + location
location = prefix + location;
}
if (
typeof location === 'object' &&
!location.name &&
!location.path.includes(prefix)
) {
if (typeof location === 'object' && !location.name && !location.path.includes(prefix)) {
if (!(location.meta?.keepOrigin || location.query?.keepOrigin)) {
location.path = prefix + location.path
location.path = prefix + location.path;
}
}
if (onResolve || onReject) {
return originalPush.call(this, location, onResolve, onReject)
return originalPush.call(this, location, onResolve, onReject);
}
return originalPush.call(this, location).catch((err) => err)
}
return originalPush.call(this, location).catch((err) => err);
};
//重写Replace方法
const originalReplace = Router.prototype.replace
const originalReplace = Router.prototype.replace;
Router.prototype.replace = function replace(location, onResolve, onReject) {
let prefix = Vue.prototype.$appBasePath
let prefix = Vue.prototype.$appBasePath;
if (typeof location === 'string' && !location.includes(prefix)) {
location = prefix + location
location = prefix + location;
}
if (
typeof location === 'object' &&
!location.name &&
!location.path.includes(prefix)
) {
if (typeof location === 'object' && !location.name && !location.path.includes(prefix)) {
if (!(location.meta?.keepOrigin || location.query?.keepOrigin)) {
location.path = prefix + location.path
location.path = prefix + location.path;
}
}
if (onResolve || onReject) {
return originalReplace.call(this, location, onResolve, onReject)
return originalReplace.call(this, location, onResolve, onReject);
}
return originalReplace.call(this, location).catch((err) => err)
}
return originalReplace.call(this, location).catch((err) => err);
};
const router = createRouter()
const router = createRouter();
export default router
export default router;

15
packages/robot-system/src/routerGuards.js

@ -3,8 +3,8 @@ @@ -3,8 +3,8 @@
* @Version: 1.0
* @Autor: chen_yt
* @Date: 2022-03-09 14:34:47
* @LastEditors: gaochao && bysft
* @LastEditTime: 2024-11-15 17:17:18
* @LastEditors: XiaoJun
* @LastEditTime: 2025-08-26 17:42:50
*/
import NProgress from 'nprogress' // progress bar
import 'nprogress/nprogress.css' // progress bar style
@ -108,11 +108,12 @@ class normalBeforeGuards { @@ -108,11 +108,12 @@ class normalBeforeGuards {
}
//校验密码
let status = await checkPwdStatus()
if (status) {
this.next({ path: status, replace: true })
return true
}
// let status = await checkPwdStatus()
// #delete 后续删除
// if (status) {
// this.next({ path: status, replace: true })
// return true
// }
this.next({ ...this.to, replace: true })
return true

13
packages/robot-system/src/saas/mixins.js

@ -3,8 +3,8 @@ @@ -3,8 +3,8 @@
* @Version: 1.0
* @Autor: chen_yt
* @Date: 2022-06-01 14:44:06
* @LastEditors: chen_yt
* @LastEditTime: 2022-06-23 14:41:18
* @LastEditors: XiaoJun
* @LastEditTime: 2025-08-26 17:44:38
*/
import { saasPermission } from './util'
import { SAAS_TYPE } from '@/config/enums'
@ -12,10 +12,11 @@ import { SAAS_TYPE } from '@/config/enums' @@ -12,10 +12,11 @@ import { SAAS_TYPE } from '@/config/enums'
export default {
beforeRouteEnter(to, from, next) {
if (saasPermission([SAAS_TYPE.TENANT])) {
next('/404')
return
}
// #delete 后续删除
// if (saasPermission([SAAS_TYPE.TENANT])) {
// next('/404')
// return
// }
next()
return

7
packages/robot-system/src/utils/request/index.js

@ -1,8 +1,8 @@ @@ -1,8 +1,8 @@
/*
* @Author: wei_jt@ecidi.com
* @Date: 2019-11-01 11:53:07
* @LastEditors: zhong_m
* @LastEditTime: 2022-11-22 10:50:45
* @LastEditors: XiaoJun
* @LastEditTime: 2025-08-26 17:25:18
* @Description: 封装axios
*/
import axios from 'axios'
@ -38,6 +38,7 @@ const request = axios.create({ @@ -38,6 +38,7 @@ const request = axios.create({
// request interceptor
request.interceptors.request.use(
config => {
return
let FawkesBiz = {}
// 通过请求头传递时区
if (store.getters[types.TIMEZONE]) {
@ -143,6 +144,7 @@ request.interceptors.response.use( @@ -143,6 +144,7 @@ request.interceptors.response.use(
* You can also judge the status by HTTP Status Code
*/
response => {
throw new Error('test')
responseEncryptMap.get(response.config.url) && (response = decrypt(response))
if (response.config.responseType == 'blob') {
@ -170,6 +172,7 @@ request.interceptors.response.use( @@ -170,6 +172,7 @@ request.interceptors.response.use(
},
error => {
throw new Error('test')
let message = ''
if (error.response) {
switch (error.response.status) {

5
packages/robot-system/src/utils/route/index.js

@ -1,8 +1,8 @@ @@ -1,8 +1,8 @@
/*
* @Author: wei_jt@ecidi.com
* @Date: 2020-08-27 20:29:37
* @LastEditors: chen_yt
* @LastEditTime: 2022-09-06 15:49:49
* @LastEditors: XiaoJun
* @LastEditTime: 2025-08-26 17:51:28
* @Description: 路由加载
*/
import { setRoutes } from '@/router'
@ -25,6 +25,7 @@ import { addWildcard, filterSubRoute, importComponent, addAlias } from './extra' @@ -25,6 +25,7 @@ import { addWildcard, filterSubRoute, importComponent, addAlias } from './extra'
*/
const getLocalRoutes = async function () {
let routes = []
return false
const reqs = require.context('@/modules', true, /route\.js$/, 'lazy')
//根据路径载入route文件

Loading…
Cancel
Save