Commit 1c917a325b10c0de86ef33dcfd6b547c62f1e510

Authored by ww
1 parent de61e896

fix: 修复基础组件dt标识符不统一

... ... @@ -8,3 +8,4 @@ yarn.lock
8 8 **/.DS_Store
9 9 **/*.min.js
10 10 dist
  11 +src/main/webapp/js/grapheditor/compiled/Format.js
... ...
... ... @@ -22,26 +22,26 @@
22 22 <meta name="mobile-web-app-capable" content="yes">
23 23 <meta name="theme-color" content="#d89000">
24 24
25   - <link rel="stylesheet" href="./js/plugin/layui/css/layui.css?v=1670325027797">
  25 + <link rel="stylesheet" href="./js/plugin/layui/css/layui.css?v=1679478216446">
26 26
27 27 <!-- load configure file -->
28   - <script src="./js/config/config.js?v=1670325027797"></script>
  28 + <script src="./js/config/config.js?v=1679478216446"></script>
29 29
30 30 <!-- crypto-js -->
31   - <script src="./js/plugin/crypto-js/crypto-js.js?v=1670325027797"></script>
  31 + <script src="./js/plugin/crypto-js/crypto-js.js?v=1679478216446"></script>
32 32
33 33 <!-- storage persistent -->
34   - <script src="./js/const/persistentStorage.js?v=1670325027797"></script>
  34 + <script src="./js/const/persistentStorage.js?v=1679478216446"></script>
35 35 <!-- Global const -->
36   - <script src="./js/const/const.js?v=1670325027797"></script>
  36 + <script src="./js/const/const.js?v=1679478216446"></script>
37 37
38 38 <!-- Axios -->
39   - <script src="./js/plugin/axios/axios.min.js?v=1670325027797"></script>
40   - <script src="./js/plugin/axios/DefHttp.js?v=1670325027797"></script>
41   - <script src="./js/api/index.js?v=1670325027797"></script>
  39 + <script src="./js/plugin/axios/axios.min.js?v=1679478216446"></script>
  40 + <script src="./js/plugin/axios/DefHttp.js?v=1679478216446"></script>
  41 + <script src="./js/api/index.js?v=1679478216446"></script>
42 42
43 43 <!-- load script -->
44   - <script src="./js/config/loadScript.js?v=1670325027797"></script>
  44 + <script src="./js/config/loadScript.js?v=1679478216446"></script>
45 45
46 46 <!-- act editor -->
47 47 <!-- <script src="https://oss.yuntengcloud.com/iotdocs/thingskit-scada/ace.js"></script> -->
... ... @@ -54,7 +54,7 @@
54 54 <!-- <script src="https://vjs.zencdn.net/7.10.2/video.min.js"></script> -->
55 55 <!-- <script src="https://oss.yuntengcloud.com/iotdocs/thingskit-scada/video.min.js"></script> -->
56 56
57   - <script src="./js/plugin/layui/layui.js?v=1670325027797"></script>
  57 + <script src="./js/plugin/layui/layui.js?v=1679478216446"></script>
58 58 <!-- <link rel="stylesheet" href="https://cdnjs.loli.net/ajax/libs/layui/2.6.8/css/layui.min.css"
59 59 integrity="sha512-iQBJbsNHXUcgEIgWThd2dr8tOdKPvICwqjPEZYY81z3eMya44A5MiAqfWSCh+Ee1YzNYkdrI982Qhwgr8LEYOQ=="
60 60 crossorigin="anonymous" referrerpolicy="no-referrer" />
... ... @@ -63,7 +63,7 @@
63 63 crossorigin="anonymous" referrerpolicy="no-referrer"></script> -->
64 64
65 65 <!-- 引入修改样式 -->
66   - <link rel="stylesheet" href="./styles/formatChange.css?v=1670325027797">
  66 + <link rel="stylesheet" href="./styles/formatChange.css?v=1679478216446">
67 67
68 68 <script type="text/javascript">
69 69 /**
... ... @@ -306,7 +306,7 @@
306 306 var supportedDomain = (hostName.substring(hostName.length - 8, hostName.length) === '.draw.io') ||
307 307 (hostName.substring(hostName.length - 13, hostName.length) === '.diagrams.net');
308 308
309   - const releaseVersion = '1670325027797'
  309 + const releaseVersion = '1679478216446'
310 310 const appMinSrc = Enable_OSS ? `${OSS_Prefix}app.min.js?v=${releaseVersion}` : `js/app.min.js?v=${releaseVersion}`
311 311 function loadAppJS() {
312 312 mxscript(appMinSrc, function () {
... ...
... ... @@ -26,7 +26,7 @@
26 26 *
27 27 */
28 28 // Sidebar.prototype.defaultEntries = 'component;fan;engine;valve;controller;light;button;conduit;instrument;sewage;air;filters;pumps;factoryFacilities;flowMeter;foodProcessing;heater;industrial;plant;power;processCooling;processHeating;sink;';
29   - Sidebar.prototype.defaultEntries = 'component;fan;engine;valve;control;light;button;conduit;instrument;sewage;factoryFacilities;flowMeter;industrial;sink;';
  29 + Sidebar.prototype.defaultEntries = 'basicComponent;fan;engine;valve;control;light;button;conduit;instrument;sewage;factoryFacilities;flowMeter;industrial;sink;';
