agilebuilder-ui 1.1.37-sit2 → 1.1.38-tmp1

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.
@@ -1,5 +1,5 @@
1
1
  import { openBlock as r, createElementBlock as t, createCommentVNode as o } from "vue";
2
- import { _ as s } from "./index-f92e8ddb.js";
2
+ import { _ as s } from "./index-4de073b5.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-f92e8ddb.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-4de073b5.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-f92e8ddb.js";
2
+ import { _ as I } from "./index-4de073b5.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.37-sit2",
3
+ "version": "1.1.38-tmp1",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./lib/super-ui.js",
@@ -106,7 +106,6 @@
106
106
  :is-show="operation.isShow"
107
107
  :label="operation.props.label ? operation.props.label : row[column.prop]"
108
108
  :on-click="operation.onClick"
109
- :operation="operation"
110
109
  :operation-index="operationIndex"
111
110
  :operation-setting="operation.props"
112
111
  :event-name="operation.eventName"
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <!--将@click改为@mousedown.native是因为操作列保存按钮时事件和input等组件的@blur冲突,导致保存需要保存两次,因为
3
3
  @blur先于@click执行的,所以只会执行@blur,@click就失效了,@mousedown是先于@blur执行的-->
4
- <span class="table-operation-row-btn" :style="myStyle">
4
+ <span :style="myStyle">
5
5
  <template v-if="isShowButton()">
6
6
  <el-tooltip :disabled="tooltipDisabled" :content="label" placement="top">
7
- <template v-if="operationSettingData?.permission">
7
+ <template v-if="operationSettingData.permission">
8
8
  <component
9
9
  v-bind="operationSettingData"
10
10
  :is="isElementType"
@@ -77,13 +77,9 @@ export default {
77
77
  type: String,
78
78
  default: null,
79
79
  },
80
- operation: {
81
- type: Object,
82
- default: () => ({}),
83
- },
84
80
  operationSetting: {
85
81
  type: Object,
86
- default: () => ({}),
82
+ default: null,
87
83
  },
88
84
  operationIndex: {
89
85
  type: Number,
@@ -152,16 +148,16 @@ export default {
152
148
  },
153
149
  // 后置图标
154
150
  suffixIcon() {
155
- if(['right'].includes(this.operationSetting.iconPosition)) return this.operationSetting.iconValue
151
+ if(['right'].includes(this.operationSettingData.iconPosition)) return this.operationSetting.iconValue
156
152
  return undefined
157
153
  },
158
154
  // 是否显示文字按钮 > 图标模式
159
155
  isTextIcon() {
160
156
  if (this.isTableBtnLinkShow) {
161
- if (this.operationSetting.isTextIcon === undefined) {
157
+ if (this.operationSettingData.isTextIcon === undefined) {
162
158
  return this.isSaveRow || this.isDeleteRow || this.isEditRow || this.isRestoreRow
163
159
  }
164
- return this.operationSetting.isTextIcon
160
+ return this.operationSettingData.isTextIcon
165
161
  } else {
166
162
  return false
167
163
  }
@@ -176,14 +172,14 @@ export default {
176
172
  },
177
173
  // 是否自动开启表格 按钮 转 文字按钮
178
174
  isTableBtnLinkShow() {
179
- if (this.operationSetting?.text) return true
175
+ if (this.operationSetting.text) return true
180
176
  if (this.isTableBtnLink && this.elementType === 'el-button') {
181
- return [this.operationSetting?.text, this.operationSetting?.plain, this.operationSetting?.round].every(v => v === undefined)
177
+ return [this.operationSetting.text, this.operationSetting.plain, this.operationSetting.round].every(v => v === undefined)
182
178
  }
183
179
  return false
184
180
  },
185
181
  operationSettingData() {
186
- const dataList = { ...(this.operationSetting ?? {}) }
182
+ const dataList = { ...this.operationSetting }
187
183
  if (this.isTableBtnLinkShow) {
188
184
  dataList.underline = false
189
185
  delete dataList.text
@@ -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
@@ -26,7 +26,7 @@ export function getSystemCode() {
26
26
 
27
27
  export function getPermissions(systemCode) {
28
28
  let totalPermissions = null
29
- if(!systemCode){
29
+ if(!systemCode || systemCode+''==='null'){
30
30
  systemCode = getSystemCode()
31
31
  }
32
32
  let permissions = localStorage.getItem(permissionKey + systemCode)
@@ -91,17 +91,19 @@ export function getTotalPermissions() {
91
91
  }
92
92
 
93
93
  export function setPermissions(permissions, systemCode) {
94
+ console.log('setPermissions==========systemCode=', systemCode,'isHasPlatPermission----permissions[0]=',permissions && permissions.length > 0 ?permissions[0]: null)
94
95
  const isMobile = isMobileBrowser()
95
96
  let key
96
97
  const permissionObjs = getPermissionObjs(permissions)
97
98
  if(isMobile){
98
99
  key = mobilePermissionKey
99
100
  } else {
100
- if (!systemCode) {
101
+ if (!systemCode || systemCode+''==='null') {
101
102
  systemCode = getSystemCode()
102
103
  }
103
104
  key = permissionKey + systemCode
104
105
  }
106
+ console.log('setPermissions==========systemCode=', systemCode,'key=',key)
105
107
  localStorage.setItem(key, JSON.stringify(permissionObjs))
106
108
  setPermissionAllSystemKey(key)
107
109
  return permissionObjs
@@ -121,7 +123,7 @@ function getPermissionObjs(permissions){
121
123
 
122
124
 
123
125
  export function getMenus(systemCode) {
124
- if (!systemCode) {
126
+ if (!systemCode || systemCode+''==='null') {
125
127
  systemCode = getSystemCode()
126
128
  }
127
129
  const myPermissionMenuKey = getRunInfoKey(permissionMenuKey)
@@ -136,7 +138,7 @@ export function getMenus(systemCode) {
136
138
 
137
139
  export function setMenus(menus, systemCode) {
138
140
  if (menus) {
139
- if (!systemCode) {
141
+ if (!systemCode || systemCode+''==='null') {
140
142
  systemCode = getSystemCode()
141
143
  }
142
144
  const myPermissionMenuKey = getRunInfoKey(permissionMenuKey)
@@ -148,7 +150,7 @@ export function setMenus(menus, systemCode) {
148
150
  }
149
151
 
150
152
  export function removeMenus(systemCode) {
151
- if (!systemCode) {
153
+ if (!systemCode || systemCode+''==='null') {
152
154
  systemCode = getSystemCode()
153
155
  }
154
156
  const myPermissionMenuKey = getRunInfoKey(permissionMenuKey)
package/vite.config.js CHANGED
@@ -12,8 +12,7 @@ export default defineConfig(({ mode }) => ({
12
12
  terser({
13
13
  compress: {
14
14
  drop_debugger: ['production'].includes(mode),
15
- // drop_console: ['production'].includes(mode),
16
- pure_funcs: ['production'].includes(mode) ? ['console.log', 'console.info', 'console.warn', 'console.debug'] : [],
15
+ // pure_funcs: ['production'].includes(mode) ? ['console.log', 'console.info', 'console.warn', 'console.debug'] : [],
17
16
  },
18
17
  output: {
19
18
  // 对于console.error,不做任何处理