Merge branch 'dev_iscs' of https://git.code.tencent.com/lian-cbtc/jl-client into dev_iscs

# Conflicts:
#	src/iscs/constant/deviceRender.js
#	src/iscs/constant/deviceType.js
#	src/iscs/shape/factory.js
#	src/iscs/utils/parser.js
This commit is contained in:
joylink_cuiweidong 2020-01-16 18:11:40 +08:00
commit 91c722f288
17 changed files with 551 additions and 45 deletions

View File

@ -65,6 +65,12 @@ deviceRender[deviceType.Ventilator] = {
zlevel: 1,
z: 4
};
/** VidiconCloud渲染配置*/
deviceRender[deviceType.VidiconCloud] = {
_type: deviceType.VidiconCloud,
zlevel: 1,
z: 4
};
/** 冷水机渲染配置*/
deviceRender[deviceType.Chiller] = {
@ -79,5 +85,11 @@ deviceRender[deviceType.CoolTower] = {
zlevel: 1,
z: 4
};
/** 端头门渲染配置*/
deviceRender[deviceType.EndDoor] = {
_type: deviceType.EndDoor,
zlevel: 1,
z: 4
};
export default deviceRender;

View File

@ -1,6 +1,7 @@
const deviceType = {
ManualAlarmButton: 'manualAlarmButton',
Vidicon: 'Vidicon',
VidiconCloud: 'VidiconCloud',
CheckBox: 'CheckBox',
FrozenPump:'FrozenPump',
FireHydranAlarmButton: 'fireHydranAlarmButton',
@ -10,7 +11,8 @@ const deviceType = {
PlatformScreenDoor: 'platformScreenDoor',
Ventilator:'Ventilator',
Chiller:'Chiller',
CoolTower:'CoolTower'
CoolTower:'CoolTower',
EndDoor: 'endDoor'
};
export default deviceType;

View File

@ -2,7 +2,7 @@ import Group from 'zrender/src/container/Group';
import Rect from 'zrender/src/graphic/shape/Rect';
import Polyline from 'zrender/src/graphic/shape/Polyline';
export default class Button extends Group {
export default class Vidicon extends Group {
constructor(device) {
super();
this.model = device.model;

View File

@ -0,0 +1,66 @@
import Group from 'zrender/src/container/Group';
import Sector from 'zrender/src/graphic/shape/Sector';
import Polyline from 'zrender/src/graphic/shape/Polyline';
export default class VidiconCloud extends Group {
constructor(device) {
super();
this.model = device.model;
this._type = device.model._type;
this._code = device.model.code;
this.zlevel = device.model.zlevel;
this.z = device.model.zlevel;
this.create();
}
create() {
console.log(this.model, Math.cos(45 * (Math.PI / 180)));
this.grouper = new Group({
id: this.model.code,
position: [this.model.point.x, this.model.point.y]
});
this.semicircle = new Sector({
zlevel: this.model.zlevel,
z: this.model.z,
shape: {
cx: this.model.point.x,
cy: this.model.point.y,
r: this.model.r || 30,
startAngle: 0,
endAngle: Math.PI,
clockwise: true
},
style: {
stroke: '#00FF00',
lineWidth: 2,
fill: 'rgba(0,0,0,0)'
}
});
this.Polyline = new Polyline({
zlevel: this.model.zlevel,
z: this.model.z + 1,
shape: {
points: [
[this.model.point.x + this.model.r / 2, this.model.point.y],
[this.model.point.x - Math.cos(45 * (Math.PI / 180)) * this.model.r, this.model.point.y + Math.sin(45 * (Math.PI / 180)) * this.model.r],
[this.model.point.x - Math.cos(55 * (Math.PI / 180)) * this.model.r, this.model.point.y + Math.sin(55 * (Math.PI / 180)) * this.model.r],
[this.model.point.x + this.model.r / 1.2, this.model.point.y]
]
},
style: {
stroke: '#00FF00',
lineWidth: 2,
fill: '#00FF00'
}
});
this.grouper.add(this.semicircle);
this.grouper.add(this.Polyline);
this.add(this.grouper);
}
setModel(dx, dy) {
this.model.point.x += dx;
this.model.point.y += dy;
}
}

67
src/iscs/shape/endDoor.js Normal file
View File

@ -0,0 +1,67 @@
import Group from 'zrender/src/container/Group';
import Rect from 'zrender/src/graphic/shape/Rect';
import Circle from 'zrender/src/graphic/shape/Circle';
export default class EndDoor extends Group {
constructor(device) {
super();
this.model = device.model;
this.zlevel = device.model.zlevel;
this.z = device.model.z;
this._type = device.model._type;
this._code = device.model.code;
this.create();
}
create() {
this.grouper = new Group({
id: this.model.code,
position: [this.model.point.x, this.model.point.y]
});
this.add(this.grouper);
this.door = new Rect({
zlevel: this.zlevel,
z: this.z,
shape: {
x: 0,
y: 0,
width: this.model.width,
height: this.model.width * 29 / 17
},
style: {
fill: '#33CC00'
}
});
this.doorWindow = new Rect({
zlevel: this.zlevel,
z: this.z,
shape: {
x: this.model.width * 2 / 17,
y: this.model.width * 6 / 17,
width: this.model.width * 13 / 17,
height: this.model.width * 4 / 17
},
style: {
fill: '#000'
}
});
this.doorknob = new Circle({
zlevel: this.zlevel,
z: this.z,
shape: {
cx: this.model.width * 13 / 17,
cy: this.model.width * 21 / 17,
r: this.model.width / 17
},
style: {
fill: '#000'
}
});
this.grouper.add(this.door);
this.grouper.add(this.doorWindow);
this.grouper.add(this.doorknob);
}
setModel(dx, dy) {
this.model.point.x += dx;
this.model.point.y += dy;
}
}

View File

@ -1,5 +1,6 @@
import ManualAlarmButton from './manualAlarmButton';
import Vidicon from './Vidicon';
import VidiconCloud from './VidiconCloud';
import deviceType from '../constant/deviceType';
import CheckBox from './checkBox';
import FrozenPump from './bas/frozenPump';
@ -11,10 +12,12 @@ import PlatformScreenDoor from './psd/platformScreenDoor';
import Ventilator from './bas/ventilator';
import Chiller from './bas/chiller';
import CoolTower from './bas/coolTower';
import EndDoor from './endDoor';
const iscsShape = {};
iscsShape[deviceType.ManualAlarmButton] = ManualAlarmButton;
iscsShape[deviceType.Vidicon] = Vidicon;
iscsShape[deviceType.VidiconCloud] = VidiconCloud;
iscsShape[deviceType.CheckBox] = CheckBox;
iscsShape[deviceType.FrozenPump] = FrozenPump;
iscsShape[deviceType.FireHydranAlarmButton] = FireHydranAlarmButton;
@ -25,6 +28,7 @@ iscsShape[deviceType.PlatformScreenDoor] = PlatformScreenDoor;
iscsShape[deviceType.Ventilator] = Ventilator;
iscsShape[deviceType.Chiller] = Chiller;
iscsShape[deviceType.CoolTower] = CoolTower;
iscsShape[deviceType.EndDoor] = EndDoor;
function shapefactory(device, iscs) {
const type = device.model._type;

View File

@ -0,0 +1,38 @@
import Group from 'zrender/src/container/Group';
const mean = {
slidingDoorEmergencyDoorOpenMalfunction : '滑动门&应急门开门故障',
slidingDoorEmergencyDoorCloseMalfunction: '滑动门&应急门关门故障',
slidingDoorsInterlockAllClear: '滑动门互锁解除报警',
emergencyControlPanelOperation: '紧急控制盘操作',
emergencyControlPanelOperationOpenCommand: '紧急控制盘操作开门命令',
emergencyControlPanelOperationCloseCommand: '紧急控制盘操作关门命令',
localControlPanelOperation: '就地控制盘操作',
localControlPanelOperationOpenCommand: '就地控制盘操作开门命令',
localControlPanelOperationCloseCommand: '就地控制盘操作关门命令',
automaticOpenOrder: '自动开门命令',
automaticCloseOrder: '自动开门命令',
allDoorsOpenInPlace: '所有门开到位',
allDoorsCloseInPlace: '所有门关到位',
systemDrivePowerFailure: '系统驱动电源故障',
systemControlPowerFailure: '系统控制电源故障',
monitorPowerFailure: '监视电源故障'
};
export default class StateTable extends Group {
constructor(device) {
super();
this.model = device.model;
this.zlevel = device.model.zlevel;
this.z = device.model.z;
this._type = device.model._type;
this._code = device.model.code;
this.create();
}
cerate() {
// this.header =
}
setModel(dx, dy) {
this.model.point.x += dx;
this.model.point.y += dy;
}
}

View File

@ -40,7 +40,10 @@ export function parser(data) {
iscsDevice[elem.code] = deviceFactory(deviceType.ManualAlarmButton, elem);
}, this);
zrUtil.each(data.vidiconList || [], elem => {
iscsDevice[elem.code] = deviceFactory(deviceType.Vidicon, elem);
iscsDevice[elem.code] = deviceFactory(deviceType.vidiconList, elem);
}, this);
zrUtil.each(data.vidiconCloudList || [], elem => {
iscsDevice[elem.code] = deviceFactory(deviceType.vidiconCloudList, elem);
}, this);
zrUtil.each(data.frozenPumpList || [], elem => {
iscsDevice[elem.code] = deviceFactory(deviceType.FrozenPump, elem);
@ -76,6 +79,9 @@ export function parser(data) {
zrUtil.each(data.coolTowerList || [], elem =>{
iscsDevice[elem.code] = deviceFactory(deviceType.CoolTower, elem);
});
zrUtil.each(data.endDoorList || [], elem =>{
iscsDevice[elem.code] = deviceFactory(deviceType.EndDoor, elem);
});
}
@ -100,6 +106,12 @@ function updateIscsListByDevice(iscs, name, device) {
export function updateIscsData(device) {
const iscsData = store.getters['iscs/iscs'];
switch (device._type) {
case deviceType.vidiconList :
updateIscsListByDevice(iscsData, 'vidiconList', device);
break;
case deviceType.vidiconCloudList :
updateIscsListByDevice(iscsData, 'vidiconCloudList', device);
break;
case deviceType.ManualAlarmButton :
updateIscsListByDevice(iscsData, 'manualAlarmButtonList', device);
break;
@ -130,6 +142,9 @@ export function updateIscsData(device) {
case deviceType.CoolTower :
updateIscsListByDevice(iscsData, 'coolTowerList', device);
break;
case deviceType.EndDoor:
updateIscsListByDevice(iscsData, 'endDoorList', device);
break;
}
store.dispatch('iscs/setIscsData', iscsData);

View File

@ -32,9 +32,16 @@ const iscs = {
updateDeviceData: (state) => {
return state.updateDeviceData;
},
buttonList: (state) => {
if (state.iscs && state.iscs.buttonList) {
return state.iscs.buttonList;
vidiconList: (state) => {
if (state.iscs && state.iscs.vidiconList) {
return state.iscs.vidiconList;
} else {
return [];
}
},
vidiconCloudList: (state) => {
if (state.iscs && state.iscs.vidiconCloudList) {
return state.iscs.vidiconCloudList;
} else {
return [];
}

View File

@ -3,11 +3,11 @@ export function getBaseUrl() {
let BASE_API;
if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud';
// 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;
}

View File

@ -4,10 +4,20 @@
<div style="height: 370px; overflow: auto;">
<el-table :data="tableData" style="width: 100%;">
<el-table-column prop="configKey" label="key" />
<el-table-column prop="configValue" label="value" />
<el-table-column prop="description" label="描述" />
<el-table-column>
<template slot="header" slot-scope="scope">
<el-table-column prop="configValue" label="value">
<template slot-scope="scope">
<div v-if="!scope.row.boolean">
<div v-if="!scope.row.focus" style="width: 100%;cursor: pointer;" @click="scope.row.focus = true">{{ scope.row.configValue }}</div>
<el-input v-if="scope.row.focus" v-model="scope.row.configValue" style="width: 100%" @blur="scope.row.focus = false" />
</div>
<div v-if="scope.row.boolean">
<el-checkbox v-model="scope.row.configValue">{{ scope.row.configValue }}</el-checkbox>
</div>
</template>
</el-table-column>
<!-- <el-table-column prop="description" label="描述" /> -->
<!-- <el-table-column>
<template slot="header">
<div class="flex_box">
<span>操作</span>
<i class="el-icon-circle-plus-outline icon_font" @click="addModel(scope)" />
@ -17,7 +27,7 @@
<el-button type="text" size="small" @click="editModel(scope.row, scope.$index)">编辑</el-button>
<el-button type="text" size="small" @click="delModel(scope.row, scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table-column> -->
</el-table>
</div>
<span slot="footer" class="dialog-footer">
@ -25,18 +35,18 @@
<el-button @click="dialogVisible = false">{{ $t('global.cancel') }}</el-button>
</span>
</el-dialog>
<edit-config ref="addConfig" type="ADD" @create="createModel" />
<edit-config ref="editConfig" type="EDIT" @update="updateModel" />
<!-- <edit-config ref="addConfig" type="ADD" @create="createModel" />
<edit-config ref="editConfig" type="EDIT" @update="updateModel" /> -->
</div>
</template>
<script>
import { getRealLineConfigList, putRealLineConfig } from '@/api/management/mapline';
import EditConfig from './editConfig';
// import EditConfig from './editConfig';
export default {
name: 'Config',
components: {
EditConfig
// EditConfig
},
props: {
type: {
@ -49,7 +59,9 @@ export default {
dialogVisible: false,
index: 0,
id: '',
tableData: []
tableData: [],
focus: false,
icloudList: ['lockFirst']
};
},
computed: {
@ -67,7 +79,24 @@ export default {
try {
const res = await getRealLineConfigList(this.id);
if (res.data) {
this.tableData = res.data;
const keys = Object.keys(res.data);
this.tableData = [];
keys.forEach(key => {
// let value = '';
let boolean = false;
if (this.icloudList.indexOf(key) >= 0) {
// value = JSON.stringify(res.data[key]);
boolean = true;
} else {
// value = res.data[key];
}
const param = {
configKey: key,
configValue: res.data[key],
boolean: boolean
};
this.tableData.push(param);
});
} else {
this.tableData = [];
}
@ -105,7 +134,15 @@ export default {
this.tableData.splice(this.index, 1, data);
},
save() {
putRealLineConfig(this.id, this.tableData).then(res => {
const param = {};
this.tableData.forEach(item => {
param[item.configKey] = item.configValue;
// if (item.boolean) {
// const value = item.configValue == 'true';
// param[item.configKey] = value;
// }
});
putRealLineConfig(this.id, param).then(res => {
this.$message.success(`保存配置项成功!`);
this.dialogVisible = false;
}).catch(() => {

View File

@ -23,7 +23,8 @@ export default {
formModel: {
configKey: '',
configValue: '',
description: ''
boolean: false
// description: ''
}
};
},
@ -32,25 +33,25 @@ export default {
const form = {
labelWidth: '100px',
items: [
{ prop: 'configKey', label: 'key:', type: 'text' },
{ prop: 'configValue', label: 'value:', type: 'text' },
{ prop: 'description', label: '描述:', type: 'text' }
{ prop: 'configKey', label: 'key:', type: 'text' }
// { prop: 'description', label: ':', type: 'text' }
]
};
return form;
},
rules() {
return {
key: [
const rules = {
configKey: [
{ required: true, message: '请输入key值', trigger: 'blur' }
],
value: [
configValue: [
{ required: true, message: '请输入value值', trigger: 'blur' }
],
remarks: [
{ required: true, message: '请输入描述', trigger: 'blur' }
]
// remarks: [
// { required: true, message: '', trigger: 'blur' }
// ]
};
return rules;
},
title() {
if (this.type === 'ADD') {
@ -63,11 +64,12 @@ export default {
methods: {
show(row) {
this.dialogVisible = true;
if (row && row.id) {
if (row && row.configKey) {
this.formModel = {
configKey: row.configKey,
configValue: row.configValue,
description: row.description
configValue: JSON.parse(row.configValue),
boolean: row.boolean
// description: row.description
};
}
},
@ -83,12 +85,9 @@ export default {
},
buildModel(data) {
return {
configEg: data.configEg,
configKey: data.configKey,
configValue: data.configValue,
description: data.description,
id: data.id,
lineCode: data.lineCode
configValue: data.boolean ? JSON.stringify(data.configValue) : data.configValue,
boolean: data.boolean
};
},
create() {
@ -102,8 +101,8 @@ export default {
handleClose(done) {
this.formModel = {
configKey: '',
configValue: '',
description: ''
configValue: ''
// description: ''
};
this.$refs.dataform.resetForm();
if (done) {

View File

@ -18,8 +18,16 @@
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="摄像机" name="Vidicon">
<Vidicon
<el-tab-pane label="固定摄像机" name="vidicon">
<vidicon
ref="vidiconCloud"
style="width:90%"
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="云台摄像机" name="vidiconCloud">
<vidicon-cloud
ref="vidicon"
style="width:90%"
@createDataModel="createDataModel"
@ -67,6 +75,7 @@
import {deviceFactory} from '@/iscs/utils/parser';
import ManualAlarmButton from './manualAlarmButton';
import Vidicon from './vidicon';
import VidiconCloud from './vidiconCloud';
import FireHydranAlarmButton from './fireHydranAlarmButton';
import GasFireControl from './gasFireControl';
import SmokeDetector from './smokeDetector';
@ -77,6 +86,7 @@ export default {
components: {
ManualAlarmButton,
Vidicon,
VidiconCloud,
FireHydranAlarmButton,
GasFireControl,
SmokeDetector,

View File

@ -48,16 +48,26 @@ export default {
},
computed: {
...mapGetters('iscs', [
'buttonList'
'vidiconList'
])
},
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 model = {
_type: 'Vidicon',
code: `Vidicon_${this.buttonList.length + 1}`,
code: Uid,
width: this.addModel.width,
height: this.addModel.height,
content: this.addModel.content,

View File

@ -0,0 +1,126 @@
<template>
<div>
<el-form ref="form" :rule="rules" :model="addModel" label-width="100px">
<el-form-item label="半径">
<el-input-number v-model="addModel.r" />
</el-form-item>
<el-form-item label="X轴坐标">
<el-input-number v-model="addModel.x" />
</el-form-item>
<el-form-item label="Y轴坐标">
<el-input-number v-model="addModel.y" />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit()">{{ 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>
//
import { mapGetters } from 'vuex';
export default {
name: 'ManualAlarmButton',
data() {
return {
addModel:{
code: '',
r: 30,
x: 10,
y: 10
},
rules: {
width:[{ required: true, message:'请输入宽度', trigger: 'blur' }],
x: [{ required: true, message: '请输入X轴坐标', trigger: 'blur' }],
y: [{ required: true, message: '请输入Y轴坐标', trigger: 'blur' }]
},
showDeleteButton: false,
buttonText: '立即创建'
};
},
computed: {
...mapGetters('iscs', [
'vidiconCloudList'
])
},
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 model = {
_type: 'VidiconCloud',
code: Uid,
r: this.addModel.r,
point: {
x: this.addModel.x,
y: this.addModel.y
}
};
this.$emit('createDataModel', model);
this.initPage();
} else {
return false;
}
});
},
deleteDevice() {
// const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
// if (selected && selected._type.toUpperCase() === 'Psd'.toUpperCase()) {
// const _that = this;
// this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
// confirmButtonText: this.$t('tip.confirm'),
// cancelButtonText: this.$t('tip.cancel'),
// type: 'warning'
// }).then(() => {
// _that.$emit('updateMapModel', {...selected, _dispose: true});
// _that.deviceSelect();
// this.$refs.dataform.resetFields();
// }).catch(() => {
// _that.$message.info(this.$t('tip.cancelledDelete'));
// });
// }
const model = {
point: {
x: this.addModel.x,
y: this.addModel.y
},
code: this.addModel.code,
_type: 'VidiconCloud',
width: this.addModel.width
};
this.$emit('deleteDataModel', model);
this.initPage();
},
initPage() {
this.isUpdate = false;
this.buttonText = '立即创建';
this.showDeleteButton = false;
this.addModel = {
code: '',
r: 30,
x: 10,
y: 10
};
}
}
};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,103 @@
<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" />
</el-form-item>
<el-form-item label="X轴坐标" prop="x">
<el-input-number v-model="addModel.x" />
</el-form-item>
<el-form-item label="Y轴坐标" prop="y">
<el-input-number v-model="addModel.y" />
</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,
x: 10,
y: 10
},
rules: {
width:[{ 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: 'endDoor',
width: this.addModel.width
};
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: 'endDoor',
width: this.addModel.width
};
this.$emit('deleteDataModel', maButtonModel);
this.initPage();
},
initPage() {
this.isUpdate = false;
this.buttonText = '立即创建';
this.showDeleteButton = false;
this.addModel = {
code: '',
width: 25,
x: 10,
y: 10
};
},
generateCode() {
const mydate = new Date();
this.addModel.code = 'endDoor_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
}
}
};
</script>
<style scoped>
</style>

View File

@ -18,6 +18,14 @@
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="端头门" name="endDoor">
<end-door
ref="endDoor"
style="width: 90%;"
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
</el-tabs>
</el-card>
</div>
@ -26,11 +34,13 @@
<script>
import {deviceFactory} from '@/iscs/utils/parser';
import PlatformScreenDoor from './platformScreenDoor';
import EndDoor from './endDoor';
export default {
name: 'IscsOperate',
components: {
PlatformScreenDoor
PlatformScreenDoor,
EndDoor
},
mixins: [
],