30 30
31 31 /**
32 32 * Library definitions
... ... @@ -373,7 +373,7 @@
373 373 Sidebar.prototype.configuration = [
374 374 { id: 'general', libs: ['general', 'misc', 'advanced'] },
375 375 //加入自定义图形ID
376   - { id: 'fan' }, { id: 'engine' }, { id: 'valve' }, { id: 'component' }, { id: 'control' }, { id: 'sewage' }, { id: 'conduit' }, { id: 'light' }, { id: 'instrument' }, { id: 'button' },
  376 + { id: 'fan' }, { id: 'engine' }, { id: 'valve' }, { id: 'basicComponent' }, { id: 'control' }, { id: 'sewage' }, { id: 'conduit' }, { id: 'light' }, { id: 'instrument' }, { id: 'button' },
377 377 { id: 'air' }, { id: 'filters' }, { id: 'pumps' }, { id: 'factoryFacilities' }, { id: 'flowMeter' }, { id: 'foodProcessing' }, { id: 'heater' }, { id: 'industrial' }, { id: 'plant' }, { id: 'power' }, { id: 'processCooling' }, { id: 'processHeating' }, { id: 'sink' },
378 378
379 379
... ... @@ -744,7 +744,7 @@
744 744 { title: "风机", id: 'fan', image: IMAGE_PATH + '/thingskit/风机.png' },
745 745 { title: "发动机", id: 'engine', image: IMAGE_PATH + '/thingskit/发动机.png' },
746 746 { title: "阀门", id: 'valve', image: IMAGE_PATH + '/thingskit/阀门.png' },
747   - { title: "基础组件", id: 'component', image: IMAGE_PATH + '/thingskit/基础元件.png' },
  747 + { title: "基础组件", id: 'basicComponent', image: IMAGE_PATH + '/thingskit/基础元件.png' },
748 748 { title: "污水处理", id: 'sewage', image: IMAGE_PATH + '/thingskit/污水处理.png' },
749 749 { title: "管道", id: 'conduit', image: IMAGE_PATH + '/thingskit/管道.png' },
750 750 { title: "灯", id: 'light', image: IMAGE_PATH + '/thingskit/灯.png' },
... ...
1 1 (function () {
2 2 // Adds Atlassian shapes
3 3 Sidebar.prototype.addBasicComponentsPalette = function () {
4   - this.setCurrentSearchEntryLibrary('component');
5   - const dt = 'basic'
  4 + this.setCurrentSearchEntryLibrary('basicComponent');
  5 + const dt = 'basicComponent'
6 6 const gn = `mxgraph.${dt}`
7 7 const currentDate = getCurrentDate();
8 8 const basicAttr = this.enumCellBasicAttribute
... ... @@ -46,20 +46,20 @@
46 46 })
47 47 return this.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, '实时时间');
48 48 })),
49   - this.addEntry(this.getTagsForStencil('mxgraph.basic', '变量图片', 'basic').join(' '), mxUtils.bind(this, function () {
  49 + this.addEntry(this.getTagsForStencil(gn, '变量图片', 'basic').join(' '), mxUtils.bind(this, function () {
50 50 const cell = new mxCell('', new mxGeometry(0, 0, 194, 95), 'image;image=images/thingskit/img-placeholder.png;imageAspect=0;');
51 51 cell.setVertex(true)
52 52 this.setCellAttributes(cell, { [basicAttr.COMPONENT_TYPE]: componentType.VAR_IMAGE })
53 53 return this.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, '变量图片');
54 54 })),
55   - this.addEntry(this.getTagsForStencil('mxgraph.basic', '视频', 'basic').join(' '), mxUtils.bind(this, function () {
  55 + this.addEntry(this.getTagsForStencil(gn, '视频', 'basic').join(' '), mxUtils.bind(this, function () {
56 56 const template = createVideoTemplate(300, 150)
57 57 const cell = new mxCell(template, new mxGeometry(0, 0, 300, 150), 'text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;');
58 58 cell.setVertex(true)
59 59 this.setCellAttributes(cell, { [basicAttr.COMPONENT_TYPE]: componentType.VIDEO })
60 60 return this.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, '视频');
61 61 })),
62   - this.addEntry(this.getTagsForStencil('mxgraph.basic', '图片', 'basic').join(' '), mxUtils.bind(this, function () {
  62 + this.addEntry(this.getTagsForStencil(gn, '图片', 'basic').join(' '), mxUtils.bind(this, function () {
63 63 const cell = new mxCell(`<img class="basic-component__image" src="${Proxy_Prefix}/images/thingskit/img-placeholder.png" />`, new mxGeometry(0, 0, 190, 190), 'text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;');
64 64 cell.setVertex(true)
65 65 this.setCellAttributes(cell, { [basicAttr.COMPONENT_TYPE]: componentType.IMAGE })
... ... @@ -67,7 +67,7 @@
67 67 })),
68 68 ];
69 69
70   - this.addPaletteFunctions('component', '基础元件', true, fns);
  70 + this.addPaletteFunctions(dt, '基础元件', true, fns);
71 71 this.setCurrentSearchEntryLibrary();
72 72 };
73 73
... ...