china-mobile-international-custom-components 0.0.22 → 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.
@@ -1,5 +1,5 @@
1
1
  import { w as B } from "./chunks/index.bCzIhWFw.js";
2
- import { ref as r, 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";
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 = r(!0), o = r(y.allVisible), d = r([...y.modelValue]), f = r(), { selectedMembers: m, selectedDepartments: s } = G(
41
- d,
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 && (d.value = []);
60
+ o.value = i, i === S.ALL && (r.value = []);
61
61
  }, I = (i) => {
62
62
  const { selectedNode: e } = i;
63
- d.value = e || [];
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: [...d.value]
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: d.value,
125
- "onUpdate:modelValue": e[1] || (e[1] = (n) => d.value = 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 = r(!1), d = r(!1), f = r([]), m = r(a.allVisible), s = r(a.modelValue), b = r(
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" ? (d.value = !0, a.loadDataApi().then((l) => {
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
- d.value = !1;
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 = r(null), n = () => {
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: d.value,
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.22",
3
+ "version": "0.0.23",
4
4
  "keywords": [
5
5
  "components",
6
6
  "vue",
@@ -105,9 +105,9 @@
105
105
  "peerDependencies": {
106
106
  "axios": "^1.8.2",
107
107
  "vue": "^3.5.26",
108
+ "color-message-lingyun-vue": "0.0.30",
108
109
  "color-star-atom-style": "0.0.2",
109
110
  "color-message-aibox-vue": "0.0.80",
110
- "color-message-lingyun-vue": "0.0.30",
111
111
  "color-star-custom-methods": "0.0.17",
112
112
  "color-star-custom-components": "0.0.18"
113
113
  },