iscs综合监控
This commit is contained in:
parent
95e5c9f603
commit
87e62a6631
@ -99,4 +99,41 @@ deviceRender[deviceType.BorderRadius] = {
|
|||||||
z: 4
|
z: 4
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** 闸机渲染配置 */
|
||||||
|
deviceRender[deviceType.BrakeMachine] = {
|
||||||
|
_type: deviceType.BrakeMachine,
|
||||||
|
zlevel: 1,
|
||||||
|
z: 4
|
||||||
|
};
|
||||||
|
/** 门禁渲染配置 */
|
||||||
|
deviceRender[deviceType.EntranceGuard] = {
|
||||||
|
_type: deviceType.EntranceGuard,
|
||||||
|
zlevel: 1,
|
||||||
|
z: 4
|
||||||
|
};
|
||||||
|
/** 自动售货机渲染配置 */
|
||||||
|
deviceRender[deviceType.TicketMachine] = {
|
||||||
|
_type: deviceType.TicketMachine,
|
||||||
|
zlevel: 1,
|
||||||
|
z:4
|
||||||
|
};
|
||||||
|
/** 半自动售货机渲染配置 */
|
||||||
|
deviceRender[deviceType.SemiAutomaticTicketMachine] = {
|
||||||
|
_type: deviceType.SemiAutomaticTicketMachine,
|
||||||
|
zlevel: 1,
|
||||||
|
z: 4
|
||||||
|
};
|
||||||
|
/** 空调机渲染配置 */
|
||||||
|
deviceRender[deviceType.AirConditioner] = {
|
||||||
|
_type: deviceType.AirConditioner,
|
||||||
|
zlevel: 1,
|
||||||
|
z: 4
|
||||||
|
};
|
||||||
|
/** 风量调节阀 */
|
||||||
|
deviceRender[deviceType.VolumeControlDamper] = {
|
||||||
|
_type: deviceType.VolumeControlDamper,
|
||||||
|
zlevel: 1,
|
||||||
|
z: 4
|
||||||
|
};
|
||||||
|
|
||||||
export default deviceRender;
|
export default deviceRender;
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
const deviceType = {
|
const deviceType = {
|
||||||
ManualAlarmButton: 'manualAlarmButton',
|
ManualAlarmButton: 'manualAlarmButton',
|
||||||
Vidicon: 'Vidicon',
|
Vidicon: 'Vidicon',
|
||||||
@ -13,7 +14,13 @@ const deviceType = {
|
|||||||
Chiller:'Chiller',
|
Chiller:'Chiller',
|
||||||
CoolTower:'CoolTower',
|
CoolTower:'CoolTower',
|
||||||
BorderRadius: 'borderRadius',
|
BorderRadius: 'borderRadius',
|
||||||
EndDoor: 'endDoor'
|
EndDoor: 'endDoor',
|
||||||
|
BrakeMachine: 'brakeMachine',
|
||||||
|
EntranceGuard: 'entranceGuard',
|
||||||
|
SemiAutomaticTicketMachine: 'semiAutomaticTicketMachine',
|
||||||
|
TicketMachine: 'ticketMachine',
|
||||||
|
AirConditioner: 'airConditioner',
|
||||||
|
VolumeControlDamper: 'volumeControlDamper'
|
||||||
};
|
};
|
||||||
|
|
||||||
export default deviceType;
|
export default deviceType;
|
||||||
|
27
src/iscs/shape/airConditioner.js
Normal file
27
src/iscs/shape/airConditioner.js
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
import Group from 'zrender/src/container/Group';
|
||||||
|
import createPathSvg from './components/pathsvg';
|
||||||
|
|
||||||
|
export default class AirConditioner 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.path = createPathSvg(this.model);
|
||||||
|
this.add(this.grouper);
|
||||||
|
this.grouper.add(this.path);
|
||||||
|
}
|
||||||
|
setModel(dx, dy) {
|
||||||
|
this.model.point.x += dx;
|
||||||
|
this.model.point.y += dy;
|
||||||
|
}
|
||||||
|
}
|
@ -1,6 +1,7 @@
|
|||||||
import Group from 'zrender/src/container/Group';
|
import Group from 'zrender/src/container/Group';
|
||||||
import Line from 'zrender/src/graphic/shape/Line';
|
import Line from 'zrender/src/graphic/shape/Line';
|
||||||
import Sector from 'zrender/src/graphic/shape/Sector';
|
import Sector from 'zrender/src/graphic/shape/Sector';
|
||||||
|
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||||
|
|
||||||
export default class BorderRadius extends Group {
|
export default class BorderRadius extends Group {
|
||||||
constructor(device) {
|
constructor(device) {
|
||||||
@ -24,8 +25,8 @@ export default class BorderRadius extends Group {
|
|||||||
cx: this.model.height / 2,
|
cx: this.model.height / 2,
|
||||||
cy: this.model.height / 2,
|
cy: this.model.height / 2,
|
||||||
r: this.model.height / 2,
|
r: this.model.height / 2,
|
||||||
startAngle: Math.PI * 2,
|
startAngle: Math.PI / 2,
|
||||||
endAngle: Math.PI
|
endAngle: Math.PI * 3 / 2
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
fill: 'rgba(0, 0, 0, 0.1)',
|
fill: 'rgba(0, 0, 0, 0.1)',
|
||||||
@ -39,46 +40,62 @@ export default class BorderRadius extends Group {
|
|||||||
cx: this.model.width - this.model.height / 2,
|
cx: this.model.width - this.model.height / 2,
|
||||||
cy: this.model.height / 2,
|
cy: this.model.height / 2,
|
||||||
r: this.model.height / 2,
|
r: this.model.height / 2,
|
||||||
startAngle: 0,
|
startAngle: Math.PI * 3 / 2,
|
||||||
endAngle: Math.PI
|
endAngle: Math.PI / 2
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
fill: 'rgba(0, 0, 0, 0.1)',
|
fill: 'rgba(0, 0, 0, 0.1)',
|
||||||
stroke: '#EBEE0C'
|
stroke: '#EBEE0C'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.topLine = new Line({
|
this.rect = new Rect({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z,
|
z: this.z,
|
||||||
shape: {
|
shape: {
|
||||||
x1: this.model.height / 2,
|
x: this.model.height / 2,
|
||||||
y1: 0,
|
y: 0,
|
||||||
x2: this.model.width - this.model.height / 2,
|
width: this.model.width - this.model.height,
|
||||||
y2: 0
|
height: this.model.height
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
lineWidth: 2,
|
fill: '#000',
|
||||||
stroke: '#EBEE0C'
|
stroke: '#EBEE0C'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.bottomLine = new Line({
|
this.leftLine = new Line({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z,
|
z: this.z + 1,
|
||||||
shape: {
|
shape: {
|
||||||
x1: this.model.height / 2,
|
x1: this.model.height / 2,
|
||||||
y1: this.model.height,
|
y1: 0,
|
||||||
|
x2: this.model.height / 2,
|
||||||
|
y2: this.model.height
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
lineWidth: 3,
|
||||||
|
stroke: '#000'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.rightLine = new Line({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z + 1,
|
||||||
|
shape: {
|
||||||
|
x1: this.model.width - this.model.height / 2,
|
||||||
|
y1: 0,
|
||||||
x2: this.model.width - this.model.height / 2,
|
x2: this.model.width - this.model.height / 2,
|
||||||
y2: this.model.height
|
y2: this.model.height
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
lineWidth: 2,
|
lineWidth: 3,
|
||||||
stroke: '#EBEE0C'
|
stroke: '#000'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.grouper.add(this.leftSector);
|
this.grouper.add(this.leftSector);
|
||||||
this.grouper.add(this.rightSector);
|
this.grouper.add(this.rightSector);
|
||||||
this.grouper.add(this.bottomLine);
|
this.grouper.add(this.leftLine);
|
||||||
this.grouper.add(this.topLine);
|
this.grouper.add(this.rightLine);
|
||||||
|
this.grouper.add(this.rect);
|
||||||
|
this.add(this.grouper);
|
||||||
}
|
}
|
||||||
setModel(dx, dy) {
|
setModel(dx, dy) {
|
||||||
this.model.point.x += dx;
|
this.model.point.x += dx;
|
||||||
|
27
src/iscs/shape/brakeMachine.js
Normal file
27
src/iscs/shape/brakeMachine.js
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
import Group from 'zrender/src/container/Group';
|
||||||
|
import createPathSvg from './components/pathsvg';
|
||||||
|
|
||||||
|
export default class BrakeMachine 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.path = createPathSvg(this.model);
|
||||||
|
this.add(this.grouper);
|
||||||
|
this.grouper.add(this.path);
|
||||||
|
}
|
||||||
|
setModel(dx, dy) {
|
||||||
|
this.model.point.x += dx;
|
||||||
|
this.model.point.y += dy;
|
||||||
|
}
|
||||||
|
}
|
@ -3,6 +3,26 @@ const map = {
|
|||||||
VidiconCloud: {
|
VidiconCloud: {
|
||||||
scale: [0.02, 0.02],
|
scale: [0.02, 0.02],
|
||||||
path: 'M917.749663 10.405886C911.585184 3.624959 902.758306 0.937984 893.583268 0 431.820819 9.342974 145.285208 116.940772 41.943153 319.811507-35.676029 472.166287 16.281719 643.911525 70.123626 722.186067c6.225919 9.072638 16.609276 14.909436 27.627513 13.783036a31.850488 31.850488 0 0 0 26.316794-16.261116c63.201265-112.455653 187.985875-295.958457 368.517032-386.613155-68.669424 89.593834-177.418197 237.273031-282.726332 404.778911-10.301438 14.069757-87.388139 125.62429-48.435189 262.901697A31.913976 31.913976 0 0 0 192.041037 1023.999754a31.014905 31.014905 0 0 0 8.765438-1.228799 32.00204 32.00204 0 0 0 21.893114-39.546871c-22.958074-80.855021 6.901758-152.575963 25.661434-186.695635 128.880609 54.415347 249.40538 53.637107 350.085036-2.785279 172.380119-96.645097 282.562492-351.743916 327.454642-758.210379a32.255992 32.255992 0 0 0-8.151038-25.126905zM567.377907 737.873743c-81.51038 45.690869-177.029078 46.940149-284.385212 3.788799 15.421436-24.104954 30.822393-47.513589 46.141429-70.533103l219.197387-31.436793a32.01228 32.01228 0 0 0-9.011198-63.385584l-161.710041 23.203834c13.250557-19.169275 26.173434-37.580791 38.871031-55.521267a30.595065 30.595065 0 0 0 6.184958-0.614399l159.272922-31.989753a32.028664 32.028664 0 0 0 24.985594-37.662711 31.651832 31.651832 0 0 0-37.498871-25.108474l-98.488296 19.783676c81.96094-111.742949 141.066206-183.898068 142.069726-185.139156a32.11468 32.11468 0 0 0 2.375679-37.531639 31.743992 31.743992 0 0 0-34.815991-13.844477c-85.503979 22.001659-161.484761 63.657969-227.860426 114.608101v-58.490866a31.856632 31.856632 0 1 0-63.713264 0v112.672741c-22.630395 21.202939-43.868149 43.231222-63.713265 65.574896v-101.715943a31.846392 31.846392 0 1 0-63.692785 0v179.458004c0 0.24576 0.12288 0.43008 0.12288 0.67584-24.289274 32.665592-45.711349 64.614384-63.897585 94.064618-28.344313-67.071984-54.251507-181.637076 0.83968-289.761211C186.593358 176.322518 448.921615 78.374893 858.337197 64.968688c-44.646389 363.374505-142.479326 589.653874-290.95929 672.905055z m339.353518-145.653725c-10.874877-21.626875-45.957109-21.626875-56.852466 0-19.189755 38.256631-114.872292 232.120264-114.872293 294.625209 0 75.612142 64.286705 137.154527 143.298526 137.154527s143.319006-61.542385 143.319006-137.154527c0-62.504945-95.703017-256.368578-114.892773-294.625209z m-28.426233 367.574952c-43.909109 0-79.605741-32.727032-79.605741-72.949743 0-27.770873 40.44799-123.96541 79.605741-207.09371 39.157751 83.1283 79.626221 179.322837 79.626221 207.09371 0 40.22271-35.696631 72.949742-79.626221 72.949743z'
|
path: 'M917.749663 10.405886C911.585184 3.624959 902.758306 0.937984 893.583268 0 431.820819 9.342974 145.285208 116.940772 41.943153 319.811507-35.676029 472.166287 16.281719 643.911525 70.123626 722.186067c6.225919 9.072638 16.609276 14.909436 27.627513 13.783036a31.850488 31.850488 0 0 0 26.316794-16.261116c63.201265-112.455653 187.985875-295.958457 368.517032-386.613155-68.669424 89.593834-177.418197 237.273031-282.726332 404.778911-10.301438 14.069757-87.388139 125.62429-48.435189 262.901697A31.913976 31.913976 0 0 0 192.041037 1023.999754a31.014905 31.014905 0 0 0 8.765438-1.228799 32.00204 32.00204 0 0 0 21.893114-39.546871c-22.958074-80.855021 6.901758-152.575963 25.661434-186.695635 128.880609 54.415347 249.40538 53.637107 350.085036-2.785279 172.380119-96.645097 282.562492-351.743916 327.454642-758.210379a32.255992 32.255992 0 0 0-8.151038-25.126905zM567.377907 737.873743c-81.51038 45.690869-177.029078 46.940149-284.385212 3.788799 15.421436-24.104954 30.822393-47.513589 46.141429-70.533103l219.197387-31.436793a32.01228 32.01228 0 0 0-9.011198-63.385584l-161.710041 23.203834c13.250557-19.169275 26.173434-37.580791 38.871031-55.521267a30.595065 30.595065 0 0 0 6.184958-0.614399l159.272922-31.989753a32.028664 32.028664 0 0 0 24.985594-37.662711 31.651832 31.651832 0 0 0-37.498871-25.108474l-98.488296 19.783676c81.96094-111.742949 141.066206-183.898068 142.069726-185.139156a32.11468 32.11468 0 0 0 2.375679-37.531639 31.743992 31.743992 0 0 0-34.815991-13.844477c-85.503979 22.001659-161.484761 63.657969-227.860426 114.608101v-58.490866a31.856632 31.856632 0 1 0-63.713264 0v112.672741c-22.630395 21.202939-43.868149 43.231222-63.713265 65.574896v-101.715943a31.846392 31.846392 0 1 0-63.692785 0v179.458004c0 0.24576 0.12288 0.43008 0.12288 0.67584-24.289274 32.665592-45.711349 64.614384-63.897585 94.064618-28.344313-67.071984-54.251507-181.637076 0.83968-289.761211C186.593358 176.322518 448.921615 78.374893 858.337197 64.968688c-44.646389 363.374505-142.479326 589.653874-290.95929 672.905055z m339.353518-145.653725c-10.874877-21.626875-45.957109-21.626875-56.852466 0-19.189755 38.256631-114.872292 232.120264-114.872293 294.625209 0 75.612142 64.286705 137.154527 143.298526 137.154527s143.319006-61.542385 143.319006-137.154527c0-62.504945-95.703017-256.368578-114.892773-294.625209z m-28.426233 367.574952c-43.909109 0-79.605741-32.727032-79.605741-72.949743 0-27.770873 40.44799-123.96541 79.605741-207.09371 39.157751 83.1283 79.626221 179.322837 79.626221 207.09371 0 40.22271-35.696631 72.949742-79.626221 72.949743z'
|
||||||
|
},
|
||||||
|
brakeMachine: {
|
||||||
|
width: 159,
|
||||||
|
path: 'M160,101H1V82l46.013-.289c8.016-5.064,38.681-23.717,63.8-29.188C85.244,47.006,53.8,27.621,46.55,23H1V4L160,3V23H141.512c1.7,4.784,3.5,23.827-9.675,29.436,12.815,5.166,11.856,22.742,10.254,28.676L160,81v20ZM22,87H10v9l12,0.083V87ZM22,9H10v9l12,0.083V9ZM154,9H29v9.132L154,19V9ZM132.222,23H58.7c9.442,5.485,55.744,31.358,70.3,20C134.869,38.421,132.945,26.523,132.222,23Zm-2.953,39c-14.3-11.122-59.136,13.454-69.891,19.633l73.284-.461C133.452,76.9,134.758,66.27,129.269,62ZM154,87H29v9.132L154,97V87Z'
|
||||||
|
},
|
||||||
|
ticketMachine: {
|
||||||
|
width: 107,
|
||||||
|
path: 'M102,42H96V24h6V42ZM83,27h6v9H83V27ZM22,38H16V29h6v9Zm7-4V27H44V43H26V36h5v2h8V32H34v2H29Zm32,0V27H76V43H58V36h5v2h8V32H66v2H61Zm24,6V50H14V42h4v4H81V40h4ZM95,61H89V45h6V61ZM85,21H25v6H19V16H91v8H85V21ZM12,60V52H85v8H81V56H16v4H12Zm98.509,65L91,138.919V140H4V63h6v3h8V61h5v5h8V61h5v5h5V61h5v5H57V61h5v5h7V58h5v8h4V63h5v8H10v2H85V63h6v68.548l14-9.988V9H20.251l-0.659,1H102V21H96V14H17V13.935L16.957,14H17V28H11V15.089L9.644,14.2,16,4.547V3h1.019l0.327-.5L18.1,3H111V125h-0.491ZM85,78H10v56H85V78ZM31,95l8,23H33l-1.826-6H25.826L24,118H18l8-23h5Zm-1.044,13L28.5,103.214,27.044,108h2.913Zm12.9-14L46.5,108.786,50.143,94H55l-6.476,23H44.476L38,94h4.857ZM60,95h4l4,13.333L72,95h5l2,22H75l-1.3-14.326L70,115H66l-3.7-12.326L61,117H57l2-22h1ZM10,59H4V31h6V59Z'
|
||||||
|
},
|
||||||
|
semiAutomaticTicketMachine: {
|
||||||
|
width: 107,
|
||||||
|
path: 'M169,104h-6V86h6v18ZM150,89h6v9h-6V89ZM89,100H83V91h6v9Zm7-4V89h15v16H93V98h5v2h8V94h-5v2H96Zm32,0V89h15v16H125V98h5v2h8V94h-5v2h-5Zm24,6v10H81v-8h4v4h63v-6h4Zm10,21h-6V107h6v16ZM152,83H92v6H86V78h72v8h-6V83ZM79,122v-8h73v8h-4v-4H83v4H79Zm98.509,65L158,200.919V202H71V125h6v3h8v-5h5v5h8v-5h5v5h5v-5h5v5h11v-5h5v5h7v-8h5v8h4v-3h5v8H77v2h75V125h6v68.548l14-9.988V71H87.251l-0.659,1H169V83h-6V76H84V75.935L83.957,76H84V90H78V77.089L76.644,76.2,83,66.547V65h1.019l0.327-.5L85.1,65H178V187h-0.491ZM152,140H77v56h75V140ZM98,164.882c-0.086,2.392-3.312,3.289-6.116,3.616a17.317,17.317,0,0,0-4.1.165,28.262,28.262,0,0,0,4.1-.165c3.22,0.281,6.956,1.758,5.638,7.378C96.7,179.378,85,178.968,85,178.968V158.359S98.327,155.743,98,164.882ZM88,176.176s6.134,0.926,6-2.823c-0.126-3.527-6-2.824-6-2.824v5.647Zm0-9.411s5.2,0.959,6-1.883c1.046-3.717-6-3.764-6-3.764v5.647ZM109.5,158c4.694,0,8.5,4.925,8.5,11s-3.806,11-8.5,11-8.5-4.925-8.5-11S104.806,158,109.5,158ZM109,176c3.3,0.056,5.091-3.366,5-8-0.076-3.884-1.747-5.728-4-6s-4.973,2.36-5,7C104.981,172.375,105.106,175.934,109,176Zm14-18h4l4,13.333L135,158h5l2,22h-4l-1.3-14.326L133,178h-4l-3.7-12.326L124,180h-4l2-22h1ZM77,121H71V93h6v28Z'
|
||||||
|
},
|
||||||
|
airConditioner: {
|
||||||
|
width: 147,
|
||||||
|
path: 'M3,77V2L150,3V78ZM24,14H17V65h7V14Zm7-8H28v4h3V6Zm0,8H28V65h3V14ZM147,6H35v4h8V68l-8,.06V72H31V68.09l-3,.022V72H24V68.142l-11,.082V10H24V6H6V74H147V6ZM35,14V65h5V14H35ZM76,68l-30,.224V10H76V68ZM59,56H52.625A8.285,8.285,0,0,0,59,60.912V56Zm0-3V45.225c-3.36.708-7.185,3.154-7,7.775h7Zm4,0h6c0-2.946-1.113-6.969-6-7.827V53Zm0,3v4.593A8.015,8.015,0,0,0,68.387,56H63ZM49,65H59V64.906a12.456,12.456,0,0,1-10-7.2V65Zm0-51v5.294A12.172,12.172,0,0,1,53.6,14H49Zm10,2.225c-3.36.708-7.185,3.154-7,7.775h7V16.225ZM59,27H52.625A8.285,8.285,0,0,0,59,31.912V27Zm4-10.827V24h6C69,21.054,67.887,17.031,63,16.173ZM63,27v4.593A8.015,8.015,0,0,0,68.387,27H63ZM73,53V14H67.4A11.87,11.87,0,0,1,73,24,12.258,12.258,0,0,1,60.5,36,12.522,12.522,0,0,1,49,28.706V48.294a12.456,12.456,0,0,1,10-7.2V41h4v0.241a11.914,11.914,0,0,1,0,23.518V65H73V53Zm28-35a19.912,19.912,0,0,1,7,1.284V19h23V39H120.95A19.984,19.984,0,0,1,101,58c-11.046,0-21-8.954-21-20S89.954,18,101,18Zm27,17V23H114.2a19.935,19.935,0,0,1,6.553,12H128ZM84,39c0.594,8.917,8.91,15.731,19,15,10.255-.743,14.645-9.489,15-15,0.594-9.238-6.151-16.7-17-17S83.406,30.083,84,39Zm17.707-9a8.5,8.5,0,0,1,0,17A8.755,8.755,0,0,1,93,38.5,8.755,8.755,0,0,1,101.707,30ZM96,39c0.246,3.79,1.817,4.311,6,4,4.252-.316,4.853-1.658,5-4,0.246-3.926-.5-4.874-5-5S95.754,35.21,96,39Z'
|
||||||
|
},
|
||||||
|
volumeControlDamper: {
|
||||||
|
width: 42,
|
||||||
|
path: 'M3,36H43V99H3V36Zm4,3H40V96H7V39Zm6,4H34V63H13V43Zm0,30H34V93H13V73Zm20,2h8v5H33V75Zm0-20h8v5H33V55ZM20,29h5v8H20V29ZM23,3C34.6,3,44,9.268,44,17S34.6,31,23,31,2,24.732,2,17,11.4,3,23,3Zm0,4c12.261,0,16,6.134,16,10s-3.72,8.837-15,9S8,20.866,8,17,10.74,7,23,7ZM14,25V7l4-1,6,7,4-6,5,1V26H28V16l-4,4-5-4V26ZM27,62h5V75H27V62ZM15.617,88.076l2.649,3.265L9.777,98.228,7.128,94.963ZM13.4,45.987l2.619-3.215L7.622,35.991,5,39.206Z'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -12,6 +32,7 @@ export default function createPathSvg(model) {
|
|||||||
fill: model.fill || '#00FF00'
|
fill: model.fill || '#00FF00'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
svg.scale = map[model._type].scale;
|
const scaleX = model.width / map[model._type].width;
|
||||||
|
svg.scale = [scaleX, scaleX];
|
||||||
return svg;
|
return svg;
|
||||||
}
|
}
|
||||||
|
56
src/iscs/shape/entranceGuard/close.js
Normal file
56
src/iscs/shape/entranceGuard/close.js
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
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 CloseEntranceGuard extends Group {
|
||||||
|
constructor(device) {
|
||||||
|
super();
|
||||||
|
this.model = device.model;
|
||||||
|
this.zlevel = device.model.zlevel;
|
||||||
|
this.z = device.model.z;
|
||||||
|
this.create();
|
||||||
|
}
|
||||||
|
create() {
|
||||||
|
this.door = new Rect({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
shape: {
|
||||||
|
x: 0,
|
||||||
|
y: 0,
|
||||||
|
width: this.model.width,
|
||||||
|
height: this.model.width * 16 / 13
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
fill: '#33CC00'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.doorWindow = new Rect({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
shape: {
|
||||||
|
x: this.model.width / 8,
|
||||||
|
y: this.model.width * 4 / 13,
|
||||||
|
width: this.model.width * 3 / 4,
|
||||||
|
height: this.model.width * 6 / 17
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
fill: '#000'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.doorknob = new Circle({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
shape: {
|
||||||
|
cx: this.model.width * 9 / 13,
|
||||||
|
cy: this.model.width * 11 / 13,
|
||||||
|
r: this.model.width / 16
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
fill: '#000'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.add(this.door);
|
||||||
|
this.add(this.doorWindow);
|
||||||
|
this.add(this.doorknob);
|
||||||
|
}
|
||||||
|
}
|
43
src/iscs/shape/entranceGuard/index.js
Normal file
43
src/iscs/shape/entranceGuard/index.js
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
import Group from 'zrender/src/container/Group';
|
||||||
|
import CloseEntranceGuard from './close';
|
||||||
|
import OpenEntranceGuard from './open';
|
||||||
|
|
||||||
|
export default class EntranceGuard 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.closeEntranceGuard = new CloseEntranceGuard({
|
||||||
|
model:{
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
width: this.model.width
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.openEntranceGuard = new OpenEntranceGuard({
|
||||||
|
model: {
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
width: this.model.width
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.add(this.grouper);
|
||||||
|
this.grouper.add(this.closeEntranceGuard);
|
||||||
|
this.grouper.add(this.openEntranceGuard);
|
||||||
|
this.closeEntranceGuard.hide();
|
||||||
|
}
|
||||||
|
setModel(dx, dy) {
|
||||||
|
this.model.point.x += dx;
|
||||||
|
this.model.point.y += dy;
|
||||||
|
}
|
||||||
|
}
|
44
src/iscs/shape/entranceGuard/open.js
Normal file
44
src/iscs/shape/entranceGuard/open.js
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import Group from 'zrender/src/container/Group';
|
||||||
|
import Polygon from 'zrender/src/graphic/shape/Polygon';
|
||||||
|
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||||
|
|
||||||
|
export default class openEntranceGuard extends Group {
|
||||||
|
constructor(device) {
|
||||||
|
super();
|
||||||
|
this.model = device.model;
|
||||||
|
this.zlevel = device.model.zlevel;
|
||||||
|
this.z = device.model.z;
|
||||||
|
this.create();
|
||||||
|
}
|
||||||
|
create() {
|
||||||
|
this.door = new Rect({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
shape:{
|
||||||
|
x: 0,
|
||||||
|
y: 0,
|
||||||
|
width: this.model.width,
|
||||||
|
height: this.model.width * 16 / 13
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
lineWidth: 3,
|
||||||
|
fill: '#000',
|
||||||
|
stroke: '#0F0'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.openDoor = new Polygon({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
shape:{
|
||||||
|
points: [[0, 0], [this.model.width * 5 / 13, 0], [this.model.width * 11 / 13, this.model.width * 3 / 13], [this.model.width * 11 / 13, this.model.width * 19 / 13],
|
||||||
|
[this.model.width * 5 / 13, this.model.width * 16 / 13], [0, this.model.width * 16 / 13]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
fill: '#0F0'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.add(this.door);
|
||||||
|
this.add(this.openDoor);
|
||||||
|
}
|
||||||
|
}
|
@ -14,6 +14,12 @@ import Chiller from './bas/chiller';
|
|||||||
import CoolTower from './bas/coolTower';
|
import CoolTower from './bas/coolTower';
|
||||||
import EndDoor from './endDoor';
|
import EndDoor from './endDoor';
|
||||||
import BorderRadius from './borderRadius';
|
import BorderRadius from './borderRadius';
|
||||||
|
import BrakeMachine from './brakeMachine';
|
||||||
|
import EntranceGuard from './entranceGuard/index';
|
||||||
|
import SemiAutomaticTicketMachine from './semiAutomaticTicketMachine';
|
||||||
|
import TicketMachine from './ticketMachine';
|
||||||
|
import AirConditioner from './airConditioner';
|
||||||
|
import VolumeControlDamper from './volumeControlDamper';
|
||||||
|
|
||||||
const iscsShape = {};
|
const iscsShape = {};
|
||||||
iscsShape[deviceType.ManualAlarmButton] = ManualAlarmButton;
|
iscsShape[deviceType.ManualAlarmButton] = ManualAlarmButton;
|
||||||
@ -31,6 +37,12 @@ iscsShape[deviceType.Chiller] = Chiller;
|
|||||||
iscsShape[deviceType.CoolTower] = CoolTower;
|
iscsShape[deviceType.CoolTower] = CoolTower;
|
||||||
iscsShape[deviceType.EndDoor] = EndDoor;
|
iscsShape[deviceType.EndDoor] = EndDoor;
|
||||||
iscsShape[deviceType.BorderRadius] = BorderRadius;
|
iscsShape[deviceType.BorderRadius] = BorderRadius;
|
||||||
|
iscsShape[deviceType.BrakeMachine] = BrakeMachine;
|
||||||
|
iscsShape[deviceType.EntranceGuard] = EntranceGuard;
|
||||||
|
iscsShape[deviceType.SemiAutomaticTicketMachine] = SemiAutomaticTicketMachine;
|
||||||
|
iscsShape[deviceType.TicketMachine] = TicketMachine;
|
||||||
|
iscsShape[deviceType.AirConditioner] = AirConditioner;
|
||||||
|
iscsShape[deviceType.VolumeControlDamper] = VolumeControlDamper;
|
||||||
|
|
||||||
function shapefactory(device, iscs) {
|
function shapefactory(device, iscs) {
|
||||||
const type = device.model._type;
|
const type = device.model._type;
|
||||||
|
27
src/iscs/shape/semiAutomaticTicketMachine.js
Normal file
27
src/iscs/shape/semiAutomaticTicketMachine.js
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
import Group from 'zrender/src/container/Group';
|
||||||
|
import createPathSvg from './components/pathsvg';
|
||||||
|
|
||||||
|
export default class SemiAutomaticTicketMachine 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.path = createPathSvg(this.model);
|
||||||
|
this.add(this.grouper);
|
||||||
|
this.grouper.add(this.path);
|
||||||
|
}
|
||||||
|
setModel(dx, dy) {
|
||||||
|
this.model.point.x += dx;
|
||||||
|
this.model.point.y += dy;
|
||||||
|
}
|
||||||
|
}
|
27
src/iscs/shape/ticketMachine.js
Normal file
27
src/iscs/shape/ticketMachine.js
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
import Group from 'zrender/src/container/Group';
|
||||||
|
import createPathSvg from './components/pathsvg';
|
||||||
|
|
||||||
|
export default class TicketMachine 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.path = createPathSvg(this.model);
|
||||||
|
this.add(this.grouper);
|
||||||
|
this.grouper.add(this.path);
|
||||||
|
}
|
||||||
|
setModel(dx, dy) {
|
||||||
|
this.model.point.x += dx;
|
||||||
|
this.model.point.y += dy;
|
||||||
|
}
|
||||||
|
}
|
27
src/iscs/shape/volumeControlDamper.js
Normal file
27
src/iscs/shape/volumeControlDamper.js
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
import Group from 'zrender/src/container/Group';
|
||||||
|
import createPathSvg from './components/pathsvg';
|
||||||
|
|
||||||
|
export default class VolumeControlDamper 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.path = createPathSvg(this.model);
|
||||||
|
this.add(this.grouper);
|
||||||
|
this.grouper.add(this.path);
|
||||||
|
}
|
||||||
|
setModel(dx, dy) {
|
||||||
|
this.model.point.x += dx;
|
||||||
|
this.model.point.y += dy;
|
||||||
|
}
|
||||||
|
}
|
@ -86,6 +86,18 @@ export function parser(data) {
|
|||||||
zrUtil.each(data.borderRadiusList || [], elem =>{
|
zrUtil.each(data.borderRadiusList || [], elem =>{
|
||||||
iscsDevice[elem.code] = deviceFactory(deviceType.BorderRadius, elem);
|
iscsDevice[elem.code] = deviceFactory(deviceType.BorderRadius, elem);
|
||||||
} );
|
} );
|
||||||
|
zrUtil.each(data.brakeMachineList || [], elem =>{
|
||||||
|
iscsDevice[elem.code] = deviceFactory(deviceType.BrakeMachine, elem);
|
||||||
|
});
|
||||||
|
zrUtil.each(data.entranceGuardList || [], elem =>{
|
||||||
|
iscsDevice[elem.code] = deviceFactory(deviceType.EntranceGuard, elem);
|
||||||
|
});
|
||||||
|
zrUtil.each(data.ticketMachineList || [], elem =>{
|
||||||
|
iscsDevice[elem.code] = deviceFactory(deviceType.TicketMachine, elem);
|
||||||
|
});
|
||||||
|
zrUtil.each(data.semiAutomaticTicketMachineList || [], elem =>{
|
||||||
|
iscsDevice[elem.code] = deviceFactory(deviceType.SemiAutomaticTicketMachine, elem);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return iscsDevice;
|
return iscsDevice;
|
||||||
@ -149,7 +161,19 @@ export function updateIscsData(device) {
|
|||||||
updateIscsListByDevice(iscsData, 'endDoorList', device);
|
updateIscsListByDevice(iscsData, 'endDoorList', device);
|
||||||
break;
|
break;
|
||||||
case deviceType.BorderRadius:
|
case deviceType.BorderRadius:
|
||||||
updateIscsListByDevice(iscsData, 'borderRadius', device);
|
updateIscsListByDevice(iscsData, 'borderRadiusList', device);
|
||||||
|
break;
|
||||||
|
case deviceType.BrakeMachine:
|
||||||
|
updateIscsListByDevice(iscsData, 'brakeMachineList', device);
|
||||||
|
break;
|
||||||
|
case deviceType.EntranceGuard:
|
||||||
|
updateIscsListByDevice(iscsData, 'entranceGuardList', device);
|
||||||
|
break;
|
||||||
|
case deviceType.TicketMachine:
|
||||||
|
updateIscsListByDevice(iscsData, 'ticketMachineList', device);
|
||||||
|
break;
|
||||||
|
case deviceType.SemiAutomaticTicketMachine:
|
||||||
|
updateIscsListByDevice(iscsData, 'semiAutomaticTicketMachineList', device);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,11 +3,11 @@ export function getBaseUrl() {
|
|||||||
let BASE_API;
|
let BASE_API;
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
// BASE_API = 'https://joylink.club/jlcloud';
|
// 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.5:9000'; // 袁琪
|
||||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||||
// BASE_API = 'http://192.168.3.41: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 {
|
} else {
|
||||||
BASE_API = process.env.VUE_APP_BASE_API;
|
BASE_API = process.env.VUE_APP_BASE_API;
|
||||||
}
|
}
|
||||||
|
@ -109,6 +109,18 @@ export default {
|
|||||||
mode: 'cctv',
|
mode: 'cctv',
|
||||||
id: '4',
|
id: '4',
|
||||||
type: 'interface'
|
type: 'interface'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'AFC界面',
|
||||||
|
mode: 'afc',
|
||||||
|
id: '5',
|
||||||
|
type: 'interface'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'ACS界面',
|
||||||
|
mode: 'acs',
|
||||||
|
id: '5',
|
||||||
|
type: 'interface'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,8 @@
|
|||||||
<iscs-bas-operate v-else-if="iscsMode==='bas'" ref="iscsBasOperate" @iscsChange="iscsChange" />
|
<iscs-bas-operate v-else-if="iscsMode==='bas'" ref="iscsBasOperate" @iscsChange="iscsChange" />
|
||||||
<iscs-psd-operate v-else-if="iscsMode==='psd'" ref="iscsPsdOperate" @iscsChange="iscsChange" />
|
<iscs-psd-operate v-else-if="iscsMode==='psd'" ref="iscsPsdOperate" @iscsChange="iscsChange" />
|
||||||
<iscs-cctv-operate v-else-if="iscsMode==='cctv'" ref="iscsCctvOperate" @iscsChange="iscsChange" />
|
<iscs-cctv-operate v-else-if="iscsMode==='cctv'" ref="iscsCctvOperate" @iscsChange="iscsChange" />
|
||||||
|
<iscs-afc-operate v-else-if="iscsMode==='afc'" ref="iscsAfcOperate" @iscsChange="iscsChange" />
|
||||||
|
<iscs-acs-operate v-else-if="iscsMode==='acs'" ref="iscsAcsOperate" @iscsChange="iscsChange" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
@ -19,6 +21,8 @@ import IscsOperate from './iscsOperate/index';
|
|||||||
import IscsBasOperate from './iscsBasOperate/index';
|
import IscsBasOperate from './iscsBasOperate/index';
|
||||||
import IscsPsdOperate from './iscsPsdOperate/index';
|
import IscsPsdOperate from './iscsPsdOperate/index';
|
||||||
import IscsCctvOperate from './iscsCctvOperate/index';
|
import IscsCctvOperate from './iscsCctvOperate/index';
|
||||||
|
import IscsAfcOperate from './iscsAfcOperate/index';
|
||||||
|
import IscsAcsOperate from './iscsAcsOperate/index';
|
||||||
export default {
|
export default {
|
||||||
name: 'IscsView',
|
name: 'IscsView',
|
||||||
components: {
|
components: {
|
||||||
@ -26,7 +30,9 @@ export default {
|
|||||||
IscsOperate,
|
IscsOperate,
|
||||||
IscsBasOperate,
|
IscsBasOperate,
|
||||||
IscsPsdOperate,
|
IscsPsdOperate,
|
||||||
IscsCctvOperate
|
IscsCctvOperate,
|
||||||
|
IscsAfcOperate,
|
||||||
|
IscsAcsOperate
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
103
src/views/system/iscsDraw/iscsAcsOperate/entranceGuard.vue
Normal file
103
src/views/system/iscsDraw/iscsAcsOperate/entranceGuard.vue
Normal 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: 'entranceGuard',
|
||||||
|
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: 'entranceGuard',
|
||||||
|
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 = 'entranceGuard_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
85
src/views/system/iscsDraw/iscsAcsOperate/index.vue
Normal file
85
src/views/system/iscsDraw/iscsAcsOperate/index.vue
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
<template>
|
||||||
|
<transition name="el-zoom-in-center">
|
||||||
|
<div class="map-control heightClass ">
|
||||||
|
<el-card type="border-card" class="heightClass">
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
style="float: right; padding: 3px 0; margin-right: 5px;"
|
||||||
|
@click="handleSave"
|
||||||
|
>{{ $t('ibp.save') }}</el-button>
|
||||||
|
</div>
|
||||||
|
<el-tabs v-model="enabledTab" class="mapEdit" type="card" @tab-click="handleTabClick">
|
||||||
|
<el-tab-pane label="门禁" name="entranceGuard">
|
||||||
|
<entrance-guard
|
||||||
|
ref="entranceGuard"
|
||||||
|
style="width: 90%;"
|
||||||
|
@createDataModel="createDataModel"
|
||||||
|
@deleteDataModel="deleteDataModel"
|
||||||
|
/>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {deviceFactory} from '@/iscs/utils/parser';
|
||||||
|
import EntranceGuard from './entranceGuard';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'IscsAcsOperate',
|
||||||
|
components: {
|
||||||
|
EntranceGuard
|
||||||
|
},
|
||||||
|
mixins: [
|
||||||
|
],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
enabledTab: 'entranceGuard',
|
||||||
|
data: '',
|
||||||
|
stationCode: ''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
height() {
|
||||||
|
return this.$store.state.config.height;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
'$store.state.iscs.rightClickCount': function (val) {
|
||||||
|
const model = this.$store.getters['iscs/updateDeviceData'];
|
||||||
|
this.enabledTab = model._type;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
createDataModel(model) {
|
||||||
|
const newModel = deviceFactory(model._type, model);
|
||||||
|
this.$store.dispatch('iscs/updateIscsDevices', newModel.model);
|
||||||
|
},
|
||||||
|
deleteDataModel(model) {
|
||||||
|
this.$store.dispatch('iscs/deleteIscsDevices', model);
|
||||||
|
},
|
||||||
|
handleSave() {
|
||||||
|
const data = JSON.stringify(this.$store.state.iscs.iscs);
|
||||||
|
console.log(data);
|
||||||
|
},
|
||||||
|
handleTabClick() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
@import "src/styles/mixin.scss";
|
||||||
|
.map-control {
|
||||||
|
float: right;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.heightClass{height:100%;}
|
||||||
|
</style>
|
103
src/views/system/iscsDraw/iscsAfcOperate/brakeMachine.vue
Normal file
103
src/views/system/iscsDraw/iscsAfcOperate/brakeMachine.vue
Normal 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: 'BrakeMachine',
|
||||||
|
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: 'brakeMachine',
|
||||||
|
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: 'brakeMachine',
|
||||||
|
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 = 'brakeMachine_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
105
src/views/system/iscsDraw/iscsAfcOperate/index.vue
Normal file
105
src/views/system/iscsDraw/iscsAfcOperate/index.vue
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
<template>
|
||||||
|
<transition name="el-zoom-in-center">
|
||||||
|
<div class="map-control heightClass ">
|
||||||
|
<el-card type="border-card" class="heightClass">
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
style="float: right; padding: 3px 0; margin-right: 5px;"
|
||||||
|
@click="handleSave"
|
||||||
|
>{{ $t('ibp.save') }}</el-button>
|
||||||
|
</div>
|
||||||
|
<el-tabs v-model="enabledTab" class="mapEdit" type="card" @tab-click="handleTabClick">
|
||||||
|
<el-tab-pane label="闸机" name="brakeMachine">
|
||||||
|
<brake-machine
|
||||||
|
ref="brakeMachine"
|
||||||
|
style="width: 90%;"
|
||||||
|
@createDataModel="createDataModel"
|
||||||
|
@deleteDataModel="deleteDataModel"
|
||||||
|
/>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="自动售货机" name="ticketMachine">
|
||||||
|
<ticket-machine
|
||||||
|
ref="ticketMachine"
|
||||||
|
style="width: 90%"
|
||||||
|
@createDataModel="createDataModel"
|
||||||
|
@deleteDataModel="deleteDataModel"
|
||||||
|
/>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="半自动售货机" name="semiAutomaticTicketMachine">
|
||||||
|
<semi-automatic-ticket-machine
|
||||||
|
ref="semiAutomaticTicketMachine"
|
||||||
|
style="width: 90%"
|
||||||
|
@createDataModel="createDataModel"
|
||||||
|
@deleteDataModel="deleteDataModel"
|
||||||
|
/>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {deviceFactory} from '@/iscs/utils/parser';
|
||||||
|
import BrakeMachine from './brakeMachine';
|
||||||
|
import TicketMachine from './ticketMachine';
|
||||||
|
import SemiAutomaticTicketMachine from './semiAutomaticTicketMachine';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'IscsOperate',
|
||||||
|
components: {
|
||||||
|
BrakeMachine,
|
||||||
|
TicketMachine,
|
||||||
|
SemiAutomaticTicketMachine
|
||||||
|
},
|
||||||
|
mixins: [
|
||||||
|
],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
enabledTab: 'brakeMachine',
|
||||||
|
data: '',
|
||||||
|
stationCode: ''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
height() {
|
||||||
|
return this.$store.state.config.height;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
'$store.state.iscs.rightClickCount': function (val) {
|
||||||
|
const model = this.$store.getters['iscs/updateDeviceData'];
|
||||||
|
this.enabledTab = model._type;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
createDataModel(model) {
|
||||||
|
const newModel = deviceFactory(model._type, model);
|
||||||
|
this.$store.dispatch('iscs/updateIscsDevices', newModel.model);
|
||||||
|
},
|
||||||
|
deleteDataModel(model) {
|
||||||
|
this.$store.dispatch('iscs/deleteIscsDevices', model);
|
||||||
|
},
|
||||||
|
handleSave() {
|
||||||
|
const data = JSON.stringify(this.$store.state.iscs.iscs);
|
||||||
|
console.log(data);
|
||||||
|
},
|
||||||
|
handleTabClick() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
@import "src/styles/mixin.scss";
|
||||||
|
.map-control {
|
||||||
|
float: right;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.heightClass{height:100%;}
|
||||||
|
</style>
|
@ -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: 'SemiAutomaticTicketMachine',
|
||||||
|
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: 'semiAutomaticTicketMachine',
|
||||||
|
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: 'semiAutomaticTicketMachine',
|
||||||
|
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 = 'semiAutomaticTicketMachine_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
103
src/views/system/iscsDraw/iscsAfcOperate/ticketMachine.vue
Normal file
103
src/views/system/iscsDraw/iscsAfcOperate/ticketMachine.vue
Normal 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: 'TicketMachine',
|
||||||
|
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: 'ticketMachine',
|
||||||
|
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: 'ticketMachine',
|
||||||
|
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 = 'ticketMachine_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
Loading…
Reference in New Issue
Block a user