From ae853226d7f932cc5890143754cf13f1ffce3b09 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Tue, 3 Sep 2019 16:14:00 +0800 Subject: [PATCH] =?UTF-8?q?ibp=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ibp/constant/deviceRender.js | 49 ++++++++++++------- .../ibp/ibpDraft/ibpEdit/ibpOperate/ibpBg.vue | 5 ++ 2 files changed, 36 insertions(+), 18 deletions(-) diff --git a/src/ibp/constant/deviceRender.js b/src/ibp/constant/deviceRender.js index d807262b8..ae00893ee 100644 --- a/src/ibp/constant/deviceRender.js +++ b/src/ibp/constant/deviceRender.js @@ -5,99 +5,112 @@ const deviceRender = {}; /** IbpText渲染配置*/ deviceRender[deviceType.IbpText] = { _type: deviceType.IbpText, - zlevel: 3 + zlevel: 1, + z: 4 }; /** SquareButton渲染配置*/ deviceRender[deviceType.SquareButton] = { _type: deviceType.SquareButton, - zlevel: 3 + zlevel: 1, + z: 4 }; /** WarnButton渲染配置*/ deviceRender[deviceType.WarnButton] = { _type: deviceType.WarnButton, - zlevel: 3 + zlevel: 1, + z: 4 }; /** Arrow渲染配置*/ deviceRender[deviceType.Arrow] = { _type: deviceType.Arrow, - zlevel: 2 + zlevel: 1, + z: 2 }; /** RotatingButton渲染配置*/ deviceRender[deviceType.RotatingButton] = { _type: deviceType.RotatingButton, - zlevel: 3 + zlevel: 1, + z: 3 }; /** TipBox渲染配置*/ deviceRender[deviceType.TipBox] = { _type: deviceType.TipBox, - zlevel: 2, - z: 2 + zlevel: 1, + z: 3 }; /** BackGround渲染配置*/ deviceRender[deviceType.Background] = { _type: deviceType.Background, - zlevel: 0 + zlevel: 1, + z: 0 }; /** CircularLamp渲染配置 */ deviceRender[deviceType.CircularLamp] = { _type: deviceType.CircularLamp, - zlevel: 3 + zlevel: 1, + z: 4 }; /** AppendageBox渲染配置 */ deviceRender[deviceType.AppendageBox] = { _type: deviceType.AppendageBox, - zlevel: 1 + zlevel: 1, + z: 1 }; /** IbpLine渲染配置 */ deviceRender[deviceType.IbpLine] = { _type: deviceType.IbpLine, - zlevel: 1 + zlevel: 3 }; /** Elevator 渲染配置 */ deviceRender[deviceType.Elevator] = { _type: deviceType.Elevator, - zlevel: 2, - z: 1 + zlevel: 1, + z: 2 }; /** Key 渲染配置 */ deviceRender[deviceType.Key] = { _type: deviceType.Key, - zlevel: 4 + zlevel: 1, + z: 4 }; /** TeleTerminal 渲染配置 */ deviceRender[deviceType.TeleTerminal] = { _type: deviceType.TeleTerminal, - zlevel: 3 + zlevel: 1, + z: 4 }; /** Clock 渲染配置*/ deviceRender[deviceType.Clock] = { _type: deviceType.Clock, - zlevel: 3 + zlevel: 1, + z: 4 }; /** RotateTip 渲染配置 */ deviceRender[deviceType.RotateTip] = { _type: deviceType.RotateTip, - zlevel: 3 + zlevel: 1, + z: 4 }; /** Alarm */ deviceRender[deviceType.Alarm] = { _type: deviceType.Alarm, - zlevel: 3 + zlevel: 1, + z: 4 }; export default deviceRender; diff --git a/src/views/ibp/ibpDraft/ibpEdit/ibpOperate/ibpBg.vue b/src/views/ibp/ibpDraft/ibpEdit/ibpOperate/ibpBg.vue index 7f5be58bc..5a1cd14f0 100644 --- a/src/views/ibp/ibpDraft/ibpEdit/ibpOperate/ibpBg.vue +++ b/src/views/ibp/ibpDraft/ibpEdit/ibpOperate/ibpBg.vue @@ -51,6 +51,7 @@ x: 0, y: 0, _type: 'Background', + code: this.generateCode(), width: this.form .bgWidth, height: this.form.bgHeight }; @@ -58,6 +59,10 @@ }, initPage(){ } + }, + generateCode() { + const mydate = new Date(); + this.form.code = "bg"+mydate.getDay()+ mydate.getHours()+ mydate.getMinutes()+mydate.getSeconds()+mydate.getMilliseconds()+ Math.round(Math.random() * 10000); } };