修改路由

master
夜笙歌 9 months ago
parent 4f3098b9c1
commit 3d19ecb41a

@ -353,6 +353,48 @@
"value17": "100", "value17": "100",
"value18": "100", "value18": "100",
"value19": "100" "value19": "100"
},
{
"value1": "11",
"value2": "A-06",
"value3": "生产中",
"value4": "1000",
"value5": "1000%",
"value6": "100%",
"value7": "100",
"value8": "100",
"value9": "100",
"value10": "100",
"value11": "100",
"value12": "100",
"value13": "100",
"value14": "100",
"value15": "100",
"value16": "100",
"value17": "100",
"value18": "100",
"value19": "100"
},
{
"value1": "12",
"value2": "A-06",
"value3": "生产中",
"value4": "1000",
"value5": "1000%",
"value6": "100%",
"value7": "100",
"value8": "100",
"value9": "100",
"value10": "100",
"value11": "100",
"value12": "100",
"value13": "100",
"value14": "100",
"value15": "100",
"value16": "100",
"value17": "100",
"value18": "100",
"value19": "100"
} }
], ],
"table31": [ "table31": [

@ -16,3 +16,11 @@ export function generalInterfaceList(query) {
data: query data: query
}) })
} }
export function getSimulateData(query) {
return request({
url: '/base/customData/list',
method: 'get',
params: {customType: 1, ...query}
})
}

@ -1,7 +0,0 @@
import request from '@/utils/request'

@ -0,0 +1,24 @@
import {generalInterfaceList, getSimulateData} from '@/api/board/getData'
export function mixData(params) {
getSimulateData({customCode: params?.e || ''}).then(val => {
if (val.rows.length > 0 && val.rows[0].isFlag === 0) {
let data = JSON.parse(val.rows[0].customData);
(params?.f || (() => {
}))(data)
} else {
generalInterfaceList({
method: params?.i || ''
}).then(val2 => {
(params?.f || (() => {
}))(val2)
})
}
})
}

@ -40,8 +40,6 @@ const permission = {
const rdata = JSON.parse(JSON.stringify(res.data)) const rdata = JSON.parse(JSON.stringify(res.data))
const sidebarRoutes = filterAsyncRouter(sdata) const sidebarRoutes = filterAsyncRouter(sdata)
const rewriteRoutes = filterAsyncRouter(rdata, false, true) const rewriteRoutes = filterAsyncRouter(rdata, false, true)
console.log('sidebarRoutes',sidebarRoutes)
console.log('rewriteRoutes',rewriteRoutes)
const asyncRoutes = filterDynamicRoutes(dynamicRoutes); const asyncRoutes = filterDynamicRoutes(dynamicRoutes);
rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true }) rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
router.addRoutes(asyncRoutes); router.addRoutes(asyncRoutes);
@ -88,7 +86,6 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
} }
return true return true
}) })
console.log('data',data)
return data return data
} }

@ -138,7 +138,7 @@
<el-input v-model="form.customFunction" placeholder="请输入自定义功能" :disabled="editDisabled"/> <el-input v-model="form.customFunction" placeholder="请输入自定义功能" :disabled="editDisabled"/>
</el-form-item> </el-form-item>
<el-form-item label="自定义编号" prop="customCode"> <el-form-item label="自定义编号" prop="customCode">
<el-input v-model="form.customCode" placeholder="请输入自定义编号" :disabled="editDisabled"/> <el-input v-model="form.customCode" placeholder="请输入自定义编号" />
</el-form-item> </el-form-item>
<el-form-item label="自定义数据" prop="customData"> <el-form-item label="自定义数据" prop="customData">
<el-input v-model="form.customData" type="textarea" placeholder="请输入内容"/> <el-input v-model="form.customData" type="textarea" placeholder="请输入内容"/>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -4,7 +4,7 @@
<div class="topNum team">{{ team }}</div> <div class="topNum team">{{ team }}</div>
<div class="topNum planNum">{{ planNum }}</div> <div class="topNum planNum">{{ planNum }}</div>
<div class="topNum practicalNum">{{ practicalNum }}</div> <div class="topNum practicalNum">{{ practicalNum }}</div>
<div class="topNum differenceValue">{{ differenceValue }}</div> <div class="topNum differenceValue">{{ practicalNum - planNum }}</div>
<div class="title" v-for="(i,k) in title" <div class="title" v-for="(i,k) in title"
:style="'top:'+(titlePosition[k]&&titlePosition[k].top||0)+'%;left:'+(titlePosition[k]&&titlePosition[k].left||0)+'%'"> :style="'top:'+(titlePosition[k]&&titlePosition[k].top||0)+'%;left:'+(titlePosition[k]&&titlePosition[k].left||0)+'%'">
{{ i }} {{ i }}
@ -93,7 +93,10 @@
import vueSeamlessScroll from "vue-seamless-scroll"; import vueSeamlessScroll from "vue-seamless-scroll";
import Chart from "../../../components/board/Chart"; import Chart from "../../../components/board/Chart";
import * as echarts from 'echarts' import * as echarts from 'echarts'
import {getData, generalInterfaceList} from '@/api/board/getData' import {getData, generalInterfaceList, getSimulateData} from '@/api/board/getData'
import {mixData} from '@/api/board/mixData'
const vw = (document.documentElement.clientWidth || document.body.clientWidth) / 100
export default { export default {
components: { components: {
@ -110,9 +113,9 @@ export default {
'泡前库存统计', '泡前库存统计',
'箱体发泡实时状态', '箱体发泡实时状态',
], ],
meter: 30, meter: 0,
linerNum: 50, linerNum: 0,
caseNum: 44, caseNum: 0,
titlePosition: [ titlePosition: [
{ {
top: 19.8, top: 19.8,
@ -135,10 +138,9 @@ export default {
left: 68.5 left: 68.5
}, },
], ],
team: '白班', team: '',
planNum: 1000, planNum: 0,
practicalNum: 1000, practicalNum: 0,
differenceValue: 1000,
scrollTableOption: { scrollTableOption: {
step: 0.5, step: 0.5,
limitMoveNum: 9999999999, limitMoveNum: 9999999999,
@ -150,417 +152,469 @@ export default {
waitTime: 0, waitTime: 0,
}, },
scrollTableData: [], scrollTableData: [],
RequestDataSet: [
} {
}, e: 'nd-01',
mounted() { i: "",
const vw = (document.documentElement.clientWidth || document.body.clientWidth) / 100 f: (e) => {
generalInterfaceList({ this.team = e
"method": "SCADA_INV_STATS_01('')" }
}).then(e => {
console.log(e)
})
generalInterfaceList({
"method": "SCADA_INV_STATS_SUM('')"
}).then(e => {
console.log(e)
})
generalInterfaceList({
"method": "scada_inv_stats_02('')"
}).then(e => {
console.log(e)
})
generalInterfaceList({
"method": "scada_in_store_01('')"
}).then(e => {
console.log(e)
})
generalInterfaceList({
"method": "scada_xk_pro_01('')"
}).then(e => {
console.log(e)
})
getData().then(e => {
this.scrollTableData = e.table1
this.$refs.chart1.setData({
tooltip: {
trigger: "axis",
axisPointer: {
//
type: "shadow", // 线'line' | 'shadow'
},
}, },
grid: { {
left: "0", e: 'nd-02',
right: "4%", i: "",
bottom: "0", f: (e) => {
top: 20, this.planNum = e
containLabel: true, }
}, },
xAxis: { {
type: "category", e: 'nd-03',
data: e.liner.ImportAndExportStatistics.x, i: "",
axisLine: { f: (e) => {
lineStyle: { this.practicalNum = e
color: "white", console.log(e)
}, }
},
axisLabel: {
// interval: 0,
// rotate: 40,
textStyle: {
fontFamily: "Microsoft YaHei",
},
},
}, },
{
yAxis: { e: 'nd-04',
type: "value", i: "",
axisLine: { f: (e) => {
show: false, this.scrollTableData = e
lineStyle: { }
color: "white",
},
},
splitLine: {
show: false,
},
axisLabel: {},
}, },
series: [ {
{ e: 'nd-05',
name: e.liner.ImportAndExportStatistics.y[0].name, i: "",
label: { f: (e) => {
normal: { this.$refs.chart1.setData({
show: true, tooltip: {
position: "top", trigger: "axis",
textStyle: { axisPointer: {
color: "#a8aab0", //
fontStyle: "normal", type: "shadow", // 线'line' | 'shadow'
fontFamily: "微软雅黑",
fontSize: 0.75 * vw,
}, },
}, },
}, grid: {
type: "bar", left: "0",
barWidth: "30%", right: "4%",
barMaxWidth: 50, bottom: "0",
itemStyle: { top: 20,
normal: { containLabel: true,
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ },
{ xAxis: {
offset: 0, type: "category",
color: "#39ffff", data: e.x,
axisLine: {
lineStyle: {
color: "white",
}, },
{ },
offset: 1, axisLabel: {
color: "#5affa6", // interval: 0,
// rotate: 40,
textStyle: {
fontFamily: "Microsoft YaHei",
}, },
]), },
}, },
},
data: e.liner.ImportAndExportStatistics.y[0].data,
},
],
})
this.$refs.chart2.setData({
tooltip: {
trigger: "axis",
axisPointer: {
//
type: "shadow", // 线'line' | 'shadow'
},
},
grid: {
left: "0",
right: "4%",
bottom: "0",
top: 20,
containLabel: true,
},
legend: {
data: e.liner.inventoryStatus.y.map(val => val.name),
right: 'center',
top: 0,
textStyle: {
color: "#fff",
},
itemWidth: 12,
itemHeight: 10,
// itemGap: 35
},
xAxis: {
type: "category",
data: e.liner.inventoryStatus.x,
axisLine: {
lineStyle: {
color: "white",
},
},
axisLabel: {
// interval: 0,
// rotate: 40,
textStyle: {
fontFamily: "Microsoft YaHei",
},
},
},
yAxis: { yAxis: {
type: "value", type: "value",
axisLine: { axisLine: {
show: false, show: false,
lineStyle: { lineStyle: {
color: "white", color: "white",
}, },
}, },
splitLine: { splitLine: {
show: false, show: false,
},
axisLabel: {},
},
series: [
{
name: e.liner.inventoryStatus.y[0].name,
type: "bar",
barWidth: "30%",
barMaxWidth: 50,
label: {
normal: {
show: true,
position: "top",
textStyle: {
color: "#a8aab0",
fontStyle: "normal",
fontFamily: "微软雅黑",
fontSize: 0.75 * vw,
}, },
axisLabel: {},
}, },
}, series: [
itemStyle: { {
normal: { name: e.y[0].name,
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ label: {
{ normal: {
offset: 0, show: true,
color: "#39ffff", position: "top",
textStyle: {
color: "#a8aab0",
fontStyle: "normal",
fontFamily: "微软雅黑",
fontSize: 0.75 * vw,
},
},
}, },
{ type: "bar",
offset: 1, barWidth: "30%",
color: "#5affa6", barMaxWidth: 50,
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "#39ffff",
},
{
offset: 1,
color: "#5affa6",
},
]),
},
}, },
]), data: e.y[0].data,
},
],
})
}
},
{
e: 'nd-06',
i: "",
f: (e) => {
this.meter = e
}
},
{
e: 'nd-07',
i: "SCADA_INV_STATS_01('')",
f: (e) => {
this.$refs.chart2.setData({
tooltip: {
trigger: "axis",
axisPointer: {
//
type: "shadow", // 线'line' | 'shadow'
},
},
grid: {
left: "0",
right: "4%",
bottom: "0",
top: 20,
containLabel: true,
}, },
}, legend: {
data: e.liner.inventoryStatus.y[0].data, data: e.y.map(val => val.name),
}, right: 'center',
{ top: 0,
name: e.liner.inventoryStatus.y[1].name,
type: "bar",
barWidth: "30%",
barMaxWidth: 50,
label: {
normal: {
show: true,
position: "top",
textStyle: { textStyle: {
color: "#a8aab0", color: "#fff",
fontStyle: "normal",
fontFamily: "微软雅黑",
fontSize: 0.75 * vw,
}, },
itemWidth: 12,
itemHeight: 10,
// itemGap: 35
}, },
}, xAxis: {
itemStyle: { type: "category",
normal: { data: e.x,
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ axisLine: {
{ lineStyle: {
offset: 0, color: "white",
color: "#4adfff",
}, },
{ },
offset: 1, axisLabel: {
color: "#3d7aff", // interval: 0,
// rotate: 40,
textStyle: {
fontFamily: "Microsoft YaHei",
}, },
]), },
}, },
},
data: e.liner.inventoryStatus.y[1].data,
},
],
})
this.$refs.chart3.setData({
tooltip: {
trigger: "axis",
axisPointer: {
//
type: "shadow", // 线'line' | 'shadow'
},
},
grid: {
left: "0",
right: "4%",
bottom: "0",
top: 20,
containLabel: true,
},
xAxis: {
type: "category",
data: e.liner.inventoryStatistics.x,
axisLine: {
lineStyle: {
color: "white",
},
},
axisLabel: {
// interval: 0,
// rotate: 40,
textStyle: {
fontFamily: "Microsoft YaHei",
},
},
},
yAxis: { yAxis: {
type: "value", type: "value",
axisLine: { axisLine: {
show: false, show: false,
lineStyle: { lineStyle: {
color: "white", color: "white",
}, },
}, },
splitLine: { splitLine: {
show: false, show: false,
},
axisLabel: {},
},
series: [
{
name: e.liner.inventoryStatistics.y.name,
type: "bar",
barWidth: "30%",
label: {
normal: {
show: true,
position: "top",
textStyle: {
color: "#a8aab0",
fontStyle: "normal",
fontFamily: "微软雅黑",
fontSize: 0.75 * vw,
}, },
axisLabel: {},
}, },
}, series: [
barMaxWidth: 50, {
itemStyle: { name: e.y[0].name,
normal: { type: "bar",
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ barWidth: "30%",
{ barMaxWidth: 50,
offset: 0, label: {
color: "#4adfff", normal: {
show: true,
position: "top",
textStyle: {
color: "#a8aab0",
fontStyle: "normal",
fontFamily: "微软雅黑",
fontSize: 0.75 * vw,
},
},
}, },
{ itemStyle: {
offset: 1, normal: {
color: "#3d7aff", color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "#39ffff",
},
{
offset: 1,
color: "#5affa6",
},
]),
},
}, },
]), data: e.y[0].data,
}, },
}, {
data: e.liner.inventoryStatistics.y.data, name: e.y[1].name,
}, type: "bar",
], barWidth: "30%",
}) barMaxWidth: 50,
this.$refs.chart4.setData({ label: {
legend: { normal: {
data: ['运行中夹具数量'], show: true,
right: 'center', position: "top",
top: 0, textStyle: {
textStyle: { color: "#a8aab0",
color: "#fff", fontStyle: "normal",
}, fontFamily: "微软雅黑",
itemWidth: 12, fontSize: 0.75 * vw,
itemHeight: 10, },
// itemGap: 35 },
}, },
tooltip: { itemStyle: {
trigger: "axis", normal: {
axisPointer: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
// {
type: "shadow", // 线'line' | 'shadow' offset: 0,
}, color: "#4adfff",
},
{
offset: 1,
color: "#3d7aff",
},
]),
},
},
data: e.y[1].data,
},
],
})
}
}, },
grid: { {
left: "0", e: 'nd-08',
right: "4%", i: "",
bottom: "0", f: (e) => {
top: 20, this.linerNum = e
containLabel: true, }
}, },
xAxis: { {
type: "category", e: 'nd-09',
data: e.liner.foamFixtureState.x, i: "",
axisLine: { f: (e) => {
lineStyle: { this.caseNum = e
color: "white", }
},
},
axisLabel: {
// interval: 0,
// rotate: 40,
textStyle: {
fontFamily: "Microsoft YaHei",
},
},
}, },
{
e: 'nd-10',
i: "",
f: (e) => {
this.$refs.chart3.setData({
tooltip: {
trigger: "axis",
axisPointer: {
//
type: "shadow", // 线'line' | 'shadow'
},
},
grid: {
left: "0",
right: "4%",
bottom: "0",
top: 20,
containLabel: true,
},
xAxis: {
type: "category",
data: e.x,
axisLine: {
lineStyle: {
color: "white",
},
},
axisLabel: {
// interval: 0,
// rotate: 40,
textStyle: {
fontFamily: "Microsoft YaHei",
},
},
},
yAxis: { yAxis: {
type: "value", type: "value",
axisLine: { axisLine: {
show: false, show: false,
lineStyle: { lineStyle: {
color: "white", color: "white",
}, },
}, },
splitLine: { splitLine: {
show: false, show: false,
}, },
axisLabel: {}, axisLabel: {},
},
series: [
{
name: e.y.name,
type: "bar",
barWidth: "30%",
label: {
normal: {
show: true,
position: "top",
textStyle: {
color: "#a8aab0",
fontStyle: "normal",
fontFamily: "微软雅黑",
fontSize: 0.75 * vw,
},
},
},
barMaxWidth: 50,
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "#4adfff",
},
{
offset: 1,
color: "#3d7aff",
},
]),
},
},
data: e.y.data,
},
],
})
console.log(e)
}
}, },
series: [ {
{ e: 'nd-11',
name: e.liner.foamFixtureState.y.name, i: "",
type: "bar", f: (e) => {
barWidth: '30%', this.$refs.chart4.setData({
barMaxWidth: 50, legend: {
label: { data: ['运行中夹具数量'],
normal: { right: 'center',
show: true, top: 0,
position: "top",
textStyle: { textStyle: {
color: "#a8aab0", color: "#fff",
fontStyle: "normal", },
fontFamily: "微软雅黑", itemWidth: 12,
fontSize: 0.75 * vw, itemHeight: 10,
// itemGap: 35
},
tooltip: {
trigger: "axis",
axisPointer: {
//
type: "shadow", // 线'line' | 'shadow'
}, },
}, },
}, grid: {
itemStyle: { left: "0",
normal: { right: "4%",
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ bottom: "0",
{ top: 20,
offset: 0, containLabel: true,
color: "#4adfff", },
xAxis: {
type: "category",
data: e.x,
axisLine: {
lineStyle: {
color: "white",
},
},
axisLabel: {
// interval: 0,
// rotate: 40,
textStyle: {
fontFamily: "Microsoft YaHei",
}, },
{ },
offset: 1, },
color: "#3d7aff",
yAxis: {
type: "value",
axisLine: {
show: false,
lineStyle: {
color: "white",
}, },
]), },
splitLine: {
show: false,
},
axisLabel: {},
}, },
}, series: [
data: e.liner.foamFixtureState.y.data, {
name: e.y.name,
type: "bar",
barWidth: '30%',
barMaxWidth: 50,
label: {
normal: {
show: true,
position: "top",
textStyle: {
color: "#a8aab0",
fontStyle: "normal",
fontFamily: "微软雅黑",
fontSize: 0.75 * vw,
},
},
},
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "#4adfff",
},
{
offset: 1,
color: "#3d7aff",
},
]),
},
},
data: e.y.data,
}
]
})
console.log(e)
} }
] },
}) ]
}
},
mounted() {
this.RequestDataSet.forEach(val => {
mixData(val)
}) })
}, },
methods: {} methods: {}

Loading…
Cancel
Save