Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
T
TrainSys
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
苏州培训方案
TrainSys
提交
41a7751b
提交
41a7751b
编写于
4月 06, 2023
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chitanda 发布系统代码 [TrainSys,网页端]
上级
44891826
变更
20
显示空白字符变更
内嵌
并排
正在显示
20 个修改的文件
包含
1595 行增加
和
70 行删除
+1595
-70
package.json
app_Web/package.json
+6
-5
pnpm-lock.yaml
app_Web/pnpm-lock.yaml
+51
-29
echarts.min.js
app_Web/public/extras/js/echarts/5.4.2/echarts.min.js
+45
-0
system-import.json
app_Web/public/extras/json/system-import.json
+1
-0
chart-control-ede059a5.js
...e/vue2-de-chart-view@0.0.1/dist/chart-control-ede059a5.js
+840
-0
chart-control.legacy.js
...age/vue2-de-chart-view@0.0.1/dist/chart-control.legacy.js
+1
-0
chart-view-4d8fd435.js
...kage/vue2-de-chart-view@0.0.1/dist/chart-view-4d8fd435.js
+106
-0
chart-view.legacy.js
...ackage/vue2-de-chart-view@0.0.1/dist/chart-view.legacy.js
+1
-0
ibiz-template-plugin.es.js
.../vue2-de-chart-view@0.0.1/dist/ibiz-template-plugin.es.js
+34
-0
index.legacy.js
...ate-package/vue2-de-chart-view@0.0.1/dist/index.legacy.js
+1
-0
style.css
...-template-package/vue2-de-chart-view@0.0.1/dist/style.css
+1
-0
package.json
...iz-template-package/vue2-de-chart-view@0.0.1/package.json
+90
-0
action-toolbar.tsx
...b/src/components/common/action-toolbar/action-toolbar.tsx
+7
-1
grid-control.tsx
app_Web/src/components/widgets/grid-control/grid-control.tsx
+1
-0
default-plugin-register.ts
app_Web/src/default-plugin-register.ts
+14
-0
main.ts
app_Web/src/main.ts
+2
-0
index-view.ts
app_Web/src/views/index-view/index-view.ts
+51
-35
vite.config.ts
app_Web/vite.config.ts
+1
-0
Usr0403823008.json
...Publish/PSAPPDATAENTITIES/City/PSGRIDS/Usr0403823008.json
+171
-0
cityUsr0403221890GridView.json
...mplatePublish/PSAPPDEVIEWS/cityUsr0403221890GridView.json
+171
-0
未找到文件。
app_Web/package.json
浏览文件 @
41a7751b
...
...
@@ -13,15 +13,16 @@
"dependencies"
:
{
"@floating-ui/dom"
:
"^1.0.11"
,
"@ibiz-template/command"
:
"^0.0.1-beta.50"
,
"@ibiz-template/controller"
:
"^0.0.1-beta.5
5
"
,
"@ibiz-template/core"
:
"^0.0.1-beta.5
1
"
,
"@ibiz-template/controller"
:
"^0.0.1-beta.5
7
"
,
"@ibiz-template/core"
:
"^0.0.1-beta.5
7
"
,
"@ibiz-template/model"
:
"^0.0.1-beta.55"
,
"@ibiz-template/runtime"
:
"^0.0.1-beta.5
5
"
,
"@ibiz-template/service"
:
"^0.0.1-beta.5
5
"
,
"@ibiz-template/runtime"
:
"^0.0.1-beta.5
7
"
,
"@ibiz-template/service"
:
"^0.0.1-beta.5
7
"
,
"@ibiz-template/theme"
:
"^0.0.1-beta.54"
,
"@ibiz-template/vue-util"
:
"^0.0.1-beta.5
5
"
,
"@ibiz-template/vue-util"
:
"^0.0.1-beta.5
7
"
,
"@ibiz/dynamic-model-api"
:
"^2.1.17"
,
"dayjs"
:
"^1.11.7"
,
"echarts"
:
"^5.4.2"
,
"lodash-es"
:
"^4.17.21"
,
"path-browserify"
:
"^1.0.1"
,
"pinia"
:
"^2.0.28"
,
...
...
app_Web/pnpm-lock.yaml
浏览文件 @
41a7751b
...
...
@@ -8,32 +8,35 @@ dependencies:
specifier
:
^0.0.1-beta.50
version
:
0.0.1-beta.50
'
@ibiz-template/controller'
:
specifier
:
^0.0.1-beta.5
5
version
:
0.0.1-beta.5
5(@ibiz-template/core@0.0.1-beta.51)(@ibiz-template/model@0.0.1-beta.55)(@ibiz-template/runtime@0.0.1-beta.55)(@ibiz-template/service@0.0.1-beta.55
)(lodash-es@4.17.21)(qs@6.11.1)(qx-util@0.4.8)
specifier
:
^0.0.1-beta.5
7
version
:
0.0.1-beta.5
7(@ibiz-template/core@0.0.1-beta.57)(@ibiz-template/model@0.0.1-beta.55)(@ibiz-template/runtime@0.0.1-beta.57)(@ibiz-template/service@0.0.1-beta.57
)(lodash-es@4.17.21)(qs@6.11.1)(qx-util@0.4.8)
'
@ibiz-template/core'
:
specifier
:
^0.0.1-beta.5
1
version
:
0.0.1-beta.5
1(lodash-es@4.17.21)(qx-util@0.4.8
)
specifier
:
^0.0.1-beta.5
7
version
:
0.0.1-beta.5
7(lodash-es@4.17.21)(qx-util@0.4.8)(ramda@0.28.0
)
'
@ibiz-template/model'
:
specifier
:
^0.0.1-beta.55
version
:
0.0.1-beta.55(@ibiz/dynamic-model-api@2.1.17)(lodash-es@4.17.21)(qx-util@0.4.8)
'
@ibiz-template/runtime'
:
specifier
:
^0.0.1-beta.5
5
version
:
0.0.1-beta.5
5(@ibiz-template/core@0.0.1-beta.51)(@ibiz-template/model@0.0.1-beta.55)(@ibiz-template/service@0.0.1-beta.55
)(qx-util@0.4.8)
specifier
:
^0.0.1-beta.5
7
version
:
0.0.1-beta.5
7(@ibiz-template/core@0.0.1-beta.57)(@ibiz-template/model@0.0.1-beta.55)(@ibiz-template/service@0.0.1-beta.57
)(qx-util@0.4.8)
'
@ibiz-template/service'
:
specifier
:
^0.0.1-beta.5
5
version
:
0.0.1-beta.5
5(@ibiz-template/core@0.0.1-beta.51
)(@ibiz-template/model@0.0.1-beta.55)(qx-util@0.4.8)(ramda@0.28.0)
specifier
:
^0.0.1-beta.5
7
version
:
0.0.1-beta.5
7(@ibiz-template/core@0.0.1-beta.57
)(@ibiz-template/model@0.0.1-beta.55)(qx-util@0.4.8)(ramda@0.28.0)
'
@ibiz-template/theme'
:
specifier
:
^0.0.1-beta.54
version
:
0.0.1-beta.54
'
@ibiz-template/vue-util'
:
specifier
:
^0.0.1-beta.5
5
version
:
0.0.1-beta.5
5(@ibiz-template/controller@0.0.1-beta.55)(@ibiz-template/core@0.0.1-beta.51)(@ibiz-template/model@0.0.1-beta.55)(@ibiz-template/service@0.0.1-beta.55
)(qs@6.11.1)(qx-util@0.4.8)(ramda@0.28.0)(vue-router@3.6.5)(vue@2.7.14)
specifier
:
^0.0.1-beta.5
7
version
:
0.0.1-beta.5
7(@ibiz-template/controller@0.0.1-beta.57)(@ibiz-template/core@0.0.1-beta.57)(@ibiz-template/model@0.0.1-beta.55)(@ibiz-template/service@0.0.1-beta.57
)(qs@6.11.1)(qx-util@0.4.8)(ramda@0.28.0)(vue-router@3.6.5)(vue@2.7.14)
'
@ibiz/dynamic-model-api'
:
specifier
:
^2.1.17
version
:
2.1.17(qx-util@0.4.8)
dayjs
:
specifier
:
^1.11.7
version
:
1.11.7
echarts
:
specifier
:
^5.4.2
version
:
5.4.2
lodash-es
:
specifier
:
^4.17.21
version
:
4.17.21
...
...
@@ -938,8 +941,8 @@ packages:
qx-util
:
0.4.8
dev
:
false
/@ibiz-template/controller@0.0.1-beta.5
5(@ibiz-template/core@0.0.1-beta.51)(@ibiz-template/model@0.0.1-beta.55)(@ibiz-template/runtime@0.0.1-beta.55)(@ibiz-template/service@0.0.1-beta.55
)(lodash-es@4.17.21)(qs@6.11.1)(qx-util@0.4.8)
:
resolution
:
{
integrity
:
sha512-
niHc2Koqer0N4d/1tFFnFvMmjABiuhF6czCrjKXcHlcAXV3i9TzUBXYfDu3ztF9dEVSyJgELyShZtzPSYDGJ5
Q==
}
/@ibiz-template/controller@0.0.1-beta.5
7(@ibiz-template/core@0.0.1-beta.57)(@ibiz-template/model@0.0.1-beta.55)(@ibiz-template/runtime@0.0.1-beta.57)(@ibiz-template/service@0.0.1-beta.57
)(lodash-es@4.17.21)(qs@6.11.1)(qx-util@0.4.8)
:
resolution
:
{
integrity
:
sha512-
JKWZkEa5pQ/xI2+bhCDSp2QSjw65hspDFQKaznjMhxIpZ9I9kP+6VgDzGEKcsWJDlCIvpFoh/fllLntf5qxji
Q==
}
peerDependencies
:
'
@ibiz-template/core'
:
^0.0.1-beta.30
'
@ibiz-template/model'
:
^0.0.1-beta.30
...
...
@@ -949,10 +952,10 @@ packages:
qs
:
^6.11.0
qx-util
:
^0.4.8
dependencies
:
'
@ibiz-template/core'
:
0.0.1-beta.5
1(lodash-es@4.17.21)(qx-util@0.4.8
)
'
@ibiz-template/core'
:
0.0.1-beta.5
7(lodash-es@4.17.21)(qx-util@0.4.8)(ramda@0.28.0
)
'
@ibiz-template/model'
:
0.0.1-beta.55(@ibiz/dynamic-model-api@2.1.17)(lodash-es@4.17.21)(qx-util@0.4.8)
'
@ibiz-template/runtime'
:
0.0.1-beta.5
5(@ibiz-template/core@0.0.1-beta.51)(@ibiz-template/model@0.0.1-beta.55)(@ibiz-template/service@0.0.1-beta.55
)(qx-util@0.4.8)
'
@ibiz-template/service'
:
0.0.1-beta.5
5(@ibiz-template/core@0.0.1-beta.51
)(@ibiz-template/model@0.0.1-beta.55)(qx-util@0.4.8)(ramda@0.28.0)
'
@ibiz-template/runtime'
:
0.0.1-beta.5
7(@ibiz-template/core@0.0.1-beta.57)(@ibiz-template/model@0.0.1-beta.55)(@ibiz-template/service@0.0.1-beta.57
)(qx-util@0.4.8)
'
@ibiz-template/service'
:
0.0.1-beta.5
7(@ibiz-template/core@0.0.1-beta.57
)(@ibiz-template/model@0.0.1-beta.55)(qx-util@0.4.8)(ramda@0.28.0)
async-validator
:
4.2.5
dayjs
:
1.11.7
lodash-es
:
4.17.21
...
...
@@ -960,11 +963,12 @@ packages:
qx-util
:
0.4.8
dev
:
false
/@ibiz-template/core@0.0.1-beta.5
1(lodash-es@4.17.21)(qx-util@0.4.8
)
:
resolution
:
{
integrity
:
sha512-
Bqvmg3WyBFt3GlcaUoAsSzNoSJAgOpjgt1rRxtnV+jxkZTUMhLeC3zbyg1ZsBe+JQMVH9Rs54QPmnpf/nsubpw
==
}
/@ibiz-template/core@0.0.1-beta.5
7(lodash-es@4.17.21)(qx-util@0.4.8)(ramda@0.28.0
)
:
resolution
:
{
integrity
:
sha512-
Xc5sVNolk4JIXZj8+okztyMMNBvAsOayjzT0FWH5ENtWnv9TQ2uYUMO2QySl/AtBNablUrCJKOROEDf+lqIbKQ
==
}
peerDependencies
:
lodash-es
:
^4.17.21
qx-util
:
^0.4.8
ramda
:
^0.28.0
dependencies
:
axios
:
1.3.4
lodash-es
:
4.17.21
...
...
@@ -972,6 +976,7 @@ packages:
pluralize
:
8.0.0
qs
:
6.11.1
qx-util
:
0.4.8
ramda
:
0.28.0
transitivePeerDependencies
:
-
debug
dev
:
false
...
...
@@ -989,8 +994,8 @@ packages:
qx-util
:
0.4.8
dev
:
false
/@ibiz-template/runtime@0.0.1-beta.5
5(@ibiz-template/core@0.0.1-beta.51)(@ibiz-template/model@0.0.1-beta.55)(@ibiz-template/service@0.0.1-beta.55
)(qx-util@0.4.8)
:
resolution
:
{
integrity
:
sha512-
20HOhMFoHasJi6soAo50fzP7/h3UsOS98fEmvYIXRt1aqsufKSj6XF80VlhDGF+9N/srDjPl8Kk75icufTcI6g
==
}
/@ibiz-template/runtime@0.0.1-beta.5
7(@ibiz-template/core@0.0.1-beta.57)(@ibiz-template/model@0.0.1-beta.55)(@ibiz-template/service@0.0.1-beta.57
)(qx-util@0.4.8)
:
resolution
:
{
integrity
:
sha512-
fw7jm6x+/KH5JcCtuxfM3aVMf4ztoV2ac+cDXpGJw6H4wXhClAxbp10B/CKc726ow6nCq6n4diLlaKKIN7AMGQ
==
}
peerDependencies
:
'
@ibiz-template/core'
:
^0.0.1-beta.30
'
@ibiz-template/model'
:
^0.0.1-beta.30
...
...
@@ -998,22 +1003,22 @@ packages:
qx-util
:
^0.4.8
dependencies
:
'
@ibiz-template/command'
:
0.0.1-beta.50
'
@ibiz-template/core'
:
0.0.1-beta.5
1(lodash-es@4.17.21)(qx-util@0.4.8
)
'
@ibiz-template/core'
:
0.0.1-beta.5
7(lodash-es@4.17.21)(qx-util@0.4.8)(ramda@0.28.0
)
'
@ibiz-template/model'
:
0.0.1-beta.55(@ibiz/dynamic-model-api@2.1.17)(lodash-es@4.17.21)(qx-util@0.4.8)
'
@ibiz-template/service'
:
0.0.1-beta.5
5(@ibiz-template/core@0.0.1-beta.51
)(@ibiz-template/model@0.0.1-beta.55)(qx-util@0.4.8)(ramda@0.28.0)
'
@ibiz-template/service'
:
0.0.1-beta.5
7(@ibiz-template/core@0.0.1-beta.57
)(@ibiz-template/model@0.0.1-beta.55)(qx-util@0.4.8)(ramda@0.28.0)
qs
:
6.11.1
qx-util
:
0.4.8
dev
:
false
/@ibiz-template/service@0.0.1-beta.5
5(@ibiz-template/core@0.0.1-beta.51
)(@ibiz-template/model@0.0.1-beta.55)(qx-util@0.4.8)(ramda@0.28.0)
:
resolution
:
{
integrity
:
sha512-
5G5GxMp+w3+dm8udHtjv6B2dWtCWdsVOsNmXoFrk/Jhgm7btlH+FLYjXKz0mps6L8pAbP+BSNMk3GDlG/WqTGA
==
}
/@ibiz-template/service@0.0.1-beta.5
7(@ibiz-template/core@0.0.1-beta.57
)(@ibiz-template/model@0.0.1-beta.55)(qx-util@0.4.8)(ramda@0.28.0)
:
resolution
:
{
integrity
:
sha512-
jkgXqzp7hKwv2/ZCmUtxUZoT97+mccRf2VBTW7mUz/b3exHkZqcZEJmFVAtT5Z9luPeCUsRsP2wF0zqusgtShQ
==
}
peerDependencies
:
'
@ibiz-template/core'
:
^0.0.1-beta.30
'
@ibiz-template/model'
:
^0.0.1-beta.30
qx-util
:
^0.4.8
ramda
:
^0.28.0
dependencies
:
'
@ibiz-template/core'
:
0.0.1-beta.5
1(lodash-es@4.17.21)(qx-util@0.4.8
)
'
@ibiz-template/core'
:
0.0.1-beta.5
7(lodash-es@4.17.21)(qx-util@0.4.8)(ramda@0.28.0
)
'
@ibiz-template/model'
:
0.0.1-beta.55(@ibiz/dynamic-model-api@2.1.17)(lodash-es@4.17.21)(qx-util@0.4.8)
qx-util
:
0.4.8
ramda
:
0.28.0
...
...
@@ -1023,8 +1028,8 @@ packages:
resolution
:
{
integrity
:
sha512-xN2cqT43TbQxIPu+8rUd0MFriE9Xfjbyqe5EXWwLqtkigrZf71Ff2xKgW0ILyBSm+0KliXfgPAxFfYtXGFVw/g==
}
dev
:
false
/@ibiz-template/vue-util@0.0.1-beta.5
5(@ibiz-template/controller@0.0.1-beta.55)(@ibiz-template/core@0.0.1-beta.51)(@ibiz-template/model@0.0.1-beta.55)(@ibiz-template/service@0.0.1-beta.55
)(qs@6.11.1)(qx-util@0.4.8)(ramda@0.28.0)(vue-router@3.6.5)(vue@2.7.14)
:
resolution
:
{
integrity
:
sha512-
lxW7RhsvkWKiUPWJN0nOfF/2iwr9ZpOLXzzEJFn0pzs7Cp6YFRcHprjYMvYceD2mQMGh9WQMDDSPCZlYjE8PhA
==
}
/@ibiz-template/vue-util@0.0.1-beta.5
7(@ibiz-template/controller@0.0.1-beta.57)(@ibiz-template/core@0.0.1-beta.57)(@ibiz-template/model@0.0.1-beta.55)(@ibiz-template/service@0.0.1-beta.57
)(qs@6.11.1)(qx-util@0.4.8)(ramda@0.28.0)(vue-router@3.6.5)(vue@2.7.14)
:
resolution
:
{
integrity
:
sha512-
2S4hpAeJ8cFW1BUeYUQ+0ASpyWfcIbVAM5rwIMOi/BSg0GBB6ogUOnnm18yL9eHF2hx2aJGJytrdIUFqY5JEdQ
==
}
peerDependencies
:
'
@ibiz-template/controller'
:
^0.0.1-beta.30
'
@ibiz-template/core'
:
^0.0.1-beta.30
...
...
@@ -1036,10 +1041,10 @@ packages:
vue
:
^2.7.14
vue-router
:
^3.6.5
dependencies
:
'
@ibiz-template/controller'
:
0.0.1-beta.5
5(@ibiz-template/core@0.0.1-beta.51)(@ibiz-template/model@0.0.1-beta.55)(@ibiz-template/runtime@0.0.1-beta.55)(@ibiz-template/service@0.0.1-beta.55
)(lodash-es@4.17.21)(qs@6.11.1)(qx-util@0.4.8)
'
@ibiz-template/core'
:
0.0.1-beta.5
1(lodash-es@4.17.21)(qx-util@0.4.8
)
'
@ibiz-template/controller'
:
0.0.1-beta.5
7(@ibiz-template/core@0.0.1-beta.57)(@ibiz-template/model@0.0.1-beta.55)(@ibiz-template/runtime@0.0.1-beta.57)(@ibiz-template/service@0.0.1-beta.57
)(lodash-es@4.17.21)(qs@6.11.1)(qx-util@0.4.8)
'
@ibiz-template/core'
:
0.0.1-beta.5
7(lodash-es@4.17.21)(qx-util@0.4.8)(ramda@0.28.0
)
'
@ibiz-template/model'
:
0.0.1-beta.55(@ibiz/dynamic-model-api@2.1.17)(lodash-es@4.17.21)(qx-util@0.4.8)
'
@ibiz-template/service'
:
0.0.1-beta.5
5(@ibiz-template/core@0.0.1-beta.51
)(@ibiz-template/model@0.0.1-beta.55)(qx-util@0.4.8)(ramda@0.28.0)
'
@ibiz-template/service'
:
0.0.1-beta.5
7(@ibiz-template/core@0.0.1-beta.57
)(@ibiz-template/model@0.0.1-beta.55)(qx-util@0.4.8)(ramda@0.28.0)
qs
:
6.11.1
qx-util
:
0.4.8
ramda
:
0.28.0
...
...
@@ -2228,6 +2233,13 @@ packages:
resolution
:
{
integrity
:
sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==
}
dev
:
true
/echarts@5.4.2
:
resolution
:
{
integrity
:
sha512-2W3vw3oI2tWJdyAz+b8DuWS0nfXtSDqlDmqgin/lfzbkB01cuMEN66KWBlmur3YMp5nEDEEt5s23pllnAzB4EA==
}
dependencies
:
tslib
:
2.3.0
zrender
:
5.4.3
dev
:
false
/electron-to-chromium@1.4.327
:
resolution
:
{
integrity
:
sha512-DIk2H4g/3ZhjgiABJjVdQvUdMlSABOsjeCm6gmUzIdKxAuFrGiJ8QXMm3i09grZdDBMC/d8MELMrdwYRC0+YHg==
}
dev
:
true
...
...
@@ -4708,6 +4720,10 @@ packages:
resolution
:
{
integrity
:
sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
}
dev
:
true
/tslib@2.3.0
:
resolution
:
{
integrity
:
sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==
}
dev
:
false
/tslib@2.5.0
:
resolution
:
{
integrity
:
sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==
}
dev
:
true
...
...
@@ -5085,3 +5101,9 @@ packages:
resolution
:
{
integrity
:
sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
}
engines
:
{
node
:
'
>=10'
}
dev
:
true
/zrender@5.4.3
:
resolution
:
{
integrity
:
sha512-DRUM4ZLnoaT0PBVvGBDO9oWIDBKFdAVieNWxWwK0niYzJCMwGchRk21/hsE+RKkIveH3XHCyvXcJDkgLVvfizQ==
}
dependencies
:
tslib
:
2.3.0
dev
:
false
app_Web/public/extras/js/echarts/5.4.2/echarts.min.js
0 → 100644
浏览文件 @
41a7751b
因为 它太大了无法显示 源差异 。您可以改为
查看blob
。
app_Web/public/extras/json/system-import.json
浏览文件 @
41a7751b
...
...
@@ -11,6 +11,7 @@
"view-design"
:
"../js/view-design/4.7.0/iview.min.js"
,
"lodash-es"
:
"../js/lodash/4.17.21/lodash.min.js"
,
"qx-util"
:
"../js/qx-util.min.js"
,
"echarts"
:
"../js/echarts/5.4.2/echarts.min.js"
,
"@ibiz/dynamic-model-api"
:
"../js/ibiz-dynamic-model-api.system.min.js"
,
"@ibiz-template/command"
:
"../js/ibiz-template-command.system.min.js"
,
"@ibiz-template/core"
:
"../js/ibiz-template-core.system.min.js"
,
...
...
app_Web/public/plugins/@ibiz-template-package/vue2-de-chart-view@0.0.1/dist/chart-control-ede059a5.js
0 → 100644
浏览文件 @
41a7751b
var
P
=
Object
.
defineProperty
;
var
T
=
(
l
,
d
,
e
)
=>
d
in
l
?
P
(
l
,
d
,
{
enumerable
:
!
0
,
configurable
:
!
0
,
writable
:
!
0
,
value
:
e
})
:
l
[
d
]
=
e
;
var
x
=
(
l
,
d
,
e
)
=>
(
T
(
l
,
typeof
d
!=
"symbol"
?
d
+
""
:
d
,
e
),
e
);
import
{
defineComponent
as
I
,
getCurrentInstance
as
N
,
h
as
v
}
from
"vue"
;
import
{
useControlController
as
z
,
useNamespace
as
D
}
from
"@ibiz-template/vue-util"
;
import
{
ChartModel
as
M
}
from
"@ibiz-template/model"
;
import
{
Neuron
as
j
,
ControlNerve
as
$
,
ControlController
as
R
}
from
"@ibiz-template/controller"
;
import
{
createUUID
as
V
}
from
"qx-util"
;
import
{
init
as
q
}
from
"echarts"
;
import
{
mergeDeepRight
as
w
}
from
"ramda"
;
import
{
ControlService
as
U
}
from
"@ibiz-template/service"
;
class
B
extends
j
{
}
class
X
extends
$
{
createNeuron
()
{
return
new
B
(
this
.
bindAbility
());
}
bindAbility
()
{
return
{
...
super
.
bindAbility
(),
load
:
this
.
controller
.
load
.
bind
(
this
.
controller
)
};
}
}
function
y
(
l
)
{
const
d
=
{};
return
l
&&
Object
.
keys
(
l
).
forEach
((
e
)
=>
{
const
s
=
e
.
indexOf
(
"."
);
if
(
s
===
-
1
)
return
;
const
r
=
e
.
slice
(
s
+
1
);
r
&&
l
[
e
]
!==
void
0
&&
(
d
[
r
]
=
JSON
.
parse
(
l
[
e
]));
}),
d
;
}
function
Y
(
l
)
{
var
e
;
const
d
=
{};
if
(
l
)
{
d
.
show
=
l
.
showTitle
,
d
.
text
=
l
.
title
,
d
.
subtext
=
l
.
subTitle
;
const
s
=
(
e
=
l
.
titlePos
)
==
null
?
void
0
:
e
.
toLowerCase
();
s
===
"left"
||
s
===
"right"
?
d
.
left
=
s
:
(
s
===
"bottom"
||
s
===
"top"
)
&&
(
d
.
left
=
"center"
,
d
.
top
=
s
);
}
return
d
;
}
function
_
(
l
)
{
var
e
;
const
d
=
{};
if
(
l
)
{
d
.
show
=
l
.
showLegend
;
const
s
=
(
e
=
l
.
legendPos
)
==
null
?
void
0
:
e
.
toLowerCase
();
s
===
"left"
||
s
===
"right"
?
(
d
.
left
=
s
,
d
.
top
=
"middle"
,
d
.
orient
=
"vertical"
)
:
s
===
"bottom"
&&
(
d
.
top
=
s
);
}
return
d
;
}
function
F
(
l
)
{
return
{
axisLabel
:
{
formatter
:
(
e
)
=>
l
===
1
?
e
.
length
>
4
?
`
${
e
.
slice
(
0
,
4
).
split
(
""
).
join
(
`
`
)}
...`
:
e
.
split
(
""
).
join
(
`
`
)
:
l
===
2
&&
e
.
length
>
4
?
`
${
e
.
slice
(
0
,
4
)}
...`
:
e
,
rotate
:
l
===
2
?
45
:
0
}
};
}
function
H
(
l
)
{
const
d
=
[];
return
l
&&
l
.
length
&&
l
.
forEach
((
e
)
=>
{
const
{
caption
:
s
,
minValue
:
r
,
maxValue
:
o
,
eChartsType
:
t
,
position
:
n
}
=
e
,
a
=
{
name
:
s
,
min
:
r
,
max
:
o
};
Object
.
assign
(
a
,
{
type
:
t
,
position
:
n
,
...
w
(
F
(
e
.
dataShowMode
),
y
(
e
.
userParams
)
)
}),
d
.
push
(
a
);
}),
d
;
}
function
J
(
l
)
{
const
d
=
[];
return
l
&&
l
.
length
&&
l
.
forEach
((
e
)
=>
{
const
{
caption
:
s
,
minValue
:
r
,
maxValue
:
o
,
eChartsType
:
t
,
position
:
n
}
=
e
,
a
=
{
name
:
s
,
min
:
r
,
max
:
o
};
Object
.
assign
(
a
,
{
type
:
t
,
position
:
n
,
...
w
(
F
(
e
.
dataShowMode
),
y
(
e
.
userParams
)
)
}),
d
.
push
(
a
);
}),
d
;
}
class
K
extends
U
{
constructor
(
e
)
{
super
(
e
);
/**
* 序列列表
*
* @author zhanghengfeng
* @date 2023-04-03 16:04:38
* @type {IPSDEChartSeries[]}
*/
x
(
this
,
"seriesList"
,
[]);
const
s
=
e
.
source
.
getPSDEChartSerieses
();
if
(
!
s
||
!
s
.
length
)
throw
new
Error
(
"图表序列集合不能为空"
);
this
.
seriesList
=
s
;
}
/**
* 获取数据
*
* @author zhanghengfeng
* @date 2023-04-03 16:04:11
* @param {IContext} context
* @param {IParams} [params={}]
* @return {*} {Promise<IHttpResponse>}
*/
async
fetch
(
e
,
s
=
{})
{
return
await
this
.
exec
(
this
.
model
.
fetchAction
,
e
,
s
);
}
/**
* 获取所有代码表映射
*
* @author zhanghengfeng
* @date 2023-04-03 16:04:21
* @param {IContext} context
* @param {IParams} params
* @return {*}
*/
async
getAllCodeListMap
(
e
,
s
)
{
const
r
=
[];
return
await
Promise
.
all
(
this
.
seriesList
.
map
(
async
(
o
,
t
)
=>
{
var
c
,
i
,
h
,
f
;
const
n
=
{},
a
=
(
i
=
(
c
=
o
.
getCatalogPSCodeList
)
==
null
?
void
0
:
c
.
call
(
o
))
==
null
?
void
0
:
i
.
codeName
,
C
=
(
f
=
(
h
=
o
.
getSeriesPSCodeList
)
==
null
?
void
0
:
h
.
call
(
o
))
==
null
?
void
0
:
f
.
codeName
;
if
(
a
)
{
const
p
=
await
ibiz
.
codeListService
.
get
(
a
,
e
,
s
);
if
(
p
)
{
const
g
=
/* @__PURE__ */
new
Map
();
p
.
forEach
((
u
)
=>
{
g
.
set
(
u
.
value
,
u
.
text
);
}),
n
.
catalog
=
g
;
}
}
if
(
C
)
{
const
p
=
await
ibiz
.
codeListService
.
get
(
C
,
e
,
s
);
if
(
p
)
{
const
g
=
/* @__PURE__ */
new
Map
();
p
.
forEach
((
u
)
=>
{
g
.
set
(
u
.
value
,
u
.
text
);
}),
n
.
series
=
g
;
}
}
r
[
t
]
=
n
;
})
),
r
;
}
/**
* 生成数据集配置
*
* @author zhanghengfeng
* @date 2023-04-03 16:04:37
* @param {IPSDEChartSeries} series
* @param {IData[]} data
* @param {CodeListMap} map
* @return {*}
*/
generateDatasetOption
(
e
,
s
,
r
)
{
var
c
;
const
o
=
{},
t
=
[];
o
.
source
=
t
;
const
n
=
e
.
catalogField
.
toLowerCase
(),
a
=
e
.
valueField
.
toLowerCase
(),
C
=
(
c
=
e
.
seriesField
)
==
null
?
void
0
:
c
.
toLowerCase
();
if
(
C
)
{
const
i
=
/* @__PURE__ */
new
Set
();
s
.
forEach
((
h
)
=>
{
i
.
add
(
h
[
C
]);
}),
t
.
push
([
n
,
...
i
]);
}
else
t
.
push
([
n
,
a
]);
t
.
push
(
...
s
.
map
((
i
)
=>
t
[
0
].
map
((
h
,
f
)
=>
f
===
0
?
(
r
&&
r
.
catalog
?
r
.
catalog
.
get
(
i
[
h
])
:
i
[
h
])
||
"未定义"
:
C
?
h
===
i
[
C
]
&&
i
[
a
]
||
0
:
i
[
a
]
||
0
))
),
r
&&
r
.
series
&&
(
t
[
0
]
=
t
[
0
].
map
((
i
,
h
)
=>
{
var
f
;
return
h
===
0
?
i
:
((
f
=
r
.
series
)
==
null
?
void
0
:
f
.
get
(
i
))
||
i
;
}));
for
(
let
i
=
1
;
i
<
t
.
length
;
i
++
)
for
(
let
h
=
i
+
1
;
h
<
t
.
length
;
h
++
)
t
[
h
][
0
]
===
t
[
i
][
0
]
&&
(
t
[
h
].
forEach
((
f
,
p
)
=>
{
p
!==
0
&&
(
t
[
i
][
p
]
+=
f
);
}),
t
.
splice
(
h
,
1
),
h
-=
1
);
return
o
;
}
/**
* 生成图表配置
*
* @author zhanghengfeng
* @date 2023-04-03 16:04:49
* @param {IData[]} data
* @param {IContext} context
* @param {IParams} params
* @return {*}
*/
async
generateChartOption
(
e
,
s
,
r
)
{
const
o
=
{};
o
.
dataset
=
[],
o
.
series
=
[];
const
t
=
await
this
.
getAllCodeListMap
(
s
,
r
);
return
this
.
seriesList
.
forEach
((
n
,
a
)
=>
{
if
(
n
.
eChartsType
===
"radar"
)
{
const
{
series
:
c
,
radar
:
i
}
=
this
.
generateRadarSeriesOption
(
n
,
e
,
t
[
a
]
);
Array
.
isArray
(
o
.
series
)
&&
o
.
series
.
push
(...
c
),
o
.
radar
=
i
;
return
;
}
const
C
=
this
.
generateDatasetOption
(
n
,
e
,
t
[
a
]);
if
(
Array
.
isArray
(
o
.
dataset
)
&&
o
.
dataset
.
push
(
C
),
n
.
eChartsType
===
"bar"
)
{
const
c
=
this
.
generateBarSeriesOption
(
n
,
e
,
t
[
a
],
a
);
Array
.
isArray
(
o
.
series
)
&&
o
.
series
.
push
(...
c
);
}
else
if
(
n
.
eChartsType
===
"line"
)
{
const
c
=
this
.
generateLineSeriesOption
(
n
,
e
,
t
[
a
],
a
);
Array
.
isArray
(
o
.
series
)
&&
o
.
series
.
push
(...
c
);
}
else
if
(
n
.
eChartsType
===
"pie"
)
{
const
c
=
this
.
generatePieSeriesOption
(
n
,
e
,
t
[
a
],
a
);
Array
.
isArray
(
o
.
series
)
&&
o
.
series
.
push
(...
c
);
}
else
if
(
n
.
eChartsType
===
"funnel"
)
{
const
c
=
this
.
generateFunnelSeriesOption
(
n
,
e
,
t
[
a
],
a
);
Array
.
isArray
(
o
.
series
)
&&
o
.
series
.
push
(...
c
);
}
else
if
(
n
.
eChartsType
===
"scatter"
)
{
const
c
=
this
.
generateScatterSeriesOption
(
n
,
e
,
t
[
a
],
a
);
Array
.
isArray
(
o
.
series
)
&&
o
.
series
.
push
(...
c
);
}
else
throw
new
Error
(
`
${
n
.
eChartsType
}
类型的图表暂未实现`
);
}),
o
;
}
/**
* 生成柱状图序列配置
*
* @author zhanghengfeng
* @date 2023-04-03 16:04:13
* @param {IPSDEChartSeries} series
* @param {IData[]} data
* @param {CodeListMap} map
* @param {number} index
* @return {*}
*/
generateBarSeriesOption
(
e
,
s
,
r
,
o
)
{
var
p
,
g
,
u
,
m
,
S
,
O
,
A
;
const
t
=
[],
n
=
e
.
eChartsType
,
a
=
e
.
catalogField
.
toLowerCase
(),
C
=
e
.
valueField
.
toLowerCase
(),
c
=
(
p
=
e
.
seriesField
)
==
null
?
void
0
:
p
.
toLowerCase
(),
i
=
+
((
m
=
(
u
=
(
g
=
e
.
M
)
==
null
?
void
0
:
g
.
getPSChartSeriesEncode
)
==
null
?
void
0
:
u
.
getPSChartXAxis
)
==
null
?
void
0
:
m
.
id
)
||
0
,
h
=
+
((
A
=
(
O
=
(
S
=
e
.
M
)
==
null
?
void
0
:
S
.
getPSChartSeriesEncode
)
==
null
?
void
0
:
O
.
getPSChartYAxis
)
==
null
?
void
0
:
A
.
id
)
||
0
,
f
=
{};
if
(
c
)
{
const
E
=
/* @__PURE__ */
new
Set
();
s
.
forEach
((
L
)
=>
{
const
b
=
L
[
c
];
E
.
add
(
r
&&
r
.
series
&&
r
.
series
.
get
(
b
)
||
b
);
}),
t
.
push
(
...[...
E
].
map
((
L
)
=>
({
type
:
n
,
xAxisIndex
:
i
,
yAxisIndex
:
h
,
name
:
L
,
datasetIndex
:
o
,
encode
:
{
x
:
a
,
y
:
L
},
...
w
(
f
,
y
(
e
.
userParams
)
)
}))
);
}
else
t
.
push
({
type
:
n
,
xAxisIndex
:
i
,
yAxisIndex
:
h
,
name
:
e
.
caption
||
e
.
id
,
datasetIndex
:
o
,
encode
:
{
x
:
a
,
y
:
C
},
...
w
(
f
,
y
(
e
.
userParams
)
)
});
return
t
;
}
/**
* 生成折线图序列配置
*
* @author zhanghengfeng
* @date 2023-04-03 16:04:32
* @param {IPSDEChartSeries} series
* @param {IData[]} data
* @param {CodeListMap} map
* @param {number} index
* @return {*}
*/
generateLineSeriesOption
(
e
,
s
,
r
,
o
)
{
var
h
;
const
t
=
[],
n
=
e
.
eChartsType
,
a
=
e
.
catalogField
.
toLowerCase
(),
C
=
e
.
valueField
.
toLowerCase
(),
c
=
(
h
=
e
.
seriesField
)
==
null
?
void
0
:
h
.
toLowerCase
(),
i
=
{
emphasis
:
{
label
:
{
fontSize
:
20
,
show
:
!
0
}
},
label
:
{
position
:
"top"
,
show
:
!
0
}
};
if
(
c
)
{
const
f
=
/* @__PURE__ */
new
Set
();
s
.
forEach
((
p
)
=>
{
const
g
=
p
[
c
];
f
.
add
(
r
&&
r
.
series
&&
r
.
series
.
get
(
g
)
||
g
);
}),
t
.
push
(
...[...
f
].
map
((
p
)
=>
({
type
:
n
,
name
:
p
,
datasetIndex
:
o
,
encode
:
{
x
:
a
,
y
:
p
},
stack
:
e
.
M
.
stack
?
e
.
id
:
void
0
,
step
:
e
.
M
.
step
?
"middle"
:
!
1
,
...
w
(
i
,
y
(
e
.
userParams
)
)
}))
);
}
else
t
.
push
({
type
:
n
,
name
:
e
.
caption
||
e
.
id
,
datasetIndex
:
o
,
encode
:
{
x
:
a
,
y
:
C
},
...
w
(
i
,
y
(
e
.
userParams
)
)
});
return
t
;
}
/**
* 生成饼图序列配置
*
* @author zhanghengfeng
* @date 2023-04-03 16:04:44
* @param {IPSDEChartSeries} series
* @param {IData[]} data
* @param {CodeListMap} map
* @param {number} index
* @return {*}
*/
generatePieSeriesOption
(
e
,
s
,
r
,
o
)
{
var
h
;
const
t
=
[],
n
=
e
.
eChartsType
,
a
=
e
.
catalogField
.
toLowerCase
(),
C
=
e
.
valueField
.
toLowerCase
(),
c
=
(
h
=
e
.
seriesField
)
==
null
?
void
0
:
h
.
toLowerCase
(),
i
=
{
emphasis
:
{
label
:
{
fontSize
:
20
,
show
:
!
0
}
},
label
:
{
formatter
:
"{b}: {d}%({@age})"
,
position
:
"outside"
,
show
:
!
0
}
};
if
(
c
)
{
const
f
=
/* @__PURE__ */
new
Set
();
s
.
forEach
((
p
)
=>
{
const
g
=
p
[
c
];
f
.
add
(
r
&&
r
.
series
&&
r
.
series
.
get
(
g
)
||
g
);
}),
t
.
push
(
...[...
f
].
map
((
p
)
=>
({
type
:
n
,
name
:
p
,
datasetIndex
:
o
,
encode
:
{
itemName
:
a
,
value
:
p
},
...
w
(
i
,
y
(
e
.
userParams
)
)
}))
);
}
else
t
.
push
({
type
:
n
,
name
:
e
.
caption
||
e
.
id
,
datasetIndex
:
o
,
encode
:
{
itemName
:
a
,
value
:
C
},
...
w
(
i
,
y
(
e
.
userParams
)
)
});
return
t
;
}
/**
* 生成漏斗图序列配置
*
* @author zhanghengfeng
* @date 2023-04-03 16:04:03
* @param {IPSDEChartSeries} series
* @param {IData[]} data
* @param {CodeListMap} map
* @param {number} index
* @return {*}
*/
generateFunnelSeriesOption
(
e
,
s
,
r
,
o
)
{
var
h
;
const
t
=
[],
n
=
e
.
eChartsType
,
a
=
e
.
catalogField
.
toLowerCase
(),
C
=
e
.
valueField
.
toLowerCase
(),
c
=
(
h
=
e
.
seriesField
)
==
null
?
void
0
:
h
.
toLowerCase
(),
i
=
{
emphasis
:
{
label
:
{
fontSize
:
20
,
show
:
!
0
}
},
label
:
{
formatter
:
"{b}: {d}%({@age})"
,
position
:
"outside"
,
show
:
!
0
}
};
if
(
c
)
{
const
f
=
/* @__PURE__ */
new
Set
();
s
.
forEach
((
p
)
=>
{
const
g
=
p
[
c
];
f
.
add
(
r
&&
r
.
series
&&
r
.
series
.
get
(
g
)
||
g
);
}),
t
.
push
(
...[...
f
].
map
((
p
)
=>
({
type
:
n
,
name
:
p
,
datasetIndex
:
o
,
encode
:
{
itemName
:
a
,
value
:
p
},
...
w
(
i
,
y
(
e
.
userParams
)
)
}))
);
}
else
t
.
push
({
type
:
n
,
name
:
e
.
caption
||
e
.
id
,
datasetIndex
:
o
,
encode
:
{
itemName
:
a
,
value
:
C
},
...
w
(
i
,
y
(
e
.
userParams
)
)
});
return
t
;
}
/**
* 生成散点图序列配置
*
* @author zhanghengfeng
* @date 2023-04-03 16:04:25
* @param {IPSDEChartSeries} series
* @param {IData[]} data
* @param {CodeListMap} map
* @param {number} index
* @return {*}
*/
generateScatterSeriesOption
(
e
,
s
,
r
,
o
)
{
var
h
;
const
t
=
[],
n
=
e
.
eChartsType
,
a
=
e
.
catalogField
.
toLowerCase
(),
C
=
e
.
valueField
.
toLowerCase
(),
c
=
(
h
=
e
.
seriesField
)
==
null
?
void
0
:
h
.
toLowerCase
(),
i
=
{
emphasis
:
{
label
:
{
fontSize
:
20
,
show
:
!
0
}
},
label
:
{
position
:
"top"
,
show
:
!
0
}
};
if
(
c
)
{
const
f
=
/* @__PURE__ */
new
Set
();
s
.
forEach
((
p
)
=>
{
const
g
=
p
[
c
];
f
.
add
(
r
&&
r
.
series
&&
r
.
series
.
get
(
g
)
||
g
);
}),
t
.
push
(
...[...
f
].
map
((
p
)
=>
({
type
:
n
,
name
:
p
,
datasetIndex
:
o
,
encode
:
{
x
:
a
,
y
:
p
},
...
w
(
i
,
y
(
e
.
userParams
)
)
}))
);
}
else
t
.
push
({
type
:
n
,
name
:
e
.
caption
||
e
.
id
,
datasetIndex
:
o
,
encode
:
{
x
:
a
,
y
:
C
},
...
w
(
i
,
y
(
e
.
userParams
)
)
});
return
t
;
}
/**
* 生成雷达图序列配置
*
* @author zhanghengfeng
* @date 2023-04-03 16:04:47
* @param {IPSDEChartSeries} series
* @param {IData[]} data
* @param {CodeListMap} map
* @return {*}
*/
generateRadarSeriesOption
(
e
,
s
,
r
)
{
var
g
;
const
o
=
[],
t
=
[],
n
=
e
.
eChartsType
,
a
=
e
.
catalogField
.
toLowerCase
(),
C
=
e
.
valueField
.
toLowerCase
(),
c
=
(
g
=
e
.
seriesField
)
==
null
?
void
0
:
g
.
toLowerCase
(),
i
=
{
emphasis
:
{
label
:
{
fontSize
:
20
,
show
:
!
0
}
},
label
:
{
position
:
"top"
,
show
:
!
0
}
};
if
(
c
)
{
const
u
=
/* @__PURE__ */
new
Set
();
s
.
forEach
((
m
)
=>
{
u
.
add
(
m
[
c
]);
}),
t
.
push
([
a
,
...
u
]);
}
else
t
.
push
([
a
,
C
]);
t
.
push
(
...
s
.
map
((
u
)
=>
t
[
0
].
map
((
m
,
S
)
=>
S
===
0
?
(
r
&&
r
.
catalog
?
r
.
catalog
.
get
(
u
[
m
])
:
u
[
m
])
||
"未定义"
:
c
?
m
===
u
[
c
]
?
u
[
C
]
:
0
:
u
[
C
]))
),
r
&&
r
.
series
&&
(
t
[
0
]
=
t
[
0
].
map
((
u
,
m
)
=>
{
var
S
;
return
m
===
0
?
u
:
((
S
=
r
.
series
)
==
null
?
void
0
:
S
.
get
(
u
))
||
u
;
}));
for
(
let
u
=
1
;
u
<
t
.
length
;
u
++
)
for
(
let
m
=
u
+
1
;
m
<
t
.
length
;
m
++
)
t
[
m
][
0
]
===
t
[
u
][
0
]
&&
(
t
[
m
].
forEach
((
S
,
O
)
=>
{
O
!==
0
&&
(
t
[
u
][
O
]
+=
S
);
}),
t
.
splice
(
m
,
1
),
m
-=
1
);
const
h
=
t
[
0
].
slice
(
1
).
map
((
u
,
m
)
=>
t
.
slice
(
1
).
map
((
S
)
=>
S
[
m
+
1
]));
o
.
push
({
type
:
n
,
name
:
e
.
caption
||
e
.
id
,
data
:
h
,
...
w
(
i
,
y
(
e
.
userParams
))
});
let
f
=
-
1
/
0
;
h
.
forEach
((
u
)
=>
{
u
.
forEach
((
m
)
=>
{
+
m
>
f
&&
(
f
=
+
m
);
});
});
const
p
=
t
.
slice
(
1
).
map
((
u
)
=>
({
name
:
u
[
0
],
max
:
f
}));
return
{
series
:
o
,
radar
:
{
indicator
:
p
}
};
}
}
class
W
extends
R
{
constructor
()
{
super
(...
arguments
);
/**
* 图表实例
*
* @author zhanghengfeng
* @date 2023-04-03 16:04:45
* @type {(EChartsType | null)}
*/
x
(
this
,
"chart"
,
null
);
/**
* 图表id
*
* @author zhanghengfeng
* @date 2023-04-03 16:04:22
* @type {string}
*/
x
(
this
,
"chartId"
,
`chart_
${
V
()}
`
);
/**
* 图表静态配置
*
* @author zhanghengfeng
* @date 2023-04-03 16:04:32
* @type {EChartsOption}
*/
x
(
this
,
"chartStaticOption"
,
{});
}
/**
* 创建图表神经系统
*
* @author zhanghengfeng
* @date 2023-04-03 16:04:24
* @protected
* @return {*} {ChartNerve}
*/
createNerve
()
{
return
new
X
(
this
);
}
/**
* 初始化配置
*
* @author zhanghengfeng
* @date 2023-04-03 16:04:41
* @protected
* @return {*} {Promise<void>}
*/
async
onInit
()
{
await
super
.
onInit
(),
this
.
service
=
new
K
(
this
.
model
),
await
this
.
service
.
init
(
this
.
context
),
this
.
initChartStaticOption
(),
this
.
resizeChart
=
this
.
resizeChart
.
bind
(
this
),
window
.
addEventListener
(
"resize"
,
this
.
resizeChart
);
}
/**
* 重新渲染图表
*
* @author zhanghengfeng
* @date 2023-04-03 18:04:35
*/
resizeChart
()
{
var
e
;
(
e
=
this
.
chart
)
==
null
||
e
.
resize
();
}
/**
* 初始化图表静态配置
*
* @author zhanghengfeng
* @date 2023-04-03 16:04:52
*/
initChartStaticOption
()
{
const
e
=
{},
s
=
this
.
model
.
source
.
getPSDEChartTitle
();
e
.
title
=
s
?
Y
(
s
)
:
{},
e
.
tooltip
=
{
show
:
!
0
};
const
r
=
this
.
model
.
source
.
getPSDEChartSerieses
();
r
&&
r
.
length
&&
r
[
0
].
eChartsType
===
"bar"
&&
(
e
.
grid
=
{
top
:
41
,
bottom
:
5
,
left
:
13
,
right
:
13
,
containLabel
:
!
0
},
e
.
tooltip
=
{
show
:
!
0
,
padding
:
0
,
backgroundColor
:
"rgba(255, 255, 255, 0)"
,
borderWidth
:
0
,
className
:
"chart-tooltip"
,
borderRadius
:
6
,
extraCssText
:
"box-shadow: none;"
,
formatter
:
(
a
)
=>
{
const
{
seriesName
:
C
,
dimensionNames
:
c
,
value
:
i
}
=
a
,
h
=
document
.
createElement
(
"div"
);
return
h
.
classList
.
add
(
"chart-tooltip-container"
),
Array
.
isArray
(
c
)
&&
Array
.
isArray
(
i
)
&&
c
.
length
>=
2
&&
c
.
length
===
i
.
length
?
(
h
.
innerHTML
=
`
<div class='chart-tooltip-title'>
${
i
[
0
]}
</div>
${
c
.
slice
(
1
).
map
((
f
,
p
)
=>
`
<div class='chart-tooltip-item'>
<div class='chart-tooltip-item-name'>
${
c
.
length
===
2
?
C
:
f
}
</div>
<div class='chart-tooltip-item-number'>
${
i
[
p
+
1
]}
</div>
</div>
`
).
join
(
""
)}
`
,
h
)
:
C
;
}
});
const
o
=
this
.
model
.
source
.
getPSDEChartLegend
();
e
.
legend
=
o
?
_
(
o
)
:
{};
const
t
=
this
.
model
.
source
.
getPSChartXAxises
();
e
.
xAxis
=
t
?
H
(
t
)
:
[];
const
n
=
this
.
model
.
source
.
getPSChartYAxises
();
e
.
yAxis
=
n
?
J
(
n
)
:
[],
Object
.
assign
(
this
.
chartStaticOption
,
w
(
e
,
y
(
this
.
model
.
source
.
userParams
))
);
}
/**
* 加载数据
*
* @author zhanghengfeng
* @date 2023-04-03 16:04:13
* @param {IParams} params
*/
async
load
()
{
await
this
.
startLoading
();
try
{
const
{
data
:
e
}
=
await
this
.
service
.
fetch
(
this
.
context
,
this
.
params
);
if
(
Array
.
isArray
(
e
)
&&
e
.
length
)
{
if
(
!
this
.
chart
)
{
const
r
=
document
.
querySelector
(
`#
${
this
.
chartId
}
`
);
if
(
!
r
)
throw
new
Error
(
"未找到ECharts绘制容器元素"
);
this
.
chart
=
q
(
r
);
}
const
s
=
await
this
.
service
.
generateChartOption
(
e
,
this
.
context
,
this
.
params
);
this
.
chart
.
setOption
({
...
this
.
chartStaticOption
,
...
s
});
}
}
finally
{
await
this
.
endLoading
();
}
}
destroy
()
{
var
e
;
super
.
destroy
(),
(
e
=
this
.
chart
)
==
null
||
e
.
dispose
(),
window
.
removeEventListener
(
"resize"
,
this
.
resizeChart
);
}
}
function
G
(
l
,
d
,
e
,
s
=
{})
{
return
z
(
l
,
()
=>
new
W
(
d
,
e
,
s
));
}
const
ae
=
I
({
name
:
"ChartControl"
,
props
:
{
modelData
:
{
type
:
M
,
required
:
!
0
},
context
:
{
type
:
Object
,
required
:
!
0
},
params
:
{
type
:
Object
,
default
:
()
=>
({})
}
},
setup
(
l
)
{
const
{
proxy
:
d
}
=
N
(),
e
=
D
(
"chart"
),
s
=
G
(
d
,
l
.
modelData
,
l
.
context
,
l
.
params
);
return
s
.
initChartStaticOption
(),
{
c
:
s
,
ns
:
e
};
},
render
()
{
if
(
this
.
c
.
complete
)
return
v
(
"control-layout"
,
{
attrs
:
{
modelData
:
this
.
c
.
model
}
},
[
v
(
"div"
,
{
class
:
this
.
ns
.
b
()
},
[
v
(
"div"
,
{
attrs
:
{
id
:
this
.
c
.
chartId
},
class
:
this
.
ns
.
b
(
"content"
)
})])]);
}
});
export
{
ae
as
default
};
app_Web/public/plugins/@ibiz-template-package/vue2-de-chart-view@0.0.1/dist/chart-control.legacy.js
0 → 100644
浏览文件 @
41a7751b
System
.
register
([
"vue"
,
"@ibiz-template/vue-util"
,
"@ibiz-template/model"
,
"@ibiz-template/controller"
,
"qx-util"
,
"echarts"
,
"ramda"
,
"@ibiz-template/service"
],(
function
(
e
,
t
){
"use strict"
;
var
s
,
a
,
r
,
i
,
o
,
n
,
c
,
l
,
h
,
d
,
p
,
u
,
m
;
return
{
setters
:[
e
=>
{
s
=
e
.
defineComponent
,
a
=
e
.
getCurrentInstance
,
r
=
e
.
h
},
e
=>
{
i
=
e
.
useControlController
,
o
=
e
.
useNamespace
},
e
=>
{
n
=
e
.
ChartModel
},
e
=>
{
c
=
e
.
Neuron
,
l
=
e
.
ControlNerve
,
h
=
e
.
ControlController
},
e
=>
{
d
=
e
.
createUUID
},
e
=>
{
p
=
e
.
init
},
e
=>
{
u
=
e
.
mergeDeepRight
},
e
=>
{
m
=
e
.
ControlService
}],
execute
:
function
(){
class
t
extends
c
{}
class
g
extends
l
{
createNeuron
(){
return
new
t
(
this
.
bindAbility
())}
bindAbility
(){
return
{...
super
.
bindAbility
(),
load
:
this
.
controller
.
load
.
bind
(
this
.
controller
)}}}
function
f
(
e
){
const
t
=
{};
return
e
&&
Object
.
keys
(
e
).
forEach
((
s
=>
{
const
a
=
s
.
indexOf
(
"."
);
if
(
-
1
===
a
)
return
;
const
r
=
s
.
slice
(
a
+
1
);
r
&&
void
0
!==
e
[
s
]
&&
(
t
[
r
]
=
JSON
.
parse
(
e
[
s
]))})),
t
}
function
y
(
e
){
return
{
axisLabel
:{
formatter
:
t
=>
1
===
e
?
t
.
length
>
4
?
`
${
t
.
slice
(
0
,
4
).
split
(
""
).
join
(
"
\n
"
)}
\n...`
:
t
.
split
(
""
).
join
(
"
\n
"
):
2
===
e
&&
t
.
length
>
4
?
`
${
t
.
slice
(
0
,
4
)}
...`
:
t
,
rotate
:
2
===
e
?
45
:
0
}}}
class
C
extends
m
{
seriesList
=
[];
constructor
(
e
){
super
(
e
);
const
t
=
e
.
source
.
getPSDEChartSerieses
();
if
(
!
t
||!
t
.
length
)
throw
new
Error
(
"图表序列集合不能为空"
);
this
.
seriesList
=
t
}
async
fetch
(
e
,
t
=
{}){
return
await
this
.
exec
(
this
.
model
.
fetchAction
,
e
,
t
)}
async
getAllCodeListMap
(
e
,
t
){
const
s
=
[];
return
await
Promise
.
all
(
this
.
seriesList
.
map
((
async
(
a
,
r
)
=>
{
const
i
=
{},
o
=
a
.
getCatalogPSCodeList
?.()?.
codeName
,
n
=
a
.
getSeriesPSCodeList
?.()?.
codeName
;
if
(
o
){
const
s
=
await
ibiz
.
codeListService
.
get
(
o
,
e
,
t
);
if
(
s
){
const
e
=
new
Map
;
s
.
forEach
((
t
=>
{
e
.
set
(
t
.
value
,
t
.
text
)})),
i
.
catalog
=
e
}}
if
(
n
){
const
s
=
await
ibiz
.
codeListService
.
get
(
n
,
e
,
t
);
if
(
s
){
const
e
=
new
Map
;
s
.
forEach
((
t
=>
{
e
.
set
(
t
.
value
,
t
.
text
)})),
i
.
series
=
e
}}
s
[
r
]
=
i
}))),
s
}
generateDatasetOption
(
e
,
t
,
s
){
const
a
=
{},
r
=
[];
a
.
source
=
r
;
const
i
=
e
.
catalogField
.
toLowerCase
(),
o
=
e
.
valueField
.
toLowerCase
(),
n
=
e
.
seriesField
?.
toLowerCase
();
if
(
n
){
const
e
=
new
Set
;
t
.
forEach
((
t
=>
{
e
.
add
(
t
[
n
])})),
r
.
push
([
i
,...
e
])}
else
r
.
push
([
i
,
o
]);
r
.
push
(...
t
.
map
((
e
=>
r
[
0
].
map
(((
t
,
a
)
=>
0
===
a
?(
s
&&
s
.
catalog
?
s
.
catalog
.
get
(
e
[
t
]):
e
[
t
])
||
"未定义"
:
n
?
t
===
e
[
n
]
&&
e
[
o
]
||
0
:
e
[
o
]
||
0
))))),
s
&&
s
.
series
&&
(
r
[
0
]
=
r
[
0
].
map
(((
e
,
t
)
=>
0
===
t
?
e
:
s
.
series
?.
get
(
e
)
||
e
)));
for
(
let
c
=
1
;
c
<
r
.
length
;
c
++
)
for
(
let
e
=
c
+
1
;
e
<
r
.
length
;
e
++
)
r
[
e
][
0
]
===
r
[
c
][
0
]
&&
(
r
[
e
].
forEach
(((
e
,
t
)
=>
{
0
!==
t
&&
(
r
[
c
][
t
]
+=
e
)})),
r
.
splice
(
e
,
1
),
e
-=
1
);
return
a
}
async
generateChartOption
(
e
,
t
,
s
){
const
a
=
{
dataset
:[],
series
:[]},
r
=
await
this
.
getAllCodeListMap
(
t
,
s
);
return
this
.
seriesList
.
forEach
(((
t
,
s
)
=>
{
if
(
"radar"
===
t
.
eChartsType
){
const
{
series
:
i
,
radar
:
o
}
=
this
.
generateRadarSeriesOption
(
t
,
e
,
r
[
s
]);
return
Array
.
isArray
(
a
.
series
)
&&
a
.
series
.
push
(...
i
),
void
(
a
.
radar
=
o
)}
const
i
=
this
.
generateDatasetOption
(
t
,
e
,
r
[
s
]);
if
(
Array
.
isArray
(
a
.
dataset
)
&&
a
.
dataset
.
push
(
i
),
"bar"
===
t
.
eChartsType
){
const
i
=
this
.
generateBarSeriesOption
(
t
,
e
,
r
[
s
],
s
);
Array
.
isArray
(
a
.
series
)
&&
a
.
series
.
push
(...
i
)}
else
if
(
"line"
===
t
.
eChartsType
){
const
i
=
this
.
generateLineSeriesOption
(
t
,
e
,
r
[
s
],
s
);
Array
.
isArray
(
a
.
series
)
&&
a
.
series
.
push
(...
i
)}
else
if
(
"pie"
===
t
.
eChartsType
){
const
i
=
this
.
generatePieSeriesOption
(
t
,
e
,
r
[
s
],
s
);
Array
.
isArray
(
a
.
series
)
&&
a
.
series
.
push
(...
i
)}
else
if
(
"funnel"
===
t
.
eChartsType
){
const
i
=
this
.
generateFunnelSeriesOption
(
t
,
e
,
r
[
s
],
s
);
Array
.
isArray
(
a
.
series
)
&&
a
.
series
.
push
(...
i
)}
else
{
if
(
"scatter"
!==
t
.
eChartsType
)
throw
new
Error
(
`
${
t
.
eChartsType
}
类型的图表暂未实现`
);{
const
i
=
this
.
generateScatterSeriesOption
(
t
,
e
,
r
[
s
],
s
);
Array
.
isArray
(
a
.
series
)
&&
a
.
series
.
push
(...
i
)}}})),
a
}
generateBarSeriesOption
(
e
,
t
,
s
,
a
){
const
r
=
[],
i
=
e
.
eChartsType
,
o
=
e
.
catalogField
.
toLowerCase
(),
n
=
e
.
valueField
.
toLowerCase
(),
c
=
e
.
seriesField
?.
toLowerCase
(),
l
=+
e
.
M
?.
getPSChartSeriesEncode
?.
getPSChartXAxis
?.
id
||
0
,
h
=+
e
.
M
?.
getPSChartSeriesEncode
?.
getPSChartYAxis
?.
id
||
0
,
d
=
{};
if
(
c
){
const
n
=
new
Set
;
t
.
forEach
((
e
=>
{
const
t
=
e
[
c
];
n
.
add
(
s
&&
s
.
series
&&
s
.
series
.
get
(
t
)
||
t
)})),
r
.
push
(...[...
n
].
map
((
t
=>
({
type
:
i
,
xAxisIndex
:
l
,
yAxisIndex
:
h
,
name
:
t
,
datasetIndex
:
a
,
encode
:{
x
:
o
,
y
:
t
},...
u
(
d
,
f
(
e
.
userParams
))}))))}
else
r
.
push
({
type
:
i
,
xAxisIndex
:
l
,
yAxisIndex
:
h
,
name
:
e
.
caption
||
e
.
id
,
datasetIndex
:
a
,
encode
:{
x
:
o
,
y
:
n
},...
u
(
d
,
f
(
e
.
userParams
))});
return
r
}
generateLineSeriesOption
(
e
,
t
,
s
,
a
){
const
r
=
[],
i
=
e
.
eChartsType
,
o
=
e
.
catalogField
.
toLowerCase
(),
n
=
e
.
valueField
.
toLowerCase
(),
c
=
e
.
seriesField
?.
toLowerCase
(),
l
=
{
emphasis
:{
label
:{
fontSize
:
20
,
show
:
!
0
}},
label
:{
position
:
"top"
,
show
:
!
0
}};
if
(
c
){
const
n
=
new
Set
;
t
.
forEach
((
e
=>
{
const
t
=
e
[
c
];
n
.
add
(
s
&&
s
.
series
&&
s
.
series
.
get
(
t
)
||
t
)})),
r
.
push
(...[...
n
].
map
((
t
=>
({
type
:
i
,
name
:
t
,
datasetIndex
:
a
,
encode
:{
x
:
o
,
y
:
t
},
stack
:
e
.
M
.
stack
?
e
.
id
:
void
0
,
step
:
!!
e
.
M
.
step
&&
"middle"
,...
u
(
l
,
f
(
e
.
userParams
))}))))}
else
r
.
push
({
type
:
i
,
name
:
e
.
caption
||
e
.
id
,
datasetIndex
:
a
,
encode
:{
x
:
o
,
y
:
n
},...
u
(
l
,
f
(
e
.
userParams
))});
return
r
}
generatePieSeriesOption
(
e
,
t
,
s
,
a
){
const
r
=
[],
i
=
e
.
eChartsType
,
o
=
e
.
catalogField
.
toLowerCase
(),
n
=
e
.
valueField
.
toLowerCase
(),
c
=
e
.
seriesField
?.
toLowerCase
(),
l
=
{
emphasis
:{
label
:{
fontSize
:
20
,
show
:
!
0
}},
label
:{
formatter
:
"{b}: {d}%({@age})"
,
position
:
"outside"
,
show
:
!
0
}};
if
(
c
){
const
n
=
new
Set
;
t
.
forEach
((
e
=>
{
const
t
=
e
[
c
];
n
.
add
(
s
&&
s
.
series
&&
s
.
series
.
get
(
t
)
||
t
)})),
r
.
push
(...[...
n
].
map
((
t
=>
({
type
:
i
,
name
:
t
,
datasetIndex
:
a
,
encode
:{
itemName
:
o
,
value
:
t
},...
u
(
l
,
f
(
e
.
userParams
))}))))}
else
r
.
push
({
type
:
i
,
name
:
e
.
caption
||
e
.
id
,
datasetIndex
:
a
,
encode
:{
itemName
:
o
,
value
:
n
},...
u
(
l
,
f
(
e
.
userParams
))});
return
r
}
generateFunnelSeriesOption
(
e
,
t
,
s
,
a
){
const
r
=
[],
i
=
e
.
eChartsType
,
o
=
e
.
catalogField
.
toLowerCase
(),
n
=
e
.
valueField
.
toLowerCase
(),
c
=
e
.
seriesField
?.
toLowerCase
(),
l
=
{
emphasis
:{
label
:{
fontSize
:
20
,
show
:
!
0
}},
label
:{
formatter
:
"{b}: {d}%({@age})"
,
position
:
"outside"
,
show
:
!
0
}};
if
(
c
){
const
n
=
new
Set
;
t
.
forEach
((
e
=>
{
const
t
=
e
[
c
];
n
.
add
(
s
&&
s
.
series
&&
s
.
series
.
get
(
t
)
||
t
)})),
r
.
push
(...[...
n
].
map
((
t
=>
({
type
:
i
,
name
:
t
,
datasetIndex
:
a
,
encode
:{
itemName
:
o
,
value
:
t
},...
u
(
l
,
f
(
e
.
userParams
))}))))}
else
r
.
push
({
type
:
i
,
name
:
e
.
caption
||
e
.
id
,
datasetIndex
:
a
,
encode
:{
itemName
:
o
,
value
:
n
},...
u
(
l
,
f
(
e
.
userParams
))});
return
r
}
generateScatterSeriesOption
(
e
,
t
,
s
,
a
){
const
r
=
[],
i
=
e
.
eChartsType
,
o
=
e
.
catalogField
.
toLowerCase
(),
n
=
e
.
valueField
.
toLowerCase
(),
c
=
e
.
seriesField
?.
toLowerCase
(),
l
=
{
emphasis
:{
label
:{
fontSize
:
20
,
show
:
!
0
}},
label
:{
position
:
"top"
,
show
:
!
0
}};
if
(
c
){
const
n
=
new
Set
;
t
.
forEach
((
e
=>
{
const
t
=
e
[
c
];
n
.
add
(
s
&&
s
.
series
&&
s
.
series
.
get
(
t
)
||
t
)})),
r
.
push
(...[...
n
].
map
((
t
=>
({
type
:
i
,
name
:
t
,
datasetIndex
:
a
,
encode
:{
x
:
o
,
y
:
t
},...
u
(
l
,
f
(
e
.
userParams
))}))))}
else
r
.
push
({
type
:
i
,
name
:
e
.
caption
||
e
.
id
,
datasetIndex
:
a
,
encode
:{
x
:
o
,
y
:
n
},...
u
(
l
,
f
(
e
.
userParams
))});
return
r
}
generateRadarSeriesOption
(
e
,
t
,
s
){
const
a
=
[],
r
=
[],
i
=
e
.
eChartsType
,
o
=
e
.
catalogField
.
toLowerCase
(),
n
=
e
.
valueField
.
toLowerCase
(),
c
=
e
.
seriesField
?.
toLowerCase
();
if
(
c
){
const
e
=
new
Set
;
t
.
forEach
((
t
=>
{
e
.
add
(
t
[
c
])})),
r
.
push
([
o
,...
e
])}
else
r
.
push
([
o
,
n
]);
r
.
push
(...
t
.
map
((
e
=>
r
[
0
].
map
(((
t
,
a
)
=>
0
===
a
?(
s
&&
s
.
catalog
?
s
.
catalog
.
get
(
e
[
t
]):
e
[
t
])
||
"未定义"
:
c
?
t
===
e
[
c
]?
e
[
n
]:
0
:
e
[
n
]))))),
s
&&
s
.
series
&&
(
r
[
0
]
=
r
[
0
].
map
(((
e
,
t
)
=>
0
===
t
?
e
:
s
.
series
?.
get
(
e
)
||
e
)));
for
(
let
d
=
1
;
d
<
r
.
length
;
d
++
)
for
(
let
e
=
d
+
1
;
e
<
r
.
length
;
e
++
)
r
[
e
][
0
]
===
r
[
d
][
0
]
&&
(
r
[
e
].
forEach
(((
e
,
t
)
=>
{
0
!==
t
&&
(
r
[
d
][
t
]
+=
e
)})),
r
.
splice
(
e
,
1
),
e
-=
1
);
const
l
=
r
[
0
].
slice
(
1
).
map
(((
e
,
t
)
=>
r
.
slice
(
1
).
map
((
e
=>
e
[
t
+
1
]))));
a
.
push
({
type
:
i
,
name
:
e
.
caption
||
e
.
id
,
data
:
l
,...
u
({
emphasis
:{
label
:{
fontSize
:
20
,
show
:
!
0
}},
label
:{
position
:
"top"
,
show
:
!
0
}},
f
(
e
.
userParams
))});
let
h
=-
1
/
0
;
return
l
.
forEach
((
e
=>
{
e
.
forEach
((
e
=>
{
+
e
>
h
&&
(
h
=+
e
)}))})),{
series
:
a
,
radar
:{
indicator
:
r
.
slice
(
1
).
map
((
e
=>
({
name
:
e
[
0
],
max
:
h
})))}}}}
class
w
extends
h
{
chart
=
null
;
chartId
=
`chart_
${
d
()}
`
;
chartStaticOption
=
{};
createNerve
(){
return
new
g
(
this
)}
async
onInit
(){
await
super
.
onInit
(),
this
.
service
=
new
C
(
this
.
model
),
await
this
.
service
.
init
(
this
.
context
),
this
.
initChartStaticOption
(),
this
.
resizeChart
=
this
.
resizeChart
.
bind
(
this
),
window
.
addEventListener
(
"resize"
,
this
.
resizeChart
)}
resizeChart
(){
this
.
chart
?.
resize
()}
initChartStaticOption
(){
const
e
=
{},
t
=
this
.
model
.
source
.
getPSDEChartTitle
();
e
.
title
=
t
?
function
(
e
){
const
t
=
{};
if
(
e
){
t
.
show
=
e
.
showTitle
,
t
.
text
=
e
.
title
,
t
.
subtext
=
e
.
subTitle
;
const
s
=
e
.
titlePos
?.
toLowerCase
();
"left"
===
s
||
"right"
===
s
?
t
.
left
=
s
:
"bottom"
!==
s
&&
"top"
!==
s
||
(
t
.
left
=
"center"
,
t
.
top
=
s
)}
return
t
}(
t
):{},
e
.
tooltip
=
{
show
:
!
0
};
const
s
=
this
.
model
.
source
.
getPSDEChartSerieses
();
s
&&
s
.
length
&&
"bar"
===
s
[
0
].
eChartsType
&&
(
e
.
grid
=
{
top
:
41
,
bottom
:
5
,
left
:
13
,
right
:
13
,
containLabel
:
!
0
},
e
.
tooltip
=
{
show
:
!
0
,
padding
:
0
,
backgroundColor
:
"rgba(255, 255, 255, 0)"
,
borderWidth
:
0
,
className
:
"chart-tooltip"
,
borderRadius
:
6
,
extraCssText
:
"box-shadow: none;"
,
formatter
:
e
=>
{
const
{
seriesName
:
t
,
dimensionNames
:
s
,
value
:
a
}
=
e
,
r
=
document
.
createElement
(
"div"
);
return
r
.
classList
.
add
(
"chart-tooltip-container"
),
Array
.
isArray
(
s
)
&&
Array
.
isArray
(
a
)
&&
s
.
length
>=
2
&&
s
.
length
===
a
.
length
?(
r
.
innerHTML
=
`\n <div class='chart-tooltip-title'>
${
a
[
0
]}
</div>\n
${
s
.
slice
(
1
).
map
(((
e
,
r
)
=>
`\n <div class='chart-tooltip-item'>\n <div class='chart-tooltip-item-name'>
${
2
===
s
.
length
?
t
:
e
}
</div>\n <div class='chart-tooltip-item-number'>
${
a
[
r
+
1
]}
</div>\n </div>\n `
)).
join
(
""
)}
\n `
,
r
):
t
}});
const
a
=
this
.
model
.
source
.
getPSDEChartLegend
();
e
.
legend
=
a
?
function
(
e
){
const
t
=
{};
if
(
e
){
t
.
show
=
e
.
showLegend
;
const
s
=
e
.
legendPos
?.
toLowerCase
();
"left"
===
s
||
"right"
===
s
?(
t
.
left
=
s
,
t
.
top
=
"middle"
,
t
.
orient
=
"vertical"
):
"bottom"
===
s
&&
(
t
.
top
=
s
)}
return
t
}(
a
):{};
const
r
=
this
.
model
.
source
.
getPSChartXAxises
();
e
.
xAxis
=
r
?
function
(
e
){
const
t
=
[];
return
e
&&
e
.
length
&&
e
.
forEach
((
e
=>
{
const
{
caption
:
s
,
minValue
:
a
,
maxValue
:
r
,
eChartsType
:
i
,
position
:
o
}
=
e
,
n
=
{
name
:
s
,
min
:
a
,
max
:
r
};
Object
.
assign
(
n
,{
type
:
i
,
position
:
o
,...
u
(
y
(
e
.
dataShowMode
),
f
(
e
.
userParams
))}),
t
.
push
(
n
)})),
t
}(
r
):[];
const
i
=
this
.
model
.
source
.
getPSChartYAxises
();
e
.
yAxis
=
i
?
function
(
e
){
const
t
=
[];
return
e
&&
e
.
length
&&
e
.
forEach
((
e
=>
{
const
{
caption
:
s
,
minValue
:
a
,
maxValue
:
r
,
eChartsType
:
i
,
position
:
o
}
=
e
,
n
=
{
name
:
s
,
min
:
a
,
max
:
r
};
Object
.
assign
(
n
,{
type
:
i
,
position
:
o
,...
u
(
y
(
e
.
dataShowMode
),
f
(
e
.
userParams
))}),
t
.
push
(
n
)})),
t
}(
i
):[],
Object
.
assign
(
this
.
chartStaticOption
,
u
(
e
,
f
(
this
.
model
.
source
.
userParams
)))}
async
load
(){
await
this
.
startLoading
();
try
{
const
{
data
:
e
}
=
await
this
.
service
.
fetch
(
this
.
context
,
this
.
params
);
if
(
Array
.
isArray
(
e
)
&&
e
.
length
){
if
(
!
this
.
chart
){
const
e
=
document
.
querySelector
(
`#
${
this
.
chartId
}
`
);
if
(
!
e
)
throw
new
Error
(
"未找到ECharts绘制容器元素"
);
this
.
chart
=
p
(
e
)}
const
t
=
await
this
.
service
.
generateChartOption
(
e
,
this
.
context
,
this
.
params
);
this
.
chart
.
setOption
({...
this
.
chartStaticOption
,...
t
})}}
finally
{
await
this
.
endLoading
()}}
destroy
(){
super
.
destroy
(),
this
.
chart
?.
dispose
(),
window
.
removeEventListener
(
"resize"
,
this
.
resizeChart
)}}
e
(
"default"
,
s
({
name
:
"ChartControl"
,
props
:{
modelData
:{
type
:
n
,
required
:
!
0
},
context
:{
type
:
Object
,
required
:
!
0
},
params
:{
type
:
Object
,
default
:()
=>
({})}},
setup
(
e
){
const
{
proxy
:
t
}
=
a
(),
s
=
o
(
"chart"
),
r
=
function
(
e
,
t
,
s
,
a
=
{}){
return
i
(
e
,(()
=>
new
w
(
t
,
s
,
a
)))}(
t
,
e
.
modelData
,
e
.
context
,
e
.
params
);
return
r
.
initChartStaticOption
(),{
c
:
r
,
ns
:
s
}},
render
(){
if
(
this
.
c
.
complete
)
return
r
(
"control-layout"
,{
attrs
:{
modelData
:
this
.
c
.
model
}},[
r
(
"div"
,{
class
:
this
.
ns
.
b
()},[
r
(
"div"
,{
attrs
:{
id
:
this
.
c
.
chartId
},
class
:
this
.
ns
.
b
(
"content"
)})])])}}))}}}));
app_Web/public/plugins/@ibiz-template-package/vue2-de-chart-view@0.0.1/dist/chart-view-4d8fd435.js
0 → 100644
浏览文件 @
41a7751b
var
s
=
Object
.
defineProperty
;
var
i
=
(
r
,
e
,
t
)
=>
e
in
r
?
s
(
r
,
e
,
{
enumerable
:
!
0
,
configurable
:
!
0
,
writable
:
!
0
,
value
:
t
})
:
r
[
e
]
=
t
;
var
o
=
(
r
,
e
,
t
)
=>
(
i
(
r
,
typeof
e
!=
"symbol"
?
e
+
""
:
e
,
t
),
t
);
import
{
defineComponent
as
c
,
getCurrentInstance
as
a
}
from
"vue"
;
import
{
useViewController
as
l
}
from
"@ibiz-template/vue-util"
;
import
{
Neuron
as
h
,
ViewNerve
as
u
,
ViewController
as
d
}
from
"@ibiz-template/controller"
;
class
p
extends
h
{
}
class
m
extends
u
{
constructor
()
{
super
(...
arguments
);
o
(
this
,
"chart"
);
}
createNeuron
()
{
return
new
p
(
this
.
bindAbility
());
}
inclusive
(
t
)
{
return
t
===
"chart"
||
super
.
inclusive
(
t
);
}
connect
(
t
,
n
)
{
super
.
connect
(
t
,
n
),
t
===
"chart"
&&
(
this
.
chart
=
n
,
this
.
chart
.
evt
.
on
(
"destroyed"
,
()
=>
{
this
.
chart
=
void
0
;
}));
}
destroy
()
{
super
.
destroy
(),
this
.
chart
=
void
0
;
}
}
class
v
extends
d
{
createNerve
()
{
return
new
m
(
this
);
}
async
onInit
()
{
await
super
.
onInit
();
const
{
chart
:
e
}
=
this
.
model
;
e
&&
(
this
.
providers
[
e
.
name
]
=
await
ibiz
.
register
.
control
.
get
(
e
)),
this
.
nerve
.
self
.
evt
.
on
(
"mounted"
,
()
=>
{
this
.
model
.
source
.
loadDefault
&&
this
.
load
();
});
}
/**
* 视图加载方法
*
* @return {*} {Promise<IData[]>}
* @memberof ChartViewController
*/
async
load
()
{
const
{
chart
:
e
}
=
this
.
nerve
;
return
e
.
call
.
load
();
}
}
function
f
(
r
,
e
)
{
return
l
(
r
,
(
t
,
n
)
=>
new
v
(
e
,
t
,
n
)
);
}
const
V
=
c
({
props
:
{
context
:
Object
,
params
:
{
type
:
Object
,
default
:
()
=>
({})
},
modelPath
:
{
type
:
String
,
required
:
!
0
},
modal
:
{
type
:
Object
}
},
setup
(
r
)
{
const
{
proxy
:
e
}
=
a
();
return
{
c
:
f
(
e
,
r
.
modelPath
)
};
},
render
(
r
)
{
let
e
=
null
;
if
(
this
.
c
.
complete
)
{
const
{
chart
:
t
}
=
this
.
c
.
model
;
this
.
c
.
providers
[
t
.
name
]
&&
(
e
=
r
(
this
.
c
.
providers
[
t
.
name
].
component
,
{
props
:
{
modelData
:
t
,
context
:
this
.
c
.
context
,
params
:
this
.
c
.
params
},
on
:
{
neuronInit
:
this
.
c
.
nerve
.
onNeuronInit
(
t
.
name
)
}
}));
}
return
r
(
"view-base"
,
{
attrs
:
{
controller
:
this
.
c
}
},
[
e
]);
}
});
export
{
V
as
default
};
app_Web/public/plugins/@ibiz-template-package/vue2-de-chart-view@0.0.1/dist/chart-view.legacy.js
0 → 100644
浏览文件 @
41a7751b
System
.
register
([
"vue"
,
"@ibiz-template/vue-util"
,
"@ibiz-template/controller"
],(
function
(
e
,
t
){
"use strict"
;
var
r
,
n
,
s
,
o
,
i
,
c
;
return
{
setters
:[
e
=>
{
r
=
e
.
defineComponent
,
n
=
e
.
getCurrentInstance
},
e
=>
{
s
=
e
.
useViewController
},
e
=>
{
o
=
e
.
Neuron
,
i
=
e
.
ViewNerve
,
c
=
e
.
ViewController
}],
execute
:
function
(){
class
t
extends
o
{}
class
a
extends
i
{
chart
;
createNeuron
(){
return
new
t
(
this
.
bindAbility
())}
inclusive
(
e
){
return
"chart"
===
e
||
super
.
inclusive
(
e
)}
connect
(
e
,
t
){
super
.
connect
(
e
,
t
),
"chart"
===
e
&&
(
this
.
chart
=
t
,
this
.
chart
.
evt
.
on
(
"destroyed"
,(()
=>
{
this
.
chart
=
void
0
})))}
destroy
(){
super
.
destroy
(),
this
.
chart
=
void
0
}}
class
l
extends
c
{
createNerve
(){
return
new
a
(
this
)}
async
onInit
(){
await
super
.
onInit
();
const
{
chart
:
e
}
=
this
.
model
;
e
&&
(
this
.
providers
[
e
.
name
]
=
await
ibiz
.
register
.
control
.
get
(
e
)),
this
.
nerve
.
self
.
evt
.
on
(
"mounted"
,(()
=>
{
this
.
model
.
source
.
loadDefault
&&
this
.
load
()}))}
async
load
(){
const
{
chart
:
e
}
=
this
.
nerve
;
return
e
.
call
.
load
()}}
e
(
"default"
,
r
({
props
:{
context
:
Object
,
params
:{
type
:
Object
,
default
:()
=>
({})},
modelPath
:{
type
:
String
,
required
:
!
0
},
modal
:{
type
:
Object
}},
setup
(
e
){
const
{
proxy
:
t
}
=
n
();
var
r
,
o
;
return
{
c
:(
r
=
t
,
o
=
e
.
modelPath
,
s
(
r
,((
e
,
t
)
=>
new
l
(
o
,
e
,
t
))))}},
render
(
e
){
let
t
=
null
;
if
(
this
.
c
.
complete
){
const
{
chart
:
r
}
=
this
.
c
.
model
;
this
.
c
.
providers
[
r
.
name
]
&&
(
t
=
e
(
this
.
c
.
providers
[
r
.
name
].
component
,{
props
:{
modelData
:
r
,
context
:
this
.
c
.
context
,
params
:
this
.
c
.
params
},
on
:{
neuronInit
:
this
.
c
.
nerve
.
onNeuronInit
(
r
.
name
)}}))}
return
e
(
"view-base"
,{
attrs
:{
controller
:
this
.
c
}},[
t
])}}))}}}));
app_Web/public/plugins/@ibiz-template-package/vue2-de-chart-view@0.0.1/dist/ibiz-template-plugin.es.js
0 → 100644
浏览文件 @
41a7751b
var
i
=
Object
.
defineProperty
;
var
n
=
(
r
,
t
,
e
)
=>
t
in
r
?
i
(
r
,
t
,
{
enumerable
:
!
0
,
configurable
:
!
0
,
writable
:
!
0
,
value
:
e
})
:
r
[
t
]
=
e
;
var
o
=
(
r
,
t
,
e
)
=>
(
n
(
r
,
typeof
t
!=
"symbol"
?
t
+
""
:
t
,
e
),
e
);
import
{
ControlType
as
s
,
ViewType
as
a
}
from
"@ibiz-template/model"
;
import
{
PluginStaticResource
as
l
}
from
"@ibiz-template/runtime"
;
const
m
=
new
l
(
import
.
meta
.
url
);
class
c
{
constructor
()
{
o
(
this
,
"component"
,
"ChartControl"
);
}
}
class
p
{
constructor
()
{
o
(
this
,
"component"
,
"ChartView"
);
}
}
const
d
=
{
mateUrl
:
import
.
meta
.
url
,
install
(
r
)
{
m
.
loadStyle
([
"/style.css"
]),
r
.
component
(
"ChartControl"
,
()
=>
import
(
"./chart-control-ede059a5.js"
)
),
ibiz
.
register
.
control
.
register
(
s
.
CHART
,
new
c
()),
r
.
component
(
"ChartView"
,
()
=>
import
(
"./chart-view-4d8fd435.js"
)
),
ibiz
.
register
.
view
.
register
(
a
.
DE_CHART_VIEW
,
new
p
()
);
}
};
export
{
d
as
default
};
app_Web/public/plugins/@ibiz-template-package/vue2-de-chart-view@0.0.1/dist/index.legacy.js
0 → 100644
浏览文件 @
41a7751b
System
.
register
([
"@ibiz-template/model"
,
"@ibiz-template/runtime"
],(
function
(
e
,
t
){
"use strict"
;
var
r
,
i
,
o
;
return
{
setters
:[
e
=>
{
r
=
e
.
ControlType
,
i
=
e
.
ViewType
},
e
=>
{
o
=
e
.
PluginStaticResource
}],
execute
:
function
(){
const
n
=
new
o
(
t
.
meta
.
url
);
class
l
{
component
=
"ChartControl"
}
class
s
{
component
=
"ChartView"
}
e
(
"default"
,{
mateUrl
:
t
.
meta
.
url
,
install
(
e
){
n
.
loadStyle
([
"/style.css"
]),
e
.
component
(
"ChartControl"
,(()
=>
t
.
import
(
"./chart-control.legacy.js"
))),
ibiz
.
register
.
control
.
register
(
r
.
CHART
,
new
l
),
e
.
component
(
"ChartView"
,(()
=>
t
.
import
(
"./chart-view.legacy.js"
))),
ibiz
.
register
.
view
.
register
(
i
.
DE_CHART_VIEW
,
new
s
)}})}}}));
app_Web/public/plugins/@ibiz-template-package/vue2-de-chart-view@0.0.1/dist/style.css
0 → 100644
浏览文件 @
41a7751b
@charset
"UTF-8"
;
.ibiz-chart
{
width
:
100%
;
height
:
100%
;
overflow
:
auto
}
.ibiz-chart
.ibiz-chart-content
{
width
:
100%
;
height
:
100%
}
.chart-tooltip
.chart-tooltip-container
{
width
:
141px
;
padding
:
10px
12px
6px
8px
;
background
:
rgba
(
255
,
255
,
255
,
.45
);
border-radius
:
6px
;
backdrop-filter
:
blur
(
3px
)}
.chart-tooltip
.chart-tooltip-container
.chart-tooltip-title
{
font-size
:
14px
;
font-weight
:
700
;
line-height
:
19px
;
color
:
#666
}
.chart-tooltip
.chart-tooltip-container
.chart-tooltip-item
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
margin-top
:
8px
}
.chart-tooltip
.chart-tooltip-container
.chart-tooltip-item
.chart-tooltip-item-name
,
.chart-tooltip
.chart-tooltip-container
.chart-tooltip-item
.chart-tooltip-item-number
{
font-size
:
12px
;
line-height
:
16px
;
color
:
#666
}
app_Web/public/plugins/@ibiz-template-package/vue2-de-chart-view@0.0.1/package.json
0 → 100644
浏览文件 @
41a7751b
{
"name"
:
"@ibiz-template-package/vue2-de-chart-view"
,
"version"
:
"0.0.2-beta.0"
,
"description"
:
"ibiz full-dynamic-vue 模板项目扩展插件示例"
,
"author"
:
"chitanda"
,
"license"
:
"MIT"
,
"type"
:
"module"
,
"main"
:
"dist/ibiz-template-plugin.es.js"
,
"module"
:
"dist/ibiz-template-plugin.es.js"
,
"types"
:
"dist/types/index.d.ts"
,
"system"
:
"dist/index.legacy.js"
,
"files"
:
[
"dist"
,
"src"
,
"CHANGELOG.md"
,
"README.md"
],
"scripts"
:
{
"dev"
:
"vite build --watch"
,
"build"
:
"vue-tsc --noEmit && vite build"
,
"preview"
:
"vite preview"
,
"publish:next"
:
"npm publish --access public --tag next"
,
"publish:npm"
:
"npm publish --access public"
},
"styles"
:
[
"dist/style.css"
],
"dependencies"
:
{
"@ibiz-template/command"
:
"^0.0.1-beta.50"
,
"@ibiz-template/controller"
:
"^0.0.1-beta.56"
,
"@ibiz-template/core"
:
"^0.0.1-beta.56"
,
"@ibiz-template/model"
:
"^0.0.1-beta.55"
,
"@ibiz-template/runtime"
:
"^0.0.1-beta.56"
,
"@ibiz-template/service"
:
"^0.0.1-beta.56"
,
"@ibiz-template/theme"
:
"^0.0.1-beta.54"
,
"@ibiz-template/vue-util"
:
"^0.0.1-beta.56"
,
"@ibiz/dynamic-model-api"
:
"^2.1.17"
,
"async-validator"
:
"^4.2.5"
,
"axios"
:
"^1.3.5"
,
"dayjs"
:
"^1.11.7"
,
"echarts"
:
"^5.4.2"
,
"lodash-es"
:
"^4.17.21"
,
"pluralize"
:
"^8.0.0"
,
"qs"
:
"^6.11.1"
,
"qx-util"
:
"^0.4.8"
,
"ramda"
:
"^0.29.0"
,
"view-design"
:
"^4.7.0"
,
"vue"
:
"^2.7.14"
,
"vue-router"
:
"^3.6.5"
},
"peerDependencies"
:
{
"@ibiz-template/command"
:
"^0.0.1-beta.50"
,
"@ibiz-template/controller"
:
"^0.0.1-beta.55"
,
"@ibiz-template/core"
:
"^0.0.1-beta.51"
,
"@ibiz-template/model"
:
"^0.0.1-beta.55"
,
"@ibiz-template/runtime"
:
"^0.0.1-beta.55"
,
"@ibiz-template/service"
:
"^0.0.1-beta.55"
,
"@ibiz-template/theme"
:
"^0.0.1-beta.54"
,
"@ibiz-template/vue-util"
:
"^0.0.1-beta.55"
,
"@ibiz/dynamic-model-api"
:
"^2.1.17"
,
"async-validator"
:
"^4.2.5"
,
"axios"
:
"^1.3.4"
,
"dayjs"
:
"^1.11.7"
,
"lodash-es"
:
"^4.17.21"
,
"monaco-editor"
:
"^0.36.1"
,
"pluralize"
:
"^8.0.0"
,
"qs"
:
"^6.11.0"
,
"qx-util"
:
"^0.4.8"
,
"ramda"
:
"^0.28.0"
,
"view-design"
:
"^4.7.0"
,
"vue"
:
"^2.7.14"
,
"vue-router"
:
"^3.6.5"
},
"devDependencies"
:
{
"@types/ramda"
:
"^0.28.23"
,
"@qx-chitanda/vite-plugin-lib-legacy"
:
"^4.0.2"
,
"@vitejs/plugin-vue2"
:
"^2.2.0"
,
"@vitejs/plugin-vue2-jsx"
:
"^1.1.0"
,
"eslint"
:
"^8.37.0"
,
"rollup-plugin-visualizer"
:
"^5.9.0"
,
"sass"
:
"^1.60.0"
,
"terser"
:
"^5.16.8"
,
"typescript"
:
"^5.0.3"
,
"vite"
:
"^4.2.1"
,
"vite-plugin-dts"
:
"^2.2.0"
,
"vite-plugin-eslint"
:
"^1.8.1"
,
"vue-eslint-parser"
:
"^9.1.1"
,
"vue-tsc"
:
"^1.2.0"
}
}
\ No newline at end of file
app_Web/src/components/common/action-toolbar/action-toolbar.tsx
浏览文件 @
41a7751b
...
...
@@ -36,6 +36,12 @@ export const ActionToolbar = defineComponent({
{
details
.
length
>
0
&&
details
.
map
(
detail
=>
{
const
action
=
detail
.
getPSUIAction
();
const
btnClass
=
[
this
.
ns
.
e
(
'item'
),
this
.
ns
.
is
(
'disabled'
,
false
)];
// 接口没有,临时先用IData过校验
const
cssName
=
(
detail
as
IData
)?.
getPSSysCss
()?.
cssName
;
if
(
cssName
)
{
btnClass
.
push
(
cssName
);
}
if
(
action
&&
this
.
actionsState
[
detail
.
name
].
visible
)
{
return
[
detail
.
addSeparator
&&
(
...
...
@@ -46,7 +52,7 @@ export const ActionToolbar = defineComponent({
size=
'small'
on
-
click=
{
(
e
:
MouseEvent
)
=>
this
.
handleClick
(
detail
,
e
)
}
disabled=
{
this
.
actionsState
[
detail
.
name
].
disabled
}
class=
{
[
this
.
ns
.
e
(
'item'
),
this
.
ns
.
is
(
'disabled'
,
false
)]
}
class=
{
btnClass
}
>
{
detail
.
showIcon
&&
action
.
getPSSysImage
()
&&
(
<
app
-
icon
icon=
{
action
.
getPSSysImage
()
}
></
app
-
icon
>
...
...
app_Web/src/components/widgets/grid-control/grid-control.tsx
浏览文件 @
41a7751b
...
...
@@ -106,6 +106,7 @@ export const GridControl = defineComponent({
>
<
i
-
table
ref=
{
'grid'
}
height=
{
this
.
c
.
model
.
source
.
height
}
class=
{
this
.
ns
.
b
(
'content'
)
}
show
-
header=
{
!
this
.
c
.
model
.
source
.
hideHeader
}
highlight
-
row
...
...
app_Web/src/default-plugin-register.ts
0 → 100644
浏览文件 @
41a7751b
/**
* 安装默认插件
*
* @author chitanda
* @date 2023-03-09 17:03:56
* @export
*/
export
function
installDefaultPluginRegister
():
void
{
// 代码编辑器
ibiz
.
plugin
.
registerPredefinedPlugin
({
name
:
'VIEW_DECHARTVIEW_DEFAULT'
,
path
:
'@ibiz-template-package/vue2-de-chart-view@0.0.1'
,
});
}
app_Web/src/main.ts
浏览文件 @
41a7751b
...
...
@@ -18,6 +18,7 @@ import {
import
{
piniaInstance
}
from
'./store'
;
import
{
attachEnvironmentConfig
}
from
'./attach-environment-config'
;
import
{
PluginFactory
}
from
'./plugin'
;
import
{
installDefaultPluginRegister
}
from
'./default-plugin-register'
;
Vue
.
use
(
Router
);
Vue
.
use
(
PiniaVuePlugin
);
...
...
@@ -62,6 +63,7 @@ async function createApp(): Promise<void> {
ibiz
.
loading
=
new
LoadingUtil
();
ibiz
.
overlay
=
new
OverlayController
();
ibiz
.
plugin
=
new
PluginFactory
();
installDefaultPluginRegister
();
Vue
.
use
(
UserRegister
);
},
router
,
...
...
app_Web/src/views/index-view/index-view.ts
浏览文件 @
41a7751b
import
{
IndexViewController
}
from
'@ibiz-template/controller'
;
import
{
useRouter
}
from
'@ibiz-template/vue-util'
;
import
Vue
,
{
ref
,
watch
}
from
'vue'
;
import
{
useRoute
,
useRouter
}
from
'@ibiz-template/vue-util'
;
import
{
ref
,
watch
}
from
'vue'
;
import
{
Route
}
from
'vue-router'
;
export
const
getView2Value
=
(
item
:
IParams
)
=>
{
return
item
.
params
.
view2
?
(
item
.
params
.
view2
?
`/
${
item
.
params
.
view2
}
`
:
''
)
+
(
item
.
params
.
params2
?
`/
${
item
.
params
.
params2
}
`
:
''
)
:
'404'
;
export
const
getView2Value
=
(
route
:
Route
)
=>
{
const
{
view2
,
params2
,
params1
}
=
route
.
params
;
if
(
!
view2
)
{
return
''
;
}
// 清除params2里的srfnav
let
_params2
=
(
params2
as
String
).
replace
(
/;srfnav=
[^
;=
]
*$|
(?<
=;
)
srfnav=
[^
;=
]
*;|^srfnav=
[^
;=
]
*;|^srfnav=
[^
;=
]
*$/g
,
''
,
);
_params2
=
_params2
||
ibiz
.
env
.
routePlaceholder
;
return
`/
${
params1
}
/
${
view2
}
/
${
_params2
}
`
;
};
export
const
getView1Value
=
(
item
:
IParams
)
=>
{
return
(
(
item
.
params
.
view1
?
`/
${
item
.
params
.
view1
}
`
:
''
)
+
(
item
.
params
.
params1
?
`/
${
item
.
params
.
params1
}
`
:
''
)
);
// 获取首页一级路径的空白地址
export
const
getView1Value
=
(
route
:
Route
)
=>
{
const
{
view1
,
appContext
}
=
route
.
params
;
return
`/
${
appContext
}
/
${
view1
}
/
${
ibiz
.
env
.
routePlaceholder
}
`
;
};
export
interface
RouteMsg
{
...
...
@@ -41,24 +48,51 @@ export function useIndexRouteManage(
/** 路由信息,每个key对应的全路由和标题之类的信息 */
const
routeMsgs
=
ref
<
RouteMsg
[]
>
([]);
/**
* 删除路由缓存数据
*
* @author lxm
* @date 2022-09-22 10:09:11
* @param {string[]} keys 要删除的keys
*/
const
deleteRouteCache
=
(
keys
:
string
[])
=>
{
keys
.
forEach
(
key
=>
{
const
index
=
keyHistory
.
value
.
indexOf
(
key
);
if
(
index
!==
-
1
)
{
keyHistory
.
value
.
splice
(
index
,
1
);
const
msgIndex
=
routeMsgs
.
value
.
findIndex
(
item
=>
item
.
key
===
key
);
routeMsgs
.
value
.
splice
(
msgIndex
,
1
);
}
});
};
// 监听路由
watch
(
()
=>
proxy
.
$route
,
()
=>
proxy
.
$route
.
path
,
(
newVal
,
oldVal
)
=>
{
// 只处理有二级路由,只有首页的时候不需要
if
(
newVal
!==
oldVal
)
{
currentKey
.
value
=
getView2Value
(
newVal
);
indexPath
.
value
=
getView1Value
(
newVal
);
const
route
=
useRoute
(
proxy
);
// 当跳转到二级路由的时候清空缓存
if
(
route
.
matched
.
length
<=
2
)
{
deleteRouteCache
(
keyHistory
.
value
.
splice
(
0
));
}
currentKey
.
value
=
getView2Value
(
route
);
indexPath
.
value
=
getView1Value
(
route
);
// 更新或新建对应key的全路由信息,主要是三级路由变更时会用
const
find
=
routeMsgs
.
value
.
find
(
item
=>
item
.
key
===
currentKey
.
value
,
);
if
(
find
)
{
find
.
fullPath
=
newVal
.
fullPath
;
find
.
fullPath
=
route
.
fullPath
;
}
else
{
// 全关闭后到首页只显示空白不需要加入到routeMsgs里
if
(
newVal
===
indexPath
.
value
)
{
return
;
}
routeMsgs
.
value
.
push
({
key
:
currentKey
.
value
,
fullPath
:
newVal
.
fullPath
,
fullPath
:
route
.
fullPath
,
modelPath
:
''
,
caption
:
''
,
});
...
...
@@ -103,24 +137,6 @@ export function useIndexRouteManage(
}
};
/**
* 删除路由缓存数据
*
* @author lxm
* @date 2022-09-22 10:09:11
* @param {string[]} keys 要删除的keys
*/
const
deleteRouteCache
=
(
keys
:
string
[])
=>
{
keys
.
forEach
(
key
=>
{
const
index
=
keyHistory
.
value
.
indexOf
(
key
);
if
(
index
!==
-
1
)
{
keyHistory
.
value
.
splice
(
index
,
1
);
const
msgIndex
=
routeMsgs
.
value
.
findIndex
(
item
=>
item
.
key
===
key
);
routeMsgs
.
value
.
splice
(
msgIndex
,
1
);
}
});
};
/**
* 关闭视图回调
*
...
...
app_Web/vite.config.ts
浏览文件 @
41a7751b
...
...
@@ -29,6 +29,7 @@ export default defineConfig({
'ramda'
,
'lodash-es'
,
'qx-util'
,
'echarts'
,
'@ibiz/dynamic-model-api'
,
'@ibiz-template/command'
,
'@ibiz-template/core'
,
...
...
trainsys-core/src/main/resources/model/cn/ibizlab/trainsys/PSSYSAPPS/TemplatePublish/PSAPPDATAENTITIES/City/PSGRIDS/Usr0403823008.json
浏览文件 @
41a7751b
...
...
@@ -59,6 +59,56 @@
"modelref"
:
true
,
"path"
:
"PSSYSAPPS/TemplatePublish/PSAPPDATAENTITIES/City.json"
},
"getPSAppViewLogics"
:
[
{
"logicTrigger"
:
"CUSTOM"
,
"logicType"
:
"APPVIEWUIACTION"
,
"name"
:
"grid_uagridcolumn1_u5ee2086_click"
,
"getPSAppViewUIAction"
:
{
"modelref"
:
true
,
"id"
:
"百度"
}
},
{
"logicTrigger"
:
"CUSTOM"
,
"logicType"
:
"APPVIEWUIACTION"
,
"name"
:
"grid_uagridcolumn1_u1feafb4_click"
,
"getPSAppViewUIAction"
:
{
"modelref"
:
true
,
"id"
:
"表格界面_编辑操作"
}
},
{
"logicTrigger"
:
"CUSTOM"
,
"logicType"
:
"APPVIEWUIACTION"
,
"name"
:
"grid_uagridcolumn1_u4c6267d_click"
,
"getPSAppViewUIAction"
:
{
"modelref"
:
true
,
"id"
:
"表格界面_删除操作"
}
}
],
"getPSAppViewUIActions"
:
[
{
"name"
:
"百度"
,
"getPSUIAction"
:
{
"modelref"
:
true
,
"id"
:
"openBaidu"
},
"uIActionTarget"
:
"SINGLEDATA"
,
"xDataControlName"
:
"grid"
},
{
"name"
:
"表格界面_编辑操作"
,
"getPSUIAction"
:
{
"modelref"
:
true
,
"id"
:
"Edit"
},
"uIActionTarget"
:
"SINGLEKEY"
,
"xDataControlName"
:
"grid"
},
{
"name"
:
"表格界面_删除操作"
,
"getPSUIAction"
:
{
"modelref"
:
true
,
"id"
:
"Remove"
},
"uIActionTarget"
:
"MULTIKEY"
,
"xDataControlName"
:
"grid"
}
],
"getPSControlLogics"
:
[
{
"eventNames"
:
"ROWDBLCLICK;SELECTIONCHANGE;REMOVE;LOAD;BEFORELOAD"
,
"logicTag"
:
"grid"
,
...
...
@@ -173,6 +223,127 @@
"widthUnit"
:
"PX"
,
"enableRowEdit"
:
true
,
"enableSort"
:
true
},
{
"align"
:
"RIGHT"
,
"caption"
:
"xxx"
,
"codeName"
:
"uagridcolumn1"
,
"columnType"
:
"UAGRIDCOLUMN"
,
"mOSFilePath"
:
"psdegridcols/uagridcolumn1"
,
"name"
:
"uagridcolumn1"
,
"noPrivDisplayMode"
:
1
,
"getPSDEUIActionGroup"
:
{
"name"
:
"界面行为组"
,
"getPSUIActionGroupDetails"
:
[
{
"detailType"
:
"DEUIACTION"
,
"name"
:
"u5ee2086"
,
"getPSUIAction"
:
{
"actionTarget"
:
"SINGLEDATA"
,
"caption"
:
"百度"
,
"codeName"
:
"openBaidu"
,
"frontProcessType"
:
"OPENHTMLPAGE"
,
"fullCodeName"
:
"openBaidu"
,
"htmlPageUrl"
:
"https://www.baidu.com/"
,
"mOSFilePath"
:
"pssysapps/TemplatePublish/pssysappdeuiactions/openBaidu"
,
"name"
:
"百度"
,
"rTMOSFilePath"
:
"pssysapps/TemplatePublish/pssysappdeuiactions/openBaidu"
,
"timeout"
:
60000
,
"uIActionMode"
:
"FRONT"
,
"uIActionTag"
:
"openBaidu"
,
"uIActionType"
:
"DEUIACTION"
},
"addSeparator"
:
false
,
"showCaption"
:
true
,
"showIcon"
:
true
},
{
"detailType"
:
"DEUIACTION"
,
"name"
:
"u1feafb4"
,
"getPSUIAction"
:
{
"actionTarget"
:
"SINGLEKEY"
,
"getCapPSLanguageRes"
:
{
"defaultContent"
:
"编辑"
,
"lanResTag"
:
"TBB.TEXT.*.EDIT"
,
"lanResType"
:
"TBB.TEXT"
,
"mOSFilePath"
:
"pslanguageres/Auto253"
,
"name"
:
"工具栏按钮文本[*.EDIT]"
,
"rTMOSFilePath"
:
"pslanguageres/Auto253"
,
"refFlag"
:
true
},
"caption"
:
"编辑"
,
"codeName"
:
"Edit"
,
"fullCodeName"
:
"Edit"
,
"mOSFilePath"
:
"pssysapps/TemplatePublish/pssysappdeuiactions/Edit"
,
"name"
:
"表格界面_编辑操作"
,
"getPSSysImage"
:
{
"glyph"
:
"xf044@FontAwesome"
,
"cssClass"
:
"fa fa-edit"
},
"predefinedType"
:
"GRIDVIEW_EDITACTION"
,
"rTMOSFilePath"
:
"pssysapps/TemplatePublish/pssysappdeuiactions/Edit"
,
"timeout"
:
60000
,
"getTooltipPSLanguageRes"
:
{
"defaultContent"
:
"编辑"
,
"lanResTag"
:
"TBB.TOOLTIP.*.EDIT"
,
"lanResType"
:
"TBB.TOOLTIP"
,
"mOSFilePath"
:
"pslanguageres/Auto130"
,
"name"
:
"工具栏按钮提示[*.EDIT]"
,
"rTMOSFilePath"
:
"pslanguageres/Auto130"
,
"refFlag"
:
true
},
"uIActionMode"
:
"SYS"
,
"uIActionTag"
:
"Edit"
,
"uIActionType"
:
"DEUIACTION"
},
"addSeparator"
:
true
,
"showCaption"
:
true
,
"showIcon"
:
false
},
{
"detailType"
:
"DEUIACTION"
,
"name"
:
"u4c6267d"
,
"getPSUIAction"
:
{
"actionTarget"
:
"MULTIKEY"
,
"getCapPSLanguageRes"
:
{
"defaultContent"
:
"删除"
,
"lanResTag"
:
"TBB.TEXT.*.REMOVE"
,
"lanResType"
:
"TBB.TEXT"
,
"mOSFilePath"
:
"pslanguageres/Auto159"
,
"name"
:
"工具栏按钮文本[*.REMOVE]"
,
"rTMOSFilePath"
:
"pslanguageres/Auto159"
,
"refFlag"
:
true
},
"caption"
:
"删除"
,
"codeName"
:
"Remove"
,
"fullCodeName"
:
"Remove"
,
"mOSFilePath"
:
"pssysapps/TemplatePublish/pssysappdeuiactions/Remove"
,
"name"
:
"表格界面_删除操作"
,
"getPSSysImage"
:
{
"glyph"
:
"xf00d@FontAwesome"
,
"cssClass"
:
"fa fa-remove"
},
"predefinedType"
:
"GRIDVIEW_REMOVEACTION"
,
"rTMOSFilePath"
:
"pssysapps/TemplatePublish/pssysappdeuiactions/Remove"
,
"timeout"
:
60000
,
"getTooltipPSLanguageRes"
:
{
"defaultContent"
:
"删除"
,
"lanResTag"
:
"TBB.TOOLTIP.*.REMOVE"
,
"lanResType"
:
"TBB.TOOLTIP"
,
"mOSFilePath"
:
"pslanguageres/Auto286"
,
"name"
:
"工具栏按钮提示[*.REMOVE]"
,
"rTMOSFilePath"
:
"pslanguageres/Auto286"
,
"refFlag"
:
true
},
"uIActionMode"
:
"SYS"
,
"uIActionTag"
:
"Remove"
,
"uIActionType"
:
"DEUIACTION"
},
"addSeparator"
:
true
,
"showCaption"
:
false
,
"showIcon"
:
true
}
]
},
"rTMOSFilePath"
:
"psdegridcols/uagridcolumn1"
,
"width"
:
100
,
"widthUnit"
:
"PX"
,
"enableSort"
:
false
}
],
"getPSDEGridDataItems"
:
[
{
"dataType"
:
25
,
...
...
trainsys-core/src/main/resources/model/cn/ibizlab/trainsys/PSSYSAPPS/TemplatePublish/PSAPPDEVIEWS/cityUsr0403221890GridView.json
浏览文件 @
41a7751b
...
...
@@ -341,6 +341,56 @@
"modelref"
:
true
,
"path"
:
"PSSYSAPPS/TemplatePublish/PSAPPDATAENTITIES/City.json"
},
"getPSAppViewLogics"
:
[
{
"logicTrigger"
:
"CUSTOM"
,
"logicType"
:
"APPVIEWUIACTION"
,
"name"
:
"grid_uagridcolumn1_u5ee2086_click"
,
"getPSAppViewUIAction"
:
{
"modelref"
:
true
,
"id"
:
"百度"
}
},
{
"logicTrigger"
:
"CUSTOM"
,
"logicType"
:
"APPVIEWUIACTION"
,
"name"
:
"grid_uagridcolumn1_u1feafb4_click"
,
"getPSAppViewUIAction"
:
{
"modelref"
:
true
,
"id"
:
"表格界面_编辑操作"
}
},
{
"logicTrigger"
:
"CUSTOM"
,
"logicType"
:
"APPVIEWUIACTION"
,
"name"
:
"grid_uagridcolumn1_u4c6267d_click"
,
"getPSAppViewUIAction"
:
{
"modelref"
:
true
,
"id"
:
"表格界面_删除操作"
}
}
],
"getPSAppViewUIActions"
:
[
{
"name"
:
"百度"
,
"getPSUIAction"
:
{
"modelref"
:
true
,
"id"
:
"openBaidu"
},
"uIActionTarget"
:
"SINGLEDATA"
,
"xDataControlName"
:
"grid"
},
{
"name"
:
"表格界面_编辑操作"
,
"getPSUIAction"
:
{
"modelref"
:
true
,
"id"
:
"Edit"
},
"uIActionTarget"
:
"SINGLEKEY"
,
"xDataControlName"
:
"grid"
},
{
"name"
:
"表格界面_删除操作"
,
"getPSUIAction"
:
{
"modelref"
:
true
,
"id"
:
"Remove"
},
"uIActionTarget"
:
"MULTIKEY"
,
"xDataControlName"
:
"grid"
}
],
"getPSControlHandler"
:
{
"getPSHandlerActions"
:
[
{
"actionName"
:
"Get"
,
...
...
@@ -542,6 +592,127 @@
"widthUnit"
:
"PX"
,
"enableRowEdit"
:
true
,
"enableSort"
:
true
},
{
"align"
:
"RIGHT"
,
"caption"
:
"xxx"
,
"codeName"
:
"uagridcolumn1"
,
"columnType"
:
"UAGRIDCOLUMN"
,
"mOSFilePath"
:
"psdegridcols/uagridcolumn1"
,
"name"
:
"uagridcolumn1"
,
"noPrivDisplayMode"
:
1
,
"getPSDEUIActionGroup"
:
{
"name"
:
"界面行为组"
,
"getPSUIActionGroupDetails"
:
[
{
"detailType"
:
"DEUIACTION"
,
"name"
:
"u5ee2086"
,
"getPSUIAction"
:
{
"actionTarget"
:
"SINGLEDATA"
,
"caption"
:
"百度"
,
"codeName"
:
"openBaidu"
,
"frontProcessType"
:
"OPENHTMLPAGE"
,
"fullCodeName"
:
"openBaidu"
,
"htmlPageUrl"
:
"https://www.baidu.com/"
,
"mOSFilePath"
:
"pssysapps/TemplatePublish/pssysappdeuiactions/openBaidu"
,
"name"
:
"百度"
,
"rTMOSFilePath"
:
"pssysapps/TemplatePublish/pssysappdeuiactions/openBaidu"
,
"timeout"
:
60000
,
"uIActionMode"
:
"FRONT"
,
"uIActionTag"
:
"openBaidu"
,
"uIActionType"
:
"DEUIACTION"
},
"addSeparator"
:
false
,
"showCaption"
:
true
,
"showIcon"
:
true
},
{
"detailType"
:
"DEUIACTION"
,
"name"
:
"u1feafb4"
,
"getPSUIAction"
:
{
"actionTarget"
:
"SINGLEKEY"
,
"getCapPSLanguageRes"
:
{
"defaultContent"
:
"编辑"
,
"lanResTag"
:
"TBB.TEXT.*.EDIT"
,
"lanResType"
:
"TBB.TEXT"
,
"mOSFilePath"
:
"pslanguageres/Auto253"
,
"name"
:
"工具栏按钮文本[*.EDIT]"
,
"rTMOSFilePath"
:
"pslanguageres/Auto253"
,
"refFlag"
:
true
},
"caption"
:
"编辑"
,
"codeName"
:
"Edit"
,
"fullCodeName"
:
"Edit"
,
"mOSFilePath"
:
"pssysapps/TemplatePublish/pssysappdeuiactions/Edit"
,
"name"
:
"表格界面_编辑操作"
,
"getPSSysImage"
:
{
"glyph"
:
"xf044@FontAwesome"
,
"cssClass"
:
"fa fa-edit"
},
"predefinedType"
:
"GRIDVIEW_EDITACTION"
,
"rTMOSFilePath"
:
"pssysapps/TemplatePublish/pssysappdeuiactions/Edit"
,
"timeout"
:
60000
,
"getTooltipPSLanguageRes"
:
{
"defaultContent"
:
"编辑"
,
"lanResTag"
:
"TBB.TOOLTIP.*.EDIT"
,
"lanResType"
:
"TBB.TOOLTIP"
,
"mOSFilePath"
:
"pslanguageres/Auto130"
,
"name"
:
"工具栏按钮提示[*.EDIT]"
,
"rTMOSFilePath"
:
"pslanguageres/Auto130"
,
"refFlag"
:
true
},
"uIActionMode"
:
"SYS"
,
"uIActionTag"
:
"Edit"
,
"uIActionType"
:
"DEUIACTION"
},
"addSeparator"
:
true
,
"showCaption"
:
true
,
"showIcon"
:
false
},
{
"detailType"
:
"DEUIACTION"
,
"name"
:
"u4c6267d"
,
"getPSUIAction"
:
{
"actionTarget"
:
"MULTIKEY"
,
"getCapPSLanguageRes"
:
{
"defaultContent"
:
"删除"
,
"lanResTag"
:
"TBB.TEXT.*.REMOVE"
,
"lanResType"
:
"TBB.TEXT"
,
"mOSFilePath"
:
"pslanguageres/Auto159"
,
"name"
:
"工具栏按钮文本[*.REMOVE]"
,
"rTMOSFilePath"
:
"pslanguageres/Auto159"
,
"refFlag"
:
true
},
"caption"
:
"删除"
,
"codeName"
:
"Remove"
,
"fullCodeName"
:
"Remove"
,
"mOSFilePath"
:
"pssysapps/TemplatePublish/pssysappdeuiactions/Remove"
,
"name"
:
"表格界面_删除操作"
,
"getPSSysImage"
:
{
"glyph"
:
"xf00d@FontAwesome"
,
"cssClass"
:
"fa fa-remove"
},
"predefinedType"
:
"GRIDVIEW_REMOVEACTION"
,
"rTMOSFilePath"
:
"pssysapps/TemplatePublish/pssysappdeuiactions/Remove"
,
"timeout"
:
60000
,
"getTooltipPSLanguageRes"
:
{
"defaultContent"
:
"删除"
,
"lanResTag"
:
"TBB.TOOLTIP.*.REMOVE"
,
"lanResType"
:
"TBB.TOOLTIP"
,
"mOSFilePath"
:
"pslanguageres/Auto286"
,
"name"
:
"工具栏按钮提示[*.REMOVE]"
,
"rTMOSFilePath"
:
"pslanguageres/Auto286"
,
"refFlag"
:
true
},
"uIActionMode"
:
"SYS"
,
"uIActionTag"
:
"Remove"
,
"uIActionType"
:
"DEUIACTION"
},
"addSeparator"
:
true
,
"showCaption"
:
false
,
"showIcon"
:
true
}
]
},
"rTMOSFilePath"
:
"psdegridcols/uagridcolumn1"
,
"width"
:
100
,
"widthUnit"
:
"PX"
,
"enableSort"
:
false
}
],
"getPSDEGridDataItems"
:
[
{
"dataType"
:
25
,
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录