Commit 72bbf66098000b1b8251af463bd64d5096eb568a

Authored by ww
1 parent 9f3d936f

fix: fix build war package error problem

Too many changes to show.

To preserve performance only 2 of 3 files are displayed.

@@ -142,28 +142,28 @@ @@ -142,28 +142,28 @@
142 <file name="Sidebar-Veeam2.js" /> 142 <file name="Sidebar-Veeam2.js" />
143 <file name="Sidebar-VVD.js" /> 143 <file name="Sidebar-VVD.js" />
144 <file name="Sidebar-WebIcons.js" /> 144 <file name="Sidebar-WebIcons.js" />
145 - <!-- 基础元件 --> 145 + <!-- 基础元件 -->
146 <file name="./thingskit/Sidebar-Basic-Components.js" /> 146 <file name="./thingskit/Sidebar-Basic-Components.js" />
147 - <!-- 图表 -->  
148 - <file name="./thingskit/Sidebar-Charts.js" />  
149 - <!-- 管道 -->  
150 - <file name="./thingskit/Sidebar-Conduit.js" />  
151 - <!-- 控制元件 -->  
152 - <file name="./thingskit/Sidebar-Controller-Components.js" />  
153 - <!-- 发动机 -->  
154 - <file name="./thingskit/Sidebar-Engine.js" />  
155 - <!-- 风机 -->  
156 - <file name="./thingskit/Sidebar-Fan.js" />  
157 - <!-- 污水处理 -->  
158 - <file name="./thingskit/Sidebar-Sewage.js" />  
159 - <!-- 阀门 -->  
160 - <file name="./thingskit/Sidebar-Valve.js" />  
161 - <!-- 灯 -->  
162 - <file name="./thingskit/Sidebar-Light.js" />  
163 - <!-- 仪表 -->  
164 - <file name="./thingskit/Sidebar-Instrument.js" />  
165 - <!-- 按钮 -->  
166 - <file name="./thingskit/Sidebar-Button.js" /> 147 + <!-- 图表 -->
  148 + <file name="./thingskit/Sidebar-Charts.js" />
  149 + <!-- 管道 -->
  150 + <file name="./thingskit/Sidebar-Conduit.js" />
  151 + <!-- 控制元件 -->
  152 + <file name="./thingskit/Sidebar-Controller-Components.js" />
  153 + <!-- 发动机 -->
  154 + <file name="./thingskit/Sidebar-Engine.js" />
  155 + <!-- 风机 -->
  156 + <file name="./thingskit/Sidebar-Fan.js" />
  157 + <!-- 污水处理 -->
  158 + <file name="./thingskit/Sidebar-Sewage.js" />
  159 + <!-- 阀门 -->
  160 + <file name="./thingskit/Sidebar-Valve.js" />
  161 + <!-- 灯 -->
  162 + <file name="./thingskit/Sidebar-Light.js" />
  163 + <!-- 仪表 -->
  164 + <file name="./thingskit/Sidebar-Instrument.js" />
  165 + <!-- 按钮 -->
  166 + <file name="./thingskit/Sidebar-Button.js" />
