agilebuilder-ui 1.1.38 → 1.1.39

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.
Files changed (31) hide show
  1. package/lib/{401-d4103b15.js → 401-10773a45.js} +1 -1
  2. package/lib/{404-bbbf1615.js → 404-bc7b5bc4.js} +1 -1
  3. package/lib/{iframe-page-eeb30592.js → iframe-page-593fe033.js} +1 -1
  4. package/lib/{index-93dc7bbc.js → index-5276895e.js} +8572 -8496
  5. package/lib/super-ui.css +1 -1
  6. package/lib/super-ui.js +1 -1
  7. package/lib/super-ui.umd.cjs +71 -68
  8. package/lib/{tab-content-iframe-index-82db069a.js → tab-content-iframe-index-12a5a7c2.js} +1 -1
  9. package/lib/{tab-content-index-06291a81.js → tab-content-index-6901441f.js} +22 -22
  10. package/lib/{tache-subprocess-history-661219ec.js → tache-subprocess-history-8fd8d5f7.js} +1 -1
  11. package/package.json +1 -1
  12. package/packages/fs-preview/src/fs-preview.vue +8 -3
  13. package/packages/fs-upload-list/src/fs-upload-list.vue +8 -1
  14. package/packages/fs-upload-new/src/fs-button-upload.vue +12 -0
  15. package/packages/fs-upload-new/src/fs-drag-upload.vue +12 -0
  16. package/packages/fs-upload-new/src/fs-preview-new.vue +25 -5
  17. package/packages/fs-upload-new/src/fs-upload-new.vue +20 -0
  18. package/packages/super-grid/src/dynamic-input.vue +16 -22
  19. package/packages/super-grid/src/normal-column-content.vue +8 -1
  20. package/packages/super-grid/src/search-form-item.vue +30 -15
  21. package/src/api/sso-service.js +2 -1
  22. package/src/permission.js +2 -1
  23. package/src/store/modules/user.js +4 -1
  24. package/src/utils/common-util.js +1 -1
  25. package/src/utils/permissionAuth.js +7 -5
  26. package/src/utils/util.js +19 -0
  27. package/src/views/dsc-component/Sidebar/Item.vue +15 -4
  28. package/src/views/dsc-component/Sidebar/SidebarItem.vue +10 -2
  29. package/src/views/layout/components/Menubar/Item.vue +14 -3
  30. package/src/views/layout/components/Menubar/SidebarItem.vue +9 -1
  31. 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-93dc7bbc.js";
