Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
32239c7346
BIN
src/assets/iscs_picture/escalator.png
Normal file
BIN
src/assets/iscs_picture/escalator.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
BIN
src/assets/iscs_picture/lift.png
Normal file
BIN
src/assets/iscs_picture/lift.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.0 KiB |
BIN
src/assets/iscs_picture/to-down.png
Normal file
BIN
src/assets/iscs_picture/to-down.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
BIN
src/assets/iscs_picture/to-up.png
Normal file
BIN
src/assets/iscs_picture/to-up.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
@ -27,7 +27,7 @@ export default class line extends Group {
|
||||
position: [model.points[0].x, model.points[0].y]
|
||||
});
|
||||
// 1101 垂直渐变 1110 水平渐变
|
||||
let strokeColor = this.model.fillColor;
|
||||
let fillColor = this.model.fillBackground;
|
||||
if (model.isGradual) {
|
||||
const offsetList = [];
|
||||
model.modelList.forEach(item => {
|
||||
@ -37,9 +37,9 @@ export default class line extends Group {
|
||||
});
|
||||
});
|
||||
if (model.gradualShow == 'level') {
|
||||
strokeColor = new zrender.LinearGradient(1, 1, 0, 1, offsetList);
|
||||
fillColor = new zrender.LinearGradient(1, 1, 0, 1, offsetList);
|
||||
} else {
|
||||
strokeColor = new zrender.LinearGradient(1, 1, 1, 0, offsetList);
|
||||
fillColor = new zrender.LinearGradient(1, 1, 1, 0, offsetList);
|
||||
}
|
||||
}
|
||||
const modelPoints = [];
|
||||
@ -60,9 +60,13 @@ export default class line extends Group {
|
||||
},
|
||||
style: {
|
||||
lineWidth: this.model.lineWidth,
|
||||
stroke: strokeColor
|
||||
stroke: this.model.fillColor
|
||||
}
|
||||
});
|
||||
console.log(this.model.fill);
|
||||
if (fillColor) {
|
||||
this.iscsLine.setStyle('fill', fillColor);
|
||||
}
|
||||
if (model.classify == 'dashed') {
|
||||
this.iscsLine.setStyle('lineDash', [8, 6]);
|
||||
}
|
||||
|
@ -20,10 +20,15 @@ import blowerRedRight from '@/assets/iscs_picture/gufengji-red-r.png';
|
||||
import blowerGrayRight from '@/assets/iscs_picture/gufengji-gray-r.png';
|
||||
import iscsAPF from '@/assets/iscs_picture/iscs_APF.png';
|
||||
import drum from '@/assets/iscs_picture/drum.png';
|
||||
import exhaustFan from '@/assets/iscs_picture/exhaustFan.png'
|
||||
import exhaustFan from '@/assets/iscs_picture/exhaustFan.png';
|
||||
import waterCooler from '@/assets/iscs_picture/ZSDF533.png';
|
||||
import textBgBluePoint from '@/assets/iscs_picture/textBgBluePoint.png';
|
||||
import ventilationFan from '@/assets/iscs_picture/ventilationFan.png'
|
||||
import kongzhixiang from '@/assets/iscs_picture/iscs_kongzhixiang.png';
|
||||
import ventilationFan from '@/assets/iscs_picture/ventilationFan.png';
|
||||
import escalator from '@/assets/iscs_picture/escalator.png';
|
||||
import toUp from '@/assets/iscs_picture/to-up.png';
|
||||
import toDown from '@/assets/iscs_picture/to-down.png';
|
||||
import lift from '@/assets/iscs_picture/lift.png';
|
||||
|
||||
const pictureObj = {
|
||||
'psdLeft': psdLeft,
|
||||
@ -48,7 +53,12 @@ const pictureObj = {
|
||||
exhaustFan,
|
||||
waterCooler,
|
||||
textBgBluePoint,
|
||||
ventilationFan
|
||||
ventilationFan,
|
||||
kongzhixiang,
|
||||
escalator,
|
||||
toUp,
|
||||
toDown,
|
||||
lift
|
||||
};
|
||||
export default class Picture extends Group {
|
||||
constructor(device) {
|
||||
|
@ -241,37 +241,37 @@ export function RailListN(){
|
||||
scope.sectionrail[sectioncode].lineright.closed = false;
|
||||
scope.sectionrail[sectioncode].lineright.name = sectioncode;
|
||||
|
||||
for(let n=0,nm=scope.sectionrail[sectioncode].lineleft.points.length;n<nm;n++){
|
||||
var geometry = new THREE.CircleGeometry( 0.05, 16 );
|
||||
var material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
|
||||
var circle = new THREE.Mesh( geometry, material );
|
||||
// console.log(n);
|
||||
// console.log(scope.sectionrail[section[i].code].lineleft.points[n]);
|
||||
circle.position.x = scope.sectionrail[sectioncode].lineleft.points[n].x;
|
||||
circle.position.y = scope.sectionrail[sectioncode].lineleft.points[n].y;
|
||||
circle.position.z = scope.sectionrail[sectioncode].lineleft.points[n].z;
|
||||
circle.rotation.x = -Math.PI/2;
|
||||
scene.add( circle );
|
||||
}
|
||||
// scope.sectionrail[section[i].code].lineright.tension = 0.11;
|
||||
var points = scope.sectionrail[sectioncode].lineleft.getPoints( 50 );
|
||||
var geometry = new THREE.BufferGeometry().setFromPoints( points );
|
||||
var material;
|
||||
if(scope.sectionrail[sectioncode].type == "a"){
|
||||
material = new THREE.LineBasicMaterial( { color : 0xff0000 } );
|
||||
}
|
||||
if(scope.sectionrail[sectioncode].type == "b"){
|
||||
material = new THREE.LineBasicMaterial( { color : 0x00ff00 } );
|
||||
}
|
||||
if(scope.sectionrail[sectioncode].type == "c"){
|
||||
material = new THREE.LineBasicMaterial( { color : 0x0000ff } );
|
||||
}
|
||||
|
||||
|
||||
// Create the final object to add to the scene
|
||||
var curveObject = new THREE.Line( geometry, material );
|
||||
|
||||
curveObject.position.y = Math.random();
|
||||
scene.add(curveObject);
|
||||
// for(let n=0,nm=scope.sectionrail[sectioncode].lineleft.points.length;n<nm;n++){
|
||||
// var geometry = new THREE.CircleGeometry( 0.05, 16 );
|
||||
// var material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
|
||||
// var circle = new THREE.Mesh( geometry, material );
|
||||
// // console.log(n);
|
||||
// // console.log(scope.sectionrail[section[i].code].lineleft.points[n]);
|
||||
// circle.position.x = scope.sectionrail[sectioncode].lineleft.points[n].x;
|
||||
// circle.position.y = scope.sectionrail[sectioncode].lineleft.points[n].y;
|
||||
// circle.position.z = scope.sectionrail[sectioncode].lineleft.points[n].z;
|
||||
// circle.rotation.x = -Math.PI/2;
|
||||
// scene.add( circle );
|
||||
// }
|
||||
// // scope.sectionrail[section[i].code].lineright.tension = 0.11;
|
||||
// var points = scope.sectionrail[sectioncode].lineleft.getPoints( 50 );
|
||||
// var geometry = new THREE.BufferGeometry().setFromPoints( points );
|
||||
// var material;
|
||||
// if(scope.sectionrail[sectioncode].type == "a"){
|
||||
// material = new THREE.LineBasicMaterial( { color : 0xff0000 } );
|
||||
// }
|
||||
// if(scope.sectionrail[sectioncode].type == "b"){
|
||||
// material = new THREE.LineBasicMaterial( { color : 0x00ff00 } );
|
||||
// }
|
||||
// if(scope.sectionrail[sectioncode].type == "c"){
|
||||
// material = new THREE.LineBasicMaterial( { color : 0x0000ff } );
|
||||
// }
|
||||
//
|
||||
//
|
||||
// // Create the final object to add to the scene
|
||||
// var curveObject = new THREE.Line( geometry, material );
|
||||
//
|
||||
// curveObject.position.y = Math.random();
|
||||
// scene.add(curveObject);
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
<el-input-number v-model="form.z2" controls-position="right" :min="0" size="small" />
|
||||
</el-form-item>
|
||||
<el-form-item label="线段宽度:" prop="lineWidth">
|
||||
<el-input-number v-model="form.lineWidth" controls-position="right" :min="1" :max="50" size="small" />
|
||||
<el-input-number v-model="form.lineWidth" controls-position="right" :min="0" :max="50" size="small" />
|
||||
</el-form-item>
|
||||
<el-form-item label="类型:" prop="type">
|
||||
<el-select v-model="form.classify" placeholder="请选择类型" size="small">
|
||||
@ -43,7 +43,10 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-form-item v-if="!form.isGradual" label="线段颜色:" prop="fillColor">
|
||||
<el-form-item v-if="!form.isGradual" label="线段填充色:" prop="fillColor">
|
||||
<el-color-picker v-model="form.fillBackground" size="small" />
|
||||
</el-form-item>
|
||||
<el-form-item label="线段颜色:" prop="borderColor">
|
||||
<el-color-picker v-model="form.fillColor" size="small" />
|
||||
</el-form-item>
|
||||
<el-form-item label="箭头显示:" prop="arrowShow">
|
||||
@ -126,6 +129,7 @@ export default {
|
||||
z2: 0,
|
||||
lineWidth: '',
|
||||
fillColor: '#fff',
|
||||
fillBackground: '',
|
||||
arrowShow: 'none',
|
||||
arrowSize: 5,
|
||||
points: [
|
||||
@ -141,7 +145,7 @@ export default {
|
||||
{ required: true, message: '请输入线段宽度', trigger: 'blur' }
|
||||
],
|
||||
fillColor: [
|
||||
{ required: true, message: '请输入线段颜色', trigger: 'blur' }
|
||||
{ required: true, message: '请输入线段边框颜色', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
};
|
||||
@ -162,6 +166,7 @@ export default {
|
||||
this.form.z2 = model.z2 || 0;
|
||||
this.form.lineWidth = model.lineWidth;
|
||||
this.form.fillColor = model.fillColor;
|
||||
this.form.fillBackground = model.fillBackground || '';
|
||||
if (model.point1) {
|
||||
this.form.points = [];
|
||||
this.form.points.push(model.point1);
|
||||
@ -193,6 +198,7 @@ export default {
|
||||
z2: this.form.z2,
|
||||
lineWidth: this.form.lineWidth,
|
||||
fillColor: this.form.fillColor,
|
||||
fillBackground: this.form.fillBackground,
|
||||
classify: this.form.classify,
|
||||
arrowShow: this.form.arrowShow,
|
||||
arrowSize: this.form.arrowSize,
|
||||
@ -222,6 +228,7 @@ export default {
|
||||
_type: 'IscsLine',
|
||||
lineWidth: this.form.lineWidth,
|
||||
fillColor: this.form.fillColor,
|
||||
fillBackground: this.form.fillBackground,
|
||||
classify: this.form.classify,
|
||||
arrowShow: this.form.arrowShow,
|
||||
arrowSize: this.form.arrowSize
|
||||
@ -236,6 +243,7 @@ export default {
|
||||
code: '',
|
||||
lineWidth: '',
|
||||
fillColor: '#fff',
|
||||
fillBackground: '',
|
||||
arrowShow: 'none',
|
||||
arrowSize: 5,
|
||||
points: [
|
||||
|
@ -78,7 +78,12 @@ export default {
|
||||
{ name: '排风机', value: 'exhaustFan' },
|
||||
{ name: '冷水机', value: 'waterCooler'},
|
||||
{ name: '顶部排风机', value: 'ventilationFan'},
|
||||
{ name: '文字蓝色背景', value: 'textBgBluePoint'}
|
||||
{ name: '文字蓝色背景', value: 'textBgBluePoint'},
|
||||
{ name: '风井', value: 'kongzhixiang' },
|
||||
{ name: '扶梯', value: 'escalator'},
|
||||
{ name: '扶梯-朝上指示', value: 'toUp'},
|
||||
{ name: '扶梯-朝下执行', value: 'toDown'},
|
||||
{ name: '电梯', value: 'lift' }
|
||||
],
|
||||
|
||||
rules: {
|
||||
@ -149,7 +154,7 @@ export default {
|
||||
_type: 'IscsPicture',
|
||||
type: this.form.type,
|
||||
size: this.form.size,
|
||||
rotation: this.form.rotation,
|
||||
rotation: this.form.rotation
|
||||
};
|
||||
this.$emit('deleteDataModel', rectModel);
|
||||
},
|
||||
|
@ -0,0 +1,57 @@
|
||||
<template>
|
||||
<div class="psdSystem">
|
||||
<div class="psdSystem_header">{{ stationName+'主变电所接线图' }}</div>
|
||||
<div>
|
||||
<iscsSystem ref="iscsPlate" :width-canvas="width" :canvas-height="height" />
|
||||
</div>
|
||||
<!-- <div class="psdSystem_footer">
|
||||
<div class="prevButton">{{}}</div>
|
||||
<div class="nextButton">{{}}</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import iscsSystem from '../canvas/iscsCanvas';
|
||||
import {getIscsData} from '@/api/iscs';
|
||||
export default {
|
||||
name:'PsdSystem',
|
||||
components:{
|
||||
iscsSystem
|
||||
},
|
||||
computed:{
|
||||
stationName() {
|
||||
return this.$route.query.stationName;
|
||||
},
|
||||
width() {
|
||||
return 2050;
|
||||
},
|
||||
height() {
|
||||
return 1100;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
const params = {
|
||||
lineCode: this.$route.query.lineCode,
|
||||
totalSystem: 'powerMonitoring02',
|
||||
system: 'powerMonitoring',
|
||||
userInterface: 'hybrid'
|
||||
};
|
||||
getIscsData(params).then(resp=>{
|
||||
if (resp.data) {
|
||||
const data = JSON.parse(resp.data.graphData);
|
||||
this.$refs.iscsPlate.show(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.psdSystem_header{
|
||||
text-align: center;
|
||||
margin-top: 15px;
|
||||
color: #d8e9a5;
|
||||
}
|
||||
.psdSystem{
|
||||
|
||||
}
|
||||
</style>
|
@ -1,15 +1,18 @@
|
||||
<template>
|
||||
<div style="height: 100%; width: 100%;overflow-y:hidden;overflow-x:hidden;position: relative;">
|
||||
<psd-system v-if="mode=='psdSystem'" />
|
||||
<electric-system v-if="mode=='electric'" />
|
||||
<substation v-else-if="mode=='substation'" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import PsdSystem from './psdSystem/index.vue';
|
||||
import ElectricSystem from './electricSystem/index.vue';
|
||||
import Substation from './powerMonitor/substation.vue';
|
||||
export default {
|
||||
components:{
|
||||
PsdSystem,
|
||||
ElectricSystem,
|
||||
Substation
|
||||
},
|
||||
data() {
|
||||
|
Loading…
Reference in New Issue
Block a user