@baosight/erm 0.0.5 → 0.0.6
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 +89 -0
- package/lib/index.esm.js +1 -1
- package/package.json +5 -5
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}
|
|
@@ -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
|
|
1
|
+
import{defineComponent as e,useCssVars as t,unref as l,ref as a,watch as o,nextTick as n,onMounted as i,resolveComponent as c,openBlock as s,createElementBlock as u,Fragment as r,createCommentVNode as d,toDisplayString as f,createVNode as h,withCtx as g,createBlock as p,renderList as m,normalizeClass as v,createElementVNode as C,renderSlot as w,normalizeStyle as k,createTextVNode as y,pushScopeId as T,popScopeId as S}from"vue";import{EI as L,EIManager as I}from"@baosight/ei";const E=e=>(T("data-v-35c7b3ce"),e=e(),S(),e),_={key:0,class:"mainTitle"},b=["onClick"],R={class:"rowContent"},O={key:0,class:"leftArea"},x=["src","onClick","onMousedown","onMouseup","onTouchstart","onTouchend"],D=["onClick"],H={key:1,class:"rightArea"},M=["src","onClick","onMousedown","onMouseup","onTouchstart","onTouchend"],B={key:1,class:"myClass"},A=[E((()=>C("img",{src:"/src/assets/img/nodata.jpg",style:{width:"150px",height:"150px","border-radius":"50%"}},null,-1))),E((()=>C("h4",{style:{color:"darkgray","margin-top":"0px"}},"暂无数据",-1)))];var N=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:T,emit:S}){t((t=>({"35c7b3ce-maxHeight":l(U),"35c7b3ce-leftSize":l(F),"35c7b3ce-leftIconSize":e.leftIconSize,"35c7b3ce-rightSize":l(X),"35c7b3ce-rightIconSize":e.rightIconSize,"35c7b3ce-mainSize":l(z)})));const E=e,N=S;T({endLoad:function(){K.value=!1,Q.value=!1},selectAll:function(){E.showLeft&&W.value&&E.data.forEach((e=>{e.rowCheckedFlag=!0}))},selectNone:Z,getSelectedRows:function(){if(E.showLeft&&W.value){const e=[];return E.data.forEach((t=>{!0===t.rowCheckedFlag&&e.push(t)})),e}}});var U="auto";E.maxHeight&&(U=E.maxHeight);var F=a("0%"),z=a("100%"),X=a("0%");function $(){E.showLeft&&E.showRight?(F.value="15%",X.value="15%",z.value="70%"):E.showLeft?(F.value="15%",z.value="85%"):E.showRight&&(X.value="15%",z.value="85%"),console.log(F,X,z)}o((()=>[E.showLeft,E.showRight]),(([e,t],[l,a])=>{$()}));const q=a([]);var V=null;function j(e){V=setTimeout((()=>{V=null,N("leftIconHold",e)}),1e3)}function P(e){clearTimeout(V),V=null}function G(e){V=setTimeout((()=>{V=null,N("rightIconHold",e)}),1e3)}function J(e){clearTimeout(V),V=null}const K=a(!1),Q=a(!1);var W=a(!1);function Y(e,t){E.showLeft&&W.value&&(E.data[t].rowCheckedFlag=!E.data[t].rowCheckedFlag),console.log(event.target)}function Z(){E.showLeft&&W.value&&E.data.forEach((e=>{e.rowCheckedFlag=!1}))}o((()=>E.mutiSelect),(()=>{W.value=E.mutiSelect}),{immediate:!0}),o((()=>E.mutiSelect),(()=>{E.data.forEach((e=>{e.rowCheckedFlag=!1}))}));var ee=a(!0);function te(){W.value=!0}function le(){Z(),W.value=!1}o((()=>E.leftSwiperSelect),(()=>{E.leftSwiperSelect?ee.value=!0:ee.value=!1}),{deep:!0,immediate:!0});var ae=a(!0);function oe(e){return new URL(`/src/assets/img/${e}`,import.meta.url).href}return o((()=>E.rightSwiperDelete),(()=>{E.rightSwiperDelete?ae.value=!0:ae.value=!1}),{deep:!0,immediate:!0}),o((()=>q.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",E),$(),async function(){const e=new L.EIInfo;e.addBlock(new L.EiBlock,"").pushData({FORM_NAME:E.formName,FUNCTION_ID:E.functionId},!0),I.callService("","ma01_config_inq",e).then((e=>{console.log("1",e.blocks.Table0.data),q.value=e.blocks.Table0.data,console.log(q),q.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,a)=>{const o=c("van-button"),n=c("van-checkbox"),i=c("van-col"),T=c("van-row"),S=c("van-swipe-cell"),L=c("van-list"),I=c("van-pull-refresh");return s(),u(r,null,[d(' <div class="rowsList"> '),e.mainTitle&&""!==e.mainTitle?(s(),u("div",_,f(e.mainTitle),1)):d("v-if",!0),h(I,{class:"pullRefresh",modelValue:K.value,"onUpdate:modelValue":a[2]||(a[2]=e=>K.value=e),disabled:e.pullDisabled,onRefresh:a[3]||(a[3]=e=>t.$emit("pullRefresh"))},{default:g((()=>[q.value.length>0&&e.data.length>0?(s(),p(L,{key:0,loading:Q.value,"onUpdate:loading":a[0]||(a[0]=e=>Q.value=e),style:{"min-height":"200px"},onLoad:a[1]||(a[1]=e=>t.$emit("pullUpdate")),"immediate-check":!1},{default:g((()=>[(s(!0),u(r,null,m(e.data,((a,c)=>(s(),u("div",{class:v({selected:a.rowCheckedFlag}),onClick:e=>Y(0,c)},[h(S,null,{left:g((()=>[l(ee)&&!l(W)?(s(),p(o,{key:0,square:"",type:"primary",text:"开启多选",class:"swiperButton",onClick:te})):d("v-if",!0),l(ee)&&l(W)?(s(),p(o,{key:1,square:"",type:"primary",text:"取消多选",class:"swiperButton",onClick:le})):d("v-if",!0)])),right:g((()=>[l(ae)?(s(),p(o,{key:0,square:"",type:"danger",text:"删除",class:"swiperButton",onClick:e=>function(e){E.data.splice(e,1)}(c)},null,8,["onClick"])):d("v-if",!0),d(' <van-button square type="primary" text="收藏" class="swiperButton" /> ')])),default:g((()=>[C("div",R,[e.showLeft?(s(),u("div",O,[l(W)?(s(),p(n,{key:1,modelValue:e.data[c].rowCheckedFlag,"onUpdate:modelValue":t=>e.data[c].rowCheckedFlag=t,onClick:e=>Y(0,c)},null,8,["modelValue","onUpdate:modelValue","onClick"])):w(t.$slots,"leftArea",{key:0},(()=>[C("img",{class:"leftIcon",src:oe(e.leftIconUrl),onClick:e=>t.$emit("leftIconClick",a),onMousedown:e=>j(a),onMouseup:e=>P(),onTouchstart:e=>j(a),onTouchend:e=>P()},null,40,x)]))])):d("v-if",!0),C("div",{class:"mainContent",onClick:e=>t.$emit("mainClick",a)},[(s(!0),u(r,null,m(q.value,((t,l)=>(s(),p(T,null,{default:g((()=>[h(i,{class:"singleRow colDesc",style:k("color:"+t.HEAD_TEXTCOLOR),span:"6"},{default:g((()=>[y(f(t.COL_CAPTION)+":",1)])),_:2},1032,["style"]),h(i,{class:"singleRow colData",style:k("color:"+t.CELL_TEXTCOLOR),offset:"1",span:"17"},{default:g((()=>[y(f(e.data[c][t.ITEM_CODE]),1)])),_:2},1032,["style"])])),_:2},1024)))),256))],8,D),e.showRight?(s(),u("div",H,[w(t.$slots,"rightArea",{},(()=>[C("img",{class:"rightIcon",src:oe(e.rightIconUrl),onClick:e=>t.$emit("rightIconClick",a),onMousedown:e=>G(a),onMouseup:e=>J(),onTouchstart:e=>G(a),onTouchend:e=>J()},null,40,M)]))])):d("v-if",!0)])])),_:2},1024)],10,b)))),256))])),_:3},8,["loading"])):d("v-if",!0),d(' <NoData v-if="itemConfigs.length === 0 || data.length === 0"></NoData> '),0===q.value.length||0===e.data.length?(s(),u("div",B,[...A])):d("v-if",!0)])),_:3},8,["modelValue","disabled"])],64)}}});N.__scopeId="data-v-35c7b3ce",N.__file="packages/ermList/ermList.vue";const U=[N];var F={install:e=>{U.map((t=>e.component(t.name,t)))}};export{F as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baosight/erm",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "Baosight Erm Framework",
|
|
5
5
|
"module": "lib/index.esm.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
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
16
|
"build:clean": "rimraf lib",
|
|
17
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
|
|
18
|
+
"build:esm-bundle": "rollup --config rollup.config.js",
|
|
19
19
|
"upload": "npm publish --access=public",
|
|
20
20
|
"deploy": "bash build/baosight.efm.sh",
|
|
21
21
|
"clean": "rimraf package-lock.json && rimraf node_modules",
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
"@vue/cli-service": "^5.0.8",
|
|
48
48
|
"@vue/compiler-sfc": "^3.0.0",
|
|
49
49
|
"cz-conventional-changelog": "^3.3.0",
|
|
50
|
-
"rollup": "^
|
|
50
|
+
"rollup": "^2.70.1",
|
|
51
51
|
"rollup-plugin-copy": "^3.4.0",
|
|
52
52
|
"rollup-plugin-postcss": "^4.0.2",
|
|
53
|
-
"rollup-plugin-scss": "^
|
|
53
|
+
"rollup-plugin-scss": "^3.0.0",
|
|
54
54
|
"rollup-plugin-terser": "^7.0.2",
|
|
55
|
-
"rollup-plugin-typescript2": "^0.
|
|
55
|
+
"rollup-plugin-typescript2": "^0.31.2",
|
|
56
56
|
"rollup-plugin-uglify": "^6.0.4",
|
|
57
57
|
"rollup-plugin-vue": "^6.0.0",
|
|
58
58
|
"sass": "^1.26.5",
|