china-mobile-international-custom-components 0.0.21 → 0.0.23
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/es/AvailableRangeSetting.mjs +15 -14
- package/lib/AvailableRangeSetting.js +1 -1
- package/package.json +3 -3
- package/es/assets/AvailableRangePreview.css +0 -1
- package/es/assets/AvailableRangeSetting.css +0 -1
- package/es/assets/CustomSidebar.css +0 -1
- package/es/chunks/AvailableRangePreview.D4mZe1lQ.js +0 -217
- package/es/chunks/AvailableRangeSetting.BkSLnQ6N.js +0 -215
- package/es/chunks/CustomSidebar.BWGoPtLi.js +0 -506
- package/es/chunks/CustomTitle.BLZ7evms.js +0 -5
- package/es/chunks/CustomToggle.CP3M2_f3.js +0 -165
- package/es/chunks/PageContainer.D-G32lvP.js +0 -329
- package/es/chunks/_plugin-vue_export-helper.CVVE_0_F.js +0 -13
- package/es/chunks/_plugin-vue_export-helper.Cf-_TWPK.js +0 -6
- package/es/chunks/index.AHEDCg43.js +0 -160
- package/es/chunks/index.B67AnSJI.js +0 -154
- package/es/chunks/index.B9F4VYQK.js +0 -118
- package/es/chunks/index.BPxF6Amx.js +0 -157
- package/es/chunks/index.C2gKjqoA.js +0 -209
- package/es/chunks/index.DTtNnKDH.js +0 -288
- package/es/chunks/index.DtBeJlu6.js +0 -142
- package/es/chunks/index.kR57MtNP.js +0 -211
- package/es/chunks/index.wQj5YKPy.js +0 -288
- package/es/chunks/layout.BE8_kCeR.js +0 -619
- package/es/chunks/layout.C6AMos7n.js +0 -17
- package/es/chunks/layout.CWFXohJu.js +0 -622
- package/es/chunks/layout.R5FQNRjS.js +0 -619
- package/es/chunks/layout.nKB_kc-U.js +0 -26
- package/es/chunks/utils.BhlZXNZ6.js +0 -19
- package/lib/assets/AvailableRangePreview.css +0 -1
- package/lib/assets/AvailableRangeSetting.css +0 -1
- package/lib/assets/CustomSidebar.css +0 -1
- package/lib/chunks/AvailableRangePreview.CkgZsXP0.js +0 -1
- package/lib/chunks/AvailableRangeSetting.CF-jHm4x.js +0 -1
- package/lib/chunks/CustomSidebar.CMYJFb2P.js +0 -1
- package/lib/chunks/CustomTitle.BkFZ-ZIq.js +0 -1
- package/lib/chunks/CustomToggle.C0PpzKPP.js +0 -1
- package/lib/chunks/PageContainer.GH56wASV.js +0 -1
- package/lib/chunks/_plugin-vue_export-helper.C55-DZV2.js +0 -1
- package/lib/chunks/_plugin-vue_export-helper.DAGvX2Jf.js +0 -1
- package/lib/chunks/index.BfHfKST0.js +0 -1
- package/lib/chunks/index.BlXappa4.js +0 -1
- package/lib/chunks/index.CCxHaoi4.js +0 -1
- package/lib/chunks/index.CSYGhK9M.js +0 -1
- package/lib/chunks/index.C_IlZrzE.js +0 -1
- package/lib/chunks/index.DUGtabLJ.js +0 -1
- package/lib/chunks/index.Dakz8S3g.js +0 -1
- package/lib/chunks/index.DydPD8Lc.js +0 -1
- package/lib/chunks/index.k_hSuA6i.js +0 -1
- package/lib/chunks/layout.BJjU9nKW.js +0 -1
- package/lib/chunks/layout.BQigNrr5.js +0 -1
- package/lib/chunks/layout.ClFtiz-t.js +0 -1
- package/lib/chunks/layout.CmDwUHZo.js +0 -1
- package/lib/chunks/layout.CqbDoD_v.js +0 -1
- package/lib/chunks/layout.CwJgDGuR.js +0 -1
- package/lib/chunks/utils.BT5Uuz2Q.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { w as B } from "./chunks/index.bCzIhWFw.js";
|
|
2
|
-
import { ref as
|
|
2
|
+
import { ref as d, computed as _, createBlock as w, openBlock as g, unref as c, withCtx as V, createElementVNode as N, createVNode as h, createElementBlock as C, createCommentVNode as x, Fragment as U, renderList as M, createTextVNode as D, toDisplayString as O, watch as k, onMounted as F } from "vue";
|
|
3
3
|
import { emitsMap as t } from "color-star-custom-methods";
|
|
4
4
|
import { R as S, u as G, r as $, T as j, A as Y } from "./chunks/index.39AUVSwV.js";
|
|
5
5
|
import { ElDialog as q, ElRadioGroup as z, ElRadio as H, ElButton as P } from "element-plus";
|
|
@@ -37,8 +37,8 @@ const K = { class: "dialog-content" }, Q = {
|
|
|
37
37
|
t.cancel
|
|
38
38
|
],
|
|
39
39
|
setup(A, { emit: R }) {
|
|
40
|
-
const y = A, a = R, p =
|
|
41
|
-
|
|
40
|
+
const y = A, a = R, p = d(!0), o = d(y.allVisible), r = d([...y.modelValue]), f = d(), { selectedMembers: m, selectedDepartments: s } = G(
|
|
41
|
+
r,
|
|
42
42
|
_(() => y.treeList),
|
|
43
43
|
!1
|
|
44
44
|
// 编辑模式
|
|
@@ -57,16 +57,16 @@ const K = { class: "dialog-content" }, Q = {
|
|
|
57
57
|
});
|
|
58
58
|
}), i;
|
|
59
59
|
}), L = (i) => {
|
|
60
|
-
o.value = i, i === S.ALL && (
|
|
60
|
+
o.value = i, i === S.ALL && (r.value = []);
|
|
61
61
|
}, I = (i) => {
|
|
62
62
|
const { selectedNode: e } = i;
|
|
63
|
-
|
|
63
|
+
r.value = e || [];
|
|
64
64
|
}, T = () => {
|
|
65
65
|
a(t.cancel), a(t.updateVisible, !1);
|
|
66
66
|
}, E = () => {
|
|
67
67
|
a(t.save, {
|
|
68
68
|
type: o.value,
|
|
69
|
-
selectedItems: [...
|
|
69
|
+
selectedItems: [...r.value]
|
|
70
70
|
}), a(t.updateVisible, !1);
|
|
71
71
|
};
|
|
72
72
|
return (i, e) => (g(), w(c(q), {
|
|
@@ -74,7 +74,8 @@ const K = { class: "dialog-content" }, Q = {
|
|
|
74
74
|
"onUpdate:modelValue": e[2] || (e[2] = (n) => p.value = n),
|
|
75
75
|
title: "可用范围设置",
|
|
76
76
|
"close-on-click-modal": !1,
|
|
77
|
-
"close-on-press-escape": !1
|
|
77
|
+
"close-on-press-escape": !1,
|
|
78
|
+
"append-to-body": ""
|
|
78
79
|
}, {
|
|
79
80
|
footer: V(() => [
|
|
80
81
|
N("div", W, [
|
|
@@ -121,8 +122,8 @@ const K = { class: "dialog-content" }, Q = {
|
|
|
121
122
|
}, 8, ["modelValue"]),
|
|
122
123
|
o.value === c(S).PARTIAL ? (g(), C("div", Q, [
|
|
123
124
|
h(c(J), {
|
|
124
|
-
modelValue:
|
|
125
|
-
"onUpdate:modelValue": e[1] || (e[1] = (n) =>
|
|
125
|
+
modelValue: r.value,
|
|
126
|
+
"onUpdate:modelValue": e[1] || (e[1] = (n) => r.value = n),
|
|
126
127
|
ref_key: "treeRef",
|
|
127
128
|
ref: f,
|
|
128
129
|
treeProps: c(j),
|
|
@@ -165,13 +166,13 @@ const K = { class: "dialog-content" }, Q = {
|
|
|
165
166
|
t.change
|
|
166
167
|
],
|
|
167
168
|
setup(A, { expose: R, emit: y }) {
|
|
168
|
-
const a = A, p = y, o =
|
|
169
|
+
const a = A, p = y, o = d(!1), r = d(!1), f = d([]), m = d(a.allVisible), s = d(a.modelValue), b = d(
|
|
169
170
|
new Set(s.value?.map((l) => l.memberId))
|
|
170
171
|
), L = () => {
|
|
171
|
-
a.loadDataApi && typeof a.loadDataApi == "function" ? (
|
|
172
|
+
a.loadDataApi && typeof a.loadDataApi == "function" ? (r.value = !0, a.loadDataApi().then((l) => {
|
|
172
173
|
f.value = l?.data?.orgOptionSoList || [];
|
|
173
174
|
}).finally(() => {
|
|
174
|
-
|
|
175
|
+
r.value = !1;
|
|
175
176
|
})) : f.value = [];
|
|
176
177
|
}, I = () => {
|
|
177
178
|
o.value = !0;
|
|
@@ -187,7 +188,7 @@ const K = { class: "dialog-content" }, Q = {
|
|
|
187
188
|
selectedItems: s.value
|
|
188
189
|
};
|
|
189
190
|
p(t.change, l);
|
|
190
|
-
}, e =
|
|
191
|
+
}, e = d(null), n = () => {
|
|
191
192
|
const l = e.value?.allSelectedItems || [];
|
|
192
193
|
return {
|
|
193
194
|
allVisible: m.value,
|
|
@@ -241,7 +242,7 @@ const K = { class: "dialog-content" }, Q = {
|
|
|
241
242
|
modelValue: s.value,
|
|
242
243
|
"onUpdate:modelValue": u[2] || (u[2] = (v) => s.value = v),
|
|
243
244
|
"tree-list": f.value,
|
|
244
|
-
loading:
|
|
245
|
+
loading: r.value,
|
|
245
246
|
onSave: T,
|
|
246
247
|
onCancel: E
|
|
247
248
|
}, null, 8, ["visible", "allVisible", "modelValue", "tree-list", "loading"])) : x("", !0)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const R=require("./chunks/index.CkihWzK6.js"),e=require("vue"),o=require("color-star-custom-methods"),p=require("./chunks/index.DsmgWFv8.js"),g=require("element-plus"),T=require("color-star-custom-components"),M={class:"dialog-content"},N={key:0,class:"selection-area overflow-hidden"},w={class:"dialog-footer"},L={__name:"Dialog",props:{visible:{type:Boolean,default:!1},allVisible:{type:Boolean,default:p.RANGE_TYPES.ALL},modelValue:{type:Array,default:()=>[]},treeList:{type:Array,default:()=>[]}},emits:[o.emitsMap.updateVisible,o.emitsMap.save,o.emitsMap.cancel],setup(h,{emit:S}){const b=h,a=S,v=e.ref(!0),i=e.ref(b.allVisible),d=e.ref([...b.modelValue]),f=e.ref(),{selectedMembers:c,selectedDepartments:s}=p.useSelectionDisplay(d,e.computed(()=>b.treeList),!1),V=e.computed(()=>{const n=[];return s.value.forEach(l=>{n.push({...l,children:void 0})}),c.value.forEach(l=>{n.push({...l,children:void 0})}),n}),y=n=>{i.value=n,n===p.RANGE_TYPES.ALL&&(d.value=[])},A=n=>{const{selectedNode:l}=n;d.value=l||[]},E=()=>{a(o.emitsMap.cancel),a(o.emitsMap.updateVisible,!1)},k=()=>{a(o.emitsMap.save,{type:i.value,selectedItems:[...d.value]}),a(o.emitsMap.updateVisible,!1)};return(n,l)=>(e.openBlock(),e.createBlock(e.unref(g.ElDialog),{modelValue:v.value,"onUpdate:modelValue":l[2]||(l[2]=r=>v.value=r),title:"可用范围设置","close-on-click-modal":!1,"close-on-press-escape":!1},{footer:e.withCtx(()=>[e.createElementVNode("div",w,[e.createVNode(e.unref(g.ElButton),{onClick:E,plain:""},{default:e.withCtx(()=>[...l[3]||(l[3]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(e.unref(g.ElButton),{type:"primary",onClick:k},{default:e.withCtx(()=>[...l[4]||(l[4]=[e.createTextVNode("保存",-1)])]),_:1})])]),default:e.withCtx(()=>[e.createElementVNode("div",M,[e.createVNode(e.unref(g.ElRadioGroup),{class:"pd-b-16",modelValue:i.value,"onUpdate:modelValue":l[0]||(l[0]=r=>i.value=r),onChange:y},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(p.rangeOptions),r=>(e.openBlock(),e.createBlock(e.unref(g.ElRadio),{key:r.value,value:r.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"]),i.value===e.unref(p.RANGE_TYPES).PARTIAL?(e.openBlock(),e.createElementBlock("div",N,[e.createVNode(e.unref(T.TreeShowSelect),{modelValue:d.value,"onUpdate:modelValue":l[1]||(l[1]=r=>d.value=r),ref_key:"treeRef",ref:f,treeProps:e.unref(p.TREE_PROPS),treeList:h.treeList,hasFilter:!0,rightTreeList:V.value,style:{height:"500px"},onGetCheckedNode:A},null,8,["modelValue","treeProps","treeList","rightTreeList"])])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue"]))}},B={class:"available-range-setting w-full"},I=Object.assign({name:"AvailableRangeSetting"},{__name:"layout",props:{allVisible:{type:Boolean,default:p.RANGE_TYPES.ALL},modelValue:{type:Array,default:()=>[]},loadDataApi:{type:Function,default:()=>()=>[]}},emits:[o.emitsMap.updateAllVisible,o.emitsMap.updateModelValue,o.emitsMap.change],setup(h,{expose:S,emit:b}){const a=h,v=b,i=e.ref(!1),d=e.ref(!1),f=e.ref([]),c=e.ref(a.allVisible),s=e.ref(a.modelValue),V=e.ref(new Set(s.value?.map(t=>t.memberId))),y=()=>{a.loadDataApi&&typeof a.loadDataApi=="function"?(d.value=!0,a.loadDataApi().then(t=>{f.value=t?.data?.orgOptionSoList||[]}).finally(()=>{d.value=!1})):f.value=[]},A=()=>{i.value=!0},E=t=>{c.value=t.type,s.value=t.selectedItems,V.value.clear(),s.value.forEach(u=>{V.value.add(u.memberId)}),v(o.emitsMap.updateAllVisible,c.value),v(o.emitsMap.updateModelValue,s.value),n()},k=()=>{i.value=!1},n=()=>{const t={allVisible:c.value,selectedItems:s.value};v(o.emitsMap.change,t)},l=e.ref(null),r=()=>{const t=l.value?.allSelectedItems||[];return{allVisible:c.value,visibleScope:t.map(m=>({memberId:m.memberId,memberName:m.memberName,memberType:m.memberType,bnid:m.bnid}))}};return e.watch(()=>a.allVisible,t=>{c.value=t},{immediate:!0}),e.watch(()=>a.modelValue,t=>{s.value=t||[],V.value.clear(),s.value.forEach(u=>{V.value.add(u.memberId)})},{immediate:!0}),e.watch(()=>a.loadDataApi,()=>{y()},{immediate:!1}),e.onMounted(()=>{y()}),S({getSelectedItems:r}),(t,u)=>(e.openBlock(),e.createElementBlock("div",B,[e.createVNode(e.unref(p.AvailableRangePreview),{allVisible:c.value,"model-value":s.value,"tree-list":f.value,onEdit:A,ref_key:"previewRef",ref:l},null,8,["allVisible","model-value","tree-list"]),i.value?(e.openBlock(),e.createBlock(L,{key:0,visible:i.value,"onUpdate:visible":u[0]||(u[0]=m=>i.value=m),allVisible:c.value,"onUpdate:allVisible":u[1]||(u[1]=m=>c.value=m),modelValue:s.value,"onUpdate:modelValue":u[2]||(u[2]=m=>s.value=m),"tree-list":f.value,loading:d.value,onSave:E,onCancel:k},null,8,["visible","allVisible","modelValue","tree-list","loading"])):e.createCommentVNode("",!0)]))}}),C=R.withInstall(I);exports.AvailableRangeSetting=C;exports.default=C;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const R=require("./chunks/index.CkihWzK6.js"),e=require("vue"),o=require("color-star-custom-methods"),p=require("./chunks/index.DsmgWFv8.js"),g=require("element-plus"),T=require("color-star-custom-components"),M={class:"dialog-content"},N={key:0,class:"selection-area overflow-hidden"},w={class:"dialog-footer"},L={__name:"Dialog",props:{visible:{type:Boolean,default:!1},allVisible:{type:Boolean,default:p.RANGE_TYPES.ALL},modelValue:{type:Array,default:()=>[]},treeList:{type:Array,default:()=>[]}},emits:[o.emitsMap.updateVisible,o.emitsMap.save,o.emitsMap.cancel],setup(h,{emit:S}){const b=h,a=S,v=e.ref(!0),i=e.ref(b.allVisible),d=e.ref([...b.modelValue]),f=e.ref(),{selectedMembers:c,selectedDepartments:s}=p.useSelectionDisplay(d,e.computed(()=>b.treeList),!1),V=e.computed(()=>{const n=[];return s.value.forEach(l=>{n.push({...l,children:void 0})}),c.value.forEach(l=>{n.push({...l,children:void 0})}),n}),y=n=>{i.value=n,n===p.RANGE_TYPES.ALL&&(d.value=[])},A=n=>{const{selectedNode:l}=n;d.value=l||[]},E=()=>{a(o.emitsMap.cancel),a(o.emitsMap.updateVisible,!1)},k=()=>{a(o.emitsMap.save,{type:i.value,selectedItems:[...d.value]}),a(o.emitsMap.updateVisible,!1)};return(n,l)=>(e.openBlock(),e.createBlock(e.unref(g.ElDialog),{modelValue:v.value,"onUpdate:modelValue":l[2]||(l[2]=r=>v.value=r),title:"可用范围设置","close-on-click-modal":!1,"close-on-press-escape":!1,"append-to-body":""},{footer:e.withCtx(()=>[e.createElementVNode("div",w,[e.createVNode(e.unref(g.ElButton),{onClick:E,plain:""},{default:e.withCtx(()=>[...l[3]||(l[3]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(e.unref(g.ElButton),{type:"primary",onClick:k},{default:e.withCtx(()=>[...l[4]||(l[4]=[e.createTextVNode("保存",-1)])]),_:1})])]),default:e.withCtx(()=>[e.createElementVNode("div",M,[e.createVNode(e.unref(g.ElRadioGroup),{class:"pd-b-16",modelValue:i.value,"onUpdate:modelValue":l[0]||(l[0]=r=>i.value=r),onChange:y},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(p.rangeOptions),r=>(e.openBlock(),e.createBlock(e.unref(g.ElRadio),{key:r.value,value:r.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"]),i.value===e.unref(p.RANGE_TYPES).PARTIAL?(e.openBlock(),e.createElementBlock("div",N,[e.createVNode(e.unref(T.TreeShowSelect),{modelValue:d.value,"onUpdate:modelValue":l[1]||(l[1]=r=>d.value=r),ref_key:"treeRef",ref:f,treeProps:e.unref(p.TREE_PROPS),treeList:h.treeList,hasFilter:!0,rightTreeList:V.value,style:{height:"500px"},onGetCheckedNode:A},null,8,["modelValue","treeProps","treeList","rightTreeList"])])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue"]))}},B={class:"available-range-setting w-full"},I=Object.assign({name:"AvailableRangeSetting"},{__name:"layout",props:{allVisible:{type:Boolean,default:p.RANGE_TYPES.ALL},modelValue:{type:Array,default:()=>[]},loadDataApi:{type:Function,default:()=>()=>[]}},emits:[o.emitsMap.updateAllVisible,o.emitsMap.updateModelValue,o.emitsMap.change],setup(h,{expose:S,emit:b}){const a=h,v=b,i=e.ref(!1),d=e.ref(!1),f=e.ref([]),c=e.ref(a.allVisible),s=e.ref(a.modelValue),V=e.ref(new Set(s.value?.map(t=>t.memberId))),y=()=>{a.loadDataApi&&typeof a.loadDataApi=="function"?(d.value=!0,a.loadDataApi().then(t=>{f.value=t?.data?.orgOptionSoList||[]}).finally(()=>{d.value=!1})):f.value=[]},A=()=>{i.value=!0},E=t=>{c.value=t.type,s.value=t.selectedItems,V.value.clear(),s.value.forEach(u=>{V.value.add(u.memberId)}),v(o.emitsMap.updateAllVisible,c.value),v(o.emitsMap.updateModelValue,s.value),n()},k=()=>{i.value=!1},n=()=>{const t={allVisible:c.value,selectedItems:s.value};v(o.emitsMap.change,t)},l=e.ref(null),r=()=>{const t=l.value?.allSelectedItems||[];return{allVisible:c.value,visibleScope:t.map(m=>({memberId:m.memberId,memberName:m.memberName,memberType:m.memberType,bnid:m.bnid}))}};return e.watch(()=>a.allVisible,t=>{c.value=t},{immediate:!0}),e.watch(()=>a.modelValue,t=>{s.value=t||[],V.value.clear(),s.value.forEach(u=>{V.value.add(u.memberId)})},{immediate:!0}),e.watch(()=>a.loadDataApi,()=>{y()},{immediate:!1}),e.onMounted(()=>{y()}),S({getSelectedItems:r}),(t,u)=>(e.openBlock(),e.createElementBlock("div",B,[e.createVNode(e.unref(p.AvailableRangePreview),{allVisible:c.value,"model-value":s.value,"tree-list":f.value,onEdit:A,ref_key:"previewRef",ref:l},null,8,["allVisible","model-value","tree-list"]),i.value?(e.openBlock(),e.createBlock(L,{key:0,visible:i.value,"onUpdate:visible":u[0]||(u[0]=m=>i.value=m),allVisible:c.value,"onUpdate:allVisible":u[1]||(u[1]=m=>c.value=m),modelValue:s.value,"onUpdate:modelValue":u[2]||(u[2]=m=>s.value=m),"tree-list":f.value,loading:d.value,onSave:E,onCancel:k},null,8,["visible","allVisible","modelValue","tree-list","loading"])):e.createCommentVNode("",!0)]))}}),C=R.withInstall(I);exports.AvailableRangeSetting=C;exports.default=C;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "china-mobile-international-custom-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.23",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"components",
|
|
6
6
|
"vue",
|
|
@@ -107,9 +107,9 @@
|
|
|
107
107
|
"vue": "^3.5.26",
|
|
108
108
|
"color-message-lingyun-vue": "0.0.30",
|
|
109
109
|
"color-star-atom-style": "0.0.2",
|
|
110
|
+
"color-message-aibox-vue": "0.0.80",
|
|
110
111
|
"color-star-custom-methods": "0.0.17",
|
|
111
|
-
"color-star-custom-components": "0.0.
|
|
112
|
-
"color-message-aibox-vue": "0.0.80"
|
|
112
|
+
"color-star-custom-components": "0.0.18"
|
|
113
113
|
},
|
|
114
114
|
"optionalDependencies": {
|
|
115
115
|
"@ast-grep/napi-linux-x64-musl": "^0.39.6",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.nowrap[data-v-bf564085]{white-space:nowrap}.tag-list .tag-item[data-v-bf564085]{line-height:22px;display:inline-block}.gap-4[data-v-bf564085]{gap:4px}.tag-list-popover[data-v-bf564085]{max-height:300px}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.dialog-content .selection-area[data-v-0525c8ac]{height:500px;border:1px solid var(--border-color);border-radius:8px;overflow:hidden}.dialog-footer[data-v-0525c8ac]{display:flex;justify-content:flex-end;gap:12px}.available-range-setting[data-v-3ff52101]{width:100%}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.nav-title[data-v-56e35473]{justify-content:space-between;align-items:center;height:68px;padding-left:2px;display:flex}.nav-title .title-logo[data-v-56e35473]{background:#eaf0fe;border-radius:100px;flex-shrink:0;justify-content:center;align-items:center;width:36px;height:36px;display:flex}.nav-title .title-text[data-v-56e35473]{white-space:nowrap;text-overflow:ellipsis;flex:1;overflow:hidden}.nav-title .collapse-unfold-icon[data-v-56e35473]{cursor:pointer;flex-shrink:0;justify-content:center;transition:transform .2s;display:flex}.nav-title .collapse-unfold-icon[data-v-56e35473]:hover{transform:scale(1.1)}.custom-tree[data-v-0a105c70]{background-color:#0000}.custom-tree[data-v-0a105c70] .el-tree-node__expand-icon{display:none}.custom-tree[data-v-0a105c70] .el-tree-node.is-current .el-tree-node__content{background:#eaf0fe;border-radius:6px}.custom-tree .tree-node-content-custom[data-v-0a105c70]{color:#1f2329;box-sizing:border-box;cursor:pointer;border-radius:6px;align-items:center;width:100%;padding:8px 12px;font-size:14px;font-weight:400;transition:all .3s;display:flex}.custom-tree .tree-node-content-custom.is-current[data-v-0a105c70]{color:#3271fe}.custom-tree .tree-node-content-custom.is-parent-active[data-v-0a105c70]{color:#3271fe;background:0 0;border-radius:6px}.custom-tree .tree-node-content-custom .expand-arrow[data-v-0a105c70]{cursor:pointer;flex-shrink:0;justify-content:center;align-items:center;transition:transform .3s;display:flex}.custom-tree .tree-node-content-custom .node-icon[data-v-0a105c70]{flex-shrink:0;justify-content:flex-start;width:24px}.custom-tree .tree-node-content-custom .node-label[data-v-0a105c70]{text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:14px;overflow:hidden}.user-popup-content[data-v-70783670]{padding:8px}.user-popup-content .list__item[data-v-70783670]{cursor:pointer;color:#262626;border-radius:8px;align-items:center;gap:6px;height:48px;padding:0 12px;font-size:14px;font-weight:400;transition:background-color .2s;display:flex}.user-popup-content .list__item[data-v-70783670]:hover{background:#f0f0f0}.user-popup-content .list__item-icon[data-v-70783670]{text-align:center;align-items:center;display:flex}.navbar-box__footer[data-v-d1e53517]{cursor:pointer;border-top:1px solid #f0f0f0;justify-content:space-between;align-items:center;width:100%;padding:16px 8px;display:flex;position:relative;bottom:0}.navbar-box__footer__left[data-v-d1e53517]{align-items:center;gap:6px;display:flex}.navbar-box__footer__left .name-first[data-v-d1e53517]{color:#fff;text-align:center;background:#3965ff;border-radius:50%;flex-shrink:0;width:30px;height:30px;margin-right:8px;font-size:22px;line-height:28px;display:inline-block}.navbar-box__footer__left .name-text[data-v-d1e53517]{color:#262626;align-items:center;gap:8px;font-size:14px;font-weight:500;line-height:20px;display:flex}.navbar-box__footer__left .user-id[data-v-d1e53517]{color:#a8abb2;font-size:12px}.footer-popup[data-v-d1e53517]{z-index:2001;width:280px;position:fixed;bottom:0}.footer-popup .footer-popup__content[data-v-d1e53517]{width:100%;height:100%}.content-bg[data-v-d1e53517]{-webkit-backdrop-filter:blur(16px);background:#f7f7f7b3;border:1px solid #fffc;border-radius:12px;box-shadow:0 9px 28px 8px #0000000d,0 6px 16px #00000014,0 3px 6px -4px #0000001f}.fade-enter-from[data-v-d1e53517],.fade-leave-to[data-v-d1e53517]{opacity:0}.fade-enter-active[data-v-d1e53517],.fade-leave-active[data-v-d1e53517]{transition:opacity .3s}.fade-enter-to[data-v-d1e53517],.fade-leave-from[data-v-d1e53517]{opacity:1}.sidebar[data-v-736b2e19]{width:240px;transition:width .3s;position:relative}.sidebar[data-v-736b2e19] .el-tree{--el-tree-node-hover-bg-color:transparent!important}
|
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
import { t as withInstall } from "./utils.BhlZXNZ6.js";
|
|
2
|
-
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.Cf-_TWPK.js";
|
|
3
|
-
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, nextTick, normalizeClass, onMounted, openBlock, ref, renderList, toDisplayString, unref, watch, withCtx } from "vue";
|
|
4
|
-
import { ElButton, ElPopover } from "element-plus";
|
|
5
|
-
import '../assets/AvailableRangePreview.css';const RANGE_TYPES = {
|
|
6
|
-
ALL: !0,
|
|
7
|
-
PARTIAL: !1
|
|
8
|
-
}, rangeOptions = [{
|
|
9
|
-
value: RANGE_TYPES.ALL,
|
|
10
|
-
label: "全部成员"
|
|
11
|
-
}, {
|
|
12
|
-
value: RANGE_TYPES.PARTIAL,
|
|
13
|
-
label: "部分成员"
|
|
14
|
-
}], MEMBER_DEPARTMENT_TYPES = {
|
|
15
|
-
MEMBER: 1,
|
|
16
|
-
DEPARTMENT: 2
|
|
17
|
-
}, TREE_PROPS = {
|
|
18
|
-
label: "memberName",
|
|
19
|
-
children: "children",
|
|
20
|
-
value: "memberId"
|
|
21
|
-
}, DEFAULT_SHOW_COUNT = {
|
|
22
|
-
three: 3,
|
|
23
|
-
one: 1
|
|
24
|
-
};
|
|
25
|
-
var _hoisted_1$1 = {
|
|
26
|
-
key: 0,
|
|
27
|
-
class: "pd-l-16 text-dee0e3 pd-r-16"
|
|
28
|
-
}, _hoisted_2 = { class: "fz-14 text-646a73 nowrap" }, _hoisted_3 = { class: "tag-item nowrap fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe pointer" }, _hoisted_4 = { class: "tag-list-popover overflow-y-auto flex gap-4 flex-wrap" }, TagList_default = /* @__PURE__ */ _plugin_vue_export_helper_default({
|
|
29
|
-
__name: "TagList",
|
|
30
|
-
props: {
|
|
31
|
-
label: {
|
|
32
|
-
type: String,
|
|
33
|
-
required: !0
|
|
34
|
-
},
|
|
35
|
-
items: {
|
|
36
|
-
type: Array,
|
|
37
|
-
default: () => []
|
|
38
|
-
},
|
|
39
|
-
defaultShowCount: {
|
|
40
|
-
type: Number,
|
|
41
|
-
default: DEFAULT_SHOW_COUNT.one
|
|
42
|
-
},
|
|
43
|
-
readonly: {
|
|
44
|
-
type: Boolean,
|
|
45
|
-
default: !1
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
setup(i) {
|
|
49
|
-
let w = i, A = computed(() => w.readonly ? w.items : w.items.slice(0, w.defaultShowCount)), j = computed(() => w.items.length > w.defaultShowCount), M = computed(() => w.items.length - w.defaultShowCount), N = computed(() => w.items.slice(w.defaultShowCount));
|
|
50
|
-
return (w, E) => i.items.length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
51
|
-
i.readonly ? createCommentVNode("", !0) : (openBlock(), createElementBlock("span", _hoisted_1$1, "|")),
|
|
52
|
-
createElementVNode("span", _hoisted_2, toDisplayString(i.label), 1),
|
|
53
|
-
createElementVNode("div", { class: normalizeClass(["tag-list", { "flex items-center gap-4": !i.readonly }]) }, [(openBlock(!0), createElementBlock(Fragment, null, renderList(A.value, (w) => (openBlock(), createElementBlock("div", {
|
|
54
|
-
key: w.memberId,
|
|
55
|
-
class: normalizeClass(["tag-item fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe", { "mg-r-4 mg-b-4": i.readonly }])
|
|
56
|
-
}, toDisplayString(w.memberName), 3))), 128)), !i.readonly && j.value ? (openBlock(), createBlock(unref(ElPopover), {
|
|
57
|
-
key: 0,
|
|
58
|
-
placement: "top",
|
|
59
|
-
trigger: "click",
|
|
60
|
-
width: "300"
|
|
61
|
-
}, {
|
|
62
|
-
reference: withCtx(() => [createElementVNode("span", _hoisted_3, " +" + toDisplayString(M.value), 1)]),
|
|
63
|
-
default: withCtx(() => [createElementVNode("div", _hoisted_4, [(openBlock(!0), createElementBlock(Fragment, null, renderList(N.value, (i) => (openBlock(), createElementBlock("span", {
|
|
64
|
-
key: i.memberId,
|
|
65
|
-
class: "tag-item nowrap fz-12 pd-l-8 pd-r-8 radius-4 bg-eaf0fe text-3271fe"
|
|
66
|
-
}, toDisplayString(i.memberName), 1))), 128))])]),
|
|
67
|
-
_: 1
|
|
68
|
-
})) : createCommentVNode("", !0)], 2)
|
|
69
|
-
], 64)) : createCommentVNode("", !0);
|
|
70
|
-
}
|
|
71
|
-
}, [["__scopeId", "data-v-bf564085"]]), safeFilter = (i, w) => i?.filter(w) || [], filterByType = (i, w) => safeFilter(i, (i) => i.memberType === w), collectDepartmentMembers = (i, w) => {
|
|
72
|
-
if (i.children) for (let T of i.children) T.memberType === MEMBER_DEPARTMENT_TYPES.MEMBER ? w(T) : T.memberType === MEMBER_DEPARTMENT_TYPES.DEPARTMENT && collectDepartmentMembers(T, w);
|
|
73
|
-
}, collectDepartmentMemberIds = (i) => {
|
|
74
|
-
let w = [];
|
|
75
|
-
return collectDepartmentMembers(i, (i) => w.push(i.memberId)), w;
|
|
76
|
-
};
|
|
77
|
-
function useSelectionDisplay(i, w, T = !1) {
|
|
78
|
-
let D = computed(() => {
|
|
79
|
-
if (!i.value) return [];
|
|
80
|
-
let T = [...i.value], E = filterByType(T, MEMBER_DEPARTMENT_TYPES.DEPARTMENT);
|
|
81
|
-
if (E.length > 0 && w.value && w.value.length > 0) {
|
|
82
|
-
let i = /* @__PURE__ */ new Set();
|
|
83
|
-
E.forEach((T) => {
|
|
84
|
-
let E = (w) => {
|
|
85
|
-
for (let D of w) if (D.memberType === MEMBER_DEPARTMENT_TYPES.DEPARTMENT && D.memberId === T.memberId) return collectDepartmentMembers(D, (w) => i.add(w)), !0;
|
|
86
|
-
else if (D.children && E(D.children)) return !0;
|
|
87
|
-
return !1;
|
|
88
|
-
};
|
|
89
|
-
E(w.value);
|
|
90
|
-
});
|
|
91
|
-
let D = new Set(filterByType(T, MEMBER_DEPARTMENT_TYPES.MEMBER).map((i) => i.memberId));
|
|
92
|
-
i.forEach((i) => {
|
|
93
|
-
D.has(i.memberId) || T.push(i);
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
return T;
|
|
97
|
-
}), O = computed(() => {
|
|
98
|
-
if (T) return filterByType(D.value, MEMBER_DEPARTMENT_TYPES.MEMBER);
|
|
99
|
-
{
|
|
100
|
-
let i = /* @__PURE__ */ new Set();
|
|
101
|
-
return k.value.forEach((w) => {
|
|
102
|
-
collectDepartmentMemberIds(w).forEach((w) => i.add(w));
|
|
103
|
-
}), safeFilter(D.value, (w) => w.memberType === MEMBER_DEPARTMENT_TYPES.MEMBER && !i.has(w.memberId));
|
|
104
|
-
}
|
|
105
|
-
}), k = computed(() => {
|
|
106
|
-
if (T) return filterByType(D.value, MEMBER_DEPARTMENT_TYPES.DEPARTMENT);
|
|
107
|
-
{
|
|
108
|
-
let i = [], T = (i) => {
|
|
109
|
-
if (!i.children || i.children.length === 0) return !1;
|
|
110
|
-
let w = collectDepartmentMemberIds(i);
|
|
111
|
-
return w.length === 0 ? !1 : w.every((i) => D.value.some((w) => w.memberType === MEMBER_DEPARTMENT_TYPES.MEMBER && w.memberId === i));
|
|
112
|
-
}, E = (w, D = !1) => {
|
|
113
|
-
if (w.memberType === MEMBER_DEPARTMENT_TYPES.DEPARTMENT) {
|
|
114
|
-
let O = T(w);
|
|
115
|
-
if (O && !D) {
|
|
116
|
-
if (i.push({
|
|
117
|
-
memberId: w.memberId,
|
|
118
|
-
memberName: w.memberName,
|
|
119
|
-
memberType: MEMBER_DEPARTMENT_TYPES.DEPARTMENT,
|
|
120
|
-
children: w.children
|
|
121
|
-
}), w.children) for (let i of w.children) E(i, !0);
|
|
122
|
-
} else if (!O && w.children) for (let i of w.children) E(i, !1);
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
for (let i of w.value) E(i, !1);
|
|
126
|
-
return i;
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
return {
|
|
130
|
-
selectedMembers: O,
|
|
131
|
-
selectedDepartments: k
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
var _hoisted_1 = { class: "fz-14 text-1f2329" };
|
|
135
|
-
const AvailableRangePreview = withInstall({
|
|
136
|
-
__name: "layout",
|
|
137
|
-
props: {
|
|
138
|
-
allVisible: {
|
|
139
|
-
type: Boolean,
|
|
140
|
-
default: RANGE_TYPES.ALL
|
|
141
|
-
},
|
|
142
|
-
modelValue: {
|
|
143
|
-
type: Array,
|
|
144
|
-
default: () => []
|
|
145
|
-
},
|
|
146
|
-
treeList: {
|
|
147
|
-
type: Array,
|
|
148
|
-
default: () => []
|
|
149
|
-
},
|
|
150
|
-
readonly: {
|
|
151
|
-
type: Boolean,
|
|
152
|
-
default: !1
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
|
-
setup(i, { expose: w }) {
|
|
156
|
-
let P = ref(null), F = () => {
|
|
157
|
-
P.value && nextTick(() => {
|
|
158
|
-
P.value.scrollIntoView({
|
|
159
|
-
behavior: "smooth",
|
|
160
|
-
block: "center"
|
|
161
|
-
});
|
|
162
|
-
});
|
|
163
|
-
}, I = i, { selectedMembers: L, selectedDepartments: R } = useSelectionDisplay(computed(() => I.modelValue), computed(() => I.treeList), I.readonly), z = computed(() => {
|
|
164
|
-
let i = L.value.length > 0, w = R.value.length > 0;
|
|
165
|
-
return i && !w || !i && w ? DEFAULT_SHOW_COUNT.three : DEFAULT_SHOW_COUNT.one;
|
|
166
|
-
}), B = computed(() => [...L.value, ...R.value]);
|
|
167
|
-
return watch(() => [I.allVisible, I.modelValue], () => {
|
|
168
|
-
F();
|
|
169
|
-
}, {
|
|
170
|
-
immediate: !1,
|
|
171
|
-
deep: !0
|
|
172
|
-
}), onMounted(() => {
|
|
173
|
-
F();
|
|
174
|
-
}), w({ allSelectedItems: B }), (w, E) => (openBlock(), createElementBlock("div", {
|
|
175
|
-
ref_key: "previewRef",
|
|
176
|
-
ref: P,
|
|
177
|
-
class: normalizeClass(["available-range-preview w-full overflow-hidden", { "flex items-center": !i.readonly }])
|
|
178
|
-
}, [i.readonly ? createCommentVNode("", !0) : (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
179
|
-
E[2] ||= createElementVNode("div", { class: "text-1f2329" }, "可用范围:", -1),
|
|
180
|
-
createElementVNode("span", _hoisted_1, toDisplayString(unref(rangeOptions).find((w) => w.value === i.allVisible)?.label), 1),
|
|
181
|
-
createVNode(unref(ElButton), {
|
|
182
|
-
class: "mg-l-16",
|
|
183
|
-
type: "primary",
|
|
184
|
-
link: "",
|
|
185
|
-
onClick: E[0] ||= (i) => w.$emit("edit")
|
|
186
|
-
}, {
|
|
187
|
-
default: withCtx(() => [...E[1] ||= [createTextVNode(" 编辑 ", -1)]]),
|
|
188
|
-
_: 1
|
|
189
|
-
})
|
|
190
|
-
], 64)), i.allVisible === unref(RANGE_TYPES).PARTIAL ? (openBlock(), createElementBlock("div", {
|
|
191
|
-
key: 1,
|
|
192
|
-
class: normalizeClass(["flex-1 overflow-hidden", { "flex items-center": !i.readonly }])
|
|
193
|
-
}, [unref(L)?.length ? (openBlock(), createBlock(TagList_default, {
|
|
194
|
-
key: 0,
|
|
195
|
-
label: "成员:",
|
|
196
|
-
items: unref(L),
|
|
197
|
-
"default-show-count": z.value,
|
|
198
|
-
readonly: i.readonly
|
|
199
|
-
}, null, 8, [
|
|
200
|
-
"items",
|
|
201
|
-
"default-show-count",
|
|
202
|
-
"readonly"
|
|
203
|
-
])) : createCommentVNode("", !0), unref(R)?.length ? (openBlock(), createBlock(TagList_default, {
|
|
204
|
-
key: 1,
|
|
205
|
-
label: "部门:",
|
|
206
|
-
items: unref(R),
|
|
207
|
-
"default-show-count": z.value,
|
|
208
|
-
readonly: i.readonly
|
|
209
|
-
}, null, 8, [
|
|
210
|
-
"items",
|
|
211
|
-
"default-show-count",
|
|
212
|
-
"readonly"
|
|
213
|
-
])) : createCommentVNode("", !0)], 2)) : createCommentVNode("", !0)], 2));
|
|
214
|
-
}
|
|
215
|
-
}), TagList = withInstall(TagList_default);
|
|
216
|
-
var AvailableRangePreview_default = AvailableRangePreview;
|
|
217
|
-
export { RANGE_TYPES as a, useSelectionDisplay as i, AvailableRangePreview_default as n, TREE_PROPS as o, TagList as r, rangeOptions as s, AvailableRangePreview as t };
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
import { t as withInstall } from "./utils.BhlZXNZ6.js";
|
|
2
|
-
import { a as RANGE_TYPES, i as useSelectionDisplay, o as TREE_PROPS, s as rangeOptions, t as AvailableRangePreview } from "./AvailableRangePreview.D4mZe1lQ.js";
|
|
3
|
-
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, onMounted, openBlock, ref, renderList, toDisplayString, unref, watch, withCtx } from "vue";
|
|
4
|
-
import { ElButton, ElDialog, ElRadio, ElRadioGroup } from "element-plus";
|
|
5
|
-
import { emitsMap } from "color-star-custom-methods";
|
|
6
|
-
import { TreeShowSelect } from "color-star-custom-components";
|
|
7
|
-
var _hoisted_1$1 = { class: "dialog-content" }, _hoisted_2 = {
|
|
8
|
-
key: 0,
|
|
9
|
-
class: "selection-area overflow-hidden"
|
|
10
|
-
}, _hoisted_3 = { class: "dialog-footer" }, Dialog_default = {
|
|
11
|
-
__name: "Dialog",
|
|
12
|
-
props: {
|
|
13
|
-
visible: {
|
|
14
|
-
type: Boolean,
|
|
15
|
-
default: !1
|
|
16
|
-
},
|
|
17
|
-
allVisible: {
|
|
18
|
-
type: Boolean,
|
|
19
|
-
default: RANGE_TYPES.ALL
|
|
20
|
-
},
|
|
21
|
-
modelValue: {
|
|
22
|
-
type: Array,
|
|
23
|
-
default: () => []
|
|
24
|
-
},
|
|
25
|
-
treeList: {
|
|
26
|
-
type: Array,
|
|
27
|
-
default: () => []
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
emits: [
|
|
31
|
-
emitsMap.updateVisible,
|
|
32
|
-
emitsMap.save,
|
|
33
|
-
emitsMap.cancel
|
|
34
|
-
],
|
|
35
|
-
setup(e, { emit: g }) {
|
|
36
|
-
let x = e, w = g, j = ref(!0), M = ref(x.allVisible), N = ref([...x.modelValue]), P = ref(), { selectedMembers: F, selectedDepartments: I } = useSelectionDisplay(N, computed(() => x.treeList), !1), L = computed(() => {
|
|
37
|
-
let e = [];
|
|
38
|
-
return I.value.forEach((f) => {
|
|
39
|
-
e.push({
|
|
40
|
-
...f,
|
|
41
|
-
children: void 0
|
|
42
|
-
});
|
|
43
|
-
}), F.value.forEach((f) => {
|
|
44
|
-
e.push({
|
|
45
|
-
...f,
|
|
46
|
-
children: void 0
|
|
47
|
-
});
|
|
48
|
-
}), e;
|
|
49
|
-
}), R = (e) => {
|
|
50
|
-
M.value = e, e === RANGE_TYPES.ALL && (N.value = []);
|
|
51
|
-
}, z = (e) => {
|
|
52
|
-
let { selectedNode: f } = e;
|
|
53
|
-
N.value = f || [];
|
|
54
|
-
}, B = () => {
|
|
55
|
-
w(emitsMap.cancel), w(emitsMap.updateVisible, !1);
|
|
56
|
-
}, V = () => {
|
|
57
|
-
w(emitsMap.save, {
|
|
58
|
-
type: M.value,
|
|
59
|
-
selectedItems: [...N.value]
|
|
60
|
-
}), w(emitsMap.updateVisible, !1);
|
|
61
|
-
};
|
|
62
|
-
return (p, g) => (openBlock(), createBlock(unref(ElDialog), {
|
|
63
|
-
modelValue: j.value,
|
|
64
|
-
"onUpdate:modelValue": g[2] ||= (e) => j.value = e,
|
|
65
|
-
title: "可用范围设置",
|
|
66
|
-
"close-on-click-modal": !1,
|
|
67
|
-
"close-on-press-escape": !1,
|
|
68
|
-
"append-to": "#source-publish-container"
|
|
69
|
-
}, {
|
|
70
|
-
footer: withCtx(() => [createElementVNode("div", _hoisted_3, [createVNode(unref(ElButton), {
|
|
71
|
-
onClick: B,
|
|
72
|
-
plain: ""
|
|
73
|
-
}, {
|
|
74
|
-
default: withCtx(() => [...g[3] ||= [createTextVNode("取消", -1)]]),
|
|
75
|
-
_: 1
|
|
76
|
-
}), createVNode(unref(ElButton), {
|
|
77
|
-
type: "primary",
|
|
78
|
-
onClick: V
|
|
79
|
-
}, {
|
|
80
|
-
default: withCtx(() => [...g[4] ||= [createTextVNode("保存", -1)]]),
|
|
81
|
-
_: 1
|
|
82
|
-
})])]),
|
|
83
|
-
default: withCtx(() => [createElementVNode("div", _hoisted_1$1, [createVNode(unref(ElRadioGroup), {
|
|
84
|
-
class: "pd-b-16",
|
|
85
|
-
modelValue: M.value,
|
|
86
|
-
"onUpdate:modelValue": g[0] ||= (e) => M.value = e,
|
|
87
|
-
onChange: R
|
|
88
|
-
}, {
|
|
89
|
-
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(rangeOptions), (e) => (openBlock(), createBlock(unref(ElRadio), {
|
|
90
|
-
key: e.value,
|
|
91
|
-
value: e.value
|
|
92
|
-
}, {
|
|
93
|
-
default: withCtx(() => [createTextVNode(toDisplayString(e.label), 1)]),
|
|
94
|
-
_: 2
|
|
95
|
-
}, 1032, ["value"]))), 128))]),
|
|
96
|
-
_: 1
|
|
97
|
-
}, 8, ["modelValue"]), M.value === unref(RANGE_TYPES).PARTIAL ? (openBlock(), createElementBlock("div", _hoisted_2, [createVNode(unref(TreeShowSelect), {
|
|
98
|
-
modelValue: N.value,
|
|
99
|
-
"onUpdate:modelValue": g[1] ||= (e) => N.value = e,
|
|
100
|
-
ref_key: "treeRef",
|
|
101
|
-
ref: P,
|
|
102
|
-
treeProps: unref(TREE_PROPS),
|
|
103
|
-
treeList: e.treeList,
|
|
104
|
-
hasFilter: !0,
|
|
105
|
-
rightTreeList: L.value,
|
|
106
|
-
style: { height: "500px" },
|
|
107
|
-
onGetCheckedNode: z
|
|
108
|
-
}, null, 8, [
|
|
109
|
-
"modelValue",
|
|
110
|
-
"treeProps",
|
|
111
|
-
"treeList",
|
|
112
|
-
"rightTreeList"
|
|
113
|
-
])])) : createCommentVNode("", !0)])]),
|
|
114
|
-
_: 1
|
|
115
|
-
}, 8, ["modelValue"]));
|
|
116
|
-
}
|
|
117
|
-
}, _hoisted_1 = { class: "available-range-setting w-full" };
|
|
118
|
-
const AvailableRangeSetting = withInstall(/* @__PURE__ */ Object.assign({ name: "AvailableRangeSetting" }, {
|
|
119
|
-
__name: "layout",
|
|
120
|
-
props: {
|
|
121
|
-
allVisible: {
|
|
122
|
-
type: Boolean,
|
|
123
|
-
default: RANGE_TYPES.ALL
|
|
124
|
-
},
|
|
125
|
-
modelValue: {
|
|
126
|
-
type: Array,
|
|
127
|
-
default: () => []
|
|
128
|
-
},
|
|
129
|
-
loadDataApi: {
|
|
130
|
-
type: Function,
|
|
131
|
-
default: () => () => []
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
emits: [
|
|
135
|
-
emitsMap.updateAllVisible,
|
|
136
|
-
emitsMap.updateModelValue,
|
|
137
|
-
emitsMap.change
|
|
138
|
-
],
|
|
139
|
-
setup(e, { expose: f, emit: p }) {
|
|
140
|
-
let m = e, h = p, _ = ref(!1), v = ref(!1), y = ref([]), b = ref(m.allVisible), S = ref(m.modelValue), C = ref(new Set(S.value?.map((e) => e.memberId))), T = () => {
|
|
141
|
-
m.loadDataApi && typeof m.loadDataApi == "function" ? (v.value = !0, m.loadDataApi().then((e) => {
|
|
142
|
-
y.value = e?.data?.orgOptionSoList || [];
|
|
143
|
-
}).finally(() => {
|
|
144
|
-
v.value = !1;
|
|
145
|
-
})) : y.value = [];
|
|
146
|
-
}, E = () => {
|
|
147
|
-
_.value = !0;
|
|
148
|
-
}, D = (e) => {
|
|
149
|
-
b.value = e.type, S.value = e.selectedItems, C.value.clear(), S.value.forEach((e) => {
|
|
150
|
-
C.value.add(e.memberId);
|
|
151
|
-
}), h(emitsMap.updateAllVisible, b.value), h(emitsMap.updateModelValue, S.value), k();
|
|
152
|
-
}, O = () => {
|
|
153
|
-
_.value = !1;
|
|
154
|
-
}, k = () => {
|
|
155
|
-
let e = {
|
|
156
|
-
allVisible: b.value,
|
|
157
|
-
selectedItems: S.value
|
|
158
|
-
};
|
|
159
|
-
h(emitsMap.change, e);
|
|
160
|
-
}, A = ref(null);
|
|
161
|
-
return watch(() => m.allVisible, (e) => {
|
|
162
|
-
b.value = e;
|
|
163
|
-
}, { immediate: !0 }), watch(() => m.modelValue, (e) => {
|
|
164
|
-
S.value = e || [], C.value.clear(), S.value.forEach((e) => {
|
|
165
|
-
C.value.add(e.memberId);
|
|
166
|
-
});
|
|
167
|
-
}, { immediate: !0 }), watch(() => m.loadDataApi, () => {
|
|
168
|
-
T();
|
|
169
|
-
}, { immediate: !1 }), onMounted(() => {
|
|
170
|
-
T();
|
|
171
|
-
}), f({ getSelectedItems: () => {
|
|
172
|
-
let e = A.value?.allSelectedItems || [];
|
|
173
|
-
return {
|
|
174
|
-
allVisible: b.value,
|
|
175
|
-
visibleScope: e.map((e) => ({
|
|
176
|
-
memberId: e.memberId,
|
|
177
|
-
memberName: e.memberName,
|
|
178
|
-
memberType: e.memberType,
|
|
179
|
-
bnid: e.bnid
|
|
180
|
-
}))
|
|
181
|
-
};
|
|
182
|
-
} }), (e, f) => (openBlock(), createElementBlock("div", _hoisted_1, [createVNode(unref(AvailableRangePreview), {
|
|
183
|
-
allVisible: b.value,
|
|
184
|
-
"model-value": S.value,
|
|
185
|
-
"tree-list": y.value,
|
|
186
|
-
onEdit: E,
|
|
187
|
-
ref_key: "previewRef",
|
|
188
|
-
ref: A
|
|
189
|
-
}, null, 8, [
|
|
190
|
-
"allVisible",
|
|
191
|
-
"model-value",
|
|
192
|
-
"tree-list"
|
|
193
|
-
]), _.value ? (openBlock(), createBlock(Dialog_default, {
|
|
194
|
-
key: 0,
|
|
195
|
-
visible: _.value,
|
|
196
|
-
"onUpdate:visible": f[0] ||= (e) => _.value = e,
|
|
197
|
-
allVisible: b.value,
|
|
198
|
-
"onUpdate:allVisible": f[1] ||= (e) => b.value = e,
|
|
199
|
-
modelValue: S.value,
|
|
200
|
-
"onUpdate:modelValue": f[2] ||= (e) => S.value = e,
|
|
201
|
-
"tree-list": y.value,
|
|
202
|
-
loading: v.value,
|
|
203
|
-
onSave: D,
|
|
204
|
-
onCancel: O
|
|
205
|
-
}, null, 8, [
|
|
206
|
-
"visible",
|
|
207
|
-
"allVisible",
|
|
208
|
-
"modelValue",
|
|
209
|
-
"tree-list",
|
|
210
|
-
"loading"
|
|
211
|
-
])) : createCommentVNode("", !0)]));
|
|
212
|
-
}
|
|
213
|
-
}));
|
|
214
|
-
var AvailableRangeSetting_default = AvailableRangeSetting;
|
|
215
|
-
export { AvailableRangeSetting_default as n, AvailableRangeSetting as t };
|