agilebuilder-ui 1.1.13 → 1.1.14

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.
@@ -0,0 +1,12 @@
1
+ import { openBlock as r, createElementBlock as t, createCommentVNode as o } from "vue";
2
+ import { _ as s } from "./index-42d5d61b.js";
3
+ const u = ["src"], f = s({ data: () => ({ src: null }), watch: { $route(n, c) {
4
+ this.src = this.$route.query.src;
5
+ } }, mounted() {
6
+ this.src = this.$route.query.src;
7
+ } }, [["render", function(n, c, a, l, e, m) {
8
+ return r(), t("div", null, [e.src && e.src !== null ? (r(), t("iframe", { key: 0, ref: "menuContent", src: e.src, name: "menu-content", title: "Main content", frameborder: "0" }, null, 8, u)) : o("", !0)]);
9
+ }], ["__scopeId", "data-v-20dccb82"]]);
10
+ export {
11
+ f as default
12
+ };
@@ -0,0 +1,115 @@
1
+ import { _ as v, c as $, g as x, b as P, s as h, m as M, M as O, i as I } from "./index-42d5d61b.js";
2
+ import { resolveComponent as m, openBlock as l, createBlock as b, withCtx as g, createVNode as w, TransitionGroup as L, createElementBlock as p, Fragment as T, renderList as C, createElementVNode as u, toDisplayString as y, createCommentVNode as f, normalizeClass as S } from "vue";
3
+ const A = { class: "no-redirect" }, k = v({ name: "Breadcrumb", data: () => ({ levelList: null }), computed: { levelListWithTitle() {
4
+ return this.levelList.filter((e) => e.meta.title !== void 0 && e.meta.title !== null);
5
+ } }, watch: { $route() {
6
+ this.getBreadcrumb();
7
+ } }, created() {
8
+ this.getBreadcrumb();
9
+ }, methods: { getBreadcrumb() {
10
+ const { params: e } = this.$route;
11
+ let t = this.$route.matched.filter((a) => {
12
+ if (a.name) {
13
+ var r = $(a.path);
14
+ return a.path = r(e), !0;
15
+ }
16
+ });
17
+ if (t) {
18
+ let a;
19
+ const r = x(), o = window.$vueApp.config.globalProperties.systemNameObj;
20
+ o && (a = o[r]), t = [{ path: "/", redirect: "noredirect", meta: { title: a } }].concat(t);
21
+ const s = P.get("selectMenu"), d = window.$vueApp.config.globalProperties._selectMenu;
22
+ let n;
23
+ if (d ? n = d : s && (n = s), n) {
24
+ const i = n.substring(0, n.indexOf("~~")), c = n.substring(n.indexOf("~~") + 2);
25
+ if (t && t.length > 0) {
26
+ const _ = t[t.length - 1];
27
+ this.isShouldConcatLastMenu(c, i, _) && t.push({ path: i, meta: { title: c } });
28
+ } else
29
+ t.push({ path: i, meta: { title: c } });
30
+ }
31
+ }
32
+ this.levelList = t;
33
+ }, isShouldConcatLastMenu(e, t, a) {
34
+ return !(!this.isTitleNotEqual(e, a) || !this.isPathNotEqual(t, a));
35
+ }, isTitleNotEqual(e, t) {
36
+ return !(!e || !t.meta || e === t.meta.title || e === this.$t(t.meta.title));
37
+ }, isPathNotEqual: (e, t) => !(!e || !t.path || e === t.path) } }, [["render", function(e, t, a, r, o, s) {
38
+ const d = m("el-breadcrumb-item"), n = m("el-breadcrumb");
39
+ return l(), b(n, { class: "app-breadcrumb", separator: ">" }, { default: g(() => [w(L, { name: "breadcrumb", tag: "span" }, { default: g(() => [(l(!0), p(T, null, C(s.levelListWithTitle, (i, c) => (l(), b(d, { key: i.path + "-" + c }, { default: g(() => [u("span", A, y(e.$t(i.meta.title)), 1)]), _: 2 }, 1024))), 128))]), _: 1 })]), _: 1 });
40
+ }], ["__scopeId", "data-v-768a430c"]]), { body: B } = document, E = { watch: { $route(e) {
41
+ this.device === "mobile" && this.sidebar.opened && h.dispatch("closeSidebar", { withoutAnimation: !1 });
42
+ } }, beforeMount() {
43
+ window.addEventListener("resize", this.resizeHandler);
44
+ }, mounted() {
45
+ this.isMobile() && (h.dispatch("toggelDevice", "mobile"), h.dispatch("closeSidebar", { withoutAnimation: !0 }));
46
+ }, methods: { isMobile: () => B.getBoundingClientRect().width - 3 < 1024, resizeHandler() {
47
+ if (!document.hidden) {
48
+ const e = this.isMobile();
49
+ h.dispatch("toggelDevice", e ? "mobile" : "desktop"), e && h.dispatch("closeSidebar", { withoutAnimation: !0 });
50
+ }
51
+ } } }, N = { name: "TabContent", data() {
52
+ let e = window.$vueApp.config.globalProperties.defaultPageTip;
53
+ e || (e = "欢迎访问Agile Builder/Welcome to Agile Builder");
54
+ let t, a = e;
55
+ return e && e.indexOf("/") > 0 && (a = e.substring(0, e.lastIndexOf("/")), t = e.substring(e.lastIndexOf("/") + 1)), { defaultPageTipCn: a, defaultPageTipEn: t };
56
+ }, computed: { ...M(["openTab"]), activeIndex: { get() {
57
+ return this.$store.state.tabContent.activeIndex;
58
+ }, set(e) {
59
+ this.$store.commit("set_active_index", e);
60
+ } } }, created() {
61
+ window.addEventListener("message", this.recieveMessage);
62
+ }, mounted() {
63
+ }, unmounted() {
64
+ window.removeEventListener("message", this.recieveMessage);
65
+ }, methods: { closeSelectedTag(e) {
66
+ const t = this.$store.state.tabContent.openTab.findIndex((r) => r.code === e), a = this.$store.state.tabContent.openTab[t];
67
+ this.$store.commit("delete_tabs", a), e === this.activeIndex && this.toLastView(this.$store.state.tabContent.openTab, t > 0 ? t - 1 : 0);
68
+ }, toLastView(e, t) {
69
+ if (e && e.length > 0 && e.length > t) {
70
+ const a = e[t];
71
+ a && this.$store.commit("set_active_index", a.code);
72
+ }
73
+ }, getFullPath(e) {
74
+ let t = "";
75
+ if (e.routePath === "/iframe-page/page") {
76
+ let a, r = "";
77
+ if (e.routeQuery)
78
+ for (const o in e.routeQuery)
79
+ o === "src" ? a = e.routeQuery[o] : r += o + "=" + e.routeQuery[o] + "&";
80
+ a && (t = a), r && (t += "?" + r);
81
+ } 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)
82
+ for (const a in e.routeQuery)
83
+ t += a + "=" + e.routeQuery[a] + "&";
84
+ return t && t.length > 0 && t.lastIndexOf("&") === t.length - 1 && (t = t.substring(0, t.lastIndexOf("&"))), t;
85
+ }, recieveMessage(e) {
86
+ if (e && typeof e.data == "string" && e.data === "refreshTabContent")
87
+ window.location.reload();
88
+ else if (e && typeof e.data == "string" && e.data.indexOf("loginTimeout") >= 0)
89
+ window.parent.postMessage(e.data, "*");
90
+ else if (e && typeof e.data == "string" && e.data === "return-to-system-list") {
91
+ this.$store.commit("clear_tabs");
92
+ let t = "_IS_APP_LIST";
93
+ const a = window.sessionStorage.getItem(t);
94
+ a !== void 0 && a === "true" ? this.$router.push({ path: "/mms/apps/list" }) : this.$router.push({ path: "/mms/systems/list" });
95
+ }
96
+ } } }, V = ["src"], Q = { 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 = v({ name: "Layout", components: { Menubar: O, Breadcrumb: k, TabContent: v(N, [["render", function(e, t, a, r, o, s) {
97
+ const d = m("el-tab-pane"), n = m("el-tabs");
98
+ return l(), p("div", null, [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(T, null, C(e.openTab, (i) => (l(), b(d, { key: i.code, label: i.name, name: i.code }, { default: g(() => [u("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"])) : f("", !0), u("div", Q, [u("div", R, [u("div", q, y(o.defaultPageTipCn), 1), u("div", z, y(o.defaultPageTipEn), 1)])])]);
99
+ }], ["__scopeId", "data-v-acb71e42"]]) }, mixins: [E], data: () => ({ showMenuRoute: I(), systemCode: null }), computed: { sidebar() {
100
+ return this.$store.state.app.sidebar;
101
+ }, device() {
102
+ return this.$store.state.app.device;
103
+ }, classObj() {
104
+ return { hideSidebar: !this.sidebar.opened, openSidebar: this.sidebar.opened, withoutAnimation: this.sidebar.withoutAnimation, mobile: this.device === "mobile" };
105
+ } }, created() {
106
+ this.systemCode = window.$vueApp.config.globalProperties.customSystem;
107
+ }, methods: { handleClickOutside() {
108
+ this.$store.dispatch("closeSidebar", { withoutAnimation: !1 });
109
+ } } }, [["render", function(e, t, a, r, o, s) {
110
+ const d = m("menubar"), n = m("breadcrumb"), i = m("tab-content");
111
+ 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)) })) : f("", !0), w(d, { "system-code": o.systemCode, collapse: !0, class: "sidebar-container" }, null, 8, ["system-code"]), u("div", j, [o.showMenuRoute ? (l(), b(n, { key: 0 })) : f("", !0), w(i)])], 2);
112
+ }], ["__scopeId", "data-v-5c0a6bf6"]]);
113
+ export {
114
+ W as default
115
+ };
@@ -0,0 +1,12 @@
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-42d5d61b.js";
3
+ const g = { style: { "padding-bottom": "10px" } }, k = { key: 0, class: "graphDiv" }, N = I({ name: "TacheSubprocessHistory", data: () => ({ type: "graph", workflowId: null }), created() {
4
+ const o = this.$route.query.workflowId;
5
+ o && (this.workflowId = parseInt(o));
6
+ } }, [["render", function(o, d, V, b, e, v) {
7
+ const i = t("el-radio-button"), w = t("el-radio-group"), u = t("workflow-history"), m = t("workflow-history-list");
8
+ return a(), s("div", null, [y("div", g, [l(w, { modelValue: e.type, "onUpdate:modelValue": d[0] || (d[0] = (f) => e.type = f) }, { default: r(() => [l(i, { label: "graph" }, { default: r(() => [n(p(o.$t("imatrixUIPublicModel.graphView")), 1)]), _: 1 }), l(i, { label: "list" }, { default: r(() => [n(p(o.$t("imatrixUIPublicModel.listView")), 1)]), _: 1 })]), _: 1 }, 8, ["modelValue"])]), e.type === "graph" ? (a(), s("div", k, [l(u, { id: e.workflowId }, null, 8, ["id"])])) : c("", !0), e.type === "list" ? (a(), h(m, { key: 1, "workflow-id": e.workflowId }, null, 8, ["workflow-id"])) : c("", !0)]);
9
+ }], ["__scopeId", "data-v-a936569d"]]);
10
+ export {
11
+ N as default
12
+ };
package/package.json CHANGED
@@ -1,15 +1,18 @@
1
1
  {
2
2
  "name": "agilebuilder-ui",
3
- "version": "1.1.13",
3
+ "version": "1.1.14",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./lib/super-ui.js",
7
7
  "scripts": {
8
- "lib": "vite build",
8
+ "lib": "vite build --mode production",
9
+ "lib:dev": "vite build --mode development",
10
+ "dev:watch": "vite build --mode development --watch",
9
11
  "preview": "vite preview"
10
12
  },
11
13
  "dependencies": {
12
14
  "@tinymce/tinymce-vue": "4.0.4",
15
+ "@vitejs/plugin-vue-jsx": "^4.1.2",
13
16
  "@zxing/library": "^0.20.0",
14
17
  "async-validator": "^4.2.5",
15
18
  "compressorjs": "1.2.1",
@@ -17,6 +20,7 @@
17
20
  "js-base64": "^3.7.7",
18
21
  "js-cookie": "^3.0.5",
19
22
  "mitt": "^3.0.1",
23
+ "normalize.css": "^8.0.1",
20
24
  "path-to-regexp": "6.2.1",
21
25
  "sortablejs": "^1.15.0",
22
26
  "tinymce": "5.8.2",
@@ -5,28 +5,9 @@
5
5
  {{ label }}
6
6
  <el-icon class="annex-cell"><el-icon-view /></el-icon>
7
7
  </div>
8
-
9
- <el-dialog
10
- :append-to-body="true"
11
- :show-close="true"
12
- :title="$t('imatrixUIPublicModel.previewImage')"
13
- v-model="showPreviewSingleImage"
14
- @close="$emit('close')"
15
- >
16
- <template v-slot:title>
17
- <span
18
- >{{ $t('imatrixUIPublicModel.previewImage') }}
19
- <!-- <i v-if="downloadable" class="el-icon-download" style="padding-left:5px;cursor:pointer;color:#409EFF" @click="downloadFile()" /> -->
20
- <!-- <i v-if="deleteable" class="el-icon-delete" style="padding-left:5px;cursor:pointer;color:#F56C6C" @click="deleteFile()" /> -->
21
- </span>
22
- </template>
23
- <el-image
24
- v-if="previewImageInfo && previewImageInfo.isImg"
25
- :preview-src-list="[previewImageInfo.src]"
26
- :src="previewImageInfo.src"
27
- />
28
- </el-dialog>
8
+ <el-image-viewer v-if="showPreviewSingleImage" teleported :url-list="[previewImageInfo.src]" @close="showPreviewSingleImage = false" />
29
9
  <el-dialog
10
+ layout-mobile="bottom"
30
11
  :append-to-body="true"
31
12
  :show-close="true"
32
13
  :title="$t('imatrixUIPublicModel.preview')"
@@ -41,22 +22,24 @@
41
22
  <!-- <i v-if="deleteable" class="el-icon-delete" style="padding-left:5px;cursor:pointer;color:#F56C6C" @click="deleteFile()" /> -->
42
23
  </span>
43
24
  </template>
44
- <el-table :show-header="false" :data="fileList">
45
- <el-table-column prop="showName" width="200" />
46
- <el-table-column align="right">
25
+ <el-table :show-header="false" :data="fileList" max-height="60vh">
26
+ <el-table-column prop="showName" show-overflow-tooltip />
27
+ <el-table-column width="80" align="center">
47
28
  <template v-slot="scope">
48
- <el-tooltip :content="$t('imatrixUIPublicModel.preview')" class="item" effect="dark" placement="top">
49
- <el-icon @click="previewSingle(scope.row)" style="cursor: pointer"><el-icon-view /></el-icon>
50
- </el-tooltip>
51
- </template>
52
- </el-table-column>
53
- <el-table-column>
54
- <template v-slot="scope">
55
- <el-tooltip :content="$t('imatrixUIPublicModel.download')" class="item" effect="dark" placement="top">
56
- <el-icon v-if="downloadable" @click="donwloadFile(scope.$index, fileList)" style="cursor: pointer"
57
- ><el-icon-download
58
- /></el-icon>
59
- </el-tooltip>
29
+ <div style="margin: -10px 0;">
30
+ <el-tooltip :content="$t('imatrixUIPublicModel.preview')" class="item" effect="dark" placement="top">
31
+ <el-button type="text" @click="previewSingle(scope.row)">
32
+ <el-icon style="cursor: pointer"><el-icon-view /></el-icon>
33
+ </el-button>
34
+ </el-tooltip>
35
+ <el-tooltip :content="$t('imatrixUIPublicModel.download')" class="item" effect="dark" placement="top">
36
+ <el-button type="text" @click="donwloadFile(scope.$index, fileList)">
37
+ <el-icon v-if="downloadable" style="cursor: pointer">
38
+ <el-icon-download />
39
+ </el-icon>
40
+ </el-button>
41
+ </el-tooltip>
42
+ </div>
60
43
  </template>
61
44
  </el-table-column>
62
45
  </el-table>
@@ -65,6 +48,7 @@
65
48
  </template>
66
49
 
67
50
  <script>
51
+ // import { Image } from 'antd';
68
52
  import { Paperclip as ElIconPaperclip, View as ElIconView, Download as ElIconDownload } from '@element-plus/icons-vue'
69
53
  import * as Vue from 'vue'
70
54
  import { isPlateSys, getSystemFrontendUrl } from '../../../src/utils/common-util'
@@ -148,6 +132,7 @@ export default {
148
132
  },
149
133
  previewSingle(fileInfo) {
150
134
  fileInfo = packageFile(fileInfo.showName, fileInfo.serverPath)
135
+ debugger
151
136
  if (isImage(fileInfo.showName)) {
152
137
  this.previewImageInfo = fileInfo
153
138
  this.showPreviewSingleImage = true
@@ -281,3 +266,6 @@ export default {
281
266
  emits: ['close']
282
267
  }
283
268
  </script>
269
+
270
+ <style lang="scss" scoped>
271
+ </style>
@@ -21,6 +21,8 @@ import {
21
21
  import eventBus from './eventBus'
22
22
  import { isPromise } from '../../../src/utils/common-util'
23
23
  import { updateWithPageValue } from '../../../src/utils/jump-page-utils'
24
+ import { getGuId } from '../../../src/utils/guid.js';
25
+
24
26
  const apis = {
25
27
  // 列表工具栏控件刷新列表数据。添加该方法解决工具栏值清空后,列表内容没有还原问题
26
28
  toolbarRefresh(parentRowIds, isLineEdit, toolbarFieldParam, isDeleteSubTableData) {
@@ -133,12 +135,13 @@ const apis = {
133
135
  // 新建行
134
136
  createRow(listCode, row, options) {
135
137
  return new Promise((resolve, reject) => {
138
+ debugger;
136
139
  if (!listCode) {
137
140
  listCode = store.get('_list_code')
138
141
  }
139
142
  const gridParams = store.get(listCode)
140
143
  const gridData = gridParams.gridData
141
- gridParams.superGrid.clearSort()
144
+ gridParams.superGrid?.clearSort?.()
142
145
  // console.log('创建行记录的条件1', gridParams.lineEdit)
143
146
  // console.log('创建行记录的条件2', gridParams.lineEdit.editable)
144
147
  // console.log('创建行记录的条件3', gridParams.loaded)
@@ -364,7 +367,10 @@ const apis = {
364
367
  }
365
368
  }
366
369
  }
367
- return row
370
+ return {
371
+ $rowDataGuId: getGuId(),
372
+ ...row,
373
+ }
368
374
  },
369
375
  // 设置默认值null
370
376
  setColumnsDefaultValue(allColumns, row, gridParams, getDefaultValueFunc) {
@@ -1005,7 +1011,7 @@ const apis = {
1005
1011
  }
1006
1012
  }
1007
1013
  if (gridParams.isMulitiSelect) {
1008
- gridParams.superGrid.clearSelection()
1014
+ gridParams.superGrid?.clearSelection?.()
1009
1015
  }
1010
1016
  gridParams.isCreateRow = false
1011
1017
  if (isRestore === undefined || !isRestore) {
@@ -1382,3 +1388,40 @@ const apis = {
1382
1388
  }
1383
1389
  }
1384
1390
  export default apis
1391
+
1392
+ export const apisMixin = {
1393
+ data() {
1394
+ return {
1395
+ toolbarFieldParam: null,
1396
+ showSearch: false,
1397
+ isMobile: false,
1398
+ baseURL: '',
1399
+ currentPage: 1,
1400
+ pageSize: 10,
1401
+ code: '',
1402
+ pageCode: '',
1403
+ jumpPageSetting: null,
1404
+ isShowPageDialog: false,
1405
+ gridData: [],
1406
+ subTableData: [],
1407
+ searchForm: [],
1408
+ options: {},
1409
+ lineEdit: null,
1410
+ loaded: false,
1411
+ configureObj: {},
1412
+ additionalParamMap: {},
1413
+ basicInfo: {},
1414
+ dynamicColumnInfo: {},
1415
+ $dataTypeMap: {},
1416
+ mainDefaultValueColumns: [],
1417
+ dynamicServiceName: '',
1418
+ isHasDynamic: false,
1419
+ isMulitiSelect: false,
1420
+ sql: false,
1421
+ restoreCurrentRowTimer: null
1422
+ };
1423
+ },
1424
+ methods: {
1425
+ ...apis
1426
+ }
1427
+ }