@baosight/erm 1.0.27 → 1.0.28
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.esm.css +13 -13
- package/lib/index.esm.js +1 -1
- package/package.json +2 -1
package/lib/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.swiperButton{height:100%}.rowContent{flex-direction:row;width:90%;margin:0 5% 0;padding:10px 0;border-bottom:1px solid hsla(0,0%,80%,.467)}.leftArea
|
|
1
|
+
.swiperButton[data-v-108b5bdd]{height:100%}.rowContent[data-v-108b5bdd]{display:flex;flex-direction:row;justify-content:center;width:90%;margin:0 5% 0;padding:10px 0;border-bottom:1px solid hsla(0,0%,80%,.467)}.leftArea[data-v-108b5bdd]{display:flex;flex-direction:column;justify-content:center;align-items:center;width:15%}.leftIcon[data-v-108b5bdd]{width:35px;height:35px}.rightArea[data-v-108b5bdd]{display:flex;flex-direction:column;justify-content:center;align-items:center;width:15%}.rightIcon[data-v-108b5bdd]{width:35px;height:35px}.mainContent[data-v-108b5bdd]{width:100%;overflow:auto}.mainContent[data-v-108b5bdd],.singleRow[data-v-108b5bdd]{display:flex;flex-direction:column;justify-content:flex-start}.singleRow[data-v-108b5bdd]{padding:5px 0}.colDesc[data-v-108b5bdd]{font-family:阿里巴巴普惠体Medium}.colData[data-v-108b5bdd]{font-family:阿里巴巴普惠体Regular}.mainTitle[data-v-108b5bdd]{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-108b5bdd]{background-color:rgba(228,232,245,.7);border-radius:10px;box-shadow:0 2px 3px #ccc}.myClass[data-v-108b5bdd]{height:200px;width:200px;background-color:red}
|
package/lib/index.esm.css
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
|
-
.swiperButton {
|
|
2
|
+
.swiperButton[data-v-35c7b3ce] {
|
|
3
3
|
height: 100%;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.rowContent {
|
|
6
|
+
.rowContent[data-v-35c7b3ce] {
|
|
7
7
|
display: flex;
|
|
8
8
|
flex-direction: row;
|
|
9
9
|
justify-content: center;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
border-bottom: 1px solid rgba(204, 204, 204, 0.4666666667);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.leftArea {
|
|
16
|
+
.leftArea[data-v-35c7b3ce] {
|
|
17
17
|
display: flex;
|
|
18
18
|
flex-direction: column;
|
|
19
19
|
justify-content: center;
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
width: 15%;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
.leftIcon {
|
|
24
|
+
.leftIcon[data-v-35c7b3ce] {
|
|
25
25
|
width: 35px;
|
|
26
26
|
height: 35px;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
.rightArea {
|
|
29
|
+
.rightArea[data-v-35c7b3ce] {
|
|
30
30
|
display: flex;
|
|
31
31
|
flex-direction: column;
|
|
32
32
|
justify-content: center;
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
width: 15%;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
.rightIcon {
|
|
37
|
+
.rightIcon[data-v-35c7b3ce] {
|
|
38
38
|
width: 35px;
|
|
39
39
|
height: 35px;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
.mainContent {
|
|
42
|
+
.mainContent[data-v-35c7b3ce] {
|
|
43
43
|
width: 100%;
|
|
44
44
|
display: flex;
|
|
45
45
|
flex-direction: column;
|
|
@@ -47,22 +47,22 @@
|
|
|
47
47
|
overflow: auto;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
.singleRow {
|
|
50
|
+
.singleRow[data-v-35c7b3ce] {
|
|
51
51
|
display: flex;
|
|
52
52
|
flex-direction: column;
|
|
53
53
|
justify-content: flex-start;
|
|
54
54
|
padding: 5px 0;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
.colDesc {
|
|
57
|
+
.colDesc[data-v-35c7b3ce] {
|
|
58
58
|
font-family: "阿里巴巴普惠体Medium";
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
.colData {
|
|
61
|
+
.colData[data-v-35c7b3ce] {
|
|
62
62
|
font-family: "阿里巴巴普惠体Regular";
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
.mainTitle {
|
|
65
|
+
.mainTitle[data-v-35c7b3ce] {
|
|
66
66
|
display: flex;
|
|
67
67
|
flex-direction: column;
|
|
68
68
|
justify-content: center;
|
|
@@ -74,13 +74,13 @@
|
|
|
74
74
|
padding-bottom: 10px;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
.selected {
|
|
77
|
+
.selected[data-v-35c7b3ce] {
|
|
78
78
|
background-color: rgba(228, 232, 245, 0.7);
|
|
79
79
|
border-radius: 10px;
|
|
80
80
|
box-shadow: 0px 2px 3px #cccccc;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
.myClass {
|
|
83
|
+
.myClass[data-v-35c7b3ce] {
|
|
84
84
|
height: 200px;
|
|
85
85
|
width: 200px;
|
|
86
86
|
background-color: red;
|
package/lib/index.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as t,watch as l,nextTick as
|
|
1
|
+
import{defineComponent as e,ref as t,watch as l,nextTick as a,onMounted as o,resolveComponent as n,openBlock as i,createElementBlock as c,Fragment as s,createCommentVNode as u,toDisplayString as r,createVNode as d,withCtx as f,createBlock as p,renderList as m,normalizeClass as h,unref as g,createElementVNode as v,renderSlot as C,normalizeStyle as w,createTextVNode as k,pushScopeId as y,popScopeId as T}from"vue";import{EI as L,EIManager as _}from"@baosight/ei";const S=e=>(y("data-v-35c7b3ce"),e=e(),T(),e),E={key:0,class:"mainTitle"},I=["onClick"],R={class:"rowContent"},O={key:0,class:"leftArea"},b=["src","onClick","onMousedown","onMouseup","onTouchstart","onTouchend"],x=["onClick"],D={key:1,class:"rightArea"},M=["src","onClick","onMousedown","onMouseup","onTouchstart","onTouchend"],B={key:1,class:"myClass"},H=[S((()=>v("img",{src:"/src/assets/img/nodata.jpg",style:{width:"150px",height:"150px","border-radius":"50%"}},null,-1))),S((()=>v("h4",{style:{color:"darkgray","margin-top":"0px"}},"暂无数据",-1)))];var A=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:y,emit:T}){const S=e,A=T;y({endLoad:function(){G.value=!1,J.value=!1},selectAll:function(){S.showLeft&&K.value&&S.data.forEach((e=>{e.rowCheckedFlag=!0}))},selectNone:W,getSelectedRows:function(){if(S.showLeft&&K.value){const e=[];return S.data.forEach((t=>{!0===t.rowCheckedFlag&&e.push(t)})),e}}}),S.maxHeight&&S.maxHeight;var U=t("0%"),F=t("100%"),N=t("0%");function X(){S.showLeft&&S.showRight?(U.value="15%",N.value="15%",F.value="70%"):S.showLeft?(U.value="15%",F.value="85%"):S.showRight&&(N.value="15%",F.value="85%"),console.log(U,N,F)}l((()=>[S.showLeft,S.showRight]),(([e,t],[l,a])=>{X()}));const $=t([]);var q=null;function V(e){q=setTimeout((()=>{q=null,A("leftIconHold",e)}),1e3)}function z(e){clearTimeout(q),q=null}function j(e){q=setTimeout((()=>{q=null,A("rightIconHold",e)}),1e3)}function P(e){clearTimeout(q),q=null}const G=t(!1),J=t(!1);var K=t(!1);function Q(e,t){S.showLeft&&K.value&&(S.data[t].rowCheckedFlag=!S.data[t].rowCheckedFlag),console.log(event.target)}function W(){S.showLeft&&K.value&&S.data.forEach((e=>{e.rowCheckedFlag=!1}))}l((()=>S.mutiSelect),(()=>{K.value=S.mutiSelect}),{immediate:!0}),l((()=>S.mutiSelect),(()=>{S.data.forEach((e=>{e.rowCheckedFlag=!1}))}));var Y=t(!0);function Z(){K.value=!0}function ee(){W(),K.value=!1}l((()=>S.leftSwiperSelect),(()=>{S.leftSwiperSelect?Y.value=!0:Y.value=!1}),{deep:!0,immediate:!0});var te=t(!0);function le(e){return new URL(`/src/assets/img/${e}`,import.meta.url).href}return l((()=>S.rightSwiperDelete),(()=>{S.rightSwiperDelete?te.value=!0:te.value=!1}),{deep:!0,immediate:!0}),l((()=>$.value),(()=>{a((()=>{!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}),o((()=>{console.log("onMounted",S),X(),async function(){const e=new L.EIInfo;e.addBlock(new L.EiBlock,"").pushData({FORM_NAME:S.formName,FUNCTION_ID:S.functionId},!0),_.callService("","ma01_config_inq",e).then((e=>{console.log("1",e.blocks.Table0.data),$.value=e.blocks.Table0.data,console.log($),$.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,l)=>{const a=n("van-button"),o=n("van-checkbox"),y=n("van-col"),T=n("van-row"),L=n("van-swipe-cell"),_=n("van-list"),A=n("van-pull-refresh");return i(),c(s,null,[u(' <div class="rowsList"> '),e.mainTitle&&""!==e.mainTitle?(i(),c("div",E,r(e.mainTitle),1)):u("v-if",!0),d(A,{class:"pullRefresh",modelValue:G.value,"onUpdate:modelValue":l[2]||(l[2]=e=>G.value=e),disabled:e.pullDisabled,onRefresh:l[3]||(l[3]=e=>t.$emit("pullRefresh"))},{default:f((()=>[$.value.length>0&&e.data.length>0?(i(),p(_,{key:0,loading:J.value,"onUpdate:loading":l[0]||(l[0]=e=>J.value=e),style:{"min-height":"200px"},onLoad:l[1]||(l[1]=e=>t.$emit("pullUpdate")),"immediate-check":!1},{default:f((()=>[(i(!0),c(s,null,m(e.data,((l,n)=>(i(),c("div",{class:h({selected:l.rowCheckedFlag}),onClick:e=>Q(0,n)},[d(L,null,{left:f((()=>[g(Y)&&!g(K)?(i(),p(a,{key:0,square:"",type:"primary",text:"开启多选",class:"swiperButton",onClick:Z})):u("v-if",!0),g(Y)&&g(K)?(i(),p(a,{key:1,square:"",type:"primary",text:"取消多选",class:"swiperButton",onClick:ee})):u("v-if",!0)])),right:f((()=>[g(te)?(i(),p(a,{key:0,square:"",type:"danger",text:"删除",class:"swiperButton",onClick:e=>function(e){S.data.splice(e,1)}(n)},null,8,["onClick"])):u("v-if",!0),u(' <van-button square type="primary" text="收藏" class="swiperButton" /> ')])),default:f((()=>[v("div",R,[e.showLeft?(i(),c("div",O,[g(K)?(i(),p(o,{key:1,modelValue:e.data[n].rowCheckedFlag,"onUpdate:modelValue":t=>e.data[n].rowCheckedFlag=t,onClick:e=>Q(0,n)},null,8,["modelValue","onUpdate:modelValue","onClick"])):C(t.$slots,"leftArea",{key:0},(()=>[v("img",{class:"leftIcon",src:le(e.leftIconUrl),onClick:e=>t.$emit("leftIconClick",l),onMousedown:e=>V(l),onMouseup:e=>z(),onTouchstart:e=>V(l),onTouchend:e=>z()},null,40,b)]))])):u("v-if",!0),v("div",{class:"mainContent",onClick:e=>t.$emit("mainClick",l)},[(i(!0),c(s,null,m($.value,((t,l)=>(i(),p(T,null,{default:f((()=>[d(y,{class:"singleRow colDesc",style:w("color:"+t.HEAD_TEXTCOLOR),span:"6"},{default:f((()=>[k(r(t.COL_CAPTION)+":",1)])),_:2},1032,["style"]),d(y,{class:"singleRow colData",style:w("color:"+t.CELL_TEXTCOLOR),offset:"1",span:"17"},{default:f((()=>[k(r(e.data[n][t.ITEM_CODE]),1)])),_:2},1032,["style"])])),_:2},1024)))),256))],8,x),e.showRight?(i(),c("div",D,[C(t.$slots,"rightArea",{},(()=>[v("img",{class:"rightIcon",src:le(e.rightIconUrl),onClick:e=>t.$emit("rightIconClick",l),onMousedown:e=>j(l),onMouseup:e=>P(),onTouchstart:e=>j(l),onTouchend:e=>P()},null,40,M)]))])):u("v-if",!0)])])),_:2},1024)],10,I)))),256))])),_:3},8,["loading"])):u("v-if",!0),0===$.value.length||0===e.data.length?(i(),c("div",B,[...H])):u("v-if",!0)])),_:3},8,["modelValue","disabled"])],64)}}});A.__scopeId="data-v-35c7b3ce",A.__file="packages/ermList/ermList.vue";const U=((F=A).install=e=>{const t=F.name||F.__name;e.component(t,F)},F);var F;const N=[U];var X={install:e=>{N.map((t=>{const l=t.name||t.__name;return e.component(l,t)}))}};export{X as default,U as ermList};
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baosight/erm",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.28",
|
|
4
4
|
"description": "Baosight Efm Framework",
|
|
5
5
|
"module": "lib/index.esm.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
7
|
+
"style": "lib/index.css",
|
|
7
8
|
"keywords": [],
|
|
8
9
|
"author": "",
|
|
9
10
|
"license": "MIT",
|