Compare commits

...

4 Commits

  1. 1
      lib/tis_design/examples/web
  2. 12
      src/tis_app_template_kt/public/esplug.json
  3. 1
      src/tis_app_template_kt/sdk/KTWGWLGH/css/KTWGNetplanMain.css
  4. 1
      src/tis_app_template_kt/sdk/KTWGWLGH/css/KTWGWLGH.css
  5. 1
      src/tis_app_template_kt/sdk/KTWGWLGH/css/KTWGZYGL.css
  6. 1
      src/tis_app_template_kt/sdk/KTWGWLGH/css/app.css
  7. 10248
      src/tis_app_template_kt/sdk/KTWGWLGH/data/platformClasses.json
  8. 255
      src/tis_app_template_kt/sdk/KTWGWLGH/data/subnetTypes.json
  9. 243
      src/tis_app_template_kt/sdk/KTWGWLGH/data/subnetTypes.json.orig
  10. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/172.bfcbe56.png
  11. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/adapter.ee0753e.png
  12. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/atm.1e8de55.png
  13. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/bg.e0291d5.png
  14. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/canshufenfa_jizhong.759a7e5.png
  15. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/canshufenfa_shouchi.4e4084e.png
  16. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/chengyuanhe.fffe6e4.png
  17. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/chetong.764e760.png
  18. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/device.3e2f893.png
  19. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/deviceClass.332ee63.png
  20. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/duoyewu.1de39ba.png
  21. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/fourin.3e2f893.png
  22. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/fourin1.3e2f893.png
  23. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/guihua.8593548.png
  24. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/haomibo.4a350e9.png
  25. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/hf(125W).707d1e9.png
  26. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/hf(200W).86525af.png
  27. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/hf(beifu).f254060.png
  28. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/hub.4d41c0f.png
  29. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/inc.0f9eea4.png
  30. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/jieguan.02120b3.png
  31. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/lan_member.332ee63.png
  32. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/micro5g.c5dde8b.png
  33. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/p2mp_center.f5a0a80.png
  34. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/p2mp_user.c7d16f2.png
  35. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/phone.9e3ac5e.png
  36. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/subnet_member.b8a0cde.png
  37. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/tdma.6896e0f.png
  38. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/terminal.cfd63e6.png
  39. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/uhf.dc46362.png
  40. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/uv.99ef606.png
  41. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/vhf.9533c9d.png
  42. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/wangkong.fe39f9c.png
  43. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/wlan.9ccab95.png
  44. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/wlan_shouchi.c942220.png
  45. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/单信道短波接收机(内部).807b7e2.png
  46. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/用户扩展箱(内部).0b023b0.png
  47. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/直升机载超短波电台(内部).ecbd9af.png
  48. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/短波多信道接收机(内部).5c0b1aa.png
  49. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/车长盒副本(内部).b4663a5.png
  50. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/远传盒副本(内部).188be16.png
  51. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/通用背负式超短波电台(内部).3a679a2.png
  52. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/野战便携式信息终端(内部).bb2218e.png
  53. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/野战手持式信息终端(内部).7a82a1e.png
  54. BIN
      src/tis_app_template_kt/sdk/KTWGWLGH/img/野战网络传真机(内部).cae5ebe.png
  55. 14
      src/tis_app_template_kt/sdk/KTWGWLGH/index.html
  56. 9190
      src/tis_app_template_kt/sdk/KTWGWLGH/jquery.js
  57. 22
      src/tis_app_template_kt/sdk/KTWGWLGH/js/KTWGNetplanMain.js
  58. 22
      src/tis_app_template_kt/sdk/KTWGWLGH/js/KTWGWLGH.js
  59. 22
      src/tis_app_template_kt/sdk/KTWGWLGH/js/KTWGZYGL.js
  60. 1
      src/tis_app_template_kt/sdk/KTWGWLGH/js/app.js
  61. 13
      src/tis_app_template_kt/sdk/KTWGWLGH/license.js
  62. 51
      src/tis_app_template_kt/sdk/KTWGWLGH/manifest/esplug.json
  63. 6
      src/tis_app_template_kt/sdk/KTWGWLGH/manifest/users.json
  64. 13
      src/tis_app_template_kt/sdk/KTWGWLGH/tisplatform.json
  65. 31065
      src/tis_app_template_kt/sdk/KTWGWLGH/twaver.js
  66. 32
      src/tis_app_template_kt/sdk/KTWGWLGH/twaverLoader.js
  67. 2
      src/tis_app_template_kt/sdk/KT_SJDB/js/app.js
  68. 11
      src/tis_app_template_kt/sdk/tisplatform.json
  69. 2
      src/tis_app_template_kt/src/App.vue
  70. 2
      src/tis_app_template_kt/src/components/BottomView.vue
  71. 17
      src/tis_app_template_kt/src/components/Dialog/DialogPc.vue
  72. 13
      src/tis_app_template_kt/src/components/Dialog/Pc.vue
  73. 2
      src/tis_app_template_kt/src/components/EventBusExample.vue
  74. 8
      src/tis_app_template_kt/src/components/LeftView.vue
  75. 2
      src/tis_app_template_kt/src/components/RightCardComponent.vue
  76. 2
      src/tis_app_template_kt/src/components/RightView.vue
  77. 80
      src/tis_app_template_kt/src/components/controlMixins.js
  78. 51
      src/tis_app_template_kt/src/main.js
  79. 16
      src/tis_app_template_kt/src/pc.vue
  80. 3
      src/tis_app_template_kt/src/public-path.js
  81. 2
      src/tis_app_template_kt/src/tis/bus.js
  82. 157
      src/tis_app_template_kt/src/tis/index.js
  83. 2
      src/tis_app_template_kt/src/tis/layouts/BackContainer.vue
  84. 3
      src/tis_app_template_kt/src/tis/layouts/DialogContainer.vue
  85. 7
      src/tis_app_template_kt/src/tis/store/index.js
  86. 299
      src/tis_app_template_kt/src/tis/store/modules/tisbus.js

1
lib/tis_design/examples/web

@ -0,0 +1 @@
/Users/Poised_flw/github/outsource/207-group/tis-design/packages/web

12
src/tis_app_template_kt/public/esplug.json