167 </sources> 167 </sources>
168 </jscomp> 168 </jscomp>
169 169
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 Sidebar.prototype.addBasicComponentsPalette = function () { 3 Sidebar.prototype.addBasicComponentsPalette = function () {
4 this.setCurrentSearchEntryLibrary('component'); 4 this.setCurrentSearchEntryLibrary('component');
5 const dt = 'basic' 5 const dt = 'basic'
6 - const gn = `mxgraph.${dt}` 6 + const gn = `mxgraph.${ dt }`
7 const currentDate = getCurrentDate(); 7 const currentDate = getCurrentDate();
8 const basicAttr = this.enumCellBasicAttribute 8 const basicAttr = this.enumCellBasicAttribute
9 const componentType = this.enumComponentType 9 const componentType = this.enumComponentType
@@ -13,25 +13,15 @@ @@ -13,25 +13,15 @@
13 this.addEntry(this.getTagsForStencil(gn, 'Title', dt).join(' '), mxUtils.bind(this, function () { 13 this.addEntry(this.getTagsForStencil(gn, 'Title', dt).join(' '), mxUtils.bind(this, function () {
14 const cell = new mxCell('Title', new mxGeometry(0, 0, 100, 40), transparentBg); 14 const cell = new mxCell('Title', new mxGeometry(0, 0, 100, 40), transparentBg);
15 cell.setVertex(true) 15 cell.setVertex(true)
16 - this.setCellAttributes(  
17 - cell,  
18 - {  
19 - [basicAttr.COMPONENT_TYPE]: componentType.TITLE,  
20 - },  
21 - )  
22 - return this.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Title'); 16 + this.setCellAttributes(cell, { [basicAttr.COMPONENT_TYPE]: componentType.TITLE })
  17 + return this.createVertexTemplateFromCells([ cell ], cell.geometry.width, cell.geometry.height, 'Title');
23 })), 18 })),
24 19
25 this.addEntry(this.getTagsForStencil(gn, 'variable', dt).join(' '), mxUtils.bind(this, function () { 20 this.addEntry(this.getTagsForStencil(gn, 'variable', dt).join(' '), mxUtils.bind(this, function () {
26 const cell = new mxCell('变量', new mxGeometry(0, 0, 100, 40), transparentBg); 21 const cell = new mxCell('变量', new mxGeometry(0, 0, 100, 40), transparentBg);
27 cell.setVertex(true) 22 cell.setVertex(true)
28 - this.setCellAttributes(  
29 - cell,  
30 - {  
31 - [basicAttr.COMPONENT_TYPE]: componentType.VARIABLE,  
32 - },  
33 - )  
34 - return this.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, '变量'); 23 + this.setCellAttributes(cell, { [basicAttr.COMPONENT_TYPE]: componentType.VARIABLE })
  24 + return this.createVertexTemplateFromCells([ cell ], cell.geometry.width, cell.geometry.height, '变量');
35 })), 25 })),
36 26
37 this.addEntry(this.getTagsForStencil(gn, 'line', dt).join(' '), mxUtils.bind(this, function () { 27 this.addEntry(this.getTagsForStencil(gn, 'line', dt).join(' '), mxUtils.bind(this, function () {
@@ -42,33 +32,25 @@ @@ -42,33 +32,25 @@
42 cell.geometry.relative = true; 32 cell.geometry.relative = true;
43 cell.edge = true; 33 cell.edge = true;
44 cell.setVertex(true) 34 cell.setVertex(true)
45 - this.setCellAttributes(  
46 - cell,  
47 - {  
48 - [basicAttr.COMPONENT_TYPE]: componentType.LINE,  
49 - },  
50 - )  
51 - return this.createEdgeTemplateFromCells([cell], 60, 40, '线条'); 35 + this.setCellAttributes(cell, { [basicAttr.COMPONENT_TYPE]: componentType.LINE })
  36 + return this.createEdgeTemplateFromCells([ cell ], 60, 40, '线条');
52 })), 37 })),
53 this.addEntry('real time', mxUtils.bind(this, function () { 38 this.addEntry('real time', mxUtils.bind(this, function () {
54 const template = `<div class="thingKit-component__real-time"><div class="real-time__date"></div> <div style="font-size:30px" class="real-time__now">时间</div></div>` 39 const template = `<div class="thingKit-component__real-time"><div class="real-time__date"></div> <div style="font-size:30px" class="real-time__now">时间</div></div>`
55 const cell = new mxCell(template, new mxGeometry(0, 0, 180, 60), 'text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;'); 40 const cell = new mxCell(template, new mxGeometry(0, 0, 180, 60), 'text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;');
56 cell.vertex = true; 41 cell.vertex = true;
57 - this.setCellAttributes(  
58 - cell,  
59 - {  
60 - [basicAttr.COMPONENT_TYPE]: componentType.REAL_TIME,  
61 - placeholders: '1',  
62 - currentDate: currentDate,  
63 - },  
64 - )  
65 - return this.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, '实时时间'); 42 + this.setCellAttributes(cell, {
  43 + [basicAttr.COMPONENT_TYPE]: componentType.LINE,
  44 + placeholders: '1',
  45 + currentDate: currentDate,
  46 + })
  47 + return this.createVertexTemplateFromCells([ cell ], cell.geometry.width, cell.geometry.height, '实时时间');
66 })), 48 })),
67 this.addEntry(this.getTagsForStencil('mxgraph.basic', '变量图片', 'basic').join(' '), mxUtils.bind(this, function () { 49 this.addEntry(this.getTagsForStencil('mxgraph.basic', '变量图片', 'basic').join(' '), mxUtils.bind(this, function () {
68 const cell = new mxCell('', new mxGeometry(0, 0, 194, 95), 'image;image=images/thingskit/img-placeholder.png;imageAspect=0;'); 50 const cell = new mxCell('', new mxGeometry(0, 0, 194, 95), 'image;image=images/thingskit/img-placeholder.png;imageAspect=0;');
69 cell.setVertex(true) 51 cell.setVertex(true)
70 this.setCellAttributes(cell, { [basicAttr.COMPONENT_TYPE]: componentType.VAR_IMAGE }) 52 this.setCellAttributes(cell, { [basicAttr.COMPONENT_TYPE]: componentType.VAR_IMAGE })
71 - return this.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, '变量图片'); 53 + return this.createVertexTemplateFromCells([ cell ], cell.geometry.width, cell.geometry.height, '变量图片');
72 })), 54 })),
73 ]; 55 ];
74 56
@@ -82,7 +64,7 @@ @@ -82,7 +64,7 @@
82 var year = date.getFullYear(); 64 var year = date.getFullYear();
83 var month = date.getMonth() + 1; 65 var month = date.getMonth() + 1;
84 var dates = date.getDate(); 66 var dates = date.getDate();
85 - arr = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'] 67 + arr = [ '星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六' ]
86 var day = date.getDay(); 68 var day = date.getDay();
87 return year + '年' + month + '月' + dates + '日 ' + arr[day]; 69 return year + '年' + month + '月' + dates + '日 ' + arr[day];
88 } 70 }
@@ -95,7 +77,7 @@ @@ -95,7 +77,7 @@
95 const allTimeNode = document.querySelectorAll('.thingKit-component__real-time .real-time__now') 77 const allTimeNode = document.querySelectorAll('.thingKit-component__real-time .real-time__now')
96 for (const time of allTimeNode) { 78 for (const time of allTimeNode) {
97 const date = new Date() 79 const date = new Date()
98 - time.innerHTML = `${date.getHours() < 10 ? '0' : ''}${date.getHours()}:${date.getMinutes() < 10 ? '0' : ''}${date.getMinutes()}:${date.getSeconds() < 10 ? '0' : ''}${date.getSeconds()}` 80 + time.innerHTML = `${ date.getHours() < 10 ? '0' : '' }${ date.getHours() }:${ date.getMinutes() < 10 ? '0' : '' }${ date.getMinutes() }:${ date.getSeconds() < 10 ? '0' : '' }${ date.getSeconds() }`
99 } 81 }
100 }, 1000) 82 }, 1000)
101 } 83 }