2
+ import { _ as s } from "./index-5276895e.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-93dc7bbc.js";
2
- import { resolveComponent as u, openBlock as d, createBlock as b, withCtx as g, createVNode as v, TransitionGroup as L, createElementBlock as p, Fragment as T, renderList as C, createElementVNode as m, toDisplayString as w, normalizeClass as S, createCommentVNode as y } from "vue";
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-5276895e.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(), n = window.$vueApp.config.globalProperties.systemNameObj;
21
- n && (a = n[r]), t = [{ path: "/", redirect: "noredirect", meta: { title: a } }].concat(t);
22
- const s = P.get("selectMenu"), l = window.$vueApp.config.globalProperties._selectMenu;
23
- let o;
24
- if (l ? o = l : s && (o = s), o) {
25
- const i = o.substring(0, o.indexOf("~~")), c = o.substring(o.indexOf("~~") + 2);
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, n, s) {
39
- const l = u("el-breadcrumb-item"), o = u("el-breadcrumb");
40
- return d(), b(o, { class: "app-breadcrumb", separator: ">" }, { default: g(() => [v(L, { name: "breadcrumb", tag: "span" }, { default: g(() => [(d(!0), p(T, null, C(s.levelListWithTitle, (i, c) => (d(), b(l, { key: i.path + "-" + c }, { default: g(() => [m("span", k, w(e.$t(i.meta.title)), 1)]), _: 2 }, 1024))), 128))]), _: 1 })]), _: 1 });
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 n in e.routeQuery)
80
- n === "src" ? a = e.routeQuery[n] : r += n + "=" + e.routeQuery[n] + "&";
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, n, s) {
98
- const l = u("el-tab-pane"), o = u("el-tabs");
99
- return e.openTab && e.openTab.length > 0 ? (d(), b(o, { 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(() => [(d(!0), p(T, null, C(e.openTab, (i) => (d(), b(l, { 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"])) : (d(), p("div", Q, [m("div", R, [m("div", q, w(n.defaultPageTipCn), 1), m("div", z, w(n.defaultPageTipEn), 1)])]));
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, n, s) {
111
- const l = u("menubar"), o = u("breadcrumb"), i = u("tab-content");
112
- return d(), p("div", { class: S([s.classObj, "app-wrapper"]) }, [s.device === "mobile" && s.sidebar.opened ? (d(), p("div", { key: 0, class: "drawer-bg", onClick: t[0] || (t[0] = (...c) => s.handleClickOutside && s.handleClickOutside(...c)) })) : y("", !0), v(l, { "system-code": n.systemCode, collapse: !0, class: "sidebar-container" }, null, 8, ["system-code"]), m("div", j, [n.showMenuRoute ? (d(), b(o, { key: 0 })) : y("", !0), v(i)])], 2);
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-93dc7bbc.js";
2
+ import { _ as I } from "./index-5276895e.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agilebuilder-ui",
3
- "version": "1.1.38",
3
+ "version": "1.1.39",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./lib/super-ui.js",
@@ -1,14 +1,14 @@
1
1
  <template>
2
2
  <div v-if="label">
3
- <div class="list-file" @dblclick="dblclickEvent">
3
+ <div ref="filePreviewRef" @dblclick="dblclickEvent" style="display: flex; align-items: center; gap: 5px">
4
4
  <el-icon><el-icon-paperclip /></el-icon>
5
5
  {{ label }}
6
- <el-tooltip :content="$t('imatrixUIPublicModel.preview')">
6
+ <el-tooltip v-if="!disabled || fileSetObj.absolutePreview" :content="$t('imatrixUIPublicModel.preview')">
7
7
  <el-icon style="cursor: pointer; color: #409eff; padding-right: 5px" @click="previewMuti()"
8
8
  ><el-icon-view
9
9
  /></el-icon>
10
10
  </el-tooltip>
11
- <el-tooltip :content="$t('imatrixUIPublicModel.download')">
11
+ <el-tooltip v-if="!disabled || fileSetObj.absoluteDownloadable" :content="$t('imatrixUIPublicModel.download')">
12
12
  <el-icon style="cursor: pointer; color: #409eff" @click="donwloadViewFile()">
13
13
  <el-icon-download />
14
14
  </el-icon>
@@ -111,6 +111,10 @@ export default {
111
111
  default: () => {
112
112
  return {}
113
113
  }
114
+ },
115
+ disabled: {
116
+ type: Boolean,
117
+ default: false
114
118
  }
115
119
  },
116
120
  data() {
@@ -171,6 +175,7 @@ export default {
171
175
  },
172
176
  previewMuti() {
173
177
  const { showName, serverPath } = this.getShowNameAndUuidKey()
178
+ debugger
174
179
  if (serverPath) {
175
180
  const uuids = serverPath.split(',')
176
181
  if (uuids.length > 1) {
@@ -141,7 +141,14 @@
141
141
  />
142
142
  </template>
143
143
  <template v-else>
144
- <fs-preview :entity="row" :file-set-obj="fileSetObj" :is-sql="isSql" :label="value" />
144
+ <fs-preview
145
+ :entity="row"
146
+ :disabled="disabled"
147
+ :fileInfo="fileInfo"
148
+ :file-set-obj="fileSetObj"
149
+ :is-sql="isSql"
150
+ :label="value"
151
+ />
145
152
  </template>
146
153
  </span>
147
154
  </template>
@@ -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
- <el-tooltip content="预览" placement="top">
11
- <span style="cursor: pointer" @click="preview(file.showName, file.serverPath)">
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
- </el-tooltip>
15
- <el-tooltip v-if="!disabled" content="下载" placement="top">
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())
@@ -13,6 +13,7 @@
13
13
  :additional-settings="controlConfig"
14
14
  :parent="parentFormData"
15
15
  :prop="column.prop"
16
+ :custom-params="myCustomParams"
16
17
  :row="row"
17
18
  :row-index="position ? position.row : null"
18
19
  :select-options="options"
@@ -545,7 +546,8 @@ import {
545
546
  getEntityFieldValue,
546
547
  setEntityFieldValue,
547
548
  getPropValueNew,
548
- watchPageContextDynamicVariable
549
+ watchPageContextDynamicVariable,
550
+ formatCustomParams
549
551
  } from '../../../src/utils/util'
550
552
  import { getToken } from '../../../src/utils/auth'
551
553
  import apis from './apis'
@@ -662,16 +664,17 @@ export default {
662
664
  const gridData = gridParams.gridData
663
665
  const subTableData = gridParams.subTableData
664
666
  const isSubTableShowPage = gridParams.isSubTableShowPage
665
- let controlConfig = {}
666
- if (this.column.controlConfig) {
667
- controlConfig = JSON.parse(this.column.controlConfig)
668
- }
667
+
669
668
  const additionalParamMap = getAdditionalParamMap(gridParams)
670
669
  const pageContext = gridParams.options.pageContext
671
670
  const isMobile = isMobileBrowser()
672
671
 
673
672
  const componentId = this.listCode + '_' + this.column.prop
674
673
  let scanEnable = false
674
+ let controlConfig = {}
675
+ if (this.column.controlConfig) {
676
+ controlConfig = JSON.parse(this.column.controlConfig)
677
+ }
675
678
  if (controlConfig.scanEnable) {
676
679
  scanEnable = true
677
680
  }
@@ -760,7 +763,8 @@ export default {
760
763
  isShowScanIcon,
761
764
  baseURL,
762
765
  colConfigure, // v10字段配置原信息
763
- designProperty // 字段配置
766
+ designProperty, // 字段配置
767
+ myCustomParams: {}
764
768
  }
765
769
  },
766
770
  computed: {},
@@ -808,6 +812,12 @@ export default {
808
812
  },
809
813
  created() {
810
814
  const gridParams = store.get(this.listCode)
815
+ if (this.controlConfig?.customParams) {
816
+ if (!this.pageContext) {
817
+ this.pageContext = gridParams.options.pageContext
818
+ }
819
+ this.myCustomParams = formatCustomParams(this.controlConfig.customParams, this.pageContext, this.row)
820
+ }
811
821
  this.gridParams = gridParams
812
822
  this.isCreateRow = gridParams.isCreateRow
813
823
  this.setTreeType()
@@ -901,14 +911,6 @@ export default {
901
911
  const that = this
902
912
  // 选择文件结束
903
913
  eventBus.$on(this.componentId + '-pickFileDone', (data) => {
904
- console.log(
905
- 'superPage666611---pickFileDone--data.componentId=',
906
- data.componentId,
907
- 'data.listCode=',
908
- data.listCode,
909
- 'data=',
910
- data
911
- )
912
914
  if (that.$refs.fileUploadRef) {
913
915
  that.$refs.fileUploadRef.pickFileDone(data)
914
916
  }
@@ -921,14 +923,6 @@ export default {
921
923
  })
922
924
  // 扫描结束
923
925
  eventBus.$on(this.componentId + '-scanDone', (data) => {
924
- console.log(
925
- 'superPage666611---scanDone--data.componentId=',
926
- data.componentId,
927
- 'data.listCode=',
928
- data.listCode,
929
- 'data=',
930
- data
931
- )
932
926
  that.innerValue = data.result
933
927
  that.blurEvent()
934
928
  this.callCustomEvent('afterScanDone')
@@ -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
@@ -133,6 +134,7 @@
133
134
  :additional-param-map="additionalParamMap"
134
135
  :additional-settings="additionalSettings"
135
136
  :page-context="options?.pageContext"
137
+ :custom-params="controlConfig ? controlConfig.customParams : null"
136
138
  />
137
139
  </span>
138
140
  <!-- 自定义格式的时候 -->
@@ -170,6 +172,7 @@
170
172
  :component-id="componentId"
171
173
  :additional-settings="additionalSettings"
172
174
  :page-context="options?.pageContext"
175
+ :custom-params="controlConfig ? controlConfig.customParams : null"
173
176
  @prohibitToEdit="prohibitToEdit"
174
177
  @refresh-list="refreshList"
175
178
  /></span>
@@ -387,7 +390,7 @@ import customFormatter from './custom-formatter'
387
390
  import RowOperation from './row-operation.vue'
388
391
  import apis from './apis'
389
392
  import { mapGetters } from 'vuex'
390
- import { getEntityFieldValue, getParentObjectUtil } from '../../../src/utils/util'
393
+ import { getEntityFieldValue, getParentObjectUtil, formatCustomParams } from '../../../src/utils/util'
391
394
  import ViewImageDialog from './view-image-dialog.vue'
392
395
  import eventBus from './eventBus'
393
396
  import FsPreview from '../../fs-preview'
@@ -700,6 +703,10 @@ export default {
700
703
  this.requiredClass = this.isRequired(this.row.$editing) ? 'm-requried' : ''
701
704
  },
702
705
  mounted() {
706
+ if (this.controlConfig) {
707
+ const gridParams = store.get(this.listCode)
708
+ formatCustomParams(this.controlConfig.customParams, gridParams.pageContext, this.row)
709
+ }
703
710
  // 监听取消自定义编辑事件
704
711
  eventBus.$on('clearTableAllStartEditing', () => {
705
712
  this.clearAllEditing()
@@ -148,26 +148,30 @@
148
148
  >
149
149
  <el-option v-for="item in column.valueSet" :key="item.value" :label="item.label" :value="item.value" />
150
150
  </el-select>
151
- <dynamic-source-select
151
+ <template
152
152
  v-else-if="
153
153
  column.componentType &&
154
154
  (column.componentType === 'multiselect' || column.componentType === 'select') &&
155
155
  isDynamicDataSourceSource(column)
156
156
  "
157
- :allow-create="true"
158
- :base-props="{
159
- multiple: column.componentType === 'multiselect' ? true : false
160
- }"
161
- :entity="searchForm"
162
- :filterable="true"
163
- :is-join-table="isJoinTable"
164
- :list-code="code"
165
- :list-toolbar-form-data="listToolbarFormData"
166
- :options="getDynamicDataSourceOptions(column)"
167
- :table-name="tableName"
168
- :value="getFormItemValue(column.prop)"
169
- @input="setValueToModelProp(column.prop, $event)"
170
- />
157
+ >
158
+ <dynamic-source-select
159
+ v-model:value="searchForm[column.prop]"
160
+ :allow-create="true"
161
+ :base-props="{
162
+ multiple: column.componentType === 'multiselect' ? true : false
163
+ }"
164
+ :entity="searchForm"
165
+ :filterable="true"
166
+ :is-join-table="isJoinTable"
167
+ :list-code="code"
168
+ :list-toolbar-form-data="listToolbarFormData"
169
+ :options="getDynamicDataSourceOptions(column)"
170
+ :table-name="tableName"
171
+ @change="multiselectChange"
172
+ @input="setValueToModelProp(column.prop, $event)"
173
+ />
174
+ </template>
171
175
  <!--
172
176
  <el-input-number
173
177
  v-else-if="column.componentType && column.componentType==='inputNumber'"
@@ -471,6 +475,17 @@ export default {
471
475
  } else {
472
476
  return ['00:00:00']
473
477
  }
478
+ },
479
+ multiselectChange(arr, selectedItem) {
480
+ if (arr.indexOf('saveAll') !== -1) {
481
+ if (this.searchForm[this.column.prop] && typeof this.searchForm[this.column.prop] === 'string') {
482
+ this.searchForm[this.column.prop] = this.searchForm[this.column.prop].split(',')
483
+ } else {
484
+ this.searchForm[this.column.prop] = []
485
+ }
486
+ } else {
487
+ this.searchForm[this.column.prop] = arr
488
+ }
474
489
  }
475
490
  },
476
491
  emits: ['submit-form']
@@ -61,7 +61,7 @@ function logout() {
61
61
  }
62
62
 
63
63
  function getCurrentUserPermissionsBySystem(loginName, systemCode) {
64
- console.log('getCurrentUserPermissionsBySystem----loginName=', loginName, isMobileBrowser())
64
+ console.log('getCurrentUserPermissionsBySystem----loginName=', loginName, 'isMobile=',isMobileBrowser(),'systemCode=',systemCode)
65
65
  if(isMobileBrowser()){
66
66
  return getCurrentUserMobilePermissions(loginName)
67
67
  } else {
@@ -72,6 +72,7 @@ function getCurrentUserPermissionsBySystem(loginName, systemCode) {
72
72
  systemCode = window.$vueApp.config.globalProperties.systemCode
73
73
  }
74
74
  }
75
+ console.log('getCurrentUserPermissionsBySystem----loginName=', loginName, 'systemCode222=',systemCode)
75
76
  return request.get(
76
77
  window.$vueApp.config.globalProperties.baseAPI +
77
78
  '/sso/current-users/permissions/with-system?loginName=' +
package/src/permission.js CHANGED
@@ -157,10 +157,11 @@ router.beforeEach((to, from, next) => {
157
157
  // 开发平台本身的功能或直接平台功能时
158
158
  // console.log('开发平台本身的功能或直接平台功能时')
159
159
  let systemCode = to.query ? to.query.customSystem: null
160
+ console.log('getCurrentUserPermissions---systemCode111=', systemCode)
160
161
  if (!systemCode) {
161
162
  systemCode = window.$vueApp.config.globalProperties.currentSystem
162
163
  }
163
- console.log('3333systemCode=', systemCode)
164
+ console.log('getCurrentUserPermissions---systemCode222=', systemCode)
164
165
  return store.dispatch('getCurrentUserPermissions', {loginName:user.loginName, systemCode})
165
166
  }
166
167
  })
@@ -238,7 +238,7 @@ const user = {
238
238
  const loginName = param.loginName
239
239
  const systemCode = param.systemCode
240
240
  let storePermissions = getPermissions(systemCode)
241
- console.log('getCurrentUserPermissions-----systemCode=', systemCode, 'storePermissions=', storePermissions)
241
+ console.log('getCurrentUserPermissions-----systemCode=', systemCode)
242
242
  // 这个判断会导致资源不会重新加载??
243
243
  if (
244
244
  typeof storePermissions === 'undefined' ||
@@ -248,6 +248,7 @@ const user = {
248
248
  ssoService
249
249
  .getCurrentUserPermissionsBySystem(loginName, systemCode)
250
250
  .then((permissions) => {
251
+ console.log('getCurrentUserPermissions-----systemCode=', systemCode, 'permissions[0]=', permissions && permissions.length>0?permissions[0]: null )
251
252
  let currentPermissions = ['index']
252
253
  currentPermissions = currentPermissions.concat(permissions)
253
254
  storePermissions = setPermissions(currentPermissions, systemCode)
@@ -257,6 +258,8 @@ const user = {
257
258
  reject(error)
258
259
  })
259
260
  } else {
261
+ let keys = Object.keys(storePermissions)
262
+ console.log('getCurrentUserPermissions-----systemCode=', systemCode, 'storePermissions[1]=', keys && keys.length>1?keys[1]: null )
260
263
  resolve(storePermissions)
261
264
  }
262
265
  })
@@ -589,7 +589,7 @@ export function loadCSS() {
589
589
  console.error('皮肤主题为空!')
590
590
  return
591
591
  }
592
- const baseAPI = window.$vueApp.config.globalProperties.baseAPI?window.$vueApp.config.globalProperties.baseAPI:localStorage.getItem('_baseAPI_')
592
+ const baseAPI = localStorage.getItem('_baseAPI_')
593
593
  if (baseAPI) {
594
594
  const href = replacePrefix(baseAPI) + '/component/theme/load-theme?theme=' + theme + '&_t_=' + new Date().getTime()
595
595
  let isHasLink = true