@ -16,6 +16,11 @@
"icon": "",
"component": ["kt_zzgl_datapackaging"]
},
{
"name": "弹窗KTWGWLGH",
"icon": "",
"component": ["KTWGWLGH"]
},
{
"name": "右1",
"icon": "",
@ -39,6 +44,13 @@
"type": "PopupWidget",
"segprefix": "KT_SJDB"
},
{
"title": "KTWGWLGH",
"name": "KTWGWLGH",
"component": "KTWGWLGH",
"type": "PopupWidget",
"segprefix": "KTWGWLGH"
},
{
"title": "弹框测试",
"name": "弹框测试",

1
src/tis_app_template_kt/sdk/KTWGWLGH/css/KTWGNetplanMain.css
File diff suppressed because it is too large
View File

1
src/tis_app_template_kt/sdk/KTWGWLGH/css/KTWGWLGH.css
File diff suppressed because it is too large
View File

1
src/tis_app_template_kt/sdk/KTWGWLGH/css/KTWGZYGL.css
File diff suppressed because it is too large
View File

1
src/tis_app_template_kt/sdk/KTWGWLGH/css/app.css
File diff suppressed because it is too large
View File

10248
src/tis_app_template_kt/sdk/KTWGWLGH/data/platformClasses.json
File diff suppressed because it is too large
View File

255
src/tis_app_template_kt/sdk/KTWGWLGH/data/subnetTypes.json

@ -0,0 +1,255 @@
[
{
"subnetTypeCode": "vhf",
"subnetTypeDesc": "VHF超短波子网",
"waveTypes": [
{
"waveTypeCode": "171",
"waveTypeDesc": "171"
},
{
"waveTypeCode": "120",
"waveTypeDesc": "120"
},
{
"waveTypeCode": "96G",
"waveTypeDesc": "96G"
}
],
"netModes": [
{
"netModeCode": "prn",
"netModeDesc": "PRN分组网"
},
{
"netModeCode": "cnr",
"netModeDesc": "CNR战斗网"
},
{
"netModeCode": "link_dikong",
"netModeDesc": "LINK地空"
},
{
"netModeCode": "link_dimian",
"netModeDesc": "LINK地面"
}
]
},
{
"subnetTypeCode": "uhf",
"subnetTypeDesc": "高速电台子网",
"waveTypes": [],
"netModes": [
{
"netModeCode": "prn",
"netModeDesc": "PRN"
},
{
"netModeCode": "link",
"netModeDesc": "LINK"
},
{
"netModeCode": "qLink",
"netModeDesc": "QLINK"
}
]
},
{
"subnetTypeCode": "datalink_HF",
"subnetTypeDesc": "综合数据链HF网",
"channelTypes": [
{
"channelTypeCode": "1",
"channelTypeDesc": "HF串行"
}
],
"workTypes": [
{
"workTypeCode": "1",
"workTypeDesc": "测试"
},
{
"workTypeCode": "2",
"workTypeDesc": "轮询"
},
{
"workTypeCode": "3",
"workTypeDesc": "广播"
},
{
"workTypeCode": "4",
"workTypeDesc": "点对点"
},
{
"workTypeCode": "5",
"workTypeDesc": "静默"
},
{
"workTypeCode": "16",
"workTypeDesc": "传输"
},
{
"workTypeCode": "17",
"workTypeDesc": "呼叫应答"
}
]
},
{
"subnetTypeCode": "datalink_VU",
"subnetTypeDesc": "综合数据链V/U网",
"channelTypes": [],
"workTypes": []
},
{
"subnetTypeCode": "hf",
"subnetTypeDesc": "211短波子网",
"waveTypes": [
{
"waveTypeCode": "99短波",
"waveTypeDesc": "99短波"
},
{
"waveTypeCode": "211短波",
"waveTypeDesc": "211短波"
}
],
"netModes": [
{
"netModeCode": "dingpin",
"netModeDesc": "定频"
},
{
"netModeCode": "tiaopin",
"netModeDesc": "跳频"
},
{
"netModeCode": "zidong",
"netModeDesc": "自动"
},
{
"netModeCode": "zishiying",
"netModeDesc": "自适应"
}
]
},
{
"subnetTypeCode": "hf_prn",
"subnetTypeDesc": "PRN短波子网",
"waveTypes": [],
"netModes": []
},
{
"subnetTypeCode": "hf_link",
"subnetTypeDesc": "LINK短波子网",
"waveTypes": [],
"netModes": []
},
{
"subnetTypeCode": "wlan",
"subnetTypeDesc": "指挥所无线局域网",
"waveTypes": [],
"netModes": []
},
{
"subnetTypeCode": "lte_CenterAdHoc",
"subnetTypeDesc": "lte中心站自组网",
"waveTypes": [],
"netModes": []
},
{
"subnetTypeCode": "lte_UserAdHoc",
"subnetTypeDesc": "lte用户站自组网",
"waveTypes": [],
"netModes": []
},
{
"subnetTypeCode": "secondGenerationSatellite",
"subnetTypeDesc": "二代卫星网",
"waveTypes": [],
"netModes": []
},
{
"subnetTypeCode": "optical",
"subnetTypeDesc": "光环网",
"waveTypes": [],
"netModes": []
},
{
"subnetTypeCode": "p2mp",
"subnetTypeDesc": "点对多点",
"waveTypes": [],
"netModes": [
{
"netModeCode": "ATM_NTN",
"netModeDesc": "ATM自组网"
},
{
"netModeCode": "IP_NTN",
"netModeDesc": "IP自组网"
},
{
"netModeCode": "ATM_ACCESS",
"netModeDesc": "ATM接入网"
}
]
},
{
"subnetTypeCode": "intelligenceTrans",
"subnetTypeDesc": "情报传输子网",
"waveTypes": [
{
"waveTypeCode": "NULL_WAVE",
"waveTypeDesc": "空波形"
},
{
"waveTypeCode": "WURENJI_206",
"waveTypeDesc": "无人机波形(KVB206/827)"
},
{
"waveTypeCode": "WEIBOSHUZITUXIANG_SHOU",
"waveTypeDesc": "微波数字图像波形(收)"
},
{
"waveTypeCode": "WEIBOSHUZITUXIANG_FA",
"waveTypeDesc": "微波数字图像波形(发)"
},
{
"waveTypeCode": "WEIBOCHUANSHU_SHOU",
"waveTypeDesc": "微波传输设备波形(收)"
},
{
"waveTypeCode": "QINGBAOZHONGDUAN_A",
"waveTypeDesc": "情报终端A型波形"
},
{
"waveTypeCode": "QINGBAOZHONGDUAN_B",
"waveTypeDesc": "情报终端B型波形"
},
{
"waveTypeCode": "WEIBOCHUANSHU_FA",
"waveTypeDesc": "微波传输设备波形(发)"
},
{
"waveTypeCode": "WURENJI_206A",
"waveTypeDesc": "无人机波形(KVB206A)"
},
{
"waveTypeCode": "WURENJI_205",
"waveTypeDesc": "无人机波形(BZK-205)"
},
{
"waveTypeCode": "WURENJI_008",
"waveTypeDesc": "无人机波形(BZK-008)"
},
{
"waveTypeCode": "WURENJI_001B",
"waveTypeDesc": "无人机波形(001B)"
},
{
"waveTypeCode": "WURENJI_803",
"waveTypeDesc": "无人机波形(803)"
}
],
"netModes": []
}
]

243
src/tis_app_template_kt/sdk/KTWGWLGH/data/subnetTypes.json.orig

@ -0,0 +1,243 @@
[
{
"subnetTypeCode": "vhf",
"subnetTypeDesc": "VHF超短波子网",
"waveTypes": [
{
"waveTypeCode": "171",
"waveTypeDesc": "171"
},
{
"waveTypeCode": "120",
"waveTypeDesc": "120"
},
{
"waveTypeCode": "96G",
"waveTypeDesc": "96G"
}
],
"netModes": [
{
"netModeCode": "prn",
"netModeDesc": "PRN分组网"
},
{
"netModeCode": "cnr",
"netModeDesc": "CNR战斗网"
},
{
"netModeCode": "link_dikong",
"netModeDesc": "LINK地空"
},
{
"netModeCode": "link_dimian",
"netModeDesc": "LINK地面"
}
]
},
{
"subnetTypeCode": "uhf",
"subnetTypeDesc": "高速电台子网",
"waveTypes": [],
"netModes": [
{
"netModeCode": "prn",
"netModeDesc": "PRN"
},
{
"netModeCode": "link",
"netModeDesc": "LINK"
},
{
"netModeCode": "qLink",
"netModeDesc": "QLINK"
}
]
},
{
"subnetTypeCode": "datalink_HF",
"subnetTypeDesc": "综合数据链HF网",
"channelTypes": [
{
"channelTypeCode": "1",
"channelTypeDesc": "HF串行"
}
],
"workTypes": [
{
"workTypeCode": "1",
"workTypeDesc": "测试"
},
{
"workTypeCode": "2",
"workTypeDesc": "轮询"
},
{
"workTypeCode": "3",
"workTypeDesc": "广播"
},
{
"workTypeCode": "4",
"workTypeDesc": "点对点"
},
{
"workTypeCode": "5",
"workTypeDesc": "静默"
},
{
"workTypeCode": "16",
"workTypeDesc": "传输"
},
{
"workTypeCode": "17",
"workTypeDesc": "呼叫应答"
}
]
},
{
"subnetTypeCode": "datalink_VU",
"subnetTypeDesc": "综合数据链V/U网",
"channelTypes": [],
"workTypes": []
},
{
"subnetTypeCode": "hf",
"subnetTypeDesc": "战互网短波子网",
"waveTypes": [
{
"waveTypeCode": "99短波",
"waveTypeDesc": "99短波"
},
{
"waveTypeCode": "211短波",
"waveTypeDesc": "211短波"
}
],
"netModes": [
{
"netModeCode": "dingpin",
"netModeDesc": "定频"
},
{
"netModeCode": "tiaopin",
"netModeDesc": "跳频"
},
{
"netModeCode": "zidong",
"netModeDesc": "自动"
},
{
"netModeCode": "zishiying",
"netModeDesc": "自适应"
}
]
},
{
"subnetTypeCode": "wlan",
"subnetTypeDesc": "指挥所无线局域网",
"waveTypes": [],
"netModes": []
},
{
"subnetTypeCode": "lte_CenterAdHoc",
"subnetTypeDesc": "lte中心站自组网",
"waveTypes": [],
"netModes": []
},
{
"subnetTypeCode": "lte_UserAdHoc",
"subnetTypeDesc": "lte用户站自组网",
"waveTypes": [],
"netModes": []
},
{
"subnetTypeCode": "secondGenerationSatellite",
"subnetTypeDesc": "二代卫星网",
"waveTypes": [],
"netModes": []
},
{
"subnetTypeCode": "optical",
"subnetTypeDesc": "光环网",
"waveTypes": [],
"netModes": []
},
{
"subnetTypeCode": "p2mp",
"subnetTypeDesc": "点对多点",
"waveTypes": [],
"netModes": [
{
"netModeCode": "ATM_NTN",
"netModeDesc": "ATM自组网"
},
{
"netModeCode": "IP_NTN",
"netModeDesc": "IP自组网"
},
{
"netModeCode": "ATM_ACCESS",
"netModeDesc": "ATM接入网"
}
]
},
{
"subnetTypeCode": "intelligenceTrans",
"subnetTypeDesc": "情报传输子网",
"waveTypes": [
{
"waveTypeCode": "NULL_WAVE",
"waveTypeDesc": "空波形"
},
{
"waveTypeCode": "WURENJI_206",
"waveTypeDesc": "无人机波形(KVB206/827)"
},
{
"waveTypeCode": "WEIBOSHUZITUXIANG_SHOU",
"waveTypeDesc": "微波数字图像波形(收)"
},
{
"waveTypeCode": "WEIBOSHUZITUXIANG_FA",
"waveTypeDesc": "微波数字图像波形(发)"
},
{
"waveTypeCode": "WEIBOCHUANSHU_SHOU",
"waveTypeDesc": "微波传输设备波形(收)"
},
{
"waveTypeCode": "QINGBAOZHONGDUAN_A",
"waveTypeDesc": "情报终端A型波形"
},
{
"waveTypeCode": "QINGBAOZHONGDUAN_B",
"waveTypeDesc": "情报终端B型波形"
},
{
"waveTypeCode": "WEIBOCHUANSHU_FA",
"waveTypeDesc": "微波传输设备波形(发)"
},
{
"waveTypeCode": "WURENJI_206A",
"waveTypeDesc": "无人机波形(KVB206A)"
},
{
"waveTypeCode": "WURENJI_205",
"waveTypeDesc": "无人机波形(BZK-205)"
},
{
"waveTypeCode": "WURENJI_008",
"waveTypeDesc": "无人机波形(BZK-008)"
},
{
"waveTypeCode": "WURENJI_001B",
"waveTypeDesc": "无人机波形(001B)"
},
{
"waveTypeCode": "WURENJI_803",
"waveTypeDesc": "无人机波形(803)"
}
],
"netModes": []
}
]

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/172.bfcbe56.png

After

Width: 120  |  Height: 120  |  Size: 32 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/adapter.ee0753e.png

After

Width: 120  |  Height: 120  |  Size: 19 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/atm.1e8de55.png

After

Width: 120  |  Height: 120  |  Size: 25 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/bg.e0291d5.png

After

Width: 1248  |  Height: 832  |  Size: 276 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/canshufenfa_jizhong.759a7e5.png

After

Width: 120  |  Height: 120  |  Size: 19 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/canshufenfa_shouchi.4e4084e.png

After

Width: 120  |  Height: 120  |  Size: 18 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/chengyuanhe.fffe6e4.png

After

Width: 120  |  Height: 120  |  Size: 25 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/chetong.764e760.png

After

Width: 120  |  Height: 120  |  Size: 18 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/device.3e2f893.png

After

Width: 120  |  Height: 120  |  Size: 25 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/deviceClass.332ee63.png

After

Width: 160  |  Height: 160  |  Size: 15 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/duoyewu.1de39ba.png

After

Width: 120  |  Height: 120  |  Size: 16 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/fourin.3e2f893.png

After

Width: 120  |  Height: 120  |  Size: 25 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/fourin1.3e2f893.png

After

Width: 120  |  Height: 120  |  Size: 25 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/guihua.8593548.png

After

Width: 120  |  Height: 120  |  Size: 24 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/haomibo.4a350e9.png

After

Width: 120  |  Height: 120  |  Size: 18 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/hf(125W).707d1e9.png

After

Width: 120  |  Height: 120  |  Size: 17 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/hf(200W).86525af.png

After

Width: 120  |  Height: 120  |  Size: 17 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/hf(beifu).f254060.png

After

Width: 120  |  Height: 120  |  Size: 20 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/hub.4d41c0f.png

After

Width: 120  |  Height: 120  |  Size: 14 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/inc.0f9eea4.png

After

Width: 120  |  Height: 120  |  Size: 26 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/jieguan.02120b3.png

After

Width: 120  |  Height: 120  |  Size: 23 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/lan_member.332ee63.png

After

Width: 160  |  Height: 160  |  Size: 15 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/micro5g.c5dde8b.png

After

Width: 120  |  Height: 120  |  Size: 19 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/p2mp_center.f5a0a80.png

After

Width: 120  |  Height: 120  |  Size: 19 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/p2mp_user.c7d16f2.png

After

Width: 120  |  Height: 120  |  Size: 21 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/phone.9e3ac5e.png

After

Width: 120  |  Height: 120  |  Size: 16 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/subnet_member.b8a0cde.png

After

Width: 80  |  Height: 90  |  Size: 13 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/tdma.6896e0f.png

After

Width: 120  |  Height: 120  |  Size: 19 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/terminal.cfd63e6.png

After

Width: 120  |  Height: 120  |  Size: 25 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/uhf.dc46362.png

After

Width: 120  |  Height: 120  |  Size: 30 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/uv.99ef606.png

After

Width: 120  |  Height: 120  |  Size: 23 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/vhf.9533c9d.png

After

Width: 120  |  Height: 120  |  Size: 22 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/wangkong.fe39f9c.png

After

Width: 120  |  Height: 120  |  Size: 23 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/wlan.9ccab95.png

After

Width: 120  |  Height: 120  |  Size: 24 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/wlan_shouchi.c942220.png

After

Width: 120  |  Height: 120  |  Size: 21 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/单信道短波接收机(内部).807b7e2.png

After

Width: 120  |  Height: 120  |  Size: 19 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/用户扩展箱(内部).0b023b0.png

After

Width: 300  |  Height: 199  |  Size: 56 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/直升机载超短波电台(内部).ecbd9af.png

After

Width: 120  |  Height: 120  |  Size: 25 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/短波多信道接收机(内部).5c0b1aa.png

After

Width: 120  |  Height: 120  |  Size: 22 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/车长盒副本(内部).b4663a5.png

After

Width: 120  |  Height: 120  |  Size: 25 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/远传盒副本(内部).188be16.png

After

Width: 120  |  Height: 120  |  Size: 19 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/通用背负式超短波电台(内部).3a679a2.png

After

Width: 120  |  Height: 120  |  Size: 15 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/野战便携式信息终端(内部).bb2218e.png

After

Width: 120  |  Height: 120  |  Size: 20 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/野战手持式信息终端(内部).7a82a1e.png

After

Width: 120  |  Height: 120  |  Size: 12 KiB

BIN
src/tis_app_template_kt/sdk/KTWGWLGH/img/野战网络传真机(内部).cae5ebe.png

After

Width: 120  |  Height: 120  |  Size: 19 KiB

14
src/tis_app_template_kt/sdk/KTWGWLGH/index.html

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="./css/app.css" />
</head>
<body>
<div id="app"></div>
<script type="text/javascript" src="./twaverLoader.js"></script>
<script type="text/javascript" src="./jquery.js"></script>
<script type="text/javascript" src="./js/app.js"></script>
</body>
</html>

9190
src/tis_app_template_kt/sdk/KTWGWLGH/jquery.js
File diff suppressed because it is too large
View File

22
src/tis_app_template_kt/sdk/KTWGWLGH/js/KTWGNetplanMain.js
File diff suppressed because it is too large
View File

22
src/tis_app_template_kt/sdk/KTWGWLGH/js/KTWGWLGH.js
File diff suppressed because it is too large
View File

22
src/tis_app_template_kt/sdk/KTWGWLGH/js/KTWGZYGL.js
File diff suppressed because it is too large
View File

1
src/tis_app_template_kt/sdk/KTWGWLGH/js/app.js
File diff suppressed because it is too large
View File

13
src/tis_app_template_kt/sdk/KTWGWLGH/license.js

@ -0,0 +1,13 @@
twaver.Util.validateLicense(
"l=1.0\n"+
"type=3\n"+
"gis=1\n"+
"3d=0\n"+
"start=2015-12-23\n"+
"licensee=The 54th Research Institute of China Electronics Technology Group Corporation\n"+
"licensedUser=1 SITE\n"+
"periodofValidity=PERMANENT\n"+
"maintenanceandUpgrade=12 MONTH\n"+
"buyer=GRAND LINK INTERNATIONAL HOLDING LIMITED\n"+
"signature=2b626989827461fc8175f56f516aa96c9a07c0e91bf60663a9b05585a3857bdc86795f5161530c8f7e34285a87ae79c8e9872d21f1cfb94cf1b1b46f453452ff681845d29d86420e65538acaa32bdf132d00f1a7927575baf677df88b81aa0e15f07646bda6a276ada4d61bda075148fb6bf0df79eb141a94c5b474383eba4fc5bdf736cdece8d9bc84a32d0cc32bb543f87982c3889cbca88d1b25ec9e027ddf750ad589544b86080ebd6e7c2a1ba0eceeb94d699e03add0d51f09fa70f6577ab82bcba5f93f69e6deaf3fef98594fe5dd944175377ae25d89f7c1a24efa83382ec2038a74031936f49e7905542333aeb087e1b6fbee92b0814b3d7d1801aae5183faab84879d6a958c38699248666309b65bb0f10d6f07ed511056782b46428cda8d2c01110b50306ee5447da68a1df0657e8120f964d6747cb6bcae6a1b40515e75bcaa7713c2351c3a1bfb5469fc7c0e4187a2f3646a9fd85c26813be479fdd67ec5ccc16b722943bafd79be727703c8062ec42384c071f3f6a8e5b38187"
);

51
src/tis_app_template_kt/sdk/KTWGWLGH/manifest/esplug.json

@ -0,0 +1,51 @@
{
"desk": {
"prefix": "zhts",
"menuBar": [
{
"name": "资源管理",
"component": [
"KTWGZYGL"
],
"tip": "提示",
"icon": "icon-zhandou",
"ifSelfAComponent": false,
"selfComponent": ""
},
{
"name": "网络规划",
"component": [
"KTWGWLGH"
],
"tip": "提示",
"icon": "icon-zhandou",
"ifSelfAComponent": false,
"selfComponent": ""
}
],
"components": [
{
"name": "资源管理",
"component": "KTWGZYGL",
"componentArgs": 0,
"type": "PopupWidget",
"height": 9999,
"width": 9999
},
{
"name": "网络规划",
"component": "KTWGWLGH",
"componentArgs": 0,
"type": "PopupWidget",
"height": 9999,
"width": 9999
},
{
"name": "网络规划",
"component": "KTWGNetplanMain",
"componentArgs": 0,
"type": "PopupWidget"
}
]
}
}

6
src/tis_app_template_kt/sdk/KTWGWLGH/manifest/users.json

@ -0,0 +1,6 @@
{
"username": "admin",
"password": "admin",
"screendemo": "不同用户显示不同分屏,模拟==>根据用户显示分屏",
"screen": "1"
}

13
src/tis_app_template_kt/sdk/KTWGWLGH/tisplatform.json

@ -0,0 +1,13 @@
{
"KTWGWLGH": {
"cssFiles": [
"/KTWGWLGH/css/app.css"
],
"jsFiles": [
"/KTWGWLGH/twaverLoader.js",
"/KTWGWLGH/jquery.js",
"/KTWGWLGH/js/app.js"
],
"preload": false
}
}

31065
src/tis_app_template_kt/sdk/KTWGWLGH/twaver.js
File diff suppressed because it is too large
View File

32
src/tis_app_template_kt/sdk/KTWGWLGH/twaverLoader.js

@ -0,0 +1,32 @@
(function(){
if(window.twaver && window.twaver.Node){
console.warn("已加载拓扑控件,将不再加载");
return;
}
console.log("加载拓扑控件……");
var getPath = function(){
let filePath = "";
if(document.currentScript){
filePath = document.currentScript.src;
}
if(filePath.lastIndexOf("/") != -1){
filePath = filePath.substr(0, filePath.lastIndexOf("/") + 1);
}else{
filePath = "";
}
return filePath;
};
var twaverJs = document.createElement("script");
twaverJs.type = "text/javascript";
twaverJs.src = getPath() + "twaver.js";
twaverJs.async = false;
console.log('twaver路径为:' + twaverJs.src);
document.getElementsByTagName("head")[0].append(twaverJs);
var twaverLicenseJs = document.createElement("script");
twaverLicenseJs.type = "text/javascript";
twaverLicenseJs.src = getPath() + "license.js";
twaverLicenseJs.async = false;
console.log('twaver license路径为:' + twaverLicenseJs.src);
document.getElementsByTagName("head")[0].append(twaverLicenseJs);
}());

2
src/tis_app_template_kt/sdk/KT_SJDB/js/app.js
File diff suppressed because it is too large
View File

11
src/tis_app_template_kt/sdk/tisplatform.json

@ -1,4 +1,15 @@
{
"KTWGWLGH": {
"cssFiles": [
"/KTWGWLGH/css/app.css"
],
"jsFiles": [
"/KTWGWLGH/twaverLoader.js",
"/KTWGWLGH/jquery.js",
"/KTWGWLGH/js/app.js"
],
"preload": false
},
"KT_SJDB": {
"cssFiles": [],
"jsFiles": [

2
src/tis_app_template_kt/src/App.vue

@ -20,7 +20,7 @@
computed: {
deviceType() {
// return "mobile"
return this.$tis.getDeviceType() || "pc";
return this.$store.getters['tisbus/getDeviceType'] || "pc";
}
}
};

2
src/tis_app_template_kt/src/components/BottomView.vue

@ -1,5 +1,5 @@
<template>
<div class="app-cards" v-if="list.length > 0">
<div class="app-cards" v-if="list && list.length > 0">
<div class="side-menu">
<div class="inner">
<div

17
src/tis_app_template_kt/src/components/Dialog/DialogPc.vue

@ -1,6 +1,6 @@
<template>
<div>
<Pc v-for="(dialog, index) in list" :key="dialog.component" :dialog="dialog" />
<Pc v-for="dialog in list" :key="dialog.component" :dialog="dialog" ></Pc>
</div>
</template>
@ -16,11 +16,17 @@ export default {
asyncComputed: {
list: {
async get() {
const list = this.$tis.getActivesByType('PopupWidget')
// const list = this.$tis.getActivesByType('PopupWidget')
const list = this.$store.getters['tisbus/getActivesByType']('PopupWidget')
for (let component of list) {
if (!component.lazy) continue;
if (component.lazy) continue;
if (typeof component.component === 'string') {
await this.$tis.loadComponent(component.component)
try {
await this.$store.dispatch('tisbus/loadComponent', component.component)
}
catch(err) {
console.log('dialog load component error.', err)
}
}
}
@ -33,7 +39,6 @@ export default {
}
}
},
methods: {
}
methods: {}
}
</script>

13
src/tis_app_template_kt/src/components/Dialog/Pc.vue

@ -16,7 +16,7 @@
<div class="action">
<div class="maxsize" @click='onMaxSize'>最大化</div>
<div class="minisize" @click="minisize">最小化</div>
<div class="close" @click="onClose">关闭</div>
<div class="close" @click.stop="onClose">关闭</div>
</div>
</div>
<component
@ -33,6 +33,8 @@ import VueDragResize from 'vue-drag-resize'
//import {dialogMixins} from './dialogMixins'
export default {
name: 'Pc',
components: { VueDragResize },
props: {
dialog: {
type: Object,
@ -42,9 +44,6 @@ import VueDragResize from 'vue-drag-resize'
}
},
//mixins: [dialogMixins],
components: {
VueDragResize,
},
computed: {
parentW() {
return window.outerWidth;
@ -122,11 +121,11 @@ import VueDragResize from 'vue-drag-resize'
},
minisize() {
console.log(this.dialog)
this.$tis.minimizeComponent(this.dialog.component)
this.$store.commit('tisbus/minimizeComponent', this.dialog.component)
},
onClose() {
this.centerDialogVisible = false;
this.$tis.closeComponent([this.dialog.component]);
this.$store.commit('tisbus/closeComponent', [this.dialog.component])
},
toggle() {
this.showSizeChoice = !this.showSizeChoice;
@ -142,7 +141,7 @@ import VueDragResize from 'vue-drag-resize'
onShow() {
},
activeComponent() {
this.$tis.activeComponent(this.dialog.component)
this.$store.commit('tisbus/activeComponent', this.dialog.component)
}
}
}

2
src/tis_app_template_kt/src/components/EventBusExample.vue

@ -23,6 +23,8 @@ export default {
computed: {},
created() {
console.log('gggg',this.$tis)
// TODO
return
this._off = this.$tis.$on(
"COUNT", //
{ appIds: [this.$tis.appId] }, //

8
src/tis_app_template_kt/src/components/LeftView.vue

@ -1,5 +1,5 @@
<template>
<div class="app-cards" v-if="list.length > 0">
<div class="app-cards" v-if="list && list.length > 0">
<div class="side-menu">
<div class="top-bar">
<transition name="slide-fade">
@ -56,11 +56,11 @@
actives(){
//setTimeout
setTimeout(()=>{
const count = this.$tis.getActivesByType(this.type).length;
const count = this.$store.getters['tisbus/getActivesByType'](this.type).length
if (this.activeCache > -1 && this.activeCache < count) {
//
let index = -1;
this.$tis.getActivesByType("left").forEach(a => {
this.$store.getters['tisbus/getActivesByType']('left').forEach(a => {
index = this.list.findIndex(item => {
return (item.component.name || item.component) === (a.component.name || a.component)
});
@ -71,7 +71,7 @@
});
}
this.activeCache = this.$tis.getActivesByType(this.type).length;
this.activeCache = this.$store.getters['tisbus/getActivesByType'](this.type).length
},800)
}

2
src/tis_app_template_kt/src/components/RightCardComponent.vue

@ -46,7 +46,7 @@ export default {
return this.conf.type;
},
deviceType(){
return this.$tis.getDeviceType()
return this.$store.getters['tisbus/getDeviceType']
}
},
destroyed(){

2
src/tis_app_template_kt/src/components/RightView.vue

@ -1,5 +1,5 @@
<template>
<div class="app-cards" v-if="list.length > 0">
<div class="app-cards" v-if="list && list.length > 0">
<div class="content">
<div class="item" v-for="(v, index) in list" :key="index" v-show="!v.lazy" ref="appCards">
<div v-show="active===index && showRightContent">

80
src/tis_app_template_kt/src/components/controlMixins.js

@ -7,66 +7,71 @@ export const controlMixins = {
activeCache: -1,
show: true,
showRightContent: true,
type1: ''
};
type1: '',
}
},
asyncComputed: {
list: {
lazy: false,
async get() {
let list = [];
const lefts = this.$tis.getWidgetsByType(this.type);
if (lefts) {
const lfs = lefts.filter(l => l && !l.lazy);
let list = []
// const lefts = this.$tis.getWidgetsByType(this.type)
return this.$store
.dispatch('tisbus/getWidgetsByType', this.type)
.then(lefts => {
if (lefts.length > 0) {
const lfs = lefts.filter(l => l && !l.lazy)
for (let i = 0; i < lfs.length; i++) {
let l = lfs[i];
let l = lfs[i]
if (l instanceof Promise) {
const r = await l.then(r => r)
list.push(r);
console.log('tetetetete4t')
l.then(s => list.push(rl))
} else {
list.push(l);
list.push(l)
}
}
}
console.log(this.type, list);
///记录激活数量
return list;
return list
})
.catch(err => {
console.log(err)
})
},
watch: ['$tis.layouts'],
watch: ['$store.state.tisbus.layouts'],
default() {
return [];
return []
},
},
},
computed: {
actives() {
return this.$tis.getActivesByType(this.type);
// return this.$tis.getActivesByType(this.type);
return this.$store.getters['tisbus/getActivesByType'](this.type)
},
allHiddened() {
if (this.hidden.length === 0) return false;
if (this.hidden.length === 0) return false
return this.list.every((i, index) => {
return this.hidden[index] === true;
});
return this.hidden[index] === true
})
},
},
methods: {
onClose(index) {
console.log("删除", index);
console.log('删除', index)
// //最小化后
this.list[index].lazy = true;
this.$tis.closeComponent([this.list[index].component]);
this.activeCache > 0 ? this.activeCache-- : "";
this.list[index].lazy = true
this.$store.commit('tisbus/closeComponent', [this.list[index].component])
this.activeCache > 0 ? this.activeCache-- : ''
},
onMinize(index) {
this.$set(this.hidden, index, true);
this.$set(this.hidden, index, true)
if (this.active === index) {
this.active = -1;
this.active = -1
for (let i = index + 1; i < this.list.length; i++) {
if (!this.hidden[i]) {
this.active = i;
return;
this.active = i
return
}
}
}
@ -79,8 +84,8 @@ export const controlMixins = {
this.showRightContent = true
this.type1 = 'ohter'
}
this.active = index;
this.$set(this.hidden, index, false);
this.active = index
this.$set(this.hidden, index, false)
// const appCard = this.$refs.appCards[index];
// // console.log('99999999',index,this.$refs.appCards,this.$refs.appCards[index]);
// appCard.scrollIntoView({
@ -88,20 +93,19 @@ export const controlMixins = {
// block: "start",
// inline: "start",
// });
this.$forceUpdate();
this.$forceUpdate()
},
onHideAll() {
this.list.forEach((item, index) => {
this.$set(this.hidden, index, true);
});
this.active = -1;
this.$set(this.hidden, index, true)
})
this.active = -1
},
onOpenAll() {
this.list.forEach((item, index) => {
this.$set(this.hidden, index, false);
});
this.active = 0;
this.$set(this.hidden, index, false)
})
this.active = 0
},
},
}

51
src/tis_app_template_kt/src/main.js

@ -1,6 +1,8 @@
import tis, {setup} from "./tis";
import App from "./App.vue";
import './public-path'
// import tis, { setup } from "./tis";
import {setup} from './tis'
import App from './App.vue'
import store from './tis/store'
import EventBusExample from './components/EventBusExample'
import GlobalStateExample from './components/GlobalStateExample.vue'
import SlideExample from './components/SlideExample.vue'
@ -9,33 +11,38 @@ import SlideExample from './components/SlideExample.vue'
// import {registerApps} from './scriptsLoader/index'
// 生命周期函数
function bootstrap(params) {
console.log(`[SubApp: ${tis.appId}] boostrap`, params);
console.log(`[SubApp: ${tis.appId}] boostrap`, params)
}
function mount(params) {
// window.esapp = tis;
// console.log('app_demo.....',window.tisApp.Vue)
// registerApps();
console.log(`[SubApp: ${tis.appId}] mount`, params.tis);
// console.log(`[SubApp: ${tis.appId}] mount`, params.tis);
console.log(`[SubApp: mount`, params.tis)
}
function show(params) {
console.log(`[Template App--->: ${tis.appId}] show`, params);
tis.menuStatusUpdate();
// console.log(`[Template App--->: ${tis.appId}] show`, params);
console.log(`[Template App--->: show`, params)
// tis.menuStatusUpdate();
store.dispatch('tisbus/menuStatusUpdate')
}
function hide(params) {
console.log(`[SubApp: ${tis.appId}] hide`, params);
// console.log(`[SubApp: ${tis.appId}] hide`, params);
console.log(`[SubApp: hide`, params)
}
function unmount(params) {
console.log(`[SubApp: ${tis.appId}] unmount`, params);
// console.log(`[SubApp: ${tis.appId}] unmount`, params);
console.log(`[SubApp: unmount`, params)
}
// 收到消息
function onMessage(params, message) {
console.log(`我是子应用[SubApp: ${tis.appId}] onMessage`, params, message);
// console.log(`我是子应用[SubApp: ${tis.appId}] onMessage`, params, message);
console.log(`我是子应用[SubApp: onMessage`, params, message)
}
//初始化全局组件
@ -45,9 +52,10 @@ function install() {
// 点击菜单
function onMenu(menu) {
const {component} = menu;
console.log("当前被点击菜单", menu, component)
tis.openComponentByMenu(component);
const {component} = menu
console.log('当前被点击菜单', menu, component)
// tis.openComponentByMenu(component);
store.dispatch('tisbus/openComponentByMenu', component)
}
//api初始化
@ -55,25 +63,23 @@ function onMenu(menu) {
//layouts 初始化,内部组件
const layout = [
{
title: "右1",
title: '右1',
component: EventBusExample,
lazy: false,
type: 'RightWidget',
},
{
title: "底1",
title: '底1',
component: GlobalStateExample,
lazy: false,
type: 'BottomWidget',
},
{
title: "底2",
title: '底2',
component: SlideExample,
lazy: false,
type: 'BottomWidget',
},
]
// 启动
@ -86,8 +92,9 @@ setup(App, {
show,
unmount,
onMessage,
onMenu
});
onMenu,
})
// for qiankun framework
export * from "./tis";
// export * from "./tis";
export * from './tis'

16
src/tis_app_template_kt/src/pc.vue

@ -43,14 +43,14 @@
},
},
created() {
this.off = this.$tis.$on(
"visibleAppCards",
{system: true},
(payload, source) => {
this.visibleAppCards = !!payload;
console.log(payload, source);
}
);
// this.off = this.$tis.$on(
// "visibleAppCards",
// {system: true},
// (payload, source) => {
// this.visibleAppCards = !!payload;
// console.log(payload, source);
// }
// );
},
beforeDestroy() {
this.off();

3
src/tis_app_template_kt/src/public-path.js

@ -0,0 +1,3 @@
if (window.__POWERED_BY_QIANKUN__) {
__webpack_public_path__ = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__;
}

2
src/tis_app_template_kt/src/tis/bus.js

@ -70,7 +70,7 @@ const bus = new Vue({
clearInterval(looper);
} else {
let nowTime = new Date().getTime();
if (nowTime - startTime > 2000) {
if (nowTime - startTime > 20000) {
if (!assets) {
reject(`[loading error:${component}]:组件资源加载失败`)
} else {

157
src/tis_app_template_kt/src/tis/index.js

@ -1,21 +1,21 @@
const devLib = process.env.VUE_APP_DEVLIB === "dev";
console.log('当前版本======> for',process.env.VUE_APP_DEVLIB)
const devLib = process.env.VUE_APP_DEVLIB === 'dev'
console.log('当前版本======> for', process.env.VUE_APP_DEVLIB, window.__POWERED_BY_QIANKUN__, window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__)
if (window.__POWERED_BY_QIANKUN__) {
// eslint-disable-next-line no-undef
__webpack_public_path__ = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__ + (devLib ? "/TIS_APP_TEMPLATE_KT/" : '');
//__webpack_public_path__ = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__ + (devLib ? '/TIS_APP_TEMPLATE_KT/' : '')
}
import Vue from "vue";
import Vue from 'vue'
import store from './store'
import AsyncComputed from 'vue-async-computed'
import axios from 'axios'
import Vuex from 'vuex'
import EventBusExample from '../components/EventBusExample'
import bus, { onSetup, onMount } from './bus'
// import bus, { onSetup, onMount } from './bus'
Vue.component('EventBusExample', EventBusExample)
Vue.config.productionTip = false;
Vue.use(AsyncComputed);
const dev = process.env.NODE_ENV === 'development';
Vue.config.productionTip = false
Vue.use(AsyncComputed)
const dev = process.env.NODE_ENV === 'development'
// const sdk = process.env.VUE_APP_SDK === 'sdk';
//作为sdk向组件提供能力时,确保加载的资源是当前组件域下的资源,
// http://localhost:7001是一个写死的路径。。如何能正确的获取到组件的域
@ -24,21 +24,22 @@ let _App,
_options = {},
// _layout,//由自定义组件和第三方组件组成的布局组件集合
// eslint-disable-next-line no-unused-vars
_props = {};
_props = {}
export function setup(App, options = {}) {
_App = App;
_options = options;
onSetup(options)
_App = App
_options = options
// onSetup(options)
store.commit('tisbus/onSetup', options)
if (typeof _options.install === "function") {
_options.install(Vue);
if (typeof _options.install === 'function') {
_options.install(Vue)
}
// 独立运行时
if (!window.__POWERED_BY_QIANKUN__) {
Vue.prototype.$tis = bus;
// Vue.prototype.$tis = bus
// console.log('----------','独立运行')
mount();
mount()
}
}
@ -50,26 +51,26 @@ export async function bootstrap(props) {
//将这个bus同步给app内维护的bus
// bus.initAppBusById(bus,props.tis.appId)
// props.tis.privateBus.asserts = bus.
store.commit('tisbus/updateAppId', props.tis.appId)
//主题初始化
const theme = localStorage.getItem("TIS_DESIGN_THEME") || 'default';
swithTheme(theme);
_props = props;
Vue.prototype.$tis = bus;
Vue.prototype.$EsDataMsg = function (params = {}) {
if (typeof params.callback === "function") {
bus.$on('message', {system: true}, async (payload) => {
params.callback(payload.message)
})
}
}
Vue.prototype.$EsOpenComponent = function () {
}
const theme = localStorage.getItem('TIS_DESIGN_THEME') || 'default'
swithTheme(theme)
_props = props
// Vue.prototype.$tis = bus
// TODO 暂无使用的地方,先注释掉
// Vue.prototype.$EsDataMsg = function(params = {}) {
// if (typeof params.callback === 'function') {
// bus.$on('message', {system: true}, async payload => {
// params.callback(payload.message)
// })
// }
// }
Vue.prototype.$EsOpenComponent = function() {}
props.onMessage.ref = _options.onMessage // 暴露onMessage回调给宿主
props.onMenu && (props.onMenu.ref = _options.onMenu) // 暴露onMessage回调给宿主
if (typeof _options.bootstrap === "function") {
_options.bootstrap(props);
if (typeof _options.bootstrap === 'function') {
_options.bootstrap(props)
}
;
}
/**
@ -78,48 +79,52 @@ export async function bootstrap(props) {
export async function mount(props = {}) {
//兼容kt接口
Vue.prototype.$ajaxGet = axios.get;
Vue.prototype.$ajaxPost = axios.post;
Vue.prototype.$ajaxPut = axios.put;
Vue.prototype.$ajaxGet = axios.get
Vue.prototype.$ajaxPost = axios.post
Vue.prototype.$ajaxPut = axios.put
Vue.prototype.$ajaxDelete = axios.delete
Vue.prototype.$axios = axios;
Vue.prototype.$axios = axios
// 等待bus执行mount生命周期
await onMount(props)
await store.dispatch('tisbus/onMount', props)
const {container} = props;
document.documentElement.setAttribute('data-device', "pc");
window.esapp = Object.assign({}, {
const {container} = props
document.documentElement.setAttribute('data-device', 'pc')
window.esapp = Object.assign(
{},
{
Vue: Vue,
vue: _instance = new Vue({
vue: (_instance = new Vue({
store,
render: h => h(_App),
}).$mount(container ? container.querySelector("#app") : "#app"),
}).$mount(container ? container.querySelector('#app') : '#app')),
add_path: function(route, name, obj) {
store.registerModule(name, obj);
store.registerModule(name, obj)
},
add_store: function(module, data) {
store.commit(module, data);
store.commit(module, data)
},
Vuex: Vuex,
VueRouter: {},
registerAppAsync: function(source) {
return source
},
tis: props.tis || bus, //新框架核心对象,
flag: "",
// tis: props.tis || bus, //新框架核心对象,
tis: props.tis || new Vue(), //新框架核心对象,
flag: '',
ShareMap: window.esapp ? window.esapp.ShareMap : {},
});
}
)
console.log('应用 mounted,检视esapp对象', window.esapp)
if (typeof _options.mount === "function") {
_options.mount(props);
if (typeof _options.mount === 'function') {
_options.mount(props)
}
// console.log("---", window.esapp)
bus.openComponentByMenu(['kt_zzgl_datapackaging'])
bus.openComponentByMenu(['GlobalStateExample'])
setTimeout(() => {
//store.dispatch('tisbus/openComponentByMenu', ['kt_zzgl_datapackaging'])
//store.dispatch('tisbus/openComponentByMenu', ['GlobalStateExample'])
store.dispatch('tisbus/openComponentByMenu', ['KTWGWLGH'])
}, 1000)
}
/**
@ -127,12 +132,12 @@ export async function mount(props = {}) {
*/
export async function unmount(props = {}) {
if (_instance) {
_instance.$destroy();
_instance.$el.innerHTML = "";
_instance = null;
_instance.$destroy()
_instance.$el.innerHTML = ''
_instance = null
}
if (typeof _options.unmount === "function") {
_options.unmount(props);
if (typeof _options.unmount === 'function') {
_options.unmount(props)
}
}
@ -142,20 +147,20 @@ export async function unmount(props = {}) {
export async function update(props = {}) {
if (props.show === true && typeof _options.show === 'function') {
//如果当前运行应用和本应用相同,则不执行此函数(待开发。。)
swithTheme(props.theme);
_options.show(props.params);
swithTheme(props.theme)
_options.show(props.params)
}
if (props.show === false && typeof _options.hide === 'function') {
_options.hide(props.params);
_options.hide(props.params)
}
if (props.theme) {
swithTheme(props.theme)
}
if (typeof _options.update === "function") {
_options.update(props);
if (typeof _options.update === 'function') {
_options.update(props)
}
}
@ -163,21 +168,23 @@ export async function update(props = {}) {
* 主题切换功能
*/
function swithTheme(param) {
console.log('<------当前主题-------->', param);
const container = document.querySelector('body');
const _themeStyle = document.getElementById("tis_app_theme_style");
if (_themeStyle) container.removeChild(_themeStyle);
console.log('<------当前主题-------->', param)
const container = document.querySelector('body')
const _themeStyle = document.getElementById('tis_app_theme_style')
if (_themeStyle) container.removeChild(_themeStyle)
const themeStyle = document.createElement('style')
themeStyle.setAttribute('id', 'tis_app_theme_style');
themeStyle.setAttribute('id', 'tis_app_theme_style')
themeStyle.setAttribute('type', 'text/css')
const dir = param === "default" ? "chalk" : param;
const baseURL = dev ? "http://localhost:9902/tis-ui/" : "/TIS_LIB/tis-ui/";
const dir = param === 'default' ? 'chalk' : param
const baseURL = dev ? 'http://localhost:9902/tis-ui/' : '/TIS_LIB/tis-ui/'
// theme-chalk/index${dir}.css
axios.get(`${baseURL}/theme-${dir}/index.css`).then(r => themeStyle.innerHTML = r.data).catch(r => console.log(r));
container.appendChild(themeStyle);
axios
.get(`${baseURL}/theme-${dir}/index.css`)
.then(r => (themeStyle.innerHTML = r.data))
.catch(r => console.log(r))
container.appendChild(themeStyle)
}
export default bus;
// export default bus

2
src/tis_app_template_kt/src/tis/layouts/BackContainer.vue

@ -17,7 +17,7 @@
BackWidget: {
lazy: true,
get() {
const p = this.$tis.getWidgetsByType('BackWidget')[0];
const p = this.$store.dispatch('tisbus/getWidgetsByType', 'BackWidget')?.[0]
return p && p.then(r => r.component)
}
},

3
src/tis_app_template_kt/src/tis/layouts/DialogContainer.vue

@ -14,10 +14,9 @@
components:{DialogPc,DialogPad},
computed:{
deviceType(){
return this.$tis.getDeviceType();
return this.$store.getters['tisbus/getDeviceType']
}
}
}
</script>

7
src/tis_app_template_kt/src/tis/store/index.js

@ -6,14 +6,15 @@
import Vue from 'vue'
import Vuex from 'vuex'
import createLogger from 'vuex/dist/logger'
import tisbus from './modules/tisbus'
const debug = process.env.NODE_ENV !== 'production'
Vue.use(Vuex)
export default new Vuex.Store({
modules: {
tisbus,
},
strict: debug,
plugin: debug ? [createLogger()] : []// debug add logger module
strict: false,
plugin: debug ? [createLogger()] : [], // debug add logger module
})

299
src/tis_app_template_kt/src/tis/store/modules/tisbus.js

@ -0,0 +1,299 @@
import Vue from 'vue'
import {registerApps} from '../.././scriptsLoader/index'
export default {
namespaced: true,
state: {
appId: '',
dialogZIndex: 400,
curBaseUrl: '',
baseUrl: process.env.NODE_ENV === 'development' ? process.env.BASE_URL : '',
components: [], // components
asserts: {}, // 所有资源
deviceType: 'pc',
actives: [], // 从菜单中激活的组件,
layouts: [], // 由自定义组件和第三方组件组成的布局组件集合
widgets: [], // 在应用模板内部需要加载的widgets
},
getters: {
// 获取设备型号
getDeviceType(state) {
return state.deviceType
},
// 获取布局组件集合
getTemplateLayouts(state) {
return state.layouts
},
// 计算弹窗的z-index
getNextDialogZIndex(state) {
let zIndex = 0
for (let item of state.actives) {
if (item.zIndex && item.zIndex > zIndex) {
zIndex = item.zIndex
}
}
return zIndex > 0 ? zIndex + 1 : state.dialogZIndex
},
// 获取含有当前类型的激活组件
getActivesByType(state) {
return type => {
console.log(
'获取含有当前类型的激活组件',
state.actives.filter(a => a.type === type)
)
return state.actives.filter(a => a.type === type)
}
// return type => state.actives.filter(a => a.type === type)
},
},
mutations: {
updateAppId(state, appId) {
state.appId = appId
},
// 传递当前所处组件的上下文环境
menuStatusUpdate(state) {
const onActives = state.layouts
.filter(l => !l.lazy)
.map(c => ({
component: c.component.name || c.component,
status: c.status,
}))
const appId = state.appId
// 调用框架的tis进行事件通信
window.esapp.tis.$emit('TIS_TEMPLATE_MENU_ACTIVE', {
appId,
onActives: onActives,
system: true,
})
},
// 初始化配置信息
async initData(state, props) {
const dev = process.env.NODE_ENV === 'development'
state.curBaseUrl = props.tis ? props.tis.entry : state.baseUrl
const esData = await Vue.prototype.$axios.get(`${state.curBaseUrl}/esplug.json`).catch(err => console.error(err))
console.log('初始化配置信息', esData)
const asserts = await Vue.prototype.$axios
.get(`${state.curBaseUrl}/tisplatform.json`)
.catch(err => console.error(err))
try {
// 运行模式才取用框架返回的数据
if (props.tis && !dev) {
console.log('框架传入的components:', props.tis.components)
state.components = props.tis.components
? [...props.tis.components, ...esData.data.components]
: esData.data.components
state.asserts = Object.keys(props.tis.asserts).length !== 0 ? props.tis.asserts : asserts.data
state.widgets = props.tis.widgets ? props.tis.widgets : esData.data.widgets
} else {
// state.actives = esData.data.components
state.components = esData.data.components
state.asserts = asserts.data
state.widgets = esData.data.widgets
}
// 避免不填此属性,默认懒加载
state.components = state.components.map(c => {
if (!Object.prototype.hasOwnProperty.call(c, 'lazy') && c.type !== 'background') {
c.lazy = true
}
return c
})
console.log('初始化配置信息components', state.components)
} catch (e) {
console.error(e)
}
},
// 激活窗口
activeComponent(state, component) {
const curComponent = state.actives.find(v => (v.component.name || v.component) === component)
const maxZIndex = Math.max.apply(
Math,
state.actives.map(function(o) {
return o.zIndex
})
)
const maxComponent = state.actives.find(v => v.zIndex === maxZIndex)
if (curComponent === maxComponent) return
maxComponent.zIndex = curComponent.zIndex
curComponent.zIndex = maxZIndex
state.actives = [...state.actives]
},
// 最小化激活的弹窗
minimizeComponent(state, component) {
state.actives.forEach(c => {
const comp = c.component.name || c.component
console.log(comp, component, c)
if (comp === component) {
c.status = 'minimize'
c.zIndex = 0
}
})
state.actives = [...state.actives]
console.log('after minimize', state.actives)
this.commit('tisbus/menuStatusUpdate')
},
// 关闭组件
closeComponent(state, components) {
// 修改layout中的状态
state.layouts.forEach(c => {
const component = c.component.name || c.component
// 激活组件命中此组件,更改状态
const hit = components.includes(component)
if (hit) {
c.lazy = hit
}
})
// active中删除该组件
console.log('待删除组件', components)
components.forEach(c => {
const index = state.actives.findIndex(b => b.component === c)
console.log('aaaaaa', index)
if (index >= 0) {
state.actives.splice(index, 1)
}
})
console.log('layouts变化状态', state.layouts)
console.log('actives变化状态', state.actives)
this.commit('tisbus/menuStatusUpdate')
},
// initLayouts state.layouts 初始化,外部组件
initLayouts(state, layouts = []) {
state.layouts.push(...layouts.filter(l => !l.lazy))
},
onSetup(state, options = {}) {
state.layouts = options.layout
},
},
actions: {
// 加载组件资源
async loadComponent({state}, component) {
const comp = state.components.find(arg => arg.component === component) || {}
console.log('所有组件...', state.components)
console.log('所有资源...', state.asserts)
console.log('当前加载组件...', component)
console.log('匹配到的组件...', comp)
let assets = null,
dependencies = [],
isLib = false
try {
const info = comp.segprefix
assets = state.asserts[info]
dependencies = comp.dependencies || []
isLib = comp.lib
} catch (e) {
console.error(e)
}
// 等待依赖下载完毕
for (const refer of dependencies) {
let reference = state.asserts[refer] || null
await registerApps(reference, state.curBaseUrl)
}
return new Promise((resolve, reject) => {
// 加载组件资源
console.log('开始加载组件资源', assets, state.curBaseUrl)
registerApps(assets, state.curBaseUrl)
.then(() => {
if (!isLib) {
// 正常组件的加载流程,isLib为true代表纯js lib库的加载
let startTime = new Date().getTime()
const looper = setInterval(() => {
if (Vue.component(`${component}`)) {
resolve(comp)
clearInterval(looper)
} else {
let nowTime = new Date().getTime()
if (nowTime - startTime > 20000) {
if (!assets) {
reject(`[loading error:${component}]:组件资源加载失败`)
} else {
resolve(comp)
return;
reject(`[loading error:${component}]:loading component timed out`)
}
clearInterval(looper)
}
}
}, 300)
} else {
resolve(comp)
}
})
.catch(err => {
if (!assets) {
reject(`[loading error:${component}]:组件资源加载失败`)
} else {
reject(`[loading error:${component}]:${err}`)
}
})
})
},
// 自定义函数,支持开发者按需增加接口
openComponentByMenu({commit, state, getters}, components) {
// 长度变化才会触发computed?
state.components
.filter(c => {
const component = c.component.name || c.component
// 激活组件命中此组件,更改状态
const hit = components.includes(component)
if (hit) {
c.lazy = !hit
c.status = c.status === 'minimize' ? 'normal' : c.status
return c
}
})
.forEach(c => {
if (!state.layouts.some(l => (l.component.name || l.component) === c.component)) {
state.layouts.push(c)
} else {
// 改变状态
state.layouts.forEach(l => {
if ((l.component.name || l.component) === c.component) {
l.lazy = false
}
})
}
if (!state.actives.some(l => l.component === c.component)) {
// 弹窗暂定为同一时间只能打开一个 "PopupWidget" 非dialog
// 计算z-index
if (!c.zIndex) {
// c.zIndex = commit('getNextDialogZIndex')
c.zIndex = getters.getNextDialogZIndex
}
if (c.type === 'dialog') {
state.actives = [c]
} else {
state.actives.push(c)
}
}
})
// 有 加入 无 删除?
// 强制触发更新
state.actives = [...state.actives]
console.log('layouts变化状态', state.layouts)
console.log('actives变化状态', state.actives)
commit('menuStatusUpdate')
},
// 获取组件
getWidgetsByType({dispatch, state}, type) {
//以type 或 position 命中widget,背景板默认lazy=false
return state.layouts
.filter(f => (f.type === type || f.position === type) && !f.lazy)
.map(f => {
// string类型,来自配置文件,需要下载资源才能使用,懒加载组件不加载但是需要加入到数组中、、
if (typeof f.component === 'string') {
console.log('下载component资源', f.component)
return dispatch('loadComponent', f.component)
} else {
return f
}
})
},
async onMount({commit, state}, props) {
await commit('initData', props)
commit('initLayouts', state.components)
commit('initLayouts', state.widgets)
},
},
}
Loading…
Cancel
Save