@baosight/erm 0.0.5 → 0.0.7
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/lib/index.css +1 -1
- package/lib/index.d.ts +5 -3
- package/lib/index.esm.css +89 -0
- package/lib/index.esm.js +1 -1
- package/package.json +74 -70
package/lib/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.swiperButton[data-v-
|
|
1
|
+
.swiperButton[data-v-18ccf330]{height:100%}.rowContent[data-v-18ccf330]{display:flex;flex-direction:row;justify-content:center;height:var(--120718a4);width:90%;margin:0 5% 0;padding:10px 0;border-bottom:1px solid hsla(0,0%,80%,.467)}.rowContent .leftArea[data-v-18ccf330]{display:flex;flex-direction:column;justify-content:center;align-items:center;width:var(--7101848f)}.rowContent .leftArea .leftIcon[data-v-18ccf330]{width:var(--13a34cb0);height:var(--13a34cb0)}.rowContent .rightArea[data-v-18ccf330]{display:flex;flex-direction:column;justify-content:center;align-items:center;width:var(--2afd8d94)}.rowContent .rightArea .rightIcon[data-v-18ccf330]{width:var(--ec353a62);height:var(--ec353a62)}.rowContent .mainContent[data-v-18ccf330]{width:var(--0a13c141);display:flex;flex-direction:column;justify-content:start;overflow:auto}.rowContent .mainContent .singleRow[data-v-18ccf330]{display:flex;flex-direction:column;justify-content:flex-start;padding:5px 0}.rowContent .mainContent .colDesc[data-v-18ccf330]{font-family:阿里巴巴普惠体Medium}.rowContent .mainContent .colData[data-v-18ccf330]{font-family:阿里巴巴普惠体Regular}.rowContent body[data-v-18ccf330]::-webkit-scrollbar{display:none}.rowContent body[data-v-18ccf330]{scrollbar-width:none;-ms-overflow-style:none}.mainTitle[data-v-18ccf330]{display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:阿里巴巴普惠体Bold;font-size:23px;color:#548cf6;margin:10px;padding-bottom:10px}.selected[data-v-18ccf330]{background-color:rgba(228,232,245,.7);border-radius:10px;box-shadow:0 2px 3px #ccc}.myClass[data-v-18ccf330]{box-sizing:border-box;min-height:500px;max-height:70vh;text-align:center;padding-top:40px}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { App } from
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import './styles/index.scss';
|
|
3
|
+
import { useFormStore } from './store/form';
|
|
4
|
+
import EFM from './use/eiService';
|
|
5
|
+
export { useFormStore, EFM };
|
|
4
6
|
declare const _default: {
|
|
5
7
|
install: (app: App<any>) => void;
|
|
6
8
|
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
.swiperButton[data-v-35c7b3ce] {
|
|
3
|
+
height: 100%;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.rowContent[data-v-35c7b3ce] {
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: row;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
height: var(--35c7b3ce-maxHeight);
|
|
11
|
+
width: 90%;
|
|
12
|
+
margin: 0px 5% 0px;
|
|
13
|
+
padding: 10px 0;
|
|
14
|
+
border-bottom: 1px solid rgba(204, 204, 204, 0.4666666667);
|
|
15
|
+
}
|
|
16
|
+
.rowContent[data-v-35c7b3ce] .leftArea[data-v-35c7b3ce] {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
align-items: center;
|
|
21
|
+
width: var(--35c7b3ce-leftSize);
|
|
22
|
+
}
|
|
23
|
+
.rowContent[data-v-35c7b3ce] .leftArea[data-v-35c7b3ce] .leftIcon[data-v-35c7b3ce] {
|
|
24
|
+
width: var(--35c7b3ce-leftIconSize);
|
|
25
|
+
height: var(--35c7b3ce-leftIconSize);
|
|
26
|
+
}
|
|
27
|
+
.rowContent[data-v-35c7b3ce] .rightArea[data-v-35c7b3ce] {
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
align-items: center;
|
|
32
|
+
width: var(--35c7b3ce-rightSize);
|
|
33
|
+
}
|
|
34
|
+
.rowContent[data-v-35c7b3ce] .rightArea[data-v-35c7b3ce] .rightIcon[data-v-35c7b3ce] {
|
|
35
|
+
width: var(--35c7b3ce-rightIconSize);
|
|
36
|
+
height: var(--35c7b3ce-rightIconSize);
|
|
37
|
+
}
|
|
38
|
+
.rowContent[data-v-35c7b3ce] .mainContent[data-v-35c7b3ce] {
|
|
39
|
+
width: var(--35c7b3ce-mainSize);
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
justify-content: start;
|
|
43
|
+
overflow: auto;
|
|
44
|
+
}
|
|
45
|
+
.rowContent[data-v-35c7b3ce] .mainContent[data-v-35c7b3ce] .singleRow[data-v-35c7b3ce] {
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
justify-content: flex-start;
|
|
49
|
+
padding: 5px 0;
|
|
50
|
+
}
|
|
51
|
+
.rowContent[data-v-35c7b3ce] .mainContent[data-v-35c7b3ce] .colDesc[data-v-35c7b3ce] {
|
|
52
|
+
font-family: "阿里巴巴普惠体Medium";
|
|
53
|
+
}
|
|
54
|
+
.rowContent[data-v-35c7b3ce] .mainContent[data-v-35c7b3ce] .colData[data-v-35c7b3ce] {
|
|
55
|
+
font-family: "阿里巴巴普惠体Regular";
|
|
56
|
+
}
|
|
57
|
+
.rowContent[data-v-35c7b3ce] body[data-v-35c7b3ce]::-webkit-scrollbar {
|
|
58
|
+
display: none;
|
|
59
|
+
}
|
|
60
|
+
.rowContent[data-v-35c7b3ce] body[data-v-35c7b3ce] {
|
|
61
|
+
scrollbar-width: none;
|
|
62
|
+
-ms-overflow-style: none;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.mainTitle[data-v-35c7b3ce] {
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-direction: column;
|
|
68
|
+
justify-content: center;
|
|
69
|
+
align-items: center;
|
|
70
|
+
font-family: "阿里巴巴普惠体Bold";
|
|
71
|
+
font-size: 23px;
|
|
72
|
+
color: #548cf6;
|
|
73
|
+
margin: 10px;
|
|
74
|
+
padding-bottom: 10px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.selected[data-v-35c7b3ce] {
|
|
78
|
+
background-color: rgba(228, 232, 245, 0.7);
|
|
79
|
+
border-radius: 10px;
|
|
80
|
+
box-shadow: 0px 2px 3px #cccccc;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.myClass[data-v-35c7b3ce] {
|
|
84
|
+
box-sizing: border-box;
|
|
85
|
+
min-height: 500px;
|
|
86
|
+
max-height: 70vh;
|
|
87
|
+
text-align: center;
|
|
88
|
+
padding-top: 40px;
|
|
89
|
+
}
|
package/lib/index.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useCssVars as t,unref as l,ref as o,watch as a,nextTick as n,onMounted as i,resolveComponent as c,openBlock as u,createElementBlock as r,Fragment as s,createCommentVNode as d,toDisplayString as f,createVNode as h,withCtx as p,createBlock as m,renderList as g,normalizeClass as v,createElementVNode as C,renderSlot as w,normalizeStyle as k,createTextVNode as T}from"vue";import{EI as y,EIManager as S}from"@baosight/ei";const L={key:0,class:"mainTitle"},I=["onClick"],E={class:"rowContent"},_={key:0,class:"leftArea"},b=["src","onClick","onMousedown","onMouseup","onTouchstart","onTouchend"],R=["onClick"],O={key:1,class:"rightArea"},D=["src","onClick","onMousedown","onMouseup","onTouchstart","onTouchend"];var x=e({__name:"ermList",props:{data:[],maxHeight:{type:String,default:"auto"},formName:{type:String,require:!0},functionId:{type:String,require:!0},showLeft:{type:Boolean,default:!1},showRight:{type:Boolean,default:!1},mainTitle:{type:String,default:!1},leftIconUrl:{type:String,default:"lg.png"},rightIconUrl:{type:String,default:"xiangyou.png"},leftIconSize:{type:String,default:"40px"},rightIconSize:{type:String,default:"40px"},mutiSelect:{type:Boolean,default:!1},pullDisabled:{type:Boolean,default:!1},leftSwiperSelect:{type:Boolean,default:!0},rightSwiperDelete:{type:Boolean,default:!0}},emits:["leftIconClick","mainClick","rightIconClick","leftIconHold","rightIconHold","pullRefresh","pullUpdate"],setup(e,{expose:x,emit:H}){t((t=>({"35c7b3ce-maxHeight":l(A),"35c7b3ce-leftSize":l(U),"35c7b3ce-leftIconSize":e.leftIconSize,"35c7b3ce-rightSize":l(N),"35c7b3ce-rightIconSize":e.rightIconSize,"35c7b3ce-mainSize":l(F)})));const M=e,B=H;x({endLoad:function(){G.value=!1,J.value=!1},selectAll:function(){M.showLeft&&K.value&&M.data.forEach((e=>{e.rowCheckedFlag=!0}))},selectNone:W,getSelectedRows:function(){if(M.showLeft&&K.value){const e=[];return M.data.forEach((t=>{!0===t.rowCheckedFlag&&e.push(t)})),e}}});var A="auto";M.maxHeight&&(A=M.maxHeight);var U=o("0%"),F=o("100%"),N=o("0%");function z(){M.showLeft&&M.showRight?(U.value="15%",N.value="15%",F.value="70%"):M.showLeft?(U.value="15%",F.value="85%"):M.showRight&&(N.value="15%",F.value="85%"),console.log(U,N,F)}a((()=>[M.showLeft,M.showRight]),(([e,t],[l,o])=>{z()}));const X=o([]);var $=null;function q(e){$=setTimeout((()=>{$=null,B("leftIconHold",e)}),1e3)}function V(e){clearTimeout($),$=null}function P(e){$=setTimeout((()=>{$=null,B("rightIconHold",e)}),1e3)}function j(e){clearTimeout($),$=null}const G=o(!1),J=o(!1);var K=o(!1);function Q(e,t){M.showLeft&&K.value&&(M.data[t].rowCheckedFlag=!M.data[t].rowCheckedFlag),console.log(event.target)}function W(){M.showLeft&&K.value&&M.data.forEach((e=>{e.rowCheckedFlag=!1}))}a((()=>M.mutiSelect),(()=>{K.value=M.mutiSelect}),{immediate:!0}),a((()=>M.mutiSelect),(()=>{M.data.forEach((e=>{e.rowCheckedFlag=!1}))}));var Y=o(!0);function Z(){K.value=!0}function ee(){W(),K.value=!1}a((()=>M.leftSwiperSelect),(()=>{M.leftSwiperSelect?Y.value=!0:Y.value=!1}),{deep:!0,immediate:!0});var te=o(!0);function le(e){return new URL(`/src/assets/img/${e}`,import.meta.url).href}return a((()=>M.rightSwiperDelete),(()=>{M.rightSwiperDelete?te.value=!0:te.value=!1}),{deep:!0,immediate:!0}),a((()=>X.value),(()=>{n((()=>{!function(){var e=document.getElementsByClassName("colDesc");for(let t=0;t<e.length;t++){const l=e[t];l.innerHTML=l.innerHTML.replaceAll("<br>","<br>")}}()}))}),{deep:!0}),i((()=>{console.log("onMounted",M),z(),async function(){const e=new y.EIInfo;e.addBlock(new y.EiBlock,"").pushData({FORM_NAME:M.formName,FUNCTION_ID:M.functionId},!0),S.callService("","ma01_config_inq",e).then((e=>{console.log("1",e.blocks.Table0.data),X.value=e.blocks.Table0.data,console.log(X),X.value.forEach((e=>{if(""!==e.HEAD_TEXTCOLOR.trim()){var t=e.HEAD_TEXTCOLOR.trim();t="#"+(Number(t)+16777216).toString(16).padStart(6,"0"),e.HEAD_TEXTCOLOR=t}""!==e.CELL_TEXTCOLOR.trim()&&(t=e.CELL_TEXTCOLOR.trim(),t="#"+(Number(t)+16777216).toString(16).padStart(6,"0"),e.CELL_TEXTCOLOR=t)}))}))}()})),(t,o)=>{const a=c("van-button"),n=c("van-checkbox"),i=c("van-col"),y=c("van-row"),S=c("van-swipe-cell"),x=c("van-list"),H=c("NoData"),B=c("van-pull-refresh");return u(),r(s,null,[d(' <div class="rowsList"> '),e.mainTitle&&""!==e.mainTitle?(u(),r("div",L,f(e.mainTitle),1)):d("v-if",!0),h(B,{class:"pullRefresh",modelValue:G.value,"onUpdate:modelValue":o[2]||(o[2]=e=>G.value=e),disabled:e.pullDisabled,onRefresh:o[3]||(o[3]=e=>t.$emit("pullRefresh"))},{default:p((()=>[X.value.length>0&&e.data.length>0?(u(),m(x,{key:0,loading:J.value,"onUpdate:loading":o[0]||(o[0]=e=>J.value=e),style:{"min-height":"200px"},onLoad:o[1]||(o[1]=e=>t.$emit("pullUpdate")),"immediate-check":!1},{default:p((()=>[(u(!0),r(s,null,g(e.data,((o,c)=>(u(),r("div",{class:v({selected:o.rowCheckedFlag}),onClick:e=>Q(0,c)},[h(S,null,{left:p((()=>[l(Y)&&!l(K)?(u(),m(a,{key:0,square:"",type:"primary",text:"开启多选",class:"swiperButton",onClick:Z})):d("v-if",!0),l(Y)&&l(K)?(u(),m(a,{key:1,square:"",type:"primary",text:"取消多选",class:"swiperButton",onClick:ee})):d("v-if",!0)])),right:p((()=>[l(te)?(u(),m(a,{key:0,square:"",type:"danger",text:"删除",class:"swiperButton",onClick:e=>function(e){M.data.splice(e,1)}(c)},null,8,["onClick"])):d("v-if",!0),d(' <van-button square type="primary" text="收藏" class="swiperButton" /> ')])),default:p((()=>[C("div",E,[e.showLeft?(u(),r("div",_,[l(K)?(u(),m(n,{key:1,modelValue:e.data[c].rowCheckedFlag,"onUpdate:modelValue":t=>e.data[c].rowCheckedFlag=t,onClick:e=>Q(0,c)},null,8,["modelValue","onUpdate:modelValue","onClick"])):w(t.$slots,"leftArea",{key:0},(()=>[C("img",{class:"leftIcon",src:le(e.leftIconUrl),onClick:e=>t.$emit("leftIconClick",o),onMousedown:e=>q(o),onMouseup:e=>V(),onTouchstart:e=>q(o),onTouchend:e=>V()},null,40,b)]))])):d("v-if",!0),C("div",{class:"mainContent",onClick:e=>t.$emit("mainClick",o)},[(u(!0),r(s,null,g(X.value,((t,l)=>(u(),m(y,null,{default:p((()=>[h(i,{class:"singleRow colDesc",style:k("color:"+t.HEAD_TEXTCOLOR),span:"6"},{default:p((()=>[T(f(t.COL_CAPTION)+":",1)])),_:2},1032,["style"]),h(i,{class:"singleRow colData",style:k("color:"+t.CELL_TEXTCOLOR),offset:"1",span:"17"},{default:p((()=>[T(f(e.data[c][t.ITEM_CODE]),1)])),_:2},1032,["style"])])),_:2},1024)))),256))],8,R),e.showRight?(u(),r("div",O,[w(t.$slots,"rightArea",{},(()=>[C("img",{class:"rightIcon",src:le(e.rightIconUrl),onClick:e=>t.$emit("rightIconClick",o),onMousedown:e=>P(o),onMouseup:e=>j(),onTouchstart:e=>P(o),onTouchend:e=>j()},null,40,D)]))])):d("v-if",!0)])])),_:2},1024)],10,I)))),256))])),_:3},8,["loading"])):d("v-if",!0),0===X.value.length||0===e.data.length?(u(),m(H,{key:1})):d("v-if",!0)])),_:3},8,["modelValue","disabled"])],64)}}});x.__scopeId="data-v-35c7b3ce",x.__file="packages/ermList/ermList.vue";const H=[x];var M={install:e=>{H.map((t=>e.component(t.name,t)))}};export{M as default};
|
|
1
|
+
import{defineComponent as e,useCssVars as t,unref as a,ref as o,watch as n,nextTick as s,onMounted as l,resolveComponent as i,openBlock as r,createElementBlock as c,Fragment as u,createCommentVNode as m,toDisplayString as d,createVNode as h,withCtx as f,createBlock as p,renderList as g,normalizeClass as E,createElementVNode as N,renderSlot as C,normalizeStyle as v,createTextVNode as I,pushScopeId as A,popScopeId as P}from"vue";import{EI as T,EIManager as M,getCurrentEnvironment as _,getRememberMe as O,setRememberMe as S,setToken as L,setRefreshToken as k,setCurrentUser as w,buildEIInfo as y,setCurrentEnvironment as D,removeToken as b,removeRefreshToken as R,removeCurrentUser as B}from"@baosight/ei";import{defineStore as F}from"pinia";import{JSEncrypt as U}from"jsencrypt";import{Toast as x}from"vant";const H=e=>(A("data-v-35c7b3ce"),e=e(),P(),e),$={key:0,class:"mainTitle"},G=["onClick"],Y={class:"rowContent"},V={key:0,class:"leftArea"},X=["src","onClick","onMousedown","onMouseup","onTouchstart","onTouchend"],K=["onClick"],j={key:1,class:"rightArea"},z=["src","onClick","onMousedown","onMouseup","onTouchstart","onTouchend"],q={key:1,class:"myClass"},W=[H((()=>N("img",{src:"/src/assets/img/nodata.jpg",style:{width:"150px",height:"150px","border-radius":"50%"}},null,-1))),H((()=>N("h4",{style:{color:"darkgray","margin-top":"0px"}},"暂无数据",-1)))];var J=e({__name:"ermList",props:{data:[],maxHeight:{type:String,default:"auto"},formName:{type:String,require:!0},functionId:{type:String,require:!0},showLeft:{type:Boolean,default:!1},showRight:{type:Boolean,default:!1},mainTitle:{type:String,default:!1},leftIconUrl:{type:String,default:"lg.png"},rightIconUrl:{type:String,default:"xiangyou.png"},leftIconSize:{type:String,default:"40px"},rightIconSize:{type:String,default:"40px"},mutiSelect:{type:Boolean,default:!1},pullDisabled:{type:Boolean,default:!1},leftSwiperSelect:{type:Boolean,default:!0},rightSwiperDelete:{type:Boolean,default:!0}},emits:["leftIconClick","mainClick","rightIconClick","leftIconHold","rightIconHold","pullRefresh","pullUpdate"],setup(e,{expose:A,emit:P}){t((t=>({"35c7b3ce-maxHeight":a(S),"35c7b3ce-leftSize":a(L),"35c7b3ce-leftIconSize":e.leftIconSize,"35c7b3ce-rightSize":a(w),"35c7b3ce-rightIconSize":e.rightIconSize,"35c7b3ce-mainSize":a(k)})));const _=e,O=P;A({endLoad:function(){x.value=!1,H.value=!1},selectAll:function(){_.showLeft&&J.value&&_.data.forEach((e=>{e.rowCheckedFlag=!0}))},selectNone:Z,getSelectedRows:function(){if(_.showLeft&&J.value){const e=[];return _.data.forEach((t=>{!0===t.rowCheckedFlag&&e.push(t)})),e}}});var S="auto";_.maxHeight&&(S=_.maxHeight);var L=o("0%"),k=o("100%"),w=o("0%");function y(){_.showLeft&&_.showRight?(L.value="15%",w.value="15%",k.value="70%"):_.showLeft?(L.value="15%",k.value="85%"):_.showRight&&(w.value="15%",k.value="85%"),console.log(L,w,k)}n((()=>[_.showLeft,_.showRight]),(([e,t],[a,o])=>{y()}));const D=o([]);var b=null;function R(e){b=setTimeout((()=>{b=null,O("leftIconHold",e)}),1e3)}function B(e){clearTimeout(b),b=null}function F(e){b=setTimeout((()=>{b=null,O("rightIconHold",e)}),1e3)}function U(e){clearTimeout(b),b=null}const x=o(!1),H=o(!1);var J=o(!1);function Q(e,t){_.showLeft&&J.value&&(_.data[t].rowCheckedFlag=!_.data[t].rowCheckedFlag),console.log(event.target)}function Z(){_.showLeft&&J.value&&_.data.forEach((e=>{e.rowCheckedFlag=!1}))}n((()=>_.mutiSelect),(()=>{J.value=_.mutiSelect}),{immediate:!0}),n((()=>_.mutiSelect),(()=>{_.data.forEach((e=>{e.rowCheckedFlag=!1}))}));var ee=o(!0);function te(){J.value=!0}function ae(){Z(),J.value=!1}n((()=>_.leftSwiperSelect),(()=>{_.leftSwiperSelect?ee.value=!0:ee.value=!1}),{deep:!0,immediate:!0});var oe=o(!0);function ne(e){return new URL(`/src/assets/img/${e}`,import.meta.url).href}return n((()=>_.rightSwiperDelete),(()=>{_.rightSwiperDelete?oe.value=!0:oe.value=!1}),{deep:!0,immediate:!0}),n((()=>D.value),(()=>{s((()=>{!function(){var e=document.getElementsByClassName("colDesc");for(let t=0;t<e.length;t++){const a=e[t];a.innerHTML=a.innerHTML.replaceAll("<br>","<br>")}}()}))}),{deep:!0}),l((()=>{console.log("onMounted",_),y(),async function(){const e=new T.EIInfo;e.addBlock(new T.EiBlock,"").pushData({FORM_NAME:_.formName,FUNCTION_ID:_.functionId},!0),M.callService("","ma01_config_inq",e).then((e=>{console.log("1",e.blocks.Table0.data),D.value=e.blocks.Table0.data,console.log(D),D.value.forEach((e=>{if(""!==e.HEAD_TEXTCOLOR.trim()){var t=e.HEAD_TEXTCOLOR.trim();t="#"+(Number(t)+16777216).toString(16).padStart(6,"0"),e.HEAD_TEXTCOLOR=t}""!==e.CELL_TEXTCOLOR.trim()&&(t=e.CELL_TEXTCOLOR.trim(),t="#"+(Number(t)+16777216).toString(16).padStart(6,"0"),e.CELL_TEXTCOLOR=t)}))}))}()})),(t,o)=>{const n=i("van-button"),s=i("van-checkbox"),l=i("van-col"),A=i("van-row"),P=i("van-swipe-cell"),T=i("van-list"),M=i("van-pull-refresh");return r(),c(u,null,[m(' <div class="rowsList"> '),e.mainTitle&&""!==e.mainTitle?(r(),c("div",$,d(e.mainTitle),1)):m("v-if",!0),h(M,{class:"pullRefresh",modelValue:x.value,"onUpdate:modelValue":o[2]||(o[2]=e=>x.value=e),disabled:e.pullDisabled,onRefresh:o[3]||(o[3]=e=>t.$emit("pullRefresh"))},{default:f((()=>[D.value.length>0&&e.data.length>0?(r(),p(T,{key:0,loading:H.value,"onUpdate:loading":o[0]||(o[0]=e=>H.value=e),style:{"min-height":"200px"},onLoad:o[1]||(o[1]=e=>t.$emit("pullUpdate")),"immediate-check":!1},{default:f((()=>[(r(!0),c(u,null,g(e.data,((o,i)=>(r(),c("div",{class:E({selected:o.rowCheckedFlag}),onClick:e=>Q(0,i)},[h(P,null,{left:f((()=>[a(ee)&&!a(J)?(r(),p(n,{key:0,square:"",type:"primary",text:"开启多选",class:"swiperButton",onClick:te})):m("v-if",!0),a(ee)&&a(J)?(r(),p(n,{key:1,square:"",type:"primary",text:"取消多选",class:"swiperButton",onClick:ae})):m("v-if",!0)])),right:f((()=>[a(oe)?(r(),p(n,{key:0,square:"",type:"danger",text:"删除",class:"swiperButton",onClick:e=>function(e){_.data.splice(e,1)}(i)},null,8,["onClick"])):m("v-if",!0),m(' <van-button square type="primary" text="收藏" class="swiperButton" /> ')])),default:f((()=>[N("div",Y,[e.showLeft?(r(),c("div",V,[a(J)?(r(),p(s,{key:1,modelValue:e.data[i].rowCheckedFlag,"onUpdate:modelValue":t=>e.data[i].rowCheckedFlag=t,onClick:e=>Q(0,i)},null,8,["modelValue","onUpdate:modelValue","onClick"])):C(t.$slots,"leftArea",{key:0},(()=>[N("img",{class:"leftIcon",src:ne(e.leftIconUrl),onClick:e=>t.$emit("leftIconClick",o),onMousedown:e=>R(o),onMouseup:e=>B(),onTouchstart:e=>R(o),onTouchend:e=>B()},null,40,X)]))])):m("v-if",!0),N("div",{class:"mainContent",onClick:e=>t.$emit("mainClick",o)},[(r(!0),c(u,null,g(D.value,((t,a)=>(r(),p(A,null,{default:f((()=>[h(l,{class:"singleRow colDesc",style:v("color:"+t.HEAD_TEXTCOLOR),span:"6"},{default:f((()=>[I(d(t.COL_CAPTION)+":",1)])),_:2},1032,["style"]),h(l,{class:"singleRow colData",style:v("color:"+t.CELL_TEXTCOLOR),offset:"1",span:"17"},{default:f((()=>[I(d(e.data[i][t.ITEM_CODE]),1)])),_:2},1032,["style"])])),_:2},1024)))),256))],8,K),e.showRight?(r(),c("div",j,[C(t.$slots,"rightArea",{},(()=>[N("img",{class:"rightIcon",src:ne(e.rightIconUrl),onClick:e=>t.$emit("rightIconClick",o),onMousedown:e=>F(o),onMouseup:e=>U(),onTouchstart:e=>F(o),onTouchend:e=>U()},null,40,z)]))])):m("v-if",!0)])])),_:2},1024)],10,G)))),256))])),_:3},8,["loading"])):m("v-if",!0),m(' <NoData v-if="itemConfigs.length === 0 || data.length === 0"></NoData> '),0===D.value.length||0===e.data.length?(r(),c("div",q,[...W])):m("v-if",!0)])),_:3},8,["modelValue","disabled"])],64)}}});J.__scopeId="data-v-35c7b3ce",J.__file="packages/ermList/ermList.vue";const Q=((Z=J).install=e=>{const t=Z.name||Z.__name;e.component(t,Z)},Z);var Z;const ee={authButtons:void 0,formInfo:void 0,formParamInfo:void 0,formData:void 0,buttonData:void 0,buttonLoaded:!1,hasAuthority:!1},te=F("form",{state:()=>ee,actions:{async checkAuth(e){return new Promise((async(t,a)=>{e.formname.toLowerCase();const o=new T.EIInfo;o.addBlock(new T.EiBlock,"Table1").pushData(e,!0),M.callEPService("epescheckdll",o).then((e=>{const{status:a,msg:o}=e;let n=!1;if(0!==a){const e=new Error(`${o}`);throw e.status=100401,e}{const a=e.blocks.AUTH_INFO,o=e.blocks.BUTTON_INFO,s=e.blocks.FORMPARA_INFO,l=e.blocks.FORMDLL_INFO.data,i=l.length?l[0]:void 0;if(i){const e={formName:i.NAME,formCaption:i.DESCRIPTION,formPartition:i.ABBREV,appName:i.APPNAME,formPath:i.DLLPATH,dllName:i.DLLNAME,formCallMode:i.FORM_CALL_MODE};let t=o.data.map((e=>({name:e.NAME,desc:e.DESCRIPTION,opType:e.OPTYPE})));t=[...new Map(t.map((e=>[e.name,e]))).values()];const[{DLLMARK:l}]=a.data;n=Number(l?.toString().trim())>=1;const r=s.data.length&&s.data[0];let c;if(r&&r.FORM_NAME&&""!==r.FORM_NAME.trim()){c={params:{},baseFormName:r.FORM_BASE_NAME};for(let e=1;e<=10;e++){const t=r[`PK${e}_NAME`];null!==t&&""!==t.trim()&&(c.params[r[`PK${e}_NAME`]+""]=r[`PK${e}`])}}this.$patch((a=>{a.formInfo=e,a.authButtons=t,a.hasPermission=n,a.formParamInfo=c,a.buttonLoaded=!0}))}t(n)}})).catch((e=>{a(e)}))}))},checkDll:async e=>new Promise(((t,a)=>{let o="";o=e.query?.formName?e.query?.formName:e.path.substring(e.path.lastIndexOf("/")+1);const n={formname:o&&o.toString().toUpperCase()||"",appname:_().appName},s=new T.EIInfo;s.addBlock(new T.EiBlock,"Table1").pushData(n,!0),M.callEPService("epescheckdll",s).then((e=>{const{status:o,msg:n}=e;0===o?t(e):a(`调用校验权限服务出现错误,${n}`)})).catch((e=>a(e)))}))}}),ae=process.env.VUE_LOGIN_CONFIG,oe=(process.env.VITE_APP_TITLE,process.env.VITE_APP_COMPANY_CODE),ne=process.env.VITE_APP_APPLICATION_NAME;class se{static apps=[];static companies=[];static currentEnvironment=_()||{skinName:"",culture:"",companyCode:"",companyName:"",appName:""};static loginStatus="";static formState={authButtons:void 0,formInfo:void 0,formParamInfo:void 0,formData:void 0,buttonData:void 0,buttonLoaded:!1,hasAuthority:!1};static setLoginStatus(e){this.loginStatus=e,localStorage.setItem("login_status",e)}static getCurLoginStatus(){return this.loginStatus=O()?localStorage.getItem("login_status"):this.loginStatus,this.loginStatus}static changeLoginStatus(e){this.loginStatus=e,localStorage.setItem("login_status",e)}static LOGIN(e){const t=ae.ENABLE_ENCRYPTED?"EX/encryptLogin":"EX/Login";if(e={...e,RememberMeTime:24*(e.RememberMeTime||1)},ae.ENABLE_ENCRYPTED){const t=new U({});t.setPublicKey(ae.PUBLIC_KEY);const a=t.encrypt(e.Password),o=t.encrypt(e.UserName);e.UserName=o,e.Password=a}return M.handlePost(t,e).then((t=>{let a,o,n=!0,s=!1;const l=t.headers,i=l.signature,r=l.refresh_token,c=t.data,{status:u,msg:m}=c;if(0===u||20003===u){const e=c.getBlock("UserInfo");e||x({message:"获取用户信息失败",duration:1e3});const t=e.data.length?e.data[0]:{};o={id:t.ID,userId:t.ENAME,userName:t.CNAME,deptId:t.DEPTID,deptEName:t.DEPT_ENAME,deptCName:t.DEPT_CNAME},n=!1,s=20003===u}return a={code:u,token:i,refreshToken:r,userInfo:o,msg:m,isError:n,pwdOut:s},e.RememberMe&&S(!0),i&&(this.setLoginStatus("LOGIN"),L(i)),r&&k(r),a})).catch((e=>Promise.reject(e)))}static GET_USER(e){return M.handlePost("EX/api/GetUserInfo",e).then((e=>{let t;const a=e.data,{status:o,msg:n}=a;if(0===o){const e=a.getBlock("UserInfo");e||x({message:"获取用户信息失败",duration:1e3});const o=e.data.length?e.data[0]:{};return t={id:o.ID,userId:o.ENAME,userName:o.CNAME,deptId:o.DEPTID,deptEName:o.DEPT_ENAME,deptCName:o.DEPT_CNAME},w(t),!0}return x({message:`${n}`,duration:1e3}),!1})).catch((e=>Promise.reject(e)))}static GET_MENUS(e){const t=y(e);return M.callEPService("epesloadinit_vue",t).then((e=>{let t=[];try{const{msg:a,status:o}=e;return 0===o?(t=e.blocks.MENUTREE.data,t):(x({message:`调用菜单服务失败,错误信息:${a}.`,duration:1e3}),t)}catch(e){return x({message:`调用菜单服务失败,错误信息:${e}.`,duration:1e3}),e}}))}static GET_COMPANIES(){return M.handleGet("EX/GetCompanies").then((e=>{const t=e.blocks.COMPANYINFO.data;return this.companies=t,t})).catch((e=>Promise.reject(e)))}static GET_APPS(){return M.handleGet("EX/GetApps").then((e=>{const t=e.blocks.APPINFO.data;return this.apps=t,t})).catch((e=>Promise.reject(e)))}static INITAPP_CONFIG(){let e={COMPANYCODE:"",COMPANYNAME:""},t="";Promise.all([this.GET_COMPANIES(),this.GET_APPS()]).then((([a,o])=>{if(a.length){const t=this.companies;let a=t.length>0?t[0]:{COMPANYID:"",COMPANYCODE:"",COMPANYNAME:""};if(oe){const e=t.filter((e=>e.COMPANYCODE===oe));a=e.length?e[0]:t[0]}e={...a}}if(o.length){const e=this.apps;let a=e.length>0?e[0].ENAME:"";if(ne){const t=e.filter((e=>e.ENAME===ne));a=t.length>0?t[0].ENAME:e.length>0?e[0].ENAME:""}t=a}if(t&&e){let a=_();a={...a,culture:"zh_Hans",companyCode:e.COMPANYCODE,companyName:e.COMPANYNAME,appName:t,skinName:"default"},S(!0),D(a,!0),this.currentEnvironment=a}})).catch((e=>{const{message:t,status:a}=e;t&&x({message:`获取账套或子系统失败,错误信息:${t}.`,duration:1e3})}))}static LOGOUT(){return new Promise(((e,t)=>{this.changeLoginStatus("LOGOUT"),b(),R(),B(),e(!0)}))}static exchangeSignature(e){return M.handlePost("/proxyEx/exchangeSignature_BW",e).then((e=>{const t=e.data,{flag:a,signature:o}=t;if(0!==a)return Promise.reject({message:"宝武交换token出错啦"});S(!0),L(o)})).catch((e=>Promise.reject(e)))}static CHECK_AUTH(e){return new Promise((async(t,a)=>{e.formname.toLowerCase();const o=new T.EIInfo;o.addBlock(new T.EiBlock,"Table1").pushData(e,!0),M.callEPService("epescheckdll",o).then((e=>{const{status:a,msg:o}=e;let n=!1;if(0!==a){const e=new Error(`${o}`);throw e.status=100401,e}{const a=e.blocks.AUTH_INFO,o=e.blocks.BUTTON_INFO,s=e.blocks.FORMPARA_INFO,l=e.blocks.FORMDLL_INFO.data,i=l.length?l[0]:void 0;if(i){const e={formName:i.NAME,formCaption:i.DESCRIPTION,formPartition:i.ABBREV,appName:i.APPNAME,formPath:i.DLLPATH,dllName:i.DLLNAME,formCallMode:i.FORM_CALL_MODE};let t=o.data.map((e=>({name:e.NAME,desc:e.DESCRIPTION,opType:e.OPTYPE})));t=[...new Map(t.map((e=>[e.name,e]))).values()];const[{DLLMARK:l}]=a.data;n=Number(l?.toString().trim())>=1;const r=s.data.length&&s.data[0];let c;if(r&&r.FORM_NAME&&""!==r.FORM_NAME.trim()){c={params:{},baseFormName:r.FORM_BASE_NAME};for(let e=1;e<=10;e++){const t=r[`PK${e}_NAME`];null!==t&&""!==t.trim()&&(c.params[r[`PK${e}_NAME`]+""]=r[`PK${e}`])}}this.formState.formInfo=e,this.formState.authButtons=t,this.formState.hasAuthority=n,this.formState.formParamInfo=c,this.formState.buttonLoaded=!0}t(this.formState)}})).catch((e=>{a(e)}))}))}static LOGIN_CHECK(e){const t=y(e);return M.handlePost("/MASTER/api/CallService/epeslogincheck",t).then((e=>{const t=e.data;console.log(t);const{status:a,sys:o}=t;return console.log(a),0===a?Promise.resolve(t):Promise.reject(o)})).catch((e=>Promise.reject(e)))}}const le=[Q];var ie={install:e=>{le.map((t=>e.component(t.name,t)))}};export{se as EFM,ie as default,te as useFormStore};
|
package/package.json
CHANGED
|
@@ -1,70 +1,74 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@baosight/erm",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "Baosight
|
|
5
|
-
"module": "lib/index.esm.js",
|
|
6
|
-
"typings": "lib/index.d.ts",
|
|
7
|
-
"keywords": [],
|
|
8
|
-
"author": "",
|
|
9
|
-
"license": "MIT",
|
|
10
|
-
"publishConfig": {
|
|
11
|
-
"access": "public"
|
|
12
|
-
},
|
|
13
|
-
"scripts": {
|
|
14
|
-
"serve": "vue-cli-service serve",
|
|
15
|
-
"build": "npm run build:clean && npm run build:lib && npm run build:esm-bundle && rimraf lib/demo.html && rimraf lib/*.js.map && rimraf lib/index.common.js && rimraf lib/index.umd.js && rimraf lib/index.umd.min.js",
|
|
16
|
-
"build:clean": "rimraf lib",
|
|
17
|
-
"build:lib": "vue-cli-service build --target lib --name index --dest lib packages/index.ts",
|
|
18
|
-
"build:esm-bundle": "rollup --config rollup.config.js
|
|
19
|
-
"upload": "npm publish --access=public",
|
|
20
|
-
"deploy": "bash build/baosight.efm.sh",
|
|
21
|
-
"clean": "rimraf package-lock.json && rimraf node_modules",
|
|
22
|
-
"link:lib": "yarn build && yalc publish -push",
|
|
23
|
-
"commit": "cz",
|
|
24
|
-
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s"
|
|
25
|
-
},
|
|
26
|
-
"dependencies": {
|
|
27
|
-
"@baosight/ei": "^0.1.58",
|
|
28
|
-
"@vant/area-data": "^1.3.1",
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"jquery": "3.6.0",
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"vue": "3.2.
|
|
37
|
-
"vue-router": "4.
|
|
38
|
-
},
|
|
39
|
-
"devDependencies": {
|
|
40
|
-
"@rollup/plugin-commonjs": "^22.0.0",
|
|
41
|
-
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
42
|
-
"@rollup/plugin-url": "^7.0.0",
|
|
43
|
-
"@types/jquery": "^3.5.14",
|
|
44
|
-
"@types/lodash": "^4.14.197",
|
|
45
|
-
"@vue/cli-plugin-babel": "^5.0.3",
|
|
46
|
-
"@vue/cli-plugin-typescript": "^5.0.3",
|
|
47
|
-
"@vue/cli-service": "^5.0.8",
|
|
48
|
-
"@vue/compiler-sfc": "^3.0.0",
|
|
49
|
-
"cz-conventional-changelog": "^3.3.0",
|
|
50
|
-
"rollup": "^
|
|
51
|
-
"rollup-plugin-copy": "^3.4.0",
|
|
52
|
-
"rollup-plugin-postcss": "^4.0.2",
|
|
53
|
-
"rollup-plugin-scss": "^
|
|
54
|
-
"rollup-plugin-terser": "^7.0.2",
|
|
55
|
-
"rollup-plugin-typescript2": "^0.
|
|
56
|
-
"rollup-plugin-uglify": "^6.0.4",
|
|
57
|
-
"rollup-plugin-vue": "^6.0.0",
|
|
58
|
-
"sass": "^1.26.5",
|
|
59
|
-
"sass-loader": "^8.0.2",
|
|
60
|
-
"typescript": "4.6.2"
|
|
61
|
-
},
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@baosight/erm",
|
|
3
|
+
"version": "0.0.7",
|
|
4
|
+
"description": "Baosight Efm Framework",
|
|
5
|
+
"module": "lib/index.esm.js",
|
|
6
|
+
"typings": "lib/index.d.ts",
|
|
7
|
+
"keywords": [],
|
|
8
|
+
"author": "",
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"access": "public"
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"serve": "vue-cli-service serve",
|
|
15
|
+
"build": "npm run build:clean && npm run build:lib && npm run build:esm-bundle && rimraf lib/demo.html && rimraf lib/*.js.map && rimraf lib/index.common.js && rimraf lib/index.umd.js && rimraf lib/index.umd.min.js",
|
|
16
|
+
"build:clean": "rimraf lib",
|
|
17
|
+
"build:lib": "vue-cli-service build --target lib --name index --dest lib packages/index.ts",
|
|
18
|
+
"build:esm-bundle": "rollup --config rollup.config.js",
|
|
19
|
+
"upload": "npm publish --access=public",
|
|
20
|
+
"deploy": "bash build/baosight.efm.sh",
|
|
21
|
+
"clean": "rimraf package-lock.json && rimraf node_modules",
|
|
22
|
+
"link:lib": "yarn build && yalc publish -push",
|
|
23
|
+
"commit": "cz",
|
|
24
|
+
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@baosight/ei": "^0.1.58",
|
|
28
|
+
"@vant/area-data": "^1.3.1",
|
|
29
|
+
"vant": "^3.6.11",
|
|
30
|
+
"jsencrypt": "^3.3.2",
|
|
31
|
+
"jquery": "3.6.0",
|
|
32
|
+
"axios": "^0.26.1",
|
|
33
|
+
"core-js": "^3.6.5",
|
|
34
|
+
"lodash": "^4.17.21",
|
|
35
|
+
"pinia": "^2.1.4",
|
|
36
|
+
"vue": "^3.2.27",
|
|
37
|
+
"vue-router": "^4.1.3"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@rollup/plugin-commonjs": "^22.0.0",
|
|
41
|
+
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
42
|
+
"@rollup/plugin-url": "^7.0.0",
|
|
43
|
+
"@types/jquery": "^3.5.14",
|
|
44
|
+
"@types/lodash": "^4.14.197",
|
|
45
|
+
"@vue/cli-plugin-babel": "^5.0.3",
|
|
46
|
+
"@vue/cli-plugin-typescript": "^5.0.3",
|
|
47
|
+
"@vue/cli-service": "^5.0.8",
|
|
48
|
+
"@vue/compiler-sfc": "^3.0.0",
|
|
49
|
+
"cz-conventional-changelog": "^3.3.0",
|
|
50
|
+
"rollup": "^2.70.1",
|
|
51
|
+
"rollup-plugin-copy": "^3.4.0",
|
|
52
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
53
|
+
"rollup-plugin-scss": "^3.0.0",
|
|
54
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
55
|
+
"rollup-plugin-typescript2": "^0.31.2",
|
|
56
|
+
"rollup-plugin-uglify": "^6.0.4",
|
|
57
|
+
"rollup-plugin-vue": "^6.0.0",
|
|
58
|
+
"sass": "^1.26.5",
|
|
59
|
+
"sass-loader": "^8.0.2",
|
|
60
|
+
"typescript": "4.6.2"
|
|
61
|
+
},
|
|
62
|
+
"repository": {
|
|
63
|
+
"type": "git",
|
|
64
|
+
"url": "http://gitlab.iplat4c.com/iplat/efm.git"
|
|
65
|
+
},
|
|
66
|
+
"files": [
|
|
67
|
+
"lib/*"
|
|
68
|
+
],
|
|
69
|
+
"config": {
|
|
70
|
+
"commitizen": {
|
|
71
|
+
"path": "./node_modules/cz-conventional-changelog"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|