agilebuilder-ui 1.1.65-tmp26 → 1.1.65-tmp27
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/dist/index.full.min.js +1115 -1102
- package/dist/style.css +36 -20
- package/es/IntervalSelection/src/sectionDate.vue.mjs +8 -8
- package/es/chat-embed/src/chat-addition-data.vue2.mjs +14 -11
- package/es/chat-embed/src/chat-ai-answer-tip.vue2.mjs +8 -8
- package/es/chat-embed/src/chat-bubble-footer.vue2.mjs +5 -5
- package/es/chat-embed/src/chat-sender.vue2.mjs +41 -41
- package/es/chat-embed/src/components/answer-auto-chart.vue2.mjs +1 -2
- package/es/chat-embed/src/components/answer-interaction-data.vue2.mjs +6 -7
- package/es/chat-embed/src/components/history-detail.vue2.mjs +18 -18
- package/es/chat-embed/src/header.vue2.mjs +16 -16
- package/es/chat-embed/src/index.vue2.mjs +161 -161
- package/es/chat-embed/src/recommendation-message.vue2.mjs +9 -6
- package/es/chat-embed/src/sidebar-item.vue2.mjs +65 -65
- package/es/chat-embed/src/voice/voice.vue.mjs +36 -35
- package/es/date-picker-range/index.vue2.mjs +39 -39
- package/es/department-tree-mobile/src/department-tree-app.vue.mjs +8 -7
- package/es/department-tree-mobile/src/department-tree-inline-app.vue.mjs +54 -54
- package/es/department-tree-mobile/src/dept-path.vue.mjs +7 -6
- package/es/department-tree-mobile/src/dept-result.vue.mjs +7 -6
- package/es/department-user-tree-inline/src/department-user-multiple-tree-inline.vue.mjs +5 -5
- package/es/department-user-tree-mobile/src/department-user-tree-app.vue.mjs +10 -9
- package/es/department-user-tree-mobile/src/department-user-tree-inline-app.vue.mjs +64 -64
- package/es/department-user-tree-mobile/src/dept-path.vue.mjs +7 -6
- package/es/department-user-tree-mobile/src/dept-result.vue.mjs +4 -3
- package/es/empty-state/index.vue.mjs +2 -2
- package/es/fs-upload/src/fs-upload-multi.vue.mjs +1 -1
- package/es/fs-upload-list/src/fs-upload-list.vue.mjs +1 -1
- package/es/fs-upload-new/src/file-upload-mobile/file-upload-app.vue.mjs +12 -12
- package/es/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue.mjs +24 -24
- package/es/fs-upload-new/src/file-upload-mobile/file-upload-component.vue2.mjs +17 -17
- package/es/fs-upload-new/src/file-upload-mobile/file-upload.vue.mjs +12 -12
- package/es/fs-upload-new/src/fs-button-upload.vue2.mjs +23 -23
- package/es/fs-upload-new/src/fs-drag-upload.vue2.mjs +23 -23
- package/es/fs-upload-new/src/fs-preview-new.vue2.mjs +34 -34
- package/es/fs-upload-new/src/fs-upload-new.vue.mjs +15 -15
- package/es/json-view/json-view-dialog.vue.mjs +5 -5
- package/es/multipart-upload/src/multipart-upload-form.vue.mjs +1 -1
- package/es/multipart-upload/src/multipart-upload-list.vue.mjs +5 -5
- package/es/row-form/index.vue2.mjs +31 -31
- package/es/row-form/operation.vue.mjs +13 -13
- package/es/secret-info/index.vue.mjs +1 -1
- package/es/src/components/Affix/index.vue2.mjs +26 -26
- package/es/src/components/Scrollbar/index.vue.mjs +22 -22
- package/es/src/views/error-page/401.vue.mjs +8 -8
- package/es/src/views/error-page/404.vue.mjs +8 -8
- package/es/style.css +933 -917
- package/es/super-grid/src/columns-config.vue.mjs +1 -1
- package/es/super-grid/src/components/grid-radio-input.vue.mjs +5 -5
- package/es/super-grid/src/components/select-input.vue.mjs +55 -55
- package/es/super-grid/src/row-detail.vue.mjs +1 -1
- package/es/super-grid/src/search-form-advancedQuery.vue.mjs +1 -1
- package/es/super-grid/src/search-form-number.vue.mjs +4 -5
- package/es/super-grid/src/super-grid.vue.mjs +1 -1
- package/es/super-nine-grid/src/search-form-number.vue.mjs +4 -5
- package/es/super-nine-grid/src/search-form.vue.mjs +1 -1
- package/es/super-nine-grid/src/super-nine-grid.vue.mjs +1 -1
- package/es/workgroup-tree-inline/src/workgroup-tree-inline.vue.mjs +8 -8
- package/es/workgroup-tree-mobile/src/dept-result.vue.mjs +4 -3
- package/es/workgroup-tree-mobile/src/workgroup-tree-app.vue.mjs +8 -7
- package/es/workgroup-tree-mobile/src/workgroup-tree-inline-app.vue.mjs +51 -51
- package/es/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue.mjs +5 -5
- package/es/workgroup-user-tree-mobile/src/dept-path.vue.mjs +7 -6
- package/es/workgroup-user-tree-mobile/src/dept-result.vue.mjs +4 -3
- package/es/workgroup-user-tree-mobile/src/workgroup-user-tree-app.vue.mjs +7 -6
- package/es/workgroup-user-tree-mobile/src/workgroup-user-tree-inline-app.vue.mjs +65 -65
- package/es/year-range-picker/src/year-range-picker.vue.mjs +1 -1
- package/lib/IntervalSelection/src/sectionDate.vue.cjs +6 -6
- package/lib/chat-embed/src/chat-addition-data.vue2.cjs +13 -10
- package/lib/chat-embed/src/chat-ai-answer-tip.vue2.cjs +8 -8
- package/lib/chat-embed/src/chat-bubble-footer.vue2.cjs +5 -5
- package/lib/chat-embed/src/chat-sender.vue2.cjs +20 -20
- package/lib/chat-embed/src/components/answer-auto-chart.vue2.cjs +1 -2
- package/lib/chat-embed/src/components/answer-interaction-data.vue2.cjs +5 -6
- package/lib/chat-embed/src/components/history-detail.vue2.cjs +18 -18
- package/lib/chat-embed/src/header.vue2.cjs +17 -17
- package/lib/chat-embed/src/index.vue2.cjs +123 -123
- package/lib/chat-embed/src/recommendation-message.vue2.cjs +7 -4
- package/lib/chat-embed/src/sidebar-item.vue2.cjs +35 -35
- package/lib/chat-embed/src/voice/voice.vue.cjs +36 -35
- package/lib/date-picker-range/index.vue2.cjs +11 -11
- package/lib/department-tree-mobile/src/department-tree-app.vue.cjs +7 -6
- package/lib/department-tree-mobile/src/department-tree-inline-app.vue.cjs +53 -53
- package/lib/department-tree-mobile/src/dept-path.vue.cjs +6 -6
- package/lib/department-tree-mobile/src/dept-result.vue.cjs +7 -6
- package/lib/department-user-tree-inline/src/department-user-multiple-tree-inline.vue.cjs +5 -5
- package/lib/department-user-tree-mobile/src/department-user-tree-app.vue.cjs +9 -8
- package/lib/department-user-tree-mobile/src/department-user-tree-inline-app.vue.cjs +61 -61
- package/lib/department-user-tree-mobile/src/dept-path.vue.cjs +6 -6
- package/lib/department-user-tree-mobile/src/dept-result.vue.cjs +4 -3
- package/lib/empty-state/index.vue.cjs +2 -2
- package/lib/fs-upload/src/fs-upload-multi.vue.cjs +1 -1
- package/lib/fs-upload-list/src/fs-upload-list.vue.cjs +1 -1
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-app.vue.cjs +12 -12
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue.cjs +24 -24
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-component.vue2.cjs +17 -17
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload.vue.cjs +12 -12
- package/lib/fs-upload-new/src/fs-button-upload.vue2.cjs +23 -23
- package/lib/fs-upload-new/src/fs-drag-upload.vue2.cjs +23 -23
- package/lib/fs-upload-new/src/fs-preview-new.vue2.cjs +36 -36
- package/lib/fs-upload-new/src/fs-upload-new.vue.cjs +15 -15
- package/lib/json-view/json-view-dialog.vue.cjs +6 -6
- package/lib/multipart-upload/src/multipart-upload-form.vue.cjs +1 -1
- package/lib/multipart-upload/src/multipart-upload-list.vue.cjs +5 -5
- package/lib/row-form/index.vue2.cjs +31 -31
- package/lib/row-form/operation.vue.cjs +13 -13
- package/lib/secret-info/index.vue.cjs +1 -1
- package/lib/src/components/Affix/index.vue2.cjs +28 -28
- package/lib/src/components/Scrollbar/index.vue.cjs +22 -22
- package/lib/src/views/error-page/401.vue.cjs +7 -7
- package/lib/src/views/error-page/404.vue.cjs +4 -4
- package/lib/style.css +955 -939
- package/lib/super-grid/src/columns-config.vue.cjs +1 -1
- package/lib/super-grid/src/components/grid-radio-input.vue.cjs +5 -5
- package/lib/super-grid/src/components/select-input.vue.cjs +56 -56
- package/lib/super-grid/src/row-detail.vue.cjs +1 -1
- package/lib/super-grid/src/search-form-advancedQuery.vue.cjs +1 -1
- package/lib/super-grid/src/search-form-number.vue.cjs +6 -6
- package/lib/super-grid/src/super-grid.vue.cjs +1 -1
- package/lib/super-nine-grid/src/search-form-number.vue.cjs +6 -6
- package/lib/super-nine-grid/src/search-form.vue.cjs +1 -1
- package/lib/super-nine-grid/src/super-nine-grid.vue.cjs +1 -1
- package/lib/workgroup-tree-inline/src/workgroup-tree-inline.vue.cjs +5 -5
- package/lib/workgroup-tree-mobile/src/dept-result.vue.cjs +4 -3
- package/lib/workgroup-tree-mobile/src/workgroup-tree-app.vue.cjs +9 -8
- package/lib/workgroup-tree-mobile/src/workgroup-tree-inline-app.vue.cjs +48 -48
- package/lib/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue.cjs +5 -5
- package/lib/workgroup-user-tree-mobile/src/dept-path.vue.cjs +6 -6
- package/lib/workgroup-user-tree-mobile/src/dept-result.vue.cjs +4 -3
- package/lib/workgroup-user-tree-mobile/src/workgroup-user-tree-app.vue.cjs +9 -8
- package/lib/workgroup-user-tree-mobile/src/workgroup-user-tree-inline-app.vue.cjs +63 -63
- package/lib/year-range-picker/src/year-range-picker.vue.cjs +1 -1
- package/package.json +2 -2
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const e = require("vue"), t = require("@element-plus/icons-vue"), o = require("vue-i18n"), a = require("./type.cjs"), l = require("./util/history-message-util.cjs"), c = require("dayjs"), n = require("element-plus"), r = require("../../src/assets/chat-embed/robot.svg.cjs"),
|
|
3
|
-
const
|
|
4
|
-
let
|
|
5
|
-
const
|
|
6
|
-
e.watch(() =>
|
|
7
|
-
|
|
2
|
+
const e = require("vue"), t = require("@element-plus/icons-vue"), o = require("vue-i18n"), a = require("./type.cjs"), l = require("./util/history-message-util.cjs"), c = require("dayjs"), n = require("element-plus"), r = require("../../src/assets/chat-embed/robot.svg.cjs"), i = { class: "flex-avatar" }, s = ["src"], d = { class: "flex-function-icon" }, u = { class: "chat-embed__sidebar" }, m = { class: "sidebar-header" }, h = ["src"], p = { class: "sidebar-menu" }, f = { key: 0, class: "date-group" }, v = { key: 0, class: "date-group-item" }, k = { key: 1, class: "date-group-item" }, y = { key: 2, class: "date-group-item" }, g = { key: 3, class: "date-group-item" }, w = { key: 4, class: "date-group-item" }, N = ["onClick"], V = e.defineComponent({ __name: "sidebar-item", props: { aiModel: { type: String, default: null }, dialogFullScreen: { type: Boolean, default: null } }, emits: ["new-chat-session", "select-history-item", "update-ai-history"], setup(V2, { expose: C, emit: E }) {
|
|
3
|
+
const B = E, { t: A } = o.useI18n(), _ = V2;
|
|
4
|
+
let b = 1;
|
|
5
|
+
const x = e.ref(/* @__PURE__ */ new Map()), D = e.ref("history"), I = e.ref(""), M = e.ref(false), S = e.ref(true);
|
|
6
|
+
e.watch(() => _.aiModel, (e2, t2) => {
|
|
7
|
+
b = 1, D.value = "history", I.value = "", P();
|
|
8
8
|
}, { immediate: true });
|
|
9
|
-
const
|
|
10
|
-
|
|
9
|
+
const T = (e2) => {
|
|
10
|
+
b++, M.value || P();
|
|
11
11
|
};
|
|
12
|
-
function
|
|
13
|
-
|
|
12
|
+
function O() {
|
|
13
|
+
I.value = "", B("new-chat-session");
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
e2 !==
|
|
15
|
+
function L(e2) {
|
|
16
|
+
e2 !== D.value && (b = 1, D.value = e2, M.value = false, P());
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function P() {
|
|
19
19
|
let e2 = "";
|
|
20
|
-
if (
|
|
21
|
-
return
|
|
22
|
-
switch (
|
|
20
|
+
if (_.aiModel === a.AI_MODELS.INTERACTION)
|
|
21
|
+
return x.value = /* @__PURE__ */ new Map(), void O();
|
|
22
|
+
switch (_.aiModel) {
|
|
23
23
|
case a.AI_MODELS.RAGFLOW:
|
|
24
24
|
e2 = "RAGFLOW";
|
|
25
25
|
break;
|
|
@@ -35,9 +35,9 @@ const e = require("vue"), t = require("@element-plus/icons-vue"), o = require("v
|
|
|
35
35
|
e2 = "AIPPT";
|
|
36
36
|
}
|
|
37
37
|
let t2 = 0, o2 = 0;
|
|
38
|
-
"useful" ===
|
|
39
|
-
if (0 === e3.data.length &&
|
|
40
|
-
return n.ElMessage.info("没有更多历史记录了"), void (
|
|
38
|
+
"useful" === D.value ? t2 = 1 : "collected" === D.value && (o2 = 1), window.$vueApp.config.globalProperties.$http.post(window.$vueApp.config.globalProperties.baseAPI + `/mc/ai-history/list/${e2}/${t2}/${o2}`, { pagination: { currentPage: b, pageSize: 30, isShowTotal: false } }).then((e3) => {
|
|
39
|
+
if (0 === e3.data.length && b > 1)
|
|
40
|
+
return n.ElMessage.info("没有更多历史记录了"), void (M.value = true);
|
|
41
41
|
const t3 = function(e4) {
|
|
42
42
|
const t4 = /* @__PURE__ */ new Map(), o3 = /* @__PURE__ */ new Date(), a2 = new Date(o3.getFullYear(), o3.getMonth(), o3.getDate()).getTime(), l2 = a2 - 864e5, n2 = a2 - 6048e5, r2 = a2 - 2592e6;
|
|
43
43
|
return e4.forEach((e5) => {
|
|
@@ -56,25 +56,25 @@ const e = require("vue"), t = require("@element-plus/icons-vue"), o = require("v
|
|
|
56
56
|
}
|
|
57
57
|
}), t4;
|
|
58
58
|
}(e3.data);
|
|
59
|
-
1 ===
|
|
60
|
-
|
|
59
|
+
1 === b ? (e3.data.length < 30 && (M.value = true), x.value = t3) : t3.forEach((e4, t4) => {
|
|
60
|
+
x.value.has(t4) ? x.value.get(t4).push(...e4) : x.value.set(t4, e4);
|
|
61
61
|
});
|
|
62
62
|
}).catch((e3) => {
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
-
return
|
|
65
|
+
return C({ getHistory: P, addCurrentToSessionHistory: function(e2, t2 = []) {
|
|
66
66
|
e2 && setTimeout(() => {
|
|
67
67
|
l.getBySessionId(e2).then((e3) => {
|
|
68
|
-
e3 && (
|
|
68
|
+
e3 && (I.value = e3.id, x.value.has("today") || (x.value = new Map([["today", []], ...x.value])), x.value.get("today").unshift(e3), t2.length > 0 ? B("select-history-item", e3, t2) : B("select-history-item", e3, []));
|
|
69
69
|
}).catch((e3) => {
|
|
70
70
|
});
|
|
71
71
|
}, 100);
|
|
72
72
|
} }), (o2, c2) => {
|
|
73
|
-
const
|
|
74
|
-
return e.openBlock(), e.createElementBlock(e.Fragment, null, [e.withDirectives(e.createElementVNode("div", i, [e.createVNode(
|
|
75
|
-
|
|
73
|
+
const V3 = e.resolveComponent("el-avatar"), C2 = e.resolveComponent("SuperIcon"), E2 = e.resolveComponent("el-tooltip"), b2 = e.resolveComponent("el-icon"), M2 = e.resolveComponent("el-dropdown-item"), P2 = e.resolveComponent("el-dropdown-menu"), F = e.resolveComponent("el-dropdown"), R = e.resolveComponent("el-scrollbar"), $ = e.resolveComponent("el-button");
|
|
74
|
+
return e.openBlock(), e.createElementBlock(e.Fragment, null, [e.withDirectives(e.createElementVNode("div", i, [e.createVNode(V3, { size: 40, fit: "cover" }, { default: e.withCtx(() => [e.createElementVNode("img", { src: e.unref(r), alt: "AI Avatar" }, null, 8, s)]), _: 1 }), e.createElementVNode("div", d, [e.createVNode(E2, { class: "box-item", effect: "dark", content: "打开侧边栏" }, { default: e.withCtx(() => [e.createVNode(C2, { class: "shousuo-icon", onClick: c2[0] || (c2[0] = (e2) => S.value = true), iconValue: "amb-icon-zhankaibianlan" })]), _: 1 }), e.createVNode(E2, { class: "box-item", effect: "dark", content: "新建会话" }, { default: e.withCtx(() => [e.createVNode(C2, { class: "shousuo-icon", iconValue: "amb-icon-xinjianhuihua", onClick: O })]), _: 1 })])], 512), [[e.vShow, !S.value]]), e.withDirectives(e.createElementVNode("div", u, [e.createElementVNode("div", m, [e.createVNode(V3, { class: "chat-embed__header_avatar", size: 40, fit: "cover" }, { default: e.withCtx(() => [e.createElementVNode("img", { src: e.unref(r), alt: "AI Avatar" }, null, 8, h)]), _: 1 }), e.createElementVNode("span", null, e.toDisplayString(e.unref(A)("chatEmbed.name")), 1), e.createVNode(E2, { class: "box-item", effect: "dark", content: "收起侧边栏" }, { default: e.withCtx(() => [S.value ? (e.openBlock(), e.createBlock(C2, { key: 0, onClick: c2[1] || (c2[1] = (e2) => S.value = false), class: "right-icon", iconValue: "amb-icon-shouqibianlan" })) : e.createCommentVNode("", true)]), _: 1 })]), e.createElementVNode("div", p, [e.createElementVNode("div", { class: e.normalizeClass(["menu-item", { "active-item": "collected" === D.value }]), onClick: c2[2] || (c2[2] = (e2) => L("collected")) }, [e.createVNode(C2, { iconValue: "amb-icon-shoucang" }), c2[5] || (c2[5] = e.createElementVNode("span", null, "我的收藏", -1)), "collected" === D.value ? (e.openBlock(), e.createBlock(b2, { key: 0, class: "dropdown-right" }, { default: e.withCtx(() => [e.createVNode(e.unref(t.ArrowDown))]), _: 1 })) : (e.openBlock(), e.createBlock(b2, { key: 1, class: "dropdown-right" }, { default: e.withCtx(() => [e.createVNode(e.unref(t.ArrowRight))]), _: 1 }))], 2), e.createElementVNode("div", { class: e.normalizeClass(["menu-item", { "active-item": "useful" === D.value }]), onClick: c2[3] || (c2[3] = (e2) => L("useful")) }, [e.createVNode(C2, { iconValue: "amb-icon-youyong" }), c2[6] || (c2[6] = e.createElementVNode("span", null, "查看有用", -1)), "useful" === D.value ? (e.openBlock(), e.createBlock(b2, { key: 0, class: "dropdown-right" }, { default: e.withCtx(() => [e.createVNode(e.unref(t.ArrowDown))]), _: 1 })) : (e.openBlock(), e.createBlock(b2, { key: 1, class: "dropdown-right" }, { default: e.withCtx(() => [e.createVNode(e.unref(t.ArrowRight))]), _: 1 }))], 2), e.createElementVNode("div", { class: e.normalizeClass(["menu-item", { "active-item": "history" === D.value }]), onClick: c2[4] || (c2[4] = (e2) => L("history")) }, [e.createVNode(C2, { iconValue: "amb-icon-lishihuihua" }), c2[7] || (c2[7] = e.createElementVNode("span", null, "历史记录", -1)), "history" === D.value ? (e.openBlock(), e.createBlock(b2, { key: 0, class: "dropdown-right" }, { default: e.withCtx(() => [e.createVNode(e.unref(t.ArrowDown))]), _: 1 })) : (e.openBlock(), e.createBlock(b2, { key: 1, class: "dropdown-right" }, { default: e.withCtx(() => [e.createVNode(e.unref(t.ArrowRight))]), _: 1 }))], 2)]), e.createVNode(R, { class: "scrollbar-container", onEndReached: T }, { default: e.withCtx(() => [(e.openBlock(true), e.createElementBlock(e.Fragment, null, e.renderList(x.value, ([o3, r2]) => (e.openBlock(), e.createElementBlock(e.Fragment, { key: o3 }, [(r2 == null ? void 0 : r2.length) > 0 ? (e.openBlock(), e.createElementBlock("div", f, ["today" === o3 ? (e.openBlock(), e.createElementBlock("div", v, "今天")) : "yesterday" === o3 ? (e.openBlock(), e.createElementBlock("div", k, "昨天")) : "sevenDays" === o3 ? (e.openBlock(), e.createElementBlock("div", y, "七天内")) : "thirtyDays" === o3 ? (e.openBlock(), e.createElementBlock("div", g, "三十天内")) : (e.openBlock(), e.createElementBlock("div", w, e.toDisplayString(o3), 1)), (e.openBlock(true), e.createElementBlock(e.Fragment, null, e.renderList(r2, (o4) => (e.openBlock(), e.createElementBlock("div", { class: e.normalizeClass(["history-item", { "active-item": I.value === o4.id }]) }, [o4.useful ? (e.openBlock(), e.createBlock(C2, { key: 0, iconValue: "amb-icon-youyong" })) : e.createCommentVNode("", true), o4.collected ? (e.openBlock(), e.createBlock(b2, { key: 1 }, { default: e.withCtx(() => [e.createVNode(e.unref(t.StarFilled))]), _: 1 })) : e.createCommentVNode("", true), e.createElementVNode("div", { class: "history-subject", onClick: (e2) => function(e3) {
|
|
75
|
+
I.value !== e3.id && (I.value = e3.id, window.$vueApp.config.globalProperties.$http.get(window.$vueApp.config.globalProperties.baseAPI + `/mc/ai-history/content/${e3.id}`).then((t2) => {
|
|
76
76
|
let o5 = [];
|
|
77
|
-
switch (
|
|
77
|
+
switch (_.aiModel) {
|
|
78
78
|
case a.AI_MODELS.RAGFLOW:
|
|
79
79
|
o5 = l.formatRagflowHistoryMessage(t2);
|
|
80
80
|
break;
|
|
@@ -89,21 +89,21 @@ const e = require("vue"), t = require("@element-plus/icons-vue"), o = require("v
|
|
|
89
89
|
case a.AI_MODELS.PPT_GENERATION:
|
|
90
90
|
o5 = l.formatAiPptHistoryMessage(t2);
|
|
91
91
|
}
|
|
92
|
-
|
|
92
|
+
B("select-history-item", e3, o5);
|
|
93
93
|
}).catch((e4) => {
|
|
94
94
|
}));
|
|
95
|
-
}(o4) }, e.toDisplayString(o4.subject), 9,
|
|
95
|
+
}(o4) }, e.toDisplayString(o4.subject), 9, N), e.createVNode(F, { class: "dropdown-right", onCommand: (e2) => function(e3, t2) {
|
|
96
96
|
"collect" === e3 || "uncollect" === e3 ? l.collectById(t2.id).then(() => {
|
|
97
|
-
t2.collected = !t2.collected,
|
|
97
|
+
t2.collected = !t2.collected, B("update-ai-history", t2);
|
|
98
98
|
}) : "useful" === e3 || "unuseful" === e3 ? l.usefuleById(t2.id).then(() => {
|
|
99
|
-
t2.useful = !t2.useful,
|
|
99
|
+
t2.useful = !t2.useful, B("update-ai-history", t2);
|
|
100
100
|
}) : "delete" === e3 && l.deleteByIds([t2.id]).then(() => {
|
|
101
|
-
n.ElMessage.success("已删除该会话"),
|
|
101
|
+
n.ElMessage.success("已删除该会话"), x.value.forEach((e4) => {
|
|
102
102
|
const o5 = e4.findIndex((e5) => e5.id === t2.id);
|
|
103
103
|
-1 !== o5 && e4.splice(o5, 1);
|
|
104
|
-
}),
|
|
104
|
+
}), I.value === t2.id && O();
|
|
105
105
|
});
|
|
106
|
-
}(e2, o4), trigger: "click" }, { dropdown: e.withCtx(() => [e.createVNode(
|
|
106
|
+
}(e2, o4), trigger: "click" }, { dropdown: e.withCtx(() => [e.createVNode(P2, null, { default: e.withCtx(() => [o4.collected ? e.createCommentVNode("", true) : (e.openBlock(), e.createBlock(M2, { key: 0, command: "collect" }, { default: e.withCtx(() => [e.createVNode(b2, null, { default: e.withCtx(() => [e.createVNode(e.unref(t.StarFilled))]), _: 1 }), c2[8] || (c2[8] = e.createTextVNode("收藏 ", -1))]), _: 1 })), o4.collected ? (e.openBlock(), e.createBlock(M2, { key: 1, command: "uncollect" }, { default: e.withCtx(() => [e.createVNode(b2, null, { default: e.withCtx(() => [e.createVNode(e.unref(t.Star))]), _: 1 }), c2[9] || (c2[9] = e.createTextVNode("取消收藏 ", -1))]), _: 1 })) : e.createCommentVNode("", true), o4.useful ? e.createCommentVNode("", true) : (e.openBlock(), e.createBlock(M2, { key: 2, command: "useful" }, { default: e.withCtx(() => [...c2[10] || (c2[10] = [e.createTextVNode("有用", -1)])]), _: 1 })), o4.useful ? (e.openBlock(), e.createBlock(M2, { key: 3, command: "unuseful" }, { default: e.withCtx(() => [...c2[11] || (c2[11] = [e.createTextVNode("取消有用", -1)])]), _: 1 })) : e.createCommentVNode("", true), e.createVNode(M2, { command: "delete" }, { default: e.withCtx(() => [...c2[12] || (c2[12] = [e.createTextVNode("删除", -1)])]), _: 1 })]), _: 2 }, 1024)]), default: e.withCtx(() => [e.createVNode(b2, { class: "more-filled" }, { default: e.withCtx(() => [e.createVNode(e.unref(t.MoreFilled))]), _: 1 })]), _: 2 }, 1032, ["onCommand"])], 2))), 256))])) : e.createCommentVNode("", true)], 64))), 128))]), _: 1 }), e.createVNode($, { type: "primary", class: "new-session-button", onClick: O }, { icon: e.withCtx(() => [e.createVNode(C2, { iconValue: "amb-icon-xinjianhuihua" })]), default: e.withCtx(() => [c2[13] || (c2[13] = e.createTextVNode(" 新建会话 ", -1))]), _: 1 })], 512), [[e.vShow, S.value]])], 64);
|
|
107
107
|
};
|
|
108
108
|
} });
|
|
109
|
-
module.exports =
|
|
109
|
+
module.exports = V;
|
|
@@ -4,6 +4,7 @@ require("./js/crypto-js.cjs"), require("./js/processor/index.umd.cjs");
|
|
|
4
4
|
const r = require("./js/timer.cjs"), o = require("../../../src/utils/voice-setting-cache.cjs"), t = require("../../../src/utils/auth.cjs"), n = require("@element-plus/icons-vue");
|
|
5
5
|
require("uuid"), require("axios"), require("js-base64"), require("../../../src/utils/request.cjs");
|
|
6
6
|
const a = require("element-plus"), s = { key: 0 }, i = { __name: "voice", props: { paramMsg: { type: String, default: false } }, emits: ["userMessage"], setup(i2, { emit: c }) {
|
|
7
|
+
const u = c;
|
|
7
8
|
window.$http.get(window.$vueApp.config.globalProperties.baseAPI + "/bs/ai-voice-command/permission-json").then((e2) => {
|
|
8
9
|
e2 ? o.cacheVoiceSetting(JSON.stringify(e2)) : o.cacheVoiceSetting("EMPTY_VALUE");
|
|
9
10
|
}).catch((e2) => {
|
|
@@ -13,67 +14,67 @@ const a = require("element-plus"), s = { key: 0 }, i = { __name: "voice", props:
|
|
|
13
14
|
}).catch((e2) => {
|
|
14
15
|
o.cacheVoiceLeafMenu(JSON.stringify([])), console.error("获取语音命令所需叶子菜单失败", e2);
|
|
15
16
|
});
|
|
16
|
-
let
|
|
17
|
+
let l = e.ref("UNDEFINED"), d = e.ref("开始录音"), p = e.ref(""), f = e.ref("");
|
|
17
18
|
e.ref(false);
|
|
18
|
-
const
|
|
19
|
-
let
|
|
20
|
-
const
|
|
19
|
+
const m = "https:" === window.location.protocol || window.location.href.indexOf("//localhost") > 0 || window.location.href.indexOf("//127.0.0.1") > 0;
|
|
20
|
+
let g;
|
|
21
|
+
const v = e.ref("");
|
|
21
22
|
e.onMounted(() => {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
},
|
|
23
|
+
g = new RecorderManager(), g.constructor(window.$vueApp.config.globalProperties.portalUrl + "/js/processor"), g.onStart = () => {
|
|
24
|
+
v.value ? v.value = "" : C("OPEN");
|
|
25
|
+
}, g.onFrameRecorded = ({ isLastFrame: e2, frameBuffer: r2 }) => {
|
|
26
|
+
w.readyState === w.OPEN && (w.send(JSON.stringify({ data: { status: e2 ? 2 : 1, format: "audio/L16;rate=16000", encoding: "raw", audio: h(r2) } })), e2 && C("CLOSING"));
|
|
27
|
+
}, g.onStop = () => {
|
|
27
28
|
r.stopTimer();
|
|
28
29
|
};
|
|
29
30
|
});
|
|
30
|
-
let
|
|
31
|
-
function
|
|
31
|
+
let w = e.ref(), N = e.ref(), S = e.ref();
|
|
32
|
+
function h(e2) {
|
|
32
33
|
for (var r2 = "", o2 = new Uint8Array(e2), t2 = o2.byteLength, n2 = 0; n2 < t2; n2++)
|
|
33
34
|
r2 += String.fromCharCode(o2[n2]);
|
|
34
35
|
return window.btoa(r2);
|
|
35
36
|
}
|
|
36
|
-
let
|
|
37
|
-
function
|
|
38
|
-
|
|
37
|
+
let E = 60;
|
|
38
|
+
function O() {
|
|
39
|
+
E -= 1, E <= 0 ? (r.stopTimer(), g.stop()) : d.value = `录音中(${E}s)`;
|
|
39
40
|
}
|
|
40
|
-
function
|
|
41
|
-
|
|
41
|
+
function C(e2) {
|
|
42
|
+
l.value = e2, "CONNECTING" === e2 ? (d.value = "建立连接中", N = "", S = "") : "OPEN" === e2 ? (E = 60, d.value = `录音中(${E}s)`, r.startTimer(O)) : "CLOSING" === e2 ? d.value = "关闭连接中" : "CLOSED" === e2 && (d.value = "开始录音", y());
|
|
42
43
|
}
|
|
43
|
-
function
|
|
44
|
+
function b() {
|
|
44
45
|
let e2 = t.getUsername();
|
|
45
46
|
e2 || (e2 = 1);
|
|
46
47
|
const r2 = t.getToken(), o2 = window.$vueApp.config.globalProperties.voiceSockerUrl + e2 + "?jwt=" + r2;
|
|
47
48
|
if ("WebSocket" in window)
|
|
48
|
-
|
|
49
|
+
w = new WebSocket(o2);
|
|
49
50
|
else {
|
|
50
51
|
if (!("MozWebSocket" in window))
|
|
51
52
|
return void alert("浏览器不支持WebSocket");
|
|
52
|
-
|
|
53
|
+
w = new MozWebSocket(o2);
|
|
53
54
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
},
|
|
55
|
+
C("CONNECTING"), w.onopen = (e3) => {
|
|
56
|
+
g.start({ sampleRate: 16e3, frameSize: 1280 });
|
|
57
|
+
w.send(JSON.stringify({ common: { app_id: "c4b3002b" }, business: { language: "zh_cn", domain: "iat", accent: "mandarin", vad_eos: 5e3, dwa: "wpgs" }, data: { status: 0, format: "audio/L16;rate=16000", encoding: "raw" } }));
|
|
58
|
+
}, w.onmessage = (e3) => {
|
|
58
59
|
!function(e4) {
|
|
59
60
|
let r3 = e4;
|
|
60
61
|
if (r3 = JSON.parse(e4), r3 && r3.error)
|
|
61
|
-
|
|
62
|
+
w.close(), v.value = r3.error, a.ElMessage.error(r3.error);
|
|
62
63
|
else if (r3.data && r3.data.result) {
|
|
63
64
|
let e5 = r3.data.result, o3 = "", t2 = e5.ws;
|
|
64
65
|
for (let e6 = 0; e6 < t2.length; e6++)
|
|
65
66
|
o3 += t2[e6].cw[0].w;
|
|
66
|
-
e5.pgs ? ("apd" === e5.pgs && (
|
|
67
|
+
e5.pgs ? ("apd" === e5.pgs && (N = S), S = N + o3) : N += o3, p.value = S || N || "";
|
|
67
68
|
}
|
|
68
|
-
0 === r3.code && 2 === r3.data.status &&
|
|
69
|
+
0 === r3.code && 2 === r3.data.status && w.close(), 0 !== r3.code && (w.close(), console.error(r3));
|
|
69
70
|
}(e3.data);
|
|
70
|
-
},
|
|
71
|
-
console.error(e3),
|
|
72
|
-
},
|
|
73
|
-
|
|
71
|
+
}, w.onerror = (e3) => {
|
|
72
|
+
console.error(e3), g.stop(), C("CLOSED");
|
|
73
|
+
}, w.onclose = (e3) => {
|
|
74
|
+
g.stop(), C("CLOSED");
|
|
74
75
|
};
|
|
75
76
|
}
|
|
76
|
-
const
|
|
77
|
+
const k = () => {
|
|
77
78
|
!async function() {
|
|
78
79
|
if (!navigator.permissions || !navigator.permissions.query)
|
|
79
80
|
return "unsupported";
|
|
@@ -83,13 +84,13 @@ const a = require("element-plus"), s = { key: 0 }, i = { __name: "voice", props:
|
|
|
83
84
|
} catch (e2) {
|
|
84
85
|
return console.error("查询权限时发生错误:", e2), "error";
|
|
85
86
|
}
|
|
86
|
-
}(), "UNDEFINED" ===
|
|
87
|
-
},
|
|
88
|
-
|
|
87
|
+
}(), "UNDEFINED" === l.value || "CLOSED" === l.value ? b() : "CONNECTING" !== l.value && "OPEN" !== l.value || g.stop();
|
|
88
|
+
}, y = () => {
|
|
89
|
+
f.value = f.value + p.value, p.value = "", "" != f.value ? (u("userMessage", f.value), f.value = "") : (f.value = "", p.value = "");
|
|
89
90
|
};
|
|
90
91
|
return (r2, o2) => {
|
|
91
92
|
const t2 = e.resolveComponent("el-icon");
|
|
92
|
-
return e.unref(
|
|
93
|
+
return e.unref(m) ? (e.openBlock(), e.createElementBlock("span", s, ["UNDEFINED" === e.unref(l) || "CLOSED" === e.unref(l) ? (e.openBlock(), e.createBlock(t2, { key: 0, color: "#409EFF", onClick: k }, { default: e.withCtx(() => [e.createVNode(e.unref(n.Microphone))]), _: 1 })) : (e.openBlock(), e.createBlock(t2, { key: 1, class: "send-icon", color: "red" }, { default: e.withCtx(() => [e.createVNode(e.unref(n.Mute))]), _: 1 }))])) : e.createCommentVNode("", true);
|
|
93
94
|
};
|
|
94
95
|
} };
|
|
95
96
|
module.exports = i;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const e = require("vue"), a = require("dayjs"), t = require("vue-i18n"), l = { class: "ab-date-range" }, r =
|
|
3
|
-
const
|
|
2
|
+
const e = require("vue"), a = require("dayjs"), t = require("vue-i18n"), l = { class: "ab-date-range" }, r = e.defineComponent({ __name: "index", props: { modelValue: { type: Array, default: () => [] }, type: { type: String, default: "daterange" }, format: { type: String, default: void 0 }, valueFormat: { type: String, default: void 0 }, disabled: { type: Boolean, default: false }, clearable: { type: Boolean, default: true }, readonly: { type: Boolean, default: false }, shortcuts: { type: Array, default: void 0 }, startPlaceholder: { type: String, default: void 0 }, endPlaceholder: { type: String, default: void 0 }, size: { type: String, default: "medium" } }, emits: ["update:modelValue", "change", "blur", "focus", "visible-change", "panel-change", "clear"], setup(r2, { emit: n }) {
|
|
3
|
+
const { t: o } = t.useI18n(), u = r2, d = e.ref(u.startPlaceholder ?? o("imatrixUIMessage.startDate")), i = e.ref(u.endPlaceholder ?? o("imatrixUIMessage.endDate")), s = n, c = e.ref(u.modelValue && u.modelValue[0]), m = e.ref(u.modelValue && u.modelValue[1]);
|
|
4
4
|
e.watch(() => u.modelValue && u.modelValue[0], (e2) => {
|
|
5
5
|
c.value = e2;
|
|
6
6
|
}), e.watch(() => u.modelValue && u.modelValue[1], (e2) => {
|
|
@@ -20,7 +20,7 @@ const e = require("vue"), a = require("dayjs"), t = require("vue-i18n"), l = { c
|
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
function v(e2, a2) {
|
|
23
|
-
|
|
23
|
+
s(e2, a2);
|
|
24
24
|
}
|
|
25
25
|
function p(e2) {
|
|
26
26
|
if (u.valueFormat) {
|
|
@@ -48,7 +48,7 @@ const e = require("vue"), a = require("dayjs"), t = require("vue-i18n"), l = { c
|
|
|
48
48
|
a2.push(p(t2));
|
|
49
49
|
} else
|
|
50
50
|
a2 = p(e3);
|
|
51
|
-
Array.isArray(a2) && a2.length >= 2 ? (c.value = a2[0], m.value = a2[1]) : (c.value = a2, m.value = a2),
|
|
51
|
+
Array.isArray(a2) && a2.length >= 2 ? (c.value = a2[0], m.value = a2[1]) : (c.value = a2, m.value = a2), A();
|
|
52
52
|
}("function" == typeof e2.value ? e2.value() : e2.value);
|
|
53
53
|
} } : e2);
|
|
54
54
|
});
|
|
@@ -71,19 +71,19 @@ const e = require("vue"), a = require("dayjs"), t = require("vue-i18n"), l = { c
|
|
|
71
71
|
function V(e2) {
|
|
72
72
|
c.value = e2;
|
|
73
73
|
const a2 = y(e2), t2 = y(m.value);
|
|
74
|
-
a2 && t2 && a2.getTime() > t2.getTime() && (m.value = e2),
|
|
74
|
+
a2 && t2 && a2.getTime() > t2.getTime() && (m.value = e2), A();
|
|
75
75
|
}
|
|
76
76
|
function C(e2) {
|
|
77
77
|
m.value = e2;
|
|
78
78
|
const a2 = y(c.value), t2 = y(e2);
|
|
79
|
-
a2 && t2 && t2.getTime() < a2.getTime() && (c.value = e2),
|
|
79
|
+
a2 && t2 && t2.getTime() < a2.getTime() && (c.value = e2), A();
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
|
|
81
|
+
function A() {
|
|
82
|
+
s("update:modelValue", [c.value, m.value]), s("change", [c.value, m.value]);
|
|
83
83
|
}
|
|
84
84
|
return (a2, t2) => {
|
|
85
|
-
const
|
|
86
|
-
return e.openBlock(), e.createElementBlock("div", l, [e.createVNode(
|
|
85
|
+
const n2 = e.resolveComponent("el-date-picker");
|
|
86
|
+
return e.openBlock(), e.createElementBlock("div", l, [e.createVNode(n2, { modelValue: c.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e2) => c.value = e2), type: f.value, format: r2.format, "value-format": r2.valueFormat, disabled: r2.disabled, clearable: r2.clearable, readonly: r2.readonly, shortcuts: g.value, placeholder: d.value, size: r2.size, "disabled-date": h, onChange: V, onBlur: t2[1] || (t2[1] = (e2) => v("blur", e2)), onFocus: t2[2] || (t2[2] = (e2) => v("focus", e2)), onVisibleChange: t2[3] || (t2[3] = (e2) => v("visible-change", e2)), onPanelChange: t2[4] || (t2[4] = (e2) => v("panel-change", e2)), onClear: t2[5] || (t2[5] = (e2) => v("clear", e2)) }, null, 8, ["modelValue", "type", "format", "value-format", "disabled", "clearable", "readonly", "shortcuts", "placeholder", "size"]), t2[12] || (t2[12] = e.createElementVNode("span", { class: "sep" }, "-", -1)), e.createVNode(n2, { modelValue: m.value, "onUpdate:modelValue": t2[6] || (t2[6] = (e2) => m.value = e2), type: f.value, format: r2.format, "value-format": r2.valueFormat, disabled: r2.disabled, clearable: r2.clearable, readonly: r2.readonly, shortcuts: g.value, placeholder: i.value, size: r2.size, "disabled-date": b, onChange: C, onBlur: t2[7] || (t2[7] = (e2) => v("blur", e2)), onFocus: t2[8] || (t2[8] = (e2) => v("focus", e2)), onVisibleChange: t2[9] || (t2[9] = (e2) => v("visible-change", e2)), onPanelChange: t2[10] || (t2[10] = (e2) => v("panel-change", e2)), onClear: t2[11] || (t2[11] = (e2) => v("clear", e2)) }, null, 8, ["modelValue", "type", "format", "value-format", "disabled", "clearable", "readonly", "shortcuts", "placeholder", "size"])]);
|
|
87
87
|
};
|
|
88
88
|
} });
|
|
89
|
-
module.exports =
|
|
89
|
+
module.exports = r;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const e = require("vue"), t = require("./department-tree-inline-app.vue.cjs"), l = { style: { "text-align": "center" } }, o = e.defineComponent({ name: "DepartmentTreeMobile", props: { multiple: {}, departmentInfo: {}, selectDepartmentInfo: {}, searchField: {}, separator: {}, limitFilterColumn: {} }, emits: ["close"], setup(o2, { emit: r }) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
const n = r;
|
|
4
|
+
let a = e.ref(true);
|
|
5
|
+
function i(e2) {
|
|
6
|
+
n("close", e2), a.value = false;
|
|
6
7
|
}
|
|
7
|
-
return (
|
|
8
|
-
const
|
|
9
|
-
return e.openBlock(), e.createBlock(
|
|
8
|
+
return (r2, n2) => {
|
|
9
|
+
const s = e.resolveComponent("el-drawer");
|
|
10
|
+
return e.openBlock(), e.createBlock(s, { modelValue: e.unref(a), "onUpdate:modelValue": n2[0] || (n2[0] = (t2) => e.isRef(a) ? a.value = t2 : a = t2), "append-to-body": "", "close-on-click-modal": false, "close-on-press-escape": false, direction: "btt", size: "100%", class: "organization-tree", onClose: n2[1] || (n2[1] = (e2) => i()) }, { header: e.withCtx(() => [e.createElementVNode("div", l, e.toDisplayString(r2.$t("imatrixUIMessage.pleaseSelect")), 1)]), default: e.withCtx(() => [e.unref(a) ? (e.openBlock(), e.createBlock(t, { key: 0, multiple: o2.multiple, departmentInfo: o2.departmentInfo, selectDepartmentInfo: o2.selectDepartmentInfo, searchField: o2.searchField, separator: o2.separator, limitFilterColumn: o2.limitFilterColumn, onClose: i }, null, 8, ["multiple", "departmentInfo", "selectDepartmentInfo", "searchField", "separator", "limitFilterColumn"])) : e.createCommentVNode("", true)]), _: 1 }, 8, ["modelValue"]);
|
|
10
11
|
};
|
|
11
12
|
} });
|
|
12
13
|
module.exports = o;
|
|
@@ -1,98 +1,98 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const e = require("vue"), t = require("@element-plus/icons-vue"), l = require("./department-tree-service.cjs"), n = require("../../utils/organization.cjs"), a = require("./dept-path.vue.cjs"), o = require("./dept-result.vue.cjs"), r = require("element-plus"), s = require("vue-i18n"), c = require("../../utils/utils.cjs"), u = require("../../src/assets/nonemessage.png.cjs"), i = { style: { display: "flex" } }, d = { style: { flex: "0 0 20%", "text-align": "left" } }, p = { style: { flex: "0 0 80%", "text-align": "right" } }, m = { class: "item-row" }, f = { class: "item-label" }, h = { class: "item-description" }, v = ["onClick"], N = { style: { display: "flex" } }, g = { key: 0 }, k = { style: { "padding-left": "10px" } }, y = { key: 1 }, C = { key: 0, style: { color: "#999" } }, V = { class: "button-area" }, w = e.defineComponent({ __name: "department-tree-inline-app", props: { multiple: {}, departmentInfo: {}, selectDepartmentInfo: {}, searchField: {}, separator: {}, limitFilterColumn: {} }, emits: ["close"], setup(w2, { emit: x }) {
|
|
3
|
-
const I = w2, { t: E } = s.useI18n(), D = e.ref(null);
|
|
3
|
+
const I = w2, { t: E } = s.useI18n(), D = x, B = e.ref(null);
|
|
4
4
|
e.ref(false);
|
|
5
|
-
let
|
|
5
|
+
let T = e.ref(null), S = e.ref(false), _ = e.ref(null), b = e.ref([]);
|
|
6
6
|
e.ref([]);
|
|
7
|
-
let
|
|
7
|
+
let R = e.ref([]);
|
|
8
8
|
e.ref([]);
|
|
9
|
-
let
|
|
10
|
-
function
|
|
9
|
+
let q = e.ref([]), M = e.ref([]), P = e.ref(null), $ = e.ref(false), z = e.ref({ userField: "name", searchValue: null, treeType: "DEPARTMENT_TREE", departmentInfo: null });
|
|
10
|
+
function A() {
|
|
11
11
|
c.canShowOrgTree().then((e2) => {
|
|
12
12
|
e2 ? l.getTenantChildren(I.departmentInfo, -1, I.limitFilterColumn).then((e3) => {
|
|
13
|
-
|
|
14
|
-
}) :
|
|
13
|
+
b.value = e3, l.checkedDeptDefault(R.value, M.value);
|
|
14
|
+
}) : b.value = [];
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
I.multiple && (t2 ?
|
|
17
|
+
function O(e2, t2, l2) {
|
|
18
|
+
I.multiple && (t2 ? j(e2) : F(e2));
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
!I.multiple && e2.nodeType && "DEPARTMENT" === e2.nodeType && (
|
|
20
|
+
function U(e2, t2, l2, n2) {
|
|
21
|
+
!I.multiple && e2.nodeType && "DEPARTMENT" === e2.nodeType && (R.value = [e2]);
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function j(e2) {
|
|
24
24
|
if (e2.nodeType && "DEPARTMENT" === e2.nodeType) {
|
|
25
|
-
const t2 =
|
|
26
|
-
t2 && 0 !== t2.length ||
|
|
25
|
+
const t2 = R.value.filter((t3) => t3.nodeId === e2.nodeId);
|
|
26
|
+
t2 && 0 !== t2.length || R.value.push(JSON.parse(JSON.stringify(e2)));
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
const t2 =
|
|
31
|
-
|
|
29
|
+
function F(e2) {
|
|
30
|
+
const t2 = R.value.findIndex((t3) => t3.nodeId === e2.nodeId);
|
|
31
|
+
R.value.splice(t2, 1), $.value = false;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function J(e2) {
|
|
34
34
|
if (I.multiple)
|
|
35
35
|
if (e2) {
|
|
36
|
-
const e3 =
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
const e3 = b.value.map((e4) => e4.nodeId);
|
|
37
|
+
B.value.setCheckedKeys(e3, false), b.value.forEach((e4) => {
|
|
38
|
+
j(e4);
|
|
39
39
|
});
|
|
40
40
|
} else
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}),
|
|
41
|
+
b.value.forEach((e3) => {
|
|
42
|
+
F(e3);
|
|
43
|
+
}), B.value.setCheckedKeys([], false);
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function K(e2) {
|
|
46
46
|
l.loadDepartment(e2.id).then((e3) => {
|
|
47
|
-
|
|
47
|
+
b.value = e3, l.checkedDeptDefault(R.value, M.value);
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
t2 ? (
|
|
50
|
+
function H(e2, t2, l2) {
|
|
51
|
+
t2 ? (q.value = [], A()) : (q.value.splice(l2 + 1, q.value.length - (l2 + 1)), K(e2));
|
|
52
52
|
}
|
|
53
|
-
function
|
|
54
|
-
|
|
53
|
+
function G() {
|
|
54
|
+
P.value.showResult();
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
const t2 =
|
|
56
|
+
function L(e2) {
|
|
57
|
+
const t2 = R.value.filter((t3) => t3.nodeId === e2.nodeId);
|
|
58
58
|
if (t2 && t2.length > 0) {
|
|
59
59
|
const t3 = [];
|
|
60
|
-
|
|
60
|
+
R.value.forEach((l2) => {
|
|
61
61
|
l2.nodeId !== e2.nodeId && t3.push(l2.nodeId);
|
|
62
|
-
}),
|
|
62
|
+
}), B.value.setCheckedKeys(t3, true);
|
|
63
63
|
}
|
|
64
|
-
|
|
64
|
+
F(e2);
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function Q() {
|
|
67
67
|
if (I.multiple) {
|
|
68
68
|
let e2 = { ids: [], names: [], zhNames: [], enNames: [], codes: [], departments: [] };
|
|
69
|
-
|
|
69
|
+
R.value.forEach((t3) => {
|
|
70
70
|
let l2;
|
|
71
71
|
l2 = null !== t3.data && void 0 !== t3.data ? JSON.parse(t3.data) : t3, function(e3, t4, l3) {
|
|
72
|
-
e3.ids.push(t4.id), e3.codes.push(l3.code), e3.containBranch =
|
|
72
|
+
e3.ids.push(t4.id), e3.codes.push(l3.code), e3.containBranch = S.value, l3.tenantCode = T.value.code, l3.tenantName = T.value.tenantName, e3.departments.push(l3);
|
|
73
73
|
const n2 = l3.showName;
|
|
74
74
|
e3.names.push(n2), e3.zhNames.push(l3.name), e3.enNames.push(l3.enName ? l3.enName : "");
|
|
75
75
|
}(e2, t3, l2);
|
|
76
76
|
});
|
|
77
77
|
let t2 = { ids: [], names: [], zhNames: [], enNames: [], codes: [], departments: [] };
|
|
78
|
-
Object.assign(t2, e2), t2.ids.length > 0 ?
|
|
78
|
+
Object.assign(t2, e2), t2.ids.length > 0 ? D("close", t2) : r.ElMessage({ message: E("imatrixUIMessage.pleaseSelectDepartment"), type: "warning" });
|
|
79
79
|
} else {
|
|
80
|
-
const e2 =
|
|
81
|
-
t2.tenantName =
|
|
82
|
-
const n2 = { id: e2.id, name: l2, zhName: t2.name, enName: t2.enName, code: t2.code, containBranch:
|
|
83
|
-
|
|
80
|
+
const e2 = R.value[0], t2 = JSON.parse(e2.data), l2 = e2.showName;
|
|
81
|
+
t2.tenantName = T.value.tenantName, t2.tenantCode = T.value.code;
|
|
82
|
+
const n2 = { id: e2.id, name: l2, zhName: t2.name, enName: t2.enName, code: t2.code, containBranch: S.value, department: t2 };
|
|
83
|
+
D("close", n2);
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
-
function
|
|
87
|
-
|
|
88
|
-
e2 ? (0 === e2.length && r.ElMessage({ message: E("imatrixUIMessage.queryResultIsEmpty"), type: "warning" }),
|
|
89
|
-
})) :
|
|
86
|
+
function W() {
|
|
87
|
+
z.value.searchValue ? (z.value.searchValue = z.value.searchValue.trim(), z.value.departmentInfo = I.departmentInfo, window.$vueApp.config.globalProperties.$http.post(window.$vueApp.config.globalProperties.baseAPI + "/component/organization-trees/search-depts", z.value).then((e2) => {
|
|
88
|
+
e2 ? (0 === e2.length && r.ElMessage({ message: E("imatrixUIMessage.queryResultIsEmpty"), type: "warning" }), b.value = e2) : r.ElMessage({ message: E("imatrixUIMessage.queryResultIsEmpty"), type: "warning" });
|
|
89
|
+
})) : A();
|
|
90
90
|
}
|
|
91
91
|
return e.onMounted(() => {
|
|
92
92
|
l.initSelectDepts(I.selectDepartmentInfo, -1, I.searchField, I.separator).then((e2) => {
|
|
93
|
-
|
|
93
|
+
R.value = e2, l.getTenant().then((e3) => {
|
|
94
94
|
const t2 = e3[0].data;
|
|
95
|
-
|
|
95
|
+
T.value = JSON.parse(t2), S.value = e3[0].containBranch, _.value = e3[0].name, A();
|
|
96
96
|
});
|
|
97
97
|
}), function() {
|
|
98
98
|
const e2 = document.querySelector(".org-tree");
|
|
@@ -100,11 +100,11 @@ const e = require("vue"), t = require("@element-plus/icons-vue"), l = require(".
|
|
|
100
100
|
t2 = t2 - 110 - 60 - 60 - 60, e2.style.height = t2 + "px", e2.style.minHeight = "300px";
|
|
101
101
|
}();
|
|
102
102
|
}), (l2, r2) => {
|
|
103
|
-
const s2 = e.resolveComponent("el-checkbox"), c2 = e.resolveComponent("el-icon"),
|
|
104
|
-
return e.openBlock(), e.createElementBlock("div", null, [e.createVNode(
|
|
105
|
-
return t2 = a2,
|
|
103
|
+
const s2 = e.resolveComponent("el-checkbox"), c2 = e.resolveComponent("el-icon"), x2 = e.resolveComponent("el-input"), I2 = e.resolveComponent("el-col"), E2 = e.resolveComponent("el-row"), D2 = e.resolveComponent("el-card"), T2 = e.resolveComponent("el-empty"), S2 = e.resolveComponent("el-tree"), A2 = e.resolveComponent("el-button");
|
|
104
|
+
return e.openBlock(), e.createElementBlock("div", null, [e.createVNode(D2, { class: "card-content", style: { height: "50px" } }, { default: e.withCtx(() => [e.createVNode(E2, { class: "item-row item-row-all" }, { default: e.withCtx(() => [e.createVNode(I2, { style: { width: "100%" } }, { default: e.withCtx(() => [e.createElementVNode("div", i, [e.createElementVNode("div", d, [w2.multiple ? (e.openBlock(), e.createBlock(s2, { key: 0, modelValue: e.unref($), "onUpdate:modelValue": r2[0] || (r2[0] = (t2) => e.isRef($) ? $.value = t2 : $ = t2), label: l2.$t("departmentTreeInline.allCheck"), value: "all", onChange: J }, null, 8, ["modelValue", "label"])) : e.createCommentVNode("", true)]), e.createElementVNode("div", p, [e.createVNode(x2, { modelValue: e.unref(z).searchValue, "onUpdate:modelValue": r2[1] || (r2[1] = (t2) => e.unref(z).searchValue = t2), placeholder: l2.$t("departmentTreeInline.pleaseInputNameOrCode"), onClear: W, onKeyup: e.withKeys(W, ["enter"]), onBlur: W, clearable: "" }, { suffix: e.withCtx(() => [e.createVNode(c2, { onClick: W }, { default: e.withCtx(() => [e.createVNode(e.unref(t.Search))]), _: 1 })]), _: 1 }, 8, ["modelValue", "placeholder"])])])]), _: 1 })]), _: 1 })]), _: 1 }), e.unref(_) ? (e.openBlock(), e.createBlock(D2, { key: 0, class: "card-content" }, { default: e.withCtx(() => [e.createVNode(E2, { class: "item-row item-row-all" }, { default: e.withCtx(() => [e.createVNode(I2, { class: "item-label dept-path" }, { default: e.withCtx(() => [e.createVNode(a, { tenantName: e.unref(_), clickDepts: e.unref(q), onClickBreadcrumb: H }, null, 8, ["tenantName", "clickDepts"])]), _: 1 })]), _: 1 })]), _: 1 })) : e.createCommentVNode("", true), e.createVNode(D2, { class: "card-content org-tree", style: { overflow: "auto" } }, { default: e.withCtx(() => [e.unref(b).length ? (e.openBlock(), e.createBlock(S2, { key: 1, ref_key: "orgTreeRef", ref: B, data: e.unref(b), "show-checkbox": w2.multiple, "node-key": "nodeId", "check-on-click-node": "", "default-checked-keys": e.unref(M), onCheckChange: O, onNodeClick: U }, { default: e.withCtx(({ node: l3, data: a2 }) => [e.createElementVNode("div", m, [e.createElementVNode("div", f, [e.createTextVNode(e.toDisplayString(a2.showName) + " ", 1), e.createElementVNode("span", h, e.toDisplayString(e.unref(n.getShowDeptNamePath)(a2.showName, a2)), 1)]), a2.leaf ? e.createCommentVNode("", true) : (e.openBlock(), e.createElementBlock("div", { key: 0, class: "item-side", onClick: (e2) => {
|
|
105
|
+
return t2 = a2, q.value.push(t2), void K(t2);
|
|
106
106
|
var t2;
|
|
107
|
-
} }, [e.createVNode(c2, null, { default: e.withCtx(() => [e.createVNode(e.unref(t.ArrowRight))]), _: 1 })], 8, v))])]), _: 1 }, 8, ["data", "show-checkbox", "default-checked-keys"])) : (e.openBlock(), e.createBlock(
|
|
107
|
+
} }, [e.createVNode(c2, null, { default: e.withCtx(() => [e.createVNode(e.unref(t.ArrowRight))]), _: 1 })], 8, v))])]), _: 1 }, 8, ["data", "show-checkbox", "default-checked-keys"])) : (e.openBlock(), e.createBlock(T2, { key: 0, image: e.unref(u) }, null, 8, ["image"]))]), _: 1 }), e.createVNode(D2, { class: "card-footer" }, { default: e.withCtx(() => [e.createElementVNode("div", N, [e.createElementVNode("div", { class: "select-result", onClick: G }, [w2.multiple ? (e.openBlock(), e.createElementBlock("span", { key: 0, onClick: G }, [e.unref(R).length > 0 ? (e.openBlock(), e.createElementBlock("span", g, [e.createTextVNode(e.toDisplayString(l2.$t("departmentTreeInline.selectResultInfoHasSelect")) + e.toDisplayString(l2.$t("departmentTreeInline.selectResultInfo", { num: e.unref(R).length })) + " ", 1), e.createElementVNode("span", k, [e.createVNode(c2, null, { default: e.withCtx(() => [e.createVNode(e.unref(t.ArrowUpBold))]), _: 1 })])])) : e.createCommentVNode("", true)])) : e.unref(R).length > 0 ? (e.openBlock(), e.createElementBlock("span", y, [e.createTextVNode(e.toDisplayString(l2.$t("departmentTreeInline.selectResultInfoHasSelect")) + e.toDisplayString(e.unref(R)[0].showName), 1), "-1" !== e.unref(R)[0].parentNodeId && e.unref(n.getDeptNamePath)(e.unref(R)[0]) ? (e.openBlock(), e.createElementBlock("span", C, "(" + e.toDisplayString(e.unref(n.getDeptNamePath)(e.unref(R)[0])) + ")", 1)) : e.createCommentVNode("", true)])) : e.createCommentVNode("", true)]), e.createElementVNode("div", V, [e.createVNode(A2, { size: "large", type: "primary", onClick: Q }, { default: e.withCtx(() => [e.createTextVNode(e.toDisplayString(l2.$t("imatrixUIPublicModel.sure")), 1)]), _: 1 })])])]), _: 1 }), e.createVNode(o, { ref_key: "deptResultRef", ref: P, selectDepts: e.unref(R), onRemoveDept: L }, null, 8, ["selectDepts"])]);
|
|
108
108
|
};
|
|
109
109
|
} });
|
|
110
110
|
module.exports = w;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const e = require("vue"), t = { key: 1 }, l = ["onClick"], n = { key: 1 }, c = e.defineComponent({ __name: "dept-path", props: { tenantName: { type: String, default: null }, clickDepts: { type: Array, default: null } }, emits: ["clickBreadcrumb"], setup(c2, { emit: o }) {
|
|
3
|
-
const r = c2;
|
|
4
|
-
let
|
|
5
|
-
function
|
|
6
|
-
|
|
3
|
+
const r = c2, a = o;
|
|
4
|
+
let i = e.ref(r.tenantName);
|
|
5
|
+
function p(e2, t2, l2) {
|
|
6
|
+
a("clickBreadcrumb", e2, t2, l2);
|
|
7
7
|
}
|
|
8
8
|
return (o2, r2) => {
|
|
9
|
-
const
|
|
10
|
-
return e.openBlock(), e.createBlock(s, { separator: "/" }, { default: e.withCtx(() => [e.createVNode(
|
|
9
|
+
const a2 = e.resolveComponent("el-breadcrumb-item"), s = e.resolveComponent("el-breadcrumb");
|
|
10
|
+
return e.openBlock(), e.createBlock(s, { separator: "/" }, { default: e.withCtx(() => [e.createVNode(a2, null, { default: e.withCtx(() => [c2.clickDepts.length > 0 ? (e.openBlock(), e.createElementBlock("span", { key: 0, class: "breadcrumb-label-link", onClick: r2[0] || (r2[0] = (e2) => p(null, true)) }, e.toDisplayString(e.unref(i)), 1)) : (e.openBlock(), e.createElementBlock("span", t, e.toDisplayString(e.unref(i)), 1))]), _: 1 }), (e.openBlock(true), e.createElementBlock(e.Fragment, null, e.renderList(c2.clickDepts, (t2, o3) => (e.openBlock(), e.createBlock(a2, { key: t2.id }, { default: e.withCtx(() => [o3 < c2.clickDepts.length - 1 ? (e.openBlock(), e.createElementBlock("span", { key: 0, class: "breadcrumb-label-link", onClick: (e2) => p(t2, false, o3) }, e.toDisplayString(t2.showName), 9, l)) : (e.openBlock(), e.createElementBlock("span", n, e.toDisplayString(t2.showName), 1))]), _: 2 }, 1024))), 128))]), _: 1 });
|
|
11
11
|
};
|
|
12
12
|
} });
|
|
13
13
|
module.exports = c;
|