ss-component-new 1.3.283 → 1.3.285
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/{MTLLoader-CZBprXNP.cjs → MTLLoader-CdxYhBAE.cjs} +1 -1
- package/dist/{MTLLoader-ByvO3xpX.js → MTLLoader-RsaYZtZ_.js} +1 -1
- package/dist/{OrbitControls-pu_IAkAV.cjs → OrbitControls-BNTHZN2P.cjs} +1 -1
- package/dist/{OrbitControls-gFOfDXco.js → OrbitControls-D4mDZcDl.js} +1 -1
- package/dist/{URDFLoader-CJmlsLyG.cjs → URDFLoader-B56WRl4z.cjs} +1 -1
- package/dist/{URDFLoader-DItN2Cwe.js → URDFLoader-BPNyxykV.js} +2 -2
- package/dist/{animationData-DCnGuqAH.js → animationData-D4Q3av_t.js} +3 -3
- package/dist/animationData-DiyxzUT8.cjs +1 -0
- package/dist/array-CpxgPs3a.cjs +1 -0
- package/dist/{array-B8KzZ5ux.js → array-DuZDl88A.js} +19 -18
- package/dist/clone-BrrxU6_J.js +8 -0
- package/dist/clone-Dn6v3xp6.cjs +1 -0
- package/dist/dayjs.min-DRU3LNcy.cjs +1 -0
- package/dist/dayjs.min-Dx_LN6Bu.js +366 -0
- package/dist/{eleIcon-BSJV_1ZM.js → eleIcon-BLNEA11T.js} +1 -1
- package/dist/{iconfont-DAGWcDwE.js → iconfont-DkmQztG1.js} +2 -2
- package/dist/{iconfont-Cgm0Wjk4.cjs → iconfont-Dq-DsQsx.cjs} +1 -1
- package/dist/icons/svg/softCancel.svg +1 -0
- package/dist/icons/svg/softConfirm.svg +1 -0
- package/dist/icons/svg/softRemove.svg +1 -0
- package/dist/index--6MSMD-8.cjs +1 -0
- package/dist/{index-Du7JJqdx.js → index--PidpjSy.js} +4 -3
- package/dist/index--ZVD8xbU.js +83 -0
- package/dist/{index-CDlw-J9H.js → index-8CZJn10Y.js} +2 -2
- package/dist/index-9I9R7yqt.cjs +15 -0
- package/dist/index-B6b9Lr8M.js +623 -0
- package/dist/{index-C0s4Fa0R.js → index-BEGr3hBb.js} +32 -31
- package/dist/index-BET-Jwi1.cjs +1 -0
- package/dist/index-BIV-s4QY.js +29 -0
- package/dist/{index-CHH8aozZ.js → index-BIkySu-W.js} +2 -2
- package/dist/index-BOHy6XZd.cjs +1 -0
- package/dist/{index-Bj-ss9u6.js → index-BcwDR57s.js} +2 -2
- package/dist/index-BdyYMxx4.cjs +1 -0
- package/dist/{index-DB9zlG2m.cjs → index-BeuuWlVO.cjs} +1 -1
- package/dist/index-BjZpJRk2.cjs +1 -0
- package/dist/index-BlAISTfa.cjs +1 -0
- package/dist/index-Bs0qreV1.cjs +1 -0
- package/dist/{index-_uOv3SVz.js → index-BsDMamej.js} +1 -1
- package/dist/{index-BkBMQfsT.js → index-C1dVsNLG.js} +1 -1
- package/dist/{index-CULs51Vg.js → index-C5bOtOIk.js} +4 -4
- package/dist/{index-UqJOpNhM.js → index-C7-Idrnv.js} +2 -2
- package/dist/index-C81Qb0f2.js +209 -0
- package/dist/index-CAcP6bx_.cjs +1 -0
- package/dist/index-CPFAai4T.cjs +2 -0
- package/dist/{index-K_IiVShj.js → index-CQS-NY65.js} +25 -24
- package/dist/index-CQcXApCn.cjs +1 -0
- package/dist/index-CUJ_cdPT.cjs +1 -0
- package/dist/{index-BjEIX08g.js → index-CV8QlXGI.js} +3 -3
- package/dist/index-CXgZFuTt.cjs +1 -0
- package/dist/{index-BZ_R-Jcp.js → index-CY_HG5Gj.js} +4 -4
- package/dist/index-Ca-FxCDv.cjs +1 -0
- package/dist/index-Cbb4eaBp.js +343 -0
- package/dist/{index-D02CK1_5.js → index-CdKgZ2A_.js} +22 -21
- package/dist/{index-KrjXZO_d.cjs → index-CdrBTtcu.cjs} +1 -1
- package/dist/{index-CPmO67dF.js → index-Cg7Mpfpj.js} +13 -13
- package/dist/{index-BZwKLYgT.cjs → index-CuHxF23O.cjs} +1 -1
- package/dist/{index-pCW3eQ8e.js → index-D-kGKttu.js} +15 -14
- package/dist/{index-Dr9e3mBT.js → index-D21dwfqO.js} +24 -24
- package/dist/index-D3qNUVY7.cjs +1 -0
- package/dist/{index-77VURUPj.cjs → index-DAwnZFmG.cjs} +1 -1
- package/dist/{index-Cy1XXdCZ.cjs → index-DLN6R2tJ.cjs} +1 -1
- package/dist/index-DTiolIgS.cjs +7 -0
- package/dist/{index-C8kDBsVW.js → index-DTsHI5xQ.js} +2 -2
- package/dist/index-DXWN-UJr.cjs +1 -0
- package/dist/{index-Cf5PK2bA.js → index-DXjgumn5.js} +5 -5
- package/dist/index-Df8bxCwR.js +665 -0
- package/dist/{index-B_rDLuPm.js → index-DfAmIlWW.js} +3355 -3351
- package/dist/{index-m6ZHCUtH.cjs → index-DiPWs_9n.cjs} +1 -1
- package/dist/{index-C2PJu8mA.js → index-DoEwWbTL.js} +1421 -1409
- package/dist/index-DsNHJYr-.cjs +1 -0
- package/dist/index-DtYkQPnf.cjs +1 -0
- package/dist/index-Dx0DeTSC.js +9370 -0
- package/dist/{index-B_CkJtn2.js → index-DxhNwr8X.js} +1 -1
- package/dist/{index-BusM6WrM.js → index-H_NM-ZF-.js} +2 -2
- package/dist/{index-D9SznbhK.js → index-JG59WTIq.js} +1 -1
- package/dist/index-QG4F5kTH.js +2755 -0
- package/dist/{index-CW0nTu7g.js → index-RSaGZhb3.js} +4 -4
- package/dist/index-W8p89C7t.cjs +1 -0
- package/dist/index-WTaP_KDd.cjs +1 -0
- package/dist/index-bPKGQ9bV.cjs +25 -0
- package/dist/{index-DpfXqgm2.js → index-cFt1QbzL.js} +33 -32
- package/dist/{index-B5tAsf_R.js → index-gFBtUdzh.js} +15 -14
- package/dist/{index-DVrEV4RS.cjs → index-mHmXlK2R.cjs} +1 -1
- package/dist/{index-wHrfokYf.cjs → index-qIpeOak9.cjs} +1 -1
- package/dist/index-vbxWL2yo.cjs +1 -0
- package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-mXh6sJo_.js → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-DBQ_-V1_.js} +130 -129
- package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-GxCgBV8k.cjs → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-DpyDtD61.cjs} +327 -327
- package/dist/isNil-CjWwlQS3.js +6 -0
- package/dist/isNil-x28vo2CT.cjs +1 -0
- package/dist/{isString-BLBZkTvd.js → isString-BA9CJNsy.js} +1 -1
- package/dist/{main-DECFHBC8.cjs → main-Avmwy4Fu.cjs} +2 -2
- package/dist/{main-Dglgquls.js → main-Qn9bfEMh.js} +4 -4
- package/dist/menu-CtG1loFf.js +5637 -0
- package/dist/menu-Hdw0L-Y2.cjs +12 -0
- package/dist/{menuIndex-6Fi3NW3Q.js → menuIndex-DmS5cMwB.js} +44 -42
- package/dist/menuIndex-DqY0uteo.cjs +1 -0
- package/dist/{request-B3-w_S8Z.js → request-CoGtW0Ux.js} +60 -60
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +19 -18
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +13 -13
- package/dist/threeModel-Dr6PqFqA.cjs +1 -0
- package/dist/{threeModel-BpjWJsnX.js → threeModel-L66n6sW7.js} +5 -5
- package/dist/{threePreview-DeEknsco.js → threePreview-BwElOyqr.js} +5 -5
- package/dist/threePreview-CWRtmSvh.cjs +1 -0
- package/dist/{threeSceneView-D5z_ADmg.js → threeSceneView-BEwen70K.js} +17 -15
- package/dist/{threeSceneView-C_ianMnn.cjs → threeSceneView-BpPiRRPf.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-CMDrp7Du.js → threeSceneViewForCPMPIP-BIiU_5px.js} +9 -9
- package/dist/{threeSceneViewForCPMPIP-BicBhum7.cjs → threeSceneViewForCPMPIP-DpwlxGoP.cjs} +1 -1
- package/dist/{threeTrackPathView-DDKn5Z5k.js → threeTrackPathView-BckFDqUs.js} +6 -6
- package/dist/threeTrackPathView-CamXHHnK.cjs +1 -0
- package/dist/threeViewerHost-DLLTNlTR.cjs +1 -0
- package/dist/{threeViewerHost-BgN5No1S.js → threeViewerHost-DQz7pHM9.js} +3 -3
- package/dist/{urdfTree-DYLobS3F.js → urdfTree-B6GL3kgV.js} +1 -1
- package/dist/{urdfTree-ghaTIId6.cjs → urdfTree-DDQw6tEb.cjs} +1 -1
- package/dist/{workpieceTreePanel-BAu_7YB6.cjs → workpieceTreePanel-B6AVU13A.cjs} +1 -1
- package/dist/{workpieceTreePanel-PUhlo13O.js → workpieceTreePanel-BvO881iH.js} +4 -4
- package/package.json +1 -1
- package/public/icons/svg/softCancel.svg +1 -0
- package/public/icons/svg/softConfirm.svg +1 -0
- package/public/icons/svg/softRemove.svg +1 -0
- package/dist/animationData-CIM8_iu6.cjs +0 -1
- package/dist/array-DlgywTCo.cjs +0 -1
- package/dist/clone-BjZYQq33.cjs +0 -1
- package/dist/clone-XNy-gcwO.js +0 -8
- package/dist/index-5zdMes-B.cjs +0 -1
- package/dist/index-7aU_bwDz.js +0 -8959
- package/dist/index-9Q1_s4bE.cjs +0 -1
- package/dist/index-B3yoiLPJ.cjs +0 -1
- package/dist/index-BAGLBch9.cjs +0 -1
- package/dist/index-BB392QRk.js +0 -672
- package/dist/index-BBxu8MeT.js +0 -89
- package/dist/index-BHLuFtij.cjs +0 -1
- package/dist/index-BIDFrngN.cjs +0 -1
- package/dist/index-BM4Blp7z.cjs +0 -1
- package/dist/index-BUxJL5W1.cjs +0 -1
- package/dist/index-BmTzLFkx.js +0 -630
- package/dist/index-BuAZTecX.cjs +0 -1
- package/dist/index-C-6jbR4D.cjs +0 -1
- package/dist/index-C6dVScaZ.js +0 -349
- package/dist/index-Cm-ohQUX.cjs +0 -1
- package/dist/index-D0k42JA4.cjs +0 -15
- package/dist/index-D4QFcxJ-.js +0 -9196
- package/dist/index-DGULgN2U.cjs +0 -1
- package/dist/index-DRBuICJi.cjs +0 -2
- package/dist/index-DeAnBGqU.cjs +0 -18
- package/dist/index-Dtq1IcgW.cjs +0 -1
- package/dist/index-RNu0IAS4.cjs +0 -1
- package/dist/index-RpaKc4Lu.cjs +0 -25
- package/dist/index-ZGUlK0ro.cjs +0 -1
- package/dist/index-ity_8Fmx.cjs +0 -1
- package/dist/index-vUaB-HgD.cjs +0 -1
- package/dist/menuIndex-SRHovjCX.cjs +0 -1
- package/dist/threeModel-BAzu1aRu.cjs +0 -1
- package/dist/threePreview-5dyC70n0.cjs +0 -1
- package/dist/threeTrackPathView-DHLZAc5E.cjs +0 -1
- package/dist/threeViewerHost-B_4KXwsO.cjs +0 -1
|
@@ -0,0 +1,623 @@
|
|
|
1
|
+
import { ref as v, computed as Ce, defineComponent as Ve, onMounted as Ae, reactive as ze, resolveComponent as u, createElementBlock as P, openBlock as _, createElementVNode as s, createVNode as o, unref as c, withCtx as i, createTextVNode as N, toDisplayString as le, Fragment as oe, renderList as se, withModifiers as xe, createBlock as re, createCommentVNode as qe } from "vue";
|
|
2
|
+
import { g as Ue, d as Ge, u as Oe, c as Me, a as Re, b as Fe } from "./index-C7-Idrnv.js";
|
|
3
|
+
import { g as Qe, c as $e, h as Ye, u as je, p as Ze } from "./menu-CtG1loFf.js";
|
|
4
|
+
import { E as He, f as we } from "./index-QG4F5kTH.js";
|
|
5
|
+
import { _ as he } from "./index.vue_vue_type_script_setup_true_lang-DRzriV-s.js";
|
|
6
|
+
import { s as Je } from "./index-CnjGqJZS.js";
|
|
7
|
+
import { _ as Ke } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
+
const G = {
|
|
9
|
+
COMPANY: {
|
|
10
|
+
label: "公司",
|
|
11
|
+
value: "company"
|
|
12
|
+
},
|
|
13
|
+
DEPARTMENT: {
|
|
14
|
+
label: "部门",
|
|
15
|
+
value: "department"
|
|
16
|
+
},
|
|
17
|
+
ORGANIZATION: {
|
|
18
|
+
label: "组织",
|
|
19
|
+
value: "organization"
|
|
20
|
+
}
|
|
21
|
+
}, We = Object.values(G), Xe = [
|
|
22
|
+
{
|
|
23
|
+
label: "编辑",
|
|
24
|
+
value: "edit"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
label: "删除",
|
|
28
|
+
value: "delete"
|
|
29
|
+
}
|
|
30
|
+
], f = {
|
|
31
|
+
ENABLE: {
|
|
32
|
+
value: "enable",
|
|
33
|
+
label: "启用",
|
|
34
|
+
tag: "primary"
|
|
35
|
+
},
|
|
36
|
+
DISABLED: {
|
|
37
|
+
value: "disabled",
|
|
38
|
+
label: "禁用",
|
|
39
|
+
tag: "info"
|
|
40
|
+
}
|
|
41
|
+
}, et = {
|
|
42
|
+
EDITABLE: {
|
|
43
|
+
value: "editable"
|
|
44
|
+
}
|
|
45
|
+
}, tt = () => {
|
|
46
|
+
const { platId: b, userId: O, isSuperAdmin: p } = Qe(), k = (e) => {
|
|
47
|
+
const t = e.toUpperCase(), n = f == null ? void 0 : f[t];
|
|
48
|
+
return (n == null ? void 0 : n.label) || e;
|
|
49
|
+
}, M = (e) => {
|
|
50
|
+
const t = e.toUpperCase(), n = f == null ? void 0 : f[t];
|
|
51
|
+
return (n == null ? void 0 : n.tag) || "info";
|
|
52
|
+
}, T = v({}), R = Ce(() => {
|
|
53
|
+
var t;
|
|
54
|
+
return p.value ? !0 : ((t = T.value) == null ? void 0 : t.status) === et.EDITABLE.value;
|
|
55
|
+
}), h = async () => {
|
|
56
|
+
var m, w;
|
|
57
|
+
const t = {
|
|
58
|
+
pageName: "系统管理/部门管理",
|
|
59
|
+
platId: b.value,
|
|
60
|
+
userId: O.value
|
|
61
|
+
}, n = await Ye(t);
|
|
62
|
+
return (w = (m = n == null ? void 0 : n.data) == null ? void 0 : m.result) == null ? void 0 : w[0];
|
|
63
|
+
}, F = async () => {
|
|
64
|
+
if (!p.value)
|
|
65
|
+
return T.value = await h(), T;
|
|
66
|
+
}, S = () => ({
|
|
67
|
+
name: ""
|
|
68
|
+
}), L = v(S()), B = () => {
|
|
69
|
+
L.value = S();
|
|
70
|
+
}, g = v({
|
|
71
|
+
pageNum: 1,
|
|
72
|
+
pageSize: 10,
|
|
73
|
+
total: 0,
|
|
74
|
+
pageSizes: [5, 10, 20, 50, 100]
|
|
75
|
+
}), Q = (e) => {
|
|
76
|
+
g.value.pageNum = e;
|
|
77
|
+
}, V = (e) => {
|
|
78
|
+
g.value.pageSize = e;
|
|
79
|
+
}, A = (e) => ({
|
|
80
|
+
platId: b.value,
|
|
81
|
+
department_id: e,
|
|
82
|
+
pageNum: g.value.pageNum,
|
|
83
|
+
pageSize: g.value.pageSize,
|
|
84
|
+
filter: {
|
|
85
|
+
...L.value
|
|
86
|
+
}
|
|
87
|
+
}), $ = async (e) => {
|
|
88
|
+
var n;
|
|
89
|
+
const t = await Fe(e);
|
|
90
|
+
return (n = t == null ? void 0 : t.data) == null ? void 0 : n.result;
|
|
91
|
+
}, Y = async (e) => {
|
|
92
|
+
const t = A(e), n = await $(t), { total: m } = n || {};
|
|
93
|
+
return g.value.total = m, n || {};
|
|
94
|
+
}, E = v([]), j = async (e) => {
|
|
95
|
+
var n;
|
|
96
|
+
const t = await Re(e);
|
|
97
|
+
return ((n = t == null ? void 0 : t.data) == null ? void 0 : n.result) || [];
|
|
98
|
+
}, Z = async () => {
|
|
99
|
+
const e = {
|
|
100
|
+
platId: b.value
|
|
101
|
+
}, t = await j(e);
|
|
102
|
+
E.value = t;
|
|
103
|
+
}, C = (e) => {
|
|
104
|
+
const t = we(Date.now()), n = $e(e);
|
|
105
|
+
return n.update_time = t, n;
|
|
106
|
+
}, H = (e) => {
|
|
107
|
+
const t = we(Date.now());
|
|
108
|
+
let n = {
|
|
109
|
+
name: "",
|
|
110
|
+
type: G.COMPANY.value,
|
|
111
|
+
parent_id: "",
|
|
112
|
+
status: f.ENABLE.value,
|
|
113
|
+
create_time: t,
|
|
114
|
+
update_time: t
|
|
115
|
+
};
|
|
116
|
+
if (e) {
|
|
117
|
+
const m = C(e);
|
|
118
|
+
n = {
|
|
119
|
+
...n,
|
|
120
|
+
...m
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
return n;
|
|
124
|
+
}, z = (e) => {
|
|
125
|
+
const t = [e];
|
|
126
|
+
return {
|
|
127
|
+
platId: b.value,
|
|
128
|
+
changeDepartmentData: t
|
|
129
|
+
};
|
|
130
|
+
}, x = async (e) => {
|
|
131
|
+
delete e.department_id;
|
|
132
|
+
const t = z(e);
|
|
133
|
+
await Me(t);
|
|
134
|
+
}, J = async (e) => {
|
|
135
|
+
await x(e);
|
|
136
|
+
}, y = async (e) => {
|
|
137
|
+
const t = z(e);
|
|
138
|
+
await Oe(t);
|
|
139
|
+
}, K = async (e) => {
|
|
140
|
+
await y(e);
|
|
141
|
+
}, W = async (e) => {
|
|
142
|
+
const { department_id: t } = e, n = {
|
|
143
|
+
platId: b.value,
|
|
144
|
+
department_id: [t]
|
|
145
|
+
};
|
|
146
|
+
await Ge(n);
|
|
147
|
+
}, X = async (e) => {
|
|
148
|
+
await He.confirm("是否确认要删除", "", {
|
|
149
|
+
showClose: !1,
|
|
150
|
+
confirmButtonText: "确认",
|
|
151
|
+
cancelButtonText: "取消",
|
|
152
|
+
type: "warning",
|
|
153
|
+
modalClass: "delete-department-message-modal",
|
|
154
|
+
confirmButtonClass: "delete-department-confirm"
|
|
155
|
+
}), await W(e);
|
|
156
|
+
}, D = async (e) => {
|
|
157
|
+
var n;
|
|
158
|
+
const t = await Ue(e);
|
|
159
|
+
return ((n = t == null ? void 0 : t.data) == null ? void 0 : n.result) || {};
|
|
160
|
+
};
|
|
161
|
+
return {
|
|
162
|
+
queryInfo: L,
|
|
163
|
+
resetQuery: B,
|
|
164
|
+
pageInfo: g,
|
|
165
|
+
setPageNum: Q,
|
|
166
|
+
setPageSize: V,
|
|
167
|
+
convertPageInfoToRequestData: A,
|
|
168
|
+
initGetByPage: Y,
|
|
169
|
+
departmentTree: E,
|
|
170
|
+
initDepartmentTree: Z,
|
|
171
|
+
hasDepartmentEditAuth: R,
|
|
172
|
+
initDepartmentConfig: F,
|
|
173
|
+
initDepartmentItem: H,
|
|
174
|
+
initCreate: J,
|
|
175
|
+
initUpdate: K,
|
|
176
|
+
initDelete: X,
|
|
177
|
+
initGetParentByType: async (e) => {
|
|
178
|
+
const t = {
|
|
179
|
+
platId: b.value,
|
|
180
|
+
type: e
|
|
181
|
+
}, n = await D(t);
|
|
182
|
+
return (n == null ? void 0 : n.departmentData) || [];
|
|
183
|
+
},
|
|
184
|
+
getTypeLabel: (e) => {
|
|
185
|
+
var w;
|
|
186
|
+
const t = e == null ? void 0 : e.type, n = t == null ? void 0 : t.toUpperCase();
|
|
187
|
+
return ((w = G[n]) == null ? void 0 : w.label) || "";
|
|
188
|
+
},
|
|
189
|
+
isCompany: (e) => e === G.COMPANY.value,
|
|
190
|
+
getStatusLabelByValue: k,
|
|
191
|
+
getStatusTagByValue: M
|
|
192
|
+
};
|
|
193
|
+
}, at = { class: "department-management" }, nt = { class: "body" }, lt = { class: "body-left" }, ot = { class: "body-right" }, st = { class: "common-wrapper" }, rt = { class: "query-wrapper" }, it = { class: "operate-wrapper" }, pt = { class: "table-wrapper" }, dt = { class: "operate-list" }, ut = ["onClick"], ct = { class: "pagination-wrapper" }, mt = { class: "department-management-wrapper" }, gt = { class: "department-management-body" }, ft = { class: "department-form-wrapper" }, vt = { class: "edit-footer" }, yt = { class: "footer-right" }, _t = /* @__PURE__ */ Ve({
|
|
194
|
+
__name: "index",
|
|
195
|
+
setup(b) {
|
|
196
|
+
const O = {
|
|
197
|
+
value: "department_id",
|
|
198
|
+
label: "name",
|
|
199
|
+
children: "children"
|
|
200
|
+
}, p = je(Ze), {
|
|
201
|
+
queryInfo: k,
|
|
202
|
+
resetQuery: M,
|
|
203
|
+
departmentTree: T,
|
|
204
|
+
initDepartmentTree: R,
|
|
205
|
+
pageInfo: h,
|
|
206
|
+
setPageNum: F,
|
|
207
|
+
setPageSize: S,
|
|
208
|
+
initGetByPage: L,
|
|
209
|
+
hasDepartmentEditAuth: B,
|
|
210
|
+
initDepartmentConfig: ie,
|
|
211
|
+
initDepartmentItem: g,
|
|
212
|
+
initCreate: Q,
|
|
213
|
+
initUpdate: V,
|
|
214
|
+
initDelete: A,
|
|
215
|
+
initGetParentByType: $,
|
|
216
|
+
getTypeLabel: Y,
|
|
217
|
+
isCompany: E,
|
|
218
|
+
getStatusLabelByValue: j,
|
|
219
|
+
getStatusTagByValue: Z
|
|
220
|
+
} = tt(), C = v(), H = Ce(() => {
|
|
221
|
+
var l;
|
|
222
|
+
return (l = C.value) == null ? void 0 : l.department_id;
|
|
223
|
+
}), z = (l) => {
|
|
224
|
+
C.value = l, p.setImportLoading(!0), y().finally(() => {
|
|
225
|
+
p.setImportLoading(!1);
|
|
226
|
+
});
|
|
227
|
+
}, x = v([]), J = async () => {
|
|
228
|
+
var d;
|
|
229
|
+
const l = await L((d = C.value) == null ? void 0 : d.department_id), { departmentData: a = [] } = l;
|
|
230
|
+
return a;
|
|
231
|
+
}, y = async () => {
|
|
232
|
+
x.value = await J();
|
|
233
|
+
}, K = (l) => {
|
|
234
|
+
F(l), p.setImportLoading(!0), y().finally(() => {
|
|
235
|
+
p.setImportLoading(!1);
|
|
236
|
+
});
|
|
237
|
+
}, W = (l) => {
|
|
238
|
+
S(l), p.setImportLoading(!0), y().finally(() => {
|
|
239
|
+
p.setImportLoading(!1);
|
|
240
|
+
});
|
|
241
|
+
}, X = async () => {
|
|
242
|
+
C.value = void 0, M(), p.setImportLoading(!0), await y().finally(() => {
|
|
243
|
+
p.setImportLoading(!1);
|
|
244
|
+
});
|
|
245
|
+
}, D = async () => {
|
|
246
|
+
await ie(), await R(), await y();
|
|
247
|
+
};
|
|
248
|
+
Ae(async () => {
|
|
249
|
+
p.setImportLoading(!0), await D().finally(() => {
|
|
250
|
+
p.setImportLoading(!1);
|
|
251
|
+
});
|
|
252
|
+
});
|
|
253
|
+
const pe = async (l, a) => {
|
|
254
|
+
if (!B.value)
|
|
255
|
+
return;
|
|
256
|
+
const { value: d } = l, I = a.row;
|
|
257
|
+
if (d === "edit") {
|
|
258
|
+
p.setImportLoading(!0), await n(I.type).finally(() => {
|
|
259
|
+
p.setImportLoading(!1);
|
|
260
|
+
}), ce(I);
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
if (d === "delete") {
|
|
264
|
+
p.setImportLoading(!0), await Le(I).finally(() => {
|
|
265
|
+
p.setImportLoading(!1);
|
|
266
|
+
});
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
}, ee = v(), de = ze({
|
|
270
|
+
name: [
|
|
271
|
+
{ required: !0, message: "请输入部门名称", trigger: "blur" }
|
|
272
|
+
],
|
|
273
|
+
type: [
|
|
274
|
+
{ required: !0, message: "请选择部门分类", trigger: "change" }
|
|
275
|
+
],
|
|
276
|
+
parent_id: [
|
|
277
|
+
{
|
|
278
|
+
validator: (l, a, d) => {
|
|
279
|
+
e.value.type && !E(e.value.type) && !a ? d(new Error("请选择上级部门")) : d();
|
|
280
|
+
},
|
|
281
|
+
trigger: "change"
|
|
282
|
+
}
|
|
283
|
+
]
|
|
284
|
+
}), e = v(g()), t = v([]), n = async (l) => {
|
|
285
|
+
e.value.parent_id = "";
|
|
286
|
+
let a = await $(l);
|
|
287
|
+
e.value.department_id && (a = a.filter((d) => d.department_id !== e.value.department_id)), t.value = a;
|
|
288
|
+
}, m = v(!1), w = () => {
|
|
289
|
+
m.value = !0;
|
|
290
|
+
}, ue = () => {
|
|
291
|
+
m.value = !1;
|
|
292
|
+
}, ce = async (l) => {
|
|
293
|
+
B.value && (e.value = g(l), w());
|
|
294
|
+
}, me = () => {
|
|
295
|
+
e.value = g(), ue();
|
|
296
|
+
}, Ie = async () => {
|
|
297
|
+
await Q(e.value), await D();
|
|
298
|
+
}, Te = async () => {
|
|
299
|
+
await V(e.value), await D();
|
|
300
|
+
}, Le = async (l) => {
|
|
301
|
+
await A(l), await D();
|
|
302
|
+
}, Be = async () => {
|
|
303
|
+
var a, d;
|
|
304
|
+
await ((d = (a = ee.value) == null ? void 0 : a.validate) == null ? void 0 : d.call(a));
|
|
305
|
+
const { department_id: l } = e.value;
|
|
306
|
+
p.setImportLoading(!0), l ? await Te().finally(() => {
|
|
307
|
+
p.setImportLoading(!1);
|
|
308
|
+
}) : await Ie().finally(() => {
|
|
309
|
+
p.setImportLoading(!1);
|
|
310
|
+
}), me();
|
|
311
|
+
}, Ee = async (l) => {
|
|
312
|
+
if (!B.value)
|
|
313
|
+
return;
|
|
314
|
+
const { status: a } = l;
|
|
315
|
+
f.ENABLE.value === a ? l.status = f.DISABLED.value : l.status = f.ENABLE.value, await V(l), await D();
|
|
316
|
+
};
|
|
317
|
+
return (l, a) => {
|
|
318
|
+
var ye, _e, be, De;
|
|
319
|
+
const d = u("el-tree"), I = u("el-input"), te = u("el-button"), q = u("el-table-column"), Pe = u("el-tag"), Ne = u("el-table"), ke = u("el-pagination"), ae = u("el-form-item"), ne = u("el-col"), ge = u("el-option"), fe = u("el-select"), ve = u("el-row"), Se = u("el-form");
|
|
320
|
+
return _(), P("div", at, [
|
|
321
|
+
a[11] || (a[11] = s("div", { class: "header" }, [
|
|
322
|
+
s("div", { class: "header-left" }),
|
|
323
|
+
s("div", { class: "header-right" })
|
|
324
|
+
], -1)),
|
|
325
|
+
s("div", nt, [
|
|
326
|
+
s("div", lt, [
|
|
327
|
+
o(d, {
|
|
328
|
+
ref: "treeRef",
|
|
329
|
+
class: "department-tree",
|
|
330
|
+
data: c(T),
|
|
331
|
+
props: O,
|
|
332
|
+
"node-key": "department_id",
|
|
333
|
+
"default-expand-all": "",
|
|
334
|
+
"expand-on-click-node": !1,
|
|
335
|
+
"highlight-current": "",
|
|
336
|
+
"current-node-key": H.value,
|
|
337
|
+
onNodeClick: z
|
|
338
|
+
}, null, 8, ["data", "current-node-key"])
|
|
339
|
+
]),
|
|
340
|
+
s("div", ot, [
|
|
341
|
+
s("div", st, [
|
|
342
|
+
s("div", rt, [
|
|
343
|
+
o(I, {
|
|
344
|
+
modelValue: c(k).name,
|
|
345
|
+
"onUpdate:modelValue": a[0] || (a[0] = (r) => c(k).name = r),
|
|
346
|
+
style: { width: "240px" },
|
|
347
|
+
placeholder: "请输入名称"
|
|
348
|
+
}, null, 8, ["modelValue"]),
|
|
349
|
+
o(te, {
|
|
350
|
+
type: "primary",
|
|
351
|
+
onClick: y
|
|
352
|
+
}, {
|
|
353
|
+
default: i(() => a[5] || (a[5] = [
|
|
354
|
+
N("查询")
|
|
355
|
+
])),
|
|
356
|
+
_: 1,
|
|
357
|
+
__: [5]
|
|
358
|
+
}),
|
|
359
|
+
o(te, {
|
|
360
|
+
type: "primary",
|
|
361
|
+
plain: "",
|
|
362
|
+
onClick: X
|
|
363
|
+
}, {
|
|
364
|
+
default: i(() => a[6] || (a[6] = [
|
|
365
|
+
N("重置")
|
|
366
|
+
])),
|
|
367
|
+
_: 1,
|
|
368
|
+
__: [6]
|
|
369
|
+
})
|
|
370
|
+
]),
|
|
371
|
+
s("div", it, [
|
|
372
|
+
o(te, {
|
|
373
|
+
type: "primary",
|
|
374
|
+
onClick: a[1] || (a[1] = (r) => ce())
|
|
375
|
+
}, {
|
|
376
|
+
default: i(() => a[7] || (a[7] = [
|
|
377
|
+
N("新增部门")
|
|
378
|
+
])),
|
|
379
|
+
_: 1,
|
|
380
|
+
__: [7]
|
|
381
|
+
})
|
|
382
|
+
])
|
|
383
|
+
]),
|
|
384
|
+
s("div", pt, [
|
|
385
|
+
o(Ne, {
|
|
386
|
+
class: "department-table",
|
|
387
|
+
data: x.value,
|
|
388
|
+
"empty-text": ""
|
|
389
|
+
}, {
|
|
390
|
+
default: i(() => [
|
|
391
|
+
o(q, {
|
|
392
|
+
prop: "name",
|
|
393
|
+
label: "名称",
|
|
394
|
+
align: "center"
|
|
395
|
+
}),
|
|
396
|
+
o(q, {
|
|
397
|
+
prop: "type",
|
|
398
|
+
label: "分类",
|
|
399
|
+
align: "center"
|
|
400
|
+
}, {
|
|
401
|
+
default: i((r) => [
|
|
402
|
+
N(le(c(Y)(r.row)), 1)
|
|
403
|
+
]),
|
|
404
|
+
_: 1
|
|
405
|
+
}),
|
|
406
|
+
o(q, {
|
|
407
|
+
prop: "status",
|
|
408
|
+
label: "状态",
|
|
409
|
+
align: "center"
|
|
410
|
+
}, {
|
|
411
|
+
default: i((r) => [
|
|
412
|
+
o(Pe, {
|
|
413
|
+
class: "status-tag",
|
|
414
|
+
type: c(Z)(r.row.status),
|
|
415
|
+
title: "点击切换",
|
|
416
|
+
onClick: (U) => Ee(r.row)
|
|
417
|
+
}, {
|
|
418
|
+
default: i(() => [
|
|
419
|
+
N(le(c(j)(r.row.status)), 1)
|
|
420
|
+
]),
|
|
421
|
+
_: 2
|
|
422
|
+
}, 1032, ["type", "onClick"])
|
|
423
|
+
]),
|
|
424
|
+
_: 1
|
|
425
|
+
}),
|
|
426
|
+
o(q, {
|
|
427
|
+
label: "操作",
|
|
428
|
+
align: "center"
|
|
429
|
+
}, {
|
|
430
|
+
default: i((r) => [
|
|
431
|
+
s("div", dt, [
|
|
432
|
+
(_(!0), P(oe, null, se(c(Xe), (U) => (_(), P("div", {
|
|
433
|
+
class: "operate-item",
|
|
434
|
+
key: U.value,
|
|
435
|
+
onClick: xe((bt) => pe(U, r), ["stop"])
|
|
436
|
+
}, le(U.label), 9, ut))), 128))
|
|
437
|
+
])
|
|
438
|
+
]),
|
|
439
|
+
_: 1
|
|
440
|
+
})
|
|
441
|
+
]),
|
|
442
|
+
_: 1
|
|
443
|
+
}, 8, ["data"]),
|
|
444
|
+
s("div", ct, [
|
|
445
|
+
a[8] || (a[8] = s("div", null, null, -1)),
|
|
446
|
+
o(ke, {
|
|
447
|
+
onSizeChange: W,
|
|
448
|
+
onCurrentChange: K,
|
|
449
|
+
"current-page": (ye = c(h)) == null ? void 0 : ye.pageNum,
|
|
450
|
+
"page-sizes": (_e = c(h)) == null ? void 0 : _e.pageSizes,
|
|
451
|
+
"page-size": ((be = c(h)) == null ? void 0 : be.pageSize) ?? 10,
|
|
452
|
+
layout: "total, sizes, prev, pager, next, jumper",
|
|
453
|
+
total: ((De = c(h)) == null ? void 0 : De.total) ?? 0
|
|
454
|
+
}, null, 8, ["current-page", "page-sizes", "page-size", "total"])
|
|
455
|
+
])
|
|
456
|
+
])
|
|
457
|
+
])
|
|
458
|
+
]),
|
|
459
|
+
a[12] || (a[12] = s("div", { class: "footer" }, [
|
|
460
|
+
s("div", { class: "footer-left" }),
|
|
461
|
+
s("div", { class: "footer-right" })
|
|
462
|
+
], -1)),
|
|
463
|
+
o(Je, {
|
|
464
|
+
class: "department-edit-dialog",
|
|
465
|
+
visible: m.value,
|
|
466
|
+
title: "部门信息",
|
|
467
|
+
onBeforeDestroy: ue,
|
|
468
|
+
showClose: !0,
|
|
469
|
+
closeOnClickModal: !1,
|
|
470
|
+
closeOnPressEscape: !1,
|
|
471
|
+
modalClass: "department-edit-modal",
|
|
472
|
+
alignCenter: !0,
|
|
473
|
+
appendToBody: !1
|
|
474
|
+
}, {
|
|
475
|
+
default: i(() => [
|
|
476
|
+
s("div", mt, [
|
|
477
|
+
a[9] || (a[9] = s("div", { class: "department-management-header" }, [
|
|
478
|
+
s("div", { class: "header-left" }),
|
|
479
|
+
s("div", { class: "header-right" })
|
|
480
|
+
], -1)),
|
|
481
|
+
s("div", gt, [
|
|
482
|
+
s("div", ft, [
|
|
483
|
+
o(Se, {
|
|
484
|
+
class: "department-edit-form",
|
|
485
|
+
ref_key: "departmentFormRef",
|
|
486
|
+
ref: ee,
|
|
487
|
+
model: e.value,
|
|
488
|
+
rules: de
|
|
489
|
+
}, {
|
|
490
|
+
default: i(() => [
|
|
491
|
+
o(ve, { gutter: 20 }, {
|
|
492
|
+
default: i(() => [
|
|
493
|
+
o(ne, { span: 12 }, {
|
|
494
|
+
default: i(() => [
|
|
495
|
+
o(ae, {
|
|
496
|
+
prop: "name",
|
|
497
|
+
label: "部门名称",
|
|
498
|
+
"label-position": "top"
|
|
499
|
+
}, {
|
|
500
|
+
default: i(() => [
|
|
501
|
+
o(I, {
|
|
502
|
+
modelValue: e.value.name,
|
|
503
|
+
"onUpdate:modelValue": a[2] || (a[2] = (r) => e.value.name = r),
|
|
504
|
+
"aria-label": "部门名称",
|
|
505
|
+
placeholder: "部门名称"
|
|
506
|
+
}, null, 8, ["modelValue"])
|
|
507
|
+
]),
|
|
508
|
+
_: 1
|
|
509
|
+
})
|
|
510
|
+
]),
|
|
511
|
+
_: 1
|
|
512
|
+
}),
|
|
513
|
+
o(ne, { span: 12 }, {
|
|
514
|
+
default: i(() => [
|
|
515
|
+
o(ae, {
|
|
516
|
+
prop: "type",
|
|
517
|
+
label: "部门分类",
|
|
518
|
+
"label-position": "top"
|
|
519
|
+
}, {
|
|
520
|
+
default: i(() => [
|
|
521
|
+
o(fe, {
|
|
522
|
+
modelValue: e.value.type,
|
|
523
|
+
"onUpdate:modelValue": a[3] || (a[3] = (r) => e.value.type = r),
|
|
524
|
+
"aria-label": "部门分类",
|
|
525
|
+
placeholder: "",
|
|
526
|
+
clearable: "",
|
|
527
|
+
filterable: "",
|
|
528
|
+
onChange: n
|
|
529
|
+
}, {
|
|
530
|
+
default: i(() => [
|
|
531
|
+
(_(!0), P(oe, null, se(c(We), (r) => (_(), re(ge, {
|
|
532
|
+
key: r.value,
|
|
533
|
+
label: r.label,
|
|
534
|
+
value: r.value
|
|
535
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
536
|
+
]),
|
|
537
|
+
_: 1
|
|
538
|
+
}, 8, ["modelValue"])
|
|
539
|
+
]),
|
|
540
|
+
_: 1
|
|
541
|
+
})
|
|
542
|
+
]),
|
|
543
|
+
_: 1
|
|
544
|
+
})
|
|
545
|
+
]),
|
|
546
|
+
_: 1
|
|
547
|
+
}),
|
|
548
|
+
o(ve, { gutter: 20 }, {
|
|
549
|
+
default: i(() => [
|
|
550
|
+
e.value.type && !c(E)(e.value.type) ? (_(), re(ne, {
|
|
551
|
+
key: 0,
|
|
552
|
+
span: 12
|
|
553
|
+
}, {
|
|
554
|
+
default: i(() => [
|
|
555
|
+
o(ae, {
|
|
556
|
+
prop: "parent_id",
|
|
557
|
+
label: "上级部门",
|
|
558
|
+
"label-position": "top"
|
|
559
|
+
}, {
|
|
560
|
+
default: i(() => [
|
|
561
|
+
o(fe, {
|
|
562
|
+
modelValue: e.value.parent_id,
|
|
563
|
+
"onUpdate:modelValue": a[4] || (a[4] = (r) => e.value.parent_id = r),
|
|
564
|
+
"aria-label": "上级部门",
|
|
565
|
+
placeholder: "",
|
|
566
|
+
clearable: "",
|
|
567
|
+
filterable: ""
|
|
568
|
+
}, {
|
|
569
|
+
default: i(() => [
|
|
570
|
+
(_(!0), P(oe, null, se(t.value, (r) => (_(), re(ge, {
|
|
571
|
+
key: r.department_id,
|
|
572
|
+
label: r.name,
|
|
573
|
+
value: r.department_id
|
|
574
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
575
|
+
]),
|
|
576
|
+
_: 1
|
|
577
|
+
}, 8, ["modelValue"])
|
|
578
|
+
]),
|
|
579
|
+
_: 1
|
|
580
|
+
})
|
|
581
|
+
]),
|
|
582
|
+
_: 1
|
|
583
|
+
})) : qe("", !0)
|
|
584
|
+
]),
|
|
585
|
+
_: 1
|
|
586
|
+
})
|
|
587
|
+
]),
|
|
588
|
+
_: 1
|
|
589
|
+
}, 8, ["model", "rules"])
|
|
590
|
+
])
|
|
591
|
+
])
|
|
592
|
+
])
|
|
593
|
+
]),
|
|
594
|
+
footer: i(() => [
|
|
595
|
+
s("div", vt, [
|
|
596
|
+
a[10] || (a[10] = s("div", { class: "footer-left" }, null, -1)),
|
|
597
|
+
s("div", yt, [
|
|
598
|
+
o(he, {
|
|
599
|
+
class: "cancel",
|
|
600
|
+
emptyColor: !0,
|
|
601
|
+
onClickTrigger: me,
|
|
602
|
+
modelValue: "取消",
|
|
603
|
+
buttonType: "info"
|
|
604
|
+
}),
|
|
605
|
+
o(he, {
|
|
606
|
+
class: "confirm",
|
|
607
|
+
emptyColor: !0,
|
|
608
|
+
onClickTrigger: Be,
|
|
609
|
+
modelValue: "确定",
|
|
610
|
+
buttonType: "primary"
|
|
611
|
+
})
|
|
612
|
+
])
|
|
613
|
+
])
|
|
614
|
+
]),
|
|
615
|
+
_: 1
|
|
616
|
+
}, 8, ["visible"])
|
|
617
|
+
]);
|
|
618
|
+
};
|
|
619
|
+
}
|
|
620
|
+
}), Bt = /* @__PURE__ */ Ke(_t, [["__scopeId", "data-v-80962709"]]);
|
|
621
|
+
export {
|
|
622
|
+
Bt as default
|
|
623
|
+
};
|