agilebuilder-ui 1.1.37 → 1.1.38-sit1
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/lib/{401-9314ce87.js → 401-00dc5c6a.js} +1 -1
- package/lib/{404-572d631d.js → 404-da4b5e44.js} +1 -1
- package/lib/{iframe-page-87c9c0d0.js → iframe-page-9211c46a.js} +1 -1
- package/lib/{index-79b98485.js → index-398aaf91.js} +8956 -8827
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.js +1 -1
- package/lib/super-ui.umd.cjs +76 -73
- package/lib/{tab-content-iframe-index-070ce653.js → tab-content-iframe-index-2a5e10d0.js} +1 -1
- package/lib/{tab-content-index-3b98efb4.js → tab-content-index-b4e908df.js} +22 -22
- package/lib/{tache-subprocess-history-46442012.js → tache-subprocess-history-b4622487.js} +1 -1
- package/package.json +1 -1
- package/packages/fs-upload-new/src/fs-button-upload.vue +12 -0
- package/packages/fs-upload-new/src/fs-drag-upload.vue +12 -0
- package/packages/fs-upload-new/src/fs-preview-new.vue +25 -5
- package/packages/fs-upload-new/src/fs-upload-new.vue +20 -0
- package/packages/super-grid/src/apis.js +4 -0
- package/packages/super-grid/src/components/grid-radio-input.vue +104 -0
- package/packages/super-grid/src/dynamic-input.vue +48 -25
- package/packages/super-grid/src/formValidatorUtil.js +7 -2
- package/packages/super-grid/src/normal-column-content.vue +9 -1
- package/packages/super-grid/src/row-operation.vue +13 -9
- package/packages/super-grid/src/search-form-item.vue +461 -461
- package/packages/super-grid/src/super-grid.vue +22 -3
- package/packages/super-grid/src/utils.js +16 -2
- package/packages/utils/value-set.js +25 -33
- package/src/api/sso-service.js +2 -1
- package/src/permission.js +2 -1
- package/src/store/modules/user.js +4 -1
- package/src/utils/common-util.js +1 -0
- package/src/utils/permissionAuth.js +7 -5
- package/src/utils/util.js +16 -0
- package/src/views/dsc-component/Sidebar/Item.vue +15 -4
- package/src/views/dsc-component/Sidebar/SidebarItem.vue +10 -2
- package/src/views/layout/components/Menubar/Item.vue +14 -3
- package/src/views/layout/components/Menubar/SidebarItem.vue +9 -1
- package/vite.config.js +1 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { openBlock as r, createElementBlock as t, createCommentVNode as o } from "vue";
|
|
2
|
-
import { _ as s } from "./index-
|
|
2
|
+
import { _ as s } from "./index-398aaf91.js";
|
|
3
3
|
const u = ["src"], f = s({ data: () => ({ src: null }), watch: { $route(n, c) {
|
|
4
4
|
this.src = this.$route.query.src;
|
|
5
5
|
} }, mounted() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as f, c as _, g as x, b as P, s as h, m as M, M as O, i as I } from "./index-
|
|
2
|
-
import { resolveComponent as u, openBlock as
|
|
1
|
+
import { _ as f, c as _, g as x, b as P, s as h, m as M, M as O, i as I } from "./index-398aaf91.js";
|
|
2
|
+
import { resolveComponent as u, openBlock as l, createBlock as b, withCtx as g, createVNode as v, TransitionGroup as L, createElementBlock as p, Fragment as C, renderList as T, createElementVNode as m, toDisplayString as w, normalizeClass as S, createCommentVNode as y } from "vue";
|
|
3
3
|
const k = { class: "no-redirect" }, A = f({ name: "Breadcrumb", data: () => ({ levelList: null }), computed: { levelListWithTitle() {
|
|
4
4
|
return this.levelList.filter((e) => e.meta.title !== void 0 && e.meta.title !== null);
|
|
5
5
|
} }, watch: { $route() {
|
|
@@ -8,7 +8,7 @@ const k = { class: "no-redirect" }, A = f({ name: "Breadcrumb", data: () => ({ l
|
|
|
8
8
|
this.getBreadcrumb();
|
|
9
9
|
}, methods: { getBreadcrumb() {
|
|
10
10
|
const { params: e } = this.$route;
|
|
11
|
-
this.$route.matched;
|
|
11
|
+
console.log("this.$route.matched==", this.$route.matched);
|
|
12
12
|
let t = this.$route.matched.filter((a) => {
|
|
13
13
|
if (a.name) {
|
|
14
14
|
var r = _(a.path);
|
|
@@ -17,12 +17,12 @@ const k = { class: "no-redirect" }, A = f({ name: "Breadcrumb", data: () => ({ l
|
|
|
17
17
|
});
|
|
18
18
|
if (t) {
|
|
19
19
|
let a;
|
|
20
|
-
const r = x(),
|
|
21
|
-
|
|
22
|
-
const s = P.get("selectMenu"),
|
|
23
|
-
let
|
|
24
|
-
if (
|
|
25
|
-
const i =
|
|
20
|
+
const r = x(), o = window.$vueApp.config.globalProperties.systemNameObj;
|
|
21
|
+
o && (a = o[r]), t = [{ path: "/", redirect: "noredirect", meta: { title: a } }].concat(t);
|
|
22
|
+
const s = P.get("selectMenu"), d = window.$vueApp.config.globalProperties._selectMenu;
|
|
23
|
+
let n;
|
|
24
|
+
if (d ? n = d : s && (n = s), n) {
|
|
25
|
+
const i = n.substring(0, n.indexOf("~~")), c = n.substring(n.indexOf("~~") + 2);
|
|
26
26
|
if (t && t.length > 0) {
|
|
27
27
|
const $ = t[t.length - 1];
|
|
28
28
|
this.isShouldConcatLastMenu(c, i, $) && t.push({ path: i, meta: { title: c } });
|
|
@@ -35,9 +35,9 @@ const k = { class: "no-redirect" }, A = f({ name: "Breadcrumb", data: () => ({ l
|
|
|
35
35
|
return !(!this.isTitleNotEqual(e, a) || !this.isPathNotEqual(t, a));
|
|
36
36
|
}, isTitleNotEqual(e, t) {
|
|
37
37
|
return !(!e || !t.meta || e === t.meta.title || e === this.$t(t.meta.title));
|
|
38
|
-
}, isPathNotEqual: (e, t) => !(!e || !t.path || e === t.path) } }, [["render", function(e, t, a, r,
|
|
39
|
-
const
|
|
40
|
-
return
|
|
38
|
+
}, isPathNotEqual: (e, t) => !(!e || !t.path || e === t.path) } }, [["render", function(e, t, a, r, o, s) {
|
|
39
|
+
const d = u("el-breadcrumb-item"), n = u("el-breadcrumb");
|
|
40
|
+
return l(), b(n, { class: "app-breadcrumb", separator: ">" }, { default: g(() => [v(L, { name: "breadcrumb", tag: "span" }, { default: g(() => [(l(!0), p(C, null, T(s.levelListWithTitle, (i, c) => (l(), b(d, { key: i.path + "-" + c }, { default: g(() => [m("span", k, w(e.$t(i.meta.title)), 1)]), _: 2 }, 1024))), 128))]), _: 1 })]), _: 1 });
|
|
41
41
|
}], ["__scopeId", "data-v-768a430c"]]), { body: B } = document, E = { watch: { $route(e) {
|
|
42
42
|
this.device === "mobile" && this.sidebar.opened && h.dispatch("closeSidebar", { withoutAnimation: !1 });
|
|
43
43
|
} }, beforeMount() {
|
|
@@ -76,8 +76,8 @@ const k = { class: "no-redirect" }, A = f({ name: "Breadcrumb", data: () => ({ l
|
|
|
76
76
|
if (e.routePath === "/iframe-page/page") {
|
|
77
77
|
let a, r = "";
|
|
78
78
|
if (e.routeQuery)
|
|
79
|
-
for (const
|
|
80
|
-
|
|
79
|
+
for (const o in e.routeQuery)
|
|
80
|
+
o === "src" ? a = e.routeQuery[o] : r += o + "=" + e.routeQuery[o] + "&";
|
|
81
81
|
a && (t = a), r && (t += "?" + r);
|
|
82
82
|
} else if (e.routePath.indexOf("http:") < 0 && e.routePath.indexOf("https:") < 0 && (t = "#"), t = e.routePath.indexOf("?") >= 0 ? t + e.routePath + "&" : t + e.routePath + "?", e.routeQuery)
|
|
83
83
|
for (const a in e.routeQuery)
|
|
@@ -87,16 +87,16 @@ const k = { class: "no-redirect" }, A = f({ name: "Breadcrumb", data: () => ({ l
|
|
|
87
87
|
if (e && typeof e.data == "string" && e.data === "refreshTabContent")
|
|
88
88
|
window.location.reload();
|
|
89
89
|
else if (e && typeof e.data == "string" && e.data.indexOf("loginTimeout") >= 0)
|
|
90
|
-
e.data, window.parent.postMessage(e.data, "*");
|
|
90
|
+
console.log("tab-content-接收到登录超时的信息---event.data=", e.data), window.parent.postMessage(e.data, "*");
|
|
91
91
|
else if (e && typeof e.data == "string" && e.data === "return-to-system-list") {
|
|
92
92
|
this.$store.commit("clear_tabs");
|
|
93
93
|
let t = "_IS_APP_LIST";
|
|
94
94
|
const a = window.sessionStorage.getItem(t);
|
|
95
95
|
a !== void 0 && a === "true" ? this.$router.push({ path: "/mms/apps/list" }) : this.$router.push({ path: "/mms/systems/list" });
|
|
96
96
|
}
|
|
97
|
-
} } }, V = ["src"], Q = { key: 1, class: "default-page-tip" }, R = { class: "default-page-tip-msg" }, q = { class: "default-page-tip-item" }, z = { class: "default-page-tip-item" }, j = { class: "main-container" }, W = f({ name: "Layout", components: { Menubar: O, Breadcrumb: A, TabContent: f(N, [["render", function(e, t, a, r,
|
|
98
|
-
const
|
|
99
|
-
return e.openTab && e.openTab.length > 0 ? (
|
|
97
|
+
} } }, V = ["src"], Q = { key: 1, class: "default-page-tip" }, R = { class: "default-page-tip-msg" }, q = { class: "default-page-tip-item" }, z = { class: "default-page-tip-item" }, j = { class: "main-container" }, W = f({ name: "Layout", components: { Menubar: O, Breadcrumb: A, TabContent: f(N, [["render", function(e, t, a, r, o, s) {
|
|
98
|
+
const d = u("el-tab-pane"), n = u("el-tabs");
|
|
99
|
+
return e.openTab && e.openTab.length > 0 ? (l(), b(n, { key: 0, modelValue: s.activeIndex, "onUpdate:modelValue": t[0] || (t[0] = (i) => s.activeIndex = i), class: "nav-tab menu-tab-container", closable: "", onTabRemove: s.closeSelectedTag }, { default: g(() => [(l(!0), p(C, null, T(e.openTab, (i) => (l(), b(d, { key: i.code, label: i.name, name: i.code }, { default: g(() => [m("iframe", { ref_for: !0, ref: "tabMainContent", src: s.getFullPath(i), class: "tab-main-content", name: "tab-main-content", frameborder: "0" }, null, 8, V)]), _: 2 }, 1032, ["label", "name"]))), 128))]), _: 1 }, 8, ["modelValue", "onTabRemove"])) : (l(), p("div", Q, [m("div", R, [m("div", q, w(o.defaultPageTipCn), 1), m("div", z, w(o.defaultPageTipEn), 1)])]));
|
|
100
100
|
}], ["__scopeId", "data-v-a5252a92"]]) }, mixins: [E], data: () => ({ showMenuRoute: I(), systemCode: null }), computed: { sidebar() {
|
|
101
101
|
return this.$store.state.app.sidebar;
|
|
102
102
|
}, device() {
|
|
@@ -104,12 +104,12 @@ const k = { class: "no-redirect" }, A = f({ name: "Breadcrumb", data: () => ({ l
|
|
|
104
104
|
}, classObj() {
|
|
105
105
|
return { hideSidebar: !this.sidebar.opened, openSidebar: this.sidebar.opened, withoutAnimation: this.sidebar.withoutAnimation, mobile: this.device === "mobile" };
|
|
106
106
|
} }, created() {
|
|
107
|
-
this.systemCode = window.$vueApp.config.globalProperties.customSystem, this.systemCode;
|
|
107
|
+
this.systemCode = window.$vueApp.config.globalProperties.customSystem, console.log("新菜单组件-----systemCode====", this.systemCode);
|
|
108
108
|
}, methods: { handleClickOutside() {
|
|
109
109
|
this.$store.dispatch("closeSidebar", { withoutAnimation: !1 });
|
|
110
|
-
} } }, [["render", function(e, t, a, r,
|
|
111
|
-
const
|
|
112
|
-
return
|
|
110
|
+
} } }, [["render", function(e, t, a, r, o, s) {
|
|
111
|
+
const d = u("menubar"), n = u("breadcrumb"), i = u("tab-content");
|
|
112
|
+
return l(), p("div", { class: S([s.classObj, "app-wrapper"]) }, [s.device === "mobile" && s.sidebar.opened ? (l(), p("div", { key: 0, class: "drawer-bg", onClick: t[0] || (t[0] = (...c) => s.handleClickOutside && s.handleClickOutside(...c)) })) : y("", !0), v(d, { "system-code": o.systemCode, collapse: !0, class: "sidebar-container" }, null, 8, ["system-code"]), m("div", j, [o.showMenuRoute ? (l(), b(n, { key: 0 })) : y("", !0), v(i)])], 2);
|
|
113
113
|
}], ["__scopeId", "data-v-5c0a6bf6"]]);
|
|
114
114
|
export {
|
|
115
115
|
W as default
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveComponent as t, openBlock as a, createElementBlock as s, createElementVNode as y, createVNode as l, withCtx as r, createTextVNode as n, toDisplayString as p, createCommentVNode as c, createBlock as h } from "vue";
|
|
2
|
-
import { _ as I } from "./index-
|
|
2
|
+
import { _ as I } from "./index-398aaf91.js";
|
|
3
3
|
const g = { style: { "padding-bottom": "10px" } }, k = { key: 0, class: "graphDiv" }, N = I({ name: "TacheSubprocessHistory", data: () => ({ type: "graph", workflowId: null }), created() {
|
|
4
4
|
const o = this.$route.query.workflowId;
|
|
5
5
|
o && (this.workflowId = parseInt(o));
|
package/package.json
CHANGED
|
@@ -27,6 +27,8 @@
|
|
|
27
27
|
<template v-if="fileList && fileList.length > 0">
|
|
28
28
|
<fs-preview-new
|
|
29
29
|
:disabled="disabled"
|
|
30
|
+
:absolute-preview="absolutePreview"
|
|
31
|
+
:absolute-downloadable="absoluteDownloadable"
|
|
30
32
|
:file-list="fileList"
|
|
31
33
|
:system-code="systemCode"
|
|
32
34
|
:before-remove="beforeRemove"
|
|
@@ -117,6 +119,16 @@ const props = defineProps({
|
|
|
117
119
|
beforeUpload: {
|
|
118
120
|
type: Function,
|
|
119
121
|
default: () => {}
|
|
122
|
+
},
|
|
123
|
+
// 是否禁用时也可预览
|
|
124
|
+
absolutePreview: {
|
|
125
|
+
type: Boolean,
|
|
126
|
+
default: false
|
|
127
|
+
},
|
|
128
|
+
// 是否禁用时也可下载
|
|
129
|
+
absoluteDownloadable: {
|
|
130
|
+
type: Boolean,
|
|
131
|
+
default: false
|
|
120
132
|
}
|
|
121
133
|
})
|
|
122
134
|
const baseURL = window.$vueApp.config.globalProperties.baseURL
|
|
@@ -24,6 +24,8 @@
|
|
|
24
24
|
<template v-if="fileList && fileList.length > 0">
|
|
25
25
|
<fs-preview-new
|
|
26
26
|
:disabled="disabled"
|
|
27
|
+
:absolute-preview="absolutePreview"
|
|
28
|
+
:absolute-downloadable="absoluteDownloadable"
|
|
27
29
|
:file-list="fileList"
|
|
28
30
|
:system-code="systemCode"
|
|
29
31
|
:before-remove="beforeRemove"
|
|
@@ -114,6 +116,16 @@ const props = defineProps({
|
|
|
114
116
|
beforeUpload: {
|
|
115
117
|
type: Function,
|
|
116
118
|
default: () => {}
|
|
119
|
+
},
|
|
120
|
+
// 是否禁用时也可预览
|
|
121
|
+
absolutePreview: {
|
|
122
|
+
type: Boolean,
|
|
123
|
+
default: false
|
|
124
|
+
},
|
|
125
|
+
// 是否禁用时也可下载
|
|
126
|
+
absoluteDownloadable: {
|
|
127
|
+
type: Boolean,
|
|
128
|
+
default: false
|
|
117
129
|
}
|
|
118
130
|
})
|
|
119
131
|
const baseURL = window.$vueApp.config.globalProperties.baseURL
|
|
@@ -7,12 +7,19 @@
|
|
|
7
7
|
<div style="display: flex; align-items: center">
|
|
8
8
|
<!-- 'amb-color-icon-XLS' -->
|
|
9
9
|
<super-icon :iconValue="getFileIconByName(file.showName)" />
|
|
10
|
-
<
|
|
11
|
-
<span style="cursor:
|
|
10
|
+
<template v-if="disabled && !absolutePreview">
|
|
11
|
+
<span style="cursor: no-drop">
|
|
12
12
|
<span style="margin-left: 6.5px">{{ file.showName }}</span>
|
|
13
13
|
</span>
|
|
14
|
-
</
|
|
15
|
-
<
|
|
14
|
+
</template>
|
|
15
|
+
<template v-if="!disabled || absolutePreview">
|
|
16
|
+
<el-tooltip content="预览" placement="top">
|
|
17
|
+
<span style="cursor: pointer" @click="preview(file.showName, file.serverPath)">
|
|
18
|
+
<span style="margin-left: 6.5px">{{ file.showName }}</span>
|
|
19
|
+
</span>
|
|
20
|
+
</el-tooltip>
|
|
21
|
+
</template>
|
|
22
|
+
<el-tooltip v-if="!disabled || absoluteDownloadable" content="下载" placement="top">
|
|
16
23
|
<el-icon style="margin-left: 10px" @click="handleDownload(file)">
|
|
17
24
|
<Download />
|
|
18
25
|
</el-icon>
|
|
@@ -104,6 +111,16 @@ const props = defineProps({
|
|
|
104
111
|
baseURL: {
|
|
105
112
|
type: String,
|
|
106
113
|
default: null
|
|
114
|
+
},
|
|
115
|
+
// 是否禁用时也可预览
|
|
116
|
+
absolutePreview: {
|
|
117
|
+
type: Boolean,
|
|
118
|
+
default: false
|
|
119
|
+
},
|
|
120
|
+
// 是否禁用时也可下载
|
|
121
|
+
absoluteDownloadable: {
|
|
122
|
+
type: Boolean,
|
|
123
|
+
default: false
|
|
107
124
|
}
|
|
108
125
|
})
|
|
109
126
|
const baseURL = props.baseURL ? props.baseURL : window.$vueApp.config.globalProperties.baseURL
|
|
@@ -178,8 +195,11 @@ const isPromise = (p: any) => {
|
|
|
178
195
|
return p && Object.prototype.toString.call(p) === '[object Promise]'
|
|
179
196
|
}
|
|
180
197
|
const preview = (showName: string, serverPath: string) => {
|
|
198
|
+
debugger
|
|
181
199
|
console.log('preview----props.fileList=', props.fileList)
|
|
182
|
-
|
|
200
|
+
if (props.disabled && !props.absolutePreview) {
|
|
201
|
+
return
|
|
202
|
+
}
|
|
183
203
|
let isImg = false
|
|
184
204
|
if (showName && isImage(showName)) {
|
|
185
205
|
isImg = true
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
:openFsUpload="openFsUpload"
|
|
9
9
|
:fileSetObj="{
|
|
10
10
|
accept: accept,
|
|
11
|
+
absolutePreview: absolutePreview,
|
|
12
|
+
absoluteDownloadable: absoluteDownloadable,
|
|
11
13
|
multiple: multiple,
|
|
12
14
|
limitFileSize: limitFileSize,
|
|
13
15
|
limit: limitNum,
|
|
@@ -23,6 +25,8 @@
|
|
|
23
25
|
:systemCode="systemCode"
|
|
24
26
|
:accept="accept"
|
|
25
27
|
:multiple="multiple"
|
|
28
|
+
:absolute-preview="absolutePreview"
|
|
29
|
+
:absolute-downloadable="absoluteDownloadable"
|
|
26
30
|
:limit="limitNum"
|
|
27
31
|
:limitFileSize="limitFileSize"
|
|
28
32
|
:placeholder="placeholder"
|
|
@@ -47,6 +51,8 @@
|
|
|
47
51
|
:multiple="multiple"
|
|
48
52
|
:limit="limitNum"
|
|
49
53
|
:limitFileSize="limitFileSize"
|
|
54
|
+
:absolute-preview="absolutePreview"
|
|
55
|
+
:absolute-downloadable="absoluteDownloadable"
|
|
50
56
|
:placeholder="placeholder"
|
|
51
57
|
:action="action"
|
|
52
58
|
:headers="headers"
|
|
@@ -70,6 +76,8 @@
|
|
|
70
76
|
:multiple="multiple"
|
|
71
77
|
:limit="limitNum"
|
|
72
78
|
:limitFileSize="limitFileSize"
|
|
79
|
+
:absolute-preview="absolutePreview"
|
|
80
|
+
:absolute-downloadable="absoluteDownloadable"
|
|
73
81
|
:placeholder="placeholder"
|
|
74
82
|
:action="action"
|
|
75
83
|
:headers="headers"
|
|
@@ -97,6 +105,8 @@
|
|
|
97
105
|
:multiple="multiple"
|
|
98
106
|
:limit="limitNum"
|
|
99
107
|
:limitFileSize="limitFileSize"
|
|
108
|
+
:absolute-preview="absolutePreview"
|
|
109
|
+
:absolute-downloadable="absoluteDownloadable"
|
|
100
110
|
:placeholder="placeholder"
|
|
101
111
|
:action="action"
|
|
102
112
|
:headers="headers"
|
|
@@ -252,6 +262,16 @@ const props = defineProps({
|
|
|
252
262
|
openCameraOrChoosePhoto: {
|
|
253
263
|
type: String,
|
|
254
264
|
default: 'openCameraAndChoosePhoto'
|
|
265
|
+
},
|
|
266
|
+
// 是否禁用时也可预览
|
|
267
|
+
absolutePreview: {
|
|
268
|
+
type: Boolean,
|
|
269
|
+
default: false
|
|
270
|
+
},
|
|
271
|
+
// 是否禁用时也可下载
|
|
272
|
+
absoluteDownloadable: {
|
|
273
|
+
type: Boolean,
|
|
274
|
+
default: false
|
|
255
275
|
}
|
|
256
276
|
})
|
|
257
277
|
const isMobile = ref(isMobileBrowser())
|
|
@@ -1421,6 +1421,7 @@ const apis = {
|
|
|
1421
1421
|
if (!gridParams.options.customRules) {
|
|
1422
1422
|
gridParams.options.customRules = {}
|
|
1423
1423
|
}
|
|
1424
|
+
copyItem.beforeValidate = item.beforeValidate
|
|
1424
1425
|
// console.log('dynamicControlTableEdit----gridParams.options.customRules222-----', gridParams.options.customRules)
|
|
1425
1426
|
gridParams.options.customRules[prop] = copyItem
|
|
1426
1427
|
})
|
|
@@ -1456,6 +1457,9 @@ const apis = {
|
|
|
1456
1457
|
if (this.$refs && this.$refs.superGrid) {
|
|
1457
1458
|
this.$refs.superGrid.doLayout()
|
|
1458
1459
|
}
|
|
1460
|
+
},
|
|
1461
|
+
getCustomFunc(funcName) {
|
|
1462
|
+
window.$PageUtil.getCustomFunc(this.pageContext, funcName)
|
|
1459
1463
|
}
|
|
1460
1464
|
}
|
|
1461
1465
|
export default apis
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-radio-group
|
|
3
|
+
ref="item"
|
|
4
|
+
v-model="innerValue"
|
|
5
|
+
:disabled="disabled"
|
|
6
|
+
:title="getClassOptionTitle(innerValue)"
|
|
7
|
+
@blur="emits('cellEvent', 'blur', $event)"
|
|
8
|
+
@change="changeValue"
|
|
9
|
+
@clear="emits('cellEvent', 'clear', $event)"
|
|
10
|
+
@focus="emits('cellEvent', 'focus', $event)"
|
|
11
|
+
@input="emits('cellEvent', 'input', $event)"
|
|
12
|
+
@visible-change="emits('cellEvent', 'visible-change', $event)"
|
|
13
|
+
>
|
|
14
|
+
<el-radio v-for="item in options" :key="item.value" :value="item.value">
|
|
15
|
+
{{ item.label }}
|
|
16
|
+
</el-radio>
|
|
17
|
+
</el-radio-group>
|
|
18
|
+
</template>
|
|
19
|
+
<script lang="ts" setup>
|
|
20
|
+
import { onMounted, ref, defineProps, defineEmits } from 'vue'
|
|
21
|
+
const props = defineProps({
|
|
22
|
+
options: {
|
|
23
|
+
type: Array,
|
|
24
|
+
default: () => []
|
|
25
|
+
},
|
|
26
|
+
valueSetOptions: {
|
|
27
|
+
type: Object,
|
|
28
|
+
default: false
|
|
29
|
+
},
|
|
30
|
+
disabled: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: false
|
|
33
|
+
},
|
|
34
|
+
modelValue: {
|
|
35
|
+
type: [String, Number, Boolean],
|
|
36
|
+
default: ''
|
|
37
|
+
},
|
|
38
|
+
prop: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: ''
|
|
41
|
+
},
|
|
42
|
+
entity: {
|
|
43
|
+
type: Object,
|
|
44
|
+
default: () => ({})
|
|
45
|
+
}
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
const emits = defineEmits(['update:modelValue', 'cellEvent', 'getClassOptionTitle'])
|
|
49
|
+
const innerValue = ref(props.modelValue)
|
|
50
|
+
|
|
51
|
+
const changeValue = (val: any) => {
|
|
52
|
+
innerValue.value = val
|
|
53
|
+
if (props.valueSetOptions && props.valueSetOptions.length > 0) {
|
|
54
|
+
// 如果有valueSetOptions,则根据valueSetOptions设置对应的值
|
|
55
|
+
const selectedOptions = getSelectedOptionItem(val, props.options)
|
|
56
|
+
if (selectedOptions) {
|
|
57
|
+
props.valueSetOptions.forEach((item: any) => {
|
|
58
|
+
if (item.valueField !== props.prop) {
|
|
59
|
+
props.entity[item.valueField] = selectedOptions[item.columnName]
|
|
60
|
+
}
|
|
61
|
+
})
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
emits('update:modelValue', val)
|
|
65
|
+
emits('cellEvent', 'change', val)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* 根据value获取options中value等于传递的value的选项
|
|
70
|
+
*/
|
|
71
|
+
function getSelectedOptionItem(value, options) {
|
|
72
|
+
if (!options) {
|
|
73
|
+
return []
|
|
74
|
+
}
|
|
75
|
+
return options.find((item) => {
|
|
76
|
+
return item.value === value
|
|
77
|
+
})
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function getClassOptionTitle(val) {
|
|
81
|
+
if (val !== null && val !== undefined && val !== '' && val.length > 0) {
|
|
82
|
+
let selectTittle = ''
|
|
83
|
+
if (typeof val === 'string') {
|
|
84
|
+
// 单选
|
|
85
|
+
props.options?.forEach((item: any) => {
|
|
86
|
+
if (item.value === val) {
|
|
87
|
+
selectTittle = item.label
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
} else {
|
|
91
|
+
// 多选
|
|
92
|
+
props.options?.forEach((item: any) => {
|
|
93
|
+
val.forEach((Vtem) => {
|
|
94
|
+
if (item.value === Vtem) {
|
|
95
|
+
selectTittle = selectTittle + item.label + ','
|
|
96
|
+
}
|
|
97
|
+
})
|
|
98
|
+
})
|
|
99
|
+
selectTittle = selectTittle.slice(0, selectTittle.length - 1)
|
|
100
|
+
}
|
|
101
|
+
return selectTittle
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
</script>
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
:additional-settings="controlConfig"
|
|
14
14
|
:parent="parentFormData"
|
|
15
15
|
:prop="column.prop"
|
|
16
|
+
:custom-params="controlConfig ? controlConfig.customParams : null"
|
|
16
17
|
:row="row"
|
|
17
18
|
:row-index="position ? position.row : null"
|
|
18
19
|
:select-options="options"
|
|
@@ -333,6 +334,17 @@
|
|
|
333
334
|
<!-- <custom-fma v-if="type==null ||type === ''" /> -->
|
|
334
335
|
<!-- v-model="newValue" -->
|
|
335
336
|
<!--必须有@input ,否则无法输入值-->
|
|
337
|
+
<GridRadioInput
|
|
338
|
+
v-else-if="type === 'radio'"
|
|
339
|
+
v-model="innerValue"
|
|
340
|
+
@update:modelValue="innerValue = $event"
|
|
341
|
+
:disabled="disabled"
|
|
342
|
+
:options="options"
|
|
343
|
+
:value-set-options="valueSetOptions"
|
|
344
|
+
:prop="column.prop"
|
|
345
|
+
:entity="row"
|
|
346
|
+
@cellEvent="cellEvent"
|
|
347
|
+
/>
|
|
336
348
|
<el-select
|
|
337
349
|
v-else-if="type === 'select' && !isDynamicDataSourceSource()"
|
|
338
350
|
ref="item"
|
|
@@ -526,14 +538,16 @@ import {
|
|
|
526
538
|
isDynamicDataSourceSource,
|
|
527
539
|
isEditOptionFunction,
|
|
528
540
|
otherFilesToStandard,
|
|
529
|
-
getControlConfig
|
|
541
|
+
getControlConfig,
|
|
542
|
+
rowBeforeValidate
|
|
530
543
|
} from './utils'
|
|
531
544
|
import dynamicSourceSelect from '../../dynamic-source-select/src/dynamic-source-select.vue'
|
|
532
545
|
import {
|
|
533
546
|
getEntityFieldValue,
|
|
534
547
|
setEntityFieldValue,
|
|
535
548
|
getPropValueNew,
|
|
536
|
-
watchPageContextDynamicVariable
|
|
549
|
+
watchPageContextDynamicVariable,
|
|
550
|
+
formatCustomParams
|
|
537
551
|
} from '../../../src/utils/util'
|
|
538
552
|
import { getToken } from '../../../src/utils/auth'
|
|
539
553
|
import apis from './apis'
|
|
@@ -543,11 +557,13 @@ import eventBus from './eventBus'
|
|
|
543
557
|
import { isMobileBrowser, getAuthSource } from '../../../src/utils/common-util'
|
|
544
558
|
import { analysisScanValue, setScanAnalysisValue } from './scan-util.ts'
|
|
545
559
|
import customFormatter from './custom-formatter'
|
|
560
|
+
import GridRadioInput from './components/grid-radio-input.vue'
|
|
546
561
|
export default {
|
|
547
562
|
name: 'DynamicInput',
|
|
548
563
|
components: {
|
|
549
564
|
dynamicSourceSelect,
|
|
550
|
-
ViewImageDialog
|
|
565
|
+
ViewImageDialog,
|
|
566
|
+
GridRadioInput
|
|
551
567
|
},
|
|
552
568
|
props: {
|
|
553
569
|
value: {
|
|
@@ -620,7 +636,7 @@ export default {
|
|
|
620
636
|
if (defaultValue !== undefined && defaultValue !== null) {
|
|
621
637
|
innerValue = defaultValue
|
|
622
638
|
}
|
|
623
|
-
const disabled = isDisableEdit(this.column.prop, this.listCode, this.row)
|
|
639
|
+
const disabled = isDisableEdit(this.column.prop, this.listCode, this.row, this.rowIndex)
|
|
624
640
|
this.$emit('change-disabled', disabled)
|
|
625
641
|
const defaultAction = window.$vueApp.config.globalProperties.baseAPI + '/component/super-form/uploads'
|
|
626
642
|
if (!this.listCode) {
|
|
@@ -648,16 +664,17 @@ export default {
|
|
|
648
664
|
const gridData = gridParams.gridData
|
|
649
665
|
const subTableData = gridParams.subTableData
|
|
650
666
|
const isSubTableShowPage = gridParams.isSubTableShowPage
|
|
651
|
-
|
|
652
|
-
if (this.column.controlConfig) {
|
|
653
|
-
controlConfig = JSON.parse(this.column.controlConfig)
|
|
654
|
-
}
|
|
667
|
+
|
|
655
668
|
const additionalParamMap = getAdditionalParamMap(gridParams)
|
|
656
669
|
const pageContext = gridParams.options.pageContext
|
|
657
670
|
const isMobile = isMobileBrowser()
|
|
658
671
|
|
|
659
672
|
const componentId = this.listCode + '_' + this.column.prop
|
|
660
673
|
let scanEnable = false
|
|
674
|
+
let controlConfig = {}
|
|
675
|
+
if (this.column.controlConfig) {
|
|
676
|
+
controlConfig = JSON.parse(this.column.controlConfig)
|
|
677
|
+
}
|
|
661
678
|
if (controlConfig.scanEnable) {
|
|
662
679
|
scanEnable = true
|
|
663
680
|
}
|
|
@@ -885,16 +902,11 @@ export default {
|
|
|
885
902
|
// deep: true
|
|
886
903
|
// })
|
|
887
904
|
const that = this
|
|
905
|
+
if (this.controlConfig?.customParams) {
|
|
906
|
+
formatCustomParams(this.controlConfig.customParams, this.pageContext, this.row)
|
|
907
|
+
}
|
|
888
908
|
// 选择文件结束
|
|
889
909
|
eventBus.$on(this.componentId + '-pickFileDone', (data) => {
|
|
890
|
-
console.log(
|
|
891
|
-
'superPage666611---pickFileDone--data.componentId=',
|
|
892
|
-
data.componentId,
|
|
893
|
-
'data.listCode=',
|
|
894
|
-
data.listCode,
|
|
895
|
-
'data=',
|
|
896
|
-
data
|
|
897
|
-
)
|
|
898
910
|
if (that.$refs.fileUploadRef) {
|
|
899
911
|
that.$refs.fileUploadRef.pickFileDone(data)
|
|
900
912
|
}
|
|
@@ -907,14 +919,6 @@ export default {
|
|
|
907
919
|
})
|
|
908
920
|
// 扫描结束
|
|
909
921
|
eventBus.$on(this.componentId + '-scanDone', (data) => {
|
|
910
|
-
console.log(
|
|
911
|
-
'superPage666611---scanDone--data.componentId=',
|
|
912
|
-
data.componentId,
|
|
913
|
-
'data.listCode=',
|
|
914
|
-
data.listCode,
|
|
915
|
-
'data=',
|
|
916
|
-
data
|
|
917
|
-
)
|
|
918
922
|
that.innerValue = data.result
|
|
919
923
|
that.blurEvent()
|
|
920
924
|
this.callCustomEvent('afterScanDone')
|
|
@@ -1318,6 +1322,12 @@ export default {
|
|
|
1318
1322
|
}
|
|
1319
1323
|
}
|
|
1320
1324
|
}
|
|
1325
|
+
this.callCustomEventWithParam('uploaded', {
|
|
1326
|
+
value: response,
|
|
1327
|
+
row: this.row,
|
|
1328
|
+
column: this.column,
|
|
1329
|
+
extendParams: this.extendParams
|
|
1330
|
+
})
|
|
1321
1331
|
}
|
|
1322
1332
|
this.annexUploadFlag = false
|
|
1323
1333
|
},
|
|
@@ -1835,6 +1845,12 @@ export default {
|
|
|
1835
1845
|
$emit(this, 'refresMainTableFields', map)
|
|
1836
1846
|
},
|
|
1837
1847
|
deleteSuccess(deleteFile) {
|
|
1848
|
+
this.callCustomEventWithParam('deleted', {
|
|
1849
|
+
value: deleteFile,
|
|
1850
|
+
row: this.row,
|
|
1851
|
+
column: this.column,
|
|
1852
|
+
extendParams: this.extendParams
|
|
1853
|
+
})
|
|
1838
1854
|
console.log('deleteSuccess', deleteFile, this.fileInfo)
|
|
1839
1855
|
},
|
|
1840
1856
|
// 时间格式判断是否是字符串类型,如果是字符串类型使用格式化的数据,如果是时间格式的显示时间搓
|
|
@@ -1978,6 +1994,14 @@ export default {
|
|
|
1978
1994
|
if (!columnRule) {
|
|
1979
1995
|
return
|
|
1980
1996
|
}
|
|
1997
|
+
let beforeValidateResult = true
|
|
1998
|
+
if (columnRule.beforeValidate) {
|
|
1999
|
+
const gridParams = store.get(this.listCode)
|
|
2000
|
+
beforeValidateResult = rowBeforeValidate(columnRule, gridParams, this.row, this.rowIndex)
|
|
2001
|
+
if (beforeValidateResult === false) {
|
|
2002
|
+
return
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
1981
2005
|
if (columnRule.disabled !== undefined) {
|
|
1982
2006
|
this.$emit('change-disabled', columnRule.disabled)
|
|
1983
2007
|
}
|
|
@@ -2020,7 +2044,6 @@ export default {
|
|
|
2020
2044
|
}
|
|
2021
2045
|
},
|
|
2022
2046
|
deptScopeLimit() {
|
|
2023
|
-
debugger
|
|
2024
2047
|
if (this.controlConfig && this.controlConfig.deptScope) {
|
|
2025
2048
|
// 表示有部门范围限制
|
|
2026
2049
|
if (this.controlConfig.deptScope == 'field' && this.controlConfig.deptScopeField) {
|
|
@@ -117,7 +117,12 @@ function setRules(rules, editField, listCode, customRules) {
|
|
|
117
117
|
item.pattern = new RegExp(item.pattern)
|
|
118
118
|
}
|
|
119
119
|
})
|
|
120
|
-
validations = validations.concat(columnCustomRules)
|
|
120
|
+
// validations = validations.concat(columnCustomRules)
|
|
121
|
+
if (columnCustomRules && columnCustomRules.length > 0) {
|
|
122
|
+
validations = columnCustomRules
|
|
123
|
+
} else {
|
|
124
|
+
validations = validations.concat(columnCustomRules)
|
|
125
|
+
}
|
|
121
126
|
if (prop.indexOf('.') > 0) {
|
|
122
127
|
setObjectPropRule(editField, rules, validations)
|
|
123
128
|
} else {
|
|
@@ -189,7 +194,7 @@ function setRuleDataType(dataType, rule) {
|
|
|
189
194
|
if (!rule.type) {
|
|
190
195
|
if (dataType === 'BOOLEAN') {
|
|
191
196
|
rule.type = 'boolean'
|
|
192
|
-
}
|
|
197
|
+
}
|
|
193
198
|
return rule
|
|
194
199
|
}
|
|
195
200
|
}
|
|
@@ -96,6 +96,7 @@
|
|
|
96
96
|
:grid-data="gridData"
|
|
97
97
|
:page-grid-data="pageGridData"
|
|
98
98
|
:current-page="currentPage"
|
|
99
|
+
:custom-params="controlConfig ? controlConfig.customParams : null"
|
|
99
100
|
@refresh-list="refreshList"
|
|
100
101
|
/>
|
|
101
102
|
<row-operation
|
|
@@ -106,6 +107,7 @@
|
|
|
106
107
|
:is-show="operation.isShow"
|
|
107
108
|
:label="operation.props.label ? operation.props.label : row[column.prop]"
|
|
108
109
|
:on-click="operation.onClick"
|
|
110
|
+
:operation="operation"
|
|
109
111
|
:operation-index="operationIndex"
|
|
110
112
|
:operation-setting="operation.props"
|
|
111
113
|
:event-name="operation.eventName"
|
|
@@ -133,6 +135,7 @@
|
|
|
133
135
|
:additional-param-map="additionalParamMap"
|
|
134
136
|
:additional-settings="additionalSettings"
|
|
135
137
|
:page-context="options?.pageContext"
|
|
138
|
+
:custom-params="controlConfig ? controlConfig.customParams : null"
|
|
136
139
|
/>
|
|
137
140
|
</span>
|
|
138
141
|
<!-- 自定义格式的时候 -->
|
|
@@ -170,6 +173,7 @@
|
|
|
170
173
|
:component-id="componentId"
|
|
171
174
|
:additional-settings="additionalSettings"
|
|
172
175
|
:page-context="options?.pageContext"
|
|
176
|
+
:custom-params="controlConfig ? controlConfig.customParams : null"
|
|
173
177
|
@prohibitToEdit="prohibitToEdit"
|
|
174
178
|
@refresh-list="refreshList"
|
|
175
179
|
/></span>
|
|
@@ -387,7 +391,7 @@ import customFormatter from './custom-formatter'
|
|
|
387
391
|
import RowOperation from './row-operation.vue'
|
|
388
392
|
import apis from './apis'
|
|
389
393
|
import { mapGetters } from 'vuex'
|
|
390
|
-
import { getEntityFieldValue, getParentObjectUtil } from '../../../src/utils/util'
|
|
394
|
+
import { getEntityFieldValue, getParentObjectUtil, formatCustomParams } from '../../../src/utils/util'
|
|
391
395
|
import ViewImageDialog from './view-image-dialog.vue'
|
|
392
396
|
import eventBus from './eventBus'
|
|
393
397
|
import FsPreview from '../../fs-preview'
|
|
@@ -700,6 +704,10 @@ export default {
|
|
|
700
704
|
this.requiredClass = this.isRequired(this.row.$editing) ? 'm-requried' : ''
|
|
701
705
|
},
|
|
702
706
|
mounted() {
|
|
707
|
+
if (this.controlConfig) {
|
|
708
|
+
const gridParams = store.get(this.listCode)
|
|
709
|
+
formatCustomParams(this.controlConfig.customParams, gridParams.pageContext, this.row)
|
|
710
|
+
}
|
|
703
711
|
// 监听取消自定义编辑事件
|
|
704
712
|
eventBus.$on('clearTableAllStartEditing', () => {
|
|
705
713
|
this.clearAllEditing()
|