Merge branch 'dev' of https://git.code.tencent.com/lian-cbtc/jl-client into dev
This commit is contained in:
commit
3ec7d0a7e5
@ -96,10 +96,11 @@ export function deljointTrainRoom(group) {
|
||||
}
|
||||
|
||||
// 查询有权限房间列表
|
||||
export function getjointTrainList() {
|
||||
export function getjointTrainList(params) {
|
||||
return request({
|
||||
url: `/api/jointTraining/room/list`,
|
||||
method: 'get'
|
||||
method: 'get',
|
||||
params: params
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -3,32 +3,32 @@ import Group from 'zrender/src/container/Group';
|
||||
|
||||
export default class elevatorBack extends Group {
|
||||
|
||||
constructor(device) {
|
||||
super();
|
||||
this.event = device.event;
|
||||
this.model = device.model;
|
||||
this.create();
|
||||
}
|
||||
constructor(device) {
|
||||
super();
|
||||
this.event = device.event;
|
||||
this.model = device.model;
|
||||
this.create();
|
||||
}
|
||||
|
||||
create() {
|
||||
const model = this.model;
|
||||
const tempString='M'+model.width/6+' '+model.height/8*6+' L'+model.width/6*4+
|
||||
' 0 L'+model.width/6*5+' 0 A '+model.width/6+' '+model.width/6+' 0 0 1 '+
|
||||
model.width/6*5+' '+model.height/4+'L '+model.width/3+' '+model.height+' L'+model.width/6+
|
||||
' '+model.height+' '+'A'+model.width/6+' '+model.width/6+' 0 0 1 '+model.width/6+' '+model.height/8*6;
|
||||
this.elevatorBack = toolpath.createFromString(tempString, {
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
draggable: false,
|
||||
style: {
|
||||
x: model.point.x,
|
||||
y: model.point.y,
|
||||
brushType: 'fill',
|
||||
fill: this.model.fillColor || '#313131',
|
||||
lineWidth: 0
|
||||
}
|
||||
});
|
||||
this.add(this.elevatorBack);
|
||||
}
|
||||
create() {
|
||||
const model = this.model;
|
||||
const tempString = 'M' + model.width / 6 + ' ' + model.height / 8 * 6 + ' L' + model.width / 6 * 4 +
|
||||
' 0 L' + model.width / 6 * 5 + ' 0 A ' + model.width / 6 + ' ' + model.width / 6 + ' 0 0 1 ' +
|
||||
model.width / 6 * 5 + ' ' + model.height / 4 + 'L ' + model.width / 3 + ' ' + model.height + ' L' + model.width / 6 +
|
||||
' ' + model.height + ' ' + 'A' + model.width / 6 + ' ' + model.width / 6 + ' 0 0 1 ' + model.width / 6 + ' ' + model.height / 8 * 6;
|
||||
this.elevatorBack = toolpath.createFromString(tempString, {
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
draggable: false,
|
||||
style: {
|
||||
x: model.point.x,
|
||||
y: model.point.y,
|
||||
brushType: 'fill',
|
||||
fill: this.model.fillColor || '#313131',
|
||||
lineWidth: 0
|
||||
}
|
||||
});
|
||||
this.add(this.elevatorBack);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -99,4 +99,41 @@ deviceRender[deviceType.BorderRadius] = {
|
||||
z: 4
|
||||
};
|
||||
|
||||
/** 圆角边框渲染配置 */
|
||||
deviceRender[deviceType.AirConditioner] = {
|
||||
_type: deviceType.AirConditioner,
|
||||
zlevel: 1,
|
||||
z: 4
|
||||
};
|
||||
/** 圆角边框渲染配置 */
|
||||
deviceRender[deviceType.OrbitalVentilator] = {
|
||||
_type: deviceType.OrbitalVentilator,
|
||||
zlevel: 1,
|
||||
z: 4
|
||||
};
|
||||
/** 圆角边框渲染配置 */
|
||||
deviceRender[deviceType.JetFan] = {
|
||||
_type: deviceType.JetFan,
|
||||
zlevel: 1,
|
||||
z: 4
|
||||
};
|
||||
/** 圆角边框渲染配置 */
|
||||
deviceRender[deviceType.TunnelFan] = {
|
||||
_type: deviceType.TunnelFan,
|
||||
zlevel: 1,
|
||||
z: 4
|
||||
};
|
||||
/** 圆角边框渲染配置 */
|
||||
deviceRender[deviceType.FireDamper] = {
|
||||
_type: deviceType.FireDamper,
|
||||
zlevel: 1,
|
||||
z: 4
|
||||
};
|
||||
/** 圆角边框渲染配置 */
|
||||
deviceRender[deviceType.SmookProofFd] = {
|
||||
_type: deviceType.SmookProofFd,
|
||||
zlevel: 1,
|
||||
z: 4
|
||||
};
|
||||
|
||||
export default deviceRender;
|
||||
|
@ -13,7 +13,13 @@ const deviceType = {
|
||||
Chiller:'Chiller',
|
||||
CoolTower:'CoolTower',
|
||||
BorderRadius: 'borderRadius',
|
||||
EndDoor: 'endDoor'
|
||||
EndDoor: 'endDoor',
|
||||
AirConditioner:'AirConditioner',
|
||||
OrbitalVentilator:'OrbitalVentilator',
|
||||
JetFan:'JetFan',
|
||||
TunnelFan:'TunnelFan',
|
||||
FireDamper:'FireDamper',
|
||||
SmookProofFd:'SmookProofFd'
|
||||
};
|
||||
|
||||
export default deviceType;
|
||||
|
0
src/iscs/shape/bas/airConditioner.js
Normal file
0
src/iscs/shape/bas/airConditioner.js
Normal file
0
src/iscs/shape/bas/fireDamper.js
Normal file
0
src/iscs/shape/bas/fireDamper.js
Normal file
0
src/iscs/shape/bas/jetFan.js
Normal file
0
src/iscs/shape/bas/jetFan.js
Normal file
0
src/iscs/shape/bas/orbitalVentilator.js
Normal file
0
src/iscs/shape/bas/orbitalVentilator.js
Normal file
0
src/iscs/shape/bas/smookProofFd.js
Normal file
0
src/iscs/shape/bas/smookProofFd.js
Normal file
0
src/iscs/shape/bas/tunnelFan.js
Normal file
0
src/iscs/shape/bas/tunnelFan.js
Normal file
@ -14,6 +14,12 @@ import Chiller from './bas/chiller';
|
||||
import CoolTower from './bas/coolTower';
|
||||
import EndDoor from './endDoor';
|
||||
import BorderRadius from './borderRadius';
|
||||
import AirConditioner from './bas/airConditioner';
|
||||
import OrbitalVentilator from './bas/orbitalVentilator';
|
||||
import JetFan from './bas/jetFan';
|
||||
import TunnelFan from './bas/tunnelFan';
|
||||
import FireDamper from './bas/fireDamper';
|
||||
import SmookProofFd from './bas/smookProofFd';
|
||||
|
||||
const iscsShape = {};
|
||||
iscsShape[deviceType.ManualAlarmButton] = ManualAlarmButton;
|
||||
@ -31,6 +37,12 @@ iscsShape[deviceType.Chiller] = Chiller;
|
||||
iscsShape[deviceType.CoolTower] = CoolTower;
|
||||
iscsShape[deviceType.EndDoor] = EndDoor;
|
||||
iscsShape[deviceType.BorderRadius] = BorderRadius;
|
||||
iscsShape[deviceType.AirConditioner] = AirConditioner;
|
||||
iscsShape[deviceType.OrbitalVentilator] = OrbitalVentilator;
|
||||
iscsShape[deviceType.JetFan] = JetFan;
|
||||
iscsShape[deviceType.TunnelFan] = TunnelFan;
|
||||
iscsShape[deviceType.FireDamper] = FireDamper;
|
||||
iscsShape[deviceType.SmookProofFd] = SmookProofFd;
|
||||
|
||||
function shapefactory(device, iscs) {
|
||||
const type = device.model._type;
|
||||
|
9
src/iscs/utils/Uid.js
Normal file
9
src/iscs/utils/Uid.js
Normal file
@ -0,0 +1,9 @@
|
||||
export function getUID(type, list) {
|
||||
if (list.length) {
|
||||
const lastCode = list[list.length - 1].code;
|
||||
const num = lastCode.split(type + '_')[1];
|
||||
return type + `_${num + 1}`;
|
||||
} else {
|
||||
return type + `_1`;
|
||||
}
|
||||
}
|
@ -86,6 +86,26 @@ export function parser(data) {
|
||||
zrUtil.each(data.borderRadiusList || [], elem =>{
|
||||
iscsDevice[elem.code] = deviceFactory(deviceType.BorderRadius, elem);
|
||||
} );
|
||||
|
||||
zrUtil.each(data.AirConditioner || [], elem =>{
|
||||
iscsDevice[elem.code] = deviceFactory(deviceType.AirConditioner, elem);
|
||||
} );
|
||||
zrUtil.each(data.OrbitalVentilator || [], elem =>{
|
||||
iscsDevice[elem.code] = deviceFactory(deviceType.OrbitalVentilator, elem);
|
||||
} );
|
||||
zrUtil.each(data.JetFan || [], elem =>{
|
||||
iscsDevice[elem.code] = deviceFactory(deviceType.JetFan, elem);
|
||||
} );
|
||||
zrUtil.each(data.TunnelFan || [], elem =>{
|
||||
iscsDevice[elem.code] = deviceFactory(deviceType.TunnelFan, elem);
|
||||
} );
|
||||
zrUtil.each(data.FireDamper || [], elem =>{
|
||||
iscsDevice[elem.code] = deviceFactory(deviceType.FireDamper, elem);
|
||||
} );
|
||||
zrUtil.each(data.SmookProofFd || [], elem =>{
|
||||
iscsDevice[elem.code] = deviceFactory(deviceType.SmookProofFd, elem);
|
||||
} );
|
||||
|
||||
}
|
||||
|
||||
return iscsDevice;
|
||||
@ -151,6 +171,24 @@ export function updateIscsData(device) {
|
||||
case deviceType.BorderRadius:
|
||||
updateIscsListByDevice(iscsData, 'borderRadius', device);
|
||||
break;
|
||||
case deviceType.AirConditioner:
|
||||
updateIscsListByDevice(iscsData, 'airConditionerList', device);
|
||||
break;
|
||||
case deviceType.OrbitalVentilator:
|
||||
updateIscsListByDevice(iscsData, 'orbitalVentilatorList', device);
|
||||
break;
|
||||
case deviceType.JetFan:
|
||||
updateIscsListByDevice(iscsData, 'jetFanList', device);
|
||||
break;
|
||||
case deviceType.TunnelFan:
|
||||
updateIscsListByDevice(iscsData, 'tunnelFanList', device);
|
||||
break;
|
||||
case deviceType.FireDamper:
|
||||
updateIscsListByDevice(iscsData, 'fireDamperList', device);
|
||||
break;
|
||||
case deviceType.SmookProofFd:
|
||||
updateIscsListByDevice(iscsData, 'smookProofFdList', device);
|
||||
break;
|
||||
}
|
||||
|
||||
store.dispatch('iscs/setIscsData', iscsData);
|
||||
|
@ -7,7 +7,7 @@ export function getBaseUrl() {
|
||||
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
} else {
|
||||
BASE_API = process.env.VUE_APP_BASE_API;
|
||||
}
|
||||
|
@ -40,8 +40,10 @@
|
||||
|
||||
<script>
|
||||
import { getjointTrainList, getjointTraining, putJointTrainingSimulationEntrance } from '@/api/chat';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { ProjectCode } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'DeomonList',
|
||||
@ -89,7 +91,8 @@ export default {
|
||||
this.pageLoading = true;
|
||||
this.dialogShow = true;
|
||||
this.loading = false;
|
||||
const res = await getjointTrainList();
|
||||
const project = getSessionStorage('project');
|
||||
const res = await getjointTrainList({projectCode:ProjectCode[project]});
|
||||
this.trainingList = res.data || [];
|
||||
this.$nextTick(() => {
|
||||
var training = this.trainingList[0] || {};
|
||||
|
@ -25,6 +25,7 @@
|
||||
<script>
|
||||
// 车站摄像机
|
||||
import { mapGetters } from 'vuex';
|
||||
import {getUID} from '@/iscs/utils/Uid';
|
||||
|
||||
export default {
|
||||
name: 'ManualAlarmButton',
|
||||
@ -52,19 +53,10 @@ export default {
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
getUid() {
|
||||
if (this.vidiconList.length) {
|
||||
const lastCode = this.vidiconList[this.vidiconList.length - 1].code;
|
||||
const num = lastCode.split('vidicon_')[1];
|
||||
return `vidicon_${num + 1}`;
|
||||
} else {
|
||||
return `vidicon_1`;
|
||||
}
|
||||
},
|
||||
onSubmit(form) {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
const Uid = this.getUid();
|
||||
const Uid = getUID('Vidicon', this.vidiconList);
|
||||
const model = {
|
||||
_type: 'Vidicon',
|
||||
code: Uid,
|
||||
|
@ -22,6 +22,7 @@
|
||||
<script>
|
||||
// 车站摄像机
|
||||
import { mapGetters } from 'vuex';
|
||||
import {getUID} from '@/iscs/utils/Uid';
|
||||
|
||||
export default {
|
||||
name: 'ManualAlarmButton',
|
||||
@ -48,19 +49,10 @@ export default {
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
getUid() {
|
||||
if (this.vidiconCloudList.length) {
|
||||
const lastCode = this.vidiconCloudList[this.vidiconCloudList.length - 1].code;
|
||||
const num = lastCode.split('vidiconCloud_')[1];
|
||||
return `vidiconCloud_${num + 1}`;
|
||||
} else {
|
||||
return `vidiconCloud_1`;
|
||||
}
|
||||
},
|
||||
onSubmit(form) {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
const Uid = this.getUid();
|
||||
const Uid = getUID('VidiconCloud', this.vidiconCloudList);
|
||||
const model = {
|
||||
_type: 'VidiconCloud',
|
||||
code: Uid,
|
||||
|
111
src/views/system/iscsDraw/iscsPsdOperate/borderRadius.vue
Normal file
111
src/views/system/iscsDraw/iscsPsdOperate/borderRadius.vue
Normal file
@ -0,0 +1,111 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form ref="form" :rule="rules" :model="addModel" label-width="100px">
|
||||
<el-form-item v-if="addModel.code" label="按钮编号" prop="code">
|
||||
<el-input v-model="addModel.code" />
|
||||
</el-form-item>
|
||||
<el-form-item label="宽度" prop="width">
|
||||
<el-input-number v-model="addModel.width" controls-position="right" />
|
||||
</el-form-item>
|
||||
<el-form-item label="高度" prop="height">
|
||||
<el-input-number v-model="addModel.height" controls-position="right" />
|
||||
</el-form-item>
|
||||
<el-form-item label="X轴坐标" prop="x">
|
||||
<el-input-number v-model="addModel.x" controls-position="right" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Y轴坐标" prop="y">
|
||||
<el-input-number v-model="addModel.y" controls-position="right" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
||||
<el-button v-show="showDeleteButton" type="danger" @click="deleteDevice">{{ $t('global.delete') }}</el-button>
|
||||
<el-button v-show="showDeleteButton" @click="initPage">{{ $t('global.cancel') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'PlatformScreenDoor',
|
||||
data() {
|
||||
return {
|
||||
addModel:{
|
||||
code: '',
|
||||
width: 25,
|
||||
height: 10,
|
||||
x: 10,
|
||||
y: 10
|
||||
},
|
||||
rules: {
|
||||
width:[{ required: true, message:'请输入图形宽度', trigger: 'blur' }],
|
||||
height:[{ required: true, message:'请输入图形宽度', trigger: 'blur' }],
|
||||
x: [{ required: true, message: '请输入图形的X轴坐标', trigger: 'blur' }],
|
||||
y: [{ required: true, message: '请输入图形的Y轴坐标', trigger: 'blur' }]
|
||||
},
|
||||
showDeleteButton: false,
|
||||
buttonText: '立即创建'
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
onSubmit(form) {
|
||||
if (!this.addModel.code) {
|
||||
this.generateCode();
|
||||
}
|
||||
this.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
const maButtonModel = {
|
||||
point: {
|
||||
x: this.addModel.x,
|
||||
y: this.addModel.y
|
||||
},
|
||||
code: this.addModel.code,
|
||||
_type: 'borderRadius',
|
||||
width: this.addModel.width,
|
||||
height: this.addModel.height
|
||||
};
|
||||
this.$emit('createDataModel', maButtonModel);
|
||||
this.initPage();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
deleteDevice() {
|
||||
const maButtonModel = {
|
||||
point: {
|
||||
x: this.addModel.x,
|
||||
y: this.addModel.y
|
||||
},
|
||||
code: this.addModel.code,
|
||||
_type: 'borderRadius',
|
||||
width: this.addModel.width,
|
||||
height: this.addModel.height
|
||||
};
|
||||
this.$emit('deleteDataModel', maButtonModel);
|
||||
this.initPage();
|
||||
},
|
||||
initPage() {
|
||||
this.isUpdate = false;
|
||||
this.buttonText = '立即创建';
|
||||
this.showDeleteButton = false;
|
||||
this.addModel = {
|
||||
code: '',
|
||||
width: 25,
|
||||
height: 10,
|
||||
x: 10,
|
||||
y: 10
|
||||
};
|
||||
},
|
||||
generateCode() {
|
||||
const mydate = new Date();
|
||||
this.addModel.code = 'borderRadius_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -26,6 +26,14 @@
|
||||
@deleteDataModel="deleteDataModel"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="圆角边框" name="borderRadius">
|
||||
<border-radius
|
||||
ref="borderRadius"
|
||||
style="width: 90%;"
|
||||
@createDataModel="createDataModel"
|
||||
@deleteDataModel="deleteDataModel"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
</div>
|
||||
@ -35,12 +43,14 @@
|
||||
import {deviceFactory} from '@/iscs/utils/parser';
|
||||
import PlatformScreenDoor from './platformScreenDoor';
|
||||
import EndDoor from './endDoor';
|
||||
import BorderRadius from './borderRadius';
|
||||
|
||||
export default {
|
||||
name: 'IscsOperate',
|
||||
components: {
|
||||
PlatformScreenDoor,
|
||||
EndDoor
|
||||
EndDoor,
|
||||
BorderRadius
|
||||
},
|
||||
mixins: [
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user