mooho-base-admin-plus 2.4.39 → 2.4.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/history.md
CHANGED
|
@@ -1,73 +1,75 @@
|
|
|
1
|
-
2.1.3 - 修复因为 i18n 加载延迟导致的页面出错,特别是日期控件
|
|
2
|
-
2.1.4 - vue 3.3.3 版本报错,降至固定版本 3.3.2
|
|
3
|
-
2.1.5 - vue 升级至 3.3.4
|
|
4
|
-
2.1.6 - item-select 组件 init 时不加载一次数据
|
|
5
|
-
2.2.0 - 增加外发接口日志查询,任务队列日志查询增加接口日志
|
|
6
|
-
2.2.1 - tableView 和 modalView 增加 row-class-name 属性
|
|
7
|
-
2.2.2 - 路由权限判断 bug 修复,处理带 query 参数的情况
|
|
8
|
-
2.2.4 - 非多语言情况下,仍旧要解析后端传过来的内容
|
|
9
|
-
2.2.5 - 流程模板页面增加 all 权限的判断
|
|
10
|
-
2.2.6 - 流程模板页面增加 create 权限的判断
|
|
11
|
-
2.2.7 - 静态选项支持数字
|
|
12
|
-
2.2.8 - 增加描述类型控件
|
|
13
|
-
2.2.9 - 枚举类型加载时不再判断 source 字段
|
|
14
|
-
2.2.10 - 图片上传控件可设置接受的文件格式
|
|
15
|
-
2.2.11 - 筛选栏控件对齐方式与筛选操作栏一致
|
|
16
|
-
2.2.12 - 修复 2.2.10 bug
|
|
17
|
-
2.2.13 - 修复 2.2.10 bug
|
|
18
|
-
2.2.14 - 筛选栏数据处理机制变化,修复默认值 bug
|
|
19
|
-
2.2.15 - 修改表格 open 时参数无法带入的 bug
|
|
20
|
-
2.3.0 - 表格只读文本字段增加强制单行、固定在最前选项
|
|
21
|
-
2.3.1 - 前端增加默认每页默认数量配置 layout.pageSize
|
|
22
|
-
2.3.2 - 修改表格 open 时参数无法带入的 bug
|
|
23
|
-
2.3.3 - 增加菜单筛选
|
|
24
|
-
2.3.4 - 菜单筛选默认关闭
|
|
25
|
-
2.3.5 - 解决菜单只能筛选两层的 bug
|
|
26
|
-
2.3.6 - 解决修改筛选导致的弹出选择框 bug
|
|
27
|
-
2.3.7 - 继续解决修改筛选导致的弹出选择框 bug
|
|
28
|
-
2.3.8 - 增加可筛选选择框支持
|
|
29
|
-
2.3.9 - 优化默认筛选参数:filter 的处理方式
|
|
30
|
-
2.3.10 - 可筛选选择框 bug 修复
|
|
31
|
-
2.3.11 - 弹出框增加全屏按钮
|
|
32
|
-
2.3.12 - 解决弹出框全屏按钮有时会关闭窗口的 bug
|
|
33
|
-
2.3.13 - 解决表格弹出框无法关闭的 bug
|
|
34
|
-
2.4.0 - 增加表格弹出显示表单
|
|
35
|
-
2.4.1 - 增加 int 类型时间戳显示支持
|
|
36
|
-
2.4.2 - 附件 json 的 file 字段支持 http 开头地址,用于外部链接
|
|
37
|
-
2.4.3 - 附件下载改为弹出新页,为了兼容 某些文件下载时直接打开,无法回退。如 pdf
|
|
38
|
-
2.4.4 - 附件下载 div 改为 span,解决点击空白处也会下载的问题
|
|
39
|
-
2.4.5 - 修复表格中显示图片报错的 bug
|
|
40
|
-
2.4.6 - 表格允许查看、允许编辑、允许删除属性增加函数类型
|
|
41
|
-
2.4.7 - 计算列触发条件优化
|
|
42
|
-
2.4.8 - 批量选择时无法触发选择
|
|
43
|
-
2.4.9 - 增加 ModalTable 的查看支持
|
|
44
|
-
2.4.10 - showData 支持多行显示(换行、空格)
|
|
45
|
-
2.4.11 - 增加 string 类型时间戳显示支持
|
|
46
|
-
2.4.12 - 增加 string 类型时间戳显示支持 bug 修复
|
|
47
|
-
2.4.13 - 增加 string 类型时间戳显示支持 bug 修复
|
|
48
|
-
2.4.14 - 修复草稿状态下点击历史显示所有的问题
|
|
49
|
-
2.4.15 - 修复自定义模型表格导出和打印的 bug
|
|
50
|
-
2.4.16 - 修复弹出表单全屏后高度不能 100%的 bug
|
|
51
|
-
2.4.17 - 分拆登录方法,应对 sso 登录
|
|
52
|
-
2.4.18 - 修复上一版本导致的 bug
|
|
53
|
-
2.4.19 - 修复自定义图标按钮无法显示的 bug
|
|
54
|
-
2.4.20 - 默认值下拉框优化
|
|
55
|
-
2.4.21 - 优化 login css 避免污染其他页面
|
|
56
|
-
2.4.22 - transfer bug 修复
|
|
57
|
-
2.4.23 - 表格加载完成触发 change 事件,解决自动计算无法触发的 bug
|
|
58
|
-
2.4.24 - 修复登录时未更新菜单的 bug
|
|
59
|
-
2.4.25 - 增加上传文件大小限制
|
|
60
|
-
2.4.26 - 优化计算列,避免转换对象
|
|
61
|
-
2.4.27 - 优化标题默认样式
|
|
62
|
-
2.4.28 - 修复可筛选下拉框选中内容会跳回原值的bug
|
|
63
|
-
2.4.29 - 修复新增、修改开放接口用户密码未加密的bug
|
|
64
|
-
2.4.30 - 批量选择支持默认值
|
|
65
|
-
2.4.31 - 增加自定义功能导入导出
|
|
66
|
-
2.4.32 - 修复切换强制换行后不会马上换行的bug
|
|
67
|
-
2.4.33 - 修复多选可筛选选择框无法删除已选项的bug
|
|
68
|
-
2.4.34 - 修复带参数的路由地址无法处理权限点的bug
|
|
69
|
-
2.4.35 - showMultiLine函数增加判断,非字符串不处理
|
|
70
|
-
2.4.36 - 增加了组件覆盖支持
|
|
71
|
-
2.4.37 - 增加component导出
|
|
72
|
-
2.4.38 - 修复上一版本bug
|
|
73
|
-
2.4.39 - 修复菜单管理界面无法用关键词查询的bug
|
|
1
|
+
mooho-base-admin-plus@2.1.3 - 修复因为 i18n 加载延迟导致的页面出错,特别是日期控件
|
|
2
|
+
mooho-base-admin-plus@2.1.4 - vue 3.3.3 版本报错,降至固定版本 3.3.2
|
|
3
|
+
mooho-base-admin-plus@2.1.5 - vue 升级至 3.3.4
|
|
4
|
+
mooho-base-admin-plus@2.1.6 - item-select 组件 init 时不加载一次数据
|
|
5
|
+
mooho-base-admin-plus@2.2.0 - 增加外发接口日志查询,任务队列日志查询增加接口日志
|
|
6
|
+
mooho-base-admin-plus@2.2.1 - tableView 和 modalView 增加 row-class-name 属性
|
|
7
|
+
mooho-base-admin-plus@2.2.2 - 路由权限判断 bug 修复,处理带 query 参数的情况
|
|
8
|
+
mooho-base-admin-plus@2.2.4 - 非多语言情况下,仍旧要解析后端传过来的内容
|
|
9
|
+
mooho-base-admin-plus@2.2.5 - 流程模板页面增加 all 权限的判断
|
|
10
|
+
mooho-base-admin-plus@2.2.6 - 流程模板页面增加 create 权限的判断
|
|
11
|
+
mooho-base-admin-plus@2.2.7 - 静态选项支持数字
|
|
12
|
+
mooho-base-admin-plus@2.2.8 - 增加描述类型控件
|
|
13
|
+
mooho-base-admin-plus@2.2.9 - 枚举类型加载时不再判断 source 字段
|
|
14
|
+
mooho-base-admin-plus@2.2.10 - 图片上传控件可设置接受的文件格式
|
|
15
|
+
mooho-base-admin-plus@2.2.11 - 筛选栏控件对齐方式与筛选操作栏一致
|
|
16
|
+
mooho-base-admin-plus@2.2.12 - 修复 2.2.10 bug
|
|
17
|
+
mooho-base-admin-plus@2.2.13 - 修复 2.2.10 bug
|
|
18
|
+
mooho-base-admin-plus@2.2.14 - 筛选栏数据处理机制变化,修复默认值 bug
|
|
19
|
+
mooho-base-admin-plus@2.2.15 - 修改表格 open 时参数无法带入的 bug
|
|
20
|
+
mooho-base-admin-plus@2.3.0 - 表格只读文本字段增加强制单行、固定在最前选项
|
|
21
|
+
mooho-base-admin-plus@2.3.1 - 前端增加默认每页默认数量配置 layout.pageSize
|
|
22
|
+
mooho-base-admin-plus@2.3.2 - 修改表格 open 时参数无法带入的 bug
|
|
23
|
+
mooho-base-admin-plus@2.3.3 - 增加菜单筛选
|
|
24
|
+
mooho-base-admin-plus@2.3.4 - 菜单筛选默认关闭
|
|
25
|
+
mooho-base-admin-plus@2.3.5 - 解决菜单只能筛选两层的 bug
|
|
26
|
+
mooho-base-admin-plus@2.3.6 - 解决修改筛选导致的弹出选择框 bug
|
|
27
|
+
mooho-base-admin-plus@2.3.7 - 继续解决修改筛选导致的弹出选择框 bug
|
|
28
|
+
mooho-base-admin-plus@2.3.8 - 增加可筛选选择框支持
|
|
29
|
+
mooho-base-admin-plus@2.3.9 - 优化默认筛选参数:filter 的处理方式
|
|
30
|
+
mooho-base-admin-plus@2.3.10 - 可筛选选择框 bug 修复
|
|
31
|
+
mooho-base-admin-plus@2.3.11 - 弹出框增加全屏按钮
|
|
32
|
+
mooho-base-admin-plus@2.3.12 - 解决弹出框全屏按钮有时会关闭窗口的 bug
|
|
33
|
+
mooho-base-admin-plus@2.3.13 - 解决表格弹出框无法关闭的 bug
|
|
34
|
+
mooho-base-admin-plus@2.4.0 - 增加表格弹出显示表单
|
|
35
|
+
mooho-base-admin-plus@2.4.1 - 增加 int 类型时间戳显示支持
|
|
36
|
+
mooho-base-admin-plus@2.4.2 - 附件 json 的 file 字段支持 http 开头地址,用于外部链接
|
|
37
|
+
mooho-base-admin-plus@2.4.3 - 附件下载改为弹出新页,为了兼容 某些文件下载时直接打开,无法回退。如 pdf
|
|
38
|
+
mooho-base-admin-plus@2.4.4 - 附件下载 div 改为 span,解决点击空白处也会下载的问题
|
|
39
|
+
mooho-base-admin-plus@2.4.5 - 修复表格中显示图片报错的 bug
|
|
40
|
+
mooho-base-admin-plus@2.4.6 - 表格允许查看、允许编辑、允许删除属性增加函数类型
|
|
41
|
+
mooho-base-admin-plus@2.4.7 - 计算列触发条件优化
|
|
42
|
+
mooho-base-admin-plus@2.4.8 - 批量选择时无法触发选择
|
|
43
|
+
mooho-base-admin-plus@2.4.9 - 增加 ModalTable 的查看支持
|
|
44
|
+
mooho-base-admin-plus@2.4.10 - showData 支持多行显示(换行、空格)
|
|
45
|
+
mooho-base-admin-plus@2.4.11 - 增加 string 类型时间戳显示支持
|
|
46
|
+
mooho-base-admin-plus@2.4.12 - 增加 string 类型时间戳显示支持 bug 修复
|
|
47
|
+
mooho-base-admin-plus@2.4.13 - 增加 string 类型时间戳显示支持 bug 修复
|
|
48
|
+
mooho-base-admin-plus@2.4.14 - 修复草稿状态下点击历史显示所有的问题
|
|
49
|
+
mooho-base-admin-plus@2.4.15 - 修复自定义模型表格导出和打印的 bug
|
|
50
|
+
mooho-base-admin-plus@2.4.16 - 修复弹出表单全屏后高度不能 100%的 bug
|
|
51
|
+
mooho-base-admin-plus@2.4.17 - 分拆登录方法,应对 sso 登录
|
|
52
|
+
mooho-base-admin-plus@2.4.18 - 修复上一版本导致的 bug
|
|
53
|
+
mooho-base-admin-plus@2.4.19 - 修复自定义图标按钮无法显示的 bug
|
|
54
|
+
mooho-base-admin-plus@2.4.20 - 默认值下拉框优化
|
|
55
|
+
mooho-base-admin-plus@2.4.21 - 优化 login css 避免污染其他页面
|
|
56
|
+
mooho-base-admin-plus@2.4.22 - transfer bug 修复
|
|
57
|
+
mooho-base-admin-plus@2.4.23 - 表格加载完成触发 change 事件,解决自动计算无法触发的 bug
|
|
58
|
+
mooho-base-admin-plus@2.4.24 - 修复登录时未更新菜单的 bug
|
|
59
|
+
mooho-base-admin-plus@2.4.25 - 增加上传文件大小限制
|
|
60
|
+
mooho-base-admin-plus@2.4.26 - 优化计算列,避免转换对象
|
|
61
|
+
mooho-base-admin-plus@2.4.27 - 优化标题默认样式
|
|
62
|
+
mooho-base-admin-plus@2.4.28 - 修复可筛选下拉框选中内容会跳回原值的bug
|
|
63
|
+
mooho-base-admin-plus@2.4.29 - 修复新增、修改开放接口用户密码未加密的bug
|
|
64
|
+
mooho-base-admin-plus@2.4.30 - 批量选择支持默认值
|
|
65
|
+
mooho-base-admin-plus@2.4.31 - 增加自定义功能导入导出
|
|
66
|
+
mooho-base-admin-plus@2.4.32 - 修复切换强制换行后不会马上换行的bug
|
|
67
|
+
mooho-base-admin-plus@2.4.33 - 修复多选可筛选选择框无法删除已选项的bug
|
|
68
|
+
mooho-base-admin-plus@2.4.34 - 修复带参数的路由地址无法处理权限点的bug
|
|
69
|
+
mooho-base-admin-plus@2.4.35 - showMultiLine函数增加判断,非字符串不处理
|
|
70
|
+
mooho-base-admin-plus@2.4.36 - 增加了组件覆盖支持
|
|
71
|
+
mooho-base-admin-plus@2.4.37 - 增加component导出
|
|
72
|
+
mooho-base-admin-plus@2.4.38 - 修复上一版本bug
|
|
73
|
+
mooho-base-admin-plus@2.4.39 - 修复菜单管理界面无法用关键词查询的bug
|
|
74
|
+
mooho-base-admin-plus@2.4.40 - 表格序号列表头增加序号显示
|
|
75
|
+
mooho-base-admin-plus@2.4.41 - 修复页面权限判断的bug
|
|
@@ -22204,11 +22204,7 @@ var menu = {
|
|
|
22204
22204
|
}
|
|
22205
22205
|
let permissions = {};
|
|
22206
22206
|
res2.permissions.forEach((key) => {
|
|
22207
|
-
|
|
22208
|
-
if (key.split("$").length > 1) {
|
|
22209
|
-
permissionKey = permissionKey + "$" + key.split("$")[1];
|
|
22210
|
-
}
|
|
22211
|
-
permissions[permissionKey] = true;
|
|
22207
|
+
permissions[key.split("?")[0]] = true;
|
|
22212
22208
|
});
|
|
22213
22209
|
state.userPermissions = permissions;
|
|
22214
22210
|
setNativePermission(permissions);
|
|
@@ -22935,7 +22931,7 @@ var mixinPage = {
|
|
|
22935
22931
|
if (key.startsWith("permission/")) {
|
|
22936
22932
|
return this.userPermissions[key];
|
|
22937
22933
|
} else {
|
|
22938
|
-
let url = router$1.currentRoute.value.fullPath.substr(1);
|
|
22934
|
+
let url = router$1.currentRoute.value.fullPath.substr(1).split("?")[0];
|
|
22939
22935
|
if (this.userPermissions[url + "$" + key] == true) {
|
|
22940
22936
|
return true;
|
|
22941
22937
|
}
|
|
@@ -43560,7 +43556,7 @@ const _sfc_main$_ = {
|
|
|
43560
43556
|
});
|
|
43561
43557
|
if (this.tableView.snEnable) {
|
|
43562
43558
|
this.columns.unshift({
|
|
43563
|
-
title: "
|
|
43559
|
+
title: this.$t("Front_Label_Sn"),
|
|
43564
43560
|
slot: "sn",
|
|
43565
43561
|
align: "center",
|
|
43566
43562
|
width: 60
|
|
@@ -149,7 +149,7 @@ ${f}`:d)}},onCacheKey:c=>shared$1.generateFormatCacheKey(r,o,c)}}function getMes
|
|
|
149
149
|
* screenfull
|
|
150
150
|
* v4.2.1 - 2019-07-27
|
|
151
151
|
* (c) Sindre Sorhus; MIT License
|
|
152
|
-
*/(function(a){(function(){var r=typeof window!="undefined"&&typeof window.document!="undefined"?window.document:{},o=a.exports,s=typeof Element!="undefined"&&"ALLOW_KEYBOARD_INPUT"in Element,l=function(){for(var d,f=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],h=0,p=f.length,v={};h<p;h++)if(d=f[h],d&&d[1]in r){for(h=0;h<d.length;h++)v[f[0][h]]=d[h];return v}return!1}(),u={change:l.fullscreenchange,error:l.fullscreenerror},c={request:function(d){return new Promise(function(f,h){var p=l.requestFullscreen,v=function(){this.off("change",v),f()}.bind(this);this.on("change",v),d=d||r.documentElement;var g;/ Version\/5\.1(?:\.\d+)? Safari\//.test(navigator.userAgent)?g=d[p]():g=d[p](s?Element.ALLOW_KEYBOARD_INPUT:{}),Promise.resolve(g).catch(h)}.bind(this))},exit:function(){return new Promise(function(d){if(!this.isFullscreen){d();return}var f=function(){this.off("change",f),d()}.bind(this);r[l.exitFullscreen](),this.on("change",f)}.bind(this))},toggle:function(d){return this.isFullscreen?this.exit():this.request(d)},onchange:function(d){this.on("change",d)},onerror:function(d){this.on("error",d)},on:function(d,f){var h=u[d];h&&r.addEventListener(h,f,!1)},off:function(d,f){var h=u[d];h&&r.removeEventListener(h,f,!1)},raw:l};if(!l){o?a.exports=!1:window.screenfull=!1;return}Object.defineProperties(c,{isFullscreen:{get:function(){return Boolean(r[l.fullscreenElement])}},element:{enumerable:!0,get:function(){return r[l.fullscreenElement]}},enabled:{enumerable:!0,get:function(){return Boolean(r[l.fullscreenEnabled])}}}),o?(a.exports=c,a.exports.default=c):window.screenfull=c})()})(screenfull$1);var screenfull=screenfull$1.exports,layout$4={namespaced:!0,state:{...Setting.layout,isMobile:!1,isTablet:!1,isDesktop:!0,isFullscreen:!1,bodyHeight:0,waterMark:Setting.waterMark},mutations:{setDevice(a,r){a.isMobile=!1,a.isTablet=!1,a.isDesktop=!1,a[`is${r}`]=!0},updateMenuCollapse(a,r){a.menuCollapse=r},setFullscreen(a,r){a.isFullscreen=r},updateLayoutSetting(a,{key:r,value:o}){a[r]=o},setBodyHeight(a,r){a.bodyHeight=r},updateWaterMarkStatus(a,r){a.waterMark.show=r},updateWaterMarkText(a,r){a.waterMark.text=r},updateWaterMarkOptions(a,r){a.waterMark.options=r}},actions:{toggleFullscreen({commit:a}){return new Promise(r=>{screenfull.isFullscreen?(screenfull.exit(),a("setFullscreen",!1)):(screenfull.request(),a("setFullscreen",!0)),r()})}}},__glob_0_5=Object.freeze(Object.defineProperty({__proto__:null,default:layout$4},Symbol.toStringTag,{value:"Module"})),loader={namespaced:!0,state:{count:0,enabled:!0,isLoading:!1},mutations:{start(a){a.count++,a.isLoading=!0},end(a){a.count--,a.isLoading=a.count>0},disable(a){a.enabled=!1},enable(a){a.enabled=!0}}},__glob_0_6=Object.freeze(Object.defineProperty({__proto__:null,default:loader},Symbol.toStringTag,{value:"Module"})),log$2={namespaced:!0,state:{log:[]},getters:{length(a){return a.log.length},lengthError(a){return a.log.filter(r=>r.type==="error").length}},actions:{push({rootState:a,commit:r},{message:o,type:s="info",meta:l}){r("push",{message:o,type:s,time:format$3(new Date,"yyyy-MM-dd HH:mm:ss"),meta:{user:a.admin.user.info,uuid:util$8.cookies.get("uuid"),token:util$8.cookies.get("token"),url:lodash$1.exports.get(window,"location.href",""),...l}})}},mutations:{push(a,r){a.log.push(r)},clean(a){a.log=[]}}},__glob_0_7=Object.freeze(Object.defineProperty({__proto__:null,default:log$2},Symbol.toStringTag,{value:"Module"}));function getHeaderName(a,r){const o=[];r.forEach(l=>{const u=l.header||"",c=transferMenu(l,u);o.push({path:l.path,header:u}),c.forEach(d=>o.push(d))});const s=o.find(l=>l.path===a);return s?s.header:null}function transferMenu(a,r){return a.children&&a.children.length?a.children.reduce((o,s)=>{o.push({path:s.path,header:r});const l=transferMenu(s,r);return o.concat(l)},[]):[a]}function getMenuSider(a,r=""){return r?a.filter(o=>o.header===r):a}function getSiderSubmenu(a,r){const o=[];r.forEach(l=>{const u=transferSubMenu(l,[]);o.push({path:l.path,openNames:[]}),u.forEach(c=>o.push(c))});const s=o.find(l=>l.path===a);return s?s.openNames:[]}function transferSubMenu(a,r){if(a.children&&a.children.length){const o=r.concat([a.path]);return a.children.reduce((s,l)=>{s.push({path:l.path,openNames:o});const u=transferSubMenu(l,o);return s.concat(u)},[])}else return[a].map(o=>({path:o.path,openNames:r}))}function getAllSiderMenu(a){let r=[];return a.forEach(o=>{o.children&&o.children.length?getMenuChildren(o).forEach(l=>r.push(l)):r.push(o)}),r}function getMenuChildren(a){return a.children&&a.children.length?a.children.reduce((r,o)=>{const s=getMenuChildren(o);return r.concat(s)},[]):[a]}function flattenSiderMenu(a,r){return a.forEach(o=>{let s={};for(let l in o)l!=="children"&&(s[l]=lodash$1.exports.cloneDeep(o[l]));r.push(s),o.children&&flattenSiderMenu(o.children,r)}),r}function includeArray(a,r){let o=!1;return r.forEach(s=>{a.includes(s)&&(o=!0)}),o}function setNativeMenuSider(a){a?localStorage.setItem(`admin-plus-${Setting.appID}-menu-sider`,JSON.stringify(a)):localStorage.removeItem(`admin-plus-${Setting.appID}-menu-sider`)}function getNativeMenuSider(){return JSON.parse(localStorage.getItem(`admin-plus-${Setting.appID}-menu-sider`)||"[]")}function getNativeMenuHeader(){return JSON.parse(localStorage.getItem(`admin-plus-${Setting.appID}-menu-header`)||"[]")}function setNativePermission(a){a?localStorage.setItem(`admin-plus-${Setting.appID}-permission`,JSON.stringify(a)):localStorage.removeItem(`admin-plus-${Setting.appID}-permission`)}function getNativePermission(){return JSON.parse(localStorage.getItem(`admin-plus-${Setting.appID}-permission`)||"[]")}const res$k="Permission";var permissionApi={query(){return service({url:`api/${res$k}/query`,method:"get",params:{clientType:"Admin"}})},queryByRoleID(a,r){return service({url:`api/${res$k}/queryByRoleID`,method:"get",params:{roleID:a,clientType:r}})},queryRouter(){return service({url:`api/${res$k}/queryRouter`,method:"get",params:{clientType:"Admin"}})},async exportFile(a){const r=await service({url:`api/${res$k}/exportFile`,method:"post",responseType:"blob",data:{ids:a}}),o=new Blob([r],{type:"application/octet-stream"});saveAs(o,"Permission-"+format$3(new Date,"yyyyMMddHHmmss")+".pms")}};function convertMenu(a){if(!a)return null;var r=/(http|https):\/\/([\w.]+\/?)\S*/;return a.map(o=>({path:r.test(o.url)?o.url:"/"+o.url.split("?")[0],code:o.url,title:o.name,subTitle:o.subName,target:o.isNewWindow?"_blank":null,header:"home",custom:o.icon,children:convertMenu(o.subPermissions)}))}var menu={namespaced:!0,state:{header:[],sider:[],headerName:"",activePath:"",openNames:[],menuSider:[],siderMenuBadge:[],headerMenuBadge:[],userPermissions:null},getters:{filterSider(a){return a.sider},filterHeader(a,r,o){const l=o.admin.user.info.access;return l&&l.length?a.header.filter(u=>{let c=!0;return u.auth&&!includeArray(u.auth,l)&&(c=!1),u.children&&u.children.length&&(u.children=u.children.filter(d=>{let f=!0;return d.auth&&!includeArray(d.auth,l)&&(f=!1),f})),c}):a.header.filter(u=>{let c=!0;return u.auth&&u.auth.length&&(c=!1),u.children&&u.children.length&&(u.children=u.children.filter(d=>{let f=!0;return d.auth&&d.auth.length&&(f=!1),f})),c})},currentHeader(a){return a.header.find(r=>r.name===a.headerName)},hideSider(a,r){let o=!1;return r.currentHeader&&"hideSider"in r.currentHeader&&(o=r.currentHeader.hideSider),o},permission(a){return a.userPermissions}},mutations:{setSider(a,r){a.sider=r},setHeader(a,r){a.header=r},setHeaderName(a,r){a.headerName=r},setActivePath(a,r){a.activePath=r},setOpenNames(a,r){a.openNames=r},setMenuSider(a,r){a.menuSider=r},setAllSiderMenuBadge(a,r){a.siderMenuBadge=r},setSiderMenuBadge(a,{path:r,badge:o}){const s=lodash$1.exports.cloneDeep(a.siderMenuBadge),l=s.findIndex(u=>u.path===r);l>=0?(s[l]=o,a.siderMenuBadge=s):a.siderMenuBadge.push(o)},removeSiderMenuBadge(a,r){const o=a.siderMenuBadge.findIndex(s=>s.path===r);o>=0&&a.siderMenuBadge.splice(o,1)},setAllHeaderMenuBadge(a,r){a.headerMenuBadge=r},setHeaderMenuBadge(a,{path:r,badge:o}){const s=lodash$1.exports.cloneDeep(a.headerMenuBadge),l=s.findIndex(u=>u.path===r);l>=0?(s[l]=o,a.headerMenuBadge=s):a.headerMenuBadge.push(o)},removeHeaderMenuBadge(a,r){const o=a.headerMenuBadge.findIndex(s=>s.path===r);o>=0&&a.headerMenuBadge.splice(o,1)}},actions:{setMenuList({state:a,commit:r},o={}){const s=getNativeMenuHeader();r("setHeader",s);const l=getNativeMenuSider();let u=o.path,c=getHeaderName(u,l);if(c!==null){r("setHeaderName",c),r("setMenuSider",l);const d=getMenuSider(l,c);r("setSider",d),r("setActivePath",o.path);const f=getSiderSubmenu(u,l);r("setOpenNames",f)}a.userPermissions==null&&(a.userPermissions=getNativePermission())},getMenuList({state:a,dispatch:r},o){return new Promise((s,l)=>{permissionApi.query().then(u=>{u.menus.unshift({name:window.$app.$t("Permission_home"),subName:window.$app.$t("Permission_home_SubName"),parentID:null,url:"home",templateUrl:"@/home",icon:"fa fa-home"});let c=convertMenu(u.menus);if(setNativeMenuSider(c),o){const f=o===!0?router$1.currentRoute.value:o;r("setMenuList",f)}let d={};u.permissions.forEach(f=>{let h=f.split("?")[0];f.split("$").length>1&&(h=h+"$"+f.split("$")[1]),d[h]=!0}),a.userPermissions=d,setNativePermission(d),s()}).catch(u=>{l(u)})})}}},__glob_0_8=Object.freeze(Object.defineProperty({__proto__:null,default:menu},Symbol.toStringTag,{value:"Module"}));const pre="/dashboard/";var dashboard={path:"/dashboard",title:"Dashboard",header:"home",custom:"i-icon-demo i-icon-demo-dashboard",children:[{path:`${pre}console`,title:"\u4E3B\u63A7\u53F0"},{path:`${pre}monitor`,title:"\u76D1\u63A7\u9875"},{path:`${pre}workplace`,title:"\u5DE5\u4F5C\u53F0",subtitle:"Workplace"}]},menuSider=[dashboard,{path:"/i18n",title:"menu.i18n",header:"home",custom:"i-icon-demo i-icon-demo-i18n"}];const isKeepAlive=a=>lodash$1.exports.get(a,"meta.cache",!1);var page={namespaced:!0,state:{pool:[],opened:Setting.page.opened,current:"",keepAlive:[]},actions:{openedLoad({state:a,commit:r,dispatch:o,rootState:s},{loadOpenedTabs:l=!0}){return new Promise(async u=>{let c=await o("admin/db/get",{dbName:"sys",path:"page.opened",defaultValue:Setting.page.opened,user:!0},{root:!0});l||(c=[]);const d=[];a.opened=c.map(f=>{if(f.fullPath==="/index")return d.push(1),f;const h=a.pool.find(p=>p.name===f.name);return f.keepMeta&&(h.meta=Object.assign({},f.meta)),d.push(h?1:0),Object.assign({},f,h)}).filter((f,h)=>d[h]===1).filter(f=>{const p=getAllSiderMenu(menuSider).find(g=>g.path===f.fullPath);let v=!0;if(p&&p.auth){const g=s.admin.user.info,y=lodash$1.exports.cloneDeep(g.access);y.push("hidden"),y&&!includeArray(p.auth,y)&&(v=!1)}return v}),r("keepAliveRefresh"),u()})},opened2db({state:a,dispatch:r}){return new Promise(async o=>{r("admin/db/set",{dbName:"sys",path:"page.opened",value:a.opened,user:!0},{root:!0}),o()})},openedUpdate({state:a,dispatch:r},{index:o,params:s,query:l,fullPath:u,pageName:c,meta:d,keepMeta:f=!1}){return new Promise(async h=>{let p=a.opened[o];p.params=s||p.params,p.query=l||p.query,p.fullPath=u||p.fullPath,p.pageName=c||p.pageName,p.meta=d||p.meta,p.keepMeta=f,a.opened.splice(o,1,p),await r("opened2db"),h()})},currentUpdate({state:a,dispatch:r},{params:o,query:s,fullPath:l,pageName:u,meta:c,keepMeta:d=!1}){return new Promise(async f=>{setTimeout(async()=>{const h=a.opened.findIndex(v=>v.fullPath===a.current);let p=a.opened[h];p.params=o||p.params,p.query=s||p.query,p.fullPath=l||p.fullPath,p.pageName=u||p.pageName,p.meta=c||p.meta,p.keepMeta=d,a.opened.splice(h,1,p),await r("opened2db"),f()},0)})},add({state:a,commit:r,dispatch:o},{tag:s,params:l,query:u,fullPath:c,pageName:d}){return new Promise(async f=>{let h=s;h.params=l||h.params,h.query=u||h.query,h.fullPath=c||h.fullPath,h.pageName=d||h.pageName,a.opened.push(h),isKeepAlive(h)&&r("keepAliveRefresh"),await o("opened2db"),f()})},open({state:a,commit:r,dispatch:o},{name:s,params:l,query:u,path:c,fullPath:d}){const f=router$1.getRoutes().find(h=>h.path==c).components.default.name;return new Promise(async h=>{setTimeout(async()=>{let p=a.opened,v=0;if(p.find((y,$)=>{const _=y.fullPath===d;return v=_?$:v,_}))await o("openedUpdate",{index:v,params:l,query:u,fullPath:d,pageName:f});else{let y=a.pool.find($=>$.name===s);y&&await o("add",{tag:Object.assign({},y),params:l,query:u,fullPath:d,pageName:f})}r("currentSet",d)}),h()})},close({state:a,commit:r,dispatch:o},{tagName:s}){return new Promise(async l=>{let u=a.opened[0];const c=a.current===s;if(c){let f=a.opened.length;for(let h=0;h<f;h++)if(a.opened[h].fullPath===s){f>1?h===f-1?u=a.opened[h-1]:u=a.opened[h+1]:u={};break}}const d=a.opened.findIndex(f=>f.fullPath===s);if(d>=0&&a.opened.splice(d,1),r("keepAliveRefresh"),await o("opened2db"),c){const{name:f="index",params:h={},query:p={}}=u;let v={name:f,params:h,query:p};router$1.push(v,()=>{})}l()})},closeLeft({state:a,commit:r,dispatch:o},{pageSelect:s}={}){return new Promise(async l=>{const u=s||a.current;let c=0;a.opened.forEach((d,f)=>{d.fullPath===u&&(c=f)}),c>0&&a.opened.splice(1,c-1),r("keepAliveRefresh"),a.current=u,router$1.currentRoute.value.fullPath!==u&&router$1.push(u),await o("opened2db"),l()})},closeRight({state:a,commit:r,dispatch:o},{pageSelect:s}={}){return new Promise(async l=>{const u=s||a.current;let c=0;a.opened.forEach((d,f)=>{d.fullPath===u&&(c=f)}),a.opened.splice(c+1),r("keepAliveRefresh"),a.current=u,router$1.currentRoute.value.fullPath!==u&&router$1.push(u),await o("opened2db"),l()})},closeOther({state:a,commit:r,dispatch:o},{pageSelect:s}={}){return new Promise(async l=>{const u=s||a.current;let c=0;a.opened.forEach((d,f)=>{d.fullPath===u&&(c=f)}),c===0?a.opened.splice(1):(a.opened.splice(c+1),a.opened.splice(1,c-1)),r("keepAliveRefresh"),a.current=u,router$1.currentRoute.value.fullPath!==u&&router$1.push(u),await o("opened2db"),l()})},closeAll({state:a,commit:r,dispatch:o}){return new Promise(async s=>{a.opened.splice(1),r("keepAliveRefresh"),await o("opened2db"),router$1.currentRoute.value.name!=="index"&&router$1.push({name:"index"},()=>{}),s()})},updateOpened({state:a,dispatch:r},{opened:o}){return new Promise(async s=>{a.opened=o,await r("opened2db"),s()})}},mutations:{keepAliveRefresh(a){a.keepAlive=a.opened.filter(r=>isKeepAlive(r)).map(r=>r.pageName)},currentSet(a,r){a.current=r},init(a,r){const o=[];r.forEach(s=>{const{meta:l,name:u,path:c}=s;o.push({meta:l,name:u,path:c})}),a.pool=o}}},__glob_0_9=Object.freeze(Object.defineProperty({__proto__:null,default:page},Symbol.toStringTag,{value:"Module"})),user$1={namespaced:!0,state:{info:{},data:{}},actions:{set({state:a,dispatch:r},o){return new Promise(async s=>{a.info=o,await r("admin/db/set",{dbName:"sys",path:"user.info",value:o,user:!0},{root:!0}),s()})},setData({state:a,dispatch:r},o){return new Promise(async s=>{a.data=o,await r("admin/db/set",{dbName:"sys",path:"user.data",value:o,user:!0},{root:!0}),s()})},load({state:a,dispatch:r}){return new Promise(async o=>{a.info=await r("admin/db/get",{dbName:"sys",path:"user.info",defaultValue:{},user:!0},{root:!0}),a.data=await r("admin/db/get",{dbName:"sys",path:"user.data",defaultValue:{},user:!0},{root:!0}),o()})}}},__glob_0_10=Object.freeze(Object.defineProperty({__proto__:null,default:user$1},Symbol.toStringTag,{value:"Module"}));const res$j="CustomPage";var customPageApi={get(a){return service({url:`api/${res$j}/get`,method:"get",params:{id:a}})},async exportFile(a){const r=await service({url:`api/${res$j}/exportFile`,method:"post",responseType:"blob",data:{ids:a}}),o=new Blob([r],{type:"application/octet-stream"});saveAs(o,"CustomPage-"+format$3(new Date,"yyyyMMddHHmmss")+".cp")}},viewPage$1={namespaced:!0,state:{pages:{}},getters:{get:a=>r=>a.pages[r]},actions:{async load({state:a},r){if(r in a.pages)return a.pages[r];{let o=await customPageApi.get(r);return o&&(a.pages[r]=o),o}}}},__glob_0_11=Object.freeze(Object.defineProperty({__proto__:null,default:viewPage$1},Symbol.toStringTag,{value:"Module"}));const files$1={"./modules/account.js":__glob_0_0,"./modules/cache.js":__glob_0_1,"./modules/dataView.js":__glob_0_2,"./modules/db.js":__glob_0_3,"./modules/i18n.js":__glob_0_4,"./modules/layout.js":__glob_0_5,"./modules/loader.js":__glob_0_6,"./modules/log.js":__glob_0_7,"./modules/menu.js":__glob_0_8,"./modules/page.js":__glob_0_9,"./modules/user.js":__glob_0_10,"./modules/viewPage.js":__glob_0_11},modules={};Object.keys(files$1).forEach(a=>{modules[a.replace(/(\.\/modules\/|\.js)/g,"")]=files$1[a].default});var admin={namespaced:!0,modules},store=createStore({modules:{admin}}),dynamic={async init(a,r){let o=await permissionApi.queryRouter();const s=a.getRoutes().find(l=>l.path=="/");o.forEach(l=>{var u;if(l.isCustomPage&&(l.url+="?id="+l.customPageID,l.customPage.customPageTemplate&&(l.templateUrl="template/"+l.customPage.customPageTemplate.substr(0,1).toLowerCase()+l.customPage.customPageTemplate.substr(1)+".vue")),(l.templateUrl||"").trim()){const c=((u=l.url)==null?void 0:u.split("?")[0])||"",d=c.replace(/\//g,"-"),f={};l.url&&l.url.split("?").length>1&&l.url.split("?")[1].split("&").forEach(h=>{h.split("=").length>1&&h.split("=")[0].length>0&&(f[h.split("=")[0]]=h.split("=")[1])}),s.children.push({path:c,name:d,meta:{title:getNameI18n(l),description:getDescI18n(l),data:f,auth:!0,cache:!0},component:()=>new Promise(h=>{h(r[l.templateUrl])})})}}),a.removeRoute("root"),a.addRoute(s),a.addRoute({path:"/:pathMatch(.*)",name:"404",meta:{title:"404"},component:()=>new Promise(l=>{l(r["system/error/404.vue"])})})}};function getNameI18n(a){if(Setting.layout.showI18n){let r="Permission_"+a.url.split("?")[0],o=window.$app.$t(r);return o==r?a.name:o}else return a.name}function getDescI18n(a){if(Setting.layout.showI18n){let r="Permission_"+a.url.split("?")[0]+"_SubName",o=window.$app.$t(r);return o==r?a.subName:o}else return a.subName}const base$1=window.$base||"admin",router=createRouter({history:Setting.routerMode==="history"?createWebHistory(base$1):Setting.routerMode==="hash"?createWebHashHistory(base$1):createMemoryHistory(base$1),routes:[]});let inited=!1;const initRouter=(a,r)=>{r.forEach(o=>{router.addRoute(o)}),Setting.rootPath=base$1==""||base$1==null?"/static/":"/"+base$1+"/static/",router.beforeEach(async(o,s,l)=>{if(Setting.showProgressBar&&ViewUIPlus__default.default.LoadingBar.start(),store.dispatch("admin/menu/setMenuList",o),!inited)await dynamic.init(router,a),store.commit("admin/page/init",router.getRoutes()),store.dispatch("admin/page/openedLoad",{loadOpenedTabs:!0},{root:!0}),inited=!0,l({...o,replace:!0});else if(o.matched.some(u=>u.meta.auth)){const u=util$8.cookies.get("token");if(u&&u!=="undefined"){const c=store.getters["admin/menu/permission"];c[o.fullPath.substring(1)]||c[o.fullPath.split("?")[0].substring(1)]?l():l({name:"home"})}else l({name:"login",query:{redirect:o.fullPath}})}else l()}),router.afterEach(o=>{Setting.showProgressBar&&ViewUIPlus__default.default.LoadingBar.finish(),Setting.layout.tabs&&store.dispatch("admin/page/open",o),window.document.title=window.$app.$t(o.meta.title)+" - "+Setting.info.title,window.scrollTo(0,0)})};var router$1=router,mixinPage={data(){return{grid4:{xxl:4,xl:4,lg:4,md:6,sm:12,xs:24},grid6:{xxl:6,xl:6,lg:8,md:12,sm:12,xs:24},grid8:{xxl:8,xl:8,lg:8,md:12,sm:24,xs:24},grid12:{xxl:12,xl:12,lg:12,md:12,sm:24,xs:24},grid16:{xxl:16,xl:16,lg:16,md:24,sm:24,xs:24},grid18:{xxl:18,xl:18,lg:18,md:24,sm:24,xs:24},grid24:{xxl:24,xl:24,lg:24,md:24,sm:24,xs:24}}},computed:{...mapState("admin/user",["info"]),...mapState("admin/cache",["userNames","enums","dicts","caches"]),...mapState("admin/menu",["userPermissions"]),rootPath(){return Setting.rootPath},sysInfo(){return Setting.info},layout(){return Setting.layout},apiBaseURL(){return window.$mode==="development"?Setting.apiBaseURL.dev:Setting.apiBaseURL.prd},uploadURL(){return this.apiBaseURL+"api/Attachment/add"},uploadHeaders(){const a=util$8.cookies.get("token");return{Authorization:"Bearer "+a}}},methods:{...mapActions("admin/cache",["loadEnum","loadDict","loadUserName","loadCache"]),...mapMutations("admin/loader",{enableLoader:"enable"}),...mapMutations("admin/loader",{disableLoader:"disable"}),copy(a){return lodash$1.exports.cloneDeep(a)},allow(a){if(a.startsWith("permission/"))return this.userPermissions[a];{let r=router$1.currentRoute.value.fullPath.substr(1);if(this.userPermissions[r+"$"+a]==!0)return!0;let o=Object.keys(this.userPermissions).filter(s=>s.startsWith(r+"$")).length;return this.userPermissions[r]==!0&&o==0}},getCache(a,r){return this.loadCache(a),this.caches[a].find(o=>o.id==r)},getCacheList(a){return this.loadCache(a),this.caches[a]},getEnum(a,r){return this.loadEnum(a),r==null?null:this.layout.showI18n?this.$t("Enum_"+a+"_"+r):this.enums[a][r]},getEnumList(a){return this.loadEnum(a),Object.keys(this.enums[a]).map(r=>this.layout.showI18n?{id:r,name:this.$t("Enum_"+a+"_"+r)}:{id:r,name:this.enums[a][r]})},getDict(a,r){return this.loadDict(a),r==null?null:this.layout.showI18n?this.$t("Dict_"+a+"_"+r):this.dicts[a][r]},getDictList(a){return this.loadDict(a),Object.keys(this.dicts[a]).map(r=>this.layout.showI18n?{id:r,name:this.$t("Dict_"+a+"_"+r)}:{id:r,name:this.dicts[a][r]})},getUserName(a){return this.loadUserName(a),this.userNames[a]},getAttachmentUrl(a,r){return a?a.startsWith("http")?a:this.apiBaseURL+"api/Attachment/get?file="+encodeURIComponent(a)+"&name="+encodeURIComponent(r):null},fileDownload(a,r){let o=this.getAttachmentUrl(a,r);o&&(window.location.href=o)},getImgUrl(a){return a?a.startsWith("http")?a:this.apiBaseURL+"api/Attachment/getImage?file="+encodeURIComponent(a):this.rootPath+"images/no-image.png"},showData(a,r){let o=r.code,s=r.dataType,l=r.displayFormat,u=r.digit,c=r.fixedDigit;if(!s)return null;if(s.startsWith("Enum:"))return this.getEnum(s.replace("Enum:",""),this.parseData(a,o));if(s==="BigInteger"&&l=="User")return this.getUserName(this.parseData(a,o));let d=this.parseData(a,o);if(d==null)return null;if(s==="DateTime")return(l||"").trim()?format$3(new Date(d),l):format$3(new Date(d),"yyyy-MM-dd");if(s==="Integer")if((l||"").trim()){let f=null;try{f=format$3(new Date(d*1e3),l)}catch(h){console.log(h,d)}return f}else return d;else{if(s==="Decimal"||s==="Float"||s==="Double")return d=parseFloat(d),l==="Money"?this.formatThousand(d.toFixed(2)):l==="Thousand"?this.formatThousand(this.keepDecimal(d,u,c)):l==="Percent"?this.keepDecimal(d,u,c)+"%":this.keepDecimal(d,u,c);if(s==="Boolean")return l==="Y"?d?'<i class="fa fa-check info"></i>':"":l==="YN"?d?'<i class="fa fa-check"></i>':'<i class="fa fa-times"></i>':l==="Disabled"?d?'<i class="fa fa-ban error"></i>':"":l==="Valid"?d?'<i class="fa fa-check success"></i>':"":l==="Attention"?d?'<i class="fa fa-exclamation error"></i>':"":d?'<i class="fa fa-check info"></i>':"";if(s==="String")if(l==="Array"){let f="";try{f=JSON.parse(d).join(", ")}catch(h){console.log(h,d)}return f}else if((l||"").trim()){let f=null;try{f=format$3(new Date(parseInt(d)*1e3),l)}catch(h){console.log(h,d)}return f}else return this.tParam(this.showMultiLine(d));else return d}},showMultiLine(a){return typeof a=="string"?a.replaceAll(" "," ").replaceAll(`
|
|
152
|
+
*/(function(a){(function(){var r=typeof window!="undefined"&&typeof window.document!="undefined"?window.document:{},o=a.exports,s=typeof Element!="undefined"&&"ALLOW_KEYBOARD_INPUT"in Element,l=function(){for(var d,f=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],h=0,p=f.length,v={};h<p;h++)if(d=f[h],d&&d[1]in r){for(h=0;h<d.length;h++)v[f[0][h]]=d[h];return v}return!1}(),u={change:l.fullscreenchange,error:l.fullscreenerror},c={request:function(d){return new Promise(function(f,h){var p=l.requestFullscreen,v=function(){this.off("change",v),f()}.bind(this);this.on("change",v),d=d||r.documentElement;var g;/ Version\/5\.1(?:\.\d+)? Safari\//.test(navigator.userAgent)?g=d[p]():g=d[p](s?Element.ALLOW_KEYBOARD_INPUT:{}),Promise.resolve(g).catch(h)}.bind(this))},exit:function(){return new Promise(function(d){if(!this.isFullscreen){d();return}var f=function(){this.off("change",f),d()}.bind(this);r[l.exitFullscreen](),this.on("change",f)}.bind(this))},toggle:function(d){return this.isFullscreen?this.exit():this.request(d)},onchange:function(d){this.on("change",d)},onerror:function(d){this.on("error",d)},on:function(d,f){var h=u[d];h&&r.addEventListener(h,f,!1)},off:function(d,f){var h=u[d];h&&r.removeEventListener(h,f,!1)},raw:l};if(!l){o?a.exports=!1:window.screenfull=!1;return}Object.defineProperties(c,{isFullscreen:{get:function(){return Boolean(r[l.fullscreenElement])}},element:{enumerable:!0,get:function(){return r[l.fullscreenElement]}},enabled:{enumerable:!0,get:function(){return Boolean(r[l.fullscreenEnabled])}}}),o?(a.exports=c,a.exports.default=c):window.screenfull=c})()})(screenfull$1);var screenfull=screenfull$1.exports,layout$4={namespaced:!0,state:{...Setting.layout,isMobile:!1,isTablet:!1,isDesktop:!0,isFullscreen:!1,bodyHeight:0,waterMark:Setting.waterMark},mutations:{setDevice(a,r){a.isMobile=!1,a.isTablet=!1,a.isDesktop=!1,a[`is${r}`]=!0},updateMenuCollapse(a,r){a.menuCollapse=r},setFullscreen(a,r){a.isFullscreen=r},updateLayoutSetting(a,{key:r,value:o}){a[r]=o},setBodyHeight(a,r){a.bodyHeight=r},updateWaterMarkStatus(a,r){a.waterMark.show=r},updateWaterMarkText(a,r){a.waterMark.text=r},updateWaterMarkOptions(a,r){a.waterMark.options=r}},actions:{toggleFullscreen({commit:a}){return new Promise(r=>{screenfull.isFullscreen?(screenfull.exit(),a("setFullscreen",!1)):(screenfull.request(),a("setFullscreen",!0)),r()})}}},__glob_0_5=Object.freeze(Object.defineProperty({__proto__:null,default:layout$4},Symbol.toStringTag,{value:"Module"})),loader={namespaced:!0,state:{count:0,enabled:!0,isLoading:!1},mutations:{start(a){a.count++,a.isLoading=!0},end(a){a.count--,a.isLoading=a.count>0},disable(a){a.enabled=!1},enable(a){a.enabled=!0}}},__glob_0_6=Object.freeze(Object.defineProperty({__proto__:null,default:loader},Symbol.toStringTag,{value:"Module"})),log$2={namespaced:!0,state:{log:[]},getters:{length(a){return a.log.length},lengthError(a){return a.log.filter(r=>r.type==="error").length}},actions:{push({rootState:a,commit:r},{message:o,type:s="info",meta:l}){r("push",{message:o,type:s,time:format$3(new Date,"yyyy-MM-dd HH:mm:ss"),meta:{user:a.admin.user.info,uuid:util$8.cookies.get("uuid"),token:util$8.cookies.get("token"),url:lodash$1.exports.get(window,"location.href",""),...l}})}},mutations:{push(a,r){a.log.push(r)},clean(a){a.log=[]}}},__glob_0_7=Object.freeze(Object.defineProperty({__proto__:null,default:log$2},Symbol.toStringTag,{value:"Module"}));function getHeaderName(a,r){const o=[];r.forEach(l=>{const u=l.header||"",c=transferMenu(l,u);o.push({path:l.path,header:u}),c.forEach(d=>o.push(d))});const s=o.find(l=>l.path===a);return s?s.header:null}function transferMenu(a,r){return a.children&&a.children.length?a.children.reduce((o,s)=>{o.push({path:s.path,header:r});const l=transferMenu(s,r);return o.concat(l)},[]):[a]}function getMenuSider(a,r=""){return r?a.filter(o=>o.header===r):a}function getSiderSubmenu(a,r){const o=[];r.forEach(l=>{const u=transferSubMenu(l,[]);o.push({path:l.path,openNames:[]}),u.forEach(c=>o.push(c))});const s=o.find(l=>l.path===a);return s?s.openNames:[]}function transferSubMenu(a,r){if(a.children&&a.children.length){const o=r.concat([a.path]);return a.children.reduce((s,l)=>{s.push({path:l.path,openNames:o});const u=transferSubMenu(l,o);return s.concat(u)},[])}else return[a].map(o=>({path:o.path,openNames:r}))}function getAllSiderMenu(a){let r=[];return a.forEach(o=>{o.children&&o.children.length?getMenuChildren(o).forEach(l=>r.push(l)):r.push(o)}),r}function getMenuChildren(a){return a.children&&a.children.length?a.children.reduce((r,o)=>{const s=getMenuChildren(o);return r.concat(s)},[]):[a]}function flattenSiderMenu(a,r){return a.forEach(o=>{let s={};for(let l in o)l!=="children"&&(s[l]=lodash$1.exports.cloneDeep(o[l]));r.push(s),o.children&&flattenSiderMenu(o.children,r)}),r}function includeArray(a,r){let o=!1;return r.forEach(s=>{a.includes(s)&&(o=!0)}),o}function setNativeMenuSider(a){a?localStorage.setItem(`admin-plus-${Setting.appID}-menu-sider`,JSON.stringify(a)):localStorage.removeItem(`admin-plus-${Setting.appID}-menu-sider`)}function getNativeMenuSider(){return JSON.parse(localStorage.getItem(`admin-plus-${Setting.appID}-menu-sider`)||"[]")}function getNativeMenuHeader(){return JSON.parse(localStorage.getItem(`admin-plus-${Setting.appID}-menu-header`)||"[]")}function setNativePermission(a){a?localStorage.setItem(`admin-plus-${Setting.appID}-permission`,JSON.stringify(a)):localStorage.removeItem(`admin-plus-${Setting.appID}-permission`)}function getNativePermission(){return JSON.parse(localStorage.getItem(`admin-plus-${Setting.appID}-permission`)||"[]")}const res$k="Permission";var permissionApi={query(){return service({url:`api/${res$k}/query`,method:"get",params:{clientType:"Admin"}})},queryByRoleID(a,r){return service({url:`api/${res$k}/queryByRoleID`,method:"get",params:{roleID:a,clientType:r}})},queryRouter(){return service({url:`api/${res$k}/queryRouter`,method:"get",params:{clientType:"Admin"}})},async exportFile(a){const r=await service({url:`api/${res$k}/exportFile`,method:"post",responseType:"blob",data:{ids:a}}),o=new Blob([r],{type:"application/octet-stream"});saveAs(o,"Permission-"+format$3(new Date,"yyyyMMddHHmmss")+".pms")}};function convertMenu(a){if(!a)return null;var r=/(http|https):\/\/([\w.]+\/?)\S*/;return a.map(o=>({path:r.test(o.url)?o.url:"/"+o.url.split("?")[0],code:o.url,title:o.name,subTitle:o.subName,target:o.isNewWindow?"_blank":null,header:"home",custom:o.icon,children:convertMenu(o.subPermissions)}))}var menu={namespaced:!0,state:{header:[],sider:[],headerName:"",activePath:"",openNames:[],menuSider:[],siderMenuBadge:[],headerMenuBadge:[],userPermissions:null},getters:{filterSider(a){return a.sider},filterHeader(a,r,o){const l=o.admin.user.info.access;return l&&l.length?a.header.filter(u=>{let c=!0;return u.auth&&!includeArray(u.auth,l)&&(c=!1),u.children&&u.children.length&&(u.children=u.children.filter(d=>{let f=!0;return d.auth&&!includeArray(d.auth,l)&&(f=!1),f})),c}):a.header.filter(u=>{let c=!0;return u.auth&&u.auth.length&&(c=!1),u.children&&u.children.length&&(u.children=u.children.filter(d=>{let f=!0;return d.auth&&d.auth.length&&(f=!1),f})),c})},currentHeader(a){return a.header.find(r=>r.name===a.headerName)},hideSider(a,r){let o=!1;return r.currentHeader&&"hideSider"in r.currentHeader&&(o=r.currentHeader.hideSider),o},permission(a){return a.userPermissions}},mutations:{setSider(a,r){a.sider=r},setHeader(a,r){a.header=r},setHeaderName(a,r){a.headerName=r},setActivePath(a,r){a.activePath=r},setOpenNames(a,r){a.openNames=r},setMenuSider(a,r){a.menuSider=r},setAllSiderMenuBadge(a,r){a.siderMenuBadge=r},setSiderMenuBadge(a,{path:r,badge:o}){const s=lodash$1.exports.cloneDeep(a.siderMenuBadge),l=s.findIndex(u=>u.path===r);l>=0?(s[l]=o,a.siderMenuBadge=s):a.siderMenuBadge.push(o)},removeSiderMenuBadge(a,r){const o=a.siderMenuBadge.findIndex(s=>s.path===r);o>=0&&a.siderMenuBadge.splice(o,1)},setAllHeaderMenuBadge(a,r){a.headerMenuBadge=r},setHeaderMenuBadge(a,{path:r,badge:o}){const s=lodash$1.exports.cloneDeep(a.headerMenuBadge),l=s.findIndex(u=>u.path===r);l>=0?(s[l]=o,a.headerMenuBadge=s):a.headerMenuBadge.push(o)},removeHeaderMenuBadge(a,r){const o=a.headerMenuBadge.findIndex(s=>s.path===r);o>=0&&a.headerMenuBadge.splice(o,1)}},actions:{setMenuList({state:a,commit:r},o={}){const s=getNativeMenuHeader();r("setHeader",s);const l=getNativeMenuSider();let u=o.path,c=getHeaderName(u,l);if(c!==null){r("setHeaderName",c),r("setMenuSider",l);const d=getMenuSider(l,c);r("setSider",d),r("setActivePath",o.path);const f=getSiderSubmenu(u,l);r("setOpenNames",f)}a.userPermissions==null&&(a.userPermissions=getNativePermission())},getMenuList({state:a,dispatch:r},o){return new Promise((s,l)=>{permissionApi.query().then(u=>{u.menus.unshift({name:window.$app.$t("Permission_home"),subName:window.$app.$t("Permission_home_SubName"),parentID:null,url:"home",templateUrl:"@/home",icon:"fa fa-home"});let c=convertMenu(u.menus);if(setNativeMenuSider(c),o){const f=o===!0?router$1.currentRoute.value:o;r("setMenuList",f)}let d={};u.permissions.forEach(f=>{d[f.split("?")[0]]=!0}),a.userPermissions=d,setNativePermission(d),s()}).catch(u=>{l(u)})})}}},__glob_0_8=Object.freeze(Object.defineProperty({__proto__:null,default:menu},Symbol.toStringTag,{value:"Module"}));const pre="/dashboard/";var dashboard={path:"/dashboard",title:"Dashboard",header:"home",custom:"i-icon-demo i-icon-demo-dashboard",children:[{path:`${pre}console`,title:"\u4E3B\u63A7\u53F0"},{path:`${pre}monitor`,title:"\u76D1\u63A7\u9875"},{path:`${pre}workplace`,title:"\u5DE5\u4F5C\u53F0",subtitle:"Workplace"}]},menuSider=[dashboard,{path:"/i18n",title:"menu.i18n",header:"home",custom:"i-icon-demo i-icon-demo-i18n"}];const isKeepAlive=a=>lodash$1.exports.get(a,"meta.cache",!1);var page={namespaced:!0,state:{pool:[],opened:Setting.page.opened,current:"",keepAlive:[]},actions:{openedLoad({state:a,commit:r,dispatch:o,rootState:s},{loadOpenedTabs:l=!0}){return new Promise(async u=>{let c=await o("admin/db/get",{dbName:"sys",path:"page.opened",defaultValue:Setting.page.opened,user:!0},{root:!0});l||(c=[]);const d=[];a.opened=c.map(f=>{if(f.fullPath==="/index")return d.push(1),f;const h=a.pool.find(p=>p.name===f.name);return f.keepMeta&&(h.meta=Object.assign({},f.meta)),d.push(h?1:0),Object.assign({},f,h)}).filter((f,h)=>d[h]===1).filter(f=>{const p=getAllSiderMenu(menuSider).find(g=>g.path===f.fullPath);let v=!0;if(p&&p.auth){const g=s.admin.user.info,y=lodash$1.exports.cloneDeep(g.access);y.push("hidden"),y&&!includeArray(p.auth,y)&&(v=!1)}return v}),r("keepAliveRefresh"),u()})},opened2db({state:a,dispatch:r}){return new Promise(async o=>{r("admin/db/set",{dbName:"sys",path:"page.opened",value:a.opened,user:!0},{root:!0}),o()})},openedUpdate({state:a,dispatch:r},{index:o,params:s,query:l,fullPath:u,pageName:c,meta:d,keepMeta:f=!1}){return new Promise(async h=>{let p=a.opened[o];p.params=s||p.params,p.query=l||p.query,p.fullPath=u||p.fullPath,p.pageName=c||p.pageName,p.meta=d||p.meta,p.keepMeta=f,a.opened.splice(o,1,p),await r("opened2db"),h()})},currentUpdate({state:a,dispatch:r},{params:o,query:s,fullPath:l,pageName:u,meta:c,keepMeta:d=!1}){return new Promise(async f=>{setTimeout(async()=>{const h=a.opened.findIndex(v=>v.fullPath===a.current);let p=a.opened[h];p.params=o||p.params,p.query=s||p.query,p.fullPath=l||p.fullPath,p.pageName=u||p.pageName,p.meta=c||p.meta,p.keepMeta=d,a.opened.splice(h,1,p),await r("opened2db"),f()},0)})},add({state:a,commit:r,dispatch:o},{tag:s,params:l,query:u,fullPath:c,pageName:d}){return new Promise(async f=>{let h=s;h.params=l||h.params,h.query=u||h.query,h.fullPath=c||h.fullPath,h.pageName=d||h.pageName,a.opened.push(h),isKeepAlive(h)&&r("keepAliveRefresh"),await o("opened2db"),f()})},open({state:a,commit:r,dispatch:o},{name:s,params:l,query:u,path:c,fullPath:d}){const f=router$1.getRoutes().find(h=>h.path==c).components.default.name;return new Promise(async h=>{setTimeout(async()=>{let p=a.opened,v=0;if(p.find((y,$)=>{const _=y.fullPath===d;return v=_?$:v,_}))await o("openedUpdate",{index:v,params:l,query:u,fullPath:d,pageName:f});else{let y=a.pool.find($=>$.name===s);y&&await o("add",{tag:Object.assign({},y),params:l,query:u,fullPath:d,pageName:f})}r("currentSet",d)}),h()})},close({state:a,commit:r,dispatch:o},{tagName:s}){return new Promise(async l=>{let u=a.opened[0];const c=a.current===s;if(c){let f=a.opened.length;for(let h=0;h<f;h++)if(a.opened[h].fullPath===s){f>1?h===f-1?u=a.opened[h-1]:u=a.opened[h+1]:u={};break}}const d=a.opened.findIndex(f=>f.fullPath===s);if(d>=0&&a.opened.splice(d,1),r("keepAliveRefresh"),await o("opened2db"),c){const{name:f="index",params:h={},query:p={}}=u;let v={name:f,params:h,query:p};router$1.push(v,()=>{})}l()})},closeLeft({state:a,commit:r,dispatch:o},{pageSelect:s}={}){return new Promise(async l=>{const u=s||a.current;let c=0;a.opened.forEach((d,f)=>{d.fullPath===u&&(c=f)}),c>0&&a.opened.splice(1,c-1),r("keepAliveRefresh"),a.current=u,router$1.currentRoute.value.fullPath!==u&&router$1.push(u),await o("opened2db"),l()})},closeRight({state:a,commit:r,dispatch:o},{pageSelect:s}={}){return new Promise(async l=>{const u=s||a.current;let c=0;a.opened.forEach((d,f)=>{d.fullPath===u&&(c=f)}),a.opened.splice(c+1),r("keepAliveRefresh"),a.current=u,router$1.currentRoute.value.fullPath!==u&&router$1.push(u),await o("opened2db"),l()})},closeOther({state:a,commit:r,dispatch:o},{pageSelect:s}={}){return new Promise(async l=>{const u=s||a.current;let c=0;a.opened.forEach((d,f)=>{d.fullPath===u&&(c=f)}),c===0?a.opened.splice(1):(a.opened.splice(c+1),a.opened.splice(1,c-1)),r("keepAliveRefresh"),a.current=u,router$1.currentRoute.value.fullPath!==u&&router$1.push(u),await o("opened2db"),l()})},closeAll({state:a,commit:r,dispatch:o}){return new Promise(async s=>{a.opened.splice(1),r("keepAliveRefresh"),await o("opened2db"),router$1.currentRoute.value.name!=="index"&&router$1.push({name:"index"},()=>{}),s()})},updateOpened({state:a,dispatch:r},{opened:o}){return new Promise(async s=>{a.opened=o,await r("opened2db"),s()})}},mutations:{keepAliveRefresh(a){a.keepAlive=a.opened.filter(r=>isKeepAlive(r)).map(r=>r.pageName)},currentSet(a,r){a.current=r},init(a,r){const o=[];r.forEach(s=>{const{meta:l,name:u,path:c}=s;o.push({meta:l,name:u,path:c})}),a.pool=o}}},__glob_0_9=Object.freeze(Object.defineProperty({__proto__:null,default:page},Symbol.toStringTag,{value:"Module"})),user$1={namespaced:!0,state:{info:{},data:{}},actions:{set({state:a,dispatch:r},o){return new Promise(async s=>{a.info=o,await r("admin/db/set",{dbName:"sys",path:"user.info",value:o,user:!0},{root:!0}),s()})},setData({state:a,dispatch:r},o){return new Promise(async s=>{a.data=o,await r("admin/db/set",{dbName:"sys",path:"user.data",value:o,user:!0},{root:!0}),s()})},load({state:a,dispatch:r}){return new Promise(async o=>{a.info=await r("admin/db/get",{dbName:"sys",path:"user.info",defaultValue:{},user:!0},{root:!0}),a.data=await r("admin/db/get",{dbName:"sys",path:"user.data",defaultValue:{},user:!0},{root:!0}),o()})}}},__glob_0_10=Object.freeze(Object.defineProperty({__proto__:null,default:user$1},Symbol.toStringTag,{value:"Module"}));const res$j="CustomPage";var customPageApi={get(a){return service({url:`api/${res$j}/get`,method:"get",params:{id:a}})},async exportFile(a){const r=await service({url:`api/${res$j}/exportFile`,method:"post",responseType:"blob",data:{ids:a}}),o=new Blob([r],{type:"application/octet-stream"});saveAs(o,"CustomPage-"+format$3(new Date,"yyyyMMddHHmmss")+".cp")}},viewPage$1={namespaced:!0,state:{pages:{}},getters:{get:a=>r=>a.pages[r]},actions:{async load({state:a},r){if(r in a.pages)return a.pages[r];{let o=await customPageApi.get(r);return o&&(a.pages[r]=o),o}}}},__glob_0_11=Object.freeze(Object.defineProperty({__proto__:null,default:viewPage$1},Symbol.toStringTag,{value:"Module"}));const files$1={"./modules/account.js":__glob_0_0,"./modules/cache.js":__glob_0_1,"./modules/dataView.js":__glob_0_2,"./modules/db.js":__glob_0_3,"./modules/i18n.js":__glob_0_4,"./modules/layout.js":__glob_0_5,"./modules/loader.js":__glob_0_6,"./modules/log.js":__glob_0_7,"./modules/menu.js":__glob_0_8,"./modules/page.js":__glob_0_9,"./modules/user.js":__glob_0_10,"./modules/viewPage.js":__glob_0_11},modules={};Object.keys(files$1).forEach(a=>{modules[a.replace(/(\.\/modules\/|\.js)/g,"")]=files$1[a].default});var admin={namespaced:!0,modules},store=createStore({modules:{admin}}),dynamic={async init(a,r){let o=await permissionApi.queryRouter();const s=a.getRoutes().find(l=>l.path=="/");o.forEach(l=>{var u;if(l.isCustomPage&&(l.url+="?id="+l.customPageID,l.customPage.customPageTemplate&&(l.templateUrl="template/"+l.customPage.customPageTemplate.substr(0,1).toLowerCase()+l.customPage.customPageTemplate.substr(1)+".vue")),(l.templateUrl||"").trim()){const c=((u=l.url)==null?void 0:u.split("?")[0])||"",d=c.replace(/\//g,"-"),f={};l.url&&l.url.split("?").length>1&&l.url.split("?")[1].split("&").forEach(h=>{h.split("=").length>1&&h.split("=")[0].length>0&&(f[h.split("=")[0]]=h.split("=")[1])}),s.children.push({path:c,name:d,meta:{title:getNameI18n(l),description:getDescI18n(l),data:f,auth:!0,cache:!0},component:()=>new Promise(h=>{h(r[l.templateUrl])})})}}),a.removeRoute("root"),a.addRoute(s),a.addRoute({path:"/:pathMatch(.*)",name:"404",meta:{title:"404"},component:()=>new Promise(l=>{l(r["system/error/404.vue"])})})}};function getNameI18n(a){if(Setting.layout.showI18n){let r="Permission_"+a.url.split("?")[0],o=window.$app.$t(r);return o==r?a.name:o}else return a.name}function getDescI18n(a){if(Setting.layout.showI18n){let r="Permission_"+a.url.split("?")[0]+"_SubName",o=window.$app.$t(r);return o==r?a.subName:o}else return a.subName}const base$1=window.$base||"admin",router=createRouter({history:Setting.routerMode==="history"?createWebHistory(base$1):Setting.routerMode==="hash"?createWebHashHistory(base$1):createMemoryHistory(base$1),routes:[]});let inited=!1;const initRouter=(a,r)=>{r.forEach(o=>{router.addRoute(o)}),Setting.rootPath=base$1==""||base$1==null?"/static/":"/"+base$1+"/static/",router.beforeEach(async(o,s,l)=>{if(Setting.showProgressBar&&ViewUIPlus__default.default.LoadingBar.start(),store.dispatch("admin/menu/setMenuList",o),!inited)await dynamic.init(router,a),store.commit("admin/page/init",router.getRoutes()),store.dispatch("admin/page/openedLoad",{loadOpenedTabs:!0},{root:!0}),inited=!0,l({...o,replace:!0});else if(o.matched.some(u=>u.meta.auth)){const u=util$8.cookies.get("token");if(u&&u!=="undefined"){const c=store.getters["admin/menu/permission"];c[o.fullPath.substring(1)]||c[o.fullPath.split("?")[0].substring(1)]?l():l({name:"home"})}else l({name:"login",query:{redirect:o.fullPath}})}else l()}),router.afterEach(o=>{Setting.showProgressBar&&ViewUIPlus__default.default.LoadingBar.finish(),Setting.layout.tabs&&store.dispatch("admin/page/open",o),window.document.title=window.$app.$t(o.meta.title)+" - "+Setting.info.title,window.scrollTo(0,0)})};var router$1=router,mixinPage={data(){return{grid4:{xxl:4,xl:4,lg:4,md:6,sm:12,xs:24},grid6:{xxl:6,xl:6,lg:8,md:12,sm:12,xs:24},grid8:{xxl:8,xl:8,lg:8,md:12,sm:24,xs:24},grid12:{xxl:12,xl:12,lg:12,md:12,sm:24,xs:24},grid16:{xxl:16,xl:16,lg:16,md:24,sm:24,xs:24},grid18:{xxl:18,xl:18,lg:18,md:24,sm:24,xs:24},grid24:{xxl:24,xl:24,lg:24,md:24,sm:24,xs:24}}},computed:{...mapState("admin/user",["info"]),...mapState("admin/cache",["userNames","enums","dicts","caches"]),...mapState("admin/menu",["userPermissions"]),rootPath(){return Setting.rootPath},sysInfo(){return Setting.info},layout(){return Setting.layout},apiBaseURL(){return window.$mode==="development"?Setting.apiBaseURL.dev:Setting.apiBaseURL.prd},uploadURL(){return this.apiBaseURL+"api/Attachment/add"},uploadHeaders(){const a=util$8.cookies.get("token");return{Authorization:"Bearer "+a}}},methods:{...mapActions("admin/cache",["loadEnum","loadDict","loadUserName","loadCache"]),...mapMutations("admin/loader",{enableLoader:"enable"}),...mapMutations("admin/loader",{disableLoader:"disable"}),copy(a){return lodash$1.exports.cloneDeep(a)},allow(a){if(a.startsWith("permission/"))return this.userPermissions[a];{let r=router$1.currentRoute.value.fullPath.substr(1).split("?")[0];if(this.userPermissions[r+"$"+a]==!0)return!0;let o=Object.keys(this.userPermissions).filter(s=>s.startsWith(r+"$")).length;return this.userPermissions[r]==!0&&o==0}},getCache(a,r){return this.loadCache(a),this.caches[a].find(o=>o.id==r)},getCacheList(a){return this.loadCache(a),this.caches[a]},getEnum(a,r){return this.loadEnum(a),r==null?null:this.layout.showI18n?this.$t("Enum_"+a+"_"+r):this.enums[a][r]},getEnumList(a){return this.loadEnum(a),Object.keys(this.enums[a]).map(r=>this.layout.showI18n?{id:r,name:this.$t("Enum_"+a+"_"+r)}:{id:r,name:this.enums[a][r]})},getDict(a,r){return this.loadDict(a),r==null?null:this.layout.showI18n?this.$t("Dict_"+a+"_"+r):this.dicts[a][r]},getDictList(a){return this.loadDict(a),Object.keys(this.dicts[a]).map(r=>this.layout.showI18n?{id:r,name:this.$t("Dict_"+a+"_"+r)}:{id:r,name:this.dicts[a][r]})},getUserName(a){return this.loadUserName(a),this.userNames[a]},getAttachmentUrl(a,r){return a?a.startsWith("http")?a:this.apiBaseURL+"api/Attachment/get?file="+encodeURIComponent(a)+"&name="+encodeURIComponent(r):null},fileDownload(a,r){let o=this.getAttachmentUrl(a,r);o&&(window.location.href=o)},getImgUrl(a){return a?a.startsWith("http")?a:this.apiBaseURL+"api/Attachment/getImage?file="+encodeURIComponent(a):this.rootPath+"images/no-image.png"},showData(a,r){let o=r.code,s=r.dataType,l=r.displayFormat,u=r.digit,c=r.fixedDigit;if(!s)return null;if(s.startsWith("Enum:"))return this.getEnum(s.replace("Enum:",""),this.parseData(a,o));if(s==="BigInteger"&&l=="User")return this.getUserName(this.parseData(a,o));let d=this.parseData(a,o);if(d==null)return null;if(s==="DateTime")return(l||"").trim()?format$3(new Date(d),l):format$3(new Date(d),"yyyy-MM-dd");if(s==="Integer")if((l||"").trim()){let f=null;try{f=format$3(new Date(d*1e3),l)}catch(h){console.log(h,d)}return f}else return d;else{if(s==="Decimal"||s==="Float"||s==="Double")return d=parseFloat(d),l==="Money"?this.formatThousand(d.toFixed(2)):l==="Thousand"?this.formatThousand(this.keepDecimal(d,u,c)):l==="Percent"?this.keepDecimal(d,u,c)+"%":this.keepDecimal(d,u,c);if(s==="Boolean")return l==="Y"?d?'<i class="fa fa-check info"></i>':"":l==="YN"?d?'<i class="fa fa-check"></i>':'<i class="fa fa-times"></i>':l==="Disabled"?d?'<i class="fa fa-ban error"></i>':"":l==="Valid"?d?'<i class="fa fa-check success"></i>':"":l==="Attention"?d?'<i class="fa fa-exclamation error"></i>':"":d?'<i class="fa fa-check info"></i>':"";if(s==="String")if(l==="Array"){let f="";try{f=JSON.parse(d).join(", ")}catch(h){console.log(h,d)}return f}else if((l||"").trim()){let f=null;try{f=format$3(new Date(parseInt(d)*1e3),l)}catch(h){console.log(h,d)}return f}else return this.tParam(this.showMultiLine(d));else return d}},showMultiLine(a){return typeof a=="string"?a.replaceAll(" "," ").replaceAll(`
|
|
153
153
|
`,"<br/>"):a},parseData(a,r){return lodash$1.exports.get(a,r)},setData(a,r,o){lodash$1.exports.set(a,r,o)},parseDateTimeData(a,r){let o=this.parseData(a,r);return o==null?"":o},parseArrayData(a,r){let o=[],s=this.parseData(a,r);return this.isJSON(s)&&(o=JSON.parse(s)),o},setArrayData(a,r,o){console.log("setArrayData",r,o);let s="";o!=null&&(s=JSON.stringify(o)),this.setData(a,r,s)},parseDateRangeData(a,r){let o=[],s=this.parseData(a,r);return this.isJSON(s)&&(o=JSON.parse(s),o[0]=new Date(o[0]),o[1]=new Date(o[1])),o},getTriggers(a){let r=[],o="";for(let s=0;s<a.length;s++)a[s]==" "||a[s]=="+"||a[s]=="-"||a[s]=="*"||a[s]=="/"||a[s]=="("||a[s]==")"||a[s]==">"||a[s]=="<"||a[s]=="!"||a[s]=="&"||a[s]=="|"||a[s]=="="?(o||"").trim()&&(r.push(o),o=""):o+=a[s];return(o||"").trim()&&(o.indexOf(".")>=0?r.push(o.split(".")[0]+"ID"):r.push(o)),r},calculate(text,model){if(text==null)return null;text=text.toString();let result="",expression="";for(let a=0;a<text.length;a++)if(text[a]==" "||text[a]=="+"||text[a]=="-"||text[a]=="*"||text[a]=="/"||text[a]=="("||text[a]==")"||text[a]==">"||text[a]=="<"||text[a]=="!"||text[a]=="|"||text[a]=="&"||text[a]=="="||a==text.length-1){if(a==text.length-1&&(expression+=text[a]),(expression||"").trim()){if(!isNaN(expression)||expression.substr(0,1)=="'"||expression.substr(0,1)=='"'||expression=="null")result+=expression;else{let r=this.parseData(model,expression);r==null||typeof r=="object"?result+=expression:isNaN(r)||r.toString().length>16?result+="'"+String(r)+"'":result+=String(r)}expression=""}a!=text.length-1&&(result+=text[a])}else expression+=text[a];let data=null;try{console.log("expression",text,result),data=eval(result),(data!="NaN"&&String(data)=="NaN"||typeof data=="number"&&(String(data)=="Infinity"||String(data)=="-Infinity"))&&(data=null)}catch(a){}return data},judgeCondition(a,r){if(!a)return!1;if(a.type=="Condition"){for(let o=0;o<a.condition.length;o++){let s=this.parseData(r,a.condition[o].code);s==null&&(s="null");let l=a.condition[o].value;l==null&&(l="");let u=a.condition[o].operator,c=!1;if(u=="Equal"?c=l.split(",").some(d=>String(s)==d):u=="Contains"?c=l.split(",").some(d=>String(s).indexOf(d)!=-1):u=="GreaterThan"?c=s>l:u=="LessThan"?c=s<l:u=="GreaterThanOrEqual"?c=s>=l:u=="LessThanOrEqual"?c=s<=l:u=="NotEqual"&&(c=l.split(",").every(d=>String(s)!=d)),!c)return!1}return!0}else if(a.type=="Expression")return this.calculate(a.expression,r)==!0},confirm(a,r){let o=Swal.fire({title:this.tParam(a),icon:"question",confirmButtonText:this.$t("Front_Btn_OK"),cancelButtonText:this.$t("Front_Btn_Cancel"),showCancelButton:!0});return o.then(s=>{s.value&&typeof r=="function"&&r()}),o},confirmInput(a,r,o,s){let l=Swal.fire({title:this.tParam(a),input:"text",confirmButtonText:this.$t("Front_Btn_OK"),cancelButtonText:this.$t("Front_Btn_Cancel"),inputPlaceholder:r,icon:"question",showCancelButton:!0,preConfirm:s});return l.then(u=>{u.value&&typeof o=="function"&&o()}),l},success(a,r){if(Setting.layout.alertStyle=="Message")this.$Message.success({content:this.tParam(a)}),typeof r=="function"&&r();else if(Setting.layout.alertStyle=="Notice")this.$Notice.success({title:this.tParam(a)}),typeof r=="function"&&r();else{var o=Swal.fire({title:this.tParam(a),icon:"success",confirmButtonText:this.$t("Front_Btn_OK")});return o.then(()=>{typeof r=="function"&&r()}),o}},warning(a,r){if(Setting.layout.alertStyle=="Message")this.$Message.warning({content:this.tParam(a),duration:5,closable:!0}),typeof r=="function"&&r();else if(Setting.layout.alertStyle=="Notice")this.$Notice.warning({title:this.tParam(a),duration:5,closable:!0}),typeof r=="function"&&r();else{var o=Swal.fire({title:this.tParam(a),icon:"warning",confirmButtonText:this.$t("Front_Btn_OK")});return o.then(()=>{typeof r=="function"&&r()}),o}},error(a,r){if(Setting.layout.alertStyle=="Message")this.$Message.error({content:this.tParam(a),duration:5,closable:!0}),typeof r=="function"&&r();else if(Setting.layout.alertStyle=="Notice")this.$Notice.error({title:this.tParam(a),duration:5,closable:!0}),typeof r=="function"&&r();else{var o=Swal.fire({title:this.tParam(a),icon:"error",confirmButtonText:this.$t("Front_Btn_OK")});return o.then(()=>{typeof r=="function"&&r()}),o}},getHyperlink(a,r){for(;r.indexOf("{")>=0;){let o=r.indexOf("{"),s=r.indexOf("}"),l=r.substring(o+1,s);r=r.substring(0,o)+this.parseData(a,l)+r.substring(s+1)}return r},keepDecimal(a,r,o){if(r==null)return a;let s=parseFloat(a);return isNaN(s)||isNaN(r)?null:o?s.toFixed(r):Math.round(a*Math.pow(10,r))/Math.pow(10,r)},formatThousand(a){if(a==null)return a;let o=Math.trunc(a).toString().replace(/(\d)(?=(?:\d{3})+$)/g,"$1,"),s=a.toString().split(".");return s.length===2?o+"."+s[1].toString():o},resetNotice(){this.getNotice(this).init()},getNotice(a){return a.$refs.notice!=null?a.$refs.notice:a.$parent!=null?this.getNotice(a.$parent):null},isJSON(a){if(typeof a=="string"&&!!(a||"").trim())try{var r=JSON.parse(a);return!!(typeof r=="object"&&r)}catch{return!1}else return!1},tParam(a){if(a==null)return null;let o=a.toString().split("|"),s=o[0];return o.shift(),this.$t(s,o)}}};const _sfc_main$1r={name:"notice-list",mixins:[mixinPage],components:{},data(){return{opened:!1,data:{}}},computed:{},async mounted(){},methods:{show(a){this.data=a,this.opened=!0}}},_hoisted_1$1c={class:"ivu-pl-8"},_hoisted_2$K=["onClick"],_hoisted_3$E={class:"title"},_hoisted_4$t=require$$0.createElementVNode("span",{class:"description"},null,-1),_hoisted_5$j={style:{margin:"16px","max-height":"500px"}},_hoisted_6$f=["innerHTML"];function _sfc_render$1r(a,r,o,s,l,u){const c=require$$0.resolveComponent("Avatar"),d=require$$0.resolveComponent("view-table"),f=require$$0.resolveComponent("Card"),h=require$$0.resolveComponent("Button"),p=require$$0.resolveComponent("Modal"),v=require$$0.resolveDirective("color"),g=require$$0.resolveDirective("bg-color");return require$$0.openBlock(),require$$0.createElementBlock("div",null,[require$$0.createVNode(f,{bordered:!1,padding:6,class:"ivu-mb"},{title:require$$0.withCtx(()=>[require$$0.createElementVNode("div",null,[require$$0.withDirectives(require$$0.createVNode(c,{icon:"md-apps",style:{"font-size":"10px"},size:"small"},null,512),[[v,"#1890ff"],[g,"#e6f7ff"]]),require$$0.createElementVNode("span",_hoisted_1$1c,require$$0.toDisplayString(a.$t("Front_Label_Notice")),1)])]),default:require$$0.withCtx(()=>[require$$0.createVNode(d,{style:{height:"250px"},height:200,"view-code":"NoticeModal"},{column:require$$0.withCtx(({row:y,column:$,code:_})=>[_=="title"?(require$$0.openBlock(),require$$0.createElementBlock("a",{key:0,href:"#",onClick:C=>u.show(y)},require$$0.toDisplayString(a.showData(y,$)),9,_hoisted_2$K)):require$$0.createCommentVNode("v-if",!0)]),_:1})]),_:1}),require$$0.createVNode(p,{modelValue:l.opened,"onUpdate:modelValue":r[1]||(r[1]=y=>l.opened=y),scrollable:"","mask-closable":a.layout.maskClosable,draggable:a.layout.draggable,sticky:!0,"reset-drag-position":!0,width:800},{header:require$$0.withCtx(()=>[require$$0.createElementVNode("div",null,[require$$0.renderSlot(a.$slots,"header",{},()=>[require$$0.createElementVNode("span",_hoisted_3$E,require$$0.toDisplayString(l.data.title),1),_hoisted_4$t])])]),footer:require$$0.withCtx(()=>[require$$0.createElementVNode("div",null,[require$$0.createVNode(h,{type:"default","custom-icon":"fa fa-times",onClick:r[0]||(r[0]=y=>l.opened=!1)},{default:require$$0.withCtx(()=>[require$$0.createTextVNode(require$$0.toDisplayString(a.$t("Front_Btn_Close")),1)]),_:1})])]),default:require$$0.withCtx(()=>[require$$0.createElementVNode("div",_hoisted_5$j,[require$$0.createElementVNode("div",{innerHTML:l.data.content},null,8,_hoisted_6$f)])]),_:3},8,["modelValue","mask-closable","draggable"])])}var noticeList=_export_sfc(_sfc_main$1r,[["render",_sfc_render$1r],["__file","D:/Project/Mooho/FrontEnd/mooho-base-admin-plus/src/components/home/notice-list.vue"]]),__glob_25_1=Object.freeze(Object.defineProperty({__proto__:null,default:noticeList},Symbol.toStringTag,{value:"Module"}));const res$i="Shortcut";var shortcutApi={queryMy(){return service({url:`api/${res$i}/queryMy`,method:"post",data:{}})},save(a){return service({url:`api/${res$i}/save`,method:"post",data:a})}},shortcut_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$1q={name:"home",mixins:[mixinPage],components:{},data(){return{shortcuts:[],colors:["#69C0FF","#95DE64","#FFD666","#FF9C6E","#B37FEB","#5CDBD3","#DC143C","#FF85C0","#FFC069"]}},async mounted(){const a=await shortcutApi.queryMy();this.shortcuts=a},methods:{async setting(){let a=this.copy(this.shortcuts);this.$refs.shortcutSetting.loadData(a),this.$refs.shortcutSetting.open()},up(a,r){let o=this.$refs.shortcutSetting.data;r>0&&(o.splice(r,1),o.splice(r-1,0,a),this.$refs.shortcutSetting.loadData(o))},down(a,r){let o=this.$refs.shortcutSetting.data;r<o.length-1&&(o.splice(r,1),o.splice(r+1,0,a),this.$refs.shortcutSetting.loadData(o))},dragDrop({index1:a,index2:r}){if(a!=r){let o=this.$refs.shortcutSetting.data,s=o[a];o.splice(a,1),o.splice(r,0,s)}},remove(a,r){let o=this.$refs.shortcutSetting.data;o.splice(r,1),this.$refs.shortcutSetting.loadData(o)},save(){this.confirm("Front_Msg_Sure_To_Save_Setting",async()=>{let a=this.$refs.shortcutSetting.data;const r=await shortcutApi.save(a);this.success("Front_Msg_Success",()=>{this.shortcuts=r,this.$refs.shortcutSetting.close()})})}}},_hoisted_1$1b={class:"ivu-pl-8"},_hoisted_2$J={class:"ivu-text-center",style:{height:"250px"}},_hoisted_3$D={class:"ivu-pt-8"};function _sfc_render$1q(a,r,o,s,l,u){const c=require$$0.resolveComponent("Avatar"),d=require$$0.resolveComponent("Icon"),f=require$$0.resolveComponent("Tooltip"),h=require$$0.resolveComponent("i-link"),p=require$$0.resolveComponent("GridItem"),v=require$$0.resolveComponent("Grid"),g=require$$0.resolveComponent("Card"),y=require$$0.resolveComponent("Button"),$=require$$0.resolveComponent("modal-table"),_=require$$0.resolveDirective("color"),C=require$$0.resolveDirective("bg-color");return require$$0.openBlock(),require$$0.createElementBlock("div",null,[require$$0.createVNode(g,{bordered:!1,padding:6,class:"ivu-mb"},{title:require$$0.withCtx(()=>[require$$0.createElementVNode("div",null,[require$$0.withDirectives(require$$0.createVNode(c,{icon:"md-apps",size:"small"},null,512),[[_,"#1890ff"],[C,"#e6f7ff"]]),require$$0.createElementVNode("span",_hoisted_1$1b,require$$0.toDisplayString(a.$t("Front_Label_Shortcut")),1)])]),extra:require$$0.withCtx(()=>[require$$0.createElementVNode("div",null,[require$$0.createVNode(f,{placement:"top",content:a.$t("Front_Label_Setting")},{default:require$$0.withCtx(()=>[require$$0.createVNode(d,{type:"md-settings",style:{cursor:"pointer"},onClick:r[0]||(r[0]=b=>u.setting())})]),_:1},8,["content"])])]),default:require$$0.withCtx(()=>[require$$0.createElementVNode("div",_hoisted_2$J,[require$$0.createVNode(v,{col:3,border:!1,padding:"8px"},{default:require$$0.withCtx(()=>[(require$$0.openBlock(!0),require$$0.createElementBlock(require$$0.Fragment,null,require$$0.renderList(l.shortcuts,(b,w)=>(require$$0.openBlock(),require$$0.createBlock(p,{key:b.id,class:"ivu-mb"},{default:require$$0.withCtx(()=>[require$$0.createVNode(h,{class:"shortcut",to:b.permission.url},{default:require$$0.withCtx(()=>[require$$0.createVNode(d,{custom:b.permission.icon,color:l.colors[w],size:"24"},null,8,["custom","color"]),require$$0.createElementVNode("p",_hoisted_3$D,require$$0.toDisplayString(a.layout.showNotice?a.$t("Permission_"+b.permission.url.split("?")[0]):b.permission.name),1)]),_:2},1032,["to"])]),_:2},1024))),128))]),_:1})])]),_:1}),require$$0.createVNode($,{ref:"shortcutSetting","view-code":"ShortcutSetting",static:!0,"footer-enable":!0,draggable:!0,sticky:!0,embedded:!0,onOnDragDrop:u.dragDrop},{command:require$$0.withCtx(({row:b,index:w})=>[require$$0.createVNode(y,{size:"small",title:a.$t("Front_Btn_Up"),type:"primary",ghost:"","custom-icon":"fa fa-chevron-up",onClick:x=>u.up(b,w)},null,8,["title","onClick"]),require$$0.createVNode(y,{size:"small",title:a.$t("Front_Btn_Down"),type:"primary",ghost:"","custom-icon":"fa fa-chevron-down",onClick:x=>u.down(b,w)},null,8,["title","onClick"]),require$$0.createVNode(y,{size:"small",title:a.$t("Front_Btn_Remove"),type:"primary",ghost:"","custom-icon":"fa fa-times",onClick:x=>u.remove(b,w)},null,8,["title","onClick"])]),footer:require$$0.withCtx(()=>[require$$0.createVNode(y,{type:"primary","custom-icon":"fa fa-save",onClick:u.save},{default:require$$0.withCtx(()=>[require$$0.createTextVNode(require$$0.toDisplayString(a.$t("Front_Btn_Save")),1)]),_:1},8,["onClick"])]),_:1},8,["onOnDragDrop"])])}var shortcut=_export_sfc(_sfc_main$1q,[["render",_sfc_render$1q],["__scopeId","data-v-a9e726d4"],["__file","D:/Project/Mooho/FrontEnd/mooho-base-admin-plus/src/components/home/shortcut.vue"]]),__glob_25_2=Object.freeze(Object.defineProperty({__proto__:null,default:shortcut},Symbol.toStringTag,{value:"Module"}));const _sfc_main$1p={mixins:[mixinPage],data(){return{model:[]}},created(){},props:{modelValue:{type:String},dataSource:{type:Array,default:()=>[]},size:{type:String},valueKey:{type:String},labelKey:{type:String},readonly:{type:Boolean,default:!1}},watch:{modelValue(a){this.model.length=0;let r=[];!!(this.modelValue||"").trim()&&JSON.parse(this.modelValue)instanceof Array&&(r=JSON.parse(this.modelValue));for(let o of this.dataSource)r.some(s=>s==o[this.valueKey])?this.model.push(!0):this.model.push(!1)}},methods:{change(a){let r=[];for(let o in this.model)this.model[o]&&r.push(this.dataSource[o][this.valueKey]);this.$emit("update:modelValue",JSON.stringify(r)),this.$emit("on-change")}}};function _sfc_render$1p(a,r,o,s,l,u){const c=require$$0.resolveComponent("Checkbox");return require$$0.openBlock(),require$$0.createElementBlock("div",null,[(require$$0.openBlock(!0),require$$0.createElementBlock(require$$0.Fragment,null,require$$0.renderList(o.dataSource,(d,f)=>(require$$0.openBlock(),require$$0.createBlock(c,{key:f,modelValue:l.model[f],"onUpdate:modelValue":h=>l.model[f]=h,disabled:o.readonly,onOnChange:h=>u.change(f)},{default:require$$0.withCtx(()=>[require$$0.createTextVNode(require$$0.toDisplayString(d[o.labelKey]),1)]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onOnChange"]))),128))])}var CheckGroup=_export_sfc(_sfc_main$1p,[["render",_sfc_render$1p],["__file","D:/Project/Mooho/FrontEnd/mooho-base-admin-plus/src/components/input/check-group.vue"]]),__glob_25_3=Object.freeze(Object.defineProperty({__proto__:null,default:CheckGroup},Symbol.toStringTag,{value:"Module"}));const res$h="CustomModel";var customModelApi={add(a,r){return service({url:`api/${res$h}/add`,method:"post",data:{modelName:a,model:r}})},update(a,r){return service({url:`api/${res$h}/update`,method:"put",data:{modelName:a,model:r}})},remove(a,r){return service({url:`api/${res$h}/remove`,method:"delete",data:{modelName:a,id:r}})},batchSave(a,r){return service({url:`api/${res$h}/batchSave`,method:"post",data:{modelName:a,data:r}})},get(a,r){return service({url:`api/${res$h}/get`,method:"get",params:{modelName:a,id:r}})},query(a,r){let o=r.isGroupBy?"group":"query";return service({url:`api/${res$h}/${o}`,method:"post",data:{...r,modelName:a}})},async exportExcel(a,r){let o={...r,modelName:a.model,per:1e5,returnType:1,viewCode:a.code},s;a.isGroupBy?(o.groupColumn=JSON.parse(a.groupColumn),o.groupMethod=JSON.parse(a.groupMethod),s=await service({url:`api/${res$h}/group`,method:"post",responseType:"blob",data:o})):s=await service({url:`api/${res$h}/query`,method:"post",responseType:"blob",data:o});const l=new Blob([s],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});saveAs(l,a.name+"-"+format$3(new Date,"yyyyMMddHHmmss")+".xlsx")},async exportPdf(a,r){let o={...r,modelName:a.model,per:1e5,returnType:3,viewCode:a.code},s;a.isGroupBy?(o.groupColumn=JSON.parse(a.groupColumn),o.groupMethod=JSON.parse(a.groupMethod),s=await service({url:`api/${res$h}/group`,method:"post",responseType:"blob",data:o})):s=await service({url:`api/${res$h}/query`,method:"post",responseType:"blob",data:o});const l=new Blob([s],{type:"application/pdf"});saveAs(l,a.name+"-"+format$3(new Date,"yyyyMMddHHmmss")+".pdf")},async printList(a,r,o=!0){const s=lodop.getLodop();let l={...r,modelName:a.model,per:1e3,returnType:2,viewCode:a.code},u;a.isGroupBy?(l.groupColumn=JSON.parse(a.groupColumn),l.groupMethod=JSON.parse(a.groupMethod),u=await service({url:`api/${res$h}/group`,method:"post",data:l})):u=await service({url:`api/${res$h}/query`,method:"post",data:l}),s.PRINT_INIT("Print"),o?(s.ADD_PRINT_TABLE("4%","3%","94%","90%",u),s.SET_PRINT_PAGESIZE(2,0,0,"A4")):(s.ADD_PRINT_TABLE("4%","3%","94%","90%",u),s.SET_PRINT_PAGESIZE(1,0,0,"A4")),s.PRINTA()}};const res$g="DataSource";var dataSourceApi={query(a,r){return service({url:`api/${res$g}/query`,method:"post",data:{...r,dataSource:a}})},async exportExcel(a,r,o="query"){let s={...r,per:1e5,returnType:1,viewCode:a.code,dataSource:a.dataSource};const l=await service({url:`api/${res$g}/${o}`,method:"post",responseType:"blob",data:s}),u=new Blob([l],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});saveAs(u,a.name+"-"+format$3(new Date,"yyyyMMddHHmmss")+".xlsx")},async exportPdf(a,r,o="query"){let s={...r,per:1e5,returnType:3,viewCode:a.code,dataSource:a.dataSource};const l=await service({url:`api/${res$g}/${o}`,method:"post",responseType:"blob",data:s}),u=new Blob([l],{type:"application/pdf"});saveAs(u,a.name+"-"+format$3(new Date,"yyyyMMddHHmmss")+".pdf")},async printList(a,r,o=!0,s="query"){const l=lodop.getLodop();let u={...r,per:1e3,returnType:2,viewCode:a.code,dataSource:a.dataSource};const c=await service({url:`api/${res$g}/${s}`,method:"post",data:u});l.PRINT_INIT("Print"),o?(l.ADD_PRINT_TABLE("4%","3%","94%","90%",c),l.SET_PRINT_PAGESIZE(2,0,0,"A4")):(l.ADD_PRINT_TABLE("4%","3%","94%","90%",c),l.SET_PRINT_PAGESIZE(1,0,0,"A4")),l.PRINTA()}};const _sfc_main$1o={mixins:[mixinPage],data(){return{selected:null,selectedData:null,dialogActive:!1,loadDataEnable:!0}},props:{modelValue:{type:String},source:{type:String},size:{type:String},sourceDataCode:{type:String},sourceDisplayCode:{type:String},param:{type:Object,default:()=>({})},readonly:{type:Boolean,default:!1},controlWidth:{type:Number},multi:{type:Boolean,default:!1}},computed:{},watch:{modelValue(){this.showSelected()}},mounted(){this.showSelected()},methods:{...mapActions("admin/dataView",{loadDataView:"load"}),showSelected(){if(this.modelValue==null){this.selected=null,this.selectedData=null;return}else if(this.multi){if(!this.isJSON(this.modelValue)){this.selected=null,this.selectedData=null;return}let a={page:1,per:999};a[this.sourceDataCode]=JSON.parse(this.modelValue).join(","),this.loadDataView(this.source).then(async r=>{if(r.dataView.isCustom){let o=await customModelApi.query(r.dataView.model,a);o.data.length>0&&(this.selected=o.data.map(s=>this.parseData(s,this.sourceDisplayCode)).join(","),this.selectedData=o.data)}else if(r.dataView.isDataSource){let o=await dataSourceApi.query(r.dataView.dataSource,a);o.table.length>0&&(this.selected=o.table.map(s=>this.parseData(s,this.sourceDisplayCode)).join(","),this.selectedData=o.table)}else{let o=await modelApi.query(r.dataView.model,a);o.data.length>0&&(this.selected=o.data.map(s=>this.parseData(s,this.sourceDisplayCode)).join(","),this.selectedData=o.data)}})}else{let a={page:1,per:1};a[this.sourceDataCode]=this.modelValue,this.loadDataView(this.source).then(async r=>{if(r.dataView.isCustom){let o=await customModelApi.query(r.dataView.model,a);o.data.length>0&&(this.selected=this.parseData(o.data[0],this.sourceDisplayCode),this.selectedData=o.data[0])}else if(r.dataView.isDataSource){let o=await dataSourceApi.query(r.dataView.dataSource,a);o.table.length>0&&(this.selected=this.parseData(o.table[0],this.sourceDisplayCode),this.selectedData=o.table[0])}else{let o=await modelApi.query(r.dataView.model,a);o.data.length>0&&(this.selected=this.parseData(o.data[0],this.sourceDisplayCode),this.selectedData=o.data[0])}})}},dialogSelectOpen(){!this.readonly&&this.source&&(this.dialogActive=!0,setTimeout(async()=>{this.multi&&(this.selectedData!=null?this.$refs.dialogTable.setSelected(this.selectedData):this.$refs.dialogTable.setSelected([])),this.param?this.loadDataEnable=!0:this.loadDataEnable=!1,this.$refs.dialogTable.open(this.param)}))},dialogCheck(a){this.$emit("update:modelValue",this.parseData(a,this.sourceDataCode)),this.selected=this.parseData(a,this.sourceDisplayCode),this.selectedData=a,this.$emit("on-change",a),this.$refs.dialogTable.close()},dialogSelectRemove(){this.$emit("update:modelValue",null),this.selected=null,this.selectedData=null,this.$emit("on-change")},multiSave(){let a=this.$refs.dialogTable.getSelected(),r=a.length==0?null:a.map(s=>this.parseData(s,this.sourceDataCode)),o=a.length==0?null:a.map(s=>this.parseData(s,this.sourceDisplayCode)).join(",");this.$emit("update:modelValue",JSON.stringify(r)),this.selected=o,this.selectedData=r,this.$emit("on-change",r),this.$refs.dialogTable.close()},close(){this.$refs.dialogTable.close()}}};function _sfc_render$1o(a,r,o,s,l,u){const c=require$$0.resolveComponent("Button"),d=require$$0.resolveComponent("Input"),f=require$$0.resolveComponent("modal-table");return require$$0.openBlock(),require$$0.createElementBlock("div",null,[require$$0.createVNode(d,{type:"text",size:o.size,readonly:"",clearable:!o.readonly,modelValue:l.selected,"onUpdate:modelValue":r[1]||(r[1]=h=>l.selected=h),style:require$$0.normalizeStyle({width:o.controlWidth==null?null:o.controlWidth+"px"}),onOnFocus:r[2]||(r[2]=h=>u.dialogSelectOpen()),onOnClear:r[3]||(r[3]=h=>u.dialogSelectRemove())},{prepend:require$$0.withCtx(()=>[require$$0.createVNode(c,{size:o.size,"custom-icon":"fa fa-search",onClick:r[0]||(r[0]=h=>u.dialogSelectOpen())},null,8,["size"])]),_:1},8,["size","clearable","modelValue","style"]),l.dialogActive?(require$$0.openBlock(),require$$0.createBlock(f,{key:0,ref:"dialogTable","view-code":o.source,selectEnable:o.multi,"check-cross-page":!0,"footer-enable":o.multi,"load-data-enable":l.loadDataEnable},{command:require$$0.withCtx(({row:h})=>[o.multi?require$$0.createCommentVNode("v-if",!0):(require$$0.openBlock(),require$$0.createBlock(c,{key:0,size:"small",type:"primary","custom-icon":"fa fa-check",onClick:p=>u.dialogCheck(h)},{default:require$$0.withCtx(()=>[require$$0.createTextVNode(require$$0.toDisplayString(a.$t("Front_Btn_Select")),1)]),_:2},1032,["onClick"]))]),footer:require$$0.withCtx(()=>[require$$0.createVNode(c,{type:"primary","custom-icon":"fa fa-save",onClick:u.multiSave},{default:require$$0.withCtx(()=>[require$$0.createTextVNode(require$$0.toDisplayString(a.$t("Front_Btn_OK")),1)]),_:1},8,["onClick"]),require$$0.createVNode(c,{type:"default","custom-icon":"fa fa-times",onClick:r[4]||(r[4]=h=>u.close())},{default:require$$0.withCtx(()=>[require$$0.createTextVNode(require$$0.toDisplayString(a.$t("Front_Btn_Close")),1)]),_:1})]),_:1},8,["view-code","selectEnable","footer-enable","load-data-enable"])):require$$0.createCommentVNode("v-if",!0)])}var DialogSelect=_export_sfc(_sfc_main$1o,[["render",_sfc_render$1o],["__file","D:/Project/Mooho/FrontEnd/mooho-base-admin-plus/src/components/input/dialog-select.vue"]]),__glob_25_4=Object.freeze(Object.defineProperty({__proto__:null,default:DialogSelect},Symbol.toStringTag,{value:"Module"}));const _sfc_main$1n={mixins:[mixinPage],data(){return{opened:!1,sourceFilter:{}}},created(){},props:{sourceViewCode:{type:String},targetViewCode:{type:String},title:{type:String,default:"\u660E\u7EC6\u9009\u62E9"},description:{type:String,default:"Item Select"}},computed:{},methods:{init(a,r,o){this.$refs.selectSourceTable.init(a,()=>{this.$refs.selectTargetTable.init(r,()=>{this.setSelected([]),typeof o=="function"&&o()})})},open(){this.opened=!0},close(){this.opened=!1},getSelected(){return this.$refs.selectTargetTable.data},setSelected(a){this.$refs.selectTargetTable.inited&&this.$refs.selectTargetTable.loadData(a),this.$refs.selectSourceTable.inited&&this.$refs.selectSourceTable.setSelected(a)},loadSource(a){for(let r in this.sourceFilter)delete this.sourceFilter[r];if(a)for(let r in a)this.sourceFilter[r]=a[r];this.$refs.selectSourceTable.loadData()},selectedChange(){let a=this.$refs.selectSourceTable.getSelected();this.$refs.selectTargetTable.loadData(a)},selectedRemove(a){let r=this.$refs.selectTargetTable.data;r.splice(a,1),this.$refs.selectTargetTable.loadData(r),this.$refs.selectSourceTable.setSelected(r)},seve(){this.$emit("save")}}},_hoisted_1$1a={class:"title"},_hoisted_2$I={class:"description"},_hoisted_3$C={class:"ivu-pl-8"},_hoisted_4$s={class:"ivu-pl-8"};function _sfc_render$1n(a,r,o,s,l,u){const c=require$$0.resolveComponent("Avatar"),d=require$$0.resolveComponent("view-table"),f=require$$0.resolveComponent("Card"),h=require$$0.resolveComponent("Col"),p=require$$0.resolveComponent("Button"),v=require$$0.resolveComponent("Row"),g=require$$0.resolveComponent("Modal"),y=require$$0.resolveDirective("color"),$=require$$0.resolveDirective("bg-color");return require$$0.openBlock(),require$$0.createElementBlock("div",null,[require$$0.createVNode(g,{modelValue:l.opened,"onUpdate:modelValue":r[1]||(r[1]=_=>l.opened=_),scrollable:"","mask-closable":a.layout.maskClosable,draggable:a.layout.draggable,sticky:!0,"reset-drag-position":!0,width:"1500"},{header:require$$0.withCtx(()=>[require$$0.createElementVNode("div",null,[require$$0.createElementVNode("span",_hoisted_1$1a,require$$0.toDisplayString(o.title),1),require$$0.createElementVNode("span",_hoisted_2$I,require$$0.toDisplayString(o.description),1)])]),footer:require$$0.withCtx(()=>[require$$0.createElementVNode("div",null,[require$$0.createVNode(p,{type:"primary","custom-icon":"fa fa-save",onClick:u.seve},{default:require$$0.withCtx(()=>[require$$0.createTextVNode(require$$0.toDisplayString(a.$t("Front_Btn_OK")),1)]),_:1},8,["onClick"]),require$$0.createVNode(p,{type:"default","custom-icon":"fa fa-times",onClick:r[0]||(r[0]=_=>l.opened=!1)},{default:require$$0.withCtx(()=>[require$$0.createTextVNode(require$$0.toDisplayString(a.$t("Front_Btn_Close")),1)]),_:1})])]),default:require$$0.withCtx(()=>[require$$0.createVNode(v,{gutter:24},{default:require$$0.withCtx(()=>[require$$0.createVNode(h,{span:"14"},{default:require$$0.withCtx(()=>[require$$0.createVNode(f,{bordered:!1,"dis-hover":""},{title:require$$0.withCtx(()=>[require$$0.createElementVNode("div",null,[require$$0.withDirectives(require$$0.createVNode(c,{icon:"md-apps",size:"small"},null,512),[[y,"#1890ff"],[$,"#e6f7ff"]]),require$$0.createElementVNode("span",_hoisted_3$C,require$$0.toDisplayString(a.$t("Front_Label_Select_Source")),1)])]),default:require$$0.withCtx(()=>[require$$0.createVNode(d,{ref:"selectSourceTable","view-code":o.sourceViewCode,"select-enable":!0,"check-cross-page":!0,"auto-load":!1,filter:l.sourceFilter,height:480,onOnSelectChange:u.selectedChange},null,8,["view-code","filter","onOnSelectChange"])]),_:1})]),_:1}),require$$0.createVNode(h,{span:"10"},{default:require$$0.withCtx(()=>[require$$0.createVNode(f,{bordered:!1,"dis-hover":""},{title:require$$0.withCtx(()=>[require$$0.createElementVNode("div",null,[require$$0.withDirectives(require$$0.createVNode(c,{icon:"md-checkmark",size:"small"},null,512),[[y,"#1890ff"],[$,"#e6f7ff"]]),require$$0.createElementVNode("span",_hoisted_4$s,require$$0.toDisplayString(a.$t("Front_Label_Select_Target")),1)])]),default:require$$0.withCtx(()=>[require$$0.createVNode(d,{ref:"selectTargetTable","view-code":o.targetViewCode,static:!0,height:480},{command:require$$0.withCtx(({index:_})=>[require$$0.createVNode(p,{size:"small",title:a.$t("Front_Btn_Remove"),type:"warning","custom-icon":"fa fa-trash-alt",onClick:C=>u.selectedRemove(_)},null,8,["title","onClick"])]),_:1},8,["view-code"])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","mask-closable","draggable"])])}var itemSelect=_export_sfc(_sfc_main$1n,[["render",_sfc_render$1n],["__file","D:/Project/Mooho/FrontEnd/mooho-base-admin-plus/src/components/input/item-select.vue"]]),__glob_25_5=Object.freeze(Object.defineProperty({__proto__:null,default:itemSelect},Symbol.toStringTag,{value:"Module"}));const isClient=typeof window!="undefined";function oneOf(a,r){for(let o=0;o<r.length;o++)if(a===r[o])return!0;return!1}const SPECIAL_CHARS_REGEXP=/([\:\-\_]+(.))/g,MOZ_HACK_REGEXP=/^moz([A-Z])/;function camelCase(a){return a.replace(SPECIAL_CHARS_REGEXP,function(r,o,s,l){return l?s.toUpperCase():s}).replace(MOZ_HACK_REGEXP,"Moz$1")}function getStyle$1(a,r){if(!!isClient){if(!a||!r)return null;r=camelCase(r),r==="float"&&(r="cssFloat");try{const o=document.defaultView.getComputedStyle(a,"");return a.style[r]||o?o[r]:null}catch{return a.style[r]}}}function findComponentUpward(a,r,o){typeof r=="string"?o=[r]:o=r;let s=a.$parent,l=s.$options.name;for(;s&&(!l||o.indexOf(l)<0);)s=s.$parent,s&&(l=s.$options.name);return s}function setMatchMedia(){if(!isClient)return;const a=r=>({media:r,matches:!1,on(){},off(){}});window.matchMedia=window.matchMedia||a}var mixinsLink={props:{to:{type:[Object,String]},replace:{type:Boolean,default:!1},target:{type:String,validator(a){return oneOf(a,["_blank","_self","_parent","_top"])},default:"_self"},append:{type:Boolean,required:!1,default:!1}},computed:{linkUrl(){if(typeof this.to!=="string")return null;if(this.to.includes("//"))return this.to;const r=this.$router;if(r){const o=this.$route,s=r.resolve(this.to,o,this.append);return s?s.href:this.to}return this.to}},methods:{handleOpenTo(){if(!isClient)return;const a=this.$router;let r=this.to;if(a){const o=this.$route,s=a.resolve(this.to,o,this.append);r=s?s.href:this.to}typeof this.to!="string"&&window.open(r)},handleClick(a=!1){const r=this.$router;!isClient||(a?this.handleOpenTo():r?typeof this.to=="string"&&this.to.includes("//")?window.location.href=this.to:this.replace?this.$router.replace(this.to,()=>{}):this.$router.push(this.to,()=>{}):window.location.href=this.to)},handleCheckClick(a,r=!1){if(this.to){if(this.target==="_blank")return this.handleOpenTo(),!1;a.preventDefault(),this.handleClick(r)}}}},iLink_vue_vue_type_style_index_0_lang="";const _sfc_main$1m={name:"i-link",mixins:[mixinsLink],props:{disabled:{type:Boolean,default:!1},linkColor:{type:Boolean,default:!1}},methods:{handleClickItem(a,r=!1){if(this.disabled){a.preventDefault();return}this.handleCheckClick(a,r)}}},_hoisted_1$19=["href","target"];function _sfc_render$1m(a,r,o,s,l,u){return require$$0.openBlock(),require$$0.createElementBlock("a",{href:a.linkUrl,target:a.target,class:require$$0.normalizeClass(["i-link",{"i-link-color":!o.linkColor}]),onClick:[r[0]||(r[0]=require$$0.withModifiers(c=>u.handleClickItem(c,!1),["exact"])),r[1]||(r[1]=require$$0.withModifiers(c=>u.handleClickItem(c,!0),["ctrl"])),r[2]||(r[2]=require$$0.withModifiers(c=>u.handleClickItem(c,!0),["meta"]))]},[require$$0.renderSlot(a.$slots,"default")],10,_hoisted_1$19)}var iLink=_export_sfc(_sfc_main$1m,[["render",_sfc_render$1m],["__file","D:/Project/Mooho/FrontEnd/mooho-base-admin-plus/src/components/link/i-link.vue"]]),__glob_25_6=Object.freeze(Object.defineProperty({__proto__:null,default:iLink},Symbol.toStringTag,{value:"Module"}));/**
|
|
154
154
|
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
155
155
|
* For licensing, see LICENSE.md.
|
|
@@ -303,7 +303,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
303
303
|
@binding {object} form \u8868\u5355\u5BF9\u8C61\r
|
|
304
304
|
`),require$$0.renderSlot(a.$slots,"bottom",{form:this})]),_:3},8,["model","rules"]),require$$0.createCommentVNode(` <FooterToolbar>\r
|
|
305
305
|
<Button type="primary" size="large">{{ $t('Front_Btn_Submit') }}</Button>\r
|
|
306
|
-
</FooterToolbar>`)])}var viewForm=_export_sfc(_sfc_main$$,[["render",_sfc_render$$],["__file","D:/Project/Mooho/FrontEnd/mooho-base-admin-plus/src/components/view/view-form.vue"]]),__glob_25_29=Object.freeze(Object.defineProperty({__proto__:null,default:viewForm},Symbol.toStringTag,{value:"Module"})),viewTable_vue_vue_type_style_index_0_scoped_true_lang="",getColumns=(a,r)=>{let o=a.viewColumns.filter(s=>s.parentCode==r.code);if(o.length>0)return{...r,title:r.name,renderHeader:(s,l)=>s("span",{innerHTML:l.column.name.replace("|","<br/>")}),key:r.code,align:r.align?r.align.toLowerCase():"center",children:o.length>0?o.map(s=>getColumns(a,s)):null};{let s={},l=localStorage.getItem("columnWidth_"+a.dataView.code);return l&&(s=JSON.parse(l)),{...r,title:r.name,renderHeader:(u,c)=>u("span",{innerHTML:c.column.name.replace("|","<br/>")}),key:r.code,dataType:r.dataType,format:r.displayFormat,width:s[r.code]?s[r.code]:r.controlWidth,minWidth:100,align:r.align?r.align.toLowerCase():"center",sortable:!a.dataView.sortDisable&&!r.sortDisable?"custom":!1,resizable:!0,slot:"normal"}}};const _sfc_main$_={mixins:[mixin$1,mixinPage],components:{tableFilter,tableSetting,filterSetting},data(){return{inited:!1,size:10,orderBy:null,tableView:{},columns:[],viewFilter:{},filterColumns:[],data:[],staticData:[],selectedData:[],current:1,total:0,setting:!1,dialogActive:!1,tableSettingActive:!1,filterSettingActive:!1,itemSelectActive:!1,commandButtons:[],preview:!1,imageUrl:null,isFullScreen:!1,commandButtonParams:null}},async created(){this.viewCode&&setTimeout(async()=>{await this.init(this.viewCode),this.$emit("after-init")}),this.viewCode&&this.autoLoad&&this.loadData()},activated(){},props:{title:{type:String},viewCode:{type:String},readonly:{type:Boolean,default:!1},embedded:{type:Boolean,default:!1},parentData:{type:Object,default(){return{}}},static:{type:Boolean,default:!1},filter:{type:Object,default(){return{}}},settingEnable:{type:Boolean,default:!0},autoLoad:{type:Boolean,default:!0},selectEnable:{type:Boolean,default:!1},checkCrossPage:{type:Boolean,default:!1},treeEnable:{type:Boolean,default:!1},treeLoad:{type:Function},hasChildren:{type:Function},height:{type:Number,default:null},createEnable:{type:Boolean,default:!0},editEnable:{type:[Boolean,Function],default:!0},showEnable:{type:[Boolean,Function],default:!0},removeEnable:{type:[Boolean,Function],default:!0},draggable:{type:Boolean,default:!1},filterEnable:{type:Boolean,default:!0},pageEnable:{type:Boolean,default:!0},filterDisable:{type:Boolean,default:!1},beforeLoadData:{type:Function},onSearch:{type:Function},summaryMethod:{type:Function},pageSizeOpts:{type:Array},spanMethod:{type:Function},loadDataEnable:{type:Boolean,default:!0},rowClassName:{type:Function}},computed:{maxHeight(){if(this.height==null){let a=1;return Setting.layout.autoFixRatio==!0&&window.screen.width<1920&&window.screen.width*window.devicePixelRatio<=1920&&!navigator.userAgent.match(/AppleWebKit.*Mobile.*/)&&!navigator.userAgent.match(/.*Android.*/)&&(a=1/window.devicePixelRatio),this.isFullScreen?document.body.offsetHeight/a-100-this.$refs.filterCommand.offsetHeight/a:document.body.offsetHeight/a-350}else return this.height},filterData(){return this.$refs.tableFilter?this.$refs.tableFilter.data:null}},watch:{},methods:{...mapActions("admin/dataView",{loadDataView:"load"}),async init(a,r,o){let s=await this.loadDataView(a);if(s&&!s.isExist&&a.indexOf("_")>=0&&(s=await this.loadDataView(a.split("_")[0])),s!=null){if(!s.isExist){typeof o=="function"?o():this.error("Front_Msg_View_Code_Not_Exist|"+a);return}if(this.tableView=s.dataView,this.tableView.columns=s.viewColumns,this.tableView.filterColumns=s.filterColumns,this.filterColumns=s.filterColumns,(this.tableView.commandButton||"").trim()?this.commandButtons=JSON.parse(this.tableView.commandButton):this.commandButtons=[],this.$emit("on-ready",this.tableView),this.columns=s.viewColumns.filter(l=>!(l.parentCode||"").trim()).map(l=>getColumns(s,l)),this.columns.forEach(l=>{l.name=this.getNameI18n(l),l.fixed=l.isFixed?"left":null}),this.tableView.snEnable&&this.columns.unshift({title:" ",slot:"sn",align:"center",width:60}),this.tableView.commandEnable){let l={title:" ",slot:"command",align:"center",width:this.embedded&&!this.tableView.commandWidth?60:this.tableView.commandWidth==null?90:(this.tableView.commandWidth+1)*28,fixed:"right"};this.embedded&&this.tableView.batchSelectEnable&&this.createEnable&&!this.readonly?(l.renderHeader=u=>u("div",{},[u(require$$0.resolveComponent("Button"),{type:"primary",shape:"circle",icon:"md-checkmark-circle-outline",size:"small",style:{height:"20px",width:"20px"},onClick:()=>{this.openSelectItem()}})]),this.itemSelectActive=!0,setTimeout(()=>{this.$refs.itemSelect.init(this.tableView.batchSelectDataModel+"Source",this.tableView.batchSelectDataModel+"Target",()=>{this.$refs.itemSelect.loadSource()})})):this.embedded&&this.tableView.createEnable&&this.createEnable&&!this.readonly&&(l.renderHeader=u=>u("div",{},[u(require$$0.resolveComponent("Button"),{type:"primary",shape:"circle",icon:"md-add",size:"small",style:{height:"20px",width:"20px"},onClick:()=>{this.addNew()}})])),this.columns.push(l)}if((this.selectEnable||this.tableView.checkEnable)&&this.columns.unshift({type:"selection",align:"center",width:60}),this.treeEnable&&this.columns.unshift({tree:!0,display:"inline",align:"left",width:100}),this.tableView.size?this.size=this.tableView.size:this.tableView.pageEnable&&this.pageEnable?this.size=Setting.layout.pageSize:this.size=1e3,this.tableView.sorting){let l=JSON.parse(this.tableView.sorting),u=[];for(let c in l)l[c]==="desc"?u.push("-"+c):u.push("+"+c);this.orderBy=u.join(",")}else this.orderBy=null;if(this.tableView.filtering){let l=JSON.parse(this.tableView.filtering);for(let u in l)this.viewFilter[u]=l[u]}else this.viewFilter={};this.tableView.keywordEnable&&!!(this.tableView.keywordColumn||"").trim()?this.viewFilter.keywordColumns=this.tableView.keywordColumn:this.viewFilter.keywordColumns=null,this.selectedData=[],this.inited=!0,this.initTrigger(),setTimeout(()=>{typeof r=="function"&&r()})}},async loadData(a){if(!this.loadDataEnable){this.total=0,this.data=[];return}if(!(!this.inited&&(await this.init(this.viewCode),!this.inited))){if(typeof this.beforeLoadData=="function"&&this.beforeLoadData(),a&&(this.staticData=this.copy(a)),this.static){let r=this.getFilterResult();this.total=r.length;let o=(this.current-1)*this.size;this.data=o+this.size>=r.length?r.slice(o,r.length):r.slice(o,o+this.size)}else{let r={...this.getAllFilter(),page:this.current,per:this.size,orderBy:this.orderBy};if(this.tableView.isGroupBy&&(r.isGroupBy=!0,r.groupColumn=JSON.parse(this.tableView.groupColumn),r.groupMethod=JSON.parse(this.tableView.groupMethod)),this.tableView.isCustom){let o=await customModelApi.query(this.tableView.model,r);this.total=o.totalCount,this.data=o.data}else if(this.tableView.isDataSource){let o=await dataSourceApi.query(this.tableView.dataSource,r);this.total=o.totalCount,this.data=o.table}else{let o=await modelApi.query(this.tableView.model,r,this.tableView.functionName,this.tableView.functionType);this.total=o.totalCount,this.data=o.data}if(this.tableView.isDynamicColumn&&(this.columns=this.columns.filter(o=>o.slot!="normal"),this.data.length>0)){let o=0;for(const s in this.data[0])this.columns.push({name:s,title:s,code:s,key:"column_"+o,dataType:"String",align:"center",slot:"normal",controlType:"Label",isShow:!0});o++}this.current>Math.ceil(this.total/this.size)&&(this.current=Math.ceil(this.total/this.size)),this.current<=0&&(this.current=1),this.checkCrossPage||this.tableView.checkCrossPage?this.data.forEach(o=>{o._checked=this.selectedData.some(s=>o.id===s.id)}):this.selectedData=[]}this.data.forEach(r=>{this.setShowStatus(r)}),this.treeEnable&&(this.data.forEach(r=>{(this.hasChildren==null||this.hasChildren(r))&&(r._loading=!1,r.children=[])}),this.data=this.copy(this.data)),this.initDataSource();for(let r=0;r<this.data.length;r++)this.calc(this.data[r]);this.$emit("on-load-data"),this.$emit("on-change",null,null,null),this.$refs.tableFilter}},create(){this.$emit("create")},edit(a,r){this.$emit("edit",{row:a,index:r})},show(a,r){this.$emit("show",{row:a,index:r})},remove(a,r){this.confirm("Front_Msg_Sure_To_Delete_Item",async()=>{this.embedded?(this.staticData.splice((this.current-1)*this.size+r,1),this.loadData(),this.$emit("on-change",a)):(this.tableView.isCustom?await customModelApi.remove(this.tableView.model,a.id):await modelApi.remove(this.tableView.model,a.id),this.success("Front_Msg_Success",()=>{this.loadData()}))})},getDefaultData(){let a={};return this.columns.forEach(r=>{if(r.defaultValue)if(r.defaultValue=="{today}"){let s=new Date().toISOString().replace(/T.*/,"");this.setData(a,r.code,new Date(s))}else if(r.defaultValue.startsWith("{today(")&&r.defaultValue.endsWith(")}")){let o=r.defaultValue.substr(7,r.defaultValue.length-9);this.setData(a,r.code,format$3(new Date,o))}else r.defaultValue=="{currentUserID}"?this.setData(a,r.code,this.info.id):r.defaultValue=="{currentUser}"?this.setData(a,r.code,this.info.name):r.dataType==="Integer"?this.setData(a,r.code,parseInt(r.defaultValue)):r.dataType==="Decimal"?this.setData(a,r.code,parseFloat(r.defaultValue)):r.dataType==="Boolean"&&r.defaultValue.toUpperCase=="TRUE"?this.setData(a,r.code,!0):r.dataType==="Boolean"&&r.defaultValue.toUpperCase=="FALSE"?this.setData(a,r.code,!1):this.setData(a,r.code,r.defaultValue);else r.dataType==="Boolean"?this.setData(a,r.code,!1):this.setData(a,r.code,null)}),a},addNew(){this.staticData.push(this.getDefaultData()),this.loadData()},getSelected(){return this.selectedData},setSelected(a){this.selectedData=[],a.forEach(r=>{this.selectedData.push(r)}),this.static?(this.staticData.forEach(r=>{r._checked=this.selectedData.some(o=>r.id===o.id)}),this.loadData()):this.data.forEach(r=>{r._checked=this.selectedData.some(o=>r.id===o.id)}),this.data=this.copy(this.data)},validate(){for(let a=0;a<this.staticData.length;a++){let r=this.staticData[a];for(let o=0;o<this.columns.length;o++){let s=this.columns[o];if(r._isShow&&r._isShow[s.code]==!1)continue;if(s.isShow==!1)continue;let l=s.isRequired;if((s.requiredJson||"").trim()){let u=JSON.parse(s.requiredJson);(u.type=="Condition"||u.type=="Expression")&&(l=this.judgeCondition(u,r))}if(l){let u=this.parseData(r,s.code);if(u==null||!(String(u)||"").trim())return this.error("Front_Msg_Row_Column_Required|"+(a+1)+"|"+s.name),!1}}}return!0},getData(){let a=null;return this.static?a=this.copy(this.staticData):a=this.copy(this.data),a.forEach(r=>{delete r._checked,delete r._dataSource,delete r._needRefresh,delete r._needClear,delete r._rawData}),a},resetFilter(){for(let a in this.filterData)delete this.filterData[a]},search(){typeof this.onSearch=="function"?this.onSearch():this.loadData()},async moreClick(a){!this.inited&&(await this.init(this.viewCode),!this.inited)||(this.static?a==="exportExcel"?dataViewApi.exportExcel(this.tableView,this.staticData,this.columns.filter(r=>r.slot=="normal")):a==="exportPdf"?dataViewApi.exportPdf(this.tableView,this.staticData,this.columns.filter(r=>r.slot=="normal")):a==="print"?dataViewApi.print(this.tableView,this.staticData,this.columns.filter(r=>r.slot=="normal")):a==="batchEdit"&&this.error("Front_Msg_Not_Supported"):a==="exportExcel"?this.exportExcel():a==="exportPdf"?this.exportPdf():a==="print"?this.print():a==="batchEdit"&&this.$refs.batchEditTable.init(this.tableView.batchEditView,async()=>{let r;this.tableView.isCustom?r=await customModelApi.query(this.tableView.model,{}):r=await modelApi.query(this.tableView.model,{}),this.$refs.batchEditTable.loadData(r.data),this.$refs.batchEditTable.open()}))},exportExcel(){let a={...this.getAllFilter(),orderBy:this.orderBy};this.tableView.isCustom?customModelApi.exportExcel(this.tableView,a):this.tableView.isDataSource?dataSourceApi.exportExcel(this.tableView,a):modelApi.exportExcel(this.tableView,a)},exportPdf(){let a={...this.getAllFilter(),orderBy:this.orderBy};this.tableView.isCustom?customModelApi.exportPdf(this.tableView,a):this.tableView.isDataSource?dataSourceApi.exportPdf(this.tableView,a):modelApi.exportPdf(this.tableView,a)},print(){let a={...this.getAllFilter(),orderBy:this.orderBy};this.tableView.isCustom?customModelApi.printList(this.tableView,a):this.tableView.isDataSource?dataSourceApi.printList(this.tableView,a):modelApi.printList(this.tableView,a)},initDataSource(){this.columns.forEach(a=>{(a.controlType=="Select"||a.controlType=="MultiSelect"||a.controlType=="SelectWithOther"||a.controlType=="ComboSelect"||a.controlType=="MultiComboSelect"||a.controlType=="Radio"||a.controlType=="CheckGroup")&&(a.isStaticItem?this.data.forEach(r=>{if(!r._dataSource)r._dataSource={},r._rawData={},r._needRefresh={},r._needClear={};else if(r._dataSource[a.code])return;r._dataSource[a.code]=[],r._rawData[a.code]=[],(a.itemData||"").trim()&&a.itemData.split(/[\n]/).forEach(o=>{if((o||"").trim())if(o.split(":").length>1){let s=o.split(":")[0],l=o.split(":")[1];r._dataSource[a.code].push({id:s,name:l})}else r._dataSource[a.code].push({id:o,name:o})})}):!!(a.source||"").trim()&&!(a.dataType&&a.dataType.startsWith("Enum:"))&&this.data.forEach(r=>{if(r._dataSource&&r._dataSource[a.code])return;let o=this.getParam(r,a,this.parentData);o!=null&&this.fillDataSource(r,a,o)}))})},initTrigger(){this.columns.forEach(a=>{a.triggers=[]}),this.columns.filter(a=>!a.isStaticItem&&!!(a.source||"").trim()&&!!(a.param||"").trim()&&!(a.dataType&&a.dataType.startsWith("Enum:"))).forEach(a=>{let r=JSON.parse(a.param);for(let o in r)this.columns.filter(s=>r[o]==s.code||r[o].split(".")[0]+"ID"==s.code).forEach(s=>{s.triggers.push(this.copy(a))})})},async fillDataSource(a,r,o){a._dataSource||(a._dataSource={},a._rawData={},a._needRefresh={},a._needClear={}),(r.controlType==="ComboSelect"||r.controlType==="MultiComboSelect")&&(o.per=20),this.disableLoader();let s;if(r.isSourceCustom?s=await customModelApi.query(r.source,o):s=await modelApi.query(r.source,o),this.enableLoader(),a._rawData[r.code]=s.data,a._dataSource[r.code]=s.data.map(l=>({id:(r.sourceDataCode||"").trim()?this.parseData(l,r.sourceDataCode):l.id,name:this.parseData(l,r.sourceDisplayCode)})),a&&this.parseData(a,r.code)==null&&r.isDefaultFirst&&s.data.length>0&&(this.setData(a,r.code,this.parseData(s.data[0],r.sourceDataCode)),r.sourceDataCode=="id"&&r.code.length>2)){let l=r.code.substr(0,r.code.length-2);if(a._rawData&&a._rawData[r.code]){let u=a._rawData[r.code].find(c=>c.id==this.parseData(a,r.code));this.setData(a,l,u)}}this.data=this.data.map(l=>l),this.onDataChange(a,r)},getDataSource(a,r){if(!r.isStaticItem&&r.dataType.startsWith("Enum:"))return this.getEnumList(r.dataType.split(":")[1]);if(a._dataSource!=null&&a._dataSource[r.code]!=null)return a._dataSource[r.code]},pageSizeChange(a){this.size=a,this.loadData()},sortChange({key:a,order:r}){let o=[];this.orderBy&&(o=this.orderBy.split(",")),o=o.filter(s=>s.substring(1)!==a),r==="asc"?o.unshift("+"+a):r==="desc"&&o.unshift("-"+a),this.orderBy=o.join(","),this.loadData()},columnWidthResize(a,r,o){let s={},l=localStorage.getItem("columnWidth_"+this.tableView.code);l&&(s=JSON.parse(l)),s[o.code]=a,localStorage.setItem("columnWidth_"+this.tableView.code,JSON.stringify(s))},onSelectDataChange(a,r,o){let s;r.code.endsWith("ID")&&(s=r.code.substr(0,r.code.length-2));let l=null;if(typeof o=="object")if(o instanceof Array){l=[];for(let u of o)typeof u=="object"?l.push(u):a._rawData&&a._rawData[r.code]?l.push(a._rawData[r.code].find(c=>this.parseData(c,r.sourceDataCode)==u)):l.push(u)}else l=o;else a._rawData&&a._rawData[r.code]?l=a._rawData[r.code].find(u=>this.parseData(u,r.sourceDataCode)==o):l=o;s&&this.setData(a,s,l),this.onDataChange(a,r,l)},onDataChange(a,r,o){for(this.setShowStatus(a),this.calc(a,r),this.$emit("on-change",a,r,o),(r==null||r.triggers!==[])&&this.columns.forEach(function(s){!s.isStaticItem&&!!(s.source||"").trim()&&!(s.dataType&&s.dataType.startsWith("Enum:"))&&(r==null||r.triggers.some(l=>l.code==s.code))&&a._needRefresh&&(a._needRefresh[s.code]=!0)});;){let s=this.columns.filter(l=>a._needRefresh&&a._needRefresh[l.code]==!0||a._needClear&&a._needClear[l.code]==!0)[0];if(s==null)break;if(a._needClear[s.code]&&this.parseData(a,s.code)!=null)this.setData(a,s.code,null),s.triggers.forEach(l=>{a._needClear[l.code]=!0});else if(a._needRefresh[s.code]&&!!(s.source||"").trim()&&!(s.dataType&&s.dataType.startsWith("Enum:"))){let l=this.getParam(a,s,this.parentData);s.controlType==="Select"||s.controlType==="SelectWithOther"||s.controlType==="ComboSelect"||s.controlType==="MulitSelect"||s.controlType==="Radio"||s.controlType==="CheckGroup"?l!=null?this.fillDataSource(a,s,l):(a._dataSource[s.code]=[],this.setData(a,s.code,null),s.triggers.forEach(u=>{a._needClear[u.code]=!0})):(s.controlType==="DialogSelect"||s.controlType==="MultiDialogSelect")&&l==null&&(this.setData(a,s.code,null),s.triggers.forEach(u=>{a._needClear[u.code]=!0}))}a._needClear[s.code]=!1,a._needRefresh[s.code]=!1}},calc(a,r){for(let o=0;o<this.columns.length;o++){let s=this.columns[o];if((s.calculate||"").trim()){let l=this.getTriggers(s.calculate);if(!r||l.some(u=>u==r.code)){let u=this.calculate(s.calculate,a);s.digit!=null&&(u=this.keepDecimal(u,s.digit,s.fixedDigit)),this.setData(a,s.code,u)}}}},onBlur(a,r){this.$emit("on-blur",a,r)},tableSettingOpen(){this.tableSettingActive=!0,setTimeout(()=>{this.$refs.tableSetting.open(this.tableView,this.copy(this.tableView.columns))})},filterSettingOpen(){this.filterSettingActive=!0,setTimeout(()=>{this.$refs.filterSetting.open(this.tableView,this.copy(this.tableView.filterColumns))})},onSelectionChange(a){this.getDataWithChildren(this.data).forEach(o=>{const s=this.selectedData.findIndex(l=>l.id==o.id);a.some(l=>l.id==o.id)?s==-1&&this.selectedData.push(o):s!=-1&&this.selectedData.splice(s,1)}),this.$emit("on-select-change")},onKeyup(a){if(a){var r=window.event?a.keyCode:a.which;if(!r||r!==0&&r!==1&&r!==13)return}this.search()},getAllFilter(){var r,o;let a={...this.viewFilter,...(r=this.filter)!=null?r:{},...(o=this.filterData)!=null?o:{}};for(let s in a)this.isJSON(a[s])?a[s]=JSON.parse(a[s]).join(","):typeof a[s]=="object"&&!(a[s]instanceof Date)&&delete a[s];return a},getFilterResult(){var r,o;let a=this.staticData;if(!this.filterDisable){let s={...this.viewFilter,...(r=this.filter)!=null?r:{},...(o=this.filterData)!=null?o:{}};for(let l in s){let u=l,c=s[l];c==null||c==""||this.filterColumns.some(d=>d.code==l&&d.operator=="Custom")||typeof c=="object"&&!(c instanceof Date)||u!="keywordColumns"&&(a=a.filter(d=>{if((u.startsWith("d_")||u.startsWith("m_")||u.startsWith("y_"))&&(u=u.substr(2)),u=="keyword"){let f=s.keywordColumns.split(",");for(let h=0;h<f.length;h++){let p=f[h];if(this.parseData(d,p)!=null&&this.parseData(d,p).indexOf(c)>=0)return!0}return!1}else if(u.endsWith("_g")){let f=u.substr(0,u.length-2);return c instanceof Date?new Date(this.parseData(d,f))>c:this.parseData(d,f)>c}else if(u.endsWith("_l")){let f=u.substr(0,u.length-2);return c instanceof Date?new Date(this.parseData(d,f))<c:this.parseData(d,f)<c}else if(u.endsWith("_ge")){let f=u.substr(0,u.length-3);return c instanceof Date?new Date(this.parseData(d,f))>=c:this.parseData(d,f)>=c}else if(u.endsWith("_le")){let f=u.substr(0,u.length-3);return c instanceof Date?new Date(this.parseData(d,f))<=c:this.parseData(d,f)<=c}else if(u.endsWith("_n")){let f=u.substr(0,u.length-2);if(typeof c=="string"){for(let h=0;h<c.split(",").length;h++)if(this.parseData(d,f)!=c.split(",")[h])return!0;return!1}else return c instanceof Date?new Date(this.parseData(d,f))!=c:this.parseData(d,f)!=c}else if(u.endsWith("_c")){let f=u.substr(0,u.length-2);return this.parseData(d,f)!=null&&this.parseData(d,f).indexOf(c)>=0}else{let f=u;return typeof c=="string"?this.isJSON(c)?JSON.parse(c).some(h=>h==this.parseData(d,f)):c.split(",").some(h=>h==this.parseData(d,f)):c instanceof Date?new Date(this.parseData(d,f))==c:this.parseData(d,f)==c}}))}}if((this.orderBy||"").trim()){let s=this.orderBy.split(",")[0],l=s.substr(0,1),u=s.substr(1);a.sort((c,d)=>{let f=this.parseData(c,u),h=this.parseData(d,u);return f==h?0:f>h||h==null?l=="+"?1:-1:l=="+"?-1:1})}return a},async onLoadData(a,r){if(this.treeLoad!=null){let o=await this.treeLoad(a);o.forEach(s=>{(this.hasChildren==null||this.hasChildren(s))&&(s._loading=!1,s.children=[])}),r(o)}},dragDrop(a,r){this.$emit("on-drag-drop",{index1:a,index2:r})},openSelectItem(){let a=[],r=this.tableView.batchSelectDataCode,o=r.substr(0,r.length-2);for(let s=0;s<this.staticData.length;s++)a.push(this.staticData[s][o]);this.$refs.itemSelect.setSelected(a),this.$refs.itemSelect.open()},saveItemSelect(){let a=this.$refs.itemSelect.getSelected(),r=this.tableView.batchSelectDataCode,o=r.substr(0,r.length-2);this.staticData=this.staticData.filter(s=>a.some(l=>l.id==s[r]));for(let s=0;s<a.length;s++)if(!this.staticData.some(l=>l[r]==a[s].id)){let l=this.getDefaultData();l[r]=a[s].id,l[o]=a[s],this.staticData.push(l)}this.loadData(this.staticData),this.$refs.itemSelect.close()},clickCommandButton(a,r){r.viewType=="TableView"?this.$refs.modalTable.init(r.viewCode,async()=>{if((r.formViewCode||"").trim()&&this.$refs.modalForm.init(r.formViewCode),this.commandButtonParams={},(r.params||"").trim()){let o=JSON.parse(r.params);for(let s=0;s<o.length;s++){let l=this.parseData(a,o[s].value);this.commandButtonParams[o[s].param]=l}}this.$refs.modalTable.open(this.commandButtonParams)}):this.$refs.modalForm.init(r.formViewCode,async()=>{this.$refs.modalForm.open(a)})},previewImage(a){this.imageUrl=a,this.preview=!0},handleSpan({row:a,column:r,rowIndex:o,columnIndex:s}){if(this.spanMethod!=null)return this.spanMethod(a,r,o,s);if(r.mergeSame){if(o!=0&&this.parseData(a,r.code)==this.parseData(this.data[o-1],r.code))return[0,0];let l=0;for(let u=o;u<this.data.length;u++)if(this.parseData(a,r.code)==this.parseData(this.data[u],r.code))l++;else return[l,1];return[l,1]}},judge(a,r,o){if((r||"").trim()){let s=JSON.parse(r);if(s.type=="Condition"||s.type=="Expression")return this.judgeCondition(s,o)}return a},isShow(a,r){return a._isShow!=null&&a._isShow[r.code]!=null?a._isShow[r.code]:r.isShow},isReadonly(a,r){return this.readonly==!0?!0:a._isReadonly!=null&&a._isReadonly[r.code]!=null?a._isReadonly[r.code]:r.isReadonly},batchSave(){!this.$refs.batchEditTable.validate()||this.confirm("Front_Msg_Sure_To_Save",async()=>{let a=this.$refs.batchEditTable.data;this.tableView.isCustom?await customModelApi.batchSave(this.tableView.model,a):await modelApi.batchSave(this.tableView.model,a),this.success("Front_Msg_Success",()=>{this.$refs.batchEditTable.close(),this.loadData()})})},rowData(a,r){return this.treeEnable?a:this.data[r]},getDataWithChildren(a){let r=[];return a.forEach(o=>{r.push(o),o.children&&(r=r.concat(this.getDataWithChildren(o.children)))}),r},setShowStatus(a){for(let r of this.columns){if((r.showJson||"").trim()){a._isShow==null&&(a._isShow={});let o=JSON.parse(r.showJson);(o.type=="Condition"||o.type=="Expression")&&(a._isShow[r.code]=this.judgeCondition(o,a))}if((r.readonlyJson||"").trim()){a._isReadonly==null&&(a._isReadonly={});let o=JSON.parse(r.readonlyJson);(o.type=="Condition"||o.type=="Expression")&&(a._isReadonly[r.code]=this.judgeCondition(o,a))}}},getNameI18n(a){if(a)if(this.layout.showI18n){if(a.code){let r="DataView_"+this.tableView.code+"_"+a.code,o=this.$t(r);return o==r?a.name:o}}else return a.name},up(a,r){let o=this.staticData;if(r>0){o.splice(r,1),o.splice(r-1,0,a);for(let s of o)delete s.id;this.loadData(o)}},down(a,r){let o=this.staticData;if(r<o.length-1){o.splice(r,1),o.splice(r+1,0,a);for(let s of o)delete s.id;this.loadData(o)}},clear(){this.staticData=[],this.data=[]},parseDataWithOther(a,r){let o=r.code,s=this.parseData(a,o+"_o"),l=this.parseData(a,o),u=this.getDataSource(a,r);return s!=null?s:l==null?null:u&&u.some(c=>c.id==l)?l:"__Other"},setDataWithOther(a,r,o){this.setData(a,r+"_o",o),o!="__Other"?this.setData(a,r,o):this.setData(a,r,null)},getJustify(a){return a=="Left"?"start":a=="Center"?"center":(a=="Right","end")},async loadOption(a,r,o){if(r.isStaticItem||r.dataType&&r.dataType.startsWith("Enum:"))return;let s=this.getParam(a,r);s!=null?(s[r.sourceDisplayCode+"_c"]=o,this.fillDataSource(a,r,s)):(a._rawData[r.code]=[],a._dataSource[r.code]=[],this.setData(a,r.code,null),r.triggers.forEach(l=>{l.needClear=!0}))},parseComboData(a,r,o){let s=this.parseData(a,r.code);return setTimeout(()=>{this.loadComboDataLabel(a,r,s,o)}),s},parseMultiComboData(a,r,o){let s=[],l=this.parseData(a,r.code);return this.isJSON(l)&&(s=JSON.parse(l)),setTimeout(()=>{this.loadComboDataLabel(a,r,s,o)}),s},async loadComboDataLabel(a,r,o,s){if(!(r.isStaticItem||r.dataType&&r.dataType.startsWith("Enum:"))&&this.$refs["control_"+r.code+"_"+s]&&o){let l=this.$refs["control_"+r.code+"_"+s].$data.values,u=[];if(r.controlType=="MultiComboSelect")o.forEach(c=>{if(!l.some(d=>d.value==c)){let d={value:c,label:null,disabled:!1};l.push(d),u.push(d)}});else if(!l.some(c=>c.value==o)){let c={value:o,label:null,disabled:!1};l.push(c),u.push(c)}if(u.length>0){let c=this.getParam(a,r);c[r.sourceDataCode]=u.map(f=>f.value).join(",");let d;r.isSourceCustom?d=await customModelApi.query(r.source,c):d=await modelApi.query(r.source,c),d.data.forEach(f=>{let h=this.parseData(f,r.sourceDataCode),p=this.parseData(f,r.sourceDisplayCode);r.controlType=="ComboSelect";let v=u.find(g=>g.value==h);v&&(v.label=p),this.$forceUpdate()})}}}}},_hoisted_1$Q={class:"title"},_hoisted_2$r={ref:"filterCommand"},_hoisted_3$m=["title","innerHTML"],_hoisted_4$h=["href","target"],_hoisted_5$9=["innerHTML"],_hoisted_6$8={key:10,style:{display:"flex"}},_hoisted_7$6=["href"],_hoisted_8$6={style:{margin:"auto 4px"}},_hoisted_9$6=["onClick","src"],_hoisted_10$4={class:"ivu-mt ivu-text-right"},_hoisted_11$3={style:{"text-align":"center"}},_hoisted_12$3=["download"],_hoisted_13$3=["src"];function _sfc_render$_(a,r,o,s,l,u){const c=require$$0.resolveComponent("Divider"),d=require$$0.resolveComponent("table-filter"),f=require$$0.resolveComponent("Button"),h=require$$0.resolveComponent("Icon"),p=require$$0.resolveComponent("DropdownItem"),v=require$$0.resolveComponent("DropdownMenu"),g=require$$0.resolveComponent("Dropdown"),y=require$$0.resolveComponent("FormItem"),$=require$$0.resolveComponent("Col"),_=require$$0.resolveComponent("Row"),C=require$$0.resolveComponent("Form"),b=require$$0.resolveComponent("Input"),w=require$$0.resolveComponent("Option"),x=require$$0.resolveComponent("Select"),D=require$$0.resolveComponent("dialog-select"),A=require$$0.resolveComponent("DatePicker"),E=require$$0.resolveComponent("TimePicker"),P=require$$0.resolveComponent("Checkbox"),O=require$$0.resolveComponent("Switch"),q=require$$0.resolveComponent("Radio"),M=require$$0.resolveComponent("RadioGroup"),R=require$$0.resolveComponent("CheckboxGroup"),L=require$$0.resolveComponent("Slider"),F=require$$0.resolveComponent("Table"),N=require$$0.resolveComponent("Page"),H=require$$0.resolveComponent("modal-table"),B=require$$0.resolveComponent("table-setting"),X=require$$0.resolveComponent("filter-setting"),J=require$$0.resolveComponent("item-select"),ie=require$$0.resolveComponent("modal-form"),de=require$$0.resolveComponent("Modal");return require$$0.openBlock(),require$$0.createElementBlock("div",{class:require$$0.normalizeClass({"full-screen":l.isFullScreen})},[o.title!=null?(require$$0.openBlock(),require$$0.createBlock(c,{key:0,plain:!0,dashed:"",orientation:"left",size:"small"},{default:require$$0.withCtx(()=>[require$$0.createElementVNode("span",_hoisted_1$Q,require$$0.toDisplayString(o.title),1)]),_:1})):require$$0.createCommentVNode("v-if",!0),require$$0.createCommentVNode(`\r
|
|
306
|
+
</FooterToolbar>`)])}var viewForm=_export_sfc(_sfc_main$$,[["render",_sfc_render$$],["__file","D:/Project/Mooho/FrontEnd/mooho-base-admin-plus/src/components/view/view-form.vue"]]),__glob_25_29=Object.freeze(Object.defineProperty({__proto__:null,default:viewForm},Symbol.toStringTag,{value:"Module"})),viewTable_vue_vue_type_style_index_0_scoped_true_lang="",getColumns=(a,r)=>{let o=a.viewColumns.filter(s=>s.parentCode==r.code);if(o.length>0)return{...r,title:r.name,renderHeader:(s,l)=>s("span",{innerHTML:l.column.name.replace("|","<br/>")}),key:r.code,align:r.align?r.align.toLowerCase():"center",children:o.length>0?o.map(s=>getColumns(a,s)):null};{let s={},l=localStorage.getItem("columnWidth_"+a.dataView.code);return l&&(s=JSON.parse(l)),{...r,title:r.name,renderHeader:(u,c)=>u("span",{innerHTML:c.column.name.replace("|","<br/>")}),key:r.code,dataType:r.dataType,format:r.displayFormat,width:s[r.code]?s[r.code]:r.controlWidth,minWidth:100,align:r.align?r.align.toLowerCase():"center",sortable:!a.dataView.sortDisable&&!r.sortDisable?"custom":!1,resizable:!0,slot:"normal"}}};const _sfc_main$_={mixins:[mixin$1,mixinPage],components:{tableFilter,tableSetting,filterSetting},data(){return{inited:!1,size:10,orderBy:null,tableView:{},columns:[],viewFilter:{},filterColumns:[],data:[],staticData:[],selectedData:[],current:1,total:0,setting:!1,dialogActive:!1,tableSettingActive:!1,filterSettingActive:!1,itemSelectActive:!1,commandButtons:[],preview:!1,imageUrl:null,isFullScreen:!1,commandButtonParams:null}},async created(){this.viewCode&&setTimeout(async()=>{await this.init(this.viewCode),this.$emit("after-init")}),this.viewCode&&this.autoLoad&&this.loadData()},activated(){},props:{title:{type:String},viewCode:{type:String},readonly:{type:Boolean,default:!1},embedded:{type:Boolean,default:!1},parentData:{type:Object,default(){return{}}},static:{type:Boolean,default:!1},filter:{type:Object,default(){return{}}},settingEnable:{type:Boolean,default:!0},autoLoad:{type:Boolean,default:!0},selectEnable:{type:Boolean,default:!1},checkCrossPage:{type:Boolean,default:!1},treeEnable:{type:Boolean,default:!1},treeLoad:{type:Function},hasChildren:{type:Function},height:{type:Number,default:null},createEnable:{type:Boolean,default:!0},editEnable:{type:[Boolean,Function],default:!0},showEnable:{type:[Boolean,Function],default:!0},removeEnable:{type:[Boolean,Function],default:!0},draggable:{type:Boolean,default:!1},filterEnable:{type:Boolean,default:!0},pageEnable:{type:Boolean,default:!0},filterDisable:{type:Boolean,default:!1},beforeLoadData:{type:Function},onSearch:{type:Function},summaryMethod:{type:Function},pageSizeOpts:{type:Array},spanMethod:{type:Function},loadDataEnable:{type:Boolean,default:!0},rowClassName:{type:Function}},computed:{maxHeight(){if(this.height==null){let a=1;return Setting.layout.autoFixRatio==!0&&window.screen.width<1920&&window.screen.width*window.devicePixelRatio<=1920&&!navigator.userAgent.match(/AppleWebKit.*Mobile.*/)&&!navigator.userAgent.match(/.*Android.*/)&&(a=1/window.devicePixelRatio),this.isFullScreen?document.body.offsetHeight/a-100-this.$refs.filterCommand.offsetHeight/a:document.body.offsetHeight/a-350}else return this.height},filterData(){return this.$refs.tableFilter?this.$refs.tableFilter.data:null}},watch:{},methods:{...mapActions("admin/dataView",{loadDataView:"load"}),async init(a,r,o){let s=await this.loadDataView(a);if(s&&!s.isExist&&a.indexOf("_")>=0&&(s=await this.loadDataView(a.split("_")[0])),s!=null){if(!s.isExist){typeof o=="function"?o():this.error("Front_Msg_View_Code_Not_Exist|"+a);return}if(this.tableView=s.dataView,this.tableView.columns=s.viewColumns,this.tableView.filterColumns=s.filterColumns,this.filterColumns=s.filterColumns,(this.tableView.commandButton||"").trim()?this.commandButtons=JSON.parse(this.tableView.commandButton):this.commandButtons=[],this.$emit("on-ready",this.tableView),this.columns=s.viewColumns.filter(l=>!(l.parentCode||"").trim()).map(l=>getColumns(s,l)),this.columns.forEach(l=>{l.name=this.getNameI18n(l),l.fixed=l.isFixed?"left":null}),this.tableView.snEnable&&this.columns.unshift({title:this.$t("Front_Label_Sn"),slot:"sn",align:"center",width:60}),this.tableView.commandEnable){let l={title:" ",slot:"command",align:"center",width:this.embedded&&!this.tableView.commandWidth?60:this.tableView.commandWidth==null?90:(this.tableView.commandWidth+1)*28,fixed:"right"};this.embedded&&this.tableView.batchSelectEnable&&this.createEnable&&!this.readonly?(l.renderHeader=u=>u("div",{},[u(require$$0.resolveComponent("Button"),{type:"primary",shape:"circle",icon:"md-checkmark-circle-outline",size:"small",style:{height:"20px",width:"20px"},onClick:()=>{this.openSelectItem()}})]),this.itemSelectActive=!0,setTimeout(()=>{this.$refs.itemSelect.init(this.tableView.batchSelectDataModel+"Source",this.tableView.batchSelectDataModel+"Target",()=>{this.$refs.itemSelect.loadSource()})})):this.embedded&&this.tableView.createEnable&&this.createEnable&&!this.readonly&&(l.renderHeader=u=>u("div",{},[u(require$$0.resolveComponent("Button"),{type:"primary",shape:"circle",icon:"md-add",size:"small",style:{height:"20px",width:"20px"},onClick:()=>{this.addNew()}})])),this.columns.push(l)}if((this.selectEnable||this.tableView.checkEnable)&&this.columns.unshift({type:"selection",align:"center",width:60}),this.treeEnable&&this.columns.unshift({tree:!0,display:"inline",align:"left",width:100}),this.tableView.size?this.size=this.tableView.size:this.tableView.pageEnable&&this.pageEnable?this.size=Setting.layout.pageSize:this.size=1e3,this.tableView.sorting){let l=JSON.parse(this.tableView.sorting),u=[];for(let c in l)l[c]==="desc"?u.push("-"+c):u.push("+"+c);this.orderBy=u.join(",")}else this.orderBy=null;if(this.tableView.filtering){let l=JSON.parse(this.tableView.filtering);for(let u in l)this.viewFilter[u]=l[u]}else this.viewFilter={};this.tableView.keywordEnable&&!!(this.tableView.keywordColumn||"").trim()?this.viewFilter.keywordColumns=this.tableView.keywordColumn:this.viewFilter.keywordColumns=null,this.selectedData=[],this.inited=!0,this.initTrigger(),setTimeout(()=>{typeof r=="function"&&r()})}},async loadData(a){if(!this.loadDataEnable){this.total=0,this.data=[];return}if(!(!this.inited&&(await this.init(this.viewCode),!this.inited))){if(typeof this.beforeLoadData=="function"&&this.beforeLoadData(),a&&(this.staticData=this.copy(a)),this.static){let r=this.getFilterResult();this.total=r.length;let o=(this.current-1)*this.size;this.data=o+this.size>=r.length?r.slice(o,r.length):r.slice(o,o+this.size)}else{let r={...this.getAllFilter(),page:this.current,per:this.size,orderBy:this.orderBy};if(this.tableView.isGroupBy&&(r.isGroupBy=!0,r.groupColumn=JSON.parse(this.tableView.groupColumn),r.groupMethod=JSON.parse(this.tableView.groupMethod)),this.tableView.isCustom){let o=await customModelApi.query(this.tableView.model,r);this.total=o.totalCount,this.data=o.data}else if(this.tableView.isDataSource){let o=await dataSourceApi.query(this.tableView.dataSource,r);this.total=o.totalCount,this.data=o.table}else{let o=await modelApi.query(this.tableView.model,r,this.tableView.functionName,this.tableView.functionType);this.total=o.totalCount,this.data=o.data}if(this.tableView.isDynamicColumn&&(this.columns=this.columns.filter(o=>o.slot!="normal"),this.data.length>0)){let o=0;for(const s in this.data[0])this.columns.push({name:s,title:s,code:s,key:"column_"+o,dataType:"String",align:"center",slot:"normal",controlType:"Label",isShow:!0});o++}this.current>Math.ceil(this.total/this.size)&&(this.current=Math.ceil(this.total/this.size)),this.current<=0&&(this.current=1),this.checkCrossPage||this.tableView.checkCrossPage?this.data.forEach(o=>{o._checked=this.selectedData.some(s=>o.id===s.id)}):this.selectedData=[]}this.data.forEach(r=>{this.setShowStatus(r)}),this.treeEnable&&(this.data.forEach(r=>{(this.hasChildren==null||this.hasChildren(r))&&(r._loading=!1,r.children=[])}),this.data=this.copy(this.data)),this.initDataSource();for(let r=0;r<this.data.length;r++)this.calc(this.data[r]);this.$emit("on-load-data"),this.$emit("on-change",null,null,null),this.$refs.tableFilter}},create(){this.$emit("create")},edit(a,r){this.$emit("edit",{row:a,index:r})},show(a,r){this.$emit("show",{row:a,index:r})},remove(a,r){this.confirm("Front_Msg_Sure_To_Delete_Item",async()=>{this.embedded?(this.staticData.splice((this.current-1)*this.size+r,1),this.loadData(),this.$emit("on-change",a)):(this.tableView.isCustom?await customModelApi.remove(this.tableView.model,a.id):await modelApi.remove(this.tableView.model,a.id),this.success("Front_Msg_Success",()=>{this.loadData()}))})},getDefaultData(){let a={};return this.columns.forEach(r=>{if(r.defaultValue)if(r.defaultValue=="{today}"){let s=new Date().toISOString().replace(/T.*/,"");this.setData(a,r.code,new Date(s))}else if(r.defaultValue.startsWith("{today(")&&r.defaultValue.endsWith(")}")){let o=r.defaultValue.substr(7,r.defaultValue.length-9);this.setData(a,r.code,format$3(new Date,o))}else r.defaultValue=="{currentUserID}"?this.setData(a,r.code,this.info.id):r.defaultValue=="{currentUser}"?this.setData(a,r.code,this.info.name):r.dataType==="Integer"?this.setData(a,r.code,parseInt(r.defaultValue)):r.dataType==="Decimal"?this.setData(a,r.code,parseFloat(r.defaultValue)):r.dataType==="Boolean"&&r.defaultValue.toUpperCase=="TRUE"?this.setData(a,r.code,!0):r.dataType==="Boolean"&&r.defaultValue.toUpperCase=="FALSE"?this.setData(a,r.code,!1):this.setData(a,r.code,r.defaultValue);else r.dataType==="Boolean"?this.setData(a,r.code,!1):this.setData(a,r.code,null)}),a},addNew(){this.staticData.push(this.getDefaultData()),this.loadData()},getSelected(){return this.selectedData},setSelected(a){this.selectedData=[],a.forEach(r=>{this.selectedData.push(r)}),this.static?(this.staticData.forEach(r=>{r._checked=this.selectedData.some(o=>r.id===o.id)}),this.loadData()):this.data.forEach(r=>{r._checked=this.selectedData.some(o=>r.id===o.id)}),this.data=this.copy(this.data)},validate(){for(let a=0;a<this.staticData.length;a++){let r=this.staticData[a];for(let o=0;o<this.columns.length;o++){let s=this.columns[o];if(r._isShow&&r._isShow[s.code]==!1)continue;if(s.isShow==!1)continue;let l=s.isRequired;if((s.requiredJson||"").trim()){let u=JSON.parse(s.requiredJson);(u.type=="Condition"||u.type=="Expression")&&(l=this.judgeCondition(u,r))}if(l){let u=this.parseData(r,s.code);if(u==null||!(String(u)||"").trim())return this.error("Front_Msg_Row_Column_Required|"+(a+1)+"|"+s.name),!1}}}return!0},getData(){let a=null;return this.static?a=this.copy(this.staticData):a=this.copy(this.data),a.forEach(r=>{delete r._checked,delete r._dataSource,delete r._needRefresh,delete r._needClear,delete r._rawData}),a},resetFilter(){for(let a in this.filterData)delete this.filterData[a]},search(){typeof this.onSearch=="function"?this.onSearch():this.loadData()},async moreClick(a){!this.inited&&(await this.init(this.viewCode),!this.inited)||(this.static?a==="exportExcel"?dataViewApi.exportExcel(this.tableView,this.staticData,this.columns.filter(r=>r.slot=="normal")):a==="exportPdf"?dataViewApi.exportPdf(this.tableView,this.staticData,this.columns.filter(r=>r.slot=="normal")):a==="print"?dataViewApi.print(this.tableView,this.staticData,this.columns.filter(r=>r.slot=="normal")):a==="batchEdit"&&this.error("Front_Msg_Not_Supported"):a==="exportExcel"?this.exportExcel():a==="exportPdf"?this.exportPdf():a==="print"?this.print():a==="batchEdit"&&this.$refs.batchEditTable.init(this.tableView.batchEditView,async()=>{let r;this.tableView.isCustom?r=await customModelApi.query(this.tableView.model,{}):r=await modelApi.query(this.tableView.model,{}),this.$refs.batchEditTable.loadData(r.data),this.$refs.batchEditTable.open()}))},exportExcel(){let a={...this.getAllFilter(),orderBy:this.orderBy};this.tableView.isCustom?customModelApi.exportExcel(this.tableView,a):this.tableView.isDataSource?dataSourceApi.exportExcel(this.tableView,a):modelApi.exportExcel(this.tableView,a)},exportPdf(){let a={...this.getAllFilter(),orderBy:this.orderBy};this.tableView.isCustom?customModelApi.exportPdf(this.tableView,a):this.tableView.isDataSource?dataSourceApi.exportPdf(this.tableView,a):modelApi.exportPdf(this.tableView,a)},print(){let a={...this.getAllFilter(),orderBy:this.orderBy};this.tableView.isCustom?customModelApi.printList(this.tableView,a):this.tableView.isDataSource?dataSourceApi.printList(this.tableView,a):modelApi.printList(this.tableView,a)},initDataSource(){this.columns.forEach(a=>{(a.controlType=="Select"||a.controlType=="MultiSelect"||a.controlType=="SelectWithOther"||a.controlType=="ComboSelect"||a.controlType=="MultiComboSelect"||a.controlType=="Radio"||a.controlType=="CheckGroup")&&(a.isStaticItem?this.data.forEach(r=>{if(!r._dataSource)r._dataSource={},r._rawData={},r._needRefresh={},r._needClear={};else if(r._dataSource[a.code])return;r._dataSource[a.code]=[],r._rawData[a.code]=[],(a.itemData||"").trim()&&a.itemData.split(/[\n]/).forEach(o=>{if((o||"").trim())if(o.split(":").length>1){let s=o.split(":")[0],l=o.split(":")[1];r._dataSource[a.code].push({id:s,name:l})}else r._dataSource[a.code].push({id:o,name:o})})}):!!(a.source||"").trim()&&!(a.dataType&&a.dataType.startsWith("Enum:"))&&this.data.forEach(r=>{if(r._dataSource&&r._dataSource[a.code])return;let o=this.getParam(r,a,this.parentData);o!=null&&this.fillDataSource(r,a,o)}))})},initTrigger(){this.columns.forEach(a=>{a.triggers=[]}),this.columns.filter(a=>!a.isStaticItem&&!!(a.source||"").trim()&&!!(a.param||"").trim()&&!(a.dataType&&a.dataType.startsWith("Enum:"))).forEach(a=>{let r=JSON.parse(a.param);for(let o in r)this.columns.filter(s=>r[o]==s.code||r[o].split(".")[0]+"ID"==s.code).forEach(s=>{s.triggers.push(this.copy(a))})})},async fillDataSource(a,r,o){a._dataSource||(a._dataSource={},a._rawData={},a._needRefresh={},a._needClear={}),(r.controlType==="ComboSelect"||r.controlType==="MultiComboSelect")&&(o.per=20),this.disableLoader();let s;if(r.isSourceCustom?s=await customModelApi.query(r.source,o):s=await modelApi.query(r.source,o),this.enableLoader(),a._rawData[r.code]=s.data,a._dataSource[r.code]=s.data.map(l=>({id:(r.sourceDataCode||"").trim()?this.parseData(l,r.sourceDataCode):l.id,name:this.parseData(l,r.sourceDisplayCode)})),a&&this.parseData(a,r.code)==null&&r.isDefaultFirst&&s.data.length>0&&(this.setData(a,r.code,this.parseData(s.data[0],r.sourceDataCode)),r.sourceDataCode=="id"&&r.code.length>2)){let l=r.code.substr(0,r.code.length-2);if(a._rawData&&a._rawData[r.code]){let u=a._rawData[r.code].find(c=>c.id==this.parseData(a,r.code));this.setData(a,l,u)}}this.data=this.data.map(l=>l),this.onDataChange(a,r)},getDataSource(a,r){if(!r.isStaticItem&&r.dataType.startsWith("Enum:"))return this.getEnumList(r.dataType.split(":")[1]);if(a._dataSource!=null&&a._dataSource[r.code]!=null)return a._dataSource[r.code]},pageSizeChange(a){this.size=a,this.loadData()},sortChange({key:a,order:r}){let o=[];this.orderBy&&(o=this.orderBy.split(",")),o=o.filter(s=>s.substring(1)!==a),r==="asc"?o.unshift("+"+a):r==="desc"&&o.unshift("-"+a),this.orderBy=o.join(","),this.loadData()},columnWidthResize(a,r,o){let s={},l=localStorage.getItem("columnWidth_"+this.tableView.code);l&&(s=JSON.parse(l)),s[o.code]=a,localStorage.setItem("columnWidth_"+this.tableView.code,JSON.stringify(s))},onSelectDataChange(a,r,o){let s;r.code.endsWith("ID")&&(s=r.code.substr(0,r.code.length-2));let l=null;if(typeof o=="object")if(o instanceof Array){l=[];for(let u of o)typeof u=="object"?l.push(u):a._rawData&&a._rawData[r.code]?l.push(a._rawData[r.code].find(c=>this.parseData(c,r.sourceDataCode)==u)):l.push(u)}else l=o;else a._rawData&&a._rawData[r.code]?l=a._rawData[r.code].find(u=>this.parseData(u,r.sourceDataCode)==o):l=o;s&&this.setData(a,s,l),this.onDataChange(a,r,l)},onDataChange(a,r,o){for(this.setShowStatus(a),this.calc(a,r),this.$emit("on-change",a,r,o),(r==null||r.triggers!==[])&&this.columns.forEach(function(s){!s.isStaticItem&&!!(s.source||"").trim()&&!(s.dataType&&s.dataType.startsWith("Enum:"))&&(r==null||r.triggers.some(l=>l.code==s.code))&&a._needRefresh&&(a._needRefresh[s.code]=!0)});;){let s=this.columns.filter(l=>a._needRefresh&&a._needRefresh[l.code]==!0||a._needClear&&a._needClear[l.code]==!0)[0];if(s==null)break;if(a._needClear[s.code]&&this.parseData(a,s.code)!=null)this.setData(a,s.code,null),s.triggers.forEach(l=>{a._needClear[l.code]=!0});else if(a._needRefresh[s.code]&&!!(s.source||"").trim()&&!(s.dataType&&s.dataType.startsWith("Enum:"))){let l=this.getParam(a,s,this.parentData);s.controlType==="Select"||s.controlType==="SelectWithOther"||s.controlType==="ComboSelect"||s.controlType==="MulitSelect"||s.controlType==="Radio"||s.controlType==="CheckGroup"?l!=null?this.fillDataSource(a,s,l):(a._dataSource[s.code]=[],this.setData(a,s.code,null),s.triggers.forEach(u=>{a._needClear[u.code]=!0})):(s.controlType==="DialogSelect"||s.controlType==="MultiDialogSelect")&&l==null&&(this.setData(a,s.code,null),s.triggers.forEach(u=>{a._needClear[u.code]=!0}))}a._needClear[s.code]=!1,a._needRefresh[s.code]=!1}},calc(a,r){for(let o=0;o<this.columns.length;o++){let s=this.columns[o];if((s.calculate||"").trim()){let l=this.getTriggers(s.calculate);if(!r||l.some(u=>u==r.code)){let u=this.calculate(s.calculate,a);s.digit!=null&&(u=this.keepDecimal(u,s.digit,s.fixedDigit)),this.setData(a,s.code,u)}}}},onBlur(a,r){this.$emit("on-blur",a,r)},tableSettingOpen(){this.tableSettingActive=!0,setTimeout(()=>{this.$refs.tableSetting.open(this.tableView,this.copy(this.tableView.columns))})},filterSettingOpen(){this.filterSettingActive=!0,setTimeout(()=>{this.$refs.filterSetting.open(this.tableView,this.copy(this.tableView.filterColumns))})},onSelectionChange(a){this.getDataWithChildren(this.data).forEach(o=>{const s=this.selectedData.findIndex(l=>l.id==o.id);a.some(l=>l.id==o.id)?s==-1&&this.selectedData.push(o):s!=-1&&this.selectedData.splice(s,1)}),this.$emit("on-select-change")},onKeyup(a){if(a){var r=window.event?a.keyCode:a.which;if(!r||r!==0&&r!==1&&r!==13)return}this.search()},getAllFilter(){var r,o;let a={...this.viewFilter,...(r=this.filter)!=null?r:{},...(o=this.filterData)!=null?o:{}};for(let s in a)this.isJSON(a[s])?a[s]=JSON.parse(a[s]).join(","):typeof a[s]=="object"&&!(a[s]instanceof Date)&&delete a[s];return a},getFilterResult(){var r,o;let a=this.staticData;if(!this.filterDisable){let s={...this.viewFilter,...(r=this.filter)!=null?r:{},...(o=this.filterData)!=null?o:{}};for(let l in s){let u=l,c=s[l];c==null||c==""||this.filterColumns.some(d=>d.code==l&&d.operator=="Custom")||typeof c=="object"&&!(c instanceof Date)||u!="keywordColumns"&&(a=a.filter(d=>{if((u.startsWith("d_")||u.startsWith("m_")||u.startsWith("y_"))&&(u=u.substr(2)),u=="keyword"){let f=s.keywordColumns.split(",");for(let h=0;h<f.length;h++){let p=f[h];if(this.parseData(d,p)!=null&&this.parseData(d,p).indexOf(c)>=0)return!0}return!1}else if(u.endsWith("_g")){let f=u.substr(0,u.length-2);return c instanceof Date?new Date(this.parseData(d,f))>c:this.parseData(d,f)>c}else if(u.endsWith("_l")){let f=u.substr(0,u.length-2);return c instanceof Date?new Date(this.parseData(d,f))<c:this.parseData(d,f)<c}else if(u.endsWith("_ge")){let f=u.substr(0,u.length-3);return c instanceof Date?new Date(this.parseData(d,f))>=c:this.parseData(d,f)>=c}else if(u.endsWith("_le")){let f=u.substr(0,u.length-3);return c instanceof Date?new Date(this.parseData(d,f))<=c:this.parseData(d,f)<=c}else if(u.endsWith("_n")){let f=u.substr(0,u.length-2);if(typeof c=="string"){for(let h=0;h<c.split(",").length;h++)if(this.parseData(d,f)!=c.split(",")[h])return!0;return!1}else return c instanceof Date?new Date(this.parseData(d,f))!=c:this.parseData(d,f)!=c}else if(u.endsWith("_c")){let f=u.substr(0,u.length-2);return this.parseData(d,f)!=null&&this.parseData(d,f).indexOf(c)>=0}else{let f=u;return typeof c=="string"?this.isJSON(c)?JSON.parse(c).some(h=>h==this.parseData(d,f)):c.split(",").some(h=>h==this.parseData(d,f)):c instanceof Date?new Date(this.parseData(d,f))==c:this.parseData(d,f)==c}}))}}if((this.orderBy||"").trim()){let s=this.orderBy.split(",")[0],l=s.substr(0,1),u=s.substr(1);a.sort((c,d)=>{let f=this.parseData(c,u),h=this.parseData(d,u);return f==h?0:f>h||h==null?l=="+"?1:-1:l=="+"?-1:1})}return a},async onLoadData(a,r){if(this.treeLoad!=null){let o=await this.treeLoad(a);o.forEach(s=>{(this.hasChildren==null||this.hasChildren(s))&&(s._loading=!1,s.children=[])}),r(o)}},dragDrop(a,r){this.$emit("on-drag-drop",{index1:a,index2:r})},openSelectItem(){let a=[],r=this.tableView.batchSelectDataCode,o=r.substr(0,r.length-2);for(let s=0;s<this.staticData.length;s++)a.push(this.staticData[s][o]);this.$refs.itemSelect.setSelected(a),this.$refs.itemSelect.open()},saveItemSelect(){let a=this.$refs.itemSelect.getSelected(),r=this.tableView.batchSelectDataCode,o=r.substr(0,r.length-2);this.staticData=this.staticData.filter(s=>a.some(l=>l.id==s[r]));for(let s=0;s<a.length;s++)if(!this.staticData.some(l=>l[r]==a[s].id)){let l=this.getDefaultData();l[r]=a[s].id,l[o]=a[s],this.staticData.push(l)}this.loadData(this.staticData),this.$refs.itemSelect.close()},clickCommandButton(a,r){r.viewType=="TableView"?this.$refs.modalTable.init(r.viewCode,async()=>{if((r.formViewCode||"").trim()&&this.$refs.modalForm.init(r.formViewCode),this.commandButtonParams={},(r.params||"").trim()){let o=JSON.parse(r.params);for(let s=0;s<o.length;s++){let l=this.parseData(a,o[s].value);this.commandButtonParams[o[s].param]=l}}this.$refs.modalTable.open(this.commandButtonParams)}):this.$refs.modalForm.init(r.formViewCode,async()=>{this.$refs.modalForm.open(a)})},previewImage(a){this.imageUrl=a,this.preview=!0},handleSpan({row:a,column:r,rowIndex:o,columnIndex:s}){if(this.spanMethod!=null)return this.spanMethod(a,r,o,s);if(r.mergeSame){if(o!=0&&this.parseData(a,r.code)==this.parseData(this.data[o-1],r.code))return[0,0];let l=0;for(let u=o;u<this.data.length;u++)if(this.parseData(a,r.code)==this.parseData(this.data[u],r.code))l++;else return[l,1];return[l,1]}},judge(a,r,o){if((r||"").trim()){let s=JSON.parse(r);if(s.type=="Condition"||s.type=="Expression")return this.judgeCondition(s,o)}return a},isShow(a,r){return a._isShow!=null&&a._isShow[r.code]!=null?a._isShow[r.code]:r.isShow},isReadonly(a,r){return this.readonly==!0?!0:a._isReadonly!=null&&a._isReadonly[r.code]!=null?a._isReadonly[r.code]:r.isReadonly},batchSave(){!this.$refs.batchEditTable.validate()||this.confirm("Front_Msg_Sure_To_Save",async()=>{let a=this.$refs.batchEditTable.data;this.tableView.isCustom?await customModelApi.batchSave(this.tableView.model,a):await modelApi.batchSave(this.tableView.model,a),this.success("Front_Msg_Success",()=>{this.$refs.batchEditTable.close(),this.loadData()})})},rowData(a,r){return this.treeEnable?a:this.data[r]},getDataWithChildren(a){let r=[];return a.forEach(o=>{r.push(o),o.children&&(r=r.concat(this.getDataWithChildren(o.children)))}),r},setShowStatus(a){for(let r of this.columns){if((r.showJson||"").trim()){a._isShow==null&&(a._isShow={});let o=JSON.parse(r.showJson);(o.type=="Condition"||o.type=="Expression")&&(a._isShow[r.code]=this.judgeCondition(o,a))}if((r.readonlyJson||"").trim()){a._isReadonly==null&&(a._isReadonly={});let o=JSON.parse(r.readonlyJson);(o.type=="Condition"||o.type=="Expression")&&(a._isReadonly[r.code]=this.judgeCondition(o,a))}}},getNameI18n(a){if(a)if(this.layout.showI18n){if(a.code){let r="DataView_"+this.tableView.code+"_"+a.code,o=this.$t(r);return o==r?a.name:o}}else return a.name},up(a,r){let o=this.staticData;if(r>0){o.splice(r,1),o.splice(r-1,0,a);for(let s of o)delete s.id;this.loadData(o)}},down(a,r){let o=this.staticData;if(r<o.length-1){o.splice(r,1),o.splice(r+1,0,a);for(let s of o)delete s.id;this.loadData(o)}},clear(){this.staticData=[],this.data=[]},parseDataWithOther(a,r){let o=r.code,s=this.parseData(a,o+"_o"),l=this.parseData(a,o),u=this.getDataSource(a,r);return s!=null?s:l==null?null:u&&u.some(c=>c.id==l)?l:"__Other"},setDataWithOther(a,r,o){this.setData(a,r+"_o",o),o!="__Other"?this.setData(a,r,o):this.setData(a,r,null)},getJustify(a){return a=="Left"?"start":a=="Center"?"center":(a=="Right","end")},async loadOption(a,r,o){if(r.isStaticItem||r.dataType&&r.dataType.startsWith("Enum:"))return;let s=this.getParam(a,r);s!=null?(s[r.sourceDisplayCode+"_c"]=o,this.fillDataSource(a,r,s)):(a._rawData[r.code]=[],a._dataSource[r.code]=[],this.setData(a,r.code,null),r.triggers.forEach(l=>{l.needClear=!0}))},parseComboData(a,r,o){let s=this.parseData(a,r.code);return setTimeout(()=>{this.loadComboDataLabel(a,r,s,o)}),s},parseMultiComboData(a,r,o){let s=[],l=this.parseData(a,r.code);return this.isJSON(l)&&(s=JSON.parse(l)),setTimeout(()=>{this.loadComboDataLabel(a,r,s,o)}),s},async loadComboDataLabel(a,r,o,s){if(!(r.isStaticItem||r.dataType&&r.dataType.startsWith("Enum:"))&&this.$refs["control_"+r.code+"_"+s]&&o){let l=this.$refs["control_"+r.code+"_"+s].$data.values,u=[];if(r.controlType=="MultiComboSelect")o.forEach(c=>{if(!l.some(d=>d.value==c)){let d={value:c,label:null,disabled:!1};l.push(d),u.push(d)}});else if(!l.some(c=>c.value==o)){let c={value:o,label:null,disabled:!1};l.push(c),u.push(c)}if(u.length>0){let c=this.getParam(a,r);c[r.sourceDataCode]=u.map(f=>f.value).join(",");let d;r.isSourceCustom?d=await customModelApi.query(r.source,c):d=await modelApi.query(r.source,c),d.data.forEach(f=>{let h=this.parseData(f,r.sourceDataCode),p=this.parseData(f,r.sourceDisplayCode);r.controlType=="ComboSelect";let v=u.find(g=>g.value==h);v&&(v.label=p),this.$forceUpdate()})}}}}},_hoisted_1$Q={class:"title"},_hoisted_2$r={ref:"filterCommand"},_hoisted_3$m=["title","innerHTML"],_hoisted_4$h=["href","target"],_hoisted_5$9=["innerHTML"],_hoisted_6$8={key:10,style:{display:"flex"}},_hoisted_7$6=["href"],_hoisted_8$6={style:{margin:"auto 4px"}},_hoisted_9$6=["onClick","src"],_hoisted_10$4={class:"ivu-mt ivu-text-right"},_hoisted_11$3={style:{"text-align":"center"}},_hoisted_12$3=["download"],_hoisted_13$3=["src"];function _sfc_render$_(a,r,o,s,l,u){const c=require$$0.resolveComponent("Divider"),d=require$$0.resolveComponent("table-filter"),f=require$$0.resolveComponent("Button"),h=require$$0.resolveComponent("Icon"),p=require$$0.resolveComponent("DropdownItem"),v=require$$0.resolveComponent("DropdownMenu"),g=require$$0.resolveComponent("Dropdown"),y=require$$0.resolveComponent("FormItem"),$=require$$0.resolveComponent("Col"),_=require$$0.resolveComponent("Row"),C=require$$0.resolveComponent("Form"),b=require$$0.resolveComponent("Input"),w=require$$0.resolveComponent("Option"),x=require$$0.resolveComponent("Select"),D=require$$0.resolveComponent("dialog-select"),A=require$$0.resolveComponent("DatePicker"),E=require$$0.resolveComponent("TimePicker"),P=require$$0.resolveComponent("Checkbox"),O=require$$0.resolveComponent("Switch"),q=require$$0.resolveComponent("Radio"),M=require$$0.resolveComponent("RadioGroup"),R=require$$0.resolveComponent("CheckboxGroup"),L=require$$0.resolveComponent("Slider"),F=require$$0.resolveComponent("Table"),N=require$$0.resolveComponent("Page"),H=require$$0.resolveComponent("modal-table"),B=require$$0.resolveComponent("table-setting"),X=require$$0.resolveComponent("filter-setting"),J=require$$0.resolveComponent("item-select"),ie=require$$0.resolveComponent("modal-form"),de=require$$0.resolveComponent("Modal");return require$$0.openBlock(),require$$0.createElementBlock("div",{class:require$$0.normalizeClass({"full-screen":l.isFullScreen})},[o.title!=null?(require$$0.openBlock(),require$$0.createBlock(c,{key:0,plain:!0,dashed:"",orientation:"left",size:"small"},{default:require$$0.withCtx(()=>[require$$0.createElementVNode("span",_hoisted_1$Q,require$$0.toDisplayString(o.title),1)]),_:1})):require$$0.createCommentVNode("v-if",!0),require$$0.createCommentVNode(`\r
|
|
307
307
|
@slot \u9876\u90E8\r
|
|
308
308
|
`),require$$0.renderSlot(a.$slots,"top",{},void 0,!0),require$$0.withDirectives(require$$0.createVNode(C,{model:o.filter,"label-width":l.tableView.filterTitleWidth?l.tableView.filterTitleWidth:a.layout.filterWidth,"label-colon":"\uFF1A","label-position":"right",class:"filter",onSubmit:r[3]||(r[3]=require$$0.withModifiers(()=>{},["prevent"]))},{default:require$$0.withCtx(()=>[require$$0.createElementVNode("div",_hoisted_2$r,[require$$0.createVNode(_,{gutter:24,type:"flex",justify:u.getJustify(l.tableView.filterAlign)},{default:require$$0.withCtx(()=>[require$$0.createCommentVNode(`\r
|
|
309
309
|
@slot \u7B5B\u9009\u680F\r
|
package/package.json
CHANGED
package/src/mixins/page.js
CHANGED
|
@@ -110,7 +110,7 @@ export default {
|
|
|
110
110
|
return this.userPermissions[key];
|
|
111
111
|
} else {
|
|
112
112
|
// 页面权限点
|
|
113
|
-
let url = router.currentRoute.value.fullPath.substr(1);
|
|
113
|
+
let url = router.currentRoute.value.fullPath.substr(1).split('?')[0];
|
|
114
114
|
|
|
115
115
|
if (this.userPermissions[url + '$' + key] == true) {
|
|
116
116
|
return true;
|
|
@@ -301,13 +301,7 @@ export default {
|
|
|
301
301
|
|
|
302
302
|
let permissions = {};
|
|
303
303
|
res.permissions.forEach(key => {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
if (key.split('$').length > 1) {
|
|
307
|
-
permissionKey = permissionKey + '$' + key.split('$')[1];
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
permissions[permissionKey] = true;
|
|
304
|
+
permissions[key.split('?')[0]] = true;
|
|
311
305
|
});
|
|
312
306
|
|
|
313
307
|
state.userPermissions = permissions;
|