Compare commits
No commits in common. "b4985d4018a26df3dcb4f4206b18642e335ffde2" and "eaf00466db840b1f2bce2c54a732fc88a41f414f" have entirely different histories.
b4985d4018
...
eaf00466db
@ -34,7 +34,6 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
style="font-size: 24px; color: white; margin-right: 30px"
|
style="font-size: 24px; color: white; margin-right: 30px"
|
||||||
:disabled="!permission"
|
|
||||||
@click="goDetail">
|
@click="goDetail">
|
||||||
<svg-icon icon-class="list"></svg-icon>
|
<svg-icon icon-class="list"></svg-icon>
|
||||||
详细
|
详细
|
||||||
@ -274,7 +273,7 @@ export default {
|
|||||||
this.showTime = moment(new Date()).subtract(0, 'days').format('YYYY-MM-DD');
|
this.showTime = moment(new Date()).subtract(0, 'days').format('YYYY-MM-DD');
|
||||||
getUserProfile().then((response) => {
|
getUserProfile().then((response) => {
|
||||||
this.user = response.data;
|
this.user = response.data;
|
||||||
if (this.user.roles[0].name !== 'dashborad') {
|
if (this.user.nickname !== '技术中心') {
|
||||||
this.permission = true;
|
this.permission = true;
|
||||||
this.getData();
|
this.getData();
|
||||||
} else {
|
} else {
|
||||||
|
@ -42,7 +42,7 @@ export default {
|
|||||||
this.chart = null;
|
this.chart = null;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initChart(permission) {
|
initChart() {
|
||||||
var option = {
|
var option = {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
@ -231,9 +231,7 @@ export default {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
if(permission){
|
|
||||||
option.series[2]=[]
|
|
||||||
}
|
|
||||||
if (this.chart) {
|
if (this.chart) {
|
||||||
this.chart.setOption(option);
|
this.chart.setOption(option);
|
||||||
} else {
|
} else {
|
||||||
|
@ -140,7 +140,6 @@ import screenfull from 'screenfull';
|
|||||||
import { debounce } from '@/utils/debounce';
|
import { debounce } from '@/utils/debounce';
|
||||||
import baseTable from '../components/baseTable.vue';
|
import baseTable from '../components/baseTable.vue';
|
||||||
import BarChart from './BarChart.vue';
|
import BarChart from './BarChart.vue';
|
||||||
import { getUserProfile } from '@/api/system/user';
|
|
||||||
|
|
||||||
const tableProps1 = [
|
const tableProps1 = [
|
||||||
{
|
{
|
||||||
@ -247,21 +246,11 @@ export default {
|
|||||||
tableProps2,
|
tableProps2,
|
||||||
tableData2: [],
|
tableData2: [],
|
||||||
echartData: [],
|
echartData: [],
|
||||||
permission: false,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.init();
|
this.init();
|
||||||
this.permission = false;
|
this.initWebSocket();
|
||||||
getUserProfile().then((response) => {
|
|
||||||
const user = response.data;
|
|
||||||
if (user.roles[0].name !== 'dashborad') {
|
|
||||||
this.permission = true;
|
|
||||||
} else {
|
|
||||||
this.permission = false;
|
|
||||||
}
|
|
||||||
this.initWebSocket();
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
destroy() {
|
destroy() {
|
||||||
this.destroy();
|
this.destroy();
|
||||||
@ -352,36 +341,17 @@ export default {
|
|||||||
// 数据接收
|
// 数据接收
|
||||||
if ('factoryState' in dataJson) {
|
if ('factoryState' in dataJson) {
|
||||||
this.topData = dataJson.factoryState;
|
this.topData = dataJson.factoryState;
|
||||||
if(!this.permission){
|
|
||||||
this.topData.monthAreaCost = '***'
|
|
||||||
this.topData.monthSum = '***'
|
|
||||||
this.topData.yestodaySum = '***'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if ('factoryCostTableList' in dataJson) {
|
if ('factoryCostTableList' in dataJson) {
|
||||||
this.tableData1 = dataJson.factoryCostTableList;
|
this.tableData1 = dataJson.factoryCostTableList;
|
||||||
if(!this.permission){
|
|
||||||
this.tableData1.forEach(item=>{
|
|
||||||
item.priceS = null
|
|
||||||
item.matPriceS = null
|
|
||||||
item.energyPriceS = null
|
|
||||||
item.otherPriceS = null
|
|
||||||
item.areaPriceS = null
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if ('factoryEnergyTableList' in dataJson) {
|
if ('factoryEnergyTableList' in dataJson) {
|
||||||
this.tableData2 = dataJson.factoryEnergyTableList;
|
this.tableData2 = dataJson.factoryEnergyTableList;
|
||||||
if(!this.permission){
|
|
||||||
this.tableData2.forEach(item=>{
|
|
||||||
item.price = null
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if ('factoryCostTrendList' in dataJson) {
|
if ('factoryCostTrendList' in dataJson) {
|
||||||
this.echartData = dataJson.factoryCostTrendList;
|
this.echartData = dataJson.factoryCostTrendList;
|
||||||
this.$nextTick(()=>{
|
this.$nextTick(()=>{
|
||||||
this.$refs.chartRef.initChart(!this.permission);
|
this.$refs.chartRef.initChart();
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -48,7 +48,7 @@ export default {
|
|||||||
this.chart = null;
|
this.chart = null;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initChart(permission) {
|
initChart() {
|
||||||
var option = {
|
var option = {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
@ -292,9 +292,6 @@ export default {
|
|||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
if(permission){
|
|
||||||
option.series[1]=[]
|
|
||||||
}
|
|
||||||
if (this.chart) {
|
if (this.chart) {
|
||||||
this.chart.setOption(option);
|
this.chart.setOption(option);
|
||||||
} else {
|
} else {
|
||||||
|
@ -110,7 +110,6 @@ import { debounce } from '@/utils/debounce';
|
|||||||
import baseTable from '../components/baseTable.vue';
|
import baseTable from '../components/baseTable.vue';
|
||||||
import BarChart from './BarChart.vue';
|
import BarChart from './BarChart.vue';
|
||||||
import interval from './interval.vue';
|
import interval from './interval.vue';
|
||||||
import { getUserProfile } from '@/api/system/user';
|
|
||||||
|
|
||||||
const tableProps1 = [
|
const tableProps1 = [
|
||||||
{
|
{
|
||||||
@ -225,22 +224,12 @@ export default {
|
|||||||
tableData2: [],
|
tableData2: [],
|
||||||
tableProps3,
|
tableProps3,
|
||||||
tableData3: [],
|
tableData3: [],
|
||||||
echartData: [],
|
echartData: []
|
||||||
permission: false,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.init();
|
this.init();
|
||||||
this.permission = false;
|
this.initWebSocket();
|
||||||
getUserProfile().then((response) => {
|
|
||||||
const user = response.data;
|
|
||||||
if (user.roles[0].name !== 'dashborad') {
|
|
||||||
this.permission = true;
|
|
||||||
} else {
|
|
||||||
this.permission = false;
|
|
||||||
}
|
|
||||||
this.initWebSocket();
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
destroy() {
|
destroy() {
|
||||||
this.destroy();
|
this.destroy();
|
||||||
@ -330,27 +319,12 @@ export default {
|
|||||||
// 数据接收
|
// 数据接收
|
||||||
if ('DeepState' in dataJson) {
|
if ('DeepState' in dataJson) {
|
||||||
this.topData = dataJson.DeepState;
|
this.topData = dataJson.DeepState;
|
||||||
if(!this.permission){
|
|
||||||
this.topData.yestodaySum = '***'
|
|
||||||
this.topData.monthSum = '***'
|
|
||||||
this.topData.monthAreaCost = '***'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if ('DeepEnergyTableList' in dataJson) {
|
if ('DeepEnergyTableList' in dataJson) {
|
||||||
this.tableData1 = dataJson.DeepEnergyTableList;
|
this.tableData1 = dataJson.DeepEnergyTableList;
|
||||||
if(!this.permission){
|
|
||||||
this.tableData1.forEach(item=>{
|
|
||||||
item.elecPrice = null
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if ('DeepCostTableList' in dataJson) {
|
if ('DeepCostTableList' in dataJson) {
|
||||||
this.tableData2 = dataJson.DeepCostTableList;
|
this.tableData2 = dataJson.DeepCostTableList;
|
||||||
if(!this.permission){
|
|
||||||
this.tableData2.forEach(item=>{
|
|
||||||
item.priceD = null
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if ('DeepPdTables' in dataJson) {
|
if ('DeepPdTables' in dataJson) {
|
||||||
this.tableData3 = dataJson.DeepPdTables;
|
this.tableData3 = dataJson.DeepPdTables;
|
||||||
@ -358,7 +332,7 @@ export default {
|
|||||||
if ('DeepCostTrendList' in dataJson) {
|
if ('DeepCostTrendList' in dataJson) {
|
||||||
this.echartData = dataJson.DeepCostTrendList;
|
this.echartData = dataJson.DeepCostTrendList;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.chartRef.initChart(!this.permission);
|
this.$refs.chartRef.initChart();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -48,7 +48,7 @@ export default {
|
|||||||
this.chart = null;
|
this.chart = null;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initChart(permission) {
|
initChart() {
|
||||||
|
|
||||||
var option = {
|
var option = {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
@ -293,9 +293,6 @@ export default {
|
|||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
if(permission){
|
|
||||||
option.series[1]=[]
|
|
||||||
}
|
|
||||||
if (this.chart) {
|
if (this.chart) {
|
||||||
this.chart.setOption(option);
|
this.chart.setOption(option);
|
||||||
} else {
|
} else {
|
||||||
|
@ -144,7 +144,6 @@ import screenfull from 'screenfull';
|
|||||||
import { debounce } from '@/utils/debounce';
|
import { debounce } from '@/utils/debounce';
|
||||||
import baseTable from '../components/baseTable.vue';
|
import baseTable from '../components/baseTable.vue';
|
||||||
import BarChart from './BarChart.vue';
|
import BarChart from './BarChart.vue';
|
||||||
import { getUserProfile } from '@/api/system/user';
|
|
||||||
|
|
||||||
const tableProps1 = [
|
const tableProps1 = [
|
||||||
{
|
{
|
||||||
@ -230,21 +229,11 @@ export default {
|
|||||||
tableProps2,
|
tableProps2,
|
||||||
tableData2: [],
|
tableData2: [],
|
||||||
echartData: [],
|
echartData: [],
|
||||||
permission: false,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.init();
|
this.init();
|
||||||
this.permission = false;
|
this.initWebSocket();
|
||||||
getUserProfile().then((response) => {
|
|
||||||
const user = response.data;
|
|
||||||
if (user.roles[0].name !== 'dashborad') {
|
|
||||||
this.permission = true;
|
|
||||||
} else {
|
|
||||||
this.permission = false;
|
|
||||||
}
|
|
||||||
this.initWebSocket();
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
destroy() {
|
destroy() {
|
||||||
this.destroy();
|
this.destroy();
|
||||||
@ -335,35 +324,17 @@ export default {
|
|||||||
// 数据接收
|
// 数据接收
|
||||||
if ('OriginState' in dataJson) {
|
if ('OriginState' in dataJson) {
|
||||||
this.topData = dataJson.OriginState;
|
this.topData = dataJson.OriginState;
|
||||||
if(!this.permission){
|
|
||||||
this.topData.monthAreaCost = '***'
|
|
||||||
this.topData.monthMat = '***'
|
|
||||||
this.topData.yestodaySum = '***'
|
|
||||||
this.topData.yestodayMat = '***'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if ('OriginEnergyTableList' in dataJson) {
|
if ('OriginEnergyTableList' in dataJson) {
|
||||||
this.tableData1 = dataJson.OriginEnergyTableList;
|
this.tableData1 = dataJson.OriginEnergyTableList;
|
||||||
if(!this.permission){
|
|
||||||
this.tableData1.forEach(item=>{
|
|
||||||
item.elecPrice = null
|
|
||||||
item.gasPrice = null
|
|
||||||
item.price = null
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if ('OriginCostTableList' in dataJson) {
|
if ('OriginCostTableList' in dataJson) {
|
||||||
this.tableData2 = dataJson.OriginCostTableList;
|
this.tableData2 = dataJson.OriginCostTableList;
|
||||||
if(!this.permission){
|
|
||||||
this.tableData2.forEach(item=>{
|
|
||||||
item.priceO = null
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if ('OriginCostTrendList' in dataJson) {
|
if ('OriginCostTrendList' in dataJson) {
|
||||||
this.echartData = dataJson.OriginCostTrendList;
|
this.echartData = dataJson.OriginCostTrendList;
|
||||||
this.$nextTick(()=>{
|
this.$nextTick(()=>{
|
||||||
this.$refs.chartRef.initChart(!this.permission);
|
this.$refs.chartRef.initChart();
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user