=e&&t.s<=e+n}},_findTargetItemIndex:function(n){var o,a,t=this.getContentGroup();return this._showController&&t.eachChild(function(t,e){var i=t.__legendDataIndex;null==a&&null!=i&&(a=e),i===n&&(o=e)}),null!=o?o:a}});gf("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(i)})});WA.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}});var zC=is,RC=kl,BC=Ol,VC=A,GC=E,FC="horizontal",WC="vertical",HC=["line","bar","candlestick","scatter"],ZC=UA.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,i,n){ZC.superApply(this,"render",arguments),Tc(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),!1!==this.dataZoomModel.get("show")?(n&&"dataZoom"===n.type&&n.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){ZC.superApply(this,"remove",arguments),Ac(this,"_dispatchZoomAction")},dispose:function(){ZC.superApply(this,"dispose",arguments),Ac(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new Ii;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,i=this._findCoordRect(),n={width:e.getWidth(),height:e.getHeight()},o=this._orient===FC?{right:n.width-i.x-i.width,top:n.height-30-7,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=_u(t.option);E(["right","top","width","height"],function(t){"ph"===a[t]&&(a[t]=o[t])});var r=vu(a,n,t.padding);this._location={x:r.x,y:r.y},this._size=[r.width,r.height],this._orient===WC&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),o=n&&n.get("inverse"),a=this._displayables.barGroup,r=(this._dataShadowInfo||{}).otherAxisInverse;a.attr(i!==FC||o?i===FC&&o?{scale:r?[-1,1]:[-1,-1]}:i!==WC||o?{scale:r?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:r?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:r?[1,1]:[1,-1]});var s=t.getBoundingRect([a]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size,i=this._displayables.barGroup;i.add(new zC({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),i.add(new zC({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:A(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(t){var e=this._size,i=t.series,n=i.getRawData(),o=i.getShadowDim?i.getShadowDim():t.otherDim;if(null!=o){var a=n.getDataExtent(o),r=.3*(a[1]-a[0]);a=[a[0]-r,a[1]+r];var s,l=[0,e[1]],u=[0,e[0]],h=[[e[0],0],[0,0]],c=[],d=u[1]/(n.count()-1),f=0,p=Math.round(n.count()/e[0]);n.each([o],function(t,e){if(0e[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,o=(n[0]+n[1])/2,a=this._updateInterval("all",i[0]-o);this._updateView(),a&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var i;if(GC(this.getTargetCoordInfo(),function(t){if(!i&&t.length){var e=t[0].model.coordinateSystem;i=e.getRect&&e.getRect()}}),!i){var t=this.api.getWidth(),e=this.api.getHeight();i={x:.2*t,y:.2*e,width:.6*t,height:.6*e}}return i}});function UC(t){return"vertical"===t?"ns-resize":"ew-resize"}WA.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var XC="\0_ec_dataZoom_roams";function YC(t,n){var e=qC(t),o=n.dataZoomId,a=n.coordId;E(e,function(t,e){var i=t.dataZoomInfos;i[o]&&_(n.allCoordIds,a)<0&&(delete i[o],t.count--)}),KC(e);var i=e[a];i||((i=e[a]={coordId:a,dataZoomInfos:{},count:0}).controller=function(t,r){var e=new Ly(t.getZr());return E(["pan","zoom","scrollMove"],function(a){e.on(a,function(n){var o=[];E(r.dataZoomInfos,function(t){if(n.isAvailableBehavior(t.dataZoomModel.option)){var e=(t.getRange||{})[a],i=e&&e(r.controller,n);!t.dataZoomModel.get("disabled",!0)&&i&&o.push({dataZoomId:t.dataZoomId,start:i[0],end:i[1]})}}),o.length&&r.dispatchAction(o)})}),e}(t,i),i.dispatchAction=T($C,t)),i.dataZoomInfos[o]||i.count++,i.dataZoomInfos[o]=n;var r=function(t){var n,o={type_true:2,type_move:1,type_false:0,type_undefined:-1},a=!0;return E(t,function(t){var e=t.dataZoomModel,i=!e.get("disabled",!0)&&(!e.get("zoomLock",!0)||"move");o["type_"+n]"],k(t)&&(t=t.slice(),n=!0),o=e?t:n?[u(t[0]),u(t[1])]:u(t),z(l)?l.replace("{value}",n?o[0]:o).replace("{value2}",n?o[1]:o):O(l)?n?l(t[0],t[1]):l(t):n?t[0]===s[0]?i[0]+" "+o[1]:t[1]===s[1]?i[1]+" "+o[0]:o[0]+" - "+o[1]:o;function u(t){return t===s[0]?"min":t===s[1]?"max":(+t).toFixed(Math.min(r,20))}},resetExtent:function(){var t=this.option,e=pL([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,i=t.dimensions;if(null!=e||i.length){if(null!=e)return t.getDimension(e);for(var n=t.dimensions,o=n.length-1;0<=o;o--){var a=n[o];if(!t.getDimensionInfo(a).isCalculationCoord)return a}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var t=this.ecModel,e=this.option,i={inRange:e.inRange,outOfRange:e.outOfRange},n=e.target||(e.target={}),o=e.controller||(e.controller={});m(n,i),m(o,i);var u=this.isCategory();function a(n){dL(e.color)&&!n.inRange&&(n.inRange={color:e.color.slice().reverse()}),n.inRange=n.inRange||{color:t.get("gradientColor")},fL(this.stateList,function(t){var e=n[t];if(z(e)){var i=lL(e,"active",u);i?(n[t]={},n[t][e]=i):delete n[t]}},this)}a.call(this,n),a.call(this,o),function(t,e,i){var n=t[e],o=t[i];n&&!o&&(o=t[i]={},fL(n,function(t,e){if(a_.isValidType(e)){var i=lL(e,"inactive",u);null!=i&&(o[e]=i,"color"!==e||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}}))}.call(this,n,"inRange","outOfRange"),function(a){var r=(a.inRange||{}).symbol||(a.outOfRange||{}).symbol,s=(a.inRange||{}).symbolSize||(a.outOfRange||{}).symbolSize,l=this.get("inactiveColor");fL(this.stateList,function(t){var e=this.itemSize,i=a[t];null==(i=i||(a[t]={color:u?l:[l]})).symbol&&(i.symbol=r&&D(r)||(u?"roundRect":["roundRect"])),null==i.symbolSize&&(i.symbolSize=s&&D(s)||(u?e[0]:[e[0],e[0]])),i.symbol=hL(i.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var n=i.symbolSize;if(null!=n){var o=-1/0;cL(n,function(t){oe[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){mL.prototype.completeVisualOption.apply(this,arguments),E(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=Ol((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=i[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(n){var o=[];return this.eachTargetSeries(function(t){var i=[],e=t.getData();e.each(this.getDataDimension(e),function(t,e){n[0]<=t&&t<=n[1]&&i.push(e)},this),o.push({seriesId:t.id,dataIndex:i})},this),o},getVisualMeta:function(i){var t=xL(this,"outOfRange",this.getExtent()),e=xL(this,"inRange",this.option.range.slice()),n=[];function o(t,e){n.push({value:t,color:i(t,e)})}for(var a=0,r=0,s=e.length,l=t.length;rt[1])break;i.push({color:this.getControllerVisual(a,"color",e),offset:o/100})}return i.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),i},_createBarPoints:function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new Ii("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||i?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(n,o){if(this._useHandle){var a=this._shapes,r=this.visualMapModel,s=a.handleThumbs,l=a.handleLabels;ML([0,1],function(t){var e=s[t];e.setStyle("fill",o.handlesColor[t]),e.position[1]=n[t];var i=hl(a.handleLabelPoints[t],ul(e,this.group));l[t].setStyle({x:i[0],y:i[1],text:r.formatValueText(this._dataInterval[t]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===t?"bottom":"top":"left",a.barGroup)})},this)}},_showIndicator:function(t,e,i,n){var o=this.visualMapModel,a=o.getExtent(),r=o.itemSize,s=[0,r[1]],l=SL(t,a,s,!0),u=this._shapes,h=u.indicator;if(h){h.position[1]=l,h.attr("invisible",!1),h.setShape("points",function(t,e,i,n){return t?[[0,-IL(e,TL(i,0))],[6,0],[0,IL(e,TL(n-i,0))]]:[[0,0],[5,-5],[5,5]]}(!!i,n,l,r[1]));var c=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0});h.setStyle("fill",c);var d=hl(u.indicatorLabelPoint,ul(h,this.group)),f=u.indicatorLabel;f.attr("invisible",!1);var p=this._applyTransform("left",u.barGroup),g=this._orient;f.setStyle({text:(i||"")+o.formatValueText(e),textVerticalAlign:"horizontal"===g?p:"middle",textAlign:"horizontal"===g?"center":p,x:d[0],y:d[1]})}},_enableHoverLinkToSeries:function(){var n=this;this._shapes.barGroup.on("mousemove",function(t){if(n._hovering=!0,!n._dragging){var e=n.visualMapModel.itemSize,i=n._applyTransform([t.offsetX,t.offsetY],n._shapes.barGroup,!0,!0);i[1]=IL(TL(0,i[1]),e[1]),n._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=e[0])}}).on("mouseout",function(){n._hovering=!1,n._dragging||n._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var o=[0,n[1]],a=i.getExtent();t=IL(TL(o[0],t),o[1]);var r=function(t,e,i){var n=6,o=t.get("hoverLinkDataSize");o&&(n=SL(o,e,i,!0)/2);return n}(i,a,o),s=[t-r,t+r],l=SL(t,o,a,!0),u=[SL(s[0],o,a,!0),SL(s[1],o,a,!0)];s[0] ",r):this._showIndicator(l,l,"≈ ",r));var h=this._hoverLinkDataIndices,c=[];(e||CL(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(u));var d=function(t,e){var i={},n={};return o(t||[],i),o(e||[],n,i),[a(i),a(n)];function o(t,e,i){for(var n=0,o=t.length;ni&&n([i,e[0]],"outOfRange"),n(e.slice()),i=e[1])},this),{stops:a,outerColors:r}}function n(t,e){var i=s.getRepresentValue({interval:t});e=e||s.getValueState(i);var n=o(i,e);t[0]===-1/0?r[0]=n:t[1]===1/0?r[1]=n:a.push({value:t[0],color:n},{value:t[1],color:n})}}}),PL={splitNumber:function(){var t=this.option,e=this._pieceList,i=Math.min(t.precision,20),n=this.getExtent(),o=t.splitNumber;o=Math.max(parseInt(o,10),1),t.splitNumber=o;for(var a=(n[1]-n[0])/o;+a.toFixed(i)!==a&&i<5;)i++;t.precision=i,a=+a.toFixed(i);var r=0;t.minOpen&&e.push({index:r++,interval:[-1/0,n[0]],close:[0,0]});for(var s=n[0],l=r+o;r","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)},this)}};function NL(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}_L.extend({type:"visualMap.piecewise",doRender:function(){var a=this.group;a.removeAll();var r=this.visualMapModel,s=r.get("textGap"),t=r.textStyleModel,l=t.getFont(),u=t.getTextColor(),h=this._getItemAlign(),c=r.itemSize,e=this._getViewData(),i=e.endsText,d=W(r.get("showLabel",!0),!i);i&&this._renderEndsText(a,i[0],c,d,h),E(e.viewPieceList,function(t){var e=t.piece,i=new Ii;i.onclick=A(this._onItemClick,this,e),this._enableHoverLink(i,t.indexInModelPieceList);var n=r.getRepresentValue(e);if(this._createItemSymbol(i,n,[0,0,c[0],c[1]]),d){var o=this.visualMapModel.getValueState(n);i.add(new Fr({style:{x:"right"===h?-s:c[0]+s,y:c[1]/2,text:e.text,textVerticalAlign:"middle",textAlign:h,textFont:l,textFill:u,opacity:"outOfRange"===o?.5:1}}))}a.add(i)},this),i&&this._renderEndsText(a,i[1],c,d,h),mu(r.get("orient"),a,r.get("itemGap")),this.renderBackground(a),this.positionGroup(a)},_enableHoverLink:function(t,i){function e(t){var e=this.visualMapModel;e.option.hoverLink&&this.api.dispatchAction({type:t,batch:bL(e.findTargetDataIndices(i),e)})}t.on("mouseover",A(e,this,"highlight")).on("mouseout",A(e,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return wL(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(t,e,i,n,o){if(e){var a=new Ii,r=this.visualMapModel.textStyleModel;a.add(new Fr({style:{x:n?"right"===o?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?o:"center",text:e,textFont:r.getFont(),textFill:r.getTextColor()}})),t.add(a)}},_getViewData:function(){var t=this.visualMapModel,e=N(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return("horizontal"===n?o:!o)?e.reverse():i=i&&i.slice().reverse(),{viewPieceList:e,endsText:i}},_createItemSymbol:function(t,e,i){t.add(mg(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,i=e.option,n=D(i.selected),o=e.getSelectedMapKey(t);"single"===i.selectedMode?(n[o]=!0,E(n,function(t,e){n[e]=e===o})):n[o]=!n[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:n})}});ff(iL);var OL,EL="urn:schemas-microsoft-com:vml",zL="undefined"==typeof window?null:window,RL=!1,BL=zL&&zL.document;function VL(t){return OL(t)}if(BL&&!v.canvasSupported)try{BL.namespaces.zrvml||BL.namespaces.add("zrvml",EL),OL=function(t){return BL.createElement("')}}catch(t){OL=function(t){return BL.createElement("<"+t+' xmlns="'+EL+'" class="zrvml">')}}var GL,FL=ir.CMD,WL=Math.round,HL=Math.sqrt,ZL=Math.abs,UL=Math.cos,XL=Math.sin,YL=Math.max;if(!v.canvasSupported){var jL=",",qL="progid:DXImageTransform.Microsoft",KL=21600,$L=KL/2,JL=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=KL+","+KL,t.coordorigin="0,0"},QL=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},tk=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},ek=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},ik=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},nk=Hn,ok=function(t,e,i){var n=Re(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=QL(n[0],n[1],n[2]),t.opacity=i*n[3])},ak=function(t,e,i,n){var o="fill"===e,a=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(o||!o&&i.lineWidth)?(t[o?"filled":"stroked"]="true",i[e]instanceof ss&&ek(t,a),a=a||VL(e),o?function(t,e,i){var n,o,a=e.fill;if(null!=a)if(a instanceof ss){var r,s=0,l=[0,0],u=0,h=1,c=i.getBoundingRect(),d=c.width,f=c.height;if("linear"===a.type){r="gradient";var p=i.transform,g=[a.x*d,a.y*f],m=[a.x2*d,a.y2*f];p&&(bt(g,g,p),bt(m,m,p));var v=m[0]-g[0],y=m[1]-g[1];(s=180*Math.atan2(v,y)/Math.PI)<0&&(s+=360),s<1e-6&&(s=0)}else{r="gradientradial";g=[a.x*d,a.y*f],p=i.transform;var x=i.scale,_=d,w=f;l=[(g[0]-c.x)/_,(g[1]-c.y)/w],p&&bt(g,g,p),_/=x[0]*KL,w/=x[1]*KL;var b=YL(_,w);u=0/b,h=2*a.r/b-u}var S=a.colorStops.slice();S.sort(function(t,e){return t.offset-e.offset});for(var M=S.length,I=[],T=[],A=0;A=c&&d<=i+1){for(var n=[],o=0;o=c&&d<=o+1)return jk(h,e.components,u,l);p[t]=e}else p[t]=void 0}var s;f++}for(;f<=e;){var r=a();if(r)return r}},pushComponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,n){for(var o=e.length,a=i.length,r=t.newPos,s=r-n,l=0;r+1 {
+ Object.defineProperty(ctx, style, {
+ set: value => {
+ if (style !== 'fillStyle' && style !== 'strokeStyle'
+ || value !== 'none' && value !== null
+ ) {
+ ctx['set' + style.charAt(0).toUpperCase() + style.slice(1)](value);
+ }
+ }
+ });
+ });
+
+ ctx.createRadialGradient = () => {
+ return ctx.createCircularGradient(arguments);
+ };
+ }
+
+ _initEvent() {
+ this.event = {};
+ const eventNames = [{
+ wxName: 'touchStart',
+ ecName: 'mousedown'
+ }, {
+ wxName: 'touchMove',
+ ecName: 'mousemove'
+ }, {
+ wxName: 'touchEnd',
+ ecName: 'mouseup'
+ }, {
+ wxName: 'touchEnd',
+ ecName: 'click'
+ }];
+
+ eventNames.forEach(name => {
+ this.event[name.wxName] = e => {
+ const touch = e.touches[0];
+ this.chart.getZr().handler.dispatch(name.ecName, {
+ zrX: name.wxName === 'tap' ? touch.clientX : touch.x,
+ zrY: name.wxName === 'tap' ? touch.clientY : touch.y
+ });
+ };
+ });
+ }
+
+ set width(w) {
+ if (this.canvasNode) this.canvasNode.width = w
+ }
+ set height(h) {
+ if (this.canvasNode) this.canvasNode.height = h
+ }
+
+ get width() {
+ if (this.canvasNode)
+ return this.canvasNode.width
+ return 0
+ }
+ get height() {
+ if (this.canvasNode)
+ return this.canvasNode.height
+ return 0
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/images/biyan.png b/yanzhu-ui-app/miniprogram/images/biyan.png
new file mode 100644
index 00000000..ce424972
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/biyan.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/bottom.png b/yanzhu-ui-app/miniprogram/images/bottom.png
new file mode 100644
index 00000000..4fbe5f46
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/bottom.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/core.png b/yanzhu-ui-app/miniprogram/images/core.png
new file mode 100644
index 00000000..3b89e0b6
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/core.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/cz_1.png b/yanzhu-ui-app/miniprogram/images/cz_1.png
new file mode 100644
index 00000000..9922e2cc
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/cz_1.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/cz_2.png b/yanzhu-ui-app/miniprogram/images/cz_2.png
new file mode 100644
index 00000000..ab101562
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/cz_2.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/dingwei.png b/yanzhu-ui-app/miniprogram/images/dingwei.png
new file mode 100644
index 00000000..9fb08c30
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/dingwei.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/early.png b/yanzhu-ui-app/miniprogram/images/early.png
new file mode 100644
index 00000000..ca7aca0c
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/early.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/fanhui.png b/yanzhu-ui-app/miniprogram/images/fanhui.png
new file mode 100644
index 00000000..aa8bdaa3
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/fanhui.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/foot_1.png b/yanzhu-ui-app/miniprogram/images/foot_1.png
new file mode 100644
index 00000000..5b00a21c
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/foot_1.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/foot_2.png b/yanzhu-ui-app/miniprogram/images/foot_2.png
new file mode 100644
index 00000000..908ddb87
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/foot_2.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/foot_3.png b/yanzhu-ui-app/miniprogram/images/foot_3.png
new file mode 100644
index 00000000..cf61a264
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/foot_3.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/foot_4.png b/yanzhu-ui-app/miniprogram/images/foot_4.png
new file mode 100644
index 00000000..32d0110f
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/foot_4.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/foot_5.png b/yanzhu-ui-app/miniprogram/images/foot_5.png
new file mode 100644
index 00000000..6cd39b0a
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/foot_5.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/foot_6.png b/yanzhu-ui-app/miniprogram/images/foot_6.png
new file mode 100644
index 00000000..20917a91
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/foot_6.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/foot_7.png b/yanzhu-ui-app/miniprogram/images/foot_7.png
new file mode 100644
index 00000000..6f34a65c
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/foot_7.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/footer_1.png b/yanzhu-ui-app/miniprogram/images/footer_1.png
new file mode 100644
index 00000000..f75dcc18
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/footer_1.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/footer_2.png b/yanzhu-ui-app/miniprogram/images/footer_2.png
new file mode 100644
index 00000000..4a640566
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/footer_2.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/footer_3.png b/yanzhu-ui-app/miniprogram/images/footer_3.png
new file mode 100644
index 00000000..82321d04
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/footer_3.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/footer_4.png b/yanzhu-ui-app/miniprogram/images/footer_4.png
new file mode 100644
index 00000000..40b28bc7
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/footer_4.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/footer_5.png b/yanzhu-ui-app/miniprogram/images/footer_5.png
new file mode 100644
index 00000000..e00b504c
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/footer_5.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/footer_6.png b/yanzhu-ui-app/miniprogram/images/footer_6.png
new file mode 100644
index 00000000..0cad69b4
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/footer_6.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/footer_7.png b/yanzhu-ui-app/miniprogram/images/footer_7.png
new file mode 100644
index 00000000..a6aed484
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/footer_7.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/guodu.gif b/yanzhu-ui-app/miniprogram/images/guodu.gif
new file mode 100644
index 00000000..2c0238a1
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/guodu.gif differ
diff --git a/yanzhu-ui-app/miniprogram/images/i_location.png b/yanzhu-ui-app/miniprogram/images/i_location.png
new file mode 100644
index 00000000..5ef39fec
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/i_location.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/i_mechanics.png b/yanzhu-ui-app/miniprogram/images/i_mechanics.png
new file mode 100644
index 00000000..957fa4ab
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/i_mechanics.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/i_personnel.png b/yanzhu-ui-app/miniprogram/images/i_personnel.png
new file mode 100644
index 00000000..216695bc
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/i_personnel.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/icon_1.png b/yanzhu-ui-app/miniprogram/images/icon_1.png
new file mode 100644
index 00000000..17a62909
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/icon_1.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/icon_2.png b/yanzhu-ui-app/miniprogram/images/icon_2.png
new file mode 100644
index 00000000..d46f8f4f
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/icon_2.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/icon_3.png b/yanzhu-ui-app/miniprogram/images/icon_3.png
new file mode 100644
index 00000000..7b59453d
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/icon_3.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/icon_4.png b/yanzhu-ui-app/miniprogram/images/icon_4.png
new file mode 100644
index 00000000..c682c6e0
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/icon_4.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/icon_5.png b/yanzhu-ui-app/miniprogram/images/icon_5.png
new file mode 100644
index 00000000..f7015031
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/icon_5.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/icons_1.png b/yanzhu-ui-app/miniprogram/images/icons_1.png
new file mode 100644
index 00000000..4a01a1e5
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/icons_1.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/icons_2.png b/yanzhu-ui-app/miniprogram/images/icons_2.png
new file mode 100644
index 00000000..22f8ff27
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/icons_2.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/icons_3.png b/yanzhu-ui-app/miniprogram/images/icons_3.png
new file mode 100644
index 00000000..81e04f9c
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/icons_3.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/icons_4.png b/yanzhu-ui-app/miniprogram/images/icons_4.png
new file mode 100644
index 00000000..e71a7505
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/icons_4.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/icons_5.png b/yanzhu-ui-app/miniprogram/images/icons_5.png
new file mode 100644
index 00000000..cd75a414
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/icons_5.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/img_1.png b/yanzhu-ui-app/miniprogram/images/img_1.png
new file mode 100644
index 00000000..6bf5dc50
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/img_1.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/img_10.png b/yanzhu-ui-app/miniprogram/images/img_10.png
new file mode 100644
index 00000000..8298f45a
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/img_10.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/img_11.png b/yanzhu-ui-app/miniprogram/images/img_11.png
new file mode 100644
index 00000000..1cc4db5a
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/img_11.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/img_12.png b/yanzhu-ui-app/miniprogram/images/img_12.png
new file mode 100644
index 00000000..adca3507
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/img_12.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/img_2.png b/yanzhu-ui-app/miniprogram/images/img_2.png
new file mode 100644
index 00000000..d7598e52
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/img_2.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/img_3.png b/yanzhu-ui-app/miniprogram/images/img_3.png
new file mode 100644
index 00000000..adbaadc5
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/img_3.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/img_4.png b/yanzhu-ui-app/miniprogram/images/img_4.png
new file mode 100644
index 00000000..0e34b20e
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/img_4.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/img_5.png b/yanzhu-ui-app/miniprogram/images/img_5.png
new file mode 100644
index 00000000..635aa8d6
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/img_5.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/img_6.png b/yanzhu-ui-app/miniprogram/images/img_6.png
new file mode 100644
index 00000000..c67e2e77
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/img_6.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/img_7.png b/yanzhu-ui-app/miniprogram/images/img_7.png
new file mode 100644
index 00000000..6c247af3
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/img_7.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/img_8.png b/yanzhu-ui-app/miniprogram/images/img_8.png
new file mode 100644
index 00000000..1025c198
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/img_8.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/img_9.png b/yanzhu-ui-app/miniprogram/images/img_9.png
new file mode 100644
index 00000000..c5bbf838
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/img_9.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/info_title_0.png b/yanzhu-ui-app/miniprogram/images/info_title_0.png
new file mode 100644
index 00000000..0ee281f2
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/info_title_0.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/jt.png b/yanzhu-ui-app/miniprogram/images/jt.png
new file mode 100644
index 00000000..1340ac78
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/jt.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/left.png b/yanzhu-ui-app/miniprogram/images/left.png
new file mode 100644
index 00000000..ab354850
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/left.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/loding.gif b/yanzhu-ui-app/miniprogram/images/loding.gif
new file mode 100644
index 00000000..d9bb3c55
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/loding.gif differ
diff --git a/yanzhu-ui-app/miniprogram/images/lw_1.png b/yanzhu-ui-app/miniprogram/images/lw_1.png
new file mode 100644
index 00000000..5a54cbdc
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/lw_1.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/lw_2.png b/yanzhu-ui-app/miniprogram/images/lw_2.png
new file mode 100644
index 00000000..52388b10
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/lw_2.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/lw_3.png b/yanzhu-ui-app/miniprogram/images/lw_3.png
new file mode 100644
index 00000000..d73d1c31
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/lw_3.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/lw_4.png b/yanzhu-ui-app/miniprogram/images/lw_4.png
new file mode 100644
index 00000000..a177e21c
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/lw_4.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/lw_5.png b/yanzhu-ui-app/miniprogram/images/lw_5.png
new file mode 100644
index 00000000..3e9545e4
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/lw_5.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/lw_6.png b/yanzhu-ui-app/miniprogram/images/lw_6.png
new file mode 100644
index 00000000..aa68320c
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/lw_6.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/lw_7.png b/yanzhu-ui-app/miniprogram/images/lw_7.png
new file mode 100644
index 00000000..b06c5261
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/lw_7.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/lw_8.png b/yanzhu-ui-app/miniprogram/images/lw_8.png
new file mode 100644
index 00000000..1927a100
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/lw_8.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/middl_right.png b/yanzhu-ui-app/miniprogram/images/middl_right.png
new file mode 100644
index 00000000..ec22d605
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/middl_right.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/middle_left.png b/yanzhu-ui-app/miniprogram/images/middle_left.png
new file mode 100644
index 00000000..5c7e05fc
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/middle_left.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/new_add.png b/yanzhu-ui-app/miniprogram/images/new_add.png
new file mode 100644
index 00000000..5f11ed2d
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/new_add.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/nodata.png b/yanzhu-ui-app/miniprogram/images/nodata.png
new file mode 100644
index 00000000..17d832cc
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/nodata.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/quanping.png b/yanzhu-ui-app/miniprogram/images/quanping.png
new file mode 100644
index 00000000..7dc54d9c
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/quanping.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/right.png b/yanzhu-ui-app/miniprogram/images/right.png
new file mode 100644
index 00000000..f09a421d
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/right.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/s_1.png b/yanzhu-ui-app/miniprogram/images/s_1.png
new file mode 100644
index 00000000..4475e32c
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/s_1.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/s_10.png b/yanzhu-ui-app/miniprogram/images/s_10.png
new file mode 100644
index 00000000..a5720ae0
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/s_10.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/s_11.png b/yanzhu-ui-app/miniprogram/images/s_11.png
new file mode 100644
index 00000000..31523ab3
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/s_11.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/s_12.png b/yanzhu-ui-app/miniprogram/images/s_12.png
new file mode 100644
index 00000000..83a890b5
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/s_12.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/s_13.png b/yanzhu-ui-app/miniprogram/images/s_13.png
new file mode 100644
index 00000000..df8d7441
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/s_13.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/s_14.png b/yanzhu-ui-app/miniprogram/images/s_14.png
new file mode 100644
index 00000000..36e170b4
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/s_14.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/s_15.png b/yanzhu-ui-app/miniprogram/images/s_15.png
new file mode 100644
index 00000000..9cfa9793
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/s_15.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/s_16.png b/yanzhu-ui-app/miniprogram/images/s_16.png
new file mode 100644
index 00000000..d044e624
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/s_16.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/s_17.png b/yanzhu-ui-app/miniprogram/images/s_17.png
new file mode 100644
index 00000000..192f1c04
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/s_17.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/s_18.png b/yanzhu-ui-app/miniprogram/images/s_18.png
new file mode 100644
index 00000000..4c8abeb7
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/s_18.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/s_2.png b/yanzhu-ui-app/miniprogram/images/s_2.png
new file mode 100644
index 00000000..3717e33e
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/s_2.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/s_3.png b/yanzhu-ui-app/miniprogram/images/s_3.png
new file mode 100644
index 00000000..cf16c0b1
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/s_3.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/s_4.png b/yanzhu-ui-app/miniprogram/images/s_4.png
new file mode 100644
index 00000000..222a809e
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/s_4.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/s_5.png b/yanzhu-ui-app/miniprogram/images/s_5.png
new file mode 100644
index 00000000..fab5f4fd
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/s_5.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/s_6.png b/yanzhu-ui-app/miniprogram/images/s_6.png
new file mode 100644
index 00000000..a8bced08
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/s_6.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/s_7.png b/yanzhu-ui-app/miniprogram/images/s_7.png
new file mode 100644
index 00000000..f391ae41
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/s_7.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/s_8.png b/yanzhu-ui-app/miniprogram/images/s_8.png
new file mode 100644
index 00000000..a86d30cc
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/s_8.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/s_9.png b/yanzhu-ui-app/miniprogram/images/s_9.png
new file mode 100644
index 00000000..fc2acbaa
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/s_9.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/set.png b/yanzhu-ui-app/miniprogram/images/set.png
new file mode 100644
index 00000000..a505b6f0
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/set.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/sliding_up.png b/yanzhu-ui-app/miniprogram/images/sliding_up.png
new file mode 100644
index 00000000..5ba6954d
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/sliding_up.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/user_3.png b/yanzhu-ui-app/miniprogram/images/user_3.png
new file mode 100644
index 00000000..cc37d238
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/user_3.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/video.png b/yanzhu-ui-app/miniprogram/images/video.png
new file mode 100644
index 00000000..a14c8c7e
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/video.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/warning.png b/yanzhu-ui-app/miniprogram/images/warning.png
new file mode 100644
index 00000000..773f8a86
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/warning.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/web_select_date.png b/yanzhu-ui-app/miniprogram/images/web_select_date.png
new file mode 100644
index 00000000..9e308420
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/web_select_date.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/wl_fg.png b/yanzhu-ui-app/miniprogram/images/wl_fg.png
new file mode 100644
index 00000000..9d4e45c3
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/wl_fg.png differ
diff --git a/yanzhu-ui-app/miniprogram/images/yj_01.png b/yanzhu-ui-app/miniprogram/images/yj_01.png
new file mode 100644
index 00000000..489d04a4
Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/yj_01.png differ
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/action-sheet/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/action-sheet/index.js
new file mode 100644
index 00000000..a9e4b076
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/action-sheet/index.js
@@ -0,0 +1,64 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var button_1 = require('../mixins/button');
+var open_type_1 = require('../mixins/open-type');
+component_1.VantComponent({
+ mixins: [button_1.button, open_type_1.openType],
+ props: {
+ show: Boolean,
+ title: String,
+ cancelText: String,
+ description: String,
+ round: {
+ type: Boolean,
+ value: true,
+ },
+ zIndex: {
+ type: Number,
+ value: 100,
+ },
+ actions: {
+ type: Array,
+ value: [],
+ },
+ overlay: {
+ type: Boolean,
+ value: true,
+ },
+ closeOnClickOverlay: {
+ type: Boolean,
+ value: true,
+ },
+ closeOnClickAction: {
+ type: Boolean,
+ value: true,
+ },
+ safeAreaInsetBottom: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ methods: {
+ onSelect: function (event) {
+ var index = event.currentTarget.dataset.index;
+ var item = this.data.actions[index];
+ if (item && !item.disabled && !item.loading) {
+ this.$emit('select', item);
+ if (this.data.closeOnClickAction) {
+ this.onClose();
+ }
+ }
+ },
+ onCancel: function () {
+ this.$emit('cancel');
+ },
+ onClose: function () {
+ this.$emit('close');
+ },
+ onClickOverlay: function () {
+ this.$emit('click-overlay');
+ this.onClose();
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/action-sheet/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/action-sheet/index.json
new file mode 100644
index 00000000..19bf9891
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/action-sheet/index.json
@@ -0,0 +1,8 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index",
+ "van-popup": "../popup/index",
+ "van-loading": "../loading/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/action-sheet/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/action-sheet/index.wxml
new file mode 100644
index 00000000..7ed28196
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/action-sheet/index.wxml
@@ -0,0 +1,67 @@
+
+
+
+
+
+ {{ description }}
+
+
+
+
+
+
+
+ {{ cancelText }}
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/action-sheet/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/action-sheet/index.wxss
new file mode 100644
index 00000000..dc54840c
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/action-sheet/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-action-sheet{max-height:90%!important;max-height:var(--action-sheet-max-height,90%)!important;color:#323233;color:var(--action-sheet-item-text-color,#323233)}.van-action-sheet__cancel,.van-action-sheet__item{text-align:center;font-size:16px;font-size:var(--action-sheet-item-font-size,16px);line-height:50px;line-height:var(--action-sheet-item-height,50px);background-color:#fff;background-color:var(--action-sheet-item-background,#fff)}.van-action-sheet__cancel--hover,.van-action-sheet__item--hover{background-color:#f2f3f5;background-color:var(--active-color,#f2f3f5)}.van-action-sheet__cancel:before{display:block;content:" ";height:8px;height:var(--action-sheet-cancel-padding-top,8px);background-color:#f7f8fa;background-color:var(--action-sheet-cancel-padding-color,#f7f8fa)}.van-action-sheet__item--disabled{color:#c8c9cc;color:var(--action-sheet-item-disabled-text-color,#c8c9cc)}.van-action-sheet__item--disabled.van-action-sheet__item--hover{background-color:#fff;background-color:var(--action-sheet-item-background,#fff)}.van-action-sheet__subname{margin-left:4px;margin-left:var(--padding-base,4px);font-size:12px;font-size:var(--action-sheet-subname-font-size,12px);color:#646566;color:var(--action-sheet-subname-color,#646566)}.van-action-sheet__header{text-align:center;font-weight:500;font-weight:var(--font-weight-bold,500);font-size:16px;font-size:var(--action-sheet-header-font-size,16px);line-height:44px;line-height:var(--action-sheet-header-height,44px)}.van-action-sheet__description{text-align:center;padding:16px;padding:var(--padding-md,16px);color:#646566;color:var(--action-sheet-description-color,#646566);font-size:14px;font-size:var(--action-sheet-description-font-size,14px);line-height:20px;line-height:var(--action-sheet-description-line-height,20px)}.van-action-sheet__close{position:absolute!important;top:0;right:0;line-height:inherit!important;padding:0 12px;padding:var(--action-sheet-close-icon-padding,0 12px);font-size:18px!important;font-size:var(--action-sheet-close-icon-size,18px)!important;color:#969799;color:var(--action-sheet-close-icon-color,#969799)}.van-action-sheet__loading{display:-webkit-flex!important;display:flex!important;height:50px;height:var(--action-sheet-item-height,50px)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/area/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/area/index.js
new file mode 100644
index 00000000..ed80e4c1
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/area/index.js
@@ -0,0 +1,257 @@
+'use strict';
+var __assign =
+ (this && this.__assign) ||
+ function () {
+ __assign =
+ Object.assign ||
+ function (t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s)
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+ }
+ return t;
+ };
+ return __assign.apply(this, arguments);
+ };
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var shared_1 = require('../picker/shared');
+var COLUMNSPLACEHOLDERCODE = '000000';
+component_1.VantComponent({
+ classes: ['active-class', 'toolbar-class', 'column-class'],
+ props: __assign(__assign({}, shared_1.pickerProps), {
+ value: {
+ type: String,
+ observer: function (value) {
+ this.code = value;
+ this.setValues();
+ },
+ },
+ areaList: {
+ type: Object,
+ value: {},
+ observer: 'setValues',
+ },
+ columnsNum: {
+ type: null,
+ value: 3,
+ observer: function (value) {
+ this.setData({
+ displayColumns: this.data.columns.slice(0, +value),
+ });
+ },
+ },
+ columnsPlaceholder: {
+ type: Array,
+ observer: function (val) {
+ this.setData({
+ typeToColumnsPlaceholder: {
+ province: val[0] || '',
+ city: val[1] || '',
+ county: val[2] || '',
+ },
+ });
+ },
+ },
+ }),
+ data: {
+ columns: [{ values: [] }, { values: [] }, { values: [] }],
+ displayColumns: [{ values: [] }, { values: [] }, { values: [] }],
+ typeToColumnsPlaceholder: {},
+ },
+ mounted: function () {
+ var _this = this;
+ setTimeout(function () {
+ _this.setValues();
+ }, 0);
+ },
+ methods: {
+ getPicker: function () {
+ if (this.picker == null) {
+ this.picker = this.selectComponent('.van-area__picker');
+ }
+ return this.picker;
+ },
+ onCancel: function (event) {
+ this.emit('cancel', event.detail);
+ },
+ onConfirm: function (event) {
+ var index = event.detail.index;
+ var value = event.detail.value;
+ value = this.parseOutputValues(value);
+ this.emit('confirm', { value: value, index: index });
+ },
+ emit: function (type, detail) {
+ detail.values = detail.value;
+ delete detail.value;
+ this.$emit(type, detail);
+ },
+ // parse output columns data
+ parseOutputValues: function (values) {
+ var columnsPlaceholder = this.data.columnsPlaceholder;
+ return values.map(function (value, index) {
+ // save undefined value
+ if (!value) return value;
+ value = JSON.parse(JSON.stringify(value));
+ if (!value.code || value.name === columnsPlaceholder[index]) {
+ value.code = '';
+ value.name = '';
+ }
+ return value;
+ });
+ },
+ onChange: function (event) {
+ var _this = this;
+ var _a = event.detail,
+ index = _a.index,
+ picker = _a.picker,
+ value = _a.value;
+ this.code = value[index].code;
+ this.setValues().then(function () {
+ _this.$emit('change', {
+ picker: picker,
+ values: _this.parseOutputValues(picker.getValues()),
+ index: index,
+ });
+ });
+ },
+ getConfig: function (type) {
+ var areaList = this.data.areaList;
+ return (areaList && areaList[type + '_list']) || {};
+ },
+ getList: function (type, code) {
+ var typeToColumnsPlaceholder = this.data.typeToColumnsPlaceholder;
+ var result = [];
+ if (type !== 'province' && !code) {
+ return result;
+ }
+ var list = this.getConfig(type);
+ result = Object.keys(list).map(function (code) {
+ return {
+ code: code,
+ name: list[code],
+ };
+ });
+ if (code) {
+ // oversea code
+ if (code[0] === '9' && type === 'city') {
+ code = '9';
+ }
+ result = result.filter(function (item) {
+ return item.code.indexOf(code) === 0;
+ });
+ }
+ if (typeToColumnsPlaceholder[type] && result.length) {
+ // set columns placeholder
+ var codeFill =
+ type === 'province'
+ ? ''
+ : type === 'city'
+ ? COLUMNSPLACEHOLDERCODE.slice(2, 4)
+ : COLUMNSPLACEHOLDERCODE.slice(4, 6);
+ result.unshift({
+ code: '' + code + codeFill,
+ name: typeToColumnsPlaceholder[type],
+ });
+ }
+ return result;
+ },
+ getIndex: function (type, code) {
+ var compareNum = type === 'province' ? 2 : type === 'city' ? 4 : 6;
+ var list = this.getList(type, code.slice(0, compareNum - 2));
+ // oversea code
+ if (code[0] === '9' && type === 'province') {
+ compareNum = 1;
+ }
+ code = code.slice(0, compareNum);
+ for (var i = 0; i < list.length; i++) {
+ if (list[i].code.slice(0, compareNum) === code) {
+ return i;
+ }
+ }
+ return 0;
+ },
+ setValues: function () {
+ var _this = this;
+ var county = this.getConfig('county');
+ var code = this.code;
+ if (!code) {
+ if (this.data.columnsPlaceholder.length) {
+ code = COLUMNSPLACEHOLDERCODE;
+ } else if (Object.keys(county)[0]) {
+ code = Object.keys(county)[0];
+ } else {
+ code = '';
+ }
+ }
+ var province = this.getList('province');
+ var city = this.getList('city', code.slice(0, 2));
+ var picker = this.getPicker();
+ if (!picker) {
+ return;
+ }
+ var stack = [];
+ stack.push(picker.setColumnValues(0, province, false));
+ stack.push(picker.setColumnValues(1, city, false));
+ if (city.length && code.slice(2, 4) === '00') {
+ code = city[0].code;
+ }
+ stack.push(
+ picker.setColumnValues(
+ 2,
+ this.getList('county', code.slice(0, 4)),
+ false
+ )
+ );
+ return Promise.all(stack)
+ .catch(function () {})
+ .then(function () {
+ return picker.setIndexes([
+ _this.getIndex('province', code),
+ _this.getIndex('city', code),
+ _this.getIndex('county', code),
+ ]);
+ })
+ .catch(function () {});
+ },
+ getValues: function () {
+ var picker = this.getPicker();
+ return picker
+ ? picker.getValues().filter(function (value) {
+ return !!value;
+ })
+ : [];
+ },
+ getDetail: function () {
+ var values = this.getValues();
+ var area = {
+ code: '',
+ country: '',
+ province: '',
+ city: '',
+ county: '',
+ };
+ if (!values.length) {
+ return area;
+ }
+ var names = values.map(function (item) {
+ return item.name;
+ });
+ area.code = values[values.length - 1].code;
+ if (area.code[0] === '9') {
+ area.country = names[1] || '';
+ area.province = names[2] || '';
+ } else {
+ area.province = names[0] || '';
+ area.city = names[1] || '';
+ area.county = names[2] || '';
+ }
+ return area;
+ },
+ reset: function (code) {
+ this.code = code || '';
+ return this.setValues();
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/area/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/area/index.json
new file mode 100644
index 00000000..a778e91c
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/area/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-picker": "../picker/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/area/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/area/index.wxml
new file mode 100644
index 00000000..60757941
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/area/index.wxml
@@ -0,0 +1,18 @@
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/area/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/area/index.wxss
new file mode 100644
index 00000000..99694d60
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/area/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/button/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/button/index.js
new file mode 100644
index 00000000..d38d35db
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/button/index.js
@@ -0,0 +1,81 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var button_1 = require('../mixins/button');
+var open_type_1 = require('../mixins/open-type');
+var version_1 = require('../common/version');
+var mixins = [button_1.button, open_type_1.openType];
+if (version_1.canIUseFormFieldButton()) {
+ mixins.push('wx://form-field-button');
+}
+component_1.VantComponent({
+ mixins: mixins,
+ classes: ['hover-class', 'loading-class'],
+ data: {
+ baseStyle: '',
+ },
+ props: {
+ formType: String,
+ icon: String,
+ classPrefix: {
+ type: String,
+ value: 'van-icon',
+ },
+ plain: Boolean,
+ block: Boolean,
+ round: Boolean,
+ square: Boolean,
+ loading: Boolean,
+ hairline: Boolean,
+ disabled: Boolean,
+ loadingText: String,
+ customStyle: String,
+ loadingType: {
+ type: String,
+ value: 'circular',
+ },
+ type: {
+ type: String,
+ value: 'default',
+ },
+ dataset: null,
+ size: {
+ type: String,
+ value: 'normal',
+ },
+ loadingSize: {
+ type: String,
+ value: '20px',
+ },
+ color: {
+ type: String,
+ observer: function (color) {
+ var style = '';
+ if (color) {
+ style += 'color: ' + (this.data.plain ? color : 'white') + ';';
+ if (!this.data.plain) {
+ // Use background instead of backgroundColor to make linear-gradient work
+ style += 'background: ' + color + ';';
+ }
+ // hide border when color is linear-gradient
+ if (color.indexOf('gradient') !== -1) {
+ style += 'border: 0;';
+ } else {
+ style += 'border-color: ' + color + ';';
+ }
+ }
+ if (style !== this.data.baseStyle) {
+ this.setData({ baseStyle: style });
+ }
+ },
+ },
+ },
+ methods: {
+ onClick: function () {
+ if (!this.data.loading) {
+ this.$emit('click');
+ }
+ },
+ noop: function () {},
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/button/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/button/index.json
new file mode 100644
index 00000000..e00a5887
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/button/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index",
+ "van-loading": "../loading/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/button/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/button/index.wxml
new file mode 100644
index 00000000..ab393e8f
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/button/index.wxml
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+function get(type, color,plain) {
+ if(plain) {
+ return color ? color: '#c9c9c9';
+ }
+
+ if(type === 'default') {
+ return '#c9c9c9';
+ }
+ return 'white';
+}
+
+module.exports = get;
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/button/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/button/index.wxss
new file mode 100644
index 00000000..5a591fbd
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/button/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-button{position:relative;display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;padding:0;text-align:center;vertical-align:middle;-webkit-appearance:none;-webkit-text-size-adjust:100%;height:44px;height:var(--button-default-height,44px);line-height:20px;line-height:var(--button-line-height,20px);font-size:16px;font-size:var(--button-default-font-size,16px);transition:opacity .2s;transition:opacity var(--animation-duration-fast,.2s);border-radius:2px;border-radius:var(--button-border-radius,2px)}.van-button:before{position:absolute;top:50%;left:50%;width:100%;height:100%;border:inherit;border-radius:inherit;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);opacity:0;content:" ";background-color:#000;background-color:var(--black,#000);border-color:#000;border-color:var(--black,#000)}.van-button:after{border-width:0}.van-button--active:before{opacity:.15}.van-button--unclickable:after{display:none}.van-button--default{color:#323233;color:var(--button-default-color,#323233);background:#fff;background:var(--button-default-background-color,#fff);border:1px solid #ebedf0;border:var(--button-border-width,1px) solid var(--button-default-border-color,#ebedf0)}.van-button--primary{color:#fff;color:var(--button-primary-color,#fff);background:#07c160;background:var(--button-primary-background-color,#07c160);border:1px solid #07c160;border:var(--button-border-width,1px) solid var(--button-primary-border-color,#07c160)}.van-button--info{color:#fff;color:var(--button-info-color,#fff);background:#1989fa;background:var(--button-info-background-color,#1989fa);border:1px solid #1989fa;border:var(--button-border-width,1px) solid var(--button-info-border-color,#1989fa)}.van-button--danger{color:#fff;color:var(--button-danger-color,#fff);background:#ee0a24;background:var(--button-danger-background-color,#ee0a24);border:1px solid #ee0a24;border:var(--button-border-width,1px) solid var(--button-danger-border-color,#ee0a24)}.van-button--warning{color:#fff;color:var(--button-warning-color,#fff);background:#ff976a;background:var(--button-warning-background-color,#ff976a);border:1px solid #ff976a;border:var(--button-border-width,1px) solid var(--button-warning-border-color,#ff976a)}.van-button--plain{background:#fff;background:var(--button-plain-background-color,#fff)}.van-button--plain.van-button--primary{color:#07c160;color:var(--button-primary-background-color,#07c160)}.van-button--plain.van-button--info{color:#1989fa;color:var(--button-info-background-color,#1989fa)}.van-button--plain.van-button--danger{color:#ee0a24;color:var(--button-danger-background-color,#ee0a24)}.van-button--plain.van-button--warning{color:#ff976a;color:var(--button-warning-background-color,#ff976a)}.van-button--large{width:100%;height:50px;height:var(--button-large-height,50px)}.van-button--normal{padding:0 15px;font-size:14px;font-size:var(--button-normal-font-size,14px)}.van-button--small{min-width:60px;min-width:var(--button-small-min-width,60px);height:30px;height:var(--button-small-height,30px);padding:0 8px;padding:0 var(--padding-xs,8px);font-size:12px;font-size:var(--button-small-font-size,12px)}.van-button--mini{display:inline-block;min-width:50px;min-width:var(--button-mini-min-width,50px);height:22px;height:var(--button-mini-height,22px);font-size:10px;font-size:var(--button-mini-font-size,10px)}.van-button--mini+.van-button--mini{margin-left:5px}.van-button--block{display:-webkit-flex;display:flex;width:100%}.van-button--round{border-radius:999px;border-radius:var(--button-round-border-radius,999px)}.van-button--square{border-radius:0}.van-button--disabled{opacity:.5;opacity:var(--button-disabled-opacity,.5)}.van-button__text{display:inline}.van-button__icon+.van-button__text:not(:empty),.van-button__loading-text{margin-left:4px}.van-button__icon{min-width:1em;line-height:inherit!important;vertical-align:top}.van-button--hairline{padding-top:1px;border-width:0}.van-button--hairline:after{border-color:inherit;border-width:1px;border-radius:4px;border-radius:calc(var(--button-border-radius, 2px)*2)}.van-button--hairline.van-button--round:after{border-radius:999px;border-radius:var(--button-round-border-radius,999px)}.van-button--hairline.van-button--square:after{border-radius:0}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/calendar.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/calendar.wxml
new file mode 100644
index 00000000..09a60b3e
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/calendar.wxml
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/components/header/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/components/header/index.js
new file mode 100644
index 00000000..cf725aec
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/components/header/index.js
@@ -0,0 +1,18 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../../../common/component');
+component_1.VantComponent({
+ props: {
+ title: {
+ type: String,
+ value: '日期选择',
+ },
+ subtitle: String,
+ showTitle: Boolean,
+ showSubtitle: Boolean,
+ },
+ data: {
+ weekdays: ['日', '一', '二', '三', '四', '五', '六'],
+ },
+ methods: {},
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/components/header/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/components/header/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/components/header/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/components/header/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/components/header/index.wxml
new file mode 100644
index 00000000..eb8e4b47
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/components/header/index.wxml
@@ -0,0 +1,16 @@
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/components/header/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/components/header/index.wxss
new file mode 100644
index 00000000..4075e48f
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/components/header/index.wxss
@@ -0,0 +1 @@
+@import '../../../common/index.wxss';.van-calendar__header{-webkit-flex-shrink:0;flex-shrink:0;box-shadow:0 2px 10px rgba(125,126,128,.16);box-shadow:var(--calendar-header-box-shadow,0 2px 10px rgba(125,126,128,.16))}.van-calendar__header-subtitle,.van-calendar__header-title{text-align:center;height:44px;height:var(--calendar-header-title-height,44px);font-weight:500;font-weight:var(--font-weight-bold,500);line-height:44px;line-height:var(--calendar-header-title-height,44px)}.van-calendar__header-title+.van-calendar__header-title,.van-calendar__header-title:empty{display:none}.van-calendar__header-title:empty+.van-calendar__header-title{display:block!important}.van-calendar__weekdays{display:-webkit-flex;display:flex}.van-calendar__weekday{-webkit-flex:1;flex:1;text-align:center;font-size:12px;font-size:var(--calendar-weekdays-font-size,12px);line-height:30px;line-height:var(--calendar-weekdays-height,30px)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/components/month/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/components/month/index.js
new file mode 100644
index 00000000..1950c6c1
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/components/month/index.js
@@ -0,0 +1,167 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../../../common/component');
+var utils_1 = require('../../utils');
+component_1.VantComponent({
+ props: {
+ date: {
+ type: null,
+ observer: 'setDays',
+ },
+ type: {
+ type: String,
+ observer: 'setDays',
+ },
+ color: String,
+ minDate: {
+ type: null,
+ observer: 'setDays',
+ },
+ maxDate: {
+ type: null,
+ observer: 'setDays',
+ },
+ showMark: Boolean,
+ rowHeight: [Number, String],
+ formatter: {
+ type: null,
+ observer: 'setDays',
+ },
+ currentDate: {
+ type: [null, Array],
+ observer: 'setDays',
+ },
+ allowSameDay: Boolean,
+ showSubtitle: Boolean,
+ showMonthTitle: Boolean,
+ },
+ data: {
+ visible: true,
+ days: [],
+ },
+ methods: {
+ onClick: function (event) {
+ var index = event.currentTarget.dataset.index;
+ var item = this.data.days[index];
+ if (item.type !== 'disabled') {
+ this.$emit('click', item);
+ }
+ },
+ setDays: function () {
+ var days = [];
+ var startDate = new Date(this.data.date);
+ var year = startDate.getFullYear();
+ var month = startDate.getMonth();
+ var totalDay = utils_1.getMonthEndDay(
+ startDate.getFullYear(),
+ startDate.getMonth() + 1
+ );
+ for (var day = 1; day <= totalDay; day++) {
+ var date = new Date(year, month, day);
+ var type = this.getDayType(date);
+ var config = {
+ date: date,
+ type: type,
+ text: day,
+ bottomInfo: this.getBottomInfo(type),
+ };
+ if (this.data.formatter) {
+ config = this.data.formatter(config);
+ }
+ days.push(config);
+ }
+ this.setData({ days: days });
+ },
+ getMultipleDayType: function (day) {
+ var currentDate = this.data.currentDate;
+ if (!Array.isArray(currentDate)) {
+ return '';
+ }
+ var isSelected = function (date) {
+ return currentDate.some(function (item) {
+ return utils_1.compareDay(item, date) === 0;
+ });
+ };
+ if (isSelected(day)) {
+ var prevDay = utils_1.getPrevDay(day);
+ var nextDay = utils_1.getNextDay(day);
+ var prevSelected = isSelected(prevDay);
+ var nextSelected = isSelected(nextDay);
+ if (prevSelected && nextSelected) {
+ return 'multiple-middle';
+ }
+ if (prevSelected) {
+ return 'end';
+ }
+ return nextSelected ? 'start' : 'multiple-selected';
+ }
+ return '';
+ },
+ getRangeDayType: function (day) {
+ var _a = this.data,
+ currentDate = _a.currentDate,
+ allowSameDay = _a.allowSameDay;
+ if (!Array.isArray(currentDate)) {
+ return;
+ }
+ var startDay = currentDate[0],
+ endDay = currentDate[1];
+ if (!startDay) {
+ return;
+ }
+ var compareToStart = utils_1.compareDay(day, startDay);
+ if (!endDay) {
+ return compareToStart === 0 ? 'start' : '';
+ }
+ var compareToEnd = utils_1.compareDay(day, endDay);
+ if (compareToStart === 0 && compareToEnd === 0 && allowSameDay) {
+ return 'start-end';
+ }
+ if (compareToStart === 0) {
+ return 'start';
+ }
+ if (compareToEnd === 0) {
+ return 'end';
+ }
+ if (compareToStart > 0 && compareToEnd < 0) {
+ return 'middle';
+ }
+ },
+ getDayType: function (day) {
+ var _a = this.data,
+ type = _a.type,
+ minDate = _a.minDate,
+ maxDate = _a.maxDate,
+ currentDate = _a.currentDate;
+ if (
+ utils_1.compareDay(day, minDate) < 0 ||
+ utils_1.compareDay(day, maxDate) > 0
+ ) {
+ return 'disabled';
+ }
+ if (type === 'single') {
+ return utils_1.compareDay(day, currentDate) === 0 ? 'selected' : '';
+ }
+ if (type === 'multiple') {
+ return this.getMultipleDayType(day);
+ }
+ /* istanbul ignore else */
+ if (type === 'range') {
+ return this.getRangeDayType(day);
+ }
+ },
+ getBottomInfo: function (type) {
+ if (this.data.type === 'range') {
+ if (type === 'start') {
+ return '开始';
+ }
+ if (type === 'end') {
+ return '结束';
+ }
+ if (type === 'start-end') {
+ return '开始/结束';
+ }
+ }
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/components/month/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/components/month/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/components/month/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/components/month/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/components/month/index.wxml
new file mode 100644
index 00000000..55bab83f
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/components/month/index.wxml
@@ -0,0 +1,39 @@
+
+
+
+
+
+ {{ computed.formatMonthTitle(date) }}
+
+
+
+
+ {{ computed.getMark(date) }}
+
+
+
+
+ {{ item.topInfo }}
+ {{ item.text }}
+
+ {{ item.bottomInfo }}
+
+
+
+
+ {{ item.topInfo }}
+ {{ item.text }}
+
+ {{ item.bottomInfo }}
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/components/month/index.wxs b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/components/month/index.wxs
new file mode 100644
index 00000000..a0570798
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/components/month/index.wxs
@@ -0,0 +1,67 @@
+/* eslint-disable */
+var utils = require('../../utils.wxs');
+
+function getMark(date) {
+ return getDate(date).getMonth() + 1;
+}
+
+var ROW_HEIGHT = 64;
+
+function getDayStyle(type, index, date, rowHeight, color) {
+ var style = [];
+ var offset = getDate(date).getDay();
+
+ if (index === 0) {
+ style.push(['margin-left', (100 * offset) / 7 + '%']);
+ }
+
+ if (rowHeight !== ROW_HEIGHT) {
+ style.push(['height', rowHeight + 'px']);
+ }
+
+ if (color) {
+ if (
+ type === 'start' ||
+ type === 'end' ||
+ type === 'multiple-selected' ||
+ type === 'multiple-middle'
+ ) {
+ style.push(['background', color]);
+ } else if (type === 'middle') {
+ style.push(['color', color]);
+ }
+ }
+
+ return style
+ .map(function(item) {
+ return item.join(':');
+ })
+ .join(';');
+}
+
+function formatMonthTitle(date) {
+ date = getDate(date);
+ return date.getFullYear() + '年' + (date.getMonth() + 1) + '月';
+}
+
+function getMonthStyle(visible, date, rowHeight) {
+ if (!visible) {
+ date = getDate(date);
+
+ var totalDay = utils.getMonthEndDay(
+ date.getFullYear(),
+ date.getMonth() + 1
+ );
+ var offset = getDate(date).getDay();
+ var padding = Math.ceil((totalDay + offset) / 7) * rowHeight;
+
+ return 'padding-bottom:' + padding + 'px';
+ }
+}
+
+module.exports = {
+ getMark: getMark,
+ getDayStyle: getDayStyle,
+ formatMonthTitle: formatMonthTitle,
+ getMonthStyle: getMonthStyle
+};
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/components/month/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/components/month/index.wxss
new file mode 100644
index 00000000..17c12f4e
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/components/month/index.wxss
@@ -0,0 +1 @@
+@import '../../../common/index.wxss';.van-calendar{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;height:100%;background-color:#fff;background-color:var(--calendar-background-color,#fff)}.van-calendar__month-title{text-align:center;height:44px;height:var(--calendar-header-title-height,44px);font-weight:500;font-weight:var(--font-weight-bold,500);font-size:14px;font-size:var(--calendar-month-title-font-size,14px);line-height:44px;line-height:var(--calendar-header-title-height,44px)}.van-calendar__days{position:relative;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-user-select:none;user-select:none}.van-calendar__month-mark{position:absolute;top:50%;left:50%;z-index:0;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);pointer-events:none;color:rgba(242,243,245,.8);color:var(--calendar-month-mark-color,rgba(242,243,245,.8));font-size:160px;font-size:var(--calendar-month-mark-font-size,160px)}.van-calendar__day,.van-calendar__selected-day{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;text-align:center}.van-calendar__day{position:relative;width:14.285%;height:64px;height:var(--calendar-day-height,64px);font-size:16px;font-size:var(--calendar-day-font-size,16px)}.van-calendar__day--end,.van-calendar__day--multiple-middle,.van-calendar__day--multiple-selected,.van-calendar__day--start,.van-calendar__day--start-end{color:#fff;color:var(--calendar-range-edge-color,#fff);background-color:#ee0a24;background-color:var(--calendar-range-edge-background-color,#ee0a24)}.van-calendar__day--start{border-radius:4px 0 0 4px;border-radius:var(--border-radius-md,4px) 0 0 var(--border-radius-md,4px)}.van-calendar__day--end{border-radius:0 4px 4px 0;border-radius:0 var(--border-radius-md,4px) var(--border-radius-md,4px) 0}.van-calendar__day--multiple-selected,.van-calendar__day--start-end{border-radius:4px;border-radius:var(--border-radius-md,4px)}.van-calendar__day--middle{color:#ee0a24;color:var(--calendar-range-middle-color,#ee0a24)}.van-calendar__day--middle:after{position:absolute;top:0;right:0;bottom:0;left:0;background-color:currentColor;content:"";opacity:.1;opacity:var(--calendar-range-middle-background-opacity,.1)}.van-calendar__day--disabled{cursor:default;color:#c8c9cc;color:var(--calendar-day-disabled-color,#c8c9cc)}.van-calendar__bottom-info,.van-calendar__top-info{position:absolute;right:0;left:0;font-size:10px;font-size:var(--calendar-info-font-size,10px);line-height:14px;line-height:var(--calendar-info-line-height,14px)}@media (max-width:350px){.van-calendar__bottom-info,.van-calendar__top-info{font-size:9px}}.van-calendar__top-info{top:6px}.van-calendar__bottom-info{bottom:6px}.van-calendar__selected-day{width:54px;width:var(--calendar-selected-day-size,54px);height:54px;height:var(--calendar-selected-day-size,54px);color:#fff;color:var(--calendar-selected-day-color,#fff);background-color:#ee0a24;background-color:var(--calendar-selected-day-background-color,#ee0a24);border-radius:4px;border-radius:var(--border-radius-md,4px)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/index.js
new file mode 100644
index 00000000..e2b2ce13
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/index.js
@@ -0,0 +1,318 @@
+'use strict';
+var __spreadArrays =
+ (this && this.__spreadArrays) ||
+ function () {
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
+ s += arguments[i].length;
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
+ r[k] = a[j];
+ return r;
+ };
+var __importDefault =
+ (this && this.__importDefault) ||
+ function (mod) {
+ return mod && mod.__esModule ? mod : { default: mod };
+ };
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var utils_1 = require('./utils');
+var toast_1 = __importDefault(require('../toast/toast'));
+component_1.VantComponent({
+ props: {
+ title: {
+ type: String,
+ value: '日期选择',
+ },
+ color: String,
+ show: {
+ type: Boolean,
+ observer: function (val) {
+ if (val) {
+ this.initRect();
+ this.scrollIntoView();
+ }
+ },
+ },
+ formatter: null,
+ confirmText: {
+ type: String,
+ value: '确定',
+ },
+ rangePrompt: String,
+ defaultDate: {
+ type: [Number, Array],
+ observer: function (val) {
+ this.setData({ currentDate: val });
+ this.scrollIntoView();
+ },
+ },
+ allowSameDay: Boolean,
+ confirmDisabledText: String,
+ type: {
+ type: String,
+ value: 'single',
+ observer: 'reset',
+ },
+ minDate: {
+ type: null,
+ value: Date.now(),
+ },
+ maxDate: {
+ type: null,
+ value: new Date(
+ new Date().getFullYear(),
+ new Date().getMonth() + 6,
+ new Date().getDate()
+ ).getTime(),
+ },
+ position: {
+ type: String,
+ value: 'bottom',
+ },
+ rowHeight: {
+ type: [Number, String],
+ value: utils_1.ROW_HEIGHT,
+ },
+ round: {
+ type: Boolean,
+ value: true,
+ },
+ poppable: {
+ type: Boolean,
+ value: true,
+ },
+ showMark: {
+ type: Boolean,
+ value: true,
+ },
+ showTitle: {
+ type: Boolean,
+ value: true,
+ },
+ showConfirm: {
+ type: Boolean,
+ value: true,
+ },
+ showSubtitle: {
+ type: Boolean,
+ value: true,
+ },
+ safeAreaInsetBottom: {
+ type: Boolean,
+ value: true,
+ },
+ closeOnClickOverlay: {
+ type: Boolean,
+ value: true,
+ },
+ maxRange: {
+ type: [Number, String],
+ value: null,
+ },
+ },
+ data: {
+ subtitle: '',
+ currentDate: null,
+ scrollIntoView: '',
+ },
+ created: function () {
+ this.setData({
+ currentDate: this.getInitialDate(),
+ });
+ },
+ mounted: function () {
+ if (this.data.show || !this.data.poppable) {
+ this.initRect();
+ this.scrollIntoView();
+ }
+ },
+ methods: {
+ reset: function () {
+ this.setData({ currentDate: this.getInitialDate() });
+ this.scrollIntoView();
+ },
+ initRect: function () {
+ var _this = this;
+ if (this.contentObserver != null) {
+ this.contentObserver.disconnect();
+ }
+ var contentObserver = this.createIntersectionObserver({
+ thresholds: [0, 0.1, 0.9, 1],
+ observeAll: true,
+ });
+ this.contentObserver = contentObserver;
+ contentObserver.relativeTo('.van-calendar__body');
+ contentObserver.observe('.month', function (res) {
+ if (res.boundingClientRect.top <= res.relativeRect.top) {
+ // @ts-ignore
+ _this.setData({
+ subtitle: utils_1.formatMonthTitle(res.dataset.date),
+ });
+ }
+ });
+ },
+ getInitialDate: function () {
+ var _a = this.data,
+ type = _a.type,
+ defaultDate = _a.defaultDate,
+ minDate = _a.minDate;
+ if (type === 'range') {
+ var _b = defaultDate || [],
+ startDay = _b[0],
+ endDay = _b[1];
+ return [
+ startDay || minDate,
+ endDay || utils_1.getNextDay(new Date(minDate)).getTime(),
+ ];
+ }
+ if (type === 'multiple') {
+ return defaultDate || [minDate];
+ }
+ return defaultDate || minDate;
+ },
+ scrollIntoView: function () {
+ var _this = this;
+ setTimeout(function () {
+ var _a = _this.data,
+ currentDate = _a.currentDate,
+ type = _a.type,
+ show = _a.show,
+ poppable = _a.poppable,
+ minDate = _a.minDate,
+ maxDate = _a.maxDate;
+ var targetDate = type === 'single' ? currentDate : currentDate[0];
+ var displayed = show || !poppable;
+ if (!targetDate || !displayed) {
+ return;
+ }
+ var months = utils_1.getMonths(minDate, maxDate);
+ months.some(function (month, index) {
+ if (utils_1.compareMonth(month, targetDate) === 0) {
+ _this.setData({ scrollIntoView: 'month' + index });
+ return true;
+ }
+ return false;
+ });
+ }, 100);
+ },
+ onOpen: function () {
+ this.$emit('open');
+ },
+ onOpened: function () {
+ this.$emit('opened');
+ },
+ onClose: function () {
+ this.$emit('close');
+ },
+ onClosed: function () {
+ this.$emit('closed');
+ },
+ onClickDay: function (event) {
+ var date = event.detail.date;
+ var _a = this.data,
+ type = _a.type,
+ currentDate = _a.currentDate,
+ allowSameDay = _a.allowSameDay;
+ if (type === 'range') {
+ var startDay = currentDate[0],
+ endDay = currentDate[1];
+ if (startDay && !endDay) {
+ var compareToStart = utils_1.compareDay(date, startDay);
+ if (compareToStart === 1) {
+ this.select([startDay, date], true);
+ } else if (compareToStart === -1) {
+ this.select([date, null]);
+ } else if (allowSameDay) {
+ this.select([date, date]);
+ }
+ } else {
+ this.select([date, null]);
+ }
+ } else if (type === 'multiple') {
+ var selectedIndex_1;
+ var selected = currentDate.some(function (dateItem, index) {
+ var equal = utils_1.compareDay(dateItem, date) === 0;
+ if (equal) {
+ selectedIndex_1 = index;
+ }
+ return equal;
+ });
+ if (selected) {
+ var cancelDate = currentDate.splice(selectedIndex_1, 1);
+ this.setData({ currentDate: currentDate });
+ this.unselect(cancelDate);
+ } else {
+ this.select(__spreadArrays(currentDate, [date]));
+ }
+ } else {
+ this.select(date, true);
+ }
+ },
+ unselect: function (dateArray) {
+ var date = dateArray[0];
+ if (date) {
+ this.$emit('unselect', utils_1.copyDates(date));
+ }
+ },
+ select: function (date, complete) {
+ if (complete && this.data.type === 'range') {
+ var valid = this.checkRange(date);
+ if (!valid) {
+ // auto selected to max range if showConfirm
+ if (this.data.showConfirm) {
+ this.emit([
+ date[0],
+ utils_1.getDayByOffset(date[0], this.data.maxRange - 1),
+ ]);
+ } else {
+ this.emit(date);
+ }
+ return;
+ }
+ }
+ this.emit(date);
+ if (complete && !this.data.showConfirm) {
+ this.onConfirm();
+ }
+ },
+ emit: function (date) {
+ var getTime = function (date) {
+ return date instanceof Date ? date.getTime() : date;
+ };
+ this.setData({
+ currentDate: Array.isArray(date) ? date.map(getTime) : getTime(date),
+ });
+ this.$emit('select', utils_1.copyDates(date));
+ },
+ checkRange: function (date) {
+ var _a = this.data,
+ maxRange = _a.maxRange,
+ rangePrompt = _a.rangePrompt;
+ if (maxRange && utils_1.calcDateNum(date) > maxRange) {
+ toast_1.default({
+ context: this,
+ message:
+ rangePrompt ||
+ '\u9009\u62E9\u5929\u6570\u4E0D\u80FD\u8D85\u8FC7 ' +
+ maxRange +
+ ' \u5929',
+ });
+ return false;
+ }
+ return true;
+ },
+ onConfirm: function () {
+ var _this = this;
+ if (
+ this.data.type === 'range' &&
+ !this.checkRange(this.data.currentDate)
+ ) {
+ return;
+ }
+ wx.nextTick(function () {
+ _this.$emit('confirm', utils_1.copyDates(_this.data.currentDate));
+ });
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/index.json
new file mode 100644
index 00000000..61dec086
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/index.json
@@ -0,0 +1,9 @@
+{
+ "component": true,
+ "usingComponents": {
+ "header": "./components/header/index",
+ "month": "./components/month/index",
+ "van-button": "../button/index",
+ "van-popup": "../popup/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/index.wxml
new file mode 100644
index 00000000..d4849cc7
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/index.wxml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/index.wxs b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/index.wxs
new file mode 100644
index 00000000..2c04be10
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/index.wxs
@@ -0,0 +1,37 @@
+/* eslint-disable */
+var utils = require('./utils.wxs');
+
+function getMonths(minDate, maxDate) {
+ var months = [];
+ var cursor = getDate(minDate);
+
+ cursor.setDate(1);
+
+ do {
+ months.push(cursor.getTime());
+ cursor.setMonth(cursor.getMonth() + 1);
+ } while (utils.compareMonth(cursor, getDate(maxDate)) !== 1);
+
+ return months;
+}
+
+function getButtonDisabled(type, currentDate) {
+ if (currentDate == null) {
+ return true;
+ }
+
+ if (type === 'range') {
+ return !currentDate[0] || !currentDate[1];
+ }
+
+ if (type === 'multiple') {
+ return !currentDate.length;
+ }
+
+ return !currentDate;
+}
+
+module.exports = {
+ getMonths: getMonths,
+ getButtonDisabled: getButtonDisabled
+};
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/index.wxss
new file mode 100644
index 00000000..9d78e0f4
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-calendar{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;height:100%;height:var(--calendar-height,100%);background-color:#fff;background-color:var(--calendar-background-color,#fff)}.van-calendar__close-icon{top:11px}.van-calendar__popup--bottom,.van-calendar__popup--top{height:80%;height:var(--calendar-popup-height,80%)}.van-calendar__popup--left,.van-calendar__popup--right{height:100%}.van-calendar__body{-webkit-flex:1;flex:1;overflow:auto;-webkit-overflow-scrolling:touch}.van-calendar__footer{-webkit-flex-shrink:0;flex-shrink:0;padding:0 16px;padding:0 var(--padding-md,16px)}.van-calendar__footer--safe-area-inset-bottom{padding-bottom:env(safe-area-inset-bottom)}.van-calendar__footer+.van-calendar__footer,.van-calendar__footer:empty{display:none}.van-calendar__footer:empty+.van-calendar__footer{display:block!important}.van-calendar__confirm{height:36px!important;height:var(--calendar-confirm-button-height,36px)!important;margin:7px 0!important;margin:var(--calendar-confirm-button-margin,7px 0)!important;line-height:34px!important;line-height:var(--calendar-confirm-button-line-height,34px)!important}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/utils.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/utils.js
new file mode 100644
index 00000000..cdd1a0cb
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/utils.js
@@ -0,0 +1,91 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.getMonths = exports.getMonthEndDay = exports.copyDates = exports.calcDateNum = exports.getNextDay = exports.getPrevDay = exports.getDayByOffset = exports.compareDay = exports.compareMonth = exports.formatMonthTitle = exports.ROW_HEIGHT = void 0;
+exports.ROW_HEIGHT = 64;
+function formatMonthTitle(date) {
+ if (!(date instanceof Date)) {
+ date = new Date(date);
+ }
+ return date.getFullYear() + '\u5E74' + (date.getMonth() + 1) + '\u6708';
+}
+exports.formatMonthTitle = formatMonthTitle;
+function compareMonth(date1, date2) {
+ if (!(date1 instanceof Date)) {
+ date1 = new Date(date1);
+ }
+ if (!(date2 instanceof Date)) {
+ date2 = new Date(date2);
+ }
+ var year1 = date1.getFullYear();
+ var year2 = date2.getFullYear();
+ var month1 = date1.getMonth();
+ var month2 = date2.getMonth();
+ if (year1 === year2) {
+ return month1 === month2 ? 0 : month1 > month2 ? 1 : -1;
+ }
+ return year1 > year2 ? 1 : -1;
+}
+exports.compareMonth = compareMonth;
+function compareDay(day1, day2) {
+ if (!(day1 instanceof Date)) {
+ day1 = new Date(day1);
+ }
+ if (!(day2 instanceof Date)) {
+ day2 = new Date(day2);
+ }
+ var compareMonthResult = compareMonth(day1, day2);
+ if (compareMonthResult === 0) {
+ var date1 = day1.getDate();
+ var date2 = day2.getDate();
+ return date1 === date2 ? 0 : date1 > date2 ? 1 : -1;
+ }
+ return compareMonthResult;
+}
+exports.compareDay = compareDay;
+function getDayByOffset(date, offset) {
+ date = new Date(date);
+ date.setDate(date.getDate() + offset);
+ return date;
+}
+exports.getDayByOffset = getDayByOffset;
+function getPrevDay(date) {
+ return getDayByOffset(date, -1);
+}
+exports.getPrevDay = getPrevDay;
+function getNextDay(date) {
+ return getDayByOffset(date, 1);
+}
+exports.getNextDay = getNextDay;
+function calcDateNum(date) {
+ var day1 = new Date(date[0]).getTime();
+ var day2 = new Date(date[1]).getTime();
+ return (day2 - day1) / (1000 * 60 * 60 * 24) + 1;
+}
+exports.calcDateNum = calcDateNum;
+function copyDates(dates) {
+ if (Array.isArray(dates)) {
+ return dates.map(function (date) {
+ if (date === null) {
+ return date;
+ }
+ return new Date(date);
+ });
+ }
+ return new Date(dates);
+}
+exports.copyDates = copyDates;
+function getMonthEndDay(year, month) {
+ return 32 - new Date(year, month - 1, 32).getDate();
+}
+exports.getMonthEndDay = getMonthEndDay;
+function getMonths(minDate, maxDate) {
+ var months = [];
+ var cursor = new Date(minDate);
+ cursor.setDate(1);
+ do {
+ months.push(cursor.getTime());
+ cursor.setMonth(cursor.getMonth() + 1);
+ } while (compareMonth(cursor, maxDate) !== 1);
+ return months;
+}
+exports.getMonths = getMonths;
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/utils.wxs b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/utils.wxs
new file mode 100644
index 00000000..e57f6b32
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/calendar/utils.wxs
@@ -0,0 +1,25 @@
+/* eslint-disable */
+function getMonthEndDay(year, month) {
+ return 32 - getDate(year, month - 1, 32).getDate();
+}
+
+function compareMonth(date1, date2) {
+ date1 = getDate(date1);
+ date2 = getDate(date2);
+
+ var year1 = date1.getFullYear();
+ var year2 = date2.getFullYear();
+ var month1 = date1.getMonth();
+ var month2 = date2.getMonth();
+
+ if (year1 === year2) {
+ return month1 === month2 ? 0 : month1 > month2 ? 1 : -1;
+ }
+
+ return year1 > year2 ? 1 : -1;
+}
+
+module.exports = {
+ getMonthEndDay: getMonthEndDay,
+ compareMonth: compareMonth
+};
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/card/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/card/index.js
new file mode 100644
index 00000000..cb0f9827
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/card/index.js
@@ -0,0 +1,51 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var link_1 = require('../mixins/link');
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ classes: [
+ 'num-class',
+ 'desc-class',
+ 'thumb-class',
+ 'title-class',
+ 'price-class',
+ 'origin-price-class',
+ ],
+ mixins: [link_1.link],
+ props: {
+ tag: String,
+ num: String,
+ desc: String,
+ thumb: String,
+ title: String,
+ price: {
+ type: String,
+ observer: 'updatePrice',
+ },
+ centered: Boolean,
+ lazyLoad: Boolean,
+ thumbLink: String,
+ originPrice: String,
+ thumbMode: {
+ type: String,
+ value: 'aspectFit',
+ },
+ currency: {
+ type: String,
+ value: '¥',
+ },
+ },
+ methods: {
+ updatePrice: function () {
+ var price = this.data.price;
+ var priceArr = price.toString().split('.');
+ this.setData({
+ integerStr: priceArr[0],
+ decimalStr: priceArr[1] ? '.' + priceArr[1] : '',
+ });
+ },
+ onClickThumb: function () {
+ this.jumpLink('thumbLink');
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/card/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/card/index.json
new file mode 100644
index 00000000..e9174076
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/card/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-tag": "../tag/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/card/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/card/index.wxml
new file mode 100644
index 00000000..39b4b33a
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/card/index.wxml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/card/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/card/index.wxss
new file mode 100644
index 00000000..0a90c3c3
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/card/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-card{position:relative;box-sizing:border-box;padding:8px 16px;padding:var(--card-padding,8px 16px);font-size:12px;font-size:var(--card-font-size,12px);color:#323233;color:var(--card-text-color,#323233);background-color:#fafafa;background-color:var(--card-background-color,#fafafa)}.van-card__header{display:-webkit-flex;display:flex}.van-card__header--center{-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.van-card__thumb{position:relative;-webkit-flex:none;flex:none;width:88px;width:var(--card-thumb-size,88px);height:88px;height:var(--card-thumb-size,88px);margin-right:8px;margin-right:var(--padding-xs,8px)}.van-card__thumb:empty{display:none}.van-card__img{width:100%;height:100%;border-radius:8px;border-radius:var(--border-radius-lg,8px)}.van-card__content{position:relative;display:-webkit-flex;display:flex;-webkit-flex:1;flex:1;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:space-between;justify-content:space-between;min-width:0;min-height:88px;min-height:var(--card-thumb-size,88px)}.van-card__content--center{-webkit-justify-content:center;justify-content:center}.van-card__desc,.van-card__title{word-wrap:break-word}.van-card__title{font-weight:700;line-height:16px;line-height:var(--card-title-line-height,16px)}.van-card__desc{line-height:20px;line-height:var(--card-desc-line-height,20px);color:#646566;color:var(--card-desc-color,#646566)}.van-card__bottom{line-height:20px}.van-card__price{display:inline-block;font-weight:700;color:#ee0a24;color:var(--card-price-color,#ee0a24);font-size:12px;font-size:var(--card-price-font-size,12px)}.van-card__price-integer{font-size:16px;font-size:var(--card-price-integer-font-size,16px)}.van-card__price-decimal,.van-card__price-integer{font-family:Avenir-Heavy,PingFang SC,Helvetica Neue,Arial,sans-serif;font-family:var(--card-price-font-family,Avenir-Heavy,PingFang SC,Helvetica Neue,Arial,sans-serif)}.van-card__origin-price{display:inline-block;margin-left:5px;text-decoration:line-through;font-size:10px;font-size:var(--card-origin-price-font-size,10px);color:#646566;color:var(--card-origin-price-color,#646566)}.van-card__num{float:right}.van-card__tag{position:absolute;top:2px;left:0}.van-card__footer{-webkit-flex:none;flex:none;width:100%;text-align:right}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/cell-group/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/cell-group/index.js
new file mode 100644
index 00000000..7d934870
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/cell-group/index.js
@@ -0,0 +1,12 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ props: {
+ title: String,
+ border: {
+ type: Boolean,
+ value: true,
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/cell-group/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/cell-group/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/cell-group/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/cell-group/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/cell-group/index.wxml
new file mode 100644
index 00000000..6e0b471d
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/cell-group/index.wxml
@@ -0,0 +1,9 @@
+
+ {{ title }}
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/cell-group/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/cell-group/index.wxss
new file mode 100644
index 00000000..edbccd59
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/cell-group/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-cell-group__title{padding:16px 16px 8px;padding:var(--cell-group-title-padding,16px 16px 8px);font-size:14px;font-size:var(--cell-group-title-font-size,14px);line-height:16px;line-height:var(--cell-group-title-line-height,16px);color:#969799;color:var(--cell-group-title-color,#969799)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/cell/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/cell/index.js
new file mode 100644
index 00000000..4c04091b
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/cell/index.js
@@ -0,0 +1,39 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var link_1 = require('../mixins/link');
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ classes: [
+ 'title-class',
+ 'label-class',
+ 'value-class',
+ 'right-icon-class',
+ 'hover-class',
+ ],
+ mixins: [link_1.link],
+ props: {
+ title: null,
+ value: null,
+ icon: String,
+ size: String,
+ label: String,
+ center: Boolean,
+ isLink: Boolean,
+ required: Boolean,
+ clickable: Boolean,
+ titleWidth: String,
+ customStyle: String,
+ arrowDirection: String,
+ useLabelSlot: Boolean,
+ border: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ methods: {
+ onClick: function (event) {
+ this.$emit('click', event.detail);
+ this.jumpLink();
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/cell/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/cell/index.json
new file mode 100644
index 00000000..0a336c08
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/cell/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/cell/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/cell/index.wxml
new file mode 100644
index 00000000..afaaaf86
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/cell/index.wxml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+ {{ title }}
+
+
+
+
+ {{ label }}
+
+
+
+
+ {{ value }}
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/cell/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/cell/index.wxss
new file mode 100644
index 00000000..7afd1c4f
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/cell/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-cell{position:relative;display:-webkit-flex;display:flex;box-sizing:border-box;width:100%;padding:10px 16px;padding:var(--cell-vertical-padding,10px) var(--cell-horizontal-padding,16px);font-size:14px;font-size:var(--cell-font-size,14px);line-height:24px;line-height:var(--cell-line-height,24px);color:#323233;color:var(--cell-text-color,#323233);background-color:#fff;background-color:var(--cell-background-color,#fff)}.van-cell:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:" ";pointer-events:none;top:auto;right:0;bottom:0;left:16px;border-bottom:1px solid #ebedf0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.van-cell--borderless:after{display:none}.van-cell-group{background-color:#fff;background-color:var(--cell-background-color,#fff)}.van-cell__label{margin-top:3px;margin-top:var(--cell-label-margin-top,3px);font-size:12px;font-size:var(--cell-label-font-size,12px);line-height:18px;line-height:var(--cell-label-line-height,18px);color:#969799;color:var(--cell-label-color,#969799)}.van-cell__value{overflow:hidden;text-align:right;vertical-align:middle;color:#969799;color:var(--cell-value-color,#969799)}.van-cell__title,.van-cell__value{-webkit-flex:1;flex:1}.van-cell__title:empty,.van-cell__value:empty{display:none}.van-cell__left-icon-wrap,.van-cell__right-icon-wrap{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;height:24px;height:var(--cell-line-height,24px);font-size:16px;font-size:var(--cell-icon-size,16px)}.van-cell__left-icon-wrap{margin-right:5px}.van-cell__right-icon-wrap{margin-left:5px;color:#969799;color:var(--cell-right-icon-color,#969799)}.van-cell__left-icon{vertical-align:middle}.van-cell__left-icon,.van-cell__right-icon{line-height:24px;line-height:var(--cell-line-height,24px)}.van-cell--clickable.van-cell--hover{background-color:#f2f3f5;background-color:var(--cell-active-color,#f2f3f5)}.van-cell--required{overflow:visible}.van-cell--required:before{position:absolute;content:"*";left:8px;left:var(--padding-xs,8px);font-size:14px;font-size:var(--cell-font-size,14px);color:#ee0a24;color:var(--cell-required-color,#ee0a24)}.van-cell--center{-webkit-align-items:center;align-items:center}.van-cell--large{padding-top:12px;padding-top:var(--cell-large-vertical-padding,12px);padding-bottom:12px;padding-bottom:var(--cell-large-vertical-padding,12px)}.van-cell--large .van-cell__title{font-size:16px;font-size:var(--cell-large-title-font-size,16px)}.van-cell--large .van-cell__value{font-size:16px;font-size:var(--cell-large-value-font-size,16px)}.van-cell--large .van-cell__label{font-size:14px;font-size:var(--cell-large-label-font-size,14px)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/checkbox-group/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/checkbox-group/index.js
new file mode 100644
index 00000000..8f89f174
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/checkbox-group/index.js
@@ -0,0 +1,42 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ field: true,
+ relation: {
+ name: 'checkbox',
+ type: 'descendant',
+ current: 'checkbox-group',
+ linked: function (target) {
+ this.updateChild(target);
+ },
+ },
+ props: {
+ max: Number,
+ value: {
+ type: Array,
+ observer: 'updateChildren',
+ },
+ disabled: {
+ type: Boolean,
+ observer: 'updateChildren',
+ },
+ },
+ methods: {
+ updateChildren: function () {
+ var _this = this;
+ (this.children || []).forEach(function (child) {
+ return _this.updateChild(child);
+ });
+ },
+ updateChild: function (child) {
+ var _a = this.data,
+ value = _a.value,
+ disabled = _a.disabled;
+ child.setData({
+ value: value.indexOf(child.data.name) !== -1,
+ parentDisabled: disabled,
+ });
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/checkbox-group/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/checkbox-group/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/checkbox-group/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/checkbox-group/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/checkbox-group/index.wxml
new file mode 100644
index 00000000..4fa864ce
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/checkbox-group/index.wxml
@@ -0,0 +1 @@
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/checkbox-group/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/checkbox-group/index.wxss
new file mode 100644
index 00000000..99694d60
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/checkbox-group/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/checkbox/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/checkbox/index.js
new file mode 100644
index 00000000..c1a3e5e9
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/checkbox/index.js
@@ -0,0 +1,83 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+function emit(target, value) {
+ target.$emit('input', value);
+ target.$emit('change', value);
+}
+component_1.VantComponent({
+ field: true,
+ relation: {
+ name: 'checkbox-group',
+ type: 'ancestor',
+ current: 'checkbox',
+ },
+ classes: ['icon-class', 'label-class'],
+ props: {
+ value: Boolean,
+ disabled: Boolean,
+ useIconSlot: Boolean,
+ checkedColor: String,
+ labelPosition: String,
+ labelDisabled: Boolean,
+ shape: {
+ type: String,
+ value: 'round',
+ },
+ iconSize: {
+ type: null,
+ value: 20,
+ },
+ },
+ data: {
+ parentDisabled: false,
+ },
+ methods: {
+ emitChange: function (value) {
+ if (this.parent) {
+ this.setParentValue(this.parent, value);
+ } else {
+ emit(this, value);
+ }
+ },
+ toggle: function () {
+ var _a = this.data,
+ parentDisabled = _a.parentDisabled,
+ disabled = _a.disabled,
+ value = _a.value;
+ if (!disabled && !parentDisabled) {
+ this.emitChange(!value);
+ }
+ },
+ onClickLabel: function () {
+ var _a = this.data,
+ labelDisabled = _a.labelDisabled,
+ parentDisabled = _a.parentDisabled,
+ disabled = _a.disabled,
+ value = _a.value;
+ if (!disabled && !labelDisabled && !parentDisabled) {
+ this.emitChange(!value);
+ }
+ },
+ setParentValue: function (parent, value) {
+ var parentValue = parent.data.value.slice();
+ var name = this.data.name;
+ var max = parent.data.max;
+ if (value) {
+ if (max && parentValue.length >= max) {
+ return;
+ }
+ if (parentValue.indexOf(name) === -1) {
+ parentValue.push(name);
+ emit(parent, parentValue);
+ }
+ } else {
+ var index = parentValue.indexOf(name);
+ if (index !== -1) {
+ parentValue.splice(index, 1);
+ emit(parent, parentValue);
+ }
+ }
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/checkbox/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/checkbox/index.json
new file mode 100644
index 00000000..0a336c08
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/checkbox/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/checkbox/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/checkbox/index.wxml
new file mode 100644
index 00000000..94789d81
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/checkbox/index.wxml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/checkbox/index.wxs b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/checkbox/index.wxs
new file mode 100644
index 00000000..927eb55d
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/checkbox/index.wxs
@@ -0,0 +1,20 @@
+/* eslint-disable */
+var utils = require('../wxs/utils.wxs');
+
+function iconStyle(checkedColor, value, disabled, parentDisabled, iconSize) {
+ var styles = [['font-size', utils.addUnit(iconSize)]];
+ if (checkedColor && value && !disabled && !parentDisabled) {
+ styles.push(['border-color', checkedColor]);
+ styles.push(['background-color', checkedColor]);
+ }
+
+ return styles
+ .map(function(item) {
+ return item.join(':');
+ })
+ .join(';');
+}
+
+module.exports = {
+ iconStyle: iconStyle
+};
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/checkbox/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/checkbox/index.wxss
new file mode 100644
index 00000000..afaf37be
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/checkbox/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-checkbox{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;overflow:hidden;-webkit-user-select:none;user-select:none}.van-checkbox__icon-wrap,.van-checkbox__label{line-height:20px;line-height:var(--checkbox-size,20px)}.van-checkbox__icon-wrap{-webkit-flex:none;flex:none}.van-checkbox__icon{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;width:1em;height:1em;color:transparent;text-align:center;transition-property:color,border-color,background-color;font-size:20px;font-size:var(--checkbox-size,20px);border:1px solid #c8c9cc;border:1px solid var(--checkbox-border-color,#c8c9cc);transition-duration:.2s;transition-duration:var(--checkbox-transition-duration,.2s)}.van-checkbox__icon--round{border-radius:100%}.van-checkbox__icon--checked{color:#fff;color:var(--white,#fff);background-color:#1989fa;background-color:var(--checkbox-checked-icon-color,#1989fa);border-color:#1989fa;border-color:var(--checkbox-checked-icon-color,#1989fa)}.van-checkbox__icon--disabled{background-color:#ebedf0;background-color:var(--checkbox-disabled-background-color,#ebedf0);border-color:#c8c9cc;border-color:var(--checkbox-disabled-icon-color,#c8c9cc)}.van-checkbox__icon--disabled.van-checkbox__icon--checked{color:#c8c9cc;color:var(--checkbox-disabled-icon-color,#c8c9cc)}.van-checkbox__label{word-wrap:break-word;margin-left:10px;margin-left:var(--checkbox-label-margin,10px);color:#323233;color:var(--checkbox-label-color,#323233)}.van-checkbox__label--left{float:left;margin:0 10px 0 0;margin:0 var(--checkbox-label-margin,10px) 0 0}.van-checkbox__label--disabled{color:#c8c9cc;color:var(--checkbox-disabled-label-color,#c8c9cc)}.van-checkbox__label:empty{margin:0}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/circle/canvas.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/circle/canvas.js
new file mode 100644
index 00000000..dbee1d73
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/circle/canvas.js
@@ -0,0 +1,47 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.adaptor = void 0;
+function adaptor(ctx) {
+ // @ts-ignore
+ return Object.assign(ctx, {
+ setStrokeStyle: function (val) {
+ ctx.strokeStyle = val;
+ },
+ setLineWidth: function (val) {
+ ctx.lineWidth = val;
+ },
+ setLineCap: function (val) {
+ ctx.lineCap = val;
+ },
+ setFillStyle: function (val) {
+ ctx.fillStyle = val;
+ },
+ setFontSize: function (val) {
+ ctx.font = String(val);
+ },
+ setGlobalAlpha: function (val) {
+ ctx.globalAlpha = val;
+ },
+ setLineJoin: function (val) {
+ ctx.lineJoin = val;
+ },
+ setTextAlign: function (val) {
+ ctx.textAlign = val;
+ },
+ setMiterLimit: function (val) {
+ ctx.miterLimit = val;
+ },
+ setShadow: function (offsetX, offsetY, blur, color) {
+ ctx.shadowOffsetX = offsetX;
+ ctx.shadowOffsetY = offsetY;
+ ctx.shadowBlur = blur;
+ ctx.shadowColor = color;
+ },
+ setTextBaseline: function (val) {
+ ctx.textBaseline = val;
+ },
+ createCircularGradient: function () {},
+ draw: function () {},
+ });
+}
+exports.adaptor = adaptor;
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/circle/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/circle/index.js
new file mode 100644
index 00000000..5c34f803
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/circle/index.js
@@ -0,0 +1,209 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var utils_1 = require('../common/utils');
+var color_1 = require('../common/color');
+var canvas_1 = require('./canvas');
+function format(rate) {
+ return Math.min(Math.max(rate, 0), 100);
+}
+var PERIMETER = 2 * Math.PI;
+var BEGIN_ANGLE = -Math.PI / 2;
+var STEP = 1;
+component_1.VantComponent({
+ props: {
+ text: String,
+ lineCap: {
+ type: String,
+ value: 'round',
+ },
+ value: {
+ type: Number,
+ value: 0,
+ observer: 'reRender',
+ },
+ speed: {
+ type: Number,
+ value: 50,
+ },
+ size: {
+ type: Number,
+ value: 100,
+ observer: function () {
+ this.drawCircle(this.currentValue);
+ },
+ },
+ fill: String,
+ layerColor: {
+ type: String,
+ value: color_1.WHITE,
+ },
+ color: {
+ type: [String, Object],
+ value: color_1.BLUE,
+ observer: function () {
+ var _this = this;
+ this.setHoverColor().then(function () {
+ _this.drawCircle(_this.currentValue);
+ });
+ },
+ },
+ type: {
+ type: String,
+ value: '',
+ },
+ strokeWidth: {
+ type: Number,
+ value: 4,
+ },
+ clockwise: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ data: {
+ hoverColor: color_1.BLUE,
+ },
+ methods: {
+ getContext: function () {
+ var _this = this;
+ var _a = this.data,
+ type = _a.type,
+ size = _a.size;
+ if (type === '') {
+ var ctx = wx.createCanvasContext('van-circle', this);
+ return Promise.resolve(ctx);
+ }
+ var dpr = wx.getSystemInfoSync().pixelRatio;
+ return new Promise(function (resolve) {
+ wx.createSelectorQuery()
+ .in(_this)
+ .select('#van-circle')
+ .node()
+ .exec(function (res) {
+ var canvas = res[0].node;
+ var ctx = canvas.getContext(type);
+ if (!_this.inited) {
+ _this.inited = true;
+ canvas.width = size * dpr;
+ canvas.height = size * dpr;
+ ctx.scale(dpr, dpr);
+ }
+ resolve(canvas_1.adaptor(ctx));
+ });
+ });
+ },
+ setHoverColor: function () {
+ var _this = this;
+ var _a = this.data,
+ color = _a.color,
+ size = _a.size;
+ if (utils_1.isObj(color)) {
+ return this.getContext().then(function (context) {
+ var LinearColor = context.createLinearGradient(size, 0, 0, 0);
+ Object.keys(color)
+ .sort(function (a, b) {
+ return parseFloat(a) - parseFloat(b);
+ })
+ .map(function (key) {
+ return LinearColor.addColorStop(
+ parseFloat(key) / 100,
+ color[key]
+ );
+ });
+ _this.hoverColor = LinearColor;
+ });
+ }
+ this.hoverColor = color;
+ return Promise.resolve();
+ },
+ presetCanvas: function (context, strokeStyle, beginAngle, endAngle, fill) {
+ var _a = this.data,
+ strokeWidth = _a.strokeWidth,
+ lineCap = _a.lineCap,
+ clockwise = _a.clockwise,
+ size = _a.size;
+ var position = size / 2;
+ var radius = position - strokeWidth / 2;
+ context.setStrokeStyle(strokeStyle);
+ context.setLineWidth(strokeWidth);
+ context.setLineCap(lineCap);
+ context.beginPath();
+ context.arc(position, position, radius, beginAngle, endAngle, !clockwise);
+ context.stroke();
+ if (fill) {
+ context.setFillStyle(fill);
+ context.fill();
+ }
+ },
+ renderLayerCircle: function (context) {
+ var _a = this.data,
+ layerColor = _a.layerColor,
+ fill = _a.fill;
+ this.presetCanvas(context, layerColor, 0, PERIMETER, fill);
+ },
+ renderHoverCircle: function (context, formatValue) {
+ var clockwise = this.data.clockwise;
+ // 结束角度
+ var progress = PERIMETER * (formatValue / 100);
+ var endAngle = clockwise
+ ? BEGIN_ANGLE + progress
+ : 3 * Math.PI - (BEGIN_ANGLE + progress);
+ this.presetCanvas(context, this.hoverColor, BEGIN_ANGLE, endAngle);
+ },
+ drawCircle: function (currentValue) {
+ var _this = this;
+ var size = this.data.size;
+ this.getContext().then(function (context) {
+ context.clearRect(0, 0, size, size);
+ _this.renderLayerCircle(context);
+ var formatValue = format(currentValue);
+ if (formatValue !== 0) {
+ _this.renderHoverCircle(context, formatValue);
+ }
+ context.draw();
+ });
+ },
+ reRender: function () {
+ var _this = this;
+ // tofector 动画暂时没有想到好的解决方案
+ var _a = this.data,
+ value = _a.value,
+ speed = _a.speed;
+ if (speed <= 0 || speed > 1000) {
+ this.drawCircle(value);
+ return;
+ }
+ this.clearInterval();
+ this.currentValue = this.currentValue || 0;
+ this.interval = setInterval(function () {
+ if (_this.currentValue !== value) {
+ if (_this.currentValue < value) {
+ _this.currentValue += STEP;
+ } else {
+ _this.currentValue -= STEP;
+ }
+ _this.drawCircle(_this.currentValue);
+ } else {
+ _this.clearInterval();
+ }
+ }, 1000 / speed);
+ },
+ clearInterval: function () {
+ if (this.interval) {
+ clearInterval(this.interval);
+ this.interval = null;
+ }
+ },
+ },
+ mounted: function () {
+ var _this = this;
+ this.currentValue = this.data.value;
+ this.setHoverColor().then(function () {
+ _this.drawCircle(_this.currentValue);
+ });
+ },
+ destroyed: function () {
+ this.clearInterval();
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/circle/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/circle/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/circle/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/circle/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/circle/index.wxml
new file mode 100644
index 00000000..52bc59fc
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/circle/index.wxml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+ {{ text }}
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/circle/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/circle/index.wxss
new file mode 100644
index 00000000..3ab63dfd
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/circle/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-circle{position:relative;display:inline-block;text-align:center}.van-circle__text{position:absolute;top:50%;left:0;width:100%;-webkit-transform:translateY(-50%);transform:translateY(-50%);color:#323233;color:var(--circle-text-color,#323233)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/col/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/col/index.js
new file mode 100644
index 00000000..0e30ba0a
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/col/index.js
@@ -0,0 +1,28 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ relation: {
+ name: 'row',
+ type: 'ancestor',
+ current: 'col',
+ },
+ props: {
+ span: Number,
+ offset: Number,
+ },
+ data: {
+ viewStyle: '',
+ },
+ methods: {
+ setGutter: function (gutter) {
+ var padding = gutter / 2 + 'px';
+ var viewStyle = gutter
+ ? 'padding-left: ' + padding + '; padding-right: ' + padding + ';'
+ : '';
+ if (viewStyle !== this.data.viewStyle) {
+ this.setData({ viewStyle: viewStyle });
+ }
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/col/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/col/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/col/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/col/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/col/index.wxml
new file mode 100644
index 00000000..52544f09
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/col/index.wxml
@@ -0,0 +1,8 @@
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/col/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/col/index.wxss
new file mode 100644
index 00000000..44c896a3
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/col/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-col{float:left;box-sizing:border-box}.van-col--1{width:4.16666667%}.van-col--offset-1{margin-left:4.16666667%}.van-col--2{width:8.33333333%}.van-col--offset-2{margin-left:8.33333333%}.van-col--3{width:12.5%}.van-col--offset-3{margin-left:12.5%}.van-col--4{width:16.66666667%}.van-col--offset-4{margin-left:16.66666667%}.van-col--5{width:20.83333333%}.van-col--offset-5{margin-left:20.83333333%}.van-col--6{width:25%}.van-col--offset-6{margin-left:25%}.van-col--7{width:29.16666667%}.van-col--offset-7{margin-left:29.16666667%}.van-col--8{width:33.33333333%}.van-col--offset-8{margin-left:33.33333333%}.van-col--9{width:37.5%}.van-col--offset-9{margin-left:37.5%}.van-col--10{width:41.66666667%}.van-col--offset-10{margin-left:41.66666667%}.van-col--11{width:45.83333333%}.van-col--offset-11{margin-left:45.83333333%}.van-col--12{width:50%}.van-col--offset-12{margin-left:50%}.van-col--13{width:54.16666667%}.van-col--offset-13{margin-left:54.16666667%}.van-col--14{width:58.33333333%}.van-col--offset-14{margin-left:58.33333333%}.van-col--15{width:62.5%}.van-col--offset-15{margin-left:62.5%}.van-col--16{width:66.66666667%}.van-col--offset-16{margin-left:66.66666667%}.van-col--17{width:70.83333333%}.van-col--offset-17{margin-left:70.83333333%}.van-col--18{width:75%}.van-col--offset-18{margin-left:75%}.van-col--19{width:79.16666667%}.van-col--offset-19{margin-left:79.16666667%}.van-col--20{width:83.33333333%}.van-col--offset-20{margin-left:83.33333333%}.van-col--21{width:87.5%}.van-col--offset-21{margin-left:87.5%}.van-col--22{width:91.66666667%}.van-col--offset-22{margin-left:91.66666667%}.van-col--23{width:95.83333333%}.van-col--offset-23{margin-left:95.83333333%}.van-col--24{width:100%}.van-col--offset-24{margin-left:100%}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/collapse-item/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/collapse-item/index.js
new file mode 100644
index 00000000..6407fbd4
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/collapse-item/index.js
@@ -0,0 +1,114 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var nextTick = function () {
+ return new Promise(function (resolve) {
+ return setTimeout(resolve, 20);
+ });
+};
+component_1.VantComponent({
+ classes: ['title-class', 'content-class'],
+ relation: {
+ name: 'collapse',
+ type: 'ancestor',
+ current: 'collapse-item',
+ },
+ props: {
+ name: null,
+ title: null,
+ value: null,
+ icon: String,
+ label: String,
+ disabled: Boolean,
+ clickable: Boolean,
+ border: {
+ type: Boolean,
+ value: true,
+ },
+ isLink: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ data: {
+ contentHeight: 0,
+ expanded: false,
+ transition: false,
+ },
+ mounted: function () {
+ var _this = this;
+ this.updateExpanded()
+ .then(nextTick)
+ .then(function () {
+ var data = { transition: true };
+ if (_this.data.expanded) {
+ data.contentHeight = 'auto';
+ }
+ _this.setData(data);
+ });
+ },
+ methods: {
+ updateExpanded: function () {
+ if (!this.parent) {
+ return Promise.resolve();
+ }
+ var _a = this.parent.data,
+ value = _a.value,
+ accordion = _a.accordion;
+ var _b = this.parent.children,
+ children = _b === void 0 ? [] : _b;
+ var name = this.data.name;
+ var index = children.indexOf(this);
+ var currentName = name == null ? index : name;
+ var expanded = accordion
+ ? value === currentName
+ : (value || []).some(function (name) {
+ return name === currentName;
+ });
+ var stack = [];
+ if (expanded !== this.data.expanded) {
+ stack.push(this.updateStyle(expanded));
+ }
+ stack.push(this.set({ index: index, expanded: expanded }));
+ return Promise.all(stack);
+ },
+ updateStyle: function (expanded) {
+ var _this = this;
+ return this.getRect('.van-collapse-item__content')
+ .then(function (rect) {
+ return rect.height;
+ })
+ .then(function (height) {
+ if (expanded) {
+ return _this.set({
+ contentHeight: height ? height + 'px' : 'auto',
+ });
+ }
+ return _this
+ .set({ contentHeight: height + 'px' })
+ .then(nextTick)
+ .then(function () {
+ return _this.set({ contentHeight: 0 });
+ });
+ });
+ },
+ onClick: function () {
+ if (this.data.disabled) {
+ return;
+ }
+ var _a = this.data,
+ name = _a.name,
+ expanded = _a.expanded;
+ var index = this.parent.children.indexOf(this);
+ var currentName = name == null ? index : name;
+ this.parent.switch(currentName, !expanded);
+ },
+ onTransitionEnd: function () {
+ if (this.data.expanded) {
+ this.setData({
+ contentHeight: 'auto',
+ });
+ }
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/collapse-item/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/collapse-item/index.json
new file mode 100644
index 00000000..0e5425cd
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/collapse-item/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-cell": "../cell/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/collapse-item/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/collapse-item/index.wxml
new file mode 100644
index 00000000..91afbc2d
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/collapse-item/index.wxml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/collapse-item/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/collapse-item/index.wxss
new file mode 100644
index 00000000..6ca214e8
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/collapse-item/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-collapse-item__title .van-cell__right-icon{-webkit-transform:rotate(90deg);transform:rotate(90deg);transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s;transition:-webkit-transform var(--collapse-item-transition-duration,.3s);transition:transform var(--collapse-item-transition-duration,.3s);transition:transform var(--collapse-item-transition-duration,.3s),-webkit-transform var(--collapse-item-transition-duration,.3s)}.van-collapse-item__title--expanded .van-cell__right-icon{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.van-collapse-item__title--disabled .van-cell,.van-collapse-item__title--disabled .van-cell__right-icon{color:#c8c9cc!important;color:var(--collapse-item-title-disabled-color,#c8c9cc)!important}.van-collapse-item__title--disabled .van-cell--hover{background-color:#fff!important;background-color:var(--white,#fff)!important}.van-collapse-item__wrapper{overflow:hidden}.van-collapse-item__wrapper--transition{transition:height .3s ease-in-out}.van-collapse-item__content{padding:15px;padding:var(--collapse-item-content-padding,15px);color:#969799;color:var(--collapse-item-content-text-color,#969799);font-size:13px;font-size:var(--collapse-item-content-font-size,13px);line-height:1.5;line-height:var(--collapse-item-content-line-height,1.5);background-color:#fff;background-color:var(--collapse-item-content-background-color,#fff)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/collapse/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/collapse/index.js
new file mode 100644
index 00000000..ab68400c
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/collapse/index.js
@@ -0,0 +1,53 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ relation: {
+ name: 'collapse-item',
+ type: 'descendant',
+ current: 'collapse',
+ },
+ props: {
+ value: {
+ type: null,
+ observer: 'updateExpanded',
+ },
+ accordion: {
+ type: Boolean,
+ observer: 'updateExpanded',
+ },
+ border: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ methods: {
+ updateExpanded: function () {
+ this.children.forEach(function (child) {
+ child.updateExpanded();
+ });
+ },
+ switch: function (name, expanded) {
+ var _a = this.data,
+ accordion = _a.accordion,
+ value = _a.value;
+ var changeItem = name;
+ if (!accordion) {
+ name = expanded
+ ? (value || []).concat(name)
+ : (value || []).filter(function (activeName) {
+ return activeName !== name;
+ });
+ } else {
+ name = expanded ? name : '';
+ }
+ if (expanded) {
+ this.$emit('open', changeItem);
+ } else {
+ this.$emit('close', changeItem);
+ }
+ this.$emit('change', name);
+ this.$emit('input', name);
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/collapse/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/collapse/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/collapse/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/collapse/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/collapse/index.wxml
new file mode 100644
index 00000000..fd4e1719
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/collapse/index.wxml
@@ -0,0 +1,3 @@
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/collapse/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/collapse/index.wxss
new file mode 100644
index 00000000..99694d60
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/collapse/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/color.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/color.js
new file mode 100644
index 00000000..885acaa7
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/color.js
@@ -0,0 +1,10 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.GRAY_DARK = exports.GRAY = exports.ORANGE = exports.GREEN = exports.WHITE = exports.BLUE = exports.RED = void 0;
+exports.RED = '#ee0a24';
+exports.BLUE = '#1989fa';
+exports.WHITE = '#fff';
+exports.GREEN = '#07c160';
+exports.ORANGE = '#ff976a';
+exports.GRAY = '#323233';
+exports.GRAY_DARK = '#969799';
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/component.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/component.js
new file mode 100644
index 00000000..e43a2775
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/component.js
@@ -0,0 +1,118 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.VantComponent = void 0;
+var basic_1 = require('../mixins/basic');
+var relationFunctions = {
+ ancestor: {
+ linked: function (parent) {
+ this.parent = parent;
+ },
+ unlinked: function () {
+ this.parent = null;
+ },
+ },
+ descendant: {
+ linked: function (child) {
+ this.children = this.children || [];
+ this.children.push(child);
+ },
+ unlinked: function (child) {
+ this.children = (this.children || []).filter(function (it) {
+ return it !== child;
+ });
+ },
+ },
+};
+function mapKeys(source, target, map) {
+ Object.keys(map).forEach(function (key) {
+ if (source[key]) {
+ target[map[key]] = source[key];
+ }
+ });
+}
+function makeRelation(options, vantOptions, relation) {
+ var _a;
+ var type = relation.type,
+ name = relation.name,
+ linked = relation.linked,
+ unlinked = relation.unlinked,
+ linkChanged = relation.linkChanged;
+ var beforeCreate = vantOptions.beforeCreate,
+ destroyed = vantOptions.destroyed;
+ if (type === 'descendant') {
+ options.created = function () {
+ beforeCreate && beforeCreate.bind(this)();
+ this.children = this.children || [];
+ };
+ options.detached = function () {
+ this.children = [];
+ destroyed && destroyed.bind(this)();
+ };
+ }
+ options.relations = Object.assign(
+ options.relations || {},
+ ((_a = {}),
+ (_a['../' + name + '/index'] = {
+ type: type,
+ linked: function (node) {
+ relationFunctions[type].linked.bind(this)(node);
+ linked && linked.bind(this)(node);
+ },
+ linkChanged: function (node) {
+ linkChanged && linkChanged.bind(this)(node);
+ },
+ unlinked: function (node) {
+ relationFunctions[type].unlinked.bind(this)(node);
+ unlinked && unlinked.bind(this)(node);
+ },
+ }),
+ _a)
+ );
+}
+function VantComponent(vantOptions) {
+ if (vantOptions === void 0) {
+ vantOptions = {};
+ }
+ var options = {};
+ mapKeys(vantOptions, options, {
+ data: 'data',
+ props: 'properties',
+ mixins: 'behaviors',
+ methods: 'methods',
+ beforeCreate: 'created',
+ created: 'attached',
+ mounted: 'ready',
+ relations: 'relations',
+ destroyed: 'detached',
+ classes: 'externalClasses',
+ });
+ var relation = vantOptions.relation;
+ if (relation) {
+ makeRelation(options, vantOptions, relation);
+ }
+ // add default externalClasses
+ options.externalClasses = options.externalClasses || [];
+ options.externalClasses.push('custom-class');
+ // add default behaviors
+ options.behaviors = options.behaviors || [];
+ options.behaviors.push(basic_1.basic);
+ // map field to form-field behavior
+ if (vantOptions.field) {
+ options.behaviors.push('wx://form-field');
+ }
+ if (options.properties) {
+ Object.keys(options.properties).forEach(function (name) {
+ if (Array.isArray(options.properties[name])) {
+ // miniprogram do not allow multi type
+ options.properties[name] = null;
+ }
+ });
+ }
+ // add default options
+ options.options = {
+ multipleSlots: true,
+ addGlobalClass: true,
+ };
+ Component(options);
+}
+exports.VantComponent = VantComponent;
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/index.wxss
new file mode 100644
index 00000000..6e6891ff
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/index.wxss
@@ -0,0 +1 @@
+.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3}.van-clearfix:after{display:table;clear:both;content:""}.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid #eee;-webkit-transform:scale(.5);transform:scale(.5)}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/style/clearfix.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/style/clearfix.wxss
new file mode 100644
index 00000000..a0ca8384
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/style/clearfix.wxss
@@ -0,0 +1 @@
+.van-clearfix:after{display:table;clear:both;content:""}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/style/ellipsis.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/style/ellipsis.wxss
new file mode 100644
index 00000000..1e9dbc9e
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/style/ellipsis.wxss
@@ -0,0 +1 @@
+.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/style/hairline.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/style/hairline.wxss
new file mode 100644
index 00000000..f64e2f83
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/style/hairline.wxss
@@ -0,0 +1 @@
+.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid #eee;-webkit-transform:scale(.5);transform:scale(.5)}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/style/mixins/clearfix.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/style/mixins/clearfix.wxss
new file mode 100644
index 00000000..e69de29b
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/style/mixins/ellipsis.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/style/mixins/ellipsis.wxss
new file mode 100644
index 00000000..e69de29b
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/style/mixins/hairline.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/style/mixins/hairline.wxss
new file mode 100644
index 00000000..e69de29b
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/style/theme.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/style/theme.wxss
new file mode 100644
index 00000000..e69de29b
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/style/var.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/style/var.wxss
new file mode 100644
index 00000000..e69de29b
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/utils.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/utils.js
new file mode 100644
index 00000000..f8f07e8c
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/utils.js
@@ -0,0 +1,42 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.addUnit = exports.getSystemInfoSync = exports.nextTick = exports.range = exports.isNumber = exports.isObj = exports.isDef = void 0;
+function isDef(value) {
+ return value !== undefined && value !== null;
+}
+exports.isDef = isDef;
+function isObj(x) {
+ var type = typeof x;
+ return x !== null && (type === 'object' || type === 'function');
+}
+exports.isObj = isObj;
+function isNumber(value) {
+ return /^\d+(\.\d+)?$/.test(value);
+}
+exports.isNumber = isNumber;
+function range(num, min, max) {
+ return Math.min(Math.max(num, min), max);
+}
+exports.range = range;
+function nextTick(fn) {
+ setTimeout(function () {
+ fn();
+ }, 1000 / 30);
+}
+exports.nextTick = nextTick;
+var systemInfo = null;
+function getSystemInfoSync() {
+ if (systemInfo == null) {
+ systemInfo = wx.getSystemInfoSync();
+ }
+ return systemInfo;
+}
+exports.getSystemInfoSync = getSystemInfoSync;
+function addUnit(value) {
+ if (!isDef(value)) {
+ return undefined;
+ }
+ value = String(value);
+ return isNumber(value) ? value + 'px' : value;
+}
+exports.addUnit = addUnit;
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/version.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/version.js
new file mode 100644
index 00000000..50b90a56
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/common/version.js
@@ -0,0 +1,36 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.canIUseFormFieldButton = exports.canIUseModel = void 0;
+var utils_1 = require('./utils');
+function compareVersion(v1, v2) {
+ v1 = v1.split('.');
+ v2 = v2.split('.');
+ var len = Math.max(v1.length, v2.length);
+ while (v1.length < len) {
+ v1.push('0');
+ }
+ while (v2.length < len) {
+ v2.push('0');
+ }
+ for (var i = 0; i < len; i++) {
+ var num1 = parseInt(v1[i], 10);
+ var num2 = parseInt(v2[i], 10);
+ if (num1 > num2) {
+ return 1;
+ }
+ if (num1 < num2) {
+ return -1;
+ }
+ }
+ return 0;
+}
+function canIUseModel() {
+ var system = utils_1.getSystemInfoSync();
+ return compareVersion(system.SDKVersion, '2.9.3') >= 0;
+}
+exports.canIUseModel = canIUseModel;
+function canIUseFormFieldButton() {
+ var system = utils_1.getSystemInfoSync();
+ return compareVersion(system.SDKVersion, '2.10.3') >= 0;
+}
+exports.canIUseFormFieldButton = canIUseFormFieldButton;
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/count-down/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/count-down/index.js
new file mode 100644
index 00000000..348d4898
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/count-down/index.js
@@ -0,0 +1,103 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var utils_1 = require('./utils');
+function simpleTick(fn) {
+ return setTimeout(fn, 30);
+}
+component_1.VantComponent({
+ props: {
+ useSlot: Boolean,
+ millisecond: Boolean,
+ time: {
+ type: Number,
+ observer: 'reset',
+ },
+ format: {
+ type: String,
+ value: 'HH:mm:ss',
+ },
+ autoStart: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ data: {
+ timeData: utils_1.parseTimeData(0),
+ formattedTime: '0',
+ },
+ destroyed: function () {
+ clearTimeout(this.tid);
+ this.tid = null;
+ },
+ methods: {
+ // 开始
+ start: function () {
+ if (this.counting) {
+ return;
+ }
+ this.counting = true;
+ this.endTime = Date.now() + this.remain;
+ this.tick();
+ },
+ // 暂停
+ pause: function () {
+ this.counting = false;
+ clearTimeout(this.tid);
+ },
+ // 重置
+ reset: function () {
+ this.pause();
+ this.remain = this.data.time;
+ this.setRemain(this.remain);
+ if (this.data.autoStart) {
+ this.start();
+ }
+ },
+ tick: function () {
+ if (this.data.millisecond) {
+ this.microTick();
+ } else {
+ this.macroTick();
+ }
+ },
+ microTick: function () {
+ var _this = this;
+ this.tid = simpleTick(function () {
+ _this.setRemain(_this.getRemain());
+ if (_this.remain !== 0) {
+ _this.microTick();
+ }
+ });
+ },
+ macroTick: function () {
+ var _this = this;
+ this.tid = simpleTick(function () {
+ var remain = _this.getRemain();
+ if (!utils_1.isSameSecond(remain, _this.remain) || remain === 0) {
+ _this.setRemain(remain);
+ }
+ if (_this.remain !== 0) {
+ _this.macroTick();
+ }
+ });
+ },
+ getRemain: function () {
+ return Math.max(this.endTime - Date.now(), 0);
+ },
+ setRemain: function (remain) {
+ this.remain = remain;
+ var timeData = utils_1.parseTimeData(remain);
+ if (this.data.useSlot) {
+ this.$emit('change', timeData);
+ }
+ this.setData({
+ formattedTime: utils_1.parseFormat(this.data.format, timeData),
+ });
+ if (remain === 0) {
+ this.pause();
+ this.$emit('finish');
+ }
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/count-down/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/count-down/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/count-down/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/count-down/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/count-down/index.wxml
new file mode 100644
index 00000000..e206e167
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/count-down/index.wxml
@@ -0,0 +1,4 @@
+
+
+ {{ formattedTime }}
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/count-down/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/count-down/index.wxss
new file mode 100644
index 00000000..bc33f5dc
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/count-down/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-count-down{color:#323233;color:var(--count-down-text-color,#323233);font-size:14px;font-size:var(--count-down-font-size,14px);line-height:20px;line-height:var(--count-down-line-height,20px)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/count-down/utils.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/count-down/utils.js
new file mode 100644
index 00000000..10864a21
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/count-down/utils.js
@@ -0,0 +1,65 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.isSameSecond = exports.parseFormat = exports.parseTimeData = void 0;
+function padZero(num, targetLength) {
+ if (targetLength === void 0) {
+ targetLength = 2;
+ }
+ var str = num + '';
+ while (str.length < targetLength) {
+ str = '0' + str;
+ }
+ return str;
+}
+var SECOND = 1000;
+var MINUTE = 60 * SECOND;
+var HOUR = 60 * MINUTE;
+var DAY = 24 * HOUR;
+function parseTimeData(time) {
+ var days = Math.floor(time / DAY);
+ var hours = Math.floor((time % DAY) / HOUR);
+ var minutes = Math.floor((time % HOUR) / MINUTE);
+ var seconds = Math.floor((time % MINUTE) / SECOND);
+ var milliseconds = Math.floor(time % SECOND);
+ return {
+ days: days,
+ hours: hours,
+ minutes: minutes,
+ seconds: seconds,
+ milliseconds: milliseconds,
+ };
+}
+exports.parseTimeData = parseTimeData;
+function parseFormat(format, timeData) {
+ var days = timeData.days;
+ var hours = timeData.hours,
+ minutes = timeData.minutes,
+ seconds = timeData.seconds,
+ milliseconds = timeData.milliseconds;
+ if (format.indexOf('DD') === -1) {
+ hours += days * 24;
+ } else {
+ format = format.replace('DD', padZero(days));
+ }
+ if (format.indexOf('HH') === -1) {
+ minutes += hours * 60;
+ } else {
+ format = format.replace('HH', padZero(hours));
+ }
+ if (format.indexOf('mm') === -1) {
+ seconds += minutes * 60;
+ } else {
+ format = format.replace('mm', padZero(minutes));
+ }
+ if (format.indexOf('ss') === -1) {
+ milliseconds += seconds * 1000;
+ } else {
+ format = format.replace('ss', padZero(seconds));
+ }
+ return format.replace('SSS', padZero(milliseconds, 3));
+}
+exports.parseFormat = parseFormat;
+function isSameSecond(time1, time2) {
+ return Math.floor(time1 / 1000) === Math.floor(time2 / 1000);
+}
+exports.isSameSecond = isSameSecond;
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/datetime-picker/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/datetime-picker/index.js
new file mode 100644
index 00000000..fc420b3c
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/datetime-picker/index.js
@@ -0,0 +1,377 @@
+'use strict';
+var __assign =
+ (this && this.__assign) ||
+ function () {
+ __assign =
+ Object.assign ||
+ function (t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s)
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+ }
+ return t;
+ };
+ return __assign.apply(this, arguments);
+ };
+var __spreadArrays =
+ (this && this.__spreadArrays) ||
+ function () {
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
+ s += arguments[i].length;
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
+ r[k] = a[j];
+ return r;
+ };
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var utils_1 = require('../common/utils');
+var shared_1 = require('../picker/shared');
+var currentYear = new Date().getFullYear();
+function isValidDate(date) {
+ return utils_1.isDef(date) && !isNaN(new Date(date).getTime());
+}
+function range(num, min, max) {
+ return Math.min(Math.max(num, min), max);
+}
+function padZero(val) {
+ return ('00' + val).slice(-2);
+}
+function times(n, iteratee) {
+ var index = -1;
+ var result = Array(n < 0 ? 0 : n);
+ while (++index < n) {
+ result[index] = iteratee(index);
+ }
+ return result;
+}
+function getTrueValue(formattedValue) {
+ if (!formattedValue) return;
+ while (isNaN(parseInt(formattedValue, 10))) {
+ formattedValue = formattedValue.slice(1);
+ }
+ return parseInt(formattedValue, 10);
+}
+function getMonthEndDay(year, month) {
+ return 32 - new Date(year, month - 1, 32).getDate();
+}
+var defaultFormatter = function (_, value) {
+ return value;
+};
+component_1.VantComponent({
+ classes: ['active-class', 'toolbar-class', 'column-class'],
+ props: __assign(__assign({}, shared_1.pickerProps), {
+ value: {
+ type: null,
+ observer: 'updateValue',
+ },
+ filter: null,
+ type: {
+ type: String,
+ value: 'datetime',
+ observer: 'updateValue',
+ },
+ showToolbar: {
+ type: Boolean,
+ value: true,
+ },
+ formatter: {
+ type: null,
+ value: defaultFormatter,
+ },
+ minDate: {
+ type: Number,
+ value: new Date(currentYear - 10, 0, 1).getTime(),
+ observer: 'updateValue',
+ },
+ maxDate: {
+ type: Number,
+ value: new Date(currentYear + 10, 11, 31).getTime(),
+ observer: 'updateValue',
+ },
+ minHour: {
+ type: Number,
+ value: 0,
+ observer: 'updateValue',
+ },
+ maxHour: {
+ type: Number,
+ value: 23,
+ observer: 'updateValue',
+ },
+ minMinute: {
+ type: Number,
+ value: 0,
+ observer: 'updateValue',
+ },
+ maxMinute: {
+ type: Number,
+ value: 59,
+ observer: 'updateValue',
+ },
+ }),
+ data: {
+ innerValue: Date.now(),
+ columns: [],
+ },
+ methods: {
+ updateValue: function () {
+ var _this = this;
+ var data = this.data;
+ var val = this.correctValue(this.data.value);
+ var isEqual = val === data.innerValue;
+ if (!isEqual) {
+ this.updateColumnValue(val).then(function () {
+ _this.$emit('input', val);
+ });
+ } else {
+ this.updateColumns();
+ }
+ },
+ getPicker: function () {
+ if (this.picker == null) {
+ this.picker = this.selectComponent('.van-datetime-picker');
+ var picker_1 = this.picker;
+ var setColumnValues_1 = picker_1.setColumnValues;
+ picker_1.setColumnValues = function () {
+ var args = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ args[_i] = arguments[_i];
+ }
+ return setColumnValues_1.apply(
+ picker_1,
+ __spreadArrays(args, [false])
+ );
+ };
+ }
+ return this.picker;
+ },
+ updateColumns: function () {
+ var _a = this.data.formatter,
+ formatter = _a === void 0 ? defaultFormatter : _a;
+ var results = this.getOriginColumns().map(function (column) {
+ return {
+ values: column.values.map(function (value) {
+ return formatter(column.type, value);
+ }),
+ };
+ });
+ return this.set({ columns: results });
+ },
+ getOriginColumns: function () {
+ var filter = this.data.filter;
+ var results = this.getRanges().map(function (_a) {
+ var type = _a.type,
+ range = _a.range;
+ var values = times(range[1] - range[0] + 1, function (index) {
+ var value = range[0] + index;
+ value = type === 'year' ? '' + value : padZero(value);
+ return value;
+ });
+ if (filter) {
+ values = filter(type, values);
+ }
+ return { type: type, values: values };
+ });
+ return results;
+ },
+ getRanges: function () {
+ var data = this.data;
+ if (data.type === 'time') {
+ return [
+ {
+ type: 'hour',
+ range: [data.minHour, data.maxHour],
+ },
+ {
+ type: 'minute',
+ range: [data.minMinute, data.maxMinute],
+ },
+ ];
+ }
+ var _a = this.getBoundary('max', data.innerValue),
+ maxYear = _a.maxYear,
+ maxDate = _a.maxDate,
+ maxMonth = _a.maxMonth,
+ maxHour = _a.maxHour,
+ maxMinute = _a.maxMinute;
+ var _b = this.getBoundary('min', data.innerValue),
+ minYear = _b.minYear,
+ minDate = _b.minDate,
+ minMonth = _b.minMonth,
+ minHour = _b.minHour,
+ minMinute = _b.minMinute;
+ var result = [
+ {
+ type: 'year',
+ range: [minYear, maxYear],
+ },
+ {
+ type: 'month',
+ range: [minMonth, maxMonth],
+ },
+ {
+ type: 'day',
+ range: [minDate, maxDate],
+ },
+ {
+ type: 'hour',
+ range: [minHour, maxHour],
+ },
+ {
+ type: 'minute',
+ range: [minMinute, maxMinute],
+ },
+ ];
+ if (data.type === 'date') result.splice(3, 2);
+ if (data.type === 'year-month') result.splice(2, 3);
+ return result;
+ },
+ correctValue: function (value) {
+ var data = this.data;
+ // validate value
+ var isDateType = data.type !== 'time';
+ if (isDateType && !isValidDate(value)) {
+ value = data.minDate;
+ } else if (!isDateType && !value) {
+ var minHour = data.minHour;
+ value = padZero(minHour) + ':00';
+ }
+ // time type
+ if (!isDateType) {
+ var _a = value.split(':'),
+ hour = _a[0],
+ minute = _a[1];
+ hour = padZero(range(hour, data.minHour, data.maxHour));
+ minute = padZero(range(minute, data.minMinute, data.maxMinute));
+ return hour + ':' + minute;
+ }
+ // date type
+ value = Math.max(value, data.minDate);
+ value = Math.min(value, data.maxDate);
+ return value;
+ },
+ getBoundary: function (type, innerValue) {
+ var _a;
+ var value = new Date(innerValue);
+ var boundary = new Date(this.data[type + 'Date']);
+ var year = boundary.getFullYear();
+ var month = 1;
+ var date = 1;
+ var hour = 0;
+ var minute = 0;
+ if (type === 'max') {
+ month = 12;
+ date = getMonthEndDay(value.getFullYear(), value.getMonth() + 1);
+ hour = 23;
+ minute = 59;
+ }
+ if (value.getFullYear() === year) {
+ month = boundary.getMonth() + 1;
+ if (value.getMonth() + 1 === month) {
+ date = boundary.getDate();
+ if (value.getDate() === date) {
+ hour = boundary.getHours();
+ if (value.getHours() === hour) {
+ minute = boundary.getMinutes();
+ }
+ }
+ }
+ }
+ return (
+ (_a = {}),
+ (_a[type + 'Year'] = year),
+ (_a[type + 'Month'] = month),
+ (_a[type + 'Date'] = date),
+ (_a[type + 'Hour'] = hour),
+ (_a[type + 'Minute'] = minute),
+ _a
+ );
+ },
+ onCancel: function () {
+ this.$emit('cancel');
+ },
+ onConfirm: function () {
+ this.$emit('confirm', this.data.innerValue);
+ },
+ onChange: function () {
+ var _this = this;
+ var data = this.data;
+ var value;
+ var picker = this.getPicker();
+ if (data.type === 'time') {
+ var indexes = picker.getIndexes();
+ value =
+ +data.columns[0].values[indexes[0]] +
+ ':' +
+ +data.columns[1].values[indexes[1]];
+ } else {
+ var values = picker.getValues();
+ var year = getTrueValue(values[0]);
+ var month = getTrueValue(values[1]);
+ var maxDate = getMonthEndDay(year, month);
+ var date = getTrueValue(values[2]);
+ if (data.type === 'year-month') {
+ date = 1;
+ }
+ date = date > maxDate ? maxDate : date;
+ var hour = 0;
+ var minute = 0;
+ if (data.type === 'datetime') {
+ hour = getTrueValue(values[3]);
+ minute = getTrueValue(values[4]);
+ }
+ value = new Date(year, month - 1, date, hour, minute);
+ }
+ value = this.correctValue(value);
+ this.updateColumnValue(value).then(function () {
+ _this.$emit('input', value);
+ _this.$emit('change', picker);
+ });
+ },
+ updateColumnValue: function (value) {
+ var _this = this;
+ var values = [];
+ var _a = this.data,
+ type = _a.type,
+ _b = _a.formatter,
+ formatter = _b === void 0 ? defaultFormatter : _b;
+ var picker = this.getPicker();
+ if (type === 'time') {
+ var pair = value.split(':');
+ values = [formatter('hour', pair[0]), formatter('minute', pair[1])];
+ } else {
+ var date = new Date(value);
+ values = [
+ formatter('year', '' + date.getFullYear()),
+ formatter('month', padZero(date.getMonth() + 1)),
+ ];
+ if (type === 'date') {
+ values.push(formatter('day', padZero(date.getDate())));
+ }
+ if (type === 'datetime') {
+ values.push(
+ formatter('day', padZero(date.getDate())),
+ formatter('hour', padZero(date.getHours())),
+ formatter('minute', padZero(date.getMinutes()))
+ );
+ }
+ }
+ return this.set({ innerValue: value })
+ .then(function () {
+ return _this.updateColumns();
+ })
+ .then(function () {
+ return picker.setValues(values);
+ });
+ },
+ },
+ created: function () {
+ var _this = this;
+ var innerValue = this.correctValue(this.data.value);
+ this.updateColumnValue(innerValue).then(function () {
+ _this.$emit('input', innerValue);
+ });
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/datetime-picker/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/datetime-picker/index.json
new file mode 100644
index 00000000..a778e91c
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/datetime-picker/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-picker": "../picker/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/datetime-picker/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/datetime-picker/index.wxml
new file mode 100644
index 00000000..ade22024
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/datetime-picker/index.wxml
@@ -0,0 +1,16 @@
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/datetime-picker/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/datetime-picker/index.wxss
new file mode 100644
index 00000000..99694d60
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/datetime-picker/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/definitions/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/definitions/index.js
new file mode 100644
index 00000000..c8ad2e54
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/definitions/index.js
@@ -0,0 +1,2 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/definitions/weapp.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/definitions/weapp.js
new file mode 100644
index 00000000..c8ad2e54
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/definitions/weapp.js
@@ -0,0 +1,2 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dialog/dialog.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dialog/dialog.js
new file mode 100644
index 00000000..dba62f21
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dialog/dialog.js
@@ -0,0 +1,85 @@
+'use strict';
+var __assign =
+ (this && this.__assign) ||
+ function () {
+ __assign =
+ Object.assign ||
+ function (t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s)
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+ }
+ return t;
+ };
+ return __assign.apply(this, arguments);
+ };
+Object.defineProperty(exports, '__esModule', { value: true });
+var queue = [];
+function getContext() {
+ var pages = getCurrentPages();
+ return pages[pages.length - 1];
+}
+var Dialog = function (options) {
+ options = __assign(__assign({}, Dialog.currentOptions), options);
+ return new Promise(function (resolve, reject) {
+ var context = options.context || getContext();
+ var dialog = context.selectComponent(options.selector);
+ delete options.context;
+ delete options.selector;
+ if (dialog) {
+ dialog.setData(
+ __assign({ onCancel: reject, onConfirm: resolve }, options)
+ );
+ queue.push(dialog);
+ } else {
+ console.warn(
+ '未找到 van-dialog 节点,请确认 selector 及 context 是否正确'
+ );
+ }
+ });
+};
+Dialog.defaultOptions = {
+ show: true,
+ title: '',
+ width: null,
+ message: '',
+ zIndex: 100,
+ overlay: true,
+ selector: '#van-dialog',
+ className: '',
+ asyncClose: false,
+ transition: 'scale',
+ customStyle: '',
+ messageAlign: '',
+ overlayStyle: '',
+ confirmButtonText: '确认',
+ cancelButtonText: '取消',
+ showConfirmButton: true,
+ showCancelButton: false,
+ closeOnClickOverlay: false,
+ confirmButtonOpenType: '',
+};
+Dialog.alert = Dialog;
+Dialog.confirm = function (options) {
+ return Dialog(__assign({ showCancelButton: true }, options));
+};
+Dialog.close = function () {
+ queue.forEach(function (dialog) {
+ dialog.close();
+ });
+ queue = [];
+};
+Dialog.stopLoading = function () {
+ queue.forEach(function (dialog) {
+ dialog.stopLoading();
+ });
+};
+Dialog.setDefaultOptions = function (options) {
+ Object.assign(Dialog.currentOptions, options);
+};
+Dialog.resetDefaultOptions = function () {
+ Dialog.currentOptions = __assign({}, Dialog.defaultOptions);
+};
+Dialog.resetDefaultOptions();
+exports.default = Dialog;
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dialog/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dialog/index.js
new file mode 100644
index 00000000..2a25deca
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dialog/index.js
@@ -0,0 +1,111 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var button_1 = require('../mixins/button');
+var open_type_1 = require('../mixins/open-type');
+var color_1 = require('../common/color');
+component_1.VantComponent({
+ mixins: [button_1.button, open_type_1.openType],
+ props: {
+ show: {
+ type: Boolean,
+ observer: function (show) {
+ !show && this.stopLoading();
+ },
+ },
+ title: String,
+ message: String,
+ useSlot: Boolean,
+ className: String,
+ customStyle: String,
+ asyncClose: Boolean,
+ messageAlign: String,
+ overlayStyle: String,
+ useTitleSlot: Boolean,
+ showCancelButton: Boolean,
+ closeOnClickOverlay: Boolean,
+ confirmButtonOpenType: String,
+ width: null,
+ zIndex: {
+ type: Number,
+ value: 2000,
+ },
+ confirmButtonText: {
+ type: String,
+ value: '确认',
+ },
+ cancelButtonText: {
+ type: String,
+ value: '取消',
+ },
+ confirmButtonColor: {
+ type: String,
+ value: color_1.BLUE,
+ },
+ cancelButtonColor: {
+ type: String,
+ value: color_1.GRAY,
+ },
+ showConfirmButton: {
+ type: Boolean,
+ value: true,
+ },
+ overlay: {
+ type: Boolean,
+ value: true,
+ },
+ transition: {
+ type: String,
+ value: 'scale',
+ },
+ },
+ data: {
+ loading: {
+ confirm: false,
+ cancel: false,
+ },
+ },
+ methods: {
+ onConfirm: function () {
+ this.handleAction('confirm');
+ },
+ onCancel: function () {
+ this.handleAction('cancel');
+ },
+ onClickOverlay: function () {
+ this.onClose('overlay');
+ },
+ handleAction: function (action) {
+ var _a;
+ if (this.data.asyncClose) {
+ this.setData(((_a = {}), (_a['loading.' + action] = true), _a));
+ }
+ this.onClose(action);
+ },
+ close: function () {
+ this.setData({
+ show: false,
+ });
+ },
+ stopLoading: function () {
+ this.setData({
+ loading: {
+ confirm: false,
+ cancel: false,
+ },
+ });
+ },
+ onClose: function (action) {
+ if (!this.data.asyncClose) {
+ this.close();
+ }
+ this.$emit('close', action);
+ // 把 dialog 实例传递出去,可以通过 stopLoading() 在外部关闭按钮的 loading
+ this.$emit(action, { dialog: this });
+ var callback = this.data[action === 'confirm' ? 'onConfirm' : 'onCancel'];
+ if (callback) {
+ callback(this);
+ }
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dialog/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dialog/index.json
new file mode 100644
index 00000000..e2ee09ae
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dialog/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-popup": "../popup/index",
+ "van-button": "../button/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dialog/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dialog/index.wxml
new file mode 100644
index 00000000..cbad7f6f
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dialog/index.wxml
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+ {{ message }}
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dialog/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dialog/index.wxss
new file mode 100644
index 00000000..e5f6cbbf
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dialog/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-dialog{top:45%!important;overflow:hidden;width:320px;width:var(--dialog-width,320px);font-size:16px;font-size:var(--dialog-font-size,16px);border-radius:16px;border-radius:var(--dialog-border-radius,16px);background-color:#fff;background-color:var(--dialog-background-color,#fff)}@media (max-width:321px){.van-dialog{width:90%;width:var(--dialog-small-screen-width,90%)}}.van-dialog__header{text-align:center;padding-top:24px;padding-top:var(--dialog-header-padding-top,24px);font-weight:500;font-weight:var(--dialog-header-font-weight,500);line-height:24px;line-height:var(--dialog-header-line-height,24px)}.van-dialog__header--isolated{padding:24px 0;padding:var(--dialog-header-isolated-padding,24px 0)}.van-dialog__message{overflow-y:auto;text-align:center;-webkit-overflow-scrolling:touch;font-size:14px;font-size:var(--dialog-message-font-size,14px);line-height:20px;line-height:var(--dialog-message-line-height,20px);max-height:60vh;max-height:var(--dialog-message-max-height,60vh);padding:24px;padding:var(--dialog-message-padding,24px)}.van-dialog__message-text{word-wrap:break-word}.van-dialog__message--has-title{padding-top:12px;padding-top:var(--dialog-has-title-message-padding-top,12px);color:#646566;color:var(--dialog-has-title-message-text-color,#646566)}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__footer{display:-webkit-flex;display:flex}.van-dialog__button{-webkit-flex:1;flex:1}.van-dialog__cancel,.van-dialog__confirm{border:0!important}.van-dialog-bounce-enter{-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7);opacity:0}.van-dialog-bounce-leave-active{-webkit-transform:translate3d(-50%,-50%,0) scale(.9);transform:translate3d(-50%,-50%,0) scale(.9);opacity:0}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/divider/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/divider/index.js
new file mode 100644
index 00000000..50ce01a0
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/divider/index.js
@@ -0,0 +1,35 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ props: {
+ dashed: {
+ type: Boolean,
+ value: false,
+ },
+ hairline: {
+ type: Boolean,
+ value: false,
+ },
+ contentPosition: {
+ type: String,
+ value: '',
+ },
+ fontSize: {
+ type: Number,
+ value: '',
+ },
+ borderColor: {
+ type: String,
+ value: '',
+ },
+ textColor: {
+ type: String,
+ value: '',
+ },
+ customStyle: {
+ type: String,
+ value: '',
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/divider/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/divider/index.json
new file mode 100644
index 00000000..a89ef4db
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/divider/index.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/divider/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/divider/index.wxml
new file mode 100644
index 00000000..412e73f2
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/divider/index.wxml
@@ -0,0 +1,8 @@
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/divider/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/divider/index.wxss
new file mode 100644
index 00000000..c055e3af
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/divider/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-divider{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;margin:16px 0;margin:var(--divider-margin,16px 0);color:#969799;color:var(--divider-text-color,#969799);font-size:14px;font-size:var(--divider-font-size,14px);line-height:24px;line-height:var(--divider-line-height,24px);border:0 solid #ebedf0;border-color:var(--divider-border-color,#ebedf0)}.van-divider:after,.van-divider:before{display:block;-webkit-flex:1;flex:1;box-sizing:border-box;height:1px;border-color:inherit;border-style:inherit;border-width:1px 0 0}.van-divider:before{content:""}.van-divider--hairline:after,.van-divider--hairline:before{-webkit-transform:scaleY(.5);transform:scaleY(.5)}.van-divider--dashed{border-style:dashed}.van-divider--center:before,.van-divider--left:before,.van-divider--right:before{margin-right:16px;margin-right:var(--divider-content-padding,16px)}.van-divider--center:after,.van-divider--left:after,.van-divider--right:after{content:"";margin-left:16px;margin-left:var(--divider-content-padding,16px)}.van-divider--left:before{max-width:10%;max-width:var(--divider-content-left-width,10%)}.van-divider--right:after{max-width:10%;max-width:var(--divider-content-right-width,10%)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dropdown-item/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dropdown-item/index.js
new file mode 100644
index 00000000..af9bc36a
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dropdown-item/index.js
@@ -0,0 +1,115 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ field: true,
+ relation: {
+ name: 'dropdown-menu',
+ type: 'ancestor',
+ current: 'dropdown-item',
+ linked: function () {
+ this.updateDataFromParent();
+ },
+ },
+ props: {
+ value: {
+ type: null,
+ observer: 'rerender',
+ },
+ title: {
+ type: String,
+ observer: 'rerender',
+ },
+ disabled: Boolean,
+ titleClass: {
+ type: String,
+ observer: 'rerender',
+ },
+ options: {
+ type: Array,
+ value: [],
+ observer: 'rerender',
+ },
+ popupStyle: String,
+ },
+ data: {
+ transition: true,
+ showPopup: false,
+ showWrapper: false,
+ displayTitle: '',
+ },
+ methods: {
+ rerender: function () {
+ var _this = this;
+ wx.nextTick(function () {
+ _this.parent && _this.parent.updateItemListData();
+ });
+ },
+ updateDataFromParent: function () {
+ if (this.parent) {
+ var _a = this.parent.data,
+ overlay = _a.overlay,
+ duration = _a.duration,
+ activeColor = _a.activeColor,
+ closeOnClickOverlay = _a.closeOnClickOverlay,
+ direction = _a.direction;
+ this.setData({
+ overlay: overlay,
+ duration: duration,
+ activeColor: activeColor,
+ closeOnClickOverlay: closeOnClickOverlay,
+ direction: direction,
+ });
+ }
+ },
+ onOpen: function () {
+ this.$emit('open');
+ },
+ onOpened: function () {
+ this.$emit('opened');
+ },
+ onClose: function () {
+ this.$emit('close');
+ },
+ onClosed: function () {
+ this.$emit('closed');
+ this.setData({ showWrapper: false });
+ },
+ onOptionTap: function (event) {
+ var option = event.currentTarget.dataset.option;
+ var value = option.value;
+ var shouldEmitChange = this.data.value !== value;
+ this.setData({ showPopup: false, value: value });
+ this.$emit('close');
+ this.rerender();
+ if (shouldEmitChange) {
+ this.$emit('change', value);
+ }
+ },
+ toggle: function (show, options) {
+ var _this = this;
+ if (options === void 0) {
+ options = {};
+ }
+ var showPopup = this.data.showPopup;
+ if (typeof show !== 'boolean') {
+ show = !showPopup;
+ }
+ if (show === showPopup) {
+ return;
+ }
+ this.setData({
+ transition: !options.immediate,
+ showPopup: show,
+ });
+ if (show) {
+ this.parent.getChildWrapperStyle().then(function (wrapperStyle) {
+ _this.setData({ wrapperStyle: wrapperStyle, showWrapper: true });
+ _this.rerender();
+ });
+ } else {
+ this.rerender();
+ }
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dropdown-item/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dropdown-item/index.json
new file mode 100644
index 00000000..88d54099
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dropdown-item/index.json
@@ -0,0 +1,8 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-popup": "../popup/index",
+ "van-cell": "../cell/index",
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dropdown-item/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dropdown-item/index.wxml
new file mode 100644
index 00000000..dd75292f
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dropdown-item/index.wxml
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+ {{ item.text }}
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dropdown-item/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dropdown-item/index.wxss
new file mode 100644
index 00000000..e06c2874
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dropdown-item/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-dropdown-item{position:fixed;right:0;left:0;overflow:hidden}.van-dropdown-item__option{text-align:left}.van-dropdown-item__option--active .van-dropdown-item__icon,.van-dropdown-item__option--active .van-dropdown-item__title{color:#1989fa;color:var(--dropdown-menu-option-active-color,#1989fa)}.van-dropdown-item--up{top:0}.van-dropdown-item--down{bottom:0}.van-dropdown-item__icon{display:block;line-height:inherit}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dropdown-menu/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dropdown-menu/index.js
new file mode 100644
index 00000000..8f574a8e
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dropdown-menu/index.js
@@ -0,0 +1,133 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var utils_1 = require('../common/utils');
+var ARRAY = [];
+component_1.VantComponent({
+ field: true,
+ relation: {
+ name: 'dropdown-item',
+ type: 'descendant',
+ current: 'dropdown-menu',
+ linked: function () {
+ this.updateItemListData();
+ },
+ unlinked: function () {
+ this.updateItemListData();
+ },
+ },
+ props: {
+ activeColor: {
+ type: String,
+ observer: 'updateChildrenData',
+ },
+ overlay: {
+ type: Boolean,
+ value: true,
+ observer: 'updateChildrenData',
+ },
+ zIndex: {
+ type: Number,
+ value: 10,
+ },
+ duration: {
+ type: Number,
+ value: 200,
+ observer: 'updateChildrenData',
+ },
+ direction: {
+ type: String,
+ value: 'down',
+ observer: 'updateChildrenData',
+ },
+ closeOnClickOverlay: {
+ type: Boolean,
+ value: true,
+ observer: 'updateChildrenData',
+ },
+ closeOnClickOutside: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ data: {
+ itemListData: [],
+ },
+ beforeCreate: function () {
+ var windowHeight = wx.getSystemInfoSync().windowHeight;
+ this.windowHeight = windowHeight;
+ ARRAY.push(this);
+ },
+ destroyed: function () {
+ var _this = this;
+ ARRAY = ARRAY.filter(function (item) {
+ return item !== _this;
+ });
+ },
+ methods: {
+ updateItemListData: function () {
+ this.setData({
+ itemListData: this.children.map(function (child) {
+ return child.data;
+ }),
+ });
+ },
+ updateChildrenData: function () {
+ this.children.forEach(function (child) {
+ child.updateDataFromParent();
+ });
+ },
+ toggleItem: function (active) {
+ this.children.forEach(function (item, index) {
+ var showPopup = item.data.showPopup;
+ if (index === active) {
+ item.toggle();
+ } else if (showPopup) {
+ item.toggle(false, { immediate: true });
+ }
+ });
+ },
+ close: function () {
+ this.children.forEach(function (child) {
+ child.toggle(false, { immediate: true });
+ });
+ },
+ getChildWrapperStyle: function () {
+ var _this = this;
+ var _a = this.data,
+ zIndex = _a.zIndex,
+ direction = _a.direction;
+ return this.getRect('.van-dropdown-menu').then(function (rect) {
+ var _a = rect.top,
+ top = _a === void 0 ? 0 : _a,
+ _b = rect.bottom,
+ bottom = _b === void 0 ? 0 : _b;
+ var offset = direction === 'down' ? bottom : _this.windowHeight - top;
+ var wrapperStyle = 'z-index: ' + zIndex + ';';
+ if (direction === 'down') {
+ wrapperStyle += 'top: ' + utils_1.addUnit(offset) + ';';
+ } else {
+ wrapperStyle += 'bottom: ' + utils_1.addUnit(offset) + ';';
+ }
+ return wrapperStyle;
+ });
+ },
+ onTitleTap: function (event) {
+ var _this = this;
+ var index = event.currentTarget.dataset.index;
+ var child = this.children[index];
+ if (!child.data.disabled) {
+ ARRAY.forEach(function (menuItem) {
+ if (
+ menuItem &&
+ menuItem.data.closeOnClickOutside &&
+ menuItem !== _this
+ ) {
+ menuItem.close();
+ }
+ });
+ this.toggleItem(index);
+ }
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dropdown-menu/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dropdown-menu/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dropdown-menu/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dropdown-menu/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dropdown-menu/index.wxml
new file mode 100644
index 00000000..037ac3b6
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dropdown-menu/index.wxml
@@ -0,0 +1,23 @@
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dropdown-menu/index.wxs b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dropdown-menu/index.wxs
new file mode 100644
index 00000000..65388549
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dropdown-menu/index.wxs
@@ -0,0 +1,16 @@
+/* eslint-disable */
+function displayTitle(item) {
+ if (item.title) {
+ return item.title;
+ }
+
+ var match = item.options.filter(function(option) {
+ return option.value === item.value;
+ });
+ var displayTitle = match.length ? match[0].text : '';
+ return displayTitle;
+}
+
+module.exports = {
+ displayTitle: displayTitle
+};
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dropdown-menu/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dropdown-menu/index.wxss
new file mode 100644
index 00000000..43efd779
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/dropdown-menu/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-dropdown-menu{display:-webkit-flex;display:flex;-webkit-user-select:none;user-select:none;height:50px;height:var(--dropdown-menu-height,50px);background-color:#fff;background-color:var(--dropdown-menu-background-color,#fff)}.van-dropdown-menu__item{display:-webkit-flex;display:flex;-webkit-flex:1;flex:1;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;min-width:0}.van-dropdown-menu__item:active{opacity:.7}.van-dropdown-menu__item--disabled:active{opacity:1}.van-dropdown-menu__item--disabled .van-dropdown-menu__title{color:#969799;color:var(--dropdown-menu-title-disabled-text-color,#969799)}.van-dropdown-menu__title{position:relative;box-sizing:border-box;max-width:100%;padding:0 8px;padding:var(--dropdown-menu-title-padding,0 8px);color:#323233;color:var(--dropdown-menu-title-text-color,#323233);font-size:15px;font-size:var(--dropdown-menu-title-font-size,15px);line-height:18px;line-height:var(--dropdown-menu-title-line-height,18px)}.van-dropdown-menu__title:after{position:absolute;top:50%;right:-4px;margin-top:-5px;border-color:transparent transparent currentcolor currentcolor;border-style:solid;border-width:3px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:.8;content:""}.van-dropdown-menu__title--active{color:#1989fa;color:var(--dropdown-menu-title-active-text-color,#1989fa)}.van-dropdown-menu__title--down:after{margin-top:-1px;-webkit-transform:rotate(135deg);transform:rotate(135deg)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/field/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/field/index.js
new file mode 100644
index 00000000..764114e5
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/field/index.js
@@ -0,0 +1,147 @@
+'use strict';
+var __assign =
+ (this && this.__assign) ||
+ function () {
+ __assign =
+ Object.assign ||
+ function (t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s)
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+ }
+ return t;
+ };
+ return __assign.apply(this, arguments);
+ };
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var props_1 = require('./props');
+component_1.VantComponent({
+ field: true,
+ classes: ['input-class', 'right-icon-class', 'label-class'],
+ props: __assign(
+ __assign(
+ __assign(__assign({}, props_1.commonProps), props_1.inputProps),
+ props_1.textareaProps
+ ),
+ {
+ size: String,
+ icon: String,
+ label: String,
+ error: Boolean,
+ center: Boolean,
+ isLink: Boolean,
+ leftIcon: String,
+ rightIcon: String,
+ autosize: [Boolean, Object],
+ readonly: {
+ type: Boolean,
+ observer: 'setShowClear',
+ },
+ required: Boolean,
+ iconClass: String,
+ clearable: {
+ type: Boolean,
+ observer: 'setShowClear',
+ },
+ clickable: Boolean,
+ inputAlign: String,
+ customStyle: String,
+ errorMessage: String,
+ arrowDirection: String,
+ showWordLimit: Boolean,
+ errorMessageAlign: String,
+ border: {
+ type: Boolean,
+ value: true,
+ },
+ titleWidth: {
+ type: String,
+ value: '90px',
+ },
+ }
+ ),
+ data: {
+ focused: false,
+ innerValue: '',
+ showClear: false,
+ },
+ created: function () {
+ this.value = this.data.value;
+ this.setData({ innerValue: this.value });
+ },
+ methods: {
+ onInput: function (event) {
+ var _a = (event.detail || {}).value,
+ value = _a === void 0 ? '' : _a;
+ this.value = value;
+ this.setShowClear();
+ this.emitChange();
+ },
+ onFocus: function (event) {
+ this.focused = true;
+ this.setShowClear();
+ this.$emit('focus', event.detail);
+ },
+ onBlur: function (event) {
+ this.focused = false;
+ this.setShowClear();
+ this.$emit('blur', event.detail);
+ },
+ onClickIcon: function () {
+ this.$emit('click-icon');
+ },
+ onClear: function () {
+ var _this = this;
+ this.setData({ innerValue: '' });
+ this.value = '';
+ this.setShowClear();
+ wx.nextTick(function () {
+ _this.emitChange();
+ _this.$emit('clear', '');
+ });
+ },
+ onConfirm: function (event) {
+ var _a = (event.detail || {}).value,
+ value = _a === void 0 ? '' : _a;
+ this.value = value;
+ this.setShowClear();
+ this.$emit('confirm', value);
+ },
+ setValue: function (value) {
+ this.value = value;
+ this.setShowClear();
+ if (value === '') {
+ this.setData({ innerValue: '' });
+ }
+ this.emitChange();
+ },
+ onLineChange: function (event) {
+ this.$emit('linechange', event.detail);
+ },
+ onKeyboardHeightChange: function (event) {
+ this.$emit('keyboardheightchange', event.detail);
+ },
+ emitChange: function () {
+ var _this = this;
+ this.setData({ value: this.value });
+ wx.nextTick(function () {
+ _this.$emit('input', _this.value);
+ _this.$emit('change', _this.value);
+ });
+ },
+ setShowClear: function () {
+ var _a = this.data,
+ clearable = _a.clearable,
+ readonly = _a.readonly;
+ var _b = this,
+ focused = _b.focused,
+ value = _b.value;
+ this.setData({
+ showClear: !!clearable && !!focused && !!value && !readonly,
+ });
+ },
+ noop: function () {},
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/field/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/field/index.json
new file mode 100644
index 00000000..5906c504
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/field/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-cell": "../cell/index",
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/field/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/field/index.wxml
new file mode 100644
index 00000000..b7096dfc
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/field/index.wxml
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ value.length }}/{{ maxlength }}
+
+
+ {{ errorMessage }}
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/field/index.wxs b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/field/index.wxs
new file mode 100644
index 00000000..639ae2f7
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/field/index.wxs
@@ -0,0 +1,21 @@
+/* eslint-disable */
+var utils = require('../wxs/utils.wxs');
+
+function inputStyle(autosize) {
+ if (autosize && autosize.constructor === 'Object') {
+ var style = '';
+ if (autosize.minHeight) {
+ style += 'min-height:' + utils.addUnit(autosize.minHeight) + ';';
+ }
+ if (autosize.maxHeight) {
+ style += 'max-height:' + utils.addUnit(autosize.maxHeight) + ';';
+ }
+ return style;
+ }
+
+ return '';
+}
+
+module.exports = {
+ inputStyle: inputStyle
+};
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/field/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/field/index.wxss
new file mode 100644
index 00000000..00a62a3a
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/field/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-field{--cell-icon-size:16px;--cell-icon-size:var(--field-icon-size,16px)}.van-field__body{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.van-field__body--textarea{line-height:1.2em}.van-field__body--textarea,.van-field__input{min-height:24px;min-height:var(--cell-line-height,24px)}.van-field__input{position:relative;display:block;box-sizing:border-box;width:100%;margin:0;padding:0;line-height:inherit;text-align:left;background-color:initial;border:0;resize:none;color:#323233;color:var(--field-input-text-color,#323233);height:24px;height:var(--cell-line-height,24px)}.van-field__input--textarea{height:18px;height:var(--field-text-area-min-height,18px);min-height:18px;min-height:var(--field-text-area-min-height,18px)}.van-field__input--error{color:#ee0a24;color:var(--field-input-error-text-color,#ee0a24)}.van-field__input--disabled{background-color:initial;opacity:1;color:#969799;color:var(--field-input-disabled-text-color,#969799)}.van-field__input--center{text-align:center}.van-field__input--right{text-align:right}.van-field__placeholder{position:absolute;top:0;right:0;left:0;pointer-events:none;color:#c8c9cc;color:var(--field-placeholder-text-color,#c8c9cc)}.van-field__placeholder--error{color:#ee0a24;color:var(--field-error-message-color,#ee0a24)}.van-field__icon-root{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;min-height:24px;min-height:var(--cell-line-height,24px)}.van-field__clear-root,.van-field__icon-container{line-height:inherit;vertical-align:middle;padding:0 8px;padding:0 var(--padding-xs,8px);margin-right:-8px;margin-right:-var(--padding-xs,8px)}.van-field__button,.van-field__clear-root,.van-field__icon-container{-webkit-flex-shrink:0;flex-shrink:0}.van-field__clear-root{font-size:16px;font-size:var(--field-clear-icon-size,16px);color:#c8c9cc;color:var(--field-clear-icon-color,#c8c9cc)}.van-field__icon-container{font-size:16px;font-size:var(--field-icon-size,16px);color:#969799;color:var(--field-icon-container-color,#969799)}.van-field__icon-container:empty{display:none}.van-field__button{padding-left:8px;padding-left:var(--padding-xs,8px)}.van-field__button:empty{display:none}.van-field__error-message{text-align:left;font-size:12px;font-size:var(--field-error-message-text-font-size,12px);color:#ee0a24;color:var(--field-error-message-color,#ee0a24)}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right}.van-field__word-limit{text-align:right;margin-top:4px;margin-top:var(--padding-base,4px);color:#646566;color:var(--field-word-limit-color,#646566);font-size:12px;font-size:var(--field-word-limit-font-size,12px);line-height:16px;line-height:var(--field-word-limit-line-height,16px)}.van-field__word-num{display:inline}.van-field__word-num--full{color:#ee0a24;color:var(--field-word-num-full-color,#ee0a24)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/field/props.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/field/props.js
new file mode 100644
index 00000000..6ce703be
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/field/props.js
@@ -0,0 +1,66 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.textareaProps = exports.inputProps = exports.commonProps = void 0;
+exports.commonProps = {
+ value: {
+ type: String,
+ observer: function (value) {
+ if (value !== this.value) {
+ this.setData({ innerValue: value });
+ this.value = value;
+ }
+ },
+ },
+ placeholder: String,
+ placeholderStyle: String,
+ placeholderClass: String,
+ disabled: Boolean,
+ maxlength: {
+ type: Number,
+ value: -1,
+ },
+ cursorSpacing: {
+ type: Number,
+ value: 50,
+ },
+ autoFocus: Boolean,
+ focus: Boolean,
+ cursor: {
+ type: Number,
+ value: -1,
+ },
+ selectionStart: {
+ type: Number,
+ value: -1,
+ },
+ selectionEnd: {
+ type: Number,
+ value: -1,
+ },
+ adjustPosition: {
+ type: Boolean,
+ value: true,
+ },
+ holdKeyboard: Boolean,
+};
+exports.inputProps = {
+ type: {
+ type: String,
+ value: 'text',
+ },
+ password: Boolean,
+ confirmType: String,
+ confirmHold: Boolean,
+};
+exports.textareaProps = {
+ autoHeight: Boolean,
+ fixed: Boolean,
+ showConfirmBar: {
+ type: Boolean,
+ value: true,
+ },
+ disableDefaultPadding: {
+ type: Boolean,
+ value: true,
+ },
+};
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action-button/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action-button/index.js
new file mode 100644
index 00000000..65e9dba6
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action-button/index.js
@@ -0,0 +1,44 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var link_1 = require('../mixins/link');
+var button_1 = require('../mixins/button');
+var open_type_1 = require('../mixins/open-type');
+component_1.VantComponent({
+ mixins: [link_1.link, button_1.button, open_type_1.openType],
+ relation: {
+ type: 'ancestor',
+ name: 'goods-action',
+ current: 'goods-action-button',
+ },
+ props: {
+ text: String,
+ color: String,
+ loading: Boolean,
+ disabled: Boolean,
+ plain: Boolean,
+ type: {
+ type: String,
+ value: 'danger',
+ },
+ },
+ methods: {
+ onClick: function (event) {
+ this.$emit('click', event.detail);
+ this.jumpLink();
+ },
+ updateStyle: function () {
+ if (this.parent == null) {
+ return;
+ }
+ var _a = this.parent.children,
+ children = _a === void 0 ? [] : _a;
+ var length = children.length;
+ var index = children.indexOf(this);
+ this.setData({
+ isFirst: index === 0,
+ isLast: index === length - 1,
+ });
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action-button/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action-button/index.json
new file mode 100644
index 00000000..b5676868
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action-button/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-button": "../button/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action-button/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action-button/index.wxml
new file mode 100644
index 00000000..3912cedb
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action-button/index.wxml
@@ -0,0 +1,30 @@
+
+
+ {{ text }}
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action-button/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action-button/index.wxss
new file mode 100644
index 00000000..77d16c67
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action-button/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';:host{-webkit-flex:1;flex:1}.van-goods-action-button{--button-warning-background-color:linear-gradient(90deg,#ffd01e,#ff8917);--button-warning-background-color:var(--goods-action-button-warning-color,linear-gradient(90deg,#ffd01e,#ff8917));--button-danger-background-color:linear-gradient(90deg,#ff6034,#ee0a24);--button-danger-background-color:var(--goods-action-button-danger-color,linear-gradient(90deg,#ff6034,#ee0a24));--button-default-height:40px;--button-default-height:var(--goods-action-button-height,40px);--button-line-height:20px;--button-line-height:var(--goods-action-button-line-height,20px);--button-plain-background-color:#fff;--button-plain-background-color:var(--goods-action-button-plain-color,#fff);display:block;--button-border-width:0}.van-goods-action-button--first{margin-left:5px;--button-border-radius:20px 0 0 20px;--button-border-radius:var(--goods-action-button-border-radius,20px) 0 0 var(--goods-action-button-border-radius,20px)}.van-goods-action-button--last{margin-right:5px;--button-border-radius:0 20px 20px 0;--button-border-radius:0 var(--goods-action-button-border-radius,20px) var(--goods-action-button-border-radius,20px) 0}.van-goods-action-button--first.van-goods-action-button--last{--button-border-radius:20px;--button-border-radius:var(--goods-action-button-border-radius,20px)}.van-goods-action-button--plain{--button-border-width:1px}.van-goods-action-button__inner{width:100%;font-weight:500!important;font-weight:var(--font-weight-bold,500)!important}@media (max-width:321px){.van-goods-action-button{font-size:13px}}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action-icon/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action-icon/index.js
new file mode 100644
index 00000000..98fe99a5
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action-icon/index.js
@@ -0,0 +1,24 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var link_1 = require('../mixins/link');
+var button_1 = require('../mixins/button');
+var open_type_1 = require('../mixins/open-type');
+component_1.VantComponent({
+ classes: ['icon-class', 'text-class'],
+ mixins: [link_1.link, button_1.button, open_type_1.openType],
+ props: {
+ text: String,
+ dot: Boolean,
+ info: String,
+ icon: String,
+ disabled: Boolean,
+ loading: Boolean,
+ },
+ methods: {
+ onClick: function (event) {
+ this.$emit('click', event.detail);
+ this.jumpLink();
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action-icon/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action-icon/index.json
new file mode 100644
index 00000000..93bfe8ab
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action-icon/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index",
+ "van-button": "../button/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action-icon/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action-icon/index.wxml
new file mode 100644
index 00000000..f3f00522
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action-icon/index.wxml
@@ -0,0 +1,38 @@
+
+
+
+
+ {{ text }}
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action-icon/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action-icon/index.wxss
new file mode 100644
index 00000000..30fff3d8
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action-icon/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-goods-action-icon{border:none!important;width:50px!important;width:var(--goods-action-icon-height,50px)!important}.van-goods-action-icon__content{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center;height:100%;line-height:1;font-size:10px;font-size:var(--goods-action-icon-font-size,10px);color:#646566;color:var(--goods-action-icon-text-color,#646566)}.van-goods-action-icon__icon{margin-bottom:4px}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action/index.js
new file mode 100644
index 00000000..43921473
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action/index.js
@@ -0,0 +1,35 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ relation: {
+ type: 'descendant',
+ name: 'goods-action-button',
+ current: 'goods-action',
+ linked: function () {
+ this.updateStyle();
+ },
+ unlinked: function () {
+ this.updateStyle();
+ },
+ linkChanged: function () {
+ this.updateStyle();
+ },
+ },
+ props: {
+ safeAreaInsetBottom: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ methods: {
+ updateStyle: function () {
+ var _this = this;
+ wx.nextTick(function () {
+ _this.children.forEach(function (child) {
+ child.updateStyle();
+ });
+ });
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action/index.wxml
new file mode 100644
index 00000000..569450c7
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action/index.wxml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action/index.wxss
new file mode 100644
index 00000000..22b779ef
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/goods-action/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-goods-action{position:fixed;right:0;bottom:0;left:0;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;background-color:#fff;background-color:var(--goods-action-background-color,#fff)}.van-goods-action--safe{padding-bottom:env(safe-area-inset-bottom)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/grid-item/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/grid-item/index.js
new file mode 100644
index 00000000..1888ff1d
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/grid-item/index.js
@@ -0,0 +1,85 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var link_1 = require('../mixins/link');
+var component_1 = require('../common/component');
+var utils_1 = require('../common/utils');
+component_1.VantComponent({
+ relation: {
+ name: 'grid',
+ type: 'ancestor',
+ current: 'grid-item',
+ },
+ classes: ['content-class', 'icon-class', 'text-class'],
+ mixins: [link_1.link],
+ props: {
+ icon: String,
+ dot: Boolean,
+ info: null,
+ badge: null,
+ text: String,
+ useSlot: Boolean,
+ },
+ data: {
+ viewStyle: '',
+ },
+ mounted: function () {
+ this.updateStyle();
+ },
+ methods: {
+ updateStyle: function () {
+ if (!this.parent) {
+ return;
+ }
+ var _a = this.parent,
+ data = _a.data,
+ children = _a.children;
+ var columnNum = data.columnNum,
+ border = data.border,
+ square = data.square,
+ gutter = data.gutter,
+ clickable = data.clickable,
+ center = data.center,
+ direction = data.direction,
+ iconSize = data.iconSize;
+ var width = 100 / columnNum + '%';
+ var styleWrapper = [];
+ styleWrapper.push('width: ' + width);
+ if (square) {
+ styleWrapper.push('padding-top: ' + width);
+ }
+ if (gutter) {
+ var gutterValue = utils_1.addUnit(gutter);
+ styleWrapper.push('padding-right: ' + gutterValue);
+ var index = children.indexOf(this);
+ if (index >= columnNum && !square) {
+ styleWrapper.push('margin-top: ' + gutterValue);
+ }
+ }
+ var contentStyle = '';
+ if (square && gutter) {
+ var gutterValue = utils_1.addUnit(gutter);
+ contentStyle =
+ '\n right: ' +
+ gutterValue +
+ ';\n bottom: ' +
+ gutterValue +
+ ';\n height: auto;\n ';
+ }
+ this.setData({
+ viewStyle: styleWrapper.join('; '),
+ contentStyle: contentStyle,
+ center: center,
+ border: border,
+ square: square,
+ gutter: gutter,
+ clickable: clickable,
+ direction: direction,
+ iconSize: iconSize,
+ });
+ },
+ onClick: function () {
+ this.$emit('click');
+ this.jumpLink();
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/grid-item/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/grid-item/index.json
new file mode 100644
index 00000000..0a336c08
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/grid-item/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/grid-item/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/grid-item/index.wxml
new file mode 100644
index 00000000..a27c06f1
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/grid-item/index.wxml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ text }}
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/grid-item/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/grid-item/index.wxss
new file mode 100644
index 00000000..ed7facb8
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/grid-item/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-grid-item{position:relative;float:left;box-sizing:border-box}.van-grid-item--square{height:0}.van-grid-item__content{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;box-sizing:border-box;height:100%;padding:16px 8px;padding:var(--grid-item-content-padding,16px 8px);background-color:#fff;background-color:var(--grid-item-content-background-color,#fff)}.van-grid-item__content:after{z-index:1;border-width:0 1px 1px 0;border-bottom-width:var(--border-width-base,1px);border-right-width:var(--border-width-base,1px);border-top-width:0}.van-grid-item__content--surround:after{border-width:1px;border-width:var(--border-width-base,1px)}.van-grid-item__content--center{-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.van-grid-item__content--square{position:absolute;top:0;right:0;left:0}.van-grid-item__content--horizontal{-webkit-flex-direction:row;flex-direction:row}.van-grid-item__content--horizontal .van-grid-item__icon+.van-grid-item__text{margin-top:0;margin-left:8px}.van-grid-item__content--clickable:active{background-color:#f2f3f5;background-color:var(--grid-item-content-active-color,#f2f3f5)}.van-grid-item__icon{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;font-size:26px;font-size:var(--grid-item-icon-size,26px);height:26px;height:var(--grid-item-icon-size,26px)}.van-grid-item__text{word-wrap:break-word;color:#646566;color:var(--grid-item-text-color,#646566);font-size:12px;font-size:var(--grid-item-text-font-size,12px)}.van-grid-item__icon+.van-grid-item__text{margin-top:8px}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/grid/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/grid/index.js
new file mode 100644
index 00000000..cb5c067a
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/grid/index.js
@@ -0,0 +1,67 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var utils_1 = require('../common/utils');
+component_1.VantComponent({
+ relation: {
+ name: 'grid-item',
+ type: 'descendant',
+ current: 'grid',
+ },
+ props: {
+ square: {
+ type: Boolean,
+ observer: 'updateChildren',
+ },
+ gutter: {
+ type: [Number, String],
+ value: 0,
+ observer: 'updateChildren',
+ },
+ clickable: {
+ type: Boolean,
+ observer: 'updateChildren',
+ },
+ columnNum: {
+ type: Number,
+ value: 4,
+ observer: 'updateChildren',
+ },
+ center: {
+ type: Boolean,
+ value: true,
+ observer: 'updateChildren',
+ },
+ border: {
+ type: Boolean,
+ value: true,
+ observer: 'updateChildren',
+ },
+ direction: {
+ type: String,
+ observer: 'updateChildren',
+ },
+ iconSize: {
+ type: String,
+ observer: 'updateChildren',
+ },
+ },
+ data: {
+ viewStyle: '',
+ },
+ created: function () {
+ var gutter = this.data.gutter;
+ if (gutter) {
+ this.setData({
+ viewStyle: 'padding-left: ' + utils_1.addUnit(gutter),
+ });
+ }
+ },
+ methods: {
+ updateChildren: function () {
+ this.children.forEach(function (child) {
+ child.updateStyle();
+ });
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/grid/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/grid/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/grid/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/grid/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/grid/index.wxml
new file mode 100644
index 00000000..c5a545f5
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/grid/index.wxml
@@ -0,0 +1,3 @@
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/grid/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/grid/index.wxss
new file mode 100644
index 00000000..327fc5ef
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/grid/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-grid{position:relative;box-sizing:border-box;overflow:hidden}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/icon/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/icon/index.js
new file mode 100644
index 00000000..0f06f9e7
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/icon/index.js
@@ -0,0 +1,29 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ props: {
+ dot: Boolean,
+ info: null,
+ size: null,
+ color: String,
+ customStyle: String,
+ classPrefix: {
+ type: String,
+ value: 'van-icon',
+ },
+ name: {
+ type: String,
+ observer: function (val) {
+ this.setData({
+ isImageName: val.indexOf('/') !== -1,
+ });
+ },
+ },
+ },
+ methods: {
+ onClick: function () {
+ this.$emit('click');
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/icon/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/icon/index.json
new file mode 100644
index 00000000..bf0ebe00
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/icon/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-info": "../info/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/icon/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/icon/index.wxml
new file mode 100644
index 00000000..fe4065a4
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/icon/index.wxml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/icon/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/icon/index.wxss
new file mode 100644
index 00000000..cf2c506c
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/icon/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';@font-face{font-weight:400;font-family:vant-icon;font-style:normal;font-display:auto;src:url(https://img.yzcdn.cn/vant/vant-icon-d3825a.woff2) format("woff2"),url(https://img.yzcdn.cn/vant/vant-icon-d3825a.woff) format("woff"),url(https://img.yzcdn.cn/vant/vant-icon-d3825a.ttf) format("truetype")}.van-icon{position:relative;font:normal normal normal 14px/1 vant-icon;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased}.van-icon,.van-icon:before{display:inline-block}.van-icon-add-o:before{content:"\F000"}.van-icon-add-square:before{content:"\F001"}.van-icon-add:before{content:"\F002"}.van-icon-after-sale:before{content:"\F003"}.van-icon-aim:before{content:"\F004"}.van-icon-alipay:before{content:"\F005"}.van-icon-apps-o:before{content:"\F006"}.van-icon-arrow-down:before{content:"\F007"}.van-icon-arrow-left:before{content:"\F008"}.van-icon-arrow-up:before{content:"\F009"}.van-icon-arrow:before{content:"\F00A"}.van-icon-ascending:before{content:"\F00B"}.van-icon-audio:before{content:"\F00C"}.van-icon-award-o:before{content:"\F00D"}.van-icon-award:before{content:"\F00E"}.van-icon-bag-o:before{content:"\F00F"}.van-icon-bag:before{content:"\F010"}.van-icon-balance-list-o:before{content:"\F011"}.van-icon-balance-list:before{content:"\F012"}.van-icon-balance-o:before{content:"\F013"}.van-icon-balance-pay:before{content:"\F014"}.van-icon-bar-chart-o:before{content:"\F015"}.van-icon-bars:before{content:"\F016"}.van-icon-bell:before{content:"\F017"}.van-icon-bill-o:before{content:"\F018"}.van-icon-bill:before{content:"\F019"}.van-icon-birthday-cake-o:before{content:"\F01A"}.van-icon-bookmark-o:before{content:"\F01B"}.van-icon-bookmark:before{content:"\F01C"}.van-icon-browsing-history-o:before{content:"\F01D"}.van-icon-browsing-history:before{content:"\F01E"}.van-icon-brush-o:before{content:"\F01F"}.van-icon-bulb-o:before{content:"\F020"}.van-icon-bullhorn-o:before{content:"\F021"}.van-icon-calender-o:before{content:"\F022"}.van-icon-card:before{content:"\F023"}.van-icon-cart-circle-o:before{content:"\F024"}.van-icon-cart-circle:before{content:"\F025"}.van-icon-cart-o:before{content:"\F026"}.van-icon-cart:before{content:"\F027"}.van-icon-cash-back-record:before{content:"\F028"}.van-icon-cash-on-deliver:before{content:"\F029"}.van-icon-cashier-o:before{content:"\F02A"}.van-icon-certificate:before{content:"\F02B"}.van-icon-chart-trending-o:before{content:"\F02C"}.van-icon-chat-o:before{content:"\F02D"}.van-icon-chat:before{content:"\F02E"}.van-icon-checked:before{content:"\F02F"}.van-icon-circle:before{content:"\F030"}.van-icon-clear:before{content:"\F031"}.van-icon-clock-o:before{content:"\F032"}.van-icon-clock:before{content:"\F033"}.van-icon-close:before{content:"\F034"}.van-icon-closed-eye:before{content:"\F035"}.van-icon-cluster-o:before{content:"\F036"}.van-icon-cluster:before{content:"\F037"}.van-icon-column:before{content:"\F038"}.van-icon-comment-circle-o:before{content:"\F039"}.van-icon-comment-circle:before{content:"\F03A"}.van-icon-comment-o:before{content:"\F03B"}.van-icon-comment:before{content:"\F03C"}.van-icon-completed:before{content:"\F03D"}.van-icon-contact:before{content:"\F03E"}.van-icon-coupon-o:before{content:"\F03F"}.van-icon-coupon:before{content:"\F040"}.van-icon-credit-pay:before{content:"\F041"}.van-icon-cross:before{content:"\F042"}.van-icon-debit-pay:before{content:"\F043"}.van-icon-delete:before{content:"\F044"}.van-icon-descending:before{content:"\F045"}.van-icon-description:before{content:"\F046"}.van-icon-desktop-o:before{content:"\F047"}.van-icon-diamond-o:before{content:"\F048"}.van-icon-diamond:before{content:"\F049"}.van-icon-discount:before{content:"\F04A"}.van-icon-down:before{content:"\F04B"}.van-icon-ecard-pay:before{content:"\F04C"}.van-icon-edit:before{content:"\F04D"}.van-icon-ellipsis:before{content:"\F04E"}.van-icon-empty:before{content:"\F04F"}.van-icon-envelop-o:before{content:"\F050"}.van-icon-exchange:before{content:"\F051"}.van-icon-expand-o:before{content:"\F052"}.van-icon-expand:before{content:"\F053"}.van-icon-eye-o:before{content:"\F054"}.van-icon-eye:before{content:"\F055"}.van-icon-fail:before{content:"\F056"}.van-icon-failure:before{content:"\F057"}.van-icon-filter-o:before{content:"\F058"}.van-icon-fire-o:before{content:"\F059"}.van-icon-fire:before{content:"\F05A"}.van-icon-flag-o:before{content:"\F05B"}.van-icon-flower-o:before{content:"\F05C"}.van-icon-free-postage:before{content:"\F05D"}.van-icon-friends-o:before{content:"\F05E"}.van-icon-friends:before{content:"\F05F"}.van-icon-gem-o:before{content:"\F060"}.van-icon-gem:before{content:"\F061"}.van-icon-gift-card-o:before{content:"\F062"}.van-icon-gift-card:before{content:"\F063"}.van-icon-gift-o:before{content:"\F064"}.van-icon-gift:before{content:"\F065"}.van-icon-gold-coin-o:before{content:"\F066"}.van-icon-gold-coin:before{content:"\F067"}.van-icon-good-job-o:before{content:"\F068"}.van-icon-good-job:before{content:"\F069"}.van-icon-goods-collect-o:before{content:"\F06A"}.van-icon-goods-collect:before{content:"\F06B"}.van-icon-graphic:before{content:"\F06C"}.van-icon-home-o:before{content:"\F06D"}.van-icon-hot-o:before{content:"\F06E"}.van-icon-hot-sale-o:before{content:"\F06F"}.van-icon-hot-sale:before{content:"\F070"}.van-icon-hot:before{content:"\F071"}.van-icon-hotel-o:before{content:"\F072"}.van-icon-idcard:before{content:"\F073"}.van-icon-info-o:before{content:"\F074"}.van-icon-info:before{content:"\F075"}.van-icon-invition:before{content:"\F076"}.van-icon-label-o:before{content:"\F077"}.van-icon-label:before{content:"\F078"}.van-icon-like-o:before{content:"\F079"}.van-icon-like:before{content:"\F07A"}.van-icon-live:before{content:"\F07B"}.van-icon-location-o:before{content:"\F07C"}.van-icon-location:before{content:"\F07D"}.van-icon-lock:before{content:"\F07E"}.van-icon-logistics:before{content:"\F07F"}.van-icon-manager-o:before{content:"\F080"}.van-icon-manager:before{content:"\F081"}.van-icon-map-marked:before{content:"\F082"}.van-icon-medal-o:before{content:"\F083"}.van-icon-medal:before{content:"\F084"}.van-icon-more-o:before{content:"\F085"}.van-icon-more:before{content:"\F086"}.van-icon-music-o:before{content:"\F087"}.van-icon-music:before{content:"\F088"}.van-icon-new-arrival-o:before{content:"\F089"}.van-icon-new-arrival:before{content:"\F08A"}.van-icon-new-o:before{content:"\F08B"}.van-icon-new:before{content:"\F08C"}.van-icon-newspaper-o:before{content:"\F08D"}.van-icon-notes-o:before{content:"\F08E"}.van-icon-orders-o:before{content:"\F08F"}.van-icon-other-pay:before{content:"\F090"}.van-icon-paid:before{content:"\F091"}.van-icon-passed:before{content:"\F092"}.van-icon-pause-circle-o:before{content:"\F093"}.van-icon-pause-circle:before{content:"\F094"}.van-icon-pause:before{content:"\F095"}.van-icon-peer-pay:before{content:"\F096"}.van-icon-pending-payment:before{content:"\F097"}.van-icon-phone-circle-o:before{content:"\F098"}.van-icon-phone-circle:before{content:"\F099"}.van-icon-phone-o:before{content:"\F09A"}.van-icon-phone:before{content:"\F09B"}.van-icon-photo-o:before{content:"\F09C"}.van-icon-photo:before{content:"\F09D"}.van-icon-photograph:before{content:"\F09E"}.van-icon-play-circle-o:before{content:"\F09F"}.van-icon-play-circle:before{content:"\F0A0"}.van-icon-play:before{content:"\F0A1"}.van-icon-plus:before{content:"\F0A2"}.van-icon-point-gift-o:before{content:"\F0A3"}.van-icon-point-gift:before{content:"\F0A4"}.van-icon-points:before{content:"\F0A5"}.van-icon-printer:before{content:"\F0A6"}.van-icon-qr-invalid:before{content:"\F0A7"}.van-icon-qr:before{content:"\F0A8"}.van-icon-question-o:before{content:"\F0A9"}.van-icon-question:before{content:"\F0AA"}.van-icon-records:before{content:"\F0AB"}.van-icon-refund-o:before{content:"\F0AC"}.van-icon-replay:before{content:"\F0AD"}.van-icon-scan:before{content:"\F0AE"}.van-icon-search:before{content:"\F0AF"}.van-icon-send-gift-o:before{content:"\F0B0"}.van-icon-send-gift:before{content:"\F0B1"}.van-icon-service-o:before{content:"\F0B2"}.van-icon-service:before{content:"\F0B3"}.van-icon-setting-o:before{content:"\F0B4"}.van-icon-setting:before{content:"\F0B5"}.van-icon-share:before{content:"\F0B6"}.van-icon-shop-collect-o:before{content:"\F0B7"}.van-icon-shop-collect:before{content:"\F0B8"}.van-icon-shop-o:before{content:"\F0B9"}.van-icon-shop:before{content:"\F0BA"}.van-icon-shopping-cart-o:before{content:"\F0BB"}.van-icon-shopping-cart:before{content:"\F0BC"}.van-icon-shrink:before{content:"\F0BD"}.van-icon-sign:before{content:"\F0BE"}.van-icon-smile-comment-o:before{content:"\F0BF"}.van-icon-smile-comment:before{content:"\F0C0"}.van-icon-smile-o:before{content:"\F0C1"}.van-icon-smile:before{content:"\F0C2"}.van-icon-star-o:before{content:"\F0C3"}.van-icon-star:before{content:"\F0C4"}.van-icon-stop-circle-o:before{content:"\F0C5"}.van-icon-stop-circle:before{content:"\F0C6"}.van-icon-stop:before{content:"\F0C7"}.van-icon-success:before{content:"\F0C8"}.van-icon-thumb-circle-o:before{content:"\F0C9"}.van-icon-thumb-circle:before{content:"\F0CA"}.van-icon-todo-list-o:before{content:"\F0CB"}.van-icon-todo-list:before{content:"\F0CC"}.van-icon-tosend:before{content:"\F0CD"}.van-icon-tv-o:before{content:"\F0CE"}.van-icon-umbrella-circle:before{content:"\F0CF"}.van-icon-underway-o:before{content:"\F0D0"}.van-icon-underway:before{content:"\F0D1"}.van-icon-upgrade:before{content:"\F0D2"}.van-icon-user-circle-o:before{content:"\F0D3"}.van-icon-user-o:before{content:"\F0D4"}.van-icon-video-o:before{content:"\F0D5"}.van-icon-video:before{content:"\F0D6"}.van-icon-vip-card-o:before{content:"\F0D7"}.van-icon-vip-card:before{content:"\F0D8"}.van-icon-volume-o:before{content:"\F0D9"}.van-icon-volume:before{content:"\F0DA"}.van-icon-wap-home-o:before{content:"\F0DB"}.van-icon-wap-home:before{content:"\F0DC"}.van-icon-wap-nav:before{content:"\F0DD"}.van-icon-warn-o:before{content:"\F0DE"}.van-icon-warning-o:before{content:"\F0DF"}.van-icon-warning:before{content:"\F0E0"}.van-icon-weapp-nav:before{content:"\F0E1"}.van-icon-wechat:before{content:"\F0E2"}.van-icon-youzan-shield:before{content:"\F0E3"}:host{display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.van-icon--image{width:1em;height:1em}.van-icon__image{width:100%;height:100%}.van-icon__info{z-index:1}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/image/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/image/index.js
new file mode 100644
index 00000000..e3348d93
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/image/index.js
@@ -0,0 +1,106 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var utils_1 = require('../common/utils');
+var component_1 = require('../common/component');
+var button_1 = require('../mixins/button');
+var open_type_1 = require('../mixins/open-type');
+var FIT_MODE_MAP = {
+ none: 'center',
+ fill: 'scaleToFill',
+ cover: 'aspectFill',
+ contain: 'aspectFit',
+ widthFix: 'widthFix',
+ heightFix: 'heightFix',
+};
+component_1.VantComponent({
+ mixins: [button_1.button, open_type_1.openType],
+ classes: ['custom-class', 'loading-class', 'error-class', 'image-class'],
+ props: {
+ src: {
+ type: String,
+ observer: function () {
+ this.setData({
+ error: false,
+ loading: true,
+ });
+ },
+ },
+ round: Boolean,
+ width: {
+ type: null,
+ observer: 'setStyle',
+ },
+ height: {
+ type: null,
+ observer: 'setStyle',
+ },
+ radius: null,
+ lazyLoad: Boolean,
+ useErrorSlot: Boolean,
+ useLoadingSlot: Boolean,
+ showMenuByLongpress: Boolean,
+ fit: {
+ type: String,
+ value: 'fill',
+ observer: 'setMode',
+ },
+ showError: {
+ type: Boolean,
+ value: true,
+ },
+ showLoading: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ data: {
+ error: false,
+ loading: true,
+ viewStyle: '',
+ },
+ mounted: function () {
+ this.setMode();
+ this.setStyle();
+ },
+ methods: {
+ setMode: function () {
+ this.setData({
+ mode: FIT_MODE_MAP[this.data.fit],
+ });
+ },
+ setStyle: function () {
+ var _a = this.data,
+ width = _a.width,
+ height = _a.height,
+ radius = _a.radius;
+ var style = '';
+ if (utils_1.isDef(width)) {
+ style += 'width: ' + utils_1.addUnit(width) + ';';
+ }
+ if (utils_1.isDef(height)) {
+ style += 'height: ' + utils_1.addUnit(height) + ';';
+ }
+ if (utils_1.isDef(radius)) {
+ style += 'overflow: hidden;';
+ style += 'border-radius: ' + utils_1.addUnit(radius) + ';';
+ }
+ this.setData({ viewStyle: style });
+ },
+ onLoad: function (event) {
+ this.setData({
+ loading: false,
+ });
+ this.$emit('load', event.detail);
+ },
+ onError: function (event) {
+ this.setData({
+ loading: false,
+ error: true,
+ });
+ this.$emit('error', event.detail);
+ },
+ onClick: function (event) {
+ this.$emit('click', event.detail);
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/image/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/image/index.json
new file mode 100644
index 00000000..e00a5887
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/image/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index",
+ "van-loading": "../loading/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/image/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/image/index.wxml
new file mode 100644
index 00000000..6450ba14
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/image/index.wxml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/image/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/image/index.wxss
new file mode 100644
index 00000000..e5f1637a
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/image/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-image{position:relative;display:inline-block}.van-image--round{overflow:hidden;border-radius:50%}.van-image--round .van-image__img{border-radius:inherit}.van-image__error,.van-image__img,.van-image__loading{display:block;width:100%;height:100%}.van-image__error,.van-image__loading{position:absolute;top:0;left:0;display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;color:#969799;color:var(--image-placeholder-text-color,#969799);font-size:14px;font-size:var(--image-placeholder-font-size,14px);background-color:#f7f8fa;background-color:var(--image-placeholder-background-color,#f7f8fa)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/index-anchor/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/index-anchor/index.js
new file mode 100644
index 00000000..89fcf9da
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/index-anchor/index.js
@@ -0,0 +1,33 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ relation: {
+ name: 'index-bar',
+ type: 'ancestor',
+ current: 'index-anchor',
+ },
+ props: {
+ useSlot: Boolean,
+ index: null,
+ },
+ data: {
+ active: false,
+ wrapperStyle: '',
+ anchorStyle: '',
+ },
+ methods: {
+ scrollIntoView: function (scrollTop) {
+ var _this = this;
+ this.getBoundingClientRect().then(function (rect) {
+ wx.pageScrollTo({
+ duration: 0,
+ scrollTop: scrollTop + rect.top - _this.parent.data.stickyOffsetTop,
+ });
+ });
+ },
+ getBoundingClientRect: function () {
+ return this.getRect('.van-index-anchor-wrapper');
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/index-anchor/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/index-anchor/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/index-anchor/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/index-anchor/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/index-anchor/index.wxml
new file mode 100644
index 00000000..49affa7c
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/index-anchor/index.wxml
@@ -0,0 +1,14 @@
+
+
+
+
+ {{ index }}
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/index-anchor/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/index-anchor/index.wxss
new file mode 100644
index 00000000..b8c3c0a4
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/index-anchor/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-index-anchor{padding:0 16px;padding:var(--index-anchor-padding,0 16px);color:#323233;color:var(--index-anchor-text-color,#323233);font-weight:500;font-weight:var(--index-anchor-font-weight,500);font-size:14px;font-size:var(--index-anchor-font-size,14px);line-height:32px;line-height:var(--index-anchor-line-height,32px);background-color:initial;background-color:var(--index-anchor-background-color,transparent)}.van-index-anchor--active{right:0;left:0;color:#07c160;color:var(--index-anchor-active-text-color,#07c160);background-color:#fff;background-color:var(--index-anchor-active-background-color,#fff)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/index-bar/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/index-bar/index.js
new file mode 100644
index 00000000..ebda3b11
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/index-bar/index.js
@@ -0,0 +1,279 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var color_1 = require('../common/color');
+var page_scroll_1 = require('../mixins/page-scroll');
+var indexList = function () {
+ var indexList = [];
+ var charCodeOfA = 'A'.charCodeAt(0);
+ for (var i = 0; i < 26; i++) {
+ indexList.push(String.fromCharCode(charCodeOfA + i));
+ }
+ return indexList;
+};
+component_1.VantComponent({
+ relation: {
+ name: 'index-anchor',
+ type: 'descendant',
+ current: 'index-bar',
+ linked: function () {
+ this.updateData();
+ },
+ unlinked: function () {
+ this.updateData();
+ },
+ },
+ props: {
+ sticky: {
+ type: Boolean,
+ value: true,
+ },
+ zIndex: {
+ type: Number,
+ value: 1,
+ },
+ highlightColor: {
+ type: String,
+ value: color_1.GREEN,
+ },
+ stickyOffsetTop: {
+ type: Number,
+ value: 0,
+ },
+ indexList: {
+ type: Array,
+ value: indexList(),
+ },
+ },
+ mixins: [
+ page_scroll_1.pageScrollMixin(function (event) {
+ this.scrollTop = event.scrollTop || 0;
+ this.onScroll();
+ }),
+ ],
+ data: {
+ activeAnchorIndex: null,
+ showSidebar: false,
+ },
+ created: function () {
+ this.scrollTop = 0;
+ },
+ methods: {
+ updateData: function () {
+ var _this = this;
+ wx.nextTick(function () {
+ if (_this.timer != null) {
+ clearTimeout(_this.timer);
+ }
+ _this.timer = setTimeout(function () {
+ _this.setData({
+ showSidebar: !!_this.children.length,
+ });
+ _this.setRect().then(function () {
+ _this.onScroll();
+ });
+ }, 0);
+ });
+ },
+ setRect: function () {
+ return Promise.all([
+ this.setAnchorsRect(),
+ this.setListRect(),
+ this.setSiderbarRect(),
+ ]);
+ },
+ setAnchorsRect: function () {
+ var _this = this;
+ return Promise.all(
+ this.children.map(function (anchor) {
+ return anchor
+ .getRect('.van-index-anchor-wrapper')
+ .then(function (rect) {
+ Object.assign(anchor, {
+ height: rect.height,
+ top: rect.top + _this.scrollTop,
+ });
+ });
+ })
+ );
+ },
+ setListRect: function () {
+ var _this = this;
+ return this.getRect('.van-index-bar').then(function (rect) {
+ Object.assign(_this, {
+ height: rect.height,
+ top: rect.top + _this.scrollTop,
+ });
+ });
+ },
+ setSiderbarRect: function () {
+ var _this = this;
+ return this.getRect('.van-index-bar__sidebar').then(function (res) {
+ _this.sidebar = {
+ height: res.height,
+ top: res.top,
+ };
+ });
+ },
+ setDiffData: function (_a) {
+ var target = _a.target,
+ data = _a.data;
+ var diffData = {};
+ Object.keys(data).forEach(function (key) {
+ if (target.data[key] !== data[key]) {
+ diffData[key] = data[key];
+ }
+ });
+ if (Object.keys(diffData).length) {
+ target.setData(diffData);
+ }
+ },
+ getAnchorRect: function (anchor) {
+ return anchor.getRect('.van-index-anchor-wrapper').then(function (rect) {
+ return {
+ height: rect.height,
+ top: rect.top,
+ };
+ });
+ },
+ getActiveAnchorIndex: function () {
+ var _a = this,
+ children = _a.children,
+ scrollTop = _a.scrollTop;
+ var _b = this.data,
+ sticky = _b.sticky,
+ stickyOffsetTop = _b.stickyOffsetTop;
+ for (var i = this.children.length - 1; i >= 0; i--) {
+ var preAnchorHeight = i > 0 ? children[i - 1].height : 0;
+ var reachTop = sticky ? preAnchorHeight + stickyOffsetTop : 0;
+ if (reachTop + scrollTop >= children[i].top) {
+ return i;
+ }
+ }
+ return -1;
+ },
+ onScroll: function () {
+ var _this = this;
+ var _a = this,
+ _b = _a.children,
+ children = _b === void 0 ? [] : _b,
+ scrollTop = _a.scrollTop;
+ if (!children.length) {
+ return;
+ }
+ var _c = this.data,
+ sticky = _c.sticky,
+ stickyOffsetTop = _c.stickyOffsetTop,
+ zIndex = _c.zIndex,
+ highlightColor = _c.highlightColor;
+ var active = this.getActiveAnchorIndex();
+ this.setDiffData({
+ target: this,
+ data: {
+ activeAnchorIndex: active,
+ },
+ });
+ if (sticky) {
+ var isActiveAnchorSticky_1 = false;
+ if (active !== -1) {
+ isActiveAnchorSticky_1 =
+ children[active].top <= stickyOffsetTop + scrollTop;
+ }
+ children.forEach(function (item, index) {
+ if (index === active) {
+ var wrapperStyle = '';
+ var anchorStyle =
+ '\n color: ' + highlightColor + ';\n ';
+ if (isActiveAnchorSticky_1) {
+ wrapperStyle =
+ '\n height: ' +
+ children[index].height +
+ 'px;\n ';
+ anchorStyle =
+ '\n position: fixed;\n top: ' +
+ stickyOffsetTop +
+ 'px;\n z-index: ' +
+ zIndex +
+ ';\n color: ' +
+ highlightColor +
+ ';\n ';
+ }
+ _this.setDiffData({
+ target: item,
+ data: {
+ active: true,
+ anchorStyle: anchorStyle,
+ wrapperStyle: wrapperStyle,
+ },
+ });
+ } else if (index === active - 1) {
+ var currentAnchor = children[index];
+ var currentOffsetTop = currentAnchor.top;
+ var targetOffsetTop =
+ index === children.length - 1
+ ? _this.top
+ : children[index + 1].top;
+ var parentOffsetHeight = targetOffsetTop - currentOffsetTop;
+ var translateY = parentOffsetHeight - currentAnchor.height;
+ var anchorStyle =
+ '\n position: relative;\n transform: translate3d(0, ' +
+ translateY +
+ 'px, 0);\n z-index: ' +
+ zIndex +
+ ';\n color: ' +
+ highlightColor +
+ ';\n ';
+ _this.setDiffData({
+ target: item,
+ data: {
+ active: true,
+ anchorStyle: anchorStyle,
+ },
+ });
+ } else {
+ _this.setDiffData({
+ target: item,
+ data: {
+ active: false,
+ anchorStyle: '',
+ wrapperStyle: '',
+ },
+ });
+ }
+ });
+ }
+ },
+ onClick: function (event) {
+ this.scrollToAnchor(event.target.dataset.index);
+ },
+ onTouchMove: function (event) {
+ var sidebarLength = this.children.length;
+ var touch = event.touches[0];
+ var itemHeight = this.sidebar.height / sidebarLength;
+ var index = Math.floor((touch.clientY - this.sidebar.top) / itemHeight);
+ if (index < 0) {
+ index = 0;
+ } else if (index > sidebarLength - 1) {
+ index = sidebarLength - 1;
+ }
+ this.scrollToAnchor(index);
+ },
+ onTouchStop: function () {
+ this.scrollToAnchorIndex = null;
+ },
+ scrollToAnchor: function (index) {
+ var _this = this;
+ if (typeof index !== 'number' || this.scrollToAnchorIndex === index) {
+ return;
+ }
+ this.scrollToAnchorIndex = index;
+ var anchor = this.children.find(function (item) {
+ return item.data.index === _this.data.indexList[index];
+ });
+ if (anchor) {
+ anchor.scrollIntoView(this.scrollTop);
+ this.$emit('select', anchor.data.index);
+ }
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/index-bar/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/index-bar/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/index-bar/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/index-bar/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/index-bar/index.wxml
new file mode 100644
index 00000000..19a59cf9
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/index-bar/index.wxml
@@ -0,0 +1,22 @@
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/index-bar/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/index-bar/index.wxss
new file mode 100644
index 00000000..dba5dc07
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/index-bar/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-index-bar{position:relative}.van-index-bar__sidebar{position:fixed;top:50%;right:0;display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;text-align:center;-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-user-select:none;user-select:none}.van-index-bar__index{font-weight:500;padding:0 4px 0 16px;padding:0 var(--padding-base,4px) 0 var(--padding-md,16px);font-size:10px;font-size:var(--index-bar-index-font-size,10px);line-height:14px;line-height:var(--index-bar-index-line-height,14px)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/info/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/info/index.js
new file mode 100644
index 00000000..a08ad2ca
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/info/index.js
@@ -0,0 +1,10 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ props: {
+ dot: Boolean,
+ info: null,
+ customStyle: String,
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/info/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/info/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/info/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/info/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/info/index.wxml
new file mode 100644
index 00000000..3112dfc9
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/info/index.wxml
@@ -0,0 +1,7 @@
+
+
+{{ dot ? '' : info }}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/info/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/info/index.wxss
new file mode 100644
index 00000000..6d44b8ef
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/info/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-info{position:absolute;top:0;right:0;box-sizing:border-box;white-space:nowrap;text-align:center;-webkit-transform:translate(50%,-50%);transform:translate(50%,-50%);-webkit-transform-origin:100%;transform-origin:100%;min-width:16px;min-width:var(--info-size,16px);padding:0 3px;padding:var(--info-padding,0 3px);color:#fff;color:var(--info-color,#fff);font-weight:500;font-weight:var(--info-font-weight,500);font-size:12px;font-size:var(--info-font-size,12px);font-family:Avenir-Heavy,PingFang SC,Helvetica Neue,Arial,sans-serif;font-family:var(--info-font-family,Avenir-Heavy,PingFang SC,Helvetica Neue,Arial,sans-serif);line-height:14px;line-height:calc(var(--info-size, 16px) - var(--info-border-width, 1px)*2);background-color:#ee0a24;background-color:var(--info-background-color,#ee0a24);border:1px solid #fff;border:var(--info-border-width,1px) solid var(--white,#fff);border-radius:16px;border-radius:var(--info-size,16px)}.van-info--dot{min-width:0;border-radius:100%;width:8px;width:var(--info-dot-size,8px);height:8px;height:var(--info-dot-size,8px);background-color:#ee0a24;background-color:var(--info-dot-color,#ee0a24)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/loading/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/loading/index.js
new file mode 100644
index 00000000..5aa2a817
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/loading/index.js
@@ -0,0 +1,18 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ props: {
+ color: String,
+ vertical: Boolean,
+ type: {
+ type: String,
+ value: 'circular',
+ },
+ size: String,
+ textSize: String,
+ },
+ data: {
+ array12: Array.from({ length: 12 }),
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/loading/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/loading/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/loading/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/loading/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/loading/index.wxml
new file mode 100644
index 00000000..e934288b
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/loading/index.wxml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/loading/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/loading/index.wxss
new file mode 100644
index 00000000..f28a6b46
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/loading/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';:host{font-size:0;line-height:1}.van-loading{display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;color:#c8c9cc;color:var(--loading-spinner-color,#c8c9cc)}.van-loading__spinner{position:relative;box-sizing:border-box;width:30px;width:var(--loading-spinner-size,30px);max-width:100%;max-height:100%;height:30px;height:var(--loading-spinner-size,30px);-webkit-animation:van-rotate .8s linear infinite;animation:van-rotate .8s linear infinite;-webkit-animation:van-rotate var(--loading-spinner-animation-duration,.8s) linear infinite;animation:van-rotate var(--loading-spinner-animation-duration,.8s) linear infinite}.van-loading__spinner--spinner{-webkit-animation-timing-function:steps(12);animation-timing-function:steps(12)}.van-loading__spinner--circular{border:1px solid transparent;border-top-color:initial;border-radius:100%}.van-loading__text{margin-left:8px;margin-left:var(--padding-xs,8px);color:#969799;color:var(--loading-text-color,#969799);font-size:14px;font-size:var(--loading-text-font-size,14px);line-height:20px;line-height:var(--loading-text-line-height,20px)}.van-loading__text:empty{display:none}.van-loading--vertical{-webkit-flex-direction:column;flex-direction:column}.van-loading--vertical .van-loading__text{margin:8px 0 0;margin:var(--padding-xs,8px) 0 0}.van-loading__dot{position:absolute;top:0;left:0;width:100%;height:100%}.van-loading__dot:before{display:block;width:2px;height:25%;margin:0 auto;background-color:currentColor;border-radius:40%;content:" "}.van-loading__dot:first-of-type{-webkit-transform:rotate(30deg);transform:rotate(30deg);opacity:1}.van-loading__dot:nth-of-type(2){-webkit-transform:rotate(60deg);transform:rotate(60deg);opacity:.9375}.van-loading__dot:nth-of-type(3){-webkit-transform:rotate(90deg);transform:rotate(90deg);opacity:.875}.van-loading__dot:nth-of-type(4){-webkit-transform:rotate(120deg);transform:rotate(120deg);opacity:.8125}.van-loading__dot:nth-of-type(5){-webkit-transform:rotate(150deg);transform:rotate(150deg);opacity:.75}.van-loading__dot:nth-of-type(6){-webkit-transform:rotate(180deg);transform:rotate(180deg);opacity:.6875}.van-loading__dot:nth-of-type(7){-webkit-transform:rotate(210deg);transform:rotate(210deg);opacity:.625}.van-loading__dot:nth-of-type(8){-webkit-transform:rotate(240deg);transform:rotate(240deg);opacity:.5625}.van-loading__dot:nth-of-type(9){-webkit-transform:rotate(270deg);transform:rotate(270deg);opacity:.5}.van-loading__dot:nth-of-type(10){-webkit-transform:rotate(300deg);transform:rotate(300deg);opacity:.4375}.van-loading__dot:nth-of-type(11){-webkit-transform:rotate(330deg);transform:rotate(330deg);opacity:.375}.van-loading__dot:nth-of-type(12){-webkit-transform:rotate(1turn);transform:rotate(1turn);opacity:.3125}@-webkit-keyframes van-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes van-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/mixins/basic.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/mixins/basic.js
new file mode 100644
index 00000000..2058c0b6
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/mixins/basic.js
@@ -0,0 +1,37 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.basic = void 0;
+exports.basic = Behavior({
+ methods: {
+ $emit: function () {
+ var args = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ args[_i] = arguments[_i];
+ }
+ this.triggerEvent.apply(this, args);
+ },
+ set: function (data, callback) {
+ this.setData(data, callback);
+ return new Promise(function (resolve) {
+ return wx.nextTick(resolve);
+ });
+ },
+ getRect: function (selector, all) {
+ var _this = this;
+ return new Promise(function (resolve) {
+ wx.createSelectorQuery()
+ .in(_this)
+ [all ? 'selectAll' : 'select'](selector)
+ .boundingClientRect(function (rect) {
+ if (all && Array.isArray(rect) && rect.length) {
+ resolve(rect);
+ }
+ if (!all && rect) {
+ resolve(rect);
+ }
+ })
+ .exec();
+ });
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/mixins/button.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/mixins/button.js
new file mode 100644
index 00000000..8de45e9d
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/mixins/button.js
@@ -0,0 +1,18 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.button = void 0;
+exports.button = Behavior({
+ externalClasses: ['hover-class'],
+ properties: {
+ id: String,
+ lang: String,
+ businessId: Number,
+ sessionFrom: String,
+ sendMessageTitle: String,
+ sendMessagePath: String,
+ sendMessageImg: String,
+ showMessageCard: Boolean,
+ appParameter: String,
+ ariaLabel: String,
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/mixins/link.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/mixins/link.js
new file mode 100644
index 00000000..cbd2745e
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/mixins/link.js
@@ -0,0 +1,23 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.link = void 0;
+exports.link = Behavior({
+ properties: {
+ url: String,
+ linkType: {
+ type: String,
+ value: 'navigateTo',
+ },
+ },
+ methods: {
+ jumpLink: function (urlKey) {
+ if (urlKey === void 0) {
+ urlKey = 'url';
+ }
+ var url = this.data[urlKey];
+ if (url) {
+ wx[this.data.linkType]({ url: url });
+ }
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/mixins/open-type.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/mixins/open-type.js
new file mode 100644
index 00000000..a7edf77d
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/mixins/open-type.js
@@ -0,0 +1,28 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.openType = void 0;
+exports.openType = Behavior({
+ properties: {
+ openType: String,
+ },
+ methods: {
+ bindGetUserInfo: function (event) {
+ this.$emit('getuserinfo', event.detail);
+ },
+ bindContact: function (event) {
+ this.$emit('contact', event.detail);
+ },
+ bindGetPhoneNumber: function (event) {
+ this.$emit('getphonenumber', event.detail);
+ },
+ bindError: function (event) {
+ this.$emit('error', event.detail);
+ },
+ bindLaunchApp: function (event) {
+ this.$emit('launchapp', event.detail);
+ },
+ bindOpenSetting: function (event) {
+ this.$emit('opensetting', event.detail);
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/mixins/page-scroll.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/mixins/page-scroll.js
new file mode 100644
index 00000000..6c2a58b4
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/mixins/page-scroll.js
@@ -0,0 +1,40 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.pageScrollMixin = void 0;
+function getCurrentPage() {
+ var pages = getCurrentPages();
+ return pages[pages.length - 1] || {};
+}
+function onPageScroll(event) {
+ var _a = getCurrentPage().vanPageScroller,
+ vanPageScroller = _a === void 0 ? [] : _a;
+ vanPageScroller.forEach(function (scroller) {
+ if (typeof scroller === 'function') {
+ scroller(event);
+ }
+ });
+}
+exports.pageScrollMixin = function (scroller) {
+ return Behavior({
+ attached: function () {
+ var page = getCurrentPage();
+ if (Array.isArray(page.vanPageScroller)) {
+ page.vanPageScroller.push(scroller.bind(this));
+ } else {
+ page.vanPageScroller =
+ typeof page.onPageScroll === 'function'
+ ? [page.onPageScroll.bind(page), scroller.bind(this)]
+ : [scroller.bind(this)];
+ }
+ page.onPageScroll = onPageScroll;
+ },
+ detached: function () {
+ var page = getCurrentPage();
+ page.vanPageScroller = (page.vanPageScroller || []).filter(function (
+ item
+ ) {
+ return item !== scroller;
+ });
+ },
+ });
+};
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/mixins/touch.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/mixins/touch.js
new file mode 100644
index 00000000..8c3a1459
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/mixins/touch.js
@@ -0,0 +1,39 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.touch = void 0;
+var MIN_DISTANCE = 10;
+function getDirection(x, y) {
+ if (x > y && x > MIN_DISTANCE) {
+ return 'horizontal';
+ }
+ if (y > x && y > MIN_DISTANCE) {
+ return 'vertical';
+ }
+ return '';
+}
+exports.touch = Behavior({
+ methods: {
+ resetTouchStatus: function () {
+ this.direction = '';
+ this.deltaX = 0;
+ this.deltaY = 0;
+ this.offsetX = 0;
+ this.offsetY = 0;
+ },
+ touchStart: function (event) {
+ this.resetTouchStatus();
+ var touch = event.touches[0];
+ this.startX = touch.clientX;
+ this.startY = touch.clientY;
+ },
+ touchMove: function (event) {
+ var touch = event.touches[0];
+ this.deltaX = touch.clientX - this.startX;
+ this.deltaY = touch.clientY - this.startY;
+ this.offsetX = Math.abs(this.deltaX);
+ this.offsetY = Math.abs(this.deltaY);
+ this.direction =
+ this.direction || getDirection(this.offsetX, this.offsetY);
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/mixins/transition.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/mixins/transition.js
new file mode 100644
index 00000000..548a62ce
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/mixins/transition.js
@@ -0,0 +1,161 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.transition = void 0;
+var utils_1 = require('../common/utils');
+var getClassNames = function (name) {
+ return {
+ enter:
+ 'van-' +
+ name +
+ '-enter van-' +
+ name +
+ '-enter-active enter-class enter-active-class',
+ 'enter-to':
+ 'van-' +
+ name +
+ '-enter-to van-' +
+ name +
+ '-enter-active enter-to-class enter-active-class',
+ leave:
+ 'van-' +
+ name +
+ '-leave van-' +
+ name +
+ '-leave-active leave-class leave-active-class',
+ 'leave-to':
+ 'van-' +
+ name +
+ '-leave-to van-' +
+ name +
+ '-leave-active leave-to-class leave-active-class',
+ };
+};
+var nextTick = function () {
+ return new Promise(function (resolve) {
+ return setTimeout(resolve, 1000 / 30);
+ });
+};
+exports.transition = function (showDefaultValue) {
+ return Behavior({
+ properties: {
+ customStyle: String,
+ // @ts-ignore
+ show: {
+ type: Boolean,
+ value: showDefaultValue,
+ observer: 'observeShow',
+ },
+ // @ts-ignore
+ duration: {
+ type: null,
+ value: 300,
+ observer: 'observeDuration',
+ },
+ name: {
+ type: String,
+ value: 'fade',
+ },
+ },
+ data: {
+ type: '',
+ inited: false,
+ display: false,
+ },
+ methods: {
+ observeShow: function (value, old) {
+ if (value === old) {
+ return;
+ }
+ value ? this.enter() : this.leave();
+ },
+ enter: function () {
+ var _this = this;
+ var _a = this.data,
+ duration = _a.duration,
+ name = _a.name;
+ var classNames = getClassNames(name);
+ var currentDuration = utils_1.isObj(duration)
+ ? duration.enter
+ : duration;
+ this.status = 'enter';
+ this.$emit('before-enter');
+ Promise.resolve()
+ .then(nextTick)
+ .then(function () {
+ _this.checkStatus('enter');
+ _this.$emit('enter');
+ _this.setData({
+ inited: true,
+ display: true,
+ classes: classNames.enter,
+ currentDuration: currentDuration,
+ });
+ })
+ .then(nextTick)
+ .then(function () {
+ _this.checkStatus('enter');
+ _this.transitionEnded = false;
+ _this.setData({
+ classes: classNames['enter-to'],
+ });
+ })
+ .catch(function () {});
+ },
+ leave: function () {
+ var _this = this;
+ if (!this.data.display) {
+ return;
+ }
+ var _a = this.data,
+ duration = _a.duration,
+ name = _a.name;
+ var classNames = getClassNames(name);
+ var currentDuration = utils_1.isObj(duration)
+ ? duration.leave
+ : duration;
+ this.status = 'leave';
+ this.$emit('before-leave');
+ Promise.resolve()
+ .then(nextTick)
+ .then(function () {
+ _this.checkStatus('leave');
+ _this.$emit('leave');
+ _this.setData({
+ classes: classNames.leave,
+ currentDuration: currentDuration,
+ });
+ })
+ .then(nextTick)
+ .then(function () {
+ _this.checkStatus('leave');
+ _this.transitionEnded = false;
+ setTimeout(function () {
+ return _this.onTransitionEnd();
+ }, currentDuration);
+ _this.setData({
+ classes: classNames['leave-to'],
+ });
+ })
+ .catch(function () {});
+ },
+ checkStatus: function (status) {
+ if (status !== this.status) {
+ throw new Error('incongruent status: ' + status);
+ }
+ },
+ onTransitionEnd: function () {
+ if (this.transitionEnded) {
+ return;
+ }
+ this.transitionEnded = true;
+ this.$emit('after-' + this.status);
+ var _a = this.data,
+ show = _a.show,
+ display = _a.display;
+ if (!show && display) {
+ this.setData({ display: false });
+ }
+ },
+ },
+ });
+};
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/nav-bar/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/nav-bar/index.js
new file mode 100644
index 00000000..fb4fd97a
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/nav-bar/index.js
@@ -0,0 +1,75 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var utils_1 = require('../common/utils');
+component_1.VantComponent({
+ classes: ['title-class'],
+ props: {
+ title: String,
+ fixed: {
+ type: Boolean,
+ observer: 'setHeight',
+ },
+ placeholder: {
+ type: Boolean,
+ observer: 'setHeight',
+ },
+ leftText: String,
+ rightText: String,
+ customStyle: String,
+ leftArrow: Boolean,
+ border: {
+ type: Boolean,
+ value: true,
+ },
+ zIndex: {
+ type: Number,
+ value: 1,
+ },
+ safeAreaInsetTop: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ data: {
+ statusBarHeight: 0,
+ height: 44,
+ baseStyle: '',
+ },
+ created: function () {
+ var statusBarHeight = utils_1.getSystemInfoSync().statusBarHeight;
+ var _a = this.data,
+ safeAreaInsetTop = _a.safeAreaInsetTop,
+ zIndex = _a.zIndex;
+ var paddingTop = safeAreaInsetTop ? statusBarHeight : 0;
+ var baseStyle =
+ 'z-index: ' + zIndex + ';padding-top: ' + paddingTop + 'px;';
+ this.setData({
+ statusBarHeight: statusBarHeight,
+ height: 44 + statusBarHeight,
+ baseStyle: baseStyle,
+ });
+ },
+ mounted: function () {
+ this.setHeight();
+ },
+ methods: {
+ onClickLeft: function () {
+ this.$emit('click-left');
+ },
+ onClickRight: function () {
+ this.$emit('click-right');
+ },
+ setHeight: function () {
+ var _this = this;
+ if (!this.data.fixed || !this.data.placeholder) {
+ return;
+ }
+ wx.nextTick(function () {
+ _this.getRect('.van-nav-bar').then(function (res) {
+ _this.setData({ height: res.height });
+ });
+ });
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/nav-bar/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/nav-bar/index.json
new file mode 100644
index 00000000..0a336c08
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/nav-bar/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/nav-bar/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/nav-bar/index.wxml
new file mode 100644
index 00000000..27ba8c96
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/nav-bar/index.wxml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+ {{ leftText }}
+
+
+
+
+ {{ title }}
+
+
+
+ {{ rightText }}
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/nav-bar/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/nav-bar/index.wxss
new file mode 100644
index 00000000..a2331281
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/nav-bar/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-nav-bar{text-align:center;-webkit-user-select:none;user-select:none;height:44px;height:var(--nav-bar-height,44px);line-height:44px;line-height:var(--nav-bar-height,44px);background-color:#fff;background-color:var(--nav-bar-background-color,#fff)}.van-nav-bar,.van-nav-bar__content{position:relative}.van-nav-bar__text{display:inline-block;vertical-align:middle;margin:0 -16px;margin:0 -var(--padding-md,16px);padding:0 16px;padding:0 var(--padding-md,16px);color:#1989fa;color:var(--nav-bar-text-color,#1989fa)}.van-nav-bar__text--hover{background-color:#f2f3f5;background-color:var(--active-color,#f2f3f5)}.van-nav-bar__arrow{vertical-align:middle;font-size:16px;font-size:var(--nav-bar-arrow-size,16px);color:#1989fa;color:var(--nav-bar-text-color,#1989fa)}.van-nav-bar__arrow+.van-nav-bar__text{margin-left:-20px;padding-left:25px}.van-nav-bar--fixed{position:fixed;top:0;left:0;width:100%}.van-nav-bar__title{max-width:60%;margin:0 auto;color:#323233;color:var(--nav-bar-title-text-color,#323233);font-weight:500;font-weight:var(--font-weight-bold,500);font-size:16px;font-size:var(--nav-bar-title-font-size,16px)}.van-nav-bar__left,.van-nav-bar__right{position:absolute;top:0;bottom:0;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;font-size:14px;font-size:var(--font-size-md,14px)}.van-nav-bar__left{left:16px;left:var(--padding-md,16px)}.van-nav-bar__right{right:16px;right:var(--padding-md,16px)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/notice-bar/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/notice-bar/index.js
new file mode 100644
index 00000000..ae1dc5c6
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/notice-bar/index.js
@@ -0,0 +1,140 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var FONT_COLOR = '#ed6a0c';
+var BG_COLOR = '#fffbe8';
+component_1.VantComponent({
+ props: {
+ text: {
+ type: String,
+ value: '',
+ observer: function () {
+ var _this = this;
+ wx.nextTick(function () {
+ _this.init();
+ });
+ },
+ },
+ mode: {
+ type: String,
+ value: '',
+ },
+ url: {
+ type: String,
+ value: '',
+ },
+ openType: {
+ type: String,
+ value: 'navigate',
+ },
+ delay: {
+ type: Number,
+ value: 1,
+ },
+ speed: {
+ type: Number,
+ value: 50,
+ observer: function () {
+ var _this = this;
+ wx.nextTick(function () {
+ _this.init();
+ });
+ },
+ },
+ scrollable: {
+ type: Boolean,
+ value: true,
+ },
+ leftIcon: {
+ type: String,
+ value: '',
+ },
+ color: {
+ type: String,
+ value: FONT_COLOR,
+ },
+ backgroundColor: {
+ type: String,
+ value: BG_COLOR,
+ },
+ wrapable: Boolean,
+ },
+ data: {
+ show: true,
+ },
+ created: function () {
+ this.resetAnimation = wx.createAnimation({
+ duration: 0,
+ timingFunction: 'linear',
+ });
+ },
+ destroyed: function () {
+ this.timer && clearTimeout(this.timer);
+ },
+ methods: {
+ init: function () {
+ var _this = this;
+ Promise.all([
+ this.getRect('.van-notice-bar__content'),
+ this.getRect('.van-notice-bar__wrap'),
+ ]).then(function (rects) {
+ var contentRect = rects[0],
+ wrapRect = rects[1];
+ if (
+ contentRect == null ||
+ wrapRect == null ||
+ !contentRect.width ||
+ !wrapRect.width
+ ) {
+ return;
+ }
+ var _a = _this.data,
+ speed = _a.speed,
+ scrollable = _a.scrollable,
+ delay = _a.delay;
+ if (scrollable && wrapRect.width < contentRect.width) {
+ var duration = (contentRect.width / speed) * 1000;
+ _this.wrapWidth = wrapRect.width;
+ _this.contentWidth = contentRect.width;
+ _this.duration = duration;
+ _this.animation = wx.createAnimation({
+ duration: duration,
+ timingFunction: 'linear',
+ delay: delay,
+ });
+ _this.scroll();
+ }
+ });
+ },
+ scroll: function () {
+ var _this = this;
+ this.timer && clearTimeout(this.timer);
+ this.timer = null;
+ this.setData({
+ animationData: this.resetAnimation
+ .translateX(this.wrapWidth)
+ .step()
+ .export(),
+ });
+ setTimeout(function () {
+ _this.setData({
+ animationData: _this.animation
+ .translateX(-_this.contentWidth)
+ .step()
+ .export(),
+ });
+ }, 20);
+ this.timer = setTimeout(function () {
+ _this.scroll();
+ }, this.duration);
+ },
+ onClickIcon: function () {
+ this.timer && clearTimeout(this.timer);
+ this.timer = null;
+ this.setData({ show: false });
+ },
+ onClick: function (event) {
+ this.$emit('click', event);
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/notice-bar/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/notice-bar/index.json
new file mode 100644
index 00000000..0a336c08
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/notice-bar/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/notice-bar/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/notice-bar/index.wxml
new file mode 100644
index 00000000..eb0851c3
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/notice-bar/index.wxml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+ {{ text }}
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/notice-bar/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/notice-bar/index.wxss
new file mode 100644
index 00000000..6a498587
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/notice-bar/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-notice-bar{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;height:40px;height:var(--notice-bar-height,40px);padding:0 16px;padding:var(--notice-bar-padding,0 16px);font-size:14px;font-size:var(--notice-bar-font-size,14px);color:#ed6a0c;color:var(--notice-bar-text-color,#ed6a0c);line-height:24px;line-height:var(--notice-bar-line-height,24px);background-color:#fffbe8;background-color:var(--notice-bar-background-color,#fffbe8)}.van-notice-bar--withicon{position:relative;padding-right:40px}.van-notice-bar--wrapable{height:auto;padding:8px 16px;padding:var(--notice-bar-wrapable-padding,8px 16px)}.van-notice-bar--wrapable .van-notice-bar__wrap{height:auto}.van-notice-bar--wrapable .van-notice-bar__content{position:relative;white-space:normal}.van-notice-bar__left-icon{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;margin-right:4px;vertical-align:middle}.van-notice-bar__left-icon,.van-notice-bar__right-icon{font-size:16px;font-size:var(--notice-bar-icon-size,16px);min-width:22px;min-width:var(--notice-bar-icon-min-width,22px)}.van-notice-bar__right-icon{position:absolute;top:10px;right:15px}.van-notice-bar__wrap{position:relative;-webkit-flex:1;flex:1;overflow:hidden;height:24px;height:var(--notice-bar-line-height,24px)}.van-notice-bar__content{position:absolute;white-space:nowrap}.van-notice-bar__content.van-ellipsis{max-width:100%}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/notify/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/notify/index.js
new file mode 100644
index 00000000..69f9d2cc
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/notify/index.js
@@ -0,0 +1,66 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var color_1 = require('../common/color');
+component_1.VantComponent({
+ props: {
+ message: String,
+ background: String,
+ type: {
+ type: String,
+ value: 'danger',
+ },
+ color: {
+ type: String,
+ value: color_1.WHITE,
+ },
+ duration: {
+ type: Number,
+ value: 3000,
+ },
+ zIndex: {
+ type: Number,
+ value: 110,
+ },
+ safeAreaInsetTop: {
+ type: Boolean,
+ value: false,
+ },
+ top: null,
+ },
+ data: {
+ show: false,
+ },
+ created: function () {
+ var statusBarHeight = wx.getSystemInfoSync().statusBarHeight;
+ this.setData({ statusBarHeight: statusBarHeight });
+ },
+ methods: {
+ show: function () {
+ var _this = this;
+ var _a = this.data,
+ duration = _a.duration,
+ onOpened = _a.onOpened;
+ clearTimeout(this.timer);
+ this.setData({ show: true });
+ wx.nextTick(onOpened);
+ if (duration > 0 && duration !== Infinity) {
+ this.timer = setTimeout(function () {
+ _this.hide();
+ }, duration);
+ }
+ },
+ hide: function () {
+ var onClose = this.data.onClose;
+ clearTimeout(this.timer);
+ this.setData({ show: false });
+ wx.nextTick(onClose);
+ },
+ onTap: function (event) {
+ var onClick = this.data.onClick;
+ if (onClick) {
+ onClick(event.detail);
+ }
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/notify/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/notify/index.json
new file mode 100644
index 00000000..c14a65f6
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/notify/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-transition": "../transition/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/notify/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/notify/index.wxml
new file mode 100644
index 00000000..060d1ba8
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/notify/index.wxml
@@ -0,0 +1,20 @@
+
+
+
+
+
+ {{ message }}
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/notify/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/notify/index.wxss
new file mode 100644
index 00000000..3b4aba68
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/notify/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-notify{text-align:center;word-wrap:break-word;padding:6px 15px;padding:var(--notify-padding,6px 15px);font-size:14px;font-size:var(--notify-font-size,14px);line-height:20px;line-height:var(--notify-line-height,20px)}.van-notify__container{position:fixed;top:0;box-sizing:border-box;width:100%}.van-notify--primary{background-color:#1989fa;background-color:var(--notify-primary-background-color,#1989fa)}.van-notify--success{background-color:#07c160;background-color:var(--notify-success-background-color,#07c160)}.van-notify--danger{background-color:#ee0a24;background-color:var(--notify-danger-background-color,#ee0a24)}.van-notify--warning{background-color:#ff976a;background-color:var(--notify-warning-background-color,#ff976a)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/notify/notify.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/notify/notify.js
new file mode 100644
index 00000000..070cbfe7
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/notify/notify.js
@@ -0,0 +1,61 @@
+'use strict';
+var __assign =
+ (this && this.__assign) ||
+ function () {
+ __assign =
+ Object.assign ||
+ function (t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s)
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+ }
+ return t;
+ };
+ return __assign.apply(this, arguments);
+ };
+Object.defineProperty(exports, '__esModule', { value: true });
+var color_1 = require('../common/color');
+var defaultOptions = {
+ selector: '#van-notify',
+ type: 'danger',
+ message: '',
+ background: '',
+ duration: 3000,
+ zIndex: 110,
+ top: 0,
+ color: color_1.WHITE,
+ safeAreaInsetTop: false,
+ onClick: function () {},
+ onOpened: function () {},
+ onClose: function () {},
+};
+function parseOptions(message) {
+ return typeof message === 'string' ? { message: message } : message;
+}
+function getContext() {
+ var pages = getCurrentPages();
+ return pages[pages.length - 1];
+}
+function Notify(options) {
+ options = __assign(__assign({}, defaultOptions), parseOptions(options));
+ var context = options.context || getContext();
+ var notify = context.selectComponent(options.selector);
+ delete options.context;
+ delete options.selector;
+ if (notify) {
+ notify.setData(options);
+ notify.show();
+ return notify;
+ }
+ console.warn('未找到 van-notify 节点,请确认 selector 及 context 是否正确');
+}
+exports.default = Notify;
+Notify.clear = function (options) {
+ options = __assign(__assign({}, defaultOptions), parseOptions(options));
+ var context = options.context || getContext();
+ var notify = context.selectComponent(options.selector);
+ if (notify) {
+ notify.hide();
+ }
+};
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/overlay/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/overlay/index.js
new file mode 100644
index 00000000..a0e55eb6
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/overlay/index.js
@@ -0,0 +1,24 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ props: {
+ show: Boolean,
+ customStyle: String,
+ duration: {
+ type: null,
+ value: 300,
+ },
+ zIndex: {
+ type: Number,
+ value: 1,
+ },
+ },
+ methods: {
+ onClick: function () {
+ this.$emit('click');
+ },
+ // for prevent touchmove
+ noop: function () {},
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/overlay/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/overlay/index.json
new file mode 100644
index 00000000..c14a65f6
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/overlay/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-transition": "../transition/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/overlay/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/overlay/index.wxml
new file mode 100644
index 00000000..9212348b
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/overlay/index.wxml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/overlay/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/overlay/index.wxss
new file mode 100644
index 00000000..0f9df0e8
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/overlay/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.7);background-color:var(--overlay-background-color,rgba(0,0,0,.7))}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/panel/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/panel/index.js
new file mode 100644
index 00000000..64f3be5b
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/panel/index.js
@@ -0,0 +1,12 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ classes: ['header-class', 'footer-class'],
+ props: {
+ desc: String,
+ title: String,
+ status: String,
+ useFooterSlot: Boolean,
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/panel/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/panel/index.json
new file mode 100644
index 00000000..0e5425cd
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/panel/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-cell": "../cell/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/panel/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/panel/index.wxml
new file mode 100644
index 00000000..3f135d23
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/panel/index.wxml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/panel/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/panel/index.wxss
new file mode 100644
index 00000000..ffd9df91
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/panel/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-panel{background:#fff;background:var(--panel-background-color,#fff)}.van-panel__header-value{color:#ee0a24;color:var(--panel-header-value-color,#ee0a24)}.van-panel__footer{padding:8px 16px;padding:var(--panel-footer-padding,8px 16px)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker-column/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker-column/index.js
new file mode 100644
index 00000000..f7f5b932
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker-column/index.js
@@ -0,0 +1,131 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var utils_1 = require('../common/utils');
+var DEFAULT_DURATION = 200;
+component_1.VantComponent({
+ classes: ['active-class'],
+ props: {
+ valueKey: String,
+ className: String,
+ itemHeight: Number,
+ visibleItemCount: Number,
+ initialOptions: {
+ type: Array,
+ value: [],
+ },
+ defaultIndex: {
+ type: Number,
+ value: 0,
+ observer: function (value) {
+ this.setIndex(value);
+ },
+ },
+ },
+ data: {
+ startY: 0,
+ offset: 0,
+ duration: 0,
+ startOffset: 0,
+ options: [],
+ currentIndex: 0,
+ },
+ created: function () {
+ var _this = this;
+ var _a = this.data,
+ defaultIndex = _a.defaultIndex,
+ initialOptions = _a.initialOptions;
+ this.set({
+ currentIndex: defaultIndex,
+ options: initialOptions,
+ }).then(function () {
+ _this.setIndex(defaultIndex);
+ });
+ },
+ methods: {
+ getCount: function () {
+ return this.data.options.length;
+ },
+ onTouchStart: function (event) {
+ this.setData({
+ startY: event.touches[0].clientY,
+ startOffset: this.data.offset,
+ duration: 0,
+ });
+ },
+ onTouchMove: function (event) {
+ var data = this.data;
+ var deltaY = event.touches[0].clientY - data.startY;
+ this.setData({
+ offset: utils_1.range(
+ data.startOffset + deltaY,
+ -(this.getCount() * data.itemHeight),
+ data.itemHeight
+ ),
+ });
+ },
+ onTouchEnd: function () {
+ var data = this.data;
+ if (data.offset !== data.startOffset) {
+ this.setData({ duration: DEFAULT_DURATION });
+ var index = utils_1.range(
+ Math.round(-data.offset / data.itemHeight),
+ 0,
+ this.getCount() - 1
+ );
+ this.setIndex(index, true);
+ }
+ },
+ onClickItem: function (event) {
+ var index = event.currentTarget.dataset.index;
+ this.setIndex(index, true);
+ },
+ adjustIndex: function (index) {
+ var data = this.data;
+ var count = this.getCount();
+ index = utils_1.range(index, 0, count);
+ for (var i = index; i < count; i++) {
+ if (!this.isDisabled(data.options[i])) return i;
+ }
+ for (var i = index - 1; i >= 0; i--) {
+ if (!this.isDisabled(data.options[i])) return i;
+ }
+ },
+ isDisabled: function (option) {
+ return utils_1.isObj(option) && option.disabled;
+ },
+ getOptionText: function (option) {
+ var data = this.data;
+ return utils_1.isObj(option) && data.valueKey in option
+ ? option[data.valueKey]
+ : option;
+ },
+ setIndex: function (index, userAction) {
+ var _this = this;
+ var data = this.data;
+ index = this.adjustIndex(index) || 0;
+ var offset = -index * data.itemHeight;
+ if (index !== data.currentIndex) {
+ return this.set({ offset: offset, currentIndex: index }).then(
+ function () {
+ userAction && _this.$emit('change', index);
+ }
+ );
+ }
+ return this.set({ offset: offset });
+ },
+ setValue: function (value) {
+ var options = this.data.options;
+ for (var i = 0; i < options.length; i++) {
+ if (this.getOptionText(options[i]) === value) {
+ return this.setIndex(i);
+ }
+ }
+ return Promise.resolve();
+ },
+ getValue: function () {
+ var data = this.data;
+ return data.options[data.currentIndex];
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker-column/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker-column/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker-column/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker-column/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker-column/index.wxml
new file mode 100644
index 00000000..f052ed99
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker-column/index.wxml
@@ -0,0 +1,22 @@
+
+
+
+
+ {{ getOptionText(option, valueKey) }}
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker-column/index.wxs b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker-column/index.wxs
new file mode 100644
index 00000000..3c8fc681
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker-column/index.wxs
@@ -0,0 +1,8 @@
+function isObj(x) {
+ var type = typeof x;
+ return x !== null && (type === 'object' || type === 'function');
+}
+
+module.exports = function (option, valueKey) {
+ return isObj(option) && option[valueKey] != null ? option[valueKey] : option;
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker-column/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker-column/index.wxss
new file mode 100644
index 00000000..c5c69100
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker-column/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-picker-column{overflow:hidden;text-align:center;color:#000;color:var(--picker-option-text-color,#000);font-size:16px;font-size:var(--picker-option-font-size,16px)}.van-picker-column__item{padding:0 5px}.van-picker-column__item--selected{font-weight:500;font-weight:var(--font-weight-bold,500);color:#323233;color:var(--picker-option-selected-text-color,#323233)}.van-picker-column__item--disabled{opacity:.3;opacity:var(--picker-option-disabled-opacity,.3)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker/index.js
new file mode 100644
index 00000000..87b10ed2
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker/index.js
@@ -0,0 +1,175 @@
+'use strict';
+var __assign =
+ (this && this.__assign) ||
+ function () {
+ __assign =
+ Object.assign ||
+ function (t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s)
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+ }
+ return t;
+ };
+ return __assign.apply(this, arguments);
+ };
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var shared_1 = require('./shared');
+component_1.VantComponent({
+ classes: ['active-class', 'toolbar-class', 'column-class'],
+ props: __assign(__assign({}, shared_1.pickerProps), {
+ valueKey: {
+ type: String,
+ value: 'text',
+ },
+ toolbarPosition: {
+ type: String,
+ value: 'top',
+ },
+ defaultIndex: {
+ type: Number,
+ value: 0,
+ },
+ columns: {
+ type: Array,
+ value: [],
+ observer: function (columns) {
+ if (columns === void 0) {
+ columns = [];
+ }
+ this.simple = columns.length && !columns[0].values;
+ this.children = this.selectAllComponents('.van-picker__column');
+ if (Array.isArray(this.children) && this.children.length) {
+ this.setColumns().catch(function () {});
+ }
+ },
+ },
+ }),
+ beforeCreate: function () {
+ this.children = [];
+ },
+ methods: {
+ noop: function () {},
+ setColumns: function () {
+ var _this = this;
+ var data = this.data;
+ var columns = this.simple ? [{ values: data.columns }] : data.columns;
+ var stack = columns.map(function (column, index) {
+ return _this.setColumnValues(index, column.values);
+ });
+ return Promise.all(stack);
+ },
+ emit: function (event) {
+ var type = event.currentTarget.dataset.type;
+ if (this.simple) {
+ this.$emit(type, {
+ value: this.getColumnValue(0),
+ index: this.getColumnIndex(0),
+ });
+ } else {
+ this.$emit(type, {
+ value: this.getValues(),
+ index: this.getIndexes(),
+ });
+ }
+ },
+ onChange: function (event) {
+ if (this.simple) {
+ this.$emit('change', {
+ picker: this,
+ value: this.getColumnValue(0),
+ index: this.getColumnIndex(0),
+ });
+ } else {
+ this.$emit('change', {
+ picker: this,
+ value: this.getValues(),
+ index: event.currentTarget.dataset.index,
+ });
+ }
+ },
+ // get column instance by index
+ getColumn: function (index) {
+ return this.children[index];
+ },
+ // get column value by index
+ getColumnValue: function (index) {
+ var column = this.getColumn(index);
+ return column && column.getValue();
+ },
+ // set column value by index
+ setColumnValue: function (index, value) {
+ var column = this.getColumn(index);
+ if (column == null) {
+ return Promise.reject(new Error('setColumnValue: 对应列不存在'));
+ }
+ return column.setValue(value);
+ },
+ // get column option index by column index
+ getColumnIndex: function (columnIndex) {
+ return (this.getColumn(columnIndex) || {}).data.currentIndex;
+ },
+ // set column option index by column index
+ setColumnIndex: function (columnIndex, optionIndex) {
+ var column = this.getColumn(columnIndex);
+ if (column == null) {
+ return Promise.reject(new Error('setColumnIndex: 对应列不存在'));
+ }
+ return column.setIndex(optionIndex);
+ },
+ // get options of column by index
+ getColumnValues: function (index) {
+ return (this.children[index] || {}).data.options;
+ },
+ // set options of column by index
+ setColumnValues: function (index, options, needReset) {
+ if (needReset === void 0) {
+ needReset = true;
+ }
+ var column = this.children[index];
+ if (column == null) {
+ return Promise.reject(new Error('setColumnValues: 对应列不存在'));
+ }
+ var isSame =
+ JSON.stringify(column.data.options) === JSON.stringify(options);
+ if (isSame) {
+ return Promise.resolve();
+ }
+ return column.set({ options: options }).then(function () {
+ if (needReset) {
+ column.setIndex(0);
+ }
+ });
+ },
+ // get values of all columns
+ getValues: function () {
+ return this.children.map(function (child) {
+ return child.getValue();
+ });
+ },
+ // set values of all columns
+ setValues: function (values) {
+ var _this = this;
+ var stack = values.map(function (value, index) {
+ return _this.setColumnValue(index, value);
+ });
+ return Promise.all(stack);
+ },
+ // get indexes of all columns
+ getIndexes: function () {
+ return this.children.map(function (child) {
+ return child.data.currentIndex;
+ });
+ },
+ // set indexes of all columns
+ setIndexes: function (indexes) {
+ var _this = this;
+ var stack = indexes.map(function (optionIndex, columnIndex) {
+ return _this.setColumnIndex(columnIndex, optionIndex);
+ });
+ return Promise.all(stack);
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker/index.json
new file mode 100644
index 00000000..2fcec899
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "picker-column": "../picker-column/index",
+ "loading": "../loading/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker/index.wxml
new file mode 100644
index 00000000..519adb54
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker/index.wxml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ function isSimple(columns) {
+ return columns.length && !columns[0].values;
+ }
+ module.exports = isSimple;
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker/index.wxss
new file mode 100644
index 00000000..784c2b02
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-picker{position:relative;overflow:hidden;-webkit-text-size-adjust:100%;-webkit-user-select:none;user-select:none;background-color:#fff;background-color:var(--picker-background-color,#fff)}.van-picker__toolbar{display:-webkit-flex;display:flex;-webkit-justify-content:space-between;justify-content:space-between;height:44px;height:var(--picker-toolbar-height,44px);line-height:44px;line-height:var(--picker-toolbar-height,44px)}.van-picker__cancel,.van-picker__confirm{padding:0 16px;padding:var(--picker-action-padding,0 16px);font-size:14px;font-size:var(--picker-action-font-size,14px);color:#1989fa;color:var(--picker-action-text-color,#1989fa)}.van-picker__cancel--hover,.van-picker__confirm--hover{background-color:#f2f3f5;background-color:var(--picker-action-active-color,#f2f3f5)}.van-picker__title{max-width:50%;text-align:center;font-weight:500;font-weight:var(--font-weight-bold,500);font-size:16px;font-size:var(--picker-option-font-size,16px)}.van-picker__columns{position:relative;display:-webkit-flex;display:flex}.van-picker__column{-webkit-flex:1 1;flex:1 1;width:0}.van-picker__loading{position:absolute;top:0;right:0;bottom:0;left:0;z-index:4;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;background-color:hsla(0,0%,100%,.9);background-color:var(--picker-loading-mask-color,hsla(0,0%,100%,.9))}.van-picker__mask{position:absolute;top:0;left:0;z-index:2;width:100%;height:100%;background-image:linear-gradient(180deg,hsla(0,0%,100%,.9),hsla(0,0%,100%,.4)),linear-gradient(0deg,hsla(0,0%,100%,.9),hsla(0,0%,100%,.4));background-repeat:no-repeat;background-position:top,bottom;-webkit-backface-visibility:hidden;backface-visibility:hidden;pointer-events:none}.van-picker__frame,.van-picker__loading .van-loading{position:absolute;top:50%;left:0;z-index:1;width:100%;-webkit-transform:translateY(-50%);transform:translateY(-50%);pointer-events:none}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker/shared.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker/shared.js
new file mode 100644
index 00000000..4081f546
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker/shared.js
@@ -0,0 +1,24 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.pickerProps = void 0;
+exports.pickerProps = {
+ title: String,
+ loading: Boolean,
+ showToolbar: Boolean,
+ cancelButtonText: {
+ type: String,
+ value: '取消',
+ },
+ confirmButtonText: {
+ type: String,
+ value: '确认',
+ },
+ visibleItemCount: {
+ type: Number,
+ value: 5,
+ },
+ itemHeight: {
+ type: Number,
+ value: 44,
+ },
+};
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker/toolbar.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker/toolbar.wxml
new file mode 100644
index 00000000..4fa9db50
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/picker/toolbar.wxml
@@ -0,0 +1,28 @@
+
+
+
+ {{ cancelButtonText }}
+
+ {{
+ title
+ }}
+
+ {{ confirmButtonText }}
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/popup/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/popup/index.js
new file mode 100644
index 00000000..1c4e6d1f
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/popup/index.js
@@ -0,0 +1,85 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var transition_1 = require('../mixins/transition');
+component_1.VantComponent({
+ classes: [
+ 'enter-class',
+ 'enter-active-class',
+ 'enter-to-class',
+ 'leave-class',
+ 'leave-active-class',
+ 'leave-to-class',
+ 'close-icon-class',
+ ],
+ mixins: [transition_1.transition(false)],
+ props: {
+ round: Boolean,
+ closeable: Boolean,
+ customStyle: String,
+ overlayStyle: String,
+ transition: {
+ type: String,
+ observer: 'observeClass',
+ },
+ zIndex: {
+ type: Number,
+ value: 100,
+ },
+ overlay: {
+ type: Boolean,
+ value: true,
+ },
+ closeIcon: {
+ type: String,
+ value: 'cross',
+ },
+ closeIconPosition: {
+ type: String,
+ value: 'top-right',
+ },
+ closeOnClickOverlay: {
+ type: Boolean,
+ value: true,
+ },
+ position: {
+ type: String,
+ value: 'center',
+ observer: 'observeClass',
+ },
+ safeAreaInsetBottom: {
+ type: Boolean,
+ value: true,
+ },
+ safeAreaInsetTop: {
+ type: Boolean,
+ value: false,
+ },
+ },
+ created: function () {
+ this.observeClass();
+ },
+ methods: {
+ onClickCloseIcon: function () {
+ this.$emit('close');
+ },
+ onClickOverlay: function () {
+ this.$emit('click-overlay');
+ if (this.data.closeOnClickOverlay) {
+ this.$emit('close');
+ }
+ },
+ observeClass: function () {
+ var _a = this.data,
+ transition = _a.transition,
+ position = _a.position;
+ var updateData = {
+ name: transition || position,
+ };
+ if (transition === 'none') {
+ updateData.duration = 0;
+ }
+ this.setData(updateData);
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/popup/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/popup/index.json
new file mode 100644
index 00000000..88a6eab2
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/popup/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index",
+ "van-overlay": "../overlay/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/popup/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/popup/index.wxml
new file mode 100644
index 00000000..9b41e5c3
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/popup/index.wxml
@@ -0,0 +1,24 @@
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/popup/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/popup/index.wxss
new file mode 100644
index 00000000..6e477ac5
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/popup/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-popup{position:fixed;box-sizing:border-box;max-height:100%;overflow-y:auto;transition-timing-function:ease;-webkit-animation:ease both;animation:ease both;-webkit-overflow-scrolling:touch;background-color:#fff;background-color:var(--popup-background-color,#fff)}.van-popup--center{top:50%;left:50%;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}.van-popup--center.van-popup--round{border-radius:20px;border-radius:var(--popup-round-border-radius,20px)}.van-popup--top{top:0;left:0;width:100%}.van-popup--top.van-popup--round{border-radius:0 0 20px 20px;border-radius:0 0 var(--popup-round-border-radius,20px) var(--popup-round-border-radius,20px)}.van-popup--right{top:50%;right:0;-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.van-popup--right.van-popup--round{border-radius:20px 0 0 20px;border-radius:var(--popup-round-border-radius,20px) 0 0 var(--popup-round-border-radius,20px)}.van-popup--bottom{bottom:0;left:0;width:100%}.van-popup--bottom.van-popup--round{border-radius:20px 20px 0 0;border-radius:var(--popup-round-border-radius,20px) var(--popup-round-border-radius,20px) 0 0}.van-popup--left{top:50%;left:0;-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.van-popup--left.van-popup--round{border-radius:0 20px 20px 0;border-radius:0 var(--popup-round-border-radius,20px) var(--popup-round-border-radius,20px) 0}.van-popup--bottom.van-popup--safe{padding-bottom:env(safe-area-inset-bottom)}.van-popup--safeTop{padding-top:env(safe-area-inset-top)}.van-popup__close-icon{position:absolute;z-index:1;z-index:var(--popup-close-icon-z-index,1);color:#969799;color:var(--popup-close-icon-color,#969799);font-size:18px;font-size:var(--popup-close-icon-size,18px)}.van-popup__close-icon--top-left{top:16px;top:var(--popup-close-icon-margin,16px);left:16px;left:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--top-right{top:16px;top:var(--popup-close-icon-margin,16px);right:16px;right:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--bottom-left{bottom:16px;bottom:var(--popup-close-icon-margin,16px);left:16px;left:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--bottom-right{right:16px;right:var(--popup-close-icon-margin,16px);bottom:16px;bottom:var(--popup-close-icon-margin,16px)}.van-popup__close-icon:active{opacity:.6}.van-scale-enter-active,.van-scale-leave-active{transition-property:opacity,-webkit-transform;transition-property:opacity,transform;transition-property:opacity,transform,-webkit-transform}.van-scale-enter,.van-scale-leave-to{-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7);opacity:0}.van-fade-enter-active,.van-fade-leave-active{transition-property:opacity}.van-fade-enter,.van-fade-leave-to{opacity:0}.van-center-enter-active,.van-center-leave-active{transition-property:opacity}.van-center-enter,.van-center-leave-to{opacity:0}.van-bottom-enter-active,.van-bottom-leave-active,.van-left-enter-active,.van-left-leave-active,.van-right-enter-active,.van-right-leave-active,.van-top-enter-active,.van-top-leave-active{transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform}.van-bottom-enter,.van-bottom-leave-to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.van-top-enter,.van-top-leave-to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.van-left-enter,.van-left-leave-to{-webkit-transform:translate3d(-100%,-50%,0);transform:translate3d(-100%,-50%,0)}.van-right-enter,.van-right-leave-to{-webkit-transform:translate3d(100%,-50%,0);transform:translate3d(100%,-50%,0)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/progress/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/progress/index.js
new file mode 100644
index 00000000..c56efb78
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/progress/index.js
@@ -0,0 +1,29 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var color_1 = require('../common/color');
+component_1.VantComponent({
+ props: {
+ inactive: Boolean,
+ percentage: Number,
+ pivotText: String,
+ pivotColor: String,
+ trackColor: String,
+ showPivot: {
+ type: Boolean,
+ value: true,
+ },
+ color: {
+ type: String,
+ value: color_1.BLUE,
+ },
+ textColor: {
+ type: String,
+ value: '#fff',
+ },
+ strokeWidth: {
+ type: null,
+ value: 4,
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/progress/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/progress/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/progress/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/progress/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/progress/index.wxml
new file mode 100644
index 00000000..e5981f09
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/progress/index.wxml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+ {{ getters.text(pivotText, percentage) }}
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/progress/index.wxs b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/progress/index.wxs
new file mode 100644
index 00000000..d6853452
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/progress/index.wxs
@@ -0,0 +1,5 @@
+module.exports = {
+ text: function(pivotText, percentage) {
+ return pivotText || percentage + '%';
+ }
+};
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/progress/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/progress/index.wxss
new file mode 100644
index 00000000..33c62c7a
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/progress/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-progress{position:relative;height:4px;height:var(--progress-height,4px);border-radius:4px;border-radius:var(--progress-height,4px);background:#ebedf0;background:var(--progress-background-color,#ebedf0)}.van-progress__portion{position:absolute;left:0;height:100%;border-radius:inherit;background:#1989fa;background:var(--progress-color,#1989fa)}.van-progress__pivot{position:absolute;top:50%;right:0;box-sizing:border-box;min-width:2em;text-align:center;word-break:keep-all;border-radius:1em;-webkit-transform:translateY(-50%);transform:translateY(-50%);color:#fff;color:var(--progress-pivot-text-color,#fff);padding:0 5px;padding:var(--progress-pivot-padding,0 5px);font-size:10px;font-size:var(--progress-pivot-font-size,10px);line-height:1.6;line-height:var(--progress-pivot-line-height,1.6);background-color:#1989fa;background-color:var(--progress-pivot-background-color,#1989fa)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/radio-group/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/radio-group/index.js
new file mode 100644
index 00000000..78629dae
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/radio-group/index.js
@@ -0,0 +1,41 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ field: true,
+ relation: {
+ name: 'radio',
+ type: 'descendant',
+ current: 'radio-group',
+ linked: function (target) {
+ this.updateChild(target);
+ },
+ },
+ props: {
+ value: {
+ type: null,
+ observer: 'updateChildren',
+ },
+ disabled: {
+ type: Boolean,
+ observer: 'updateChildren',
+ },
+ },
+ methods: {
+ updateChildren: function () {
+ var _this = this;
+ (this.children || []).forEach(function (child) {
+ return _this.updateChild(child);
+ });
+ },
+ updateChild: function (child) {
+ var _a = this.data,
+ value = _a.value,
+ disabled = _a.disabled;
+ child.setData({
+ value: value,
+ disabled: disabled || child.data.disabled,
+ });
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/radio-group/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/radio-group/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/radio-group/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/radio-group/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/radio-group/index.wxml
new file mode 100644
index 00000000..4fa864ce
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/radio-group/index.wxml
@@ -0,0 +1 @@
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/radio-group/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/radio-group/index.wxss
new file mode 100644
index 00000000..99694d60
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/radio-group/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/radio/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/radio/index.js
new file mode 100644
index 00000000..4133c8dd
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/radio/index.js
@@ -0,0 +1,53 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ field: true,
+ relation: {
+ name: 'radio-group',
+ type: 'ancestor',
+ current: 'radio',
+ },
+ classes: ['icon-class', 'label-class'],
+ props: {
+ name: null,
+ value: null,
+ disabled: Boolean,
+ useIconSlot: Boolean,
+ checkedColor: String,
+ labelPosition: {
+ type: String,
+ value: 'right',
+ },
+ labelDisabled: Boolean,
+ shape: {
+ type: String,
+ value: 'round',
+ },
+ iconSize: {
+ type: null,
+ value: 20,
+ },
+ },
+ methods: {
+ emitChange: function (value) {
+ var instance = this.parent || this;
+ instance.$emit('input', value);
+ instance.$emit('change', value);
+ },
+ onChange: function () {
+ if (!this.data.disabled) {
+ this.emitChange(this.data.name);
+ }
+ },
+ onClickLabel: function () {
+ var _a = this.data,
+ disabled = _a.disabled,
+ labelDisabled = _a.labelDisabled,
+ name = _a.name;
+ if (!disabled && !labelDisabled) {
+ this.emitChange(name);
+ }
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/radio/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/radio/index.json
new file mode 100644
index 00000000..0a336c08
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/radio/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/radio/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/radio/index.wxml
new file mode 100644
index 00000000..0b748eff
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/radio/index.wxml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/radio/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/radio/index.wxss
new file mode 100644
index 00000000..96c81f0f
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/radio/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-radio{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;overflow:hidden;-webkit-user-select:none;user-select:none}.van-radio__icon-wrap{-webkit-flex:none;flex:none}.van-radio__icon{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;width:1em;height:1em;color:transparent;text-align:center;transition-property:color,border-color,background-color;border:1px solid #c8c9cc;border:1px solid var(--radio-border-color,#c8c9cc);font-size:20px;font-size:var(--radio-size,20px);transition-duration:.2s;transition-duration:var(--radio-transition-duration,.2s)}.van-radio__icon--round{border-radius:100%}.van-radio__icon--checked{color:#fff;color:var(--white,#fff);background-color:#1989fa;background-color:var(--radio-checked-icon-color,#1989fa);border-color:#1989fa;border-color:var(--radio-checked-icon-color,#1989fa)}.van-radio__icon--disabled{background-color:#ebedf0;background-color:var(--radio-disabled-background-color,#ebedf0);border-color:#c8c9cc;border-color:var(--radio-disabled-icon-color,#c8c9cc)}.van-radio__icon--disabled.van-radio__icon--checked{color:#c8c9cc;color:var(--radio-disabled-icon-color,#c8c9cc)}.van-radio__label{word-wrap:break-word;margin-left:10px;margin-left:var(--radio-label-margin,10px);color:#323233;color:var(--radio-label-color,#323233);line-height:20px;line-height:var(--radio-size,20px)}.van-radio__label--left{float:left;margin:0 10px 0 0;margin:0 var(--radio-label-margin,10px) 0 0}.van-radio__label--disabled{color:#c8c9cc;color:var(--radio-disabled-label-color,#c8c9cc)}.van-radio__label:empty{margin:0}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/rate/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/rate/index.js
new file mode 100644
index 00000000..39f06ff3
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/rate/index.js
@@ -0,0 +1,110 @@
+'use strict';
+var __assign =
+ (this && this.__assign) ||
+ function () {
+ __assign =
+ Object.assign ||
+ function (t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s)
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+ }
+ return t;
+ };
+ return __assign.apply(this, arguments);
+ };
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var version_1 = require('../common/version');
+component_1.VantComponent({
+ field: true,
+ classes: ['icon-class'],
+ props: {
+ value: {
+ type: Number,
+ observer: function (value) {
+ if (value !== this.data.innerValue) {
+ this.setData({ innerValue: value });
+ }
+ },
+ },
+ readonly: Boolean,
+ disabled: Boolean,
+ allowHalf: Boolean,
+ size: null,
+ icon: {
+ type: String,
+ value: 'star',
+ },
+ voidIcon: {
+ type: String,
+ value: 'star-o',
+ },
+ color: {
+ type: String,
+ value: '#ffd21e',
+ },
+ voidColor: {
+ type: String,
+ value: '#c7c7c7',
+ },
+ disabledColor: {
+ type: String,
+ value: '#bdbdbd',
+ },
+ count: {
+ type: Number,
+ value: 5,
+ observer: function (value) {
+ this.setData({ innerCountArray: Array.from({ length: value }) });
+ },
+ },
+ gutter: null,
+ touchable: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ data: {
+ innerValue: 0,
+ innerCountArray: Array.from({ length: 5 }),
+ },
+ methods: {
+ onSelect: function (event) {
+ var _this = this;
+ var data = this.data;
+ var score = event.currentTarget.dataset.score;
+ if (!data.disabled && !data.readonly) {
+ this.setData({ innerValue: score + 1 });
+ if (version_1.canIUseModel()) {
+ this.setData({ value: score + 1 });
+ }
+ wx.nextTick(function () {
+ _this.$emit('input', score + 1);
+ _this.$emit('change', score + 1);
+ });
+ }
+ },
+ onTouchMove: function (event) {
+ var _this = this;
+ var touchable = this.data.touchable;
+ if (!touchable) return;
+ var clientX = event.touches[0].clientX;
+ this.getRect('.van-rate__icon', true).then(function (list) {
+ var target = list
+ .sort(function (item) {
+ return item.right - item.left;
+ })
+ .find(function (item) {
+ return clientX >= item.left && clientX <= item.right;
+ });
+ if (target != null) {
+ _this.onSelect(
+ __assign(__assign({}, event), { currentTarget: target })
+ );
+ }
+ });
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/rate/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/rate/index.json
new file mode 100644
index 00000000..0a336c08
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/rate/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/rate/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/rate/index.wxml
new file mode 100644
index 00000000..58eee5cd
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/rate/index.wxml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/rate/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/rate/index.wxss
new file mode 100644
index 00000000..6fd34354
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/rate/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-rate{display:-webkit-inline-flex;display:inline-flex;-webkit-user-select:none;user-select:none}.van-rate__item{position:relative;padding:0 2px;padding:0 var(--rate-horizontal-padding,2px)}.van-rate__icon{display:block;height:1em;font-size:20px;font-size:var(--rate-icon-size,20px)}.van-rate__icon--half{position:absolute;top:0;width:.5em;overflow:hidden;left:2px;left:var(--rate-horizontal-padding,2px)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/row/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/row/index.js
new file mode 100644
index 00000000..613462a6
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/row/index.js
@@ -0,0 +1,43 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ relation: {
+ name: 'col',
+ type: 'descendant',
+ current: 'row',
+ linked: function (target) {
+ if (this.data.gutter) {
+ target.setGutter(this.data.gutter);
+ }
+ },
+ },
+ props: {
+ gutter: {
+ type: Number,
+ observer: 'setGutter',
+ },
+ },
+ data: {
+ viewStyle: '',
+ },
+ mounted: function () {
+ if (this.data.gutter) {
+ this.setGutter();
+ }
+ },
+ methods: {
+ setGutter: function () {
+ var _this = this;
+ var gutter = this.data.gutter;
+ var margin = '-' + Number(gutter) / 2 + 'px';
+ var viewStyle = gutter
+ ? 'margin-right: ' + margin + '; margin-left: ' + margin + ';'
+ : '';
+ this.setData({ viewStyle: viewStyle });
+ this.getRelationNodes('../col/index').forEach(function (col) {
+ col.setGutter(_this.data.gutter);
+ });
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/row/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/row/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/row/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/row/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/row/index.wxml
new file mode 100644
index 00000000..ab8fcf58
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/row/index.wxml
@@ -0,0 +1,3 @@
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/row/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/row/index.wxss
new file mode 100644
index 00000000..32a098b0
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/row/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-row:after{display:table;clear:both;content:""}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/search/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/search/index.js
new file mode 100644
index 00000000..2e61ab9b
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/search/index.js
@@ -0,0 +1,81 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var version_1 = require('../common/version');
+component_1.VantComponent({
+ field: true,
+ classes: ['field-class', 'input-class', 'cancel-class'],
+ props: {
+ label: String,
+ focus: Boolean,
+ error: Boolean,
+ disabled: Boolean,
+ readonly: Boolean,
+ inputAlign: String,
+ showAction: Boolean,
+ useActionSlot: Boolean,
+ useLeftIconSlot: Boolean,
+ useRightIconSlot: Boolean,
+ leftIcon: {
+ type: String,
+ value: 'search',
+ },
+ rightIcon: String,
+ placeholder: String,
+ placeholderStyle: String,
+ actionText: {
+ type: String,
+ value: '取消',
+ },
+ background: {
+ type: String,
+ value: '#ffffff',
+ },
+ maxlength: {
+ type: Number,
+ value: -1,
+ },
+ shape: {
+ type: String,
+ value: 'square',
+ },
+ clearable: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ methods: {
+ onChange: function (event) {
+ if (version_1.canIUseModel()) {
+ this.setData({ value: event.detail });
+ }
+ this.$emit('change', event.detail);
+ },
+ onCancel: function () {
+ var _this = this;
+ /**
+ * 修复修改输入框值时,输入框失焦和赋值同时触发,赋值失效
+ * https://github.com/youzan/@vant/weapp/issues/1768
+ */
+ setTimeout(function () {
+ if (version_1.canIUseModel()) {
+ _this.setData({ value: '' });
+ }
+ _this.$emit('cancel');
+ _this.$emit('change', '');
+ }, 200);
+ },
+ onSearch: function (event) {
+ this.$emit('search', event.detail);
+ },
+ onFocus: function (event) {
+ this.$emit('focus', event.detail);
+ },
+ onBlur: function (event) {
+ this.$emit('blur', event.detail);
+ },
+ onClear: function (event) {
+ this.$emit('clear', event.detail);
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/search/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/search/index.json
new file mode 100644
index 00000000..b4cfe918
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/search/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-field": "../field/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/search/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/search/index.wxml
new file mode 100644
index 00000000..1d0e6f1f
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/search/index.wxml
@@ -0,0 +1,50 @@
+
+
+
+
+ {{ label }}
+
+
+
+
+
+
+
+
+
+
+ {{ actionText }}
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/search/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/search/index.wxss
new file mode 100644
index 00000000..32247c56
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/search/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-search{-webkit-align-items:center;align-items:center;box-sizing:border-box;padding:10px 12px;padding:var(--search-padding,10px 12px)}.van-search,.van-search__content{display:-webkit-flex;display:flex}.van-search__content{-webkit-flex:1;flex:1;padding-left:8px;padding-left:var(--padding-xs,8px);border-radius:2px;border-radius:var(--border-radius-sm,2px);background-color:#f7f8fa;background-color:var(--search-background-color,#f7f8fa)}.van-search__content--round{border-radius:17px;border-radius:calc(var(--search-input-height, 34px)/2)}.van-search__label{padding:0 5px;padding:var(--search-label-padding,0 5px);font-size:14px;font-size:var(--search-label-font-size,14px);line-height:34px;line-height:var(--search-input-height,34px);color:#323233;color:var(--search-label-color,#323233)}.van-search__field{-webkit-flex:1;flex:1}.van-search__field__left-icon{color:#969799;color:var(--search-left-icon-color,#969799)}.van-search--withaction{padding-right:0}.van-search__action{padding:0 8px;padding:var(--search-action-padding,0 8px);font-size:14px;font-size:var(--search-action-font-size,14px);line-height:34px;line-height:var(--search-input-height,34px);color:#323233;color:var(--search-action-text-color,#323233)}.van-search__action--hover{background-color:#f2f3f5;background-color:var(--active-color,#f2f3f5)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sidebar-item/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sidebar-item/index.js
new file mode 100644
index 00000000..0cf035ba
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sidebar-item/index.js
@@ -0,0 +1,34 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ classes: ['active-class', 'disabled-class'],
+ relation: {
+ type: 'ancestor',
+ name: 'sidebar',
+ current: 'sidebar-item',
+ },
+ props: {
+ dot: Boolean,
+ info: null,
+ title: String,
+ disabled: Boolean,
+ },
+ methods: {
+ onClick: function () {
+ var _this = this;
+ var parent = this.parent;
+ if (!parent || this.data.disabled) {
+ return;
+ }
+ var index = parent.children.indexOf(this);
+ parent.setActive(index).then(function () {
+ _this.$emit('click', index);
+ parent.$emit('change', index);
+ });
+ },
+ setActive: function (selected) {
+ return this.setData({ selected: selected });
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sidebar-item/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sidebar-item/index.json
new file mode 100644
index 00000000..bf0ebe00
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sidebar-item/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-info": "../info/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sidebar-item/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sidebar-item/index.wxml
new file mode 100644
index 00000000..ab8c6c42
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sidebar-item/index.wxml
@@ -0,0 +1,19 @@
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sidebar-item/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sidebar-item/index.wxss
new file mode 100644
index 00000000..308dc9c4
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sidebar-item/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-sidebar-item{display:block;box-sizing:border-box;overflow:hidden;word-wrap:break-word;border-left:3px solid transparent;-webkit-user-select:none;user-select:none;padding:20px 12px 20px 8px;padding:var(--sidebar-padding,20px 12px 20px 8px);font-size:14px;font-size:var(--sidebar-font-size,14px);line-height:20px;line-height:var(--sidebar-line-height,20px);color:#323233;color:var(--sidebar-text-color,#323233);background-color:#f7f8fa;background-color:var(--sidebar-background-color,#f7f8fa)}.van-sidebar-item__text{position:relative;display:inline-block}.van-sidebar-item--hover:not(.van-sidebar-item--disabled){background-color:#f2f3f5;background-color:var(--sidebar-active-color,#f2f3f5)}.van-sidebar-item:after{border-bottom-width:1px}.van-sidebar-item--selected{color:#323233;color:var(--sidebar-selected-text-color,#323233);font-weight:500;font-weight:var(--sidebar-selected-font-weight,500);border-color:#ee0a24;border-color:var(--sidebar-selected-border-color,#ee0a24)}.van-sidebar-item--selected:after{border-right-width:1px}.van-sidebar-item--selected,.van-sidebar-item--selected.van-sidebar-item--hover{background-color:#fff;background-color:var(--sidebar-selected-background-color,#fff)}.van-sidebar-item--disabled{color:#c8c9cc;color:var(--sidebar-disabled-text-color,#c8c9cc)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sidebar/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sidebar/index.js
new file mode 100644
index 00000000..97a30805
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sidebar/index.js
@@ -0,0 +1,45 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ relation: {
+ name: 'sidebar-item',
+ type: 'descendant',
+ current: 'sidebar',
+ linked: function () {
+ this.setActive(this.data.activeKey);
+ },
+ unlinked: function () {
+ this.setActive(this.data.activeKey);
+ },
+ },
+ props: {
+ activeKey: {
+ type: Number,
+ value: 0,
+ observer: 'setActive',
+ },
+ },
+ beforeCreate: function () {
+ this.currentActive = -1;
+ },
+ methods: {
+ setActive: function (activeKey) {
+ var _a = this,
+ children = _a.children,
+ currentActive = _a.currentActive;
+ if (!children.length) {
+ return Promise.resolve();
+ }
+ this.currentActive = activeKey;
+ var stack = [];
+ if (currentActive !== activeKey && children[currentActive]) {
+ stack.push(children[currentActive].setActive(false));
+ }
+ if (children[activeKey]) {
+ stack.push(children[activeKey].setActive(true));
+ }
+ return Promise.all(stack);
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sidebar/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sidebar/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sidebar/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sidebar/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sidebar/index.wxml
new file mode 100644
index 00000000..96b11c71
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sidebar/index.wxml
@@ -0,0 +1,3 @@
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sidebar/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sidebar/index.wxss
new file mode 100644
index 00000000..ba3ba942
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sidebar/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-sidebar{width:85px;width:var(--sidebar-width,85px)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/skeleton/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/skeleton/index.js
new file mode 100644
index 00000000..52137fa8
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/skeleton/index.js
@@ -0,0 +1,48 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ classes: ['avatar-class', 'title-class', 'row-class'],
+ props: {
+ row: {
+ type: Number,
+ value: 0,
+ observer: function (value) {
+ this.setData({ rowArray: Array.from({ length: value }) });
+ },
+ },
+ title: Boolean,
+ avatar: Boolean,
+ loading: {
+ type: Boolean,
+ value: true,
+ },
+ animate: {
+ type: Boolean,
+ value: true,
+ },
+ avatarSize: {
+ type: String,
+ value: '32px',
+ },
+ avatarShape: {
+ type: String,
+ value: 'round',
+ },
+ titleWidth: {
+ type: String,
+ value: '40%',
+ },
+ rowWidth: {
+ type: null,
+ value: '100%',
+ observer: function (val) {
+ this.setData({ isArray: val instanceof Array });
+ },
+ },
+ },
+ data: {
+ isArray: false,
+ rowArray: [],
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/skeleton/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/skeleton/index.json
new file mode 100644
index 00000000..a89ef4db
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/skeleton/index.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/skeleton/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/skeleton/index.wxml
new file mode 100644
index 00000000..058e2efd
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/skeleton/index.wxml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/skeleton/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/skeleton/index.wxss
new file mode 100644
index 00000000..565b26e4
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/skeleton/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-skeleton{display:-webkit-flex;display:flex;box-sizing:border-box;width:100%;padding:0 16px;padding:var(--skeleton-padding,0 16px)}.van-skeleton__avatar{-webkit-flex-shrink:0;flex-shrink:0;margin-right:16px;margin-right:var(--padding-md,16px);background-color:#f2f3f5;background-color:var(--skeleton-avatar-background-color,#f2f3f5)}.van-skeleton__avatar--round{border-radius:100%}.van-skeleton__content{-webkit-flex:1;flex:1}.van-skeleton__avatar+.van-skeleton__content{padding-top:8px;padding-top:var(--padding-xs,8px)}.van-skeleton__row,.van-skeleton__title{height:16px;height:var(--skeleton-row-height,16px);background-color:#f2f3f5;background-color:var(--skeleton-row-background-color,#f2f3f5)}.van-skeleton__title{margin:0}.van-skeleton__row:not(:first-child){margin-top:12px;margin-top:var(--skeleton-row-margin-top,12px)}.van-skeleton__title+.van-skeleton__row{margin-top:20px}.van-skeleton--animate{-webkit-animation:van-skeleton-blink 1.2s ease-in-out infinite;animation:van-skeleton-blink 1.2s ease-in-out infinite}@-webkit-keyframes van-skeleton-blink{50%{opacity:.6}}@keyframes van-skeleton-blink{50%{opacity:.6}}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/slider/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/slider/index.js
new file mode 100644
index 00000000..f945c101
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/slider/index.js
@@ -0,0 +1,113 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var touch_1 = require('../mixins/touch');
+var version_1 = require('../common/version');
+component_1.VantComponent({
+ mixins: [touch_1.touch],
+ props: {
+ disabled: Boolean,
+ useButtonSlot: Boolean,
+ activeColor: String,
+ inactiveColor: String,
+ max: {
+ type: Number,
+ value: 100,
+ },
+ min: {
+ type: Number,
+ value: 0,
+ },
+ step: {
+ type: Number,
+ value: 1,
+ },
+ value: {
+ type: Number,
+ value: 0,
+ observer: 'updateValue',
+ },
+ barHeight: {
+ type: null,
+ value: '2px',
+ },
+ },
+ created: function () {
+ this.updateValue(this.data.value);
+ },
+ methods: {
+ onTouchStart: function (event) {
+ if (this.data.disabled) return;
+ this.touchStart(event);
+ this.startValue = this.format(this.data.value);
+ this.dragStatus = 'start';
+ },
+ onTouchMove: function (event) {
+ var _this = this;
+ if (this.data.disabled) return;
+ if (this.dragStatus === 'start') {
+ this.$emit('drag-start');
+ }
+ this.touchMove(event);
+ this.dragStatus = 'draging';
+ this.getRect('.van-slider').then(function (rect) {
+ var diff = (_this.deltaX / rect.width) * 100;
+ _this.newValue = _this.startValue + diff;
+ _this.updateValue(_this.newValue, false, true);
+ });
+ },
+ onTouchEnd: function () {
+ if (this.data.disabled) return;
+ if (this.dragStatus === 'draging') {
+ this.updateValue(this.newValue, true);
+ this.$emit('drag-end');
+ }
+ },
+ onClick: function (event) {
+ var _this = this;
+ if (this.data.disabled) return;
+ var min = this.data.min;
+ this.getRect('.van-slider').then(function (rect) {
+ var value =
+ ((event.detail.x - rect.left) / rect.width) * _this.getRange() + min;
+ _this.updateValue(value, true);
+ });
+ },
+ updateValue: function (value, end, drag) {
+ value = this.format(value);
+ var min = this.data.min;
+ var width = ((value - min) * 100) / this.getRange() + '%';
+ this.setData({
+ value: value,
+ barStyle:
+ '\n width: ' +
+ width +
+ ';\n ' +
+ (drag ? 'transition: none;' : '') +
+ '\n ',
+ });
+ if (drag) {
+ this.$emit('drag', { value: value });
+ }
+ if (end) {
+ this.$emit('change', value);
+ }
+ if ((drag || end) && version_1.canIUseModel()) {
+ this.setData({ value: value });
+ }
+ },
+ getRange: function () {
+ var _a = this.data,
+ max = _a.max,
+ min = _a.min;
+ return max - min;
+ },
+ format: function (value) {
+ var _a = this.data,
+ max = _a.max,
+ min = _a.min,
+ step = _a.step;
+ return Math.round(Math.max(min, Math.min(value, max)) / step) * step;
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/slider/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/slider/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/slider/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/slider/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/slider/index.wxml
new file mode 100644
index 00000000..6a430f38
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/slider/index.wxml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/slider/index.wxs b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/slider/index.wxs
new file mode 100644
index 00000000..d6404d62
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/slider/index.wxs
@@ -0,0 +1,20 @@
+/* eslint-disable */
+var utils = require('../wxs/utils.wxs');
+
+function barStyle(barHeight, activeColor) {
+ var styles = [['height', utils.addUnit(barHeight)]];
+
+ if (activeColor) {
+ styles.push(['background', activeColor]);
+ }
+
+ return styles
+ .map(function (item) {
+ return item.join(':');
+ })
+ .join(';');
+}
+
+module.exports = {
+ barStyle: barStyle,
+};
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/slider/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/slider/index.wxss
new file mode 100644
index 00000000..7886b606
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/slider/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-slider{position:relative;border-radius:999px;border-radius:var(--border-radius-max,999px);background-color:#ebedf0;background-color:var(--slider-inactive-background-color,#ebedf0)}.van-slider:before{position:absolute;right:0;left:0;content:"";top:-8px;top:-var(--padding-xs,8px);bottom:-8px;bottom:-var(--padding-xs,8px)}.van-slider__bar{position:relative;border-radius:inherit;transition:width .2s;transition:width var(--animation-duration-fast,.2s);background-color:#1989fa;background-color:var(--slider-active-background-color,#1989fa)}.van-slider__button{width:24px;height:24px;border-radius:50%;box-shadow:0 1px 2px rgba(0,0,0,.5);background-color:#fff;background-color:var(--slider-button-background-color,#fff)}.van-slider__button-wrapper{position:absolute;top:50%;right:0;-webkit-transform:translate3d(50%,-50%,0);transform:translate3d(50%,-50%,0)}.van-slider--disabled{opacity:.5}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/stepper/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/stepper/index.js
new file mode 100644
index 00000000..41c24860
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/stepper/index.js
@@ -0,0 +1,214 @@
+'use strict';
+var __assign =
+ (this && this.__assign) ||
+ function () {
+ __assign =
+ Object.assign ||
+ function (t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s)
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+ }
+ return t;
+ };
+ return __assign.apply(this, arguments);
+ };
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var utils_1 = require('../common/utils');
+var LONG_PRESS_START_TIME = 600;
+var LONG_PRESS_INTERVAL = 200;
+// add num and avoid float number
+function add(num1, num2) {
+ var cardinal = Math.pow(10, 10);
+ return Math.round((num1 + num2) * cardinal) / cardinal;
+}
+function equal(value1, value2) {
+ return String(value1) === String(value2);
+}
+component_1.VantComponent({
+ field: true,
+ classes: ['input-class', 'plus-class', 'minus-class'],
+ props: {
+ value: {
+ type: null,
+ observer: function (value) {
+ if (!equal(value, this.data.currentValue)) {
+ this.setData({ currentValue: this.format(value) });
+ }
+ },
+ },
+ integer: {
+ type: Boolean,
+ observer: 'check',
+ },
+ disabled: Boolean,
+ inputWidth: null,
+ buttonSize: null,
+ asyncChange: Boolean,
+ disableInput: Boolean,
+ decimalLength: {
+ type: Number,
+ value: null,
+ observer: 'check',
+ },
+ min: {
+ type: null,
+ value: 1,
+ observer: 'check',
+ },
+ max: {
+ type: null,
+ value: Number.MAX_SAFE_INTEGER,
+ observer: 'check',
+ },
+ step: {
+ type: null,
+ value: 1,
+ },
+ showPlus: {
+ type: Boolean,
+ value: true,
+ },
+ showMinus: {
+ type: Boolean,
+ value: true,
+ },
+ disablePlus: Boolean,
+ disableMinus: Boolean,
+ longPress: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ data: {
+ currentValue: '',
+ },
+ created: function () {
+ this.setData({
+ currentValue: this.format(this.data.value),
+ });
+ },
+ methods: {
+ check: function () {
+ var val = this.format(this.data.currentValue);
+ if (!equal(val, this.data.currentValue)) {
+ this.setData({ currentValue: val });
+ }
+ },
+ isDisabled: function (type) {
+ if (type === 'plus') {
+ return (
+ this.data.disabled ||
+ this.data.disablePlus ||
+ this.data.currentValue >= this.data.max
+ );
+ }
+ return (
+ this.data.disabled ||
+ this.data.disableMinus ||
+ this.data.currentValue <= this.data.min
+ );
+ },
+ onFocus: function (event) {
+ this.$emit('focus', event.detail);
+ },
+ onBlur: function (event) {
+ var value = this.format(event.detail.value);
+ this.emitChange(value);
+ this.$emit(
+ 'blur',
+ __assign(__assign({}, event.detail), { value: value })
+ );
+ },
+ // filter illegal characters
+ filter: function (value) {
+ value = String(value).replace(/[^0-9.-]/g, '');
+ if (this.data.integer && value.indexOf('.') !== -1) {
+ value = value.split('.')[0];
+ }
+ return value;
+ },
+ // limit value range
+ format: function (value) {
+ value = this.filter(value);
+ // format range
+ value = value === '' ? 0 : +value;
+ value = Math.max(Math.min(this.data.max, value), this.data.min);
+ // format decimal
+ if (utils_1.isDef(this.data.decimalLength)) {
+ value = value.toFixed(this.data.decimalLength);
+ }
+ return value;
+ },
+ onInput: function (event) {
+ var _a = (event.detail || {}).value,
+ value = _a === void 0 ? '' : _a;
+ // allow input to be empty
+ if (value === '') {
+ return;
+ }
+ var formatted = this.filter(value);
+ // limit max decimal length
+ if (
+ utils_1.isDef(this.data.decimalLength) &&
+ formatted.indexOf('.') !== -1
+ ) {
+ var pair = formatted.split('.');
+ formatted = pair[0] + '.' + pair[1].slice(0, this.data.decimalLength);
+ }
+ this.emitChange(formatted);
+ },
+ emitChange: function (value) {
+ if (!this.data.asyncChange) {
+ this.setData({ currentValue: value });
+ }
+ this.$emit('change', value);
+ },
+ onChange: function () {
+ var type = this.type;
+ if (this.isDisabled(type)) {
+ this.$emit('overlimit', type);
+ return;
+ }
+ var diff = type === 'minus' ? -this.data.step : +this.data.step;
+ var value = this.format(add(+this.data.currentValue, diff));
+ this.emitChange(value);
+ this.$emit(type);
+ },
+ longPressStep: function () {
+ var _this = this;
+ this.longPressTimer = setTimeout(function () {
+ _this.onChange();
+ _this.longPressStep();
+ }, LONG_PRESS_INTERVAL);
+ },
+ onTap: function (event) {
+ var type = event.currentTarget.dataset.type;
+ this.type = type;
+ this.onChange();
+ },
+ onTouchStart: function (event) {
+ var _this = this;
+ if (!this.data.longPress) {
+ return;
+ }
+ clearTimeout(this.longPressTimer);
+ var type = event.currentTarget.dataset.type;
+ this.type = type;
+ this.isLongPress = false;
+ this.longPressTimer = setTimeout(function () {
+ _this.isLongPress = true;
+ _this.onChange();
+ _this.longPressStep();
+ }, LONG_PRESS_START_TIME);
+ },
+ onTouchEnd: function () {
+ if (!this.data.longPress) {
+ return;
+ }
+ clearTimeout(this.longPressTimer);
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/stepper/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/stepper/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/stepper/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/stepper/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/stepper/index.wxml
new file mode 100644
index 00000000..95704208
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/stepper/index.wxml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/stepper/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/stepper/index.wxss
new file mode 100644
index 00000000..5da5b793
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/stepper/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-stepper{font-size:0}.van-stepper__minus,.van-stepper__plus{position:relative;display:inline-block;box-sizing:border-box;margin:1px;vertical-align:middle;border:0;background-color:#f2f3f5;background-color:var(--stepper-background-color,#f2f3f5);color:#323233;color:var(--stepper-button-icon-color,#323233);width:28px;width:var(--stepper-input-height,28px);height:28px;height:var(--stepper-input-height,28px);padding:4px;padding:var(--padding-base,4px)}.van-stepper__minus:before,.van-stepper__plus:before{width:9px;height:1px}.van-stepper__minus:after,.van-stepper__plus:after{width:1px;height:9px}.van-stepper__minus:after,.van-stepper__minus:before,.van-stepper__plus:after,.van-stepper__plus:before{position:absolute;top:0;right:0;bottom:0;left:0;margin:auto;background-color:currentColor;content:""}.van-stepper__minus--hover,.van-stepper__plus--hover{background-color:#e8e8e8;background-color:var(--stepper-active-color,#e8e8e8)}.van-stepper__minus--disabled,.van-stepper__plus--disabled{color:#c8c9cc;color:var(--stepper-button-disabled-icon-color,#c8c9cc)}.van-stepper__minus--disabled,.van-stepper__minus--disabled.van-stepper__minus--hover,.van-stepper__minus--disabled.van-stepper__plus--hover,.van-stepper__plus--disabled,.van-stepper__plus--disabled.van-stepper__minus--hover,.van-stepper__plus--disabled.van-stepper__plus--hover{background-color:#f7f8fa;background-color:var(--stepper-button-disabled-color,#f7f8fa)}.van-stepper__minus{border-radius:4px 0 0 4px;border-radius:var(--stepper-border-radius,4px) 0 0 var(--stepper-border-radius,4px)}.van-stepper__minus:after{display:none}.van-stepper__plus{border-radius:0 4px 4px 0;border-radius:0 var(--stepper-border-radius,4px) var(--stepper-border-radius,4px) 0}.van-stepper__input{display:inline-block;box-sizing:border-box;min-height:0;margin:1px;padding:1px;text-align:center;vertical-align:middle;border:0;border-width:1px 0;border-radius:0;-webkit-appearance:none;font-size:14px;font-size:var(--stepper-input-font-size,14px);color:#323233;color:var(--stepper-input-text-color,#323233);background-color:#f2f3f5;background-color:var(--stepper-background-color,#f2f3f5);width:32px;width:var(--stepper-input-width,32px);height:28px;height:var(--stepper-input-height,28px)}.van-stepper__input--disabled{color:#c8c9cc;color:var(--stepper-input-disabled-text-color,#c8c9cc);background-color:#f2f3f5;background-color:var(--stepper-input-disabled-background-color,#f2f3f5)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/steps/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/steps/index.js
new file mode 100644
index 00000000..c41e5ade
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/steps/index.js
@@ -0,0 +1,35 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var color_1 = require('../common/color');
+component_1.VantComponent({
+ classes: ['desc-class'],
+ props: {
+ icon: String,
+ steps: Array,
+ active: Number,
+ direction: {
+ type: String,
+ value: 'horizontal',
+ },
+ activeColor: {
+ type: String,
+ value: color_1.GREEN,
+ },
+ inactiveColor: {
+ type: String,
+ value: color_1.GRAY_DARK,
+ },
+ activeIcon: {
+ type: String,
+ value: 'checked',
+ },
+ inactiveIcon: String,
+ },
+ methods: {
+ onClick: function (event) {
+ var index = event.currentTarget.dataset.index;
+ this.$emit('click-step', index);
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/steps/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/steps/index.json
new file mode 100644
index 00000000..0a336c08
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/steps/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/steps/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/steps/index.wxml
new file mode 100644
index 00000000..29f1bfd0
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/steps/index.wxml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+ {{ item.text }}
+ {{ item.desc }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ function get(index, active) {
+ if (index < active) {
+ return 'finish';
+ } else if (index === active) {
+ return 'process';
+ }
+
+ return 'inactive';
+ }
+ module.exports = get;
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/steps/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/steps/index.wxss
new file mode 100644
index 00000000..9b94a646
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/steps/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-steps{overflow:hidden;background-color:#fff;background-color:var(--steps-background-color,#fff)}.van-steps--horizontal{padding:10px}.van-steps--horizontal .van-step__wrapper{position:relative;display:-webkit-flex;display:flex;overflow:hidden}.van-steps--vertical{padding-left:10px}.van-steps--vertical .van-step__wrapper{padding:0 0 0 20px}.van-step{position:relative;-webkit-flex:1;flex:1;font-size:14px;font-size:var(--step-font-size,14px);color:#969799;color:var(--step-text-color,#969799)}.van-step--finish{color:#323233;color:var(--step-finish-text-color,#323233)}.van-step__circle{border-radius:50%;width:5px;width:var(--step-circle-size,5px);height:5px;height:var(--step-circle-size,5px);background-color:#969799;background-color:var(--step-circle-color,#969799)}.van-step--horizontal{padding-bottom:14px}.van-step--horizontal:first-child .van-step__title{-webkit-transform:none;transform:none}.van-step--horizontal:first-child .van-step__circle-container{padding:0 8px 0 0;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal:last-child{position:absolute;right:0;width:auto}.van-step--horizontal:last-child .van-step__title{text-align:right;-webkit-transform:none;transform:none}.van-step--horizontal:last-child .van-step__circle-container{right:0;padding:0 0 0 8px;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal .van-step__circle-container{position:absolute;bottom:6px;z-index:1;-webkit-transform:translate3d(-50%,50%,0);transform:translate3d(-50%,50%,0);background-color:#fff;background-color:var(--white,#fff);padding:0 8px;padding:0 var(--padding-xs,8px)}.van-step--horizontal .van-step__title{display:inline-block;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0);font-size:12px;font-size:var(--step-horizontal-title-font-size,12px)}.van-step--horizontal .van-step__line{position:absolute;right:0;bottom:6px;left:0;height:2px;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0);background-color:#ebedf0;background-color:var(--step-line-color,#ebedf0)}.van-step--horizontal.van-step--process{color:#323233;color:var(--step-process-text-color,#323233)}.van-step--horizontal.van-step--process .van-step__icon{display:block;line-height:1;}.van-step--vertical{padding:10px 10px 10px 0;line-height:18px}.van-step--vertical:after{border-bottom-width:1px}.van-step--vertical:last-child:after{border-bottom-width:none}.van-step--vertical:first-child:before{position:absolute;top:0;left:-15px;z-index:1;width:1px;height:20px;content:"";background-color:#fff;background-color:var(--white,#fff)}.van-step--vertical .van-step__circle,.van-step--vertical .van-step__icon,.van-step--vertical .van-step__line{position:absolute;top:19px;left:-14px;z-index:2;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}.van-step--vertical .van-step__icon{line-height:1;font-size:12px;font-size:var(--step-icon-size,12px)}.van-step--vertical .van-step__line{z-index:1;width:1px;height:100%;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0);background-color:#ebedf0;background-color:var(--step-line-color,#ebedf0)}.van-step__title{padding-bottom: 10rpx;}.van-step__title .desc-class{color: #FFF;}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sticky/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sticky/index.js
new file mode 100644
index 00000000..11d0c073
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sticky/index.js
@@ -0,0 +1,119 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var page_scroll_1 = require('../mixins/page-scroll');
+var ROOT_ELEMENT = '.van-sticky';
+component_1.VantComponent({
+ props: {
+ zIndex: {
+ type: Number,
+ value: 99,
+ },
+ offsetTop: {
+ type: Number,
+ value: 0,
+ observer: 'onScroll',
+ },
+ disabled: {
+ type: Boolean,
+ observer: 'onScroll',
+ },
+ container: {
+ type: null,
+ observer: 'onScroll',
+ },
+ scrollTop: {
+ type: null,
+ observer: function (val) {
+ this.onScroll({ scrollTop: val });
+ },
+ },
+ },
+ mixins: [
+ page_scroll_1.pageScrollMixin(function (event) {
+ if (this.data.scrollTop != null) {
+ return;
+ }
+ this.onScroll(event);
+ }),
+ ],
+ data: {
+ height: 0,
+ fixed: false,
+ transform: 0,
+ },
+ mounted: function () {
+ this.onScroll();
+ },
+ methods: {
+ onScroll: function (_a) {
+ var _this = this;
+ var scrollTop = (_a === void 0 ? {} : _a).scrollTop;
+ var _b = this.data,
+ container = _b.container,
+ offsetTop = _b.offsetTop,
+ disabled = _b.disabled;
+ if (disabled) {
+ this.setDataAfterDiff({
+ fixed: false,
+ transform: 0,
+ });
+ return;
+ }
+ this.scrollTop = scrollTop || this.scrollTop;
+ if (typeof container === 'function') {
+ Promise.all([this.getRect(ROOT_ELEMENT), this.getContainerRect()]).then(
+ function (_a) {
+ var root = _a[0],
+ container = _a[1];
+ if (offsetTop + root.height > container.height + container.top) {
+ _this.setDataAfterDiff({
+ fixed: false,
+ transform: container.height - root.height,
+ });
+ } else if (offsetTop >= root.top) {
+ _this.setDataAfterDiff({
+ fixed: true,
+ height: root.height,
+ transform: 0,
+ });
+ } else {
+ _this.setDataAfterDiff({ fixed: false, transform: 0 });
+ }
+ }
+ );
+ return;
+ }
+ this.getRect(ROOT_ELEMENT).then(function (root) {
+ if (offsetTop >= root.top) {
+ _this.setDataAfterDiff({ fixed: true, height: root.height });
+ _this.transform = 0;
+ } else {
+ _this.setDataAfterDiff({ fixed: false });
+ }
+ });
+ },
+ setDataAfterDiff: function (data) {
+ var _this = this;
+ wx.nextTick(function () {
+ var diff = Object.keys(data).reduce(function (prev, key) {
+ if (data[key] !== _this.data[key]) {
+ prev[key] = data[key];
+ }
+ return prev;
+ }, {});
+ _this.setData(diff);
+ _this.$emit('scroll', {
+ scrollTop: _this.scrollTop,
+ isFixed: data.fixed || _this.data.fixed,
+ });
+ });
+ },
+ getContainerRect: function () {
+ var nodesRef = this.data.container();
+ return new Promise(function (resolve) {
+ return nodesRef.boundingClientRect(resolve).exec();
+ });
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sticky/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sticky/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sticky/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sticky/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sticky/index.wxml
new file mode 100644
index 00000000..15e9f4a8
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sticky/index.wxml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sticky/index.wxs b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sticky/index.wxs
new file mode 100644
index 00000000..18efe147
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sticky/index.wxs
@@ -0,0 +1,37 @@
+/* eslint-disable */
+function wrapStyle(data) {
+ var style = '';
+
+ if (data.transform) {
+ style += 'transform: translate3d(0, ' + data.transform + 'px, 0);';
+ }
+
+ if (data.fixed) {
+ style += 'top: ' + data.offsetTop + 'px;';
+ }
+
+ if (data.zIndex) {
+ style += 'z-index: ' + data.zIndex + ';';
+ }
+
+ return style;
+}
+
+function containerStyle(data) {
+ var style = '';
+
+ if (data.fixed) {
+ style += 'height: ' + data.height + 'px;';
+ }
+
+ if (data.zIndex) {
+ style += 'z-index: ' + data.zIndex + ';';
+ }
+
+ return style;
+}
+
+module.exports = {
+ wrapStyle: wrapStyle,
+ containerStyle: containerStyle
+};
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sticky/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sticky/index.wxss
new file mode 100644
index 00000000..52693875
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/sticky/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-sticky{position:relative}.van-sticky-wrap--fixed{position:fixed;right:0;left:0}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/submit-bar/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/submit-bar/index.js
new file mode 100644
index 00000000..2b06332b
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/submit-bar/index.js
@@ -0,0 +1,61 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ classes: ['bar-class', 'price-class', 'button-class'],
+ props: {
+ tip: {
+ type: null,
+ observer: 'updateTip',
+ },
+ tipIcon: String,
+ type: Number,
+ price: {
+ type: null,
+ observer: 'updatePrice',
+ },
+ label: String,
+ loading: Boolean,
+ disabled: Boolean,
+ buttonText: String,
+ currency: {
+ type: String,
+ value: '¥',
+ },
+ buttonType: {
+ type: String,
+ value: 'danger',
+ },
+ decimalLength: {
+ type: Number,
+ value: 2,
+ observer: 'updatePrice',
+ },
+ suffixLabel: String,
+ safeAreaInsetBottom: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ methods: {
+ updatePrice: function () {
+ var _a = this.data,
+ price = _a.price,
+ decimalLength = _a.decimalLength;
+ var priceStrArr =
+ typeof price === 'number' &&
+ (price / 100).toFixed(decimalLength).split('.');
+ this.setData({
+ hasPrice: typeof price === 'number',
+ integerStr: priceStrArr && priceStrArr[0],
+ decimalStr: decimalLength && priceStrArr ? '.' + priceStrArr[1] : '',
+ });
+ },
+ updateTip: function () {
+ this.setData({ hasTip: typeof this.data.tip === 'string' });
+ },
+ onSubmit: function (event) {
+ this.$emit('submit', event.detail);
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/submit-bar/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/submit-bar/index.json
new file mode 100644
index 00000000..bda9b8d3
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/submit-bar/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-button": "../button/index",
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/submit-bar/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/submit-bar/index.wxml
new file mode 100644
index 00000000..a56dd46c
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/submit-bar/index.wxml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+ {{ tip }}
+
+
+
+
+
+
+
+ {{ label || '合计:' }}
+
+ {{ currency }}
+ {{ integerStr }}{{decimalStr}}
+
+ {{ suffixLabel }}
+
+
+ {{ loading ? '' : buttonText }}
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/submit-bar/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/submit-bar/index.wxss
new file mode 100644
index 00000000..3126e91b
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/submit-bar/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-submit-bar{position:fixed;bottom:0;left:0;width:100%;-webkit-user-select:none;user-select:none;z-index:100;z-index:var(--submit-bar-z-index,100);background-color:#fff;background-color:var(--submit-bar-background-color,#fff)}.van-submit-bar__tip{padding:10px;padding:var(--submit-bar-tip-padding,10px);color:#f56723;color:var(--submit-bar-tip-color,#f56723);font-size:12px;font-size:var(--submit-bar-tip-font-size,12px);line-height:1.5;line-height:var(--submit-bar-tip-line-height,1.5);background-color:#fff7cc;background-color:var(--submit-bar-tip-background-color,#fff7cc)}.van-submit-bar__tip:empty{display:none}.van-submit-bar__tip-icon{width:12px;height:12px;margin-right:4px;vertical-align:middle;font-size:12px;font-size:var(--submit-bar-tip-icon-size,12px);min-width:18px;min-width:calc(var(--submit-bar-tip-icon-size, 12px)*1.5)}.van-submit-bar__tip-text{display:inline;vertical-align:middle}.van-submit-bar__bar{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-end;justify-content:flex-end;padding:0 16px;padding:var(--submit-bar-padding,0 16px);height:50px;height:var(--submit-bar-height,50px);font-size:14px;font-size:var(--submit-bar-text-font-size,14px);background-color:#fff;background-color:var(--submit-bar-background-color,#fff)}.van-submit-bar__safe{height:constant(safe-area-inset-bottom);height:env(safe-area-inset-bottom)}.van-submit-bar__text{-webkit-flex:1;flex:1;text-align:right;color:#323233;color:var(--submit-bar-text-color,#323233);padding-right:12px;padding-right:var(--padding-sm,12px)}.van-submit-bar__price,.van-submit-bar__text{font-weight:500;font-weight:var(--font-weight-bold,500)}.van-submit-bar__price{color:#ee0a24;color:var(--submit-bar-price-color,#ee0a24);font-size:12px;font-size:var(--submit-bar-price-font-size,12px)}.van-submit-bar__price-integer{font-size:20px;font-family:Avenir-Heavy,PingFang SC,Helvetica Neue,Arial,sans-serif}.van-submit-bar__currency{font-size:12px;font-size:var(--submit-bar-currency-font-size,12px)}.van-submit-bar__suffix-label{margin-left:5px}.van-submit-bar__button{width:110px;width:var(--submit-bar-button-width,110px);font-weight:500;font-weight:var(--font-weight-bold,500);--button-default-height:40px!important;--button-default-height:var(--submit-bar-button-height,40px)!important;--button-line-height:40px!important;--button-line-height:var(--submit-bar-button-height,40px)!important}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/swipe-cell/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/swipe-cell/index.js
new file mode 100644
index 00000000..47538295
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/swipe-cell/index.js
@@ -0,0 +1,161 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var touch_1 = require('../mixins/touch');
+var utils_1 = require('../common/utils');
+var THRESHOLD = 0.3;
+var ARRAY = [];
+component_1.VantComponent({
+ props: {
+ disabled: Boolean,
+ leftWidth: {
+ type: Number,
+ value: 0,
+ observer: function (leftWidth) {
+ if (leftWidth === void 0) {
+ leftWidth = 0;
+ }
+ if (this.offset > 0) {
+ this.swipeMove(leftWidth);
+ }
+ },
+ },
+ rightWidth: {
+ type: Number,
+ value: 0,
+ observer: function (rightWidth) {
+ if (rightWidth === void 0) {
+ rightWidth = 0;
+ }
+ if (this.offset < 0) {
+ this.swipeMove(-rightWidth);
+ }
+ },
+ },
+ asyncClose: Boolean,
+ name: {
+ type: [Number, String],
+ value: '',
+ },
+ },
+ mixins: [touch_1.touch],
+ data: {
+ catchMove: false,
+ },
+ created: function () {
+ this.offset = 0;
+ ARRAY.push(this);
+ },
+ destroyed: function () {
+ var _this = this;
+ ARRAY = ARRAY.filter(function (item) {
+ return item !== _this;
+ });
+ },
+ methods: {
+ open: function (position) {
+ var _a = this.data,
+ leftWidth = _a.leftWidth,
+ rightWidth = _a.rightWidth;
+ var offset = position === 'left' ? leftWidth : -rightWidth;
+ this.swipeMove(offset);
+ this.$emit('open', {
+ position: position,
+ name: this.data.name,
+ });
+ },
+ close: function () {
+ this.swipeMove(0);
+ },
+ swipeMove: function (offset) {
+ if (offset === void 0) {
+ offset = 0;
+ }
+ this.offset = utils_1.range(
+ offset,
+ -this.data.rightWidth,
+ this.data.leftWidth
+ );
+ var transform = 'translate3d(' + this.offset + 'px, 0, 0)';
+ var transition = this.dragging
+ ? 'none'
+ : 'transform .6s cubic-bezier(0.18, 0.89, 0.32, 1)';
+ this.setData({
+ wrapperStyle:
+ '\n -webkit-transform: ' +
+ transform +
+ ';\n -webkit-transition: ' +
+ transition +
+ ';\n transform: ' +
+ transform +
+ ';\n transition: ' +
+ transition +
+ ';\n ',
+ });
+ },
+ swipeLeaveTransition: function () {
+ var _a = this.data,
+ leftWidth = _a.leftWidth,
+ rightWidth = _a.rightWidth;
+ var offset = this.offset;
+ if (rightWidth > 0 && -offset > rightWidth * THRESHOLD) {
+ this.open('right');
+ } else if (leftWidth > 0 && offset > leftWidth * THRESHOLD) {
+ this.open('left');
+ } else {
+ this.swipeMove(0);
+ }
+ this.setData({ catchMove: false });
+ },
+ startDrag: function (event) {
+ if (this.data.disabled) {
+ return;
+ }
+ this.startOffset = this.offset;
+ this.touchStart(event);
+ },
+ noop: function () {},
+ onDrag: function (event) {
+ var _this = this;
+ if (this.data.disabled) {
+ return;
+ }
+ this.touchMove(event);
+ if (this.direction !== 'horizontal') {
+ return;
+ }
+ this.dragging = true;
+ ARRAY.filter(function (item) {
+ return item !== _this;
+ }).forEach(function (item) {
+ return item.close();
+ });
+ this.setData({ catchMove: true });
+ this.swipeMove(this.startOffset + this.deltaX);
+ },
+ endDrag: function () {
+ if (this.data.disabled) {
+ return;
+ }
+ this.dragging = false;
+ this.swipeLeaveTransition();
+ },
+ onClick: function (event) {
+ var _a = event.currentTarget.dataset.key,
+ position = _a === void 0 ? 'outside' : _a;
+ this.$emit('click', position);
+ if (!this.offset) {
+ return;
+ }
+ if (this.data.asyncClose) {
+ this.$emit('close', {
+ position: position,
+ instance: this,
+ name: this.data.name,
+ });
+ } else {
+ this.swipeMove(0);
+ }
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/swipe-cell/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/swipe-cell/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/swipe-cell/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/swipe-cell/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/swipe-cell/index.wxml
new file mode 100644
index 00000000..72936199
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/swipe-cell/index.wxml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/swipe-cell/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/swipe-cell/index.wxss
new file mode 100644
index 00000000..d6152709
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/swipe-cell/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-swipe-cell{position:relative;overflow:hidden}.van-swipe-cell__left,.van-swipe-cell__right{position:absolute;top:0;height:100%}.van-swipe-cell__left{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.van-swipe-cell__right{right:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/switch/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/switch/index.js
new file mode 100644
index 00000000..a5b64ad1
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/switch/index.js
@@ -0,0 +1,59 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var color_1 = require('../common/color');
+component_1.VantComponent({
+ field: true,
+ classes: ['node-class'],
+ props: {
+ checked: {
+ type: null,
+ observer: function (value) {
+ var loadingColor = this.getLoadingColor(value);
+ this.setData({ value: value, loadingColor: loadingColor });
+ },
+ },
+ loading: Boolean,
+ disabled: Boolean,
+ activeColor: String,
+ inactiveColor: String,
+ size: {
+ type: String,
+ value: '30px',
+ },
+ activeValue: {
+ type: null,
+ value: true,
+ },
+ inactiveValue: {
+ type: null,
+ value: false,
+ },
+ },
+ created: function () {
+ var value = this.data.checked;
+ var loadingColor = this.getLoadingColor(value);
+ this.setData({ value: value, loadingColor: loadingColor });
+ },
+ methods: {
+ getLoadingColor: function (checked) {
+ var _a = this.data,
+ activeColor = _a.activeColor,
+ inactiveColor = _a.inactiveColor;
+ return checked
+ ? activeColor || color_1.BLUE
+ : inactiveColor || color_1.GRAY_DARK;
+ },
+ onClick: function () {
+ var _a = this.data,
+ activeValue = _a.activeValue,
+ inactiveValue = _a.inactiveValue;
+ if (!this.data.disabled && !this.data.loading) {
+ var checked = this.data.checked === activeValue;
+ var value = checked ? inactiveValue : activeValue;
+ this.$emit('input', value);
+ this.$emit('change', value);
+ }
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/switch/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/switch/index.json
new file mode 100644
index 00000000..01077f5d
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/switch/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-loading": "../loading/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/switch/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/switch/index.wxml
new file mode 100644
index 00000000..31a104df
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/switch/index.wxml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/switch/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/switch/index.wxss
new file mode 100644
index 00000000..e32a72ad
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/switch/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-switch{position:relative;display:inline-block;box-sizing:initial;width:2em;width:var(--switch-width,2em);height:1em;height:var(--switch-height,1em);background-color:#fff;background-color:var(--switch-background-color,#fff);border:1px solid rgba(0,0,0,.1);border:var(--switch-border,1px solid rgba(0,0,0,.1));border-radius:1em;border-radius:var(--switch-node-size,1em);transition:background-color .3s;transition:background-color var(--switch-transition-duration,.3s)}.van-switch__node{position:absolute;top:0;left:0;border-radius:100%;z-index:1;z-index:var(--switch-node-z-index,1);width:1em;width:var(--switch-node-size,1em);height:1em;height:var(--switch-node-size,1em);background-color:#fff;background-color:var(--switch-node-background-color,#fff);box-shadow:0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05);box-shadow:var(--switch-node-box-shadow,0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05));transition:-webkit-transform .3s cubic-bezier(.3,1.05,.4,1.05);transition:transform .3s cubic-bezier(.3,1.05,.4,1.05);transition:transform .3s cubic-bezier(.3,1.05,.4,1.05),-webkit-transform .3s cubic-bezier(.3,1.05,.4,1.05);transition:-webkit-transform var(--switch-transition-duration,.3s) cubic-bezier(.3,1.05,.4,1.05);transition:transform var(--switch-transition-duration,.3s) cubic-bezier(.3,1.05,.4,1.05);transition:transform var(--switch-transition-duration,.3s) cubic-bezier(.3,1.05,.4,1.05),-webkit-transform var(--switch-transition-duration,.3s) cubic-bezier(.3,1.05,.4,1.05)}.van-switch__loading{position:absolute!important;top:25%;left:25%;width:50%;height:50%}.van-switch--on{background-color:#1989fa;background-color:var(--switch-on-background-color,#1989fa)}.van-switch--on .van-switch__node{-webkit-transform:translateX(1em);transform:translateX(1em);-webkit-transform:translateX(calc(var(--switch-width, 2em) - var(--switch-node-size, 1em)));transform:translateX(calc(var(--switch-width, 2em) - var(--switch-node-size, 1em)))}.van-switch--disabled{opacity:.4;opacity:var(--switch-disabled-opacity,.4)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tab/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tab/index.js
new file mode 100644
index 00000000..554d9d5d
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tab/index.js
@@ -0,0 +1,61 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ relation: {
+ name: 'tabs',
+ type: 'ancestor',
+ current: 'tab',
+ },
+ props: {
+ dot: {
+ type: Boolean,
+ observer: 'update',
+ },
+ info: {
+ type: null,
+ observer: 'update',
+ },
+ title: {
+ type: String,
+ observer: 'update',
+ },
+ disabled: {
+ type: Boolean,
+ observer: 'update',
+ },
+ titleStyle: {
+ type: String,
+ observer: 'update',
+ },
+ name: {
+ type: [Number, String],
+ value: '',
+ },
+ },
+ data: {
+ active: false,
+ },
+ methods: {
+ getComputedName: function () {
+ if (this.data.name !== '') {
+ return this.data.name;
+ }
+ return this.index;
+ },
+ updateRender: function (active, parent) {
+ var parentData = parent.data;
+ this.inited = this.inited || active;
+ this.setData({
+ active: active,
+ shouldRender: this.inited || !parentData.lazyRender,
+ shouldShow: active || parentData.animated,
+ });
+ },
+ update: function () {
+ if (this.parent) {
+ this.parent.updateTabs();
+ }
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tab/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tab/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tab/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tab/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tab/index.wxml
new file mode 100644
index 00000000..f5e99f21
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tab/index.wxml
@@ -0,0 +1,8 @@
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tab/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tab/index.wxss
new file mode 100644
index 00000000..76ddf068
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tab/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';:host{-webkit-flex-shrink:0;flex-shrink:0;width:100%}.van-tab__pane,:host{box-sizing:border-box}.van-tab__pane{overflow-y:auto;-webkit-overflow-scrolling:touch}.van-tab__pane--active{height:auto}.van-tab__pane--inactive{height:0;overflow:visible}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabbar-item/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabbar-item/index.js
new file mode 100644
index 00000000..76e6e23e
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabbar-item/index.js
@@ -0,0 +1,50 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ props: {
+ info: null,
+ name: null,
+ icon: String,
+ dot: Boolean,
+ },
+ relation: {
+ name: 'tabbar',
+ type: 'ancestor',
+ current: 'tabbar-item',
+ },
+ data: {
+ active: false,
+ },
+ methods: {
+ onClick: function () {
+ if (this.parent) {
+ this.parent.onChange(this);
+ }
+ this.$emit('click');
+ },
+ updateFromParent: function () {
+ var parent = this.parent;
+ if (!parent) {
+ return;
+ }
+ var index = parent.children.indexOf(this);
+ var parentData = parent.data;
+ var data = this.data;
+ var active = (data.name || index) === parentData.active;
+ var patch = {};
+ if (active !== data.active) {
+ patch.active = active;
+ }
+ if (parentData.activeColor !== data.activeColor) {
+ patch.activeColor = parentData.activeColor;
+ }
+ if (parentData.inactiveColor !== data.inactiveColor) {
+ patch.inactiveColor = parentData.inactiveColor;
+ }
+ return Object.keys(patch).length > 0
+ ? this.set(patch)
+ : Promise.resolve();
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabbar-item/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabbar-item/index.json
new file mode 100644
index 00000000..16f174c5
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabbar-item/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index",
+ "van-info": "../info/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabbar-item/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabbar-item/index.wxml
new file mode 100644
index 00000000..d83b061f
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabbar-item/index.wxml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabbar-item/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabbar-item/index.wxss
new file mode 100644
index 00000000..85bb21cb
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabbar-item/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';:host{-webkit-flex:1;flex:1}.van-tabbar-item{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;height:100%;color:#646566;color:var(--tabbar-item-text-color,#646566);font-size:12px;font-size:var(--tabbar-item-font-size,12px);line-height:1;line-height:var(--tabbar-item-line-height,1)}.van-tabbar-item__icon{position:relative;margin-bottom:5px;margin-bottom:var(--tabbar-item-margin-bottom,5px);font-size:18px;font-size:var(--tabbar-item-icon-size,18px)}.van-tabbar-item__icon__inner{display:block;min-width:1em}.van-tabbar-item--active{color:#1989fa;color:var(--tabbar-item-active-color,#1989fa)}.van-tabbar-item__info{margin-top:2px}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabbar/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabbar/index.js
new file mode 100644
index 00000000..e485a336
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabbar/index.js
@@ -0,0 +1,67 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ relation: {
+ name: 'tabbar-item',
+ type: 'descendant',
+ current: 'tabbar',
+ linked: function (target) {
+ target.parent = this;
+ target.updateFromParent();
+ },
+ unlinked: function () {
+ this.updateChildren();
+ },
+ },
+ props: {
+ active: {
+ type: null,
+ observer: 'updateChildren',
+ },
+ activeColor: {
+ type: String,
+ observer: 'updateChildren',
+ },
+ inactiveColor: {
+ type: String,
+ observer: 'updateChildren',
+ },
+ fixed: {
+ type: Boolean,
+ value: true,
+ },
+ border: {
+ type: Boolean,
+ value: true,
+ },
+ zIndex: {
+ type: Number,
+ value: 1,
+ },
+ safeAreaInsetBottom: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ methods: {
+ updateChildren: function () {
+ var children = this.children;
+ if (!Array.isArray(children) || !children.length) {
+ return Promise.resolve();
+ }
+ return Promise.all(
+ children.map(function (child) {
+ return child.updateFromParent();
+ })
+ );
+ },
+ onChange: function (child) {
+ var index = this.children.indexOf(child);
+ var active = child.data.name || index;
+ if (active !== this.data.active) {
+ this.$emit('change', active);
+ }
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabbar/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabbar/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabbar/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabbar/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabbar/index.wxml
new file mode 100644
index 00000000..c49b9d98
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabbar/index.wxml
@@ -0,0 +1,8 @@
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabbar/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabbar/index.wxss
new file mode 100644
index 00000000..68195697
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabbar/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-tabbar{display:-webkit-flex;display:flex;box-sizing:initial;width:100%;height:50px;height:var(--tabbar-height,50px);background-color:#fff;background-color:var(--tabbar-background-color,#fff)}.van-tabbar--fixed{position:fixed;bottom:0;left:0}.van-tabbar--safe{padding-bottom:env(safe-area-inset-bottom)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabs/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabs/index.js
new file mode 100644
index 00000000..a2855c1b
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabs/index.js
@@ -0,0 +1,329 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var touch_1 = require('../mixins/touch');
+var utils_1 = require('../common/utils');
+component_1.VantComponent({
+ mixins: [touch_1.touch],
+ classes: ['nav-class', 'tab-class', 'tab-active-class', 'line-class'],
+ relation: {
+ name: 'tab',
+ type: 'descendant',
+ current: 'tabs',
+ linked: function (target) {
+ target.index = this.children.length - 1;
+ this.updateTabs();
+ },
+ unlinked: function () {
+ this.children = this.children.map(function (child, index) {
+ child.index = index;
+ return child;
+ });
+ this.updateTabs();
+ },
+ },
+ props: {
+ color: {
+ type: String,
+ observer: 'setLine',
+ },
+ sticky: Boolean,
+ animated: {
+ type: Boolean,
+ observer: function () {
+ var _this = this;
+ this.children.forEach(function (child, index) {
+ return child.updateRender(index === _this.data.currentIndex, _this);
+ });
+ },
+ },
+ swipeable: Boolean,
+ lineWidth: {
+ type: [String, Number],
+ value: -1,
+ observer: 'setLine',
+ },
+ lineHeight: {
+ type: [String, Number],
+ value: -1,
+ observer: 'setLine',
+ },
+ titleActiveColor: String,
+ titleInactiveColor: String,
+ active: {
+ type: [String, Number],
+ value: 0,
+ observer: function (name) {
+ if (name !== this.getCurrentName()) {
+ this.setCurrentIndexByName(name);
+ }
+ },
+ },
+ type: {
+ type: String,
+ value: 'line',
+ },
+ border: {
+ type: Boolean,
+ value: true,
+ },
+ ellipsis: {
+ type: Boolean,
+ value: true,
+ },
+ duration: {
+ type: Number,
+ value: 0.3,
+ },
+ zIndex: {
+ type: Number,
+ value: 1,
+ },
+ swipeThreshold: {
+ type: Number,
+ value: 4,
+ observer: function (value) {
+ this.setData({
+ scrollable: this.children.length > value || !this.data.ellipsis,
+ });
+ },
+ },
+ offsetTop: {
+ type: Number,
+ value: 0,
+ },
+ lazyRender: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ data: {
+ tabs: [],
+ lineStyle: '',
+ scrollLeft: 0,
+ scrollable: false,
+ trackStyle: '',
+ currentIndex: null,
+ container: null,
+ },
+ mounted: function () {
+ var _this = this;
+ wx.nextTick(function () {
+ _this.setLine(true);
+ _this.scrollIntoView();
+ });
+ },
+ methods: {
+ updateContainer: function () {
+ var _this = this;
+ this.setData({
+ container: function () {
+ return _this.createSelectorQuery().select('.van-tabs');
+ },
+ });
+ },
+ updateTabs: function () {
+ var _a = this,
+ _b = _a.children,
+ children = _b === void 0 ? [] : _b,
+ data = _a.data;
+ this.setData({
+ tabs: children.map(function (child) {
+ return child.data;
+ }),
+ scrollable:
+ this.children.length > data.swipeThreshold || !data.ellipsis,
+ });
+ this.setCurrentIndexByName(this.getCurrentName() || data.active);
+ },
+ trigger: function (eventName, child) {
+ var currentIndex = this.data.currentIndex;
+ var currentChild = child || this.children[currentIndex];
+ if (!utils_1.isDef(currentChild)) {
+ return;
+ }
+ this.$emit(eventName, {
+ index: currentChild.index,
+ name: currentChild.getComputedName(),
+ title: currentChild.data.title,
+ });
+ },
+ onTap: function (event) {
+ var _this = this;
+ var index = event.currentTarget.dataset.index;
+ var child = this.children[index];
+ if (child.data.disabled) {
+ this.trigger('disabled', child);
+ } else {
+ this.setCurrentIndex(index);
+ wx.nextTick(function () {
+ _this.trigger('click');
+ });
+ }
+ },
+ // correct the index of active tab
+ setCurrentIndexByName: function (name) {
+ var _a = this.children,
+ children = _a === void 0 ? [] : _a;
+ var matched = children.filter(function (child) {
+ return child.getComputedName() === name;
+ });
+ if (matched.length) {
+ this.setCurrentIndex(matched[0].index);
+ }
+ },
+ setCurrentIndex: function (currentIndex) {
+ var _this = this;
+ var _a = this,
+ data = _a.data,
+ _b = _a.children,
+ children = _b === void 0 ? [] : _b;
+ if (
+ !utils_1.isDef(currentIndex) ||
+ currentIndex >= children.length ||
+ currentIndex < 0
+ ) {
+ return;
+ }
+ children.forEach(function (item, index) {
+ var active = index === currentIndex;
+ if (active !== item.data.active || !item.inited) {
+ item.updateRender(active, _this);
+ }
+ });
+ if (currentIndex === data.currentIndex) {
+ return;
+ }
+ var shouldEmitChange = data.currentIndex !== null;
+ this.setData({ currentIndex: currentIndex });
+ wx.nextTick(function () {
+ _this.setLine();
+ _this.scrollIntoView();
+ _this.updateContainer();
+ _this.trigger('input');
+ if (shouldEmitChange) {
+ _this.trigger('change');
+ }
+ });
+ },
+ getCurrentName: function () {
+ var activeTab = this.children[this.data.currentIndex];
+ if (activeTab) {
+ return activeTab.getComputedName();
+ }
+ },
+ setLine: function (skipTransition) {
+ var _this = this;
+ if (this.data.type !== 'line') {
+ return;
+ }
+ var _a = this.data,
+ color = _a.color,
+ duration = _a.duration,
+ currentIndex = _a.currentIndex,
+ lineWidth = _a.lineWidth,
+ lineHeight = _a.lineHeight;
+ this.getRect('.van-tab', true).then(function (rects) {
+ if (rects === void 0) {
+ rects = [];
+ }
+ var rect = rects[currentIndex];
+ if (rect == null) {
+ return;
+ }
+ var width = lineWidth !== -1 ? lineWidth : rect.width / 2;
+ var height =
+ lineHeight !== -1
+ ? 'height: ' +
+ utils_1.addUnit(lineHeight) +
+ '; border-radius: ' +
+ utils_1.addUnit(lineHeight) +
+ ';'
+ : '';
+ var left = rects.slice(0, currentIndex).reduce(function (prev, curr) {
+ return prev + curr.width;
+ }, 0);
+ left += (rect.width - width) / 2;
+ var transition = skipTransition
+ ? ''
+ : 'transition-duration: ' +
+ duration +
+ 's; -webkit-transition-duration: ' +
+ duration +
+ 's;';
+ _this.setData({
+ lineStyle:
+ '\n ' +
+ height +
+ '\n width: ' +
+ utils_1.addUnit(width) +
+ ';\n background-color: ' +
+ color +
+ ';\n -webkit-transform: translateX(' +
+ left +
+ 'px);\n transform: translateX(' +
+ left +
+ 'px);\n ' +
+ transition +
+ '\n ',
+ });
+ });
+ },
+ // scroll active tab into view
+ scrollIntoView: function () {
+ var _this = this;
+ var _a = this.data,
+ currentIndex = _a.currentIndex,
+ scrollable = _a.scrollable;
+ if (!scrollable) {
+ return;
+ }
+ Promise.all([
+ this.getRect('.van-tab', true),
+ this.getRect('.van-tabs__nav'),
+ ]).then(function (_a) {
+ var tabRects = _a[0],
+ navRect = _a[1];
+ var tabRect = tabRects[currentIndex];
+ var offsetLeft = tabRects
+ .slice(0, currentIndex)
+ .reduce(function (prev, curr) {
+ return prev + curr.width;
+ }, 0);
+ _this.setData({
+ scrollLeft: offsetLeft - (navRect.width - tabRect.width) / 2,
+ });
+ });
+ },
+ onTouchScroll: function (event) {
+ this.$emit('scroll', event.detail);
+ },
+ onTouchStart: function (event) {
+ if (!this.data.swipeable) return;
+ this.touchStart(event);
+ },
+ onTouchMove: function (event) {
+ if (!this.data.swipeable) return;
+ this.touchMove(event);
+ },
+ // watch swipe touch end
+ onTouchEnd: function () {
+ if (!this.data.swipeable) return;
+ var _a = this.data,
+ tabs = _a.tabs,
+ currentIndex = _a.currentIndex;
+ var _b = this,
+ direction = _b.direction,
+ deltaX = _b.deltaX,
+ offsetX = _b.offsetX;
+ var minSwipeDistance = 50;
+ if (direction === 'horizontal' && offsetX >= minSwipeDistance) {
+ if (deltaX > 0 && currentIndex !== 0) {
+ this.setCurrentIndex(currentIndex - 1);
+ } else if (deltaX < 0 && currentIndex !== tabs.length - 1) {
+ this.setCurrentIndex(currentIndex + 1);
+ }
+ }
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabs/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabs/index.json
new file mode 100644
index 00000000..19c0bc3a
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabs/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-info": "../info/index",
+ "van-sticky": "../sticky/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabs/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabs/index.wxml
new file mode 100644
index 00000000..99ac4118
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabs/index.wxml
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.title }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabs/index.wxs b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabs/index.wxs
new file mode 100644
index 00000000..88bcafd3
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabs/index.wxs
@@ -0,0 +1,78 @@
+/* eslint-disable */
+function tabClass(active, ellipsis) {
+ var classes = ['tab-class'];
+
+ if (active) {
+ classes.push('tab-active-class');
+ }
+
+ if (ellipsis) {
+ classes.push('van-ellipsis');
+ }
+
+ return classes.join(' ');
+}
+
+function tabStyle(
+ active,
+ ellipsis,
+ color,
+ type,
+ disabled,
+ activeColor,
+ inactiveColor,
+ swipeThreshold,
+ scrollable
+) {
+ var styles = [];
+ var isCard = type === 'card';
+ // card theme color
+ if (color && isCard) {
+ styles.push('border-color:' + color);
+
+ if (!disabled) {
+ if (active) {
+ styles.push('background-color:' + color);
+ } else {
+ styles.push('color:' + color);
+ }
+ }
+ }
+
+ var titleColor = active ? activeColor : inactiveColor;
+ if (titleColor) {
+ styles.push('color:' + titleColor);
+ }
+
+ if (scrollable && ellipsis) {
+ styles.push('flex-basis:' + 88 / swipeThreshold + '%');
+ }
+
+ return styles.join(';');
+}
+
+function tabCardTypeBorderStyle(color, type) {
+ var isCard = type === 'card';
+ var styles = [];
+ if (isCard && color) {
+ styles.push('border-color:' + color);
+ }
+ return styles.join(';');
+}
+
+function trackStyle(data) {
+ if (!data.animated) {
+ return '';
+ }
+
+ return [
+ 'transform: translate3d(' + -100 * data.currentIndex + '%, 0, 0)',
+ '-webkit-transition-duration: ' + data.duration + 's',
+ 'transition-duration: ' + data.duration + 's'
+ ].join(';');
+}
+
+module.exports.tabClass = tabClass;
+module.exports.tabStyle = tabStyle;
+module.exports.trackStyle = trackStyle;
+module.exports.tabCardTypeBorderStyle = tabCardTypeBorderStyle;
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabs/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabs/index.wxss
new file mode 100644
index 00000000..623405dc
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tabs/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-tabs{position:relative;-webkit-tap-highlight-color:transparent}.van-tabs__wrap{display:-webkit-flex;display:flex;overflow:hidden}.van-tabs__wrap--scrollable .van-tab{-webkit-flex:0 0 22%;flex:0 0 22%}.van-tabs__scroll{background-color:#fff;background-color:var(--tabs-nav-background-color,#fff)}.van-tabs__scroll--line{box-sizing:initial;height:calc(100% + 15px)}.van-tabs__scroll--card{margin:0 16px;margin:0 var(--padding-md,16px)}.van-tabs__scroll::-webkit-scrollbar{display:none}.van-tabs__nav{position:relative;display:-webkit-flex;display:flex;-webkit-user-select:none;user-select:none}.van-tabs__nav--card{box-sizing:border-box;height:30px;height:var(--tabs-card-height,30px);border:1px solid #ee0a24;border:var(--border-width-base,1px) solid var(--tabs-default-color,#ee0a24);border-radius:2px;border-radius:var(--border-radius-sm,2px)}.van-tabs__nav--card .van-tab{color:#ee0a24;color:var(--tabs-default-color,#ee0a24);line-height:28px;line-height:calc(var(--tabs-card-height, 30px) - 2*var(--border-width-base, 1px));border-right:1px solid #ee0a24;border-right:var(--border-width-base,1px) solid var(--tabs-default-color,#ee0a24)}.van-tabs__nav--card .van-tab:last-child{border-right:none}.van-tabs__nav--card .van-tab.van-tab--active{color:#fff;color:var(--white,#fff);background-color:#ee0a24;background-color:var(--tabs-default-color,#ee0a24)}.van-tabs__nav--card .van-tab--disabled{color:#c8c9cc;color:var(--tab-disabled-text-color,#c8c9cc)}.van-tabs__line{position:absolute;bottom:0;left:0;z-index:1;height:3px;height:var(--tabs-bottom-bar-height,3px);border-radius:3px;border-radius:var(--tabs-bottom-bar-height,3px);background-color:#ee0a24;background-color:var(--tabs-bottom-bar-color,#ee0a24)}.van-tabs__track{position:relative;width:100%;height:100%}.van-tabs__track--animated{display:-webkit-flex;display:flex;transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform}.van-tabs__content{overflow:hidden}.van-tabs--line .van-tabs__wrap{height:44px;height:var(--tabs-line-height,44px)}.van-tabs--card .van-tabs__wrap{height:30px;height:var(--tabs-card-height,30px)}.van-tab{position:relative;-webkit-flex:1;flex:1;box-sizing:border-box;min-width:0;padding:0 5px;text-align:center;cursor:pointer;color:#646566;color:var(--tab-text-color,#646566);font-size:14px;font-size:var(--tab-font-size,14px);line-height:44px;line-height:var(--tabs-line-height,44px)}.van-tab--active{font-weight:500;font-weight:var(--font-weight-bold,500);color:#323233;color:var(--tab-active-text-color,#323233)}.van-tab--disabled{color:#c8c9cc;color:var(--tab-disabled-text-color,#c8c9cc)}.van-tab--complete{-webkit-flex:1 0 auto!important;flex:1 0 auto!important}.van-tab__title__info{position:relative!important;top:-1px!important;display:inline-block;-webkit-transform:translateX(0)!important;transform:translateX(0)!important}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tag/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tag/index.js
new file mode 100644
index 00000000..b51d3fbb
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tag/index.js
@@ -0,0 +1,23 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ props: {
+ size: String,
+ mark: Boolean,
+ color: String,
+ plain: Boolean,
+ round: Boolean,
+ textColor: String,
+ type: {
+ type: String,
+ value: 'default',
+ },
+ closeable: Boolean,
+ },
+ methods: {
+ onClose: function () {
+ this.$emit('close');
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tag/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tag/index.json
new file mode 100644
index 00000000..0a336c08
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tag/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tag/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tag/index.wxml
new file mode 100644
index 00000000..8c786865
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tag/index.wxml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tag/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tag/index.wxss
new file mode 100644
index 00000000..0615a993
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tag/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-tag{display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:center;align-items:center;line-height:normal;padding:.2em .5em;padding:var(--tag-padding,.2em .5em);color:#fff;color:var(--tag-text-color,#fff);font-size:10px;font-size:var(--tag-font-size,10px);border-radius:.2em;border-radius:var(--tag-border-radius,.2em)}.van-tag:after{border-color:currentColor;border-radius:.2em * 2;border-radius:var(--tag-border-radius,.2em) * 2}.van-tag--default{background-color:#969799;background-color:var(--tag-default-color,#969799)}.van-tag--default.van-tag--plain{color:#969799;color:var(--tag-default-color,#969799)}.van-tag--danger{background-color:#ee0a24;background-color:var(--tag-danger-color,#ee0a24)}.van-tag--danger.van-tag--plain{color:#ee0a24;color:var(--tag-danger-color,#ee0a24)}.van-tag--primary{background-color:#1989fa;background-color:var(--tag-primary-color,#1989fa)}.van-tag--primary.van-tag--plain{color:#1989fa;color:var(--tag-primary-color,#1989fa)}.van-tag--success{background-color:#07c160;background-color:var(--tag-success-color,#07c160)}.van-tag--success.van-tag--plain{color:#07c160;color:var(--tag-success-color,#07c160)}.van-tag--warning{background-color:#ff976a;background-color:var(--tag-warning-color,#ff976a)}.van-tag--warning.van-tag--plain{color:#ff976a;color:var(--tag-warning-color,#ff976a)}.van-tag--plain{background-color:#fff;background-color:var(--tag-plain-background-color,#fff)}.van-tag--mark{padding-right:.7em}.van-tag--mark,.van-tag--mark:after{border-radius:0 999px 999px 0;border-radius:0 var(--tag-round-border-radius,999px) var(--tag-round-border-radius,999px) 0}.van-tag--round,.van-tag--round:after{border-radius:999px;border-radius:var(--tag-round-border-radius,999px)}.van-tag--medium{font-size:12px;font-size:var(--tag-medium-font-size,12px)}.van-tag--large{font-size:14px;font-size:var(--tag-large-font-size,14px)}.van-tag__close{margin-left:2px}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/toast/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/toast/index.js
new file mode 100644
index 00000000..da703bb5
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/toast/index.js
@@ -0,0 +1,31 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ props: {
+ show: Boolean,
+ mask: Boolean,
+ message: String,
+ forbidClick: Boolean,
+ zIndex: {
+ type: Number,
+ value: 1000,
+ },
+ type: {
+ type: String,
+ value: 'text',
+ },
+ loadingType: {
+ type: String,
+ value: 'circular',
+ },
+ position: {
+ type: String,
+ value: 'middle',
+ },
+ },
+ methods: {
+ // for prevent touchmove
+ noop: function () {},
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/toast/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/toast/index.json
new file mode 100644
index 00000000..9b1b78c4
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/toast/index.json
@@ -0,0 +1,9 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index",
+ "van-loading": "../loading/index",
+ "van-overlay": "../overlay/index",
+ "van-transition": "../transition/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/toast/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/toast/index.wxml
new file mode 100644
index 00000000..635e7d61
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/toast/index.wxml
@@ -0,0 +1,33 @@
+
+
+
+
+ {{ message }}
+
+
+
+
+
+ {{ message }}
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/toast/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/toast/index.wxss
new file mode 100644
index 00000000..da946c9b
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/toast/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-toast{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:initial;color:#fff;color:var(--toast-text-color,#fff);font-size:14px;font-size:var(--toast-font-size,14px);line-height:20px;line-height:var(--toast-line-height,20px);white-space:pre-wrap;word-wrap:break-word;background-color:rgba(50,50,51,.88);background-color:var(--toast-background-color,rgba(50,50,51,.88));border-radius:4px;border-radius:var(--toast-border-radius,4px)}.van-toast__container{position:fixed;top:50%;left:50%;width:-webkit-fit-content;width:fit-content;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);max-width:70%;max-width:var(--toast-max-width,70%)}.van-toast--text{min-width:96px;min-width:var(--toast-text-min-width,96px);padding:8px 12px;padding:var(--toast-text-padding,8px 12px)}.van-toast--icon{width:90px;width:var(--toast-default-width,90px);min-height:90px;min-height:var(--toast-default-min-height,90px);padding:16px;padding:var(--toast-default-padding,16px)}.van-toast--icon .van-toast__icon{font-size:48px;font-size:var(--toast-icon-size,48px)}.van-toast--icon .van-toast__text{padding-top:8px}.van-toast__loading{margin:10px 0}.van-toast--top{-webkit-transform:translateY(-30vh);transform:translateY(-30vh)}.van-toast--bottom{-webkit-transform:translateY(30vh);transform:translateY(30vh)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/toast/toast.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/toast/toast.js
new file mode 100644
index 00000000..96c5d119
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/toast/toast.js
@@ -0,0 +1,92 @@
+'use strict';
+var __assign =
+ (this && this.__assign) ||
+ function () {
+ __assign =
+ Object.assign ||
+ function (t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s)
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+ }
+ return t;
+ };
+ return __assign.apply(this, arguments);
+ };
+Object.defineProperty(exports, '__esModule', { value: true });
+var utils_1 = require('../common/utils');
+var defaultOptions = {
+ type: 'text',
+ mask: false,
+ message: '',
+ show: true,
+ zIndex: 1000,
+ duration: 2000,
+ position: 'middle',
+ forbidClick: false,
+ loadingType: 'circular',
+ selector: '#van-toast',
+};
+var queue = [];
+var currentOptions = __assign({}, defaultOptions);
+function parseOptions(message) {
+ return utils_1.isObj(message) ? message : { message: message };
+}
+function getContext() {
+ var pages = getCurrentPages();
+ return pages[pages.length - 1];
+}
+function Toast(toastOptions) {
+ var options = __assign(
+ __assign({}, currentOptions),
+ parseOptions(toastOptions)
+ );
+ var context = options.context || getContext();
+ var toast = context.selectComponent(options.selector);
+ if (!toast) {
+ console.warn('未找到 van-toast 节点,请确认 selector 及 context 是否正确');
+ return;
+ }
+ delete options.context;
+ delete options.selector;
+ toast.clear = function () {
+ toast.setData({ show: false });
+ if (options.onClose) {
+ options.onClose();
+ }
+ };
+ queue.push(toast);
+ toast.setData(options);
+ clearTimeout(toast.timer);
+ if (options.duration > 0) {
+ toast.timer = setTimeout(function () {
+ toast.clear();
+ queue = queue.filter(function (item) {
+ return item !== toast;
+ });
+ }, options.duration);
+ }
+ return toast;
+}
+var createMethod = function (type) {
+ return function (options) {
+ return Toast(__assign({ type: type }, parseOptions(options)));
+ };
+};
+Toast.loading = createMethod('loading');
+Toast.success = createMethod('success');
+Toast.fail = createMethod('fail');
+Toast.clear = function () {
+ queue.forEach(function (toast) {
+ toast.clear();
+ });
+ queue = [];
+};
+Toast.setDefaultOptions = function (options) {
+ Object.assign(currentOptions, options);
+};
+Toast.resetDefaultOptions = function () {
+ currentOptions = __assign({}, defaultOptions);
+};
+exports.default = Toast;
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/transition/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/transition/index.js
new file mode 100644
index 00000000..f3c96e42
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/transition/index.js
@@ -0,0 +1,15 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var transition_1 = require('../mixins/transition');
+component_1.VantComponent({
+ classes: [
+ 'enter-class',
+ 'enter-active-class',
+ 'enter-to-class',
+ 'leave-class',
+ 'leave-active-class',
+ 'leave-to-class',
+ ],
+ mixins: [transition_1.transition(true)],
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/transition/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/transition/index.json
new file mode 100644
index 00000000..467ce294
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/transition/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/transition/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/transition/index.wxml
new file mode 100644
index 00000000..412e8afc
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/transition/index.wxml
@@ -0,0 +1,8 @@
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/transition/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/transition/index.wxss
new file mode 100644
index 00000000..d459f5c1
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/transition/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-transition{transition-timing-function:ease}.van-fade-enter-active,.van-fade-leave-active{transition-property:opacity}.van-fade-enter,.van-fade-leave-to{opacity:0}.van-fade-down-enter-active,.van-fade-down-leave-active,.van-fade-left-enter-active,.van-fade-left-leave-active,.van-fade-right-enter-active,.van-fade-right-leave-active,.van-fade-up-enter-active,.van-fade-up-leave-active{transition-property:opacity,-webkit-transform;transition-property:opacity,transform;transition-property:opacity,transform,-webkit-transform}.van-fade-up-enter,.van-fade-up-leave-to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);opacity:0}.van-fade-down-enter,.van-fade-down-leave-to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);opacity:0}.van-fade-left-enter,.van-fade-left-leave-to{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);opacity:0}.van-fade-right-enter,.van-fade-right-leave-to{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);opacity:0}.van-slide-down-enter-active,.van-slide-down-leave-active,.van-slide-left-enter-active,.van-slide-left-leave-active,.van-slide-right-enter-active,.van-slide-right-leave-active,.van-slide-up-enter-active,.van-slide-up-leave-active{transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform}.van-slide-up-enter,.van-slide-up-leave-to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.van-slide-down-enter,.van-slide-down-leave-to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.van-slide-left-enter,.van-slide-left-leave-to{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.van-slide-right-enter,.van-slide-right-leave-to{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tree-select/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tree-select/index.js
new file mode 100644
index 00000000..67b5422f
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tree-select/index.js
@@ -0,0 +1,69 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+component_1.VantComponent({
+ classes: [
+ 'main-item-class',
+ 'content-item-class',
+ 'main-active-class',
+ 'content-active-class',
+ 'main-disabled-class',
+ 'content-disabled-class',
+ ],
+ props: {
+ items: {
+ type: Array,
+ observer: 'updateSubItems',
+ },
+ activeId: null,
+ mainActiveIndex: {
+ type: Number,
+ value: 0,
+ observer: 'updateSubItems',
+ },
+ height: {
+ type: [Number, String],
+ value: 300,
+ },
+ max: {
+ type: Number,
+ value: Infinity,
+ },
+ },
+ data: {
+ subItems: [],
+ },
+ methods: {
+ // 当一个子项被选择时
+ onSelectItem: function (event) {
+ var item = event.currentTarget.dataset.item;
+ var isArray = Array.isArray(this.data.activeId);
+ // 判断有没有超出右侧选择的最大数
+ var isOverMax = isArray && this.data.activeId.length >= this.data.max;
+ // 判断该项有没有被选中, 如果有被选中,则忽视是否超出的条件
+ var isSelected = isArray
+ ? this.data.activeId.indexOf(item.id) > -1
+ : this.data.activeId === item.id;
+ if (!item.disabled && (!isOverMax || isSelected)) {
+ this.$emit('click-item', item);
+ }
+ },
+ // 当一个导航被点击时
+ onClickNav: function (event) {
+ var index = event.detail;
+ var item = this.data.items[index];
+ if (!item.disabled) {
+ this.$emit('click-nav', { index: index });
+ }
+ },
+ // 更新子项列表
+ updateSubItems: function () {
+ var _a = this.data,
+ items = _a.items,
+ mainActiveIndex = _a.mainActiveIndex;
+ var _b = (items[mainActiveIndex] || {}).children,
+ children = _b === void 0 ? [] : _b;
+ return this.set({ subItems: children });
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tree-select/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tree-select/index.json
new file mode 100644
index 00000000..42991a2a
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tree-select/index.json
@@ -0,0 +1,8 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index",
+ "van-sidebar": "../sidebar/index",
+ "van-sidebar-item": "../sidebar-item/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tree-select/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tree-select/index.wxml
new file mode 100644
index 00000000..547a94af
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tree-select/index.wxml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.text }}
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tree-select/index.wxs b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tree-select/index.wxs
new file mode 100644
index 00000000..b1cbb39b
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tree-select/index.wxs
@@ -0,0 +1,12 @@
+/* eslint-disable */
+var array = require('../wxs/array.wxs');
+
+function isActive (activeList, itemId) {
+ if (array.isArray(activeList)) {
+ return activeList.indexOf(itemId) > -1;
+ }
+
+ return activeList === itemId;
+}
+
+module.exports.isActive = isActive;
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tree-select/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tree-select/index.wxss
new file mode 100644
index 00000000..3f7cca67
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/tree-select/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-tree-select{position:relative;display:-webkit-flex;display:flex;-webkit-user-select:none;user-select:none;font-size:14px;font-size:var(--tree-select-font-size,14px)}.van-tree-select__nav{-webkit-flex:1;flex:1;background-color:#f7f8fa;background-color:var(--tree-select-nav-background-color,#f7f8fa);--sidebar-padding:12px 8px 12px 12px}.van-tree-select__nav__inner{width:100%!important;height:100%}.van-tree-select__content{-webkit-flex:2;flex:2;background-color:#fff;background-color:var(--tree-select-content-background-color,#fff)}.van-tree-select__item{position:relative;font-weight:700;padding:0 32px 0 16px;padding:0 32px 0 var(--padding-md,16px);line-height:44px;line-height:var(--tree-select-item-height,44px)}.van-tree-select__item--active{color:#ee0a24;color:var(--tree-select-item-active-color,#ee0a24)}.van-tree-select__item--disabled{color:#c8c9cc;color:var(--tree-select-item-disabled-color,#c8c9cc)}.van-tree-select__selected{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);right:16px;right:var(--padding-md,16px)}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/uploader/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/uploader/index.js
new file mode 100644
index 00000000..56c03d65
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/uploader/index.js
@@ -0,0 +1,226 @@
+'use strict';
+var __assign =
+ (this && this.__assign) ||
+ function () {
+ __assign =
+ Object.assign ||
+ function (t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s)
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+ }
+ return t;
+ };
+ return __assign.apply(this, arguments);
+ };
+Object.defineProperty(exports, '__esModule', { value: true });
+var component_1 = require('../common/component');
+var utils_1 = require('./utils');
+var shared_1 = require('./shared');
+component_1.VantComponent({
+ props: __assign(
+ __assign(
+ {
+ disabled: Boolean,
+ multiple: Boolean,
+ uploadText: String,
+ useBeforeRead: Boolean,
+ afterRead: null,
+ beforeRead: null,
+ previewSize: {
+ type: null,
+ value: 90,
+ },
+ name: {
+ type: [Number, String],
+ value: '',
+ },
+ accept: {
+ type: String,
+ value: 'image',
+ },
+ fileList: {
+ type: Array,
+ value: [],
+ observer: 'formatFileList',
+ },
+ maxSize: {
+ type: Number,
+ value: Number.MAX_VALUE,
+ },
+ maxCount: {
+ type: Number,
+ value: 100,
+ },
+ deletable: {
+ type: Boolean,
+ value: true,
+ },
+ showUpload: {
+ type: Boolean,
+ value: true,
+ },
+ previewImage: {
+ type: Boolean,
+ value: true,
+ },
+ previewFullImage: {
+ type: Boolean,
+ value: true,
+ },
+ imageFit: {
+ type: String,
+ value: 'scaleToFill',
+ },
+ uploadIcon: {
+ type: String,
+ value: 'photograph',
+ },
+ },
+ shared_1.chooseImageProps
+ ),
+ shared_1.chooseVideoProps
+ ),
+ data: {
+ lists: [],
+ isInCount: true,
+ },
+ methods: {
+ formatFileList: function () {
+ var _a = this.data,
+ _b = _a.fileList,
+ fileList = _b === void 0 ? [] : _b,
+ maxCount = _a.maxCount;
+ var lists = fileList.map(function (item) {
+ return __assign(__assign({}, item), {
+ isImage:
+ typeof item.isImage === 'undefined'
+ ? utils_1.isImageFile(item)
+ : item.isImage,
+ deletable:
+ typeof item.deletable === 'undefined' ? true : item.deletable,
+ });
+ });
+ this.setData({ lists: lists, isInCount: lists.length < maxCount });
+ },
+ getDetail: function (index) {
+ return {
+ name: this.data.name,
+ index: index == null ? this.data.fileList.length : index,
+ };
+ },
+ startUpload: function () {
+ var _this = this;
+ var _a = this.data,
+ maxCount = _a.maxCount,
+ multiple = _a.multiple,
+ accept = _a.accept,
+ lists = _a.lists,
+ disabled = _a.disabled;
+ if (disabled) return;
+ utils_1
+ .chooseFile(
+ __assign(__assign({}, this.data), {
+ maxCount: maxCount - lists.length,
+ })
+ )
+ .then(function (res) {
+ var file = null;
+ if (utils_1.isVideo(res, accept)) {
+ file = __assign({ path: res.tempFilePath }, res);
+ } else {
+ file = multiple ? res.tempFiles : res.tempFiles[0];
+ }
+ _this.onBeforeRead(file);
+ })
+ .catch(function (error) {
+ _this.$emit('error', error);
+ });
+ },
+ onBeforeRead: function (file) {
+ var _this = this;
+ var _a = this.data,
+ beforeRead = _a.beforeRead,
+ useBeforeRead = _a.useBeforeRead;
+ var res = true;
+ if (typeof beforeRead === 'function') {
+ res = beforeRead(file, this.getDetail());
+ }
+ if (useBeforeRead) {
+ res = new Promise(function (resolve, reject) {
+ _this.$emit(
+ 'before-read',
+ __assign(__assign({ file: file }, _this.getDetail()), {
+ callback: function (ok) {
+ ok ? resolve() : reject();
+ },
+ })
+ );
+ });
+ }
+ if (!res) {
+ return;
+ }
+ if (utils_1.isPromise(res)) {
+ res.then(function (data) {
+ return _this.onAfterRead(data || file);
+ });
+ } else {
+ this.onAfterRead(file);
+ }
+ },
+ onAfterRead: function (file) {
+ var maxSize = this.data.maxSize;
+ var oversize = Array.isArray(file)
+ ? file.some(function (item) {
+ return item.size > maxSize;
+ })
+ : file.size > maxSize;
+ if (oversize) {
+ this.$emit('oversize', __assign({ file: file }, this.getDetail()));
+ return;
+ }
+ if (typeof this.data.afterRead === 'function') {
+ this.data.afterRead(file, this.getDetail());
+ }
+ this.$emit('after-read', __assign({ file: file }, this.getDetail()));
+ },
+ deleteItem: function (event) {
+ var index = event.currentTarget.dataset.index;
+ this.$emit(
+ 'delete',
+ __assign(__assign({}, this.getDetail(index)), {
+ file: this.data.fileList[index],
+ })
+ );
+ },
+ onPreviewImage: function (event) {
+ if (!this.data.previewFullImage) return;
+ var index = event.currentTarget.dataset.index;
+ var lists = this.data.lists;
+ var item = lists[index];
+ wx.previewImage({
+ urls: lists
+ .filter(function (item) {
+ return item.isImage;
+ })
+ .map(function (item) {
+ return item.url || item.path;
+ }),
+ current: item.url || item.path,
+ fail: function () {
+ wx.showToast({ title: '预览图片失败', icon: 'none' });
+ },
+ });
+ },
+ onClickPreview: function (event) {
+ var index = event.currentTarget.dataset.index;
+ var item = this.data.lists[index];
+ this.$emit(
+ 'click-preview',
+ __assign(__assign({}, item), this.getDetail(index))
+ );
+ },
+ },
+});
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/uploader/index.json b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/uploader/index.json
new file mode 100644
index 00000000..e00a5887
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/uploader/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "../icon/index",
+ "van-loading": "../loading/index"
+ }
+}
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/uploader/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/uploader/index.wxml
new file mode 100644
index 00000000..76f710ff
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/uploader/index.wxml
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+
+
+ {{ item.name || item.url || item.path }}
+
+
+
+
+ {{ item.message }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ uploadText }}
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/uploader/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/uploader/index.wxss
new file mode 100644
index 00000000..d70b7a4c
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/uploader/index.wxss
@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-uploader{position:relative;display:inline-block}.van-uploader__wrapper{display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap}.van-uploader__slot:empty{display:none}.van-uploader__slot:not(:empty)+.van-uploader__upload{display:none!important}.van-uploader__upload{position:relative;display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;width:80px;height:80px;margin:0 8px 8px 0;background-color:#f7f8fa;border-radius:8px}.van-uploader__upload:active{background-color:#28345a}.van-uploader__upload-icon{color:#dcdee0;font-size:24px}.van-uploader__upload-text{margin-top:8px;color:#eee;font-size:12px}.van-uploader__upload--disabled{opacity:.5;opacity:var(--uploader-disabled-opacity,.5)}.van-uploader__preview{position:relative;margin:0 8px 8px 0;cursor:pointer}.van-uploader__preview-image{display:block;width:80px;height:80px;overflow:hidden;border-radius:8px}.van-uploader__preview-delete{position:absolute;top:0;right:0;z-index:1;display:-webkit-flex;display:flex;padding:10px;border-radius:50%;-webkit-transform:translate(50%,-50%);transform:translate(50%,-50%)}.van-uploader__preview-delete__icon{color:#969799;font-size:18px;background-color:#fff;border-radius:50%}.van-uploader__file{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;width:80px;height:80px;background-color:#f7f8fa;border-radius:8px}.van-uploader__file-icon{color:#646566;font-size:20px}.van-uploader__file-name{box-sizing:border-box;width:100%;margin-top:8px;padding:0 4px;color:#646566;font-size:12px;text-align:center}.van-uploader__mask{position:absolute;top:0;right:0;bottom:0;left:0;display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;color:#fff;background-color:rgba(50,50,51,.88);border-radius:8px}.van-uploader__mask-icon{font-size:22px}.van-uploader__mask-message{margin-top:6px;padding:0 4px;font-size:12px;line-height:14px}.van-uploader__loading{width:22px;height:22px;color:#28345a}.bg_c{background-color: #28345a;}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/uploader/shared.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/uploader/shared.js
new file mode 100644
index 00000000..94186186
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/uploader/shared.js
@@ -0,0 +1,33 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.chooseVideoProps = exports.chooseImageProps = void 0;
+// props for choose image
+exports.chooseImageProps = {
+ sizeType: {
+ type: Array,
+ value: ['original', 'compressed'],
+ },
+ capture: {
+ type: Array,
+ value: ['album', 'camera'],
+ },
+};
+// props for choose video
+exports.chooseVideoProps = {
+ capture: {
+ type: Array,
+ value: ['album', 'camera'],
+ },
+ compressed: {
+ type: Boolean,
+ value: true,
+ },
+ maxDuration: {
+ type: Number,
+ value: 60,
+ },
+ camera: {
+ type: String,
+ value: 'back',
+ },
+};
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/uploader/utils.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/uploader/utils.js
new file mode 100644
index 00000000..082374e3
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/uploader/utils.js
@@ -0,0 +1,91 @@
+'use strict';
+Object.defineProperty(exports, '__esModule', { value: true });
+exports.isPromise = exports.isObject = exports.isFunction = exports.chooseFile = exports.isVideo = exports.isImageFile = void 0;
+var IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
+function isImageUrl(url) {
+ return IMAGE_REGEXP.test(url);
+}
+function isImageFile(item) {
+ if (item.type) {
+ return item.type.indexOf('image') === 0;
+ }
+ if (item.path) {
+ return isImageUrl(item.path);
+ }
+ if (item.url) {
+ return isImageUrl(item.url);
+ }
+ return false;
+}
+exports.isImageFile = isImageFile;
+function isVideo(res, accept) {
+ return accept === 'video';
+}
+exports.isVideo = isVideo;
+function chooseFile(_a) {
+ var accept = _a.accept,
+ multiple = _a.multiple,
+ capture = _a.capture,
+ compressed = _a.compressed,
+ maxDuration = _a.maxDuration,
+ sizeType = _a.sizeType,
+ camera = _a.camera,
+ maxCount = _a.maxCount;
+ switch (accept) {
+ case 'image':
+ return new Promise(function (resolve, reject) {
+ wx.chooseImage({
+ count: multiple ? Math.min(maxCount, 9) : 1,
+ sourceType: capture,
+ sizeType: sizeType,
+ success: resolve,
+ fail: reject,
+ });
+ });
+ case 'media':
+ return new Promise(function (resolve, reject) {
+ wx.chooseMedia({
+ count: multiple ? Math.min(maxCount, 9) : 1,
+ sourceType: capture,
+ maxDuration: maxDuration,
+ sizeType: sizeType,
+ camera: camera,
+ success: resolve,
+ fail: reject,
+ });
+ });
+ case 'video':
+ return new Promise(function (resolve, reject) {
+ wx.chooseVideo({
+ sourceType: capture,
+ compressed: compressed,
+ maxDuration: maxDuration,
+ camera: camera,
+ success: resolve,
+ fail: reject,
+ });
+ });
+ default:
+ return new Promise(function (resolve, reject) {
+ wx.chooseMessageFile({
+ count: multiple ? maxCount : 1,
+ type: 'file',
+ success: resolve,
+ fail: reject,
+ });
+ });
+ }
+}
+exports.chooseFile = chooseFile;
+function isFunction(val) {
+ return typeof val === 'function';
+}
+exports.isFunction = isFunction;
+function isObject(val) {
+ return val !== null && typeof val === 'object';
+}
+exports.isObject = isObject;
+function isPromise(val) {
+ return isObject(val) && isFunction(val.then) && isFunction(val.catch);
+}
+exports.isPromise = isPromise;
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/wxs/add-unit.wxs b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/wxs/add-unit.wxs
new file mode 100644
index 00000000..27a22d82
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/wxs/add-unit.wxs
@@ -0,0 +1,14 @@
+/* eslint-disable */
+var REGEXP = getRegExp('^\d+(\.\d+)?$');
+
+function addUnit(value) {
+ if (value == null) {
+ return undefined;
+ }
+
+ return REGEXP.test('' + value) ? value + 'px' : value;
+}
+
+module.exports = {
+ addUnit: addUnit
+};
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/wxs/array.wxs b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/wxs/array.wxs
new file mode 100644
index 00000000..610089cd
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/wxs/array.wxs
@@ -0,0 +1,5 @@
+function isArray(array) {
+ return array && array.constructor === 'Array';
+}
+
+module.exports.isArray = isArray;
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/wxs/bem.wxs b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/wxs/bem.wxs
new file mode 100644
index 00000000..93b2777b
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/wxs/bem.wxs
@@ -0,0 +1,38 @@
+var array = require('./array.wxs');
+var object = require('./object.wxs');
+var PREFIX = 'van-';
+
+function join(name, mods) {
+ name = PREFIX + name;
+ mods = mods.map(function(mod) {
+ return name + '--' + mod;
+ });
+ mods.unshift(name);
+ return mods.join(' ');
+}
+
+function traversing(mods, conf) {
+ if (!conf) {
+ return;
+ }
+
+ if (typeof conf === 'string' || typeof conf === 'number') {
+ mods.push(conf);
+ } else if (array.isArray(conf)) {
+ conf.forEach(function(item) {
+ traversing(mods, item);
+ });
+ } else if (typeof conf === 'object') {
+ object.keys(conf).forEach(function(key) {
+ conf[key] && mods.push(key);
+ });
+ }
+}
+
+function bem(name, conf) {
+ var mods = [];
+ traversing(mods, conf);
+ return join(name, mods);
+}
+
+module.exports.bem = bem;
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/wxs/memoize.wxs b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/wxs/memoize.wxs
new file mode 100644
index 00000000..261ae67d
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/wxs/memoize.wxs
@@ -0,0 +1,54 @@
+/**
+ * Simple memoize
+ * wxs doesn't support fn.apply, so this memoize only support up to 2 args
+ */
+
+function isPrimitive(value) {
+ var type = typeof value;
+ return (
+ type === 'boolean' ||
+ type === 'number' ||
+ type === 'string' ||
+ type === 'undefined' ||
+ value === null
+ );
+}
+
+// mock simple fn.call in wxs
+function call(fn, args) {
+ if (args.length === 2) {
+ return fn(args[0], args[1]);
+ }
+
+ if (args.length === 1) {
+ return fn(args[0]);
+ }
+
+ return fn();
+}
+
+function serializer(args) {
+ if (args.length === 1 && isPrimitive(args[0])) {
+ return args[0];
+ }
+ var obj = {};
+ for (var i = 0; i < args.length; i++) {
+ obj['key' + i] = args[i];
+ }
+ return JSON.stringify(obj);
+}
+
+function memoize(fn) {
+ var cache = {};
+
+ return function() {
+ var key = serializer(arguments);
+ if (cache[key] === undefined) {
+ cache[key] = call(fn, arguments);
+ }
+
+ return cache[key];
+ };
+}
+
+module.exports.memoize = memoize;
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/wxs/object.wxs b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/wxs/object.wxs
new file mode 100644
index 00000000..e0771077
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/wxs/object.wxs
@@ -0,0 +1,13 @@
+/* eslint-disable */
+var REGEXP = getRegExp('{|}|"', 'g');
+
+function keys(obj) {
+ return JSON.stringify(obj)
+ .replace(REGEXP, '')
+ .split(',')
+ .map(function(item) {
+ return item.split(':')[0];
+ });
+}
+
+module.exports.keys = keys;
diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/wxs/utils.wxs b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/wxs/utils.wxs
new file mode 100644
index 00000000..d5c9d8c2
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/wxs/utils.wxs
@@ -0,0 +1,10 @@
+/* eslint-disable */
+var bem = require('./bem.wxs').bem;
+var memoize = require('./memoize.wxs').memoize;
+var addUnit = require('./add-unit.wxs').addUnit;
+
+module.exports = {
+ bem: memoize(bem),
+ memoize: memoize,
+ addUnit: addUnit
+};
diff --git a/yanzhu-ui-app/miniprogram/pages/components/bar-chart-warning/index.js b/yanzhu-ui-app/miniprogram/pages/components/bar-chart-warning/index.js
new file mode 100644
index 00000000..24393f34
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/bar-chart-warning/index.js
@@ -0,0 +1,252 @@
+// components/bar-chart/index.js
+import * as echarts from '../../../ec-canvas/echarts'
+
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+ chartId:{
+ type: String
+ },
+ chartData:{
+ type: Object
+ }
+ },
+ observers: {
+ chartData: function (val) {
+ //console.log(val)
+ //this.initChart()
+ },
+ },
+ /**
+ * 组件的初始数据
+ */
+ data: {
+ ec: {
+ lazyLoad: true
+ },
+ chart:undefined,
+ },
+ lifetimes: {
+ created: function(){
+ //在组件实例刚刚被创建时执行,注意此时不能调用 setData
+ },
+ attached: function () {
+ //在组件实例进入页面节点树时执行
+
+ },
+ ready: function () {
+ // 在组件在视图层布局完成后执行
+
+ this.initChart();
+ },
+ detached: function () {
+ // 在组件实例被从页面节点树移除时执行
+ },
+
+ },
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+ initChart(){
+ var id ='#' + this.data.chartId;
+ this.component = this.selectComponent(id);
+ this.component.init((canvas, width, height, dpr) => {
+ let chart = echarts.init(canvas, null, {
+ width: width,
+ height: height,
+ devicePixelRatio: dpr
+ })
+ chart.clear();
+ chart.setOption(this.getData());
+ return chart;
+ })
+ },
+ getData() {
+ var data = this.data.chartData
+
+ // var data ={
+ // unit : '变化量(mm)',
+ // Xdata:['2022-12-2', '2022-12-3', '2022-12-4', '2022-12-5', '2022-12-6', '2022-12-7', '2022-12-8'],
+ // Ydata:[2,0,0,0,0,0,0],
+ // warningMax :[10,10,10,10,10,10,10],
+ // warningMin :[-10,-10,-10,-10,-10,-10,-10],
+ // policeMax : [20,20,20,20,20,20,20],
+ // policeMin : [-20,-20,-20,-20,-20,-20,-20],
+ // }
+
+ var unit=''
+ if(data.unit){
+ unit='单位:'+data.unit
+ }
+
+ var option = {
+ tooltip: {
+ trigger: 'axis',
+ axisPointer: {
+ lineStyle: {
+ color: '#57617B'
+ }
+ },
+ formatter: function (params) {
+ var dom = params[0].axisValue+'\n'+ params[4].seriesName+':'+params[4].data+' '+data.unit+'\n'+params[2].seriesName+':'+params[2].data+' '+data.unit+'/'+params[3].data+' '+data.unit+'\n'+params[0].seriesName+':'+params[0].data+' '+data.unit+'/'+params[1].data+' '+data.unit
+ return dom
+ }
+ // formatter: function (params) {
+ // var dom = '' +
+ // '
'+params[0].axisValue+'
'+
+ // '
'+params[4].seriesName+':'+params[4].data+'°
'+
+ // '
'+params[2].seriesName+':'+params[2].data+'/'+params[3].data+'°
'+
+ // '
'+params[0].seriesName+':'+params[0].data+'/'+params[1].data+'°
'+
+ // '
'
+ // return dom
+ // }
+ },
+ color:['#ff0000','#fb9300','#2e6ed0'],
+
+ grid: {
+ top:'15%',
+ left: '3%',
+ right: '5%',
+ bottom: '3%',
+ containLabel: true
+ },
+ xAxis: [{
+ type: 'category',
+ boundaryGap: true,
+ axisLine: {
+ lineStyle: {
+ color: '#252b41',
+ type: 'dashed',
+ }
+ },
+ axisLabel: {
+ textStyle: {
+ fontSize: 10,
+ color:'#879be2 '
+ },
+ rotate:40,
+ },
+ axisTick: {
+ show: false
+ },
+ data: data.Xdata
+ }],
+ yAxis: [{
+ name: unit,
+ nameTextStyle: { //Y轴那么的样式
+ color: '#89a4eb',
+ fontSize: 10,
+ },
+ type: 'value',
+ // max:30,
+ // min:-30,
+ axisTick: {
+ show: false
+ },
+ axisLine: {
+ show: false,
+ lineStyle: {
+ color: '#252b41'
+ }
+ },
+ axisLabel: {
+ textStyle: {
+ fontSize: 10,
+ color:'#008fe8'
+ }
+ },
+ splitLine: {
+ lineStyle: {
+ color: '#252b41',
+ type: 'dashed',
+ }
+ }
+ }],
+ series: [{
+ name: '报警',
+ type: 'line',
+ //smooth: true,
+ symbol: 'circle',
+ symbolSize: 0,
+ showSymbol: false,
+ lineStyle: {
+ normal: {
+ color: '#ff0000',
+ width:1,
+ type: 'dashed',
+ }
+ },
+ data: data.policeMax
+ }, {
+ name: '报警',
+ type: 'line',
+ // smooth: true,
+ symbol: 'circle',
+ symbolSize: 0,
+ showSymbol: false,
+
+ lineStyle: {
+ normal: {
+ color: '#ff0000',
+ width:1,
+ type: 'dashed',
+ }
+ },
+
+ data: data.policeMin
+ },{
+ name: '预警',
+ type: 'line',
+ // smooth: true,
+ symbol: 'circle',
+ symbolSize: 0,
+ showSymbol: false,
+ lineStyle: {
+ normal: {
+ color: '#fb9300',
+ width:1,
+ type: 'dashed',
+ }
+ },
+ data: data.warningMax
+ },{
+ name: '预警',
+ type: 'line',
+ // smooth: true,
+ symbol: 'circle',
+ symbolSize: 0,
+ showSymbol: false,
+ lineStyle: {
+ normal: {
+ color: '#fb9300',
+ width:1,
+ type: 'dashed',
+ }
+ },
+ data: data.warningMin
+ }, {
+ name: '测量',
+ type: 'line',
+ //smooth: true,
+ symbol: 'roundRect',
+ symbolSize:5,
+ //showSymbol: false,
+ lineStyle: {
+ normal: {
+ color: '#2e6ed0',
+ width:1,
+ },
+
+ },
+ data: data.Ydata
+ }
+ ]
+ };
+
+ return option;
+ }
+ }
+})
diff --git a/yanzhu-ui-app/miniprogram/pages/components/bar-chart-warning/index.json b/yanzhu-ui-app/miniprogram/pages/components/bar-chart-warning/index.json
new file mode 100644
index 00000000..b11802ea
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/bar-chart-warning/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+
+ }
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/components/bar-chart-warning/index.wxml b/yanzhu-ui-app/miniprogram/pages/components/bar-chart-warning/index.wxml
new file mode 100644
index 00000000..ec79a903
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/bar-chart-warning/index.wxml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/components/bar-chart-warning/index.wxss b/yanzhu-ui-app/miniprogram/pages/components/bar-chart-warning/index.wxss
new file mode 100644
index 00000000..14ddf303
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/bar-chart-warning/index.wxss
@@ -0,0 +1,6 @@
+/* components/bar-chart/index.wxss */
+.chart_canvas{
+ height: 500rpx;
+ width: 100%;
+
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/components/bar-chart/index.js b/yanzhu-ui-app/miniprogram/pages/components/bar-chart/index.js
new file mode 100644
index 00000000..68f76160
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/bar-chart/index.js
@@ -0,0 +1,206 @@
+// components/bar-chart/index.js
+import * as echarts from '../../../ec-canvas/echarts'
+
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+ chartId:{
+ type: String
+ },
+ chartData:{
+ type: Object
+ }
+ },
+ observers: {
+ chartData: function (val) {
+ //console.log(val)
+ //this.initChart()
+ },
+ },
+ /**
+ * 组件的初始数据
+ */
+ data: {
+ ec: {
+ lazyLoad: true
+ },
+ chart:undefined,
+ },
+ lifetimes: {
+ created: function(){
+ //在组件实例刚刚被创建时执行,注意此时不能调用 setData
+ },
+ attached: function () {
+ //在组件实例进入页面节点树时执行
+
+ },
+ ready: function () {
+ // 在组件在视图层布局完成后执行
+
+ this.initChart();
+ },
+ detached: function () {
+ // 在组件实例被从页面节点树移除时执行
+ },
+
+ },
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+ initChart(){
+ var id ='#' + this.data.chartId;
+ this.component = this.selectComponent(id);
+ this.component.init((canvas, width, height, dpr) => {
+ let chart = echarts.init(canvas, null, {
+ width: width,
+ height: height,
+ devicePixelRatio: dpr
+ })
+ chart.clear();
+ chart.setOption(this.getData());
+ return chart;
+ })
+ },
+ getData() {
+ var data = this.data.chartData
+
+ // var data ={
+ // unit : '变化量(mm)',
+ // legend:['X轴', 'Y轴'],
+ // color:['#2e6ed0','#fb9300'],
+ // Xdata :['13:00', '13:05', '13:10', '13:15', '13:20', '13:25', '13:30'],
+ // Ydata:[[2,1,0,0,0,0,0],[-10,10,5,-5,-3,-1,10]]
+ // }
+
+ var unit=''
+ if(data.unit){
+ unit='单位:'+data.unit
+ }
+
+ var series = []
+ for(var i = 0;i'+params[0].axisValue+''+
+ // ''+params[0].seriesName+':'+params[0].data+'°
'+
+ // ''+params[1].seriesName+':'+params[1].data+'°
'+
+ // ''
+ // return dom
+ // }
+
+ },
+ color:['#2e6ed0','#fb9300'],
+ legend: {
+ icon: 'rect',
+ itemWidth: 10,
+ itemHeight: 8,
+ itemGap: 10,
+ data: data.legend,
+ right: '4%',
+ textStyle: {
+ fontSize: 12,
+ color: '#8ba3eb'
+ },
+
+ },
+ grid: {
+ top:'15%',
+ left: '3%',
+ right: '5%',
+ bottom: '3%',
+ containLabel: true
+ },
+ xAxis: [{
+ type: 'category',
+ boundaryGap: true,
+ axisLine: {
+ lineStyle: {
+ color: '#252b41',
+ type: 'dashed',
+ }
+ },
+ axisLabel: {
+ textStyle: {
+ fontSize: 10,
+ color:'#879be2'
+ },
+ rotate:40,
+ },
+ axisTick: {
+ show: false
+ },
+ data: data.Xdata
+ }],
+ yAxis: [{
+ name: unit,
+ nameTextStyle: { //Y轴那么的样式
+ color: '#89a4eb',
+ fontSize: 10,
+ },
+ type: 'value',
+ // max:30,
+ // min:-30,
+ axisTick: {
+ show: false
+ },
+ axisLine: {
+ show: false,
+ lineStyle: {
+ color: '#252b41'
+ }
+ },
+ axisLabel: {
+ textStyle: {
+ fontSize: 10,
+ color:'#008fe8'
+ }
+ },
+ splitLine: {
+ lineStyle: {
+ color: '#252b41',
+ type: 'dashed',
+ }
+ }
+ }],
+ series:series
+ };
+
+ return option;
+ }
+ }
+})
diff --git a/yanzhu-ui-app/miniprogram/pages/components/bar-chart/index.json b/yanzhu-ui-app/miniprogram/pages/components/bar-chart/index.json
new file mode 100644
index 00000000..b11802ea
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/bar-chart/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+
+ }
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/components/bar-chart/index.wxml b/yanzhu-ui-app/miniprogram/pages/components/bar-chart/index.wxml
new file mode 100644
index 00000000..ec79a903
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/bar-chart/index.wxml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/components/bar-chart/index.wxss b/yanzhu-ui-app/miniprogram/pages/components/bar-chart/index.wxss
new file mode 100644
index 00000000..14ddf303
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/bar-chart/index.wxss
@@ -0,0 +1,6 @@
+/* components/bar-chart/index.wxss */
+.chart_canvas{
+ height: 500rpx;
+ width: 100%;
+
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/components/curve-echarts/index.js b/yanzhu-ui-app/miniprogram/pages/components/curve-echarts/index.js
new file mode 100644
index 00000000..0525c504
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/curve-echarts/index.js
@@ -0,0 +1,148 @@
+// pages/components/curve-echarts/index.js
+import * as echarts from '../../../ec-canvas/echarts'
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+ chartId:{
+ type: String
+ },
+ chartData:{
+ type: Array
+ },
+ height:{
+ type:String
+ },
+ title:{
+ type:String
+ },
+ color:{
+ type:Array
+ }
+ },
+ observers: {
+ chartData: function (val) {
+ console.log(val)
+ this.initChart()
+ },
+ },
+
+ /**
+ * 组件的初始数据
+ */
+ data: {
+ ec: {
+ lazyLoad: true
+ },
+ chart:undefined,
+ },
+ lifetimes: {
+ created: function(){
+ //在组件实例刚刚被创建时执行,注意此时不能调用 setData
+ },
+ attached: function () {
+ //在组件实例进入页面节点树时执行
+
+ },
+ ready: function () {
+ // 在组件在视图层布局完成后执行
+
+ this.initChart();
+ },
+ detached: function () {
+ // 在组件实例被从页面节点树移除时执行
+ },
+
+ },
+
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+ initChart(){
+ var id ='#' + this.data.chartId;
+ this.component = this.selectComponent(id);
+ this.component.init((canvas, width, height, dpr) => {
+ let chart = echarts.init(canvas, null, {
+ width: width,
+ height: height,
+ devicePixelRatio: dpr
+ })
+ chart.setOption(this.getData());
+ return chart;
+ })
+ },
+ getData() {
+ let that=this
+ var data = this.data.chartData
+ var legend={}
+ var xAxis={}
+ var series=[]
+ console.log(data);
+ for(let i=0;iitem.name),
+ textStyle: {
+ fontSize: 10, // 设置字体大小为16px
+ color:'#fff'
+ }
+ },
+ grid: {
+ // top: '10%', // 可以设置为百分比或像素值
+ bottom: '30%',
+ left: '15%',
+ // right: '10%'
+ },
+ xAxis:{
+ // type: 'category',
+ data: data[0].biaoyangX,
+ axisLabel: {
+ color: '#fff', // y轴文字颜色为白色
+ rotate: 60, // 旋转角度
+ margin: 10, // 偏移量
+ fontSize: 10
+ }
+ },
+ yAxis: {
+ name: this.data.title, // 设置y轴的单位
+ nameTextStyle: {
+ fontSize: 10, // 设置单位文字的大小
+ fontWeight: 'bold', // 设置单位文字的粗细
+ color:'#fff'
+ },
+ type: 'value',
+ axisLabel: {
+ color: '#fff' // y轴文字颜色为白色
+ }
+ },
+ series,
+ };
+ return option;
+ }
+ }
+})
diff --git a/yanzhu-ui-app/miniprogram/pages/components/curve-echarts/index.json b/yanzhu-ui-app/miniprogram/pages/components/curve-echarts/index.json
new file mode 100644
index 00000000..7e37c035
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/curve-echarts/index.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/components/curve-echarts/index.wxml b/yanzhu-ui-app/miniprogram/pages/components/curve-echarts/index.wxml
new file mode 100644
index 00000000..7686c9b1
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/curve-echarts/index.wxml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/components/curve-echarts/index.wxss b/yanzhu-ui-app/miniprogram/pages/components/curve-echarts/index.wxss
new file mode 100644
index 00000000..7ca6ce4a
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/curve-echarts/index.wxss
@@ -0,0 +1 @@
+/* pages/components/curve-echarts/index.wxss */
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/components/deep-select/index.js b/yanzhu-ui-app/miniprogram/pages/components/deep-select/index.js
new file mode 100644
index 00000000..b2d0dd91
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/deep-select/index.js
@@ -0,0 +1,73 @@
+// pages/components/deep-select/index.js
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+ columns:{
+ type:Array
+ },
+ placeholder:{
+ type:String
+ },
+ selectValue:{
+ type:String
+ },
+ selectIndex:{
+ type:String
+ },
+ },
+ /**数据监听 */
+ observers: {
+ columns: function (val) {
+ this.setData({
+ item:val[0],
+ value:val.length == 0?"":val[0].text
+ })
+ },
+ selectValue:function(val){
+ this.setData({
+ value:val
+ })
+ },
+ selectIndex:function(val){
+ this.setData({
+ index:val
+ })
+ }
+},
+ /**
+ * 组件的初始数据
+ */
+ data: {
+ show: false,
+ value:'',
+ item:'',
+ index:''
+ },
+
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+ showPopup() {
+ this.setData({ show: true });
+ },
+ onClose() {
+ this.setData({ show: false });
+ },
+ onSelectChange(e){
+ console.log(e)
+ this.setData({
+ item:e.detail.value
+ })
+ },
+ onConfirm(e){
+ this.setData({
+ value:this.data.item.text
+ })
+ this.triggerEvent('change',this.data.item)
+ this.setData({ show: false });
+ }
+ }
+})
diff --git a/yanzhu-ui-app/miniprogram/pages/components/deep-select/index.json b/yanzhu-ui-app/miniprogram/pages/components/deep-select/index.json
new file mode 100644
index 00000000..e8cfaaf8
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/deep-select/index.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/components/deep-select/index.wxml b/yanzhu-ui-app/miniprogram/pages/components/deep-select/index.wxml
new file mode 100644
index 00000000..503bd6da
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/deep-select/index.wxml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+ 取消
+ {{placeholder}}
+ 确认
+
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/components/deep-select/index.wxss b/yanzhu-ui-app/miniprogram/pages/components/deep-select/index.wxss
new file mode 100644
index 00000000..ab8e7fa6
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/deep-select/index.wxss
@@ -0,0 +1,103 @@
+/* pages/components/deep-select/index.wxss */
+.celect_frame_max{
+ padding: 15rpx;
+ background: #2b345b;
+ border-radius: 10rpx;
+}
+.celect_frame_min{
+ padding:0 40rpx 0 5rpx;
+ overflow: hidden;
+ white-space:nowrap;
+ text-overflow:ellipsis;
+ background: url("http://fileimg.makalu.cc/WEB_C8096DD21F86451B8D14820056066CFA.png") no-repeat right/30rpx 30rpx;
+}
+.celect_frame_min.active{
+ color: #7a8ac9;
+}
+.popup_style{
+ background: #232a44 !important;
+}
+
+.option_list_title{
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 20rpx;
+ color: #06d4f8;
+}
+.option_list_title_btn{
+ color: #1989fa;
+ font-size: 30rpx;
+}
+.option_list_min{
+ padding: 20rpx;
+}
+.option_list_con{
+ min-height: 240rpx;
+ max-height: 400rpx;
+ overflow: auto;
+}
+.option_list_con view{
+ height: 80rpx;
+ text-align: center;
+ line-height: 80rpx;
+ color: #7d94d7;
+}
+.option_list_con .active{
+ background: #273051;
+ color: #ffffff;
+}
+.time_select_style{
+ background: none !important;
+}
+
+.time_active_style{
+ color: #ffffff !important;
+}
+.time_list_style{
+ background: none !important;
+ color: #546696 !important;
+}
+.toolbar_style{
+ border: none !important;
+ line-height:44px;
+}
+.option_list_title{
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 20rpx;
+
+}
+.option_list_title_btn{
+ color: #1989fa;
+ font-size: 30rpx;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/components/file-uploader-all/index.js b/yanzhu-ui-app/miniprogram/pages/components/file-uploader-all/index.js
new file mode 100644
index 00000000..bda71325
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/file-uploader-all/index.js
@@ -0,0 +1,85 @@
+// components/filling/index.js
+const app = getApp();
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+ fileUrlArray:{
+ type:Array
+ },
+ limit:{
+ type:Number
+ }
+ },
+
+ /**数据监听 */
+ observers: {
+ fileUrlArray:function(val){
+ this.setData({
+ uploaderList:val
+ })
+ }
+ },
+
+ /**
+ * 组件的初始数据
+ */
+ data: {
+ quantity:5,
+ uploaderList: [],
+ uploaderNum:0,
+ showUpload:true
+ },
+
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+ // 删除图片
+ clearImg:function(e){
+ var nowList = [];//新数据
+ var uploaderList = this.data.uploaderList;//原数据
+
+ for (let i = 0; i < uploaderList.length;i++){
+ if (i == e.currentTarget.dataset.index){
+ continue;
+ }else{
+ nowList.push(uploaderList[i])
+ }
+ }
+ this.setData({
+ uploaderNum: this.data.uploaderNum - 1,
+ uploaderList: nowList,
+ showUpload: true
+ })
+ console.log(this.data.uploaderList)
+ this.triggerEvent("files", this.data.uploaderList);
+ },
+ //上传图片
+ upload: function(e) {
+ if(this.data.limit){
+ this.data.quantity=this.data.limit;
+ }
+ var that = this;
+ wx.chooseMessageFile({
+ count: that.data.quantity - that.data.uploaderNum, // 默认9
+ success: function(res) {
+ // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
+ let tempFilePaths = res.tempFiles;
+ let uploaderList = that.data.uploaderList.concat(tempFilePaths);
+ if (uploaderList.length==that.data.quantity){
+ that.setData({
+ showUpload:false
+ })
+ }
+ that.setData({
+ uploaderList: uploaderList,
+ uploaderNum: uploaderList.length,
+ })
+ that.triggerEvent("files", that.data.uploaderList);
+ }
+ })
+ },
+ }
+})
diff --git a/yanzhu-ui-app/miniprogram/pages/components/file-uploader-all/index.json b/yanzhu-ui-app/miniprogram/pages/components/file-uploader-all/index.json
new file mode 100644
index 00000000..7e37c035
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/file-uploader-all/index.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/components/file-uploader-all/index.wxml b/yanzhu-ui-app/miniprogram/pages/components/file-uploader-all/index.wxml
new file mode 100644
index 00000000..2df155cc
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/file-uploader-all/index.wxml
@@ -0,0 +1,14 @@
+
+
+
+
+
+ {{item.name}}
+ ×
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/components/file-uploader-all/index.wxss b/yanzhu-ui-app/miniprogram/pages/components/file-uploader-all/index.wxss
new file mode 100644
index 00000000..468b838f
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/file-uploader-all/index.wxss
@@ -0,0 +1,139 @@
+/* components/fillings/index.wxss */
+
+.filling_selector_max{
+
+ position: relative;
+
+}
+.filling_selector_title{
+ padding-left: 15rpx;
+ color: #999999;
+}
+.required::before {
+ position: absolute;
+ left: 20rpx;
+ color: #ee0a24;
+ font-size: 38rpx;
+ content: '*';
+}
+.filling_selector_input{
+ padding: 15rpx;
+}
+.filling_selector_input input{
+ padding: 15rpx 0;
+}
+/* 上传图片 */
+.in-modular-upload{
+ padding: 40rpx 0;
+ }
+ .in-img-div{
+ position: relative;
+ margin: 0 8px 8px 0;
+ float: left;
+ }
+ .in-img-max:after{
+ display:block;
+ clear:both;
+ content:"";
+ visibility:hidden;
+ height:0
+ }
+ .in-img-max{
+ width: auto;
+ zoom:1
+ }
+ .in-add-click{
+ width: 180rpx;
+ height:180rpx;
+ border: 1px dashed #28345a;
+ border-radius: 10rpx;
+ background: #28345a url("http://fileimg.makalu.cc/WEB_162F576788AE44F08ADDFFC06CD5923F.png") no-repeat center/70%;
+ }
+ .in-img-div image{
+ width: 180rpx;
+ height: 180rpx;
+ border-radius: 15rpx;
+ position: relative;
+ }
+ .in-delete{
+ float: right;
+ z-index: 5;
+ height: 50rpx;
+ background: rgba(0,0,0,0.7);
+ color: #fff;
+ width: 50rpx;
+ border-radius: 50%;
+ text-align: center;
+ line-height: 50rpx;
+ margin-right: -15rpx;
+ margin-top: 0rpx;
+ }
+
+
+ .in-add-to{
+ padding:0 20rpx;
+ width: auto;
+ border: 1px dotted #fecc00;
+ border-radius: 10rpx;
+ text-align: center;
+ color: #fecc00;
+ font-size:60rpx;
+ }
+ .in-add-to:active{
+ background: #fecc00;
+ color: #ffffff;
+ }
+
+
+ .in-cut-off{
+ font-size: 24rpx;
+ color: #fff;
+ background: #ff0000;
+ border-radius: 10rpx;
+ float: right;
+ padding: 5rpx 10rpx;
+ }
+ .in-remarks{
+ font-size: 24rpx;
+ color: #999;
+ padding-bottom: 20rpx;
+ }
+ .in-tab{
+ height: 100rpx;
+
+ }
+ .in-tab view{
+ width: 20%;
+ height: 80rpx;
+ text-align: center;
+ font-size: 30rpx;
+ line-height: 80rpx;
+ float: left;
+ color: #999;
+ }
+ .in-tab .active{
+ background: #ff0000;
+ color: #ffffff;
+ }
+ .files{
+ word-break: break-all;
+ margin-bottom: 30rpx;
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/components/file-uploader/index.js b/yanzhu-ui-app/miniprogram/pages/components/file-uploader/index.js
new file mode 100644
index 00000000..57502cee
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/file-uploader/index.js
@@ -0,0 +1,102 @@
+// components/filling/index.js
+const app = getApp();
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+ limit:{
+ type:Number,
+ value:5
+ },
+ fileUrlArray:{
+ type:Array
+ },
+ },
+
+ /**数据监听 */
+ observers: {
+ fileUrlArray:function(val){
+ let lm = this.data.limit;
+ let showUpload=false;
+ if(val && val.length
+
+
+
+
+
+ ×
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/components/file-uploader/index.wxss b/yanzhu-ui-app/miniprogram/pages/components/file-uploader/index.wxss
new file mode 100644
index 00000000..2db5ce3e
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/file-uploader/index.wxss
@@ -0,0 +1,137 @@
+/* components/fillings/index.wxss */
+
+.filling_selector_max{
+
+ position: relative;
+
+}
+.filling_selector_title{
+ padding-left: 15rpx;
+ color: #999999;
+}
+.required::before {
+ position: absolute;
+ left: 20rpx;
+ color: #ee0a24;
+ font-size: 38rpx;
+ content: '*';
+}
+.filling_selector_input{
+ padding: 15rpx;
+}
+.filling_selector_input input{
+ padding: 15rpx 0;
+}
+/* 上传图片 */
+.in-modular-upload{
+ padding: 40rpx 0;
+ }
+ .in-img-div{
+ position: relative;
+ margin: 0 8px 8px 0;
+ float: left;
+ }
+ .in-img-max:after{
+ display:block;
+ clear:both;
+ content:"";
+ visibility:hidden;
+ height:0
+ }
+ .in-img-max{
+ width: auto;
+ zoom:1
+ }
+ .in-add{
+ float: left;
+ }
+ .in-add-click{
+ width: 180rpx;
+ height:180rpx;
+ border: 1px dashed #28345a;
+ border-radius: 10rpx;
+ background: #28345a url("http://fileimg.makalu.cc/WEB_162F576788AE44F08ADDFFC06CD5923F.png") no-repeat center/70%;
+ }
+ .in-img-div image{
+ width: 180rpx;
+ height: 180rpx;
+ border-radius: 15rpx;
+ position: relative;
+ }
+ .in-delete{
+ position: absolute;
+ z-index: 5;
+ height: 50rpx;
+ background: rgba(0,0,0,0.7);
+ color: #fff;
+ width: 50rpx;
+ border-radius: 50%;
+ text-align: center;
+ line-height: 50rpx;
+ right: -15rpx;
+ top: -20rpx;
+ }
+
+
+ .in-add-to{
+ padding:0 20rpx;
+ width: auto;
+ border: 1px dotted #fecc00;
+ border-radius: 10rpx;
+ text-align: center;
+ color: #fecc00;
+ font-size:60rpx;
+ }
+ .in-add-to:active{
+ background: #fecc00;
+ color: #ffffff;
+ }
+
+
+ .in-cut-off{
+ font-size: 24rpx;
+ color: #fff;
+ background: #ff0000;
+ border-radius: 10rpx;
+ float: right;
+ padding: 5rpx 10rpx;
+ }
+ .in-remarks{
+ font-size: 24rpx;
+ color: #999;
+ padding-bottom: 20rpx;
+ }
+ .in-tab{
+ height: 100rpx;
+
+ }
+ .in-tab view{
+ width: 20%;
+ height: 80rpx;
+ text-align: center;
+ font-size: 30rpx;
+ line-height: 80rpx;
+ float: left;
+ color: #999;
+ }
+ .in-tab .active{
+ background: #ff0000;
+ color: #ffffff;
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/components/pie-chart/index.js b/yanzhu-ui-app/miniprogram/pages/components/pie-chart/index.js
new file mode 100644
index 00000000..53d748ea
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/pie-chart/index.js
@@ -0,0 +1,140 @@
+// components/bar-chart/index.js
+import * as echarts from '../../../ec-canvas/echarts'
+
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+ chartId:{
+ type: String
+ },
+ chartData:{
+ type: Object
+ }
+ },
+ observers: {
+ chartData: function (val) {
+ console.log(val)
+ this.initChart()
+ },
+ },
+ /**
+ * 组件的初始数据
+ */
+ data: {
+ ec: {
+ lazyLoad: true
+ },
+ chart:undefined,
+ },
+ lifetimes: {
+ created: function(){
+ //在组件实例刚刚被创建时执行,注意此时不能调用 setData
+ },
+ attached: function () {
+ //在组件实例进入页面节点树时执行
+
+ },
+ ready: function () {
+ // 在组件在视图层布局完成后执行
+
+ this.initChart();
+ },
+ detached: function () {
+ // 在组件实例被从页面节点树移除时执行
+ },
+
+ },
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+ initChart(){
+ var id ='#' + this.data.chartId;
+ this.component = this.selectComponent(id);
+ this.component.init((canvas, width, height, dpr) => {
+ let chart = echarts.init(canvas, null, {
+ width: width,
+ height: height,
+ devicePixelRatio: dpr
+ })
+ chart.setOption(this.getData());
+ return chart;
+ })
+ },
+ getData() {
+ var data = this.data.chartData
+ var option = {
+ series: [
+ {
+ type: "pie",
+ radius: ["65%", "80%"],
+ label: {
+ normal: {
+ position: "center",
+ },
+ },
+ data: [
+ {
+ value: data.value,
+ label: {
+ normal: {
+ formatter: "{d} %",
+ textStyle: {
+ fontSize: 20,
+ color: "#00ecfe",
+ fontWeight:'bold',
+ },
+ },
+ },
+ itemStyle: {
+ normal: {
+ color: {
+ // 完成的圆环的颜色
+ colorStops: [
+ {
+ offset: 0,
+ color: "#00cefc", // 0% 处的颜色
+ },
+ {
+ offset: 1,
+ color: "#367bec", // 100% 处的颜色
+ },
+ ],
+ },
+ labelLine: {
+ show: false,
+ },
+ },
+ },
+ },
+ {
+ value: (100-data.value),
+ label: {
+ normal: {
+ formatter: "\n\n\n\n"+data.text,
+ textStyle: {
+ color: "#ffffff",
+ fontSize: 12,
+ },
+ },
+ },
+ tooltip: {
+ show: false,
+ },
+ itemStyle: {
+ normal: {
+ color: "#273259",
+ }
+ },
+ hoverAnimation: false,
+ },
+ ],
+ },
+ ],
+ };
+ return option;
+ }
+ }
+})
diff --git a/yanzhu-ui-app/miniprogram/pages/components/pie-chart/index.json b/yanzhu-ui-app/miniprogram/pages/components/pie-chart/index.json
new file mode 100644
index 00000000..e8cfaaf8
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/pie-chart/index.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/components/pie-chart/index.wxml b/yanzhu-ui-app/miniprogram/pages/components/pie-chart/index.wxml
new file mode 100644
index 00000000..5f4db215
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/pie-chart/index.wxml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/components/pie-chart/index.wxss b/yanzhu-ui-app/miniprogram/pages/components/pie-chart/index.wxss
new file mode 100644
index 00000000..d86a152b
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/pie-chart/index.wxss
@@ -0,0 +1,5 @@
+/* pages/components/pie-chart/index.wxss */
+.chart_canvas{
+ height: 300rpx;
+ width: 100%;
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/components/project-select/index.js b/yanzhu-ui-app/miniprogram/pages/components/project-select/index.js
new file mode 100644
index 00000000..97f67807
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/project-select/index.js
@@ -0,0 +1,103 @@
+const app = getApp()
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+ init: {
+ type: Object
+ },
+ width: {
+ type: String
+ },
+ left: {
+ type: String
+ }
+ },
+
+ /**数据监听 */
+ observers: {
+ init: function (val) {
+ if (val) {
+ this.setData({
+ item: val,
+ })
+ }
+ },
+ },
+
+ /**
+ * 组件的初始数据
+ */
+ data: {
+ show: false,
+ index: 0,
+ item: '',
+ columns: [],
+ projectList: [],
+ },
+
+ created() {
+ if (this.data.init && this.data.init.id == "") {
+ this.setData({
+ projectList: this.data.init.concat(app.globalData.projectInfoList)
+ })
+ } else {
+ this.setData({
+ projectList: app.globalData.projectInfoList
+ })
+ }
+ },
+
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+ showPopup() {
+ if (this.data.projectList.length > 1) {
+ let data = this.data.projectList;
+ let initData = this.data.init;
+ let selectColumns = [];
+ data.forEach((item, i) => {
+ selectColumns.push({
+ id: item.id,
+ text: item.text
+ });
+ if (initData.id == item.id) {
+ this.setData({
+ index: i
+ })
+ }
+ });
+ console.log("default-index=" + this.data.index);
+ this.setData({
+ columns: selectColumns,
+ show: true
+ });
+ }
+ },
+
+ onClose() {
+ this.setData({
+ show: false
+ });
+ },
+
+ onSelectChange(e) {
+ this.setData({
+ item: e.detail.value
+ })
+ },
+
+ onConfirm() {
+ this.setData({
+ value: this.data.item.text
+ })
+ this.triggerEvent('change', this.data.item)
+ this.setData({
+ show: false
+ });
+ },
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/components/project-select/index.json b/yanzhu-ui-app/miniprogram/pages/components/project-select/index.json
new file mode 100644
index 00000000..e8cfaaf8
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/project-select/index.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/components/project-select/index.wxml b/yanzhu-ui-app/miniprogram/pages/components/project-select/index.wxml
new file mode 100644
index 00000000..47dd6447
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/project-select/index.wxml
@@ -0,0 +1,18 @@
+
+
+
+
+ {{item.text}}
+
+
+
+
+
+
+ 取消
+ {{placeholder}}
+ 确认
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/components/project-select/index.wxss b/yanzhu-ui-app/miniprogram/pages/components/project-select/index.wxss
new file mode 100644
index 00000000..76d5ce23
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/project-select/index.wxss
@@ -0,0 +1,49 @@
+/* pages/components/project-select/index.wxss */
+
+.video_add{
+ padding: 20rpx 30rpx;
+ }
+ .video_address{
+ background:#30343f;
+ padding:0 20rpx;
+ border-radius:50rpx;
+ font-size: 28rpx;
+ }
+ .video_address_min{
+ background:url("http://fileimg.makalu.cc/CORE_B1C818B4CF2C44FE9D96624589329EBC.png") no-repeat left/40rpx;
+ height: 80rpx;
+ line-height: 80rpx;
+ padding-left: 50rpx;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ word-break: break-all;
+ }
+
+
+ .option_list_title{
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 20rpx;
+ color: #06d4f8;
+ }
+ .option_list_title_btn{
+ color: #1989fa;
+ font-size: 30rpx;
+ }
+
+ .popup_style{
+ background: #232a44 !important;
+ }
+.time_select_style{
+ background: none !important;
+}
+
+.time_active_style{
+ color: #ffffff !important;
+}
+.time_list_style{
+ background: none !important;
+ color: #546696 !important;
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/components/pz-screen-training-index/index.js b/yanzhu-ui-app/miniprogram/pages/components/pz-screen-training-index/index.js
new file mode 100644
index 00000000..1ad50906
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/pz-screen-training-index/index.js
@@ -0,0 +1,122 @@
+// pages/components/deep-select/index.js
+import Toast from '@vant/weapp/toast/toast';
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+ columns:{
+ type:Array
+ },
+ title:{
+ type:String
+ },
+ title1:{
+ type:String
+ },
+
+ },
+ /**数据监听 */
+ observers: {
+ columns: function (val) {
+ console.log(val)
+ if(val.length > 0){
+ this.setData({
+ floorList:val[0].floorList
+ })
+ }
+ },
+
+ },
+ lifetimes: {
+ created: function(){
+ //在组件实例刚刚被创建时执行,注意此时不能调用 setData
+ },
+ attached: function () {
+ //在组件实例进入页面节点树时执行
+
+ },
+ ready: function () {
+ // 在组件在视图层布局完成后执行
+
+
+ },
+ detached: function () {
+ // 在组件实例被从页面节点树移除时执行
+ },
+
+ },
+ /**
+ * 组件的初始数据
+ */
+ data: {
+ show: false,
+
+ startDateData:[],
+ endDateData:[],
+
+ condition:{
+ floorNum:'',
+ buildingNum:'',
+ startDate:'',
+ endDate:'',
+ },
+ floorList:[]
+
+ },
+
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+ //打开筛选弹窗
+ showPopup() {
+
+ this.setData({ show: true });
+ },
+ //关闭筛选弹窗
+ onClose() {
+ this.setData({ show: false });
+ },
+
+ //单元楼
+ onBuildSelectChange(event){
+ this.setData({
+ 'condition.buildingNum': event.detail.value.id,
+ floorList:event.detail.value.floorList
+ })
+ },
+ //楼层
+ onFloorSelectChange(event){
+ this.setData({
+ 'condition.floorNum': event.detail.value.id,
+ })
+ },
+
+
+ //开始日期
+ onStartDate(e){
+ this.setData({
+ 'condition.startDate': e.detail,
+ })
+ },
+ //结束日期
+ onEndDate(e){
+ this.setData({
+ 'condition.endDate': e.detail,
+ })
+ },
+
+ //确认按钮
+ onConfirm(){
+ var start = new Date(this.data.condition.startDate)
+ var end = new Date(this.data.condition.endDate)
+ if(start > end){
+ Toast.fail('开始时间不能大于结束时间');
+ }else{
+ this.triggerEvent('screen',this.data.condition)
+ this.setData({ show: false});
+ }
+ }
+ }
+})
diff --git a/yanzhu-ui-app/miniprogram/pages/components/pz-screen-training-index/index.json b/yanzhu-ui-app/miniprogram/pages/components/pz-screen-training-index/index.json
new file mode 100644
index 00000000..e8cfaaf8
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/pz-screen-training-index/index.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/components/pz-screen-training-index/index.wxml b/yanzhu-ui-app/miniprogram/pages/components/pz-screen-training-index/index.wxml
new file mode 100644
index 00000000..9147d943
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/pz-screen-training-index/index.wxml
@@ -0,0 +1,46 @@
+
+筛选
+
+
+
+
+
+ 取消
+ 筛选
+ 确认
+
+
+ {{title}}
+
+
+
+ {{title1}}
+
+
+
+ 开始时间
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/components/pz-screen-training-index/index.wxss b/yanzhu-ui-app/miniprogram/pages/components/pz-screen-training-index/index.wxss
new file mode 100644
index 00000000..2e6189a8
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/pz-screen-training-index/index.wxss
@@ -0,0 +1,107 @@
+/* pages/components/pz-screen/index.wxss */
+.option_list_max{
+ padding-bottom: 30rpx;
+}
+.pz_screen{
+ background: url("http://fileimg.makalu.cc/WEB_8F23E43145C9406D89C8415E48C6139A.png") no-repeat left/25rpx 25rpx;
+ padding-left: 35rpx;
+ color: #788fd2;
+ font-size: 26rpx;
+}
+/* pages/components/deep-select/index.wxss */
+.celect_frame_max{
+ padding: 15rpx;
+ background: #2b345b;
+ border-radius: 10rpx;
+}
+.celect_frame_min{
+ padding:0 40rpx 0 5rpx;
+ overflow: hidden;
+ white-space:nowrap;
+ text-overflow:ellipsis;
+ background: url("http://fileimg.makalu.cc/WEB_C8096DD21F86451B8D14820056066CFA.png") no-repeat right/30rpx 30rpx;
+}
+.celect_frame_min.active{
+ color: #7a8ac9;
+}
+.popup_style{
+ background: #232a44 !important;
+}
+.contrent_height{
+ height: 700rpx;
+ overflow: auto;
+}
+.option_list_title{
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 20rpx;
+
+}
+.option_list_title_btn{
+ color: #1989fa;
+ font-size: 30rpx;
+}
+.option_list_min{
+ padding: 20rpx;
+}
+.option_list_con{
+ min-height: 160rpx;
+ max-height: 240rpx;
+ overflow: auto;
+}
+.option_list_con view{
+ height: 80rpx;
+ text-align: center;
+ line-height: 80rpx;
+ color: #7d94d7;
+}
+.option_list_con .active{
+ background: #273051;
+ color: #ffffff;
+}
+.pzzj_screen_title{
+ padding: 30rpx 50rpx;
+ font-size: 30rpx;
+}
+.pzzj_screen_time{
+ padding: 30rpx;
+}
+
+.time_select_style{
+ background: none !important;
+}
+
+.time_active_style{
+ color: #ffffff !important;
+}
+.time_list_style{
+ background: none !important;
+ color: #546696 !important;
+}
+.pzzj_screen_time_bar{
+ margin-top: 44px;
+ text-align: center;
+ height: 44px;
+ line-height: 44px;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/components/pz-screen-training/index.js b/yanzhu-ui-app/miniprogram/pages/components/pz-screen-training/index.js
new file mode 100644
index 00000000..bcc7bc61
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/pz-screen-training/index.js
@@ -0,0 +1,107 @@
+// pages/components/deep-select/index.js
+import Toast from '@vant/weapp/toast/toast';
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+ columns:{
+ type:Array
+ },
+
+ },
+ /**数据监听 */
+ observers: {
+ columns: function (val) {
+ if(val.length > 0){
+ this.setData({
+ 'condition.typeId': val[0].id,
+ 'condition.typeText': val[0].text,
+ })
+ }
+ },
+ },
+ lifetimes: {
+ created: function(){
+ //在组件实例刚刚被创建时执行,注意此时不能调用 setData
+ },
+ attached: function () {
+ //在组件实例进入页面节点树时执行
+
+ },
+ ready: function () {
+ // 在组件在视图层布局完成后执行
+
+
+ },
+ detached: function () {
+ // 在组件实例被从页面节点树移除时执行
+ },
+
+ },
+ /**
+ * 组件的初始数据
+ */
+ data: {
+ show: false,
+
+ startDateData:[],
+ endDateData:[],
+
+ condition:{
+ typeId:'',
+ typeText:'',
+ startDate:'',
+ endDate:'',
+ },
+ },
+
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+ //打开筛选弹窗
+ showPopup() {
+
+ this.setData({ show: true });
+ },
+ //关闭筛选弹窗
+ onClose() {
+ this.setData({ show: false });
+ },
+
+ //凭证类型筛选
+ onSelectChange(event){
+ this.setData({
+ 'condition.typeId': event.detail.value.id,
+ 'condition.typeText': event.detail.value.text,
+ })
+ },
+
+ //开始日期
+ onStartDate(e){
+ this.setData({
+ 'condition.startDate': e.detail,
+ })
+
+ },
+ //结束日期
+ onEndDate(e){
+ this.setData({
+ 'condition.endDate': e.detail,
+ })
+ },
+
+ //确认按钮
+ onConfirm(){
+ var start = new Date(this.data.condition.startDate)
+ var end = new Date(this.data.condition.endDate)
+ if(start > end){
+ Toast.fail('开始时间不能大于结束时间');
+ }else{
+ this.triggerEvent('screen',this.data.condition)
+ this.setData({ show: false});
+ }
+ }
+ }
+})
diff --git a/yanzhu-ui-app/miniprogram/pages/components/pz-screen-training/index.json b/yanzhu-ui-app/miniprogram/pages/components/pz-screen-training/index.json
new file mode 100644
index 00000000..e8cfaaf8
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/pz-screen-training/index.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/components/pz-screen-training/index.wxml b/yanzhu-ui-app/miniprogram/pages/components/pz-screen-training/index.wxml
new file mode 100644
index 00000000..e52c04cc
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/pz-screen-training/index.wxml
@@ -0,0 +1,37 @@
+
+筛选
+
+
+
+
+
+ 取消
+ 筛选
+ 确认
+
+ 协作队伍
+
+
+
+ 开始时间
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/components/pz-screen-training/index.wxss b/yanzhu-ui-app/miniprogram/pages/components/pz-screen-training/index.wxss
new file mode 100644
index 00000000..fde3c3c8
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/pz-screen-training/index.wxss
@@ -0,0 +1,104 @@
+/* pages/components/pz-screen/index.wxss */
+.option_list_max{
+ padding-bottom: 30rpx;
+}
+.pz_screen{
+ background: url("http://fileimg.makalu.cc/WEB_8F23E43145C9406D89C8415E48C6139A.png") no-repeat left/25rpx 25rpx;
+ padding-left: 35rpx;
+ color: #788fd2;
+ font-size: 26rpx;
+}
+/* pages/components/deep-select/index.wxss */
+.celect_frame_max{
+ padding: 15rpx;
+ background: #2b345b;
+ border-radius: 10rpx;
+}
+.celect_frame_min{
+ padding:0 40rpx 0 5rpx;
+ overflow: hidden;
+ white-space:nowrap;
+ text-overflow:ellipsis;
+ background: url("http://fileimg.makalu.cc/WEB_C8096DD21F86451B8D14820056066CFA.png") no-repeat right/30rpx 30rpx;
+}
+.celect_frame_min.active{
+ color: #7a8ac9;
+}
+.popup_style{
+ background: #232a44 !important;
+}
+
+.option_list_title{
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 20rpx;
+
+}
+.option_list_title_btn{
+ color: #1989fa;
+ font-size: 30rpx;
+}
+.option_list_min{
+ padding: 20rpx;
+}
+.option_list_con{
+ min-height: 160rpx;
+ max-height: 240rpx;
+ overflow: auto;
+}
+.option_list_con view{
+ height: 80rpx;
+ text-align: center;
+ line-height: 80rpx;
+ color: #7d94d7;
+}
+.option_list_con .active{
+ background: #273051;
+ color: #ffffff;
+}
+.pzzj_screen_title{
+ padding: 30rpx 50rpx;
+ font-size: 30rpx;
+}
+.pzzj_screen_time{
+ padding: 30rpx;
+}
+
+.time_select_style{
+ background: none !important;
+}
+
+.time_active_style{
+ color: #ffffff !important;
+}
+.time_list_style{
+ background: none !important;
+ color: #546696 !important;
+}
+.pzzj_screen_time_bar{
+ margin-top: 44px;
+ text-align: center;
+ height: 44px;
+ line-height: 44px;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/components/pz-screen/index.js b/yanzhu-ui-app/miniprogram/pages/components/pz-screen/index.js
new file mode 100644
index 00000000..bcc7bc61
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/pz-screen/index.js
@@ -0,0 +1,107 @@
+// pages/components/deep-select/index.js
+import Toast from '@vant/weapp/toast/toast';
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+ columns:{
+ type:Array
+ },
+
+ },
+ /**数据监听 */
+ observers: {
+ columns: function (val) {
+ if(val.length > 0){
+ this.setData({
+ 'condition.typeId': val[0].id,
+ 'condition.typeText': val[0].text,
+ })
+ }
+ },
+ },
+ lifetimes: {
+ created: function(){
+ //在组件实例刚刚被创建时执行,注意此时不能调用 setData
+ },
+ attached: function () {
+ //在组件实例进入页面节点树时执行
+
+ },
+ ready: function () {
+ // 在组件在视图层布局完成后执行
+
+
+ },
+ detached: function () {
+ // 在组件实例被从页面节点树移除时执行
+ },
+
+ },
+ /**
+ * 组件的初始数据
+ */
+ data: {
+ show: false,
+
+ startDateData:[],
+ endDateData:[],
+
+ condition:{
+ typeId:'',
+ typeText:'',
+ startDate:'',
+ endDate:'',
+ },
+ },
+
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+ //打开筛选弹窗
+ showPopup() {
+
+ this.setData({ show: true });
+ },
+ //关闭筛选弹窗
+ onClose() {
+ this.setData({ show: false });
+ },
+
+ //凭证类型筛选
+ onSelectChange(event){
+ this.setData({
+ 'condition.typeId': event.detail.value.id,
+ 'condition.typeText': event.detail.value.text,
+ })
+ },
+
+ //开始日期
+ onStartDate(e){
+ this.setData({
+ 'condition.startDate': e.detail,
+ })
+
+ },
+ //结束日期
+ onEndDate(e){
+ this.setData({
+ 'condition.endDate': e.detail,
+ })
+ },
+
+ //确认按钮
+ onConfirm(){
+ var start = new Date(this.data.condition.startDate)
+ var end = new Date(this.data.condition.endDate)
+ if(start > end){
+ Toast.fail('开始时间不能大于结束时间');
+ }else{
+ this.triggerEvent('screen',this.data.condition)
+ this.setData({ show: false});
+ }
+ }
+ }
+})
diff --git a/yanzhu-ui-app/miniprogram/pages/components/pz-screen/index.json b/yanzhu-ui-app/miniprogram/pages/components/pz-screen/index.json
new file mode 100644
index 00000000..e8cfaaf8
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/pz-screen/index.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/components/pz-screen/index.wxml b/yanzhu-ui-app/miniprogram/pages/components/pz-screen/index.wxml
new file mode 100644
index 00000000..f8933d60
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/pz-screen/index.wxml
@@ -0,0 +1,37 @@
+
+筛选
+
+
+
+
+
+ 取消
+ 筛选
+ 确认
+
+ 凭证类型
+
+
+
+ 上传时间
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/components/pz-screen/index.wxss b/yanzhu-ui-app/miniprogram/pages/components/pz-screen/index.wxss
new file mode 100644
index 00000000..fde3c3c8
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/pz-screen/index.wxss
@@ -0,0 +1,104 @@
+/* pages/components/pz-screen/index.wxss */
+.option_list_max{
+ padding-bottom: 30rpx;
+}
+.pz_screen{
+ background: url("http://fileimg.makalu.cc/WEB_8F23E43145C9406D89C8415E48C6139A.png") no-repeat left/25rpx 25rpx;
+ padding-left: 35rpx;
+ color: #788fd2;
+ font-size: 26rpx;
+}
+/* pages/components/deep-select/index.wxss */
+.celect_frame_max{
+ padding: 15rpx;
+ background: #2b345b;
+ border-radius: 10rpx;
+}
+.celect_frame_min{
+ padding:0 40rpx 0 5rpx;
+ overflow: hidden;
+ white-space:nowrap;
+ text-overflow:ellipsis;
+ background: url("http://fileimg.makalu.cc/WEB_C8096DD21F86451B8D14820056066CFA.png") no-repeat right/30rpx 30rpx;
+}
+.celect_frame_min.active{
+ color: #7a8ac9;
+}
+.popup_style{
+ background: #232a44 !important;
+}
+
+.option_list_title{
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 20rpx;
+
+}
+.option_list_title_btn{
+ color: #1989fa;
+ font-size: 30rpx;
+}
+.option_list_min{
+ padding: 20rpx;
+}
+.option_list_con{
+ min-height: 160rpx;
+ max-height: 240rpx;
+ overflow: auto;
+}
+.option_list_con view{
+ height: 80rpx;
+ text-align: center;
+ line-height: 80rpx;
+ color: #7d94d7;
+}
+.option_list_con .active{
+ background: #273051;
+ color: #ffffff;
+}
+.pzzj_screen_title{
+ padding: 30rpx 50rpx;
+ font-size: 30rpx;
+}
+.pzzj_screen_time{
+ padding: 30rpx;
+}
+
+.time_select_style{
+ background: none !important;
+}
+
+.time_active_style{
+ color: #ffffff !important;
+}
+.time_list_style{
+ background: none !important;
+ color: #546696 !important;
+}
+.pzzj_screen_time_bar{
+ margin-top: 44px;
+ text-align: center;
+ height: 44px;
+ line-height: 44px;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/components/select-btn/index.js b/yanzhu-ui-app/miniprogram/pages/components/select-btn/index.js
new file mode 100644
index 00000000..08a8a8d3
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/select-btn/index.js
@@ -0,0 +1,28 @@
+// pages/components/select-btn/index.js
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+
+ },
+
+ /**
+ * 组件的初始数据
+ */
+ data: {
+ navBtn:1,
+ },
+
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+ onSelectBtn(e){
+ this.setData({
+ navBtn:e.currentTarget.dataset.index
+ })
+ this.triggerEvent('change',e.currentTarget.dataset.index)
+ }
+ }
+})
diff --git a/yanzhu-ui-app/miniprogram/pages/components/select-btn/index.json b/yanzhu-ui-app/miniprogram/pages/components/select-btn/index.json
new file mode 100644
index 00000000..e8cfaaf8
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/select-btn/index.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/components/select-btn/index.wxml b/yanzhu-ui-app/miniprogram/pages/components/select-btn/index.wxml
new file mode 100644
index 00000000..7034b645
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/select-btn/index.wxml
@@ -0,0 +1,5 @@
+
+
+ 单次
+ 累计
+
diff --git a/yanzhu-ui-app/miniprogram/pages/components/select-btn/index.wxss b/yanzhu-ui-app/miniprogram/pages/components/select-btn/index.wxss
new file mode 100644
index 00000000..1017acb3
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/select-btn/index.wxss
@@ -0,0 +1,36 @@
+/* pages/components/select-btn/index.wxss */
+
+.select_btn{
+ display: flex;
+ align-items: center;
+ font-size: 26rpx;
+ color:#737478;
+}
+.select_btn view{
+ background: #262d4a;
+ padding: 12rpx 30rpx;
+}
+.select_btn view:first-child{
+ border-radius: 50rpx 0 0 50rpx;
+}
+.select_btn view:last-child{
+ border-radius:0 50rpx 50rpx 0;
+}
+.select_btn .active{
+ color: #88a3ea;
+ background: #2e355f;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/components/select-date/index.js b/yanzhu-ui-app/miniprogram/pages/components/select-date/index.js
new file mode 100644
index 00000000..18a23770
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/select-date/index.js
@@ -0,0 +1,65 @@
+// pages/components/select-date/index.js
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+ counts:{
+ type:Number
+ },
+ maxDate:{
+ type:Number,
+ value:new Date().getTime()
+ },
+ minDate:{
+ type:Number,
+ value:new Date(2020,1,1).getTime()
+ },
+ currentDate:{
+ type:Number,
+ value:new Date().getTime()
+ }
+ },
+
+ observers: {
+ counts: function (val) {
+ if(val){
+ this.setData({
+ count: val
+ });
+ }
+ },
+ },
+ /**
+ * 组件的初始数据
+ */
+ data: {
+ count:3,
+ formatter(type, value) {
+ if (type === 'year') {
+ return `${value}`;
+ }
+ if (type === 'month') {
+ return `${value}`;
+ }
+ return value;
+ },
+ },
+
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+ onInput(event) {
+ this.setData({
+ currentDate: event.detail,
+ });
+ let date = new Date(event.detail)
+ let Y = date.getFullYear()
+ let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1)
+ let D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ''
+ var lot = Y + '-' + M + '-' + D
+ this.triggerEvent('change',lot)
+ },
+ }
+})
diff --git a/yanzhu-ui-app/miniprogram/pages/components/select-date/index.json b/yanzhu-ui-app/miniprogram/pages/components/select-date/index.json
new file mode 100644
index 00000000..e8cfaaf8
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/select-date/index.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/components/select-date/index.wxml b/yanzhu-ui-app/miniprogram/pages/components/select-date/index.wxml
new file mode 100644
index 00000000..1f56c14b
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/select-date/index.wxml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/components/select-date/index.wxss b/yanzhu-ui-app/miniprogram/pages/components/select-date/index.wxss
new file mode 100644
index 00000000..49054a87
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/select-date/index.wxss
@@ -0,0 +1,13 @@
+/* pages/components/select-date/index.wxss */
+
+ .time_select_style{
+ background: none !important;
+ }
+
+ .time_active_style{
+ color: #ffffff !important;
+ }
+ .time_list_style{
+ background: none !important;
+ color: #546696 !important;
+ }
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/components/sign/sign.js b/yanzhu-ui-app/miniprogram/pages/components/sign/sign.js
new file mode 100644
index 00000000..7b58f18c
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/sign/sign.js
@@ -0,0 +1,205 @@
+
+Component({
+ behaviors: ["wx://form-field"], //,"wx://form-field-group"
+ /**
+ * 组件的对外属性
+ */
+ properties: {
+ show: {
+ type: Boolean,
+ value: false,
+ },
+ canvasId:{
+ type:String,
+ value:"mkl_canvas"
+ },
+ imageUrl:{
+ value:"",
+ type: String
+ }
+ },
+ observers:{
+ imageUrl(val){
+ if(val.length <= 0){
+ this.cleardraw()
+ this.setData({
+ showimg:true
+ })
+ }
+ }
+ },
+ /**
+ * 组件的初始数据
+ */
+ data: {
+ signShow:false,
+ context : null,// 使用 wx.createContext 获取绘图上下文
+ isButtonDown : false,
+ arrx : [],
+ arry : [],
+ arrz : [],
+ canvasw : 0,
+ canvash : 0,
+ showimg:true,
+ height:'',
+ btnHeight:'',
+ type:0
+ },
+ /**
+ * 组件的方法列表
+ */
+ ready: function () {
+ let properties = this.properties;
+ let that = this;
+ setTimeout(function(){
+ if(properties.imageUrl){
+ that.setData({
+ showimg: false,
+ type:1,
+ imageUrl:properties.imageUrl
+ })
+ }else{
+ that.setData({
+ type:0
+ })
+ }
+ },400);
+
+ this.init()
+ },
+ methods: {
+ init(){
+ let that = this;
+ wx.getSystemInfo({
+ success: function(res){
+ that.setData({
+ height:(res.windowHeight-150)+"px",
+ btnHeight:(res.windowHeight-150) / 3+"px"
+ })
+ }
+ })
+ //获取系统信息
+ wx.getSystemInfo({
+ success: function (res) {
+ const {canvasId} = that.properties;
+ // 使用 wx.createContext 获取绘图上下文 context
+ let context = wx.createCanvasContext(canvasId,that);
+ context.beginPath()
+ context.setStrokeStyle('#000000');
+ context.setLineWidth(4);
+ context.setLineCap('round');
+ context.setLineJoin('round');
+ that.setData({
+ context:context,
+ canvasw :res.windowWidth,//设备宽度
+ canvash : res.windowHeight, //设备高度
+ });
+ }
+ });
+
+
+ },
+ canvasIdErrorCallback: function (e) {
+ console.error(e.detail.errMsg)
+ },
+ //绘制开始
+ canvasStart: function (event) {
+ let {arrz,arrx,arry}= this.data;
+ arrz.push(0);
+ arrx.push(event.changedTouches[0].x);
+ arry.push(event.changedTouches[0].y);
+ this.setData({
+ isButtonDown : true,
+ arrz,arrx,arry
+ })
+ },
+ //绘制过程
+ canvasMove: function (event) {
+ let {arrz,arrx,arry,isButtonDown,context,canvasw,canvash}= this.data;
+ if (isButtonDown) {
+ arrz.push(1);
+ arrx.push(event.changedTouches[0].x);
+ arry.push(event.changedTouches[0].y);
+ };
+ for (var i = 0; i < arrx.length; i++) {
+ if (arrz[i] == 0) {
+ context.moveTo(arrx[i], arry[i])
+ } else {
+ context.lineTo(arrx[i], arry[i])
+ };
+ };
+ context.clearRect(0, 0, canvasw, canvash);
+
+ context.setStrokeStyle('#000000');
+ context.setLineWidth(4);
+ context.setLineCap('round');
+ context.setLineJoin('round');
+ context.stroke();
+
+ context.draw(false);
+ this.setData({
+ arrz,arrx,arry,context,canvasw,canvash
+ })
+ },
+ canvasEnd: function (event) {
+ this.setData({
+ isButtonDown : false
+ })
+ },
+ cleardraw: function () {
+ let {arrz,arrx,arry,context,canvasw,canvash}= this.data;
+ //清除画布
+ arrx = [];
+ arry = [];
+ arrz = [];
+ if(context != null){
+ context.clearRect(0, 0, canvasw, canvash);
+ context.draw(true);
+ this.setData({
+ arrz,arrx,arry,context,canvasw,canvash
+ })
+ }
+
+ },
+ //导出图片
+ getimg: function () {
+ this.triggerEvent("addto",true);
+ let {arrx}= this.data;
+ if (arrx.length == 0) {
+ wx.showModal({
+ title: '提示',
+ content: '签名内容不能为空!',
+ showCancel: false
+ });
+ return false;
+ };
+ const {canvasId} = this.properties;
+ //生成图片
+ let that = this;
+ wx.canvasToTempFilePath({
+ canvasId: canvasId,
+ success: function (res) {
+ that.setData({
+ imageUrl:res.tempFilePath,
+ signShow:false,
+ showimg:false,
+ type:0
+ })
+ that.triggerEvent("returnData",res.tempFilePath);
+ }
+ },this)
+ },
+ showSign:function(){
+ this.triggerEvent("addto",false);
+ this.setData({
+ signShow:true,
+ })
+ },
+ onClose:function(){
+ this.triggerEvent("addto",true);
+ this.setData({
+ signShow:false,
+ })
+ }
+ },
+});
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/components/sign/sign.json b/yanzhu-ui-app/miniprogram/pages/components/sign/sign.json
new file mode 100644
index 00000000..310aa4be
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/sign/sign.json
@@ -0,0 +1,8 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-popup": "@vant/weapp/popup/index",
+ "van-row": "@vant/weapp/row",
+ "van-col": "@vant/weapp/col"
+ }
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/components/sign/sign.wxml b/yanzhu-ui-app/miniprogram/pages/components/sign/sign.wxml
new file mode 100644
index 00000000..5e818ec3
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/sign/sign.wxml
@@ -0,0 +1,65 @@
+
+
+
+
+ 点击签名
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/components/sign/sign.wxss b/yanzhu-ui-app/miniprogram/pages/components/sign/sign.wxss
new file mode 100644
index 00000000..6455111f
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/sign/sign.wxss
@@ -0,0 +1,98 @@
+/* pages/qianming/qianming.wxss */
+
+/* page{
+ overflow: hidden;
+} */
+.canvas_view{
+ padding: 20rpx;
+ border-radius: 10rpx;
+}
+
+.canvas {
+ width: 100%;
+ box-sizing: border-box;
+ background: #eeeeee;
+ }
+
+ .sign_div{
+ padding: 20rpx 0;
+ height: 170rpx;
+ }
+ .sign_div_min{
+ padding: 20rpx;
+ height: 150rpx;
+ background:#f4f4f4;
+ border-radius: 15rpx;
+ line-height: 150rpx;
+ color: #aaa;
+ }
+
+ .sign_btn {
+ text-align: center;
+ }
+ .sign_btn button{
+ width: 150rpx;
+ height: 60rpx;
+ line-height: 60rpx;
+ font-size: 30rpx;
+ color: #ffffff;
+ }
+ .sign_btn_qc button{
+ background:#ffbd02;
+ }
+ .sign_btn_qr button{
+ background:#1397fc;
+ }
+
+ .popup_view{
+ padding-top: 164rpx;
+ }
+ .view_btn{
+ border: 1px solid #fff;
+ }
+ .max_btn{
+ width: 180rpx;
+ height: 180rpx;
+ margin-top: 150rpx;
+ }
+ .min_btn{
+ width: 180rpx;
+ height: 70rpx;
+ border-radius: 10rpx;
+ text-align: center;
+ line-height: 70rpx;
+ margin-top: 55rpx;
+ transform: rotate(90deg);
+ color: #ffffff;
+ }
+ .btn_qd{
+ background:#3a9bfc ;
+ }
+ .btn_qc{
+ background: #f9ba00;
+ }
+ .btn_gb{
+ background: #ff7800;
+}
+.popup_fixed{
+ position: fixed;
+ width: 100%;
+ height: 100%;
+ top: 0;
+ height: 0;
+ background: #ffffff;
+}
+.qm_img{
+ height: 300rpx;
+ width: 150rpx;
+ position: relative;
+ top: -75rpx;
+ transform: rotate(270deg);
+}
+
+.qm_img_no{
+ height: 150rpx;
+ width: 280rpx;
+ position: relative;
+
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/components/voucher-date/index.js b/yanzhu-ui-app/miniprogram/pages/components/voucher-date/index.js
new file mode 100644
index 00000000..8d3484b1
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/voucher-date/index.js
@@ -0,0 +1,95 @@
+// pages/components/voucher-select/index.js
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+ width:{
+ type:String
+ },
+ counts:{
+ type:Number
+ },
+ placeholder:{
+ type:String
+ },
+ time:{
+ type:String
+ },
+ maxDate:{
+ type:Number,
+ value:new Date().getTime()
+ },
+ minDate:{
+ type:Number
+ },
+ value:{
+ type:String,
+ value:''
+ },
+ currentDate:{
+ type:Number,
+ value:new Date().getTime()
+ }
+ },
+ /**数据监听 */
+ observers: {
+ counts: function (val) {
+ this.setData({
+ item:val[0],
+ })
+ },
+ time:function(val){
+ this.setData({
+ value:val
+ })
+ }
+ },
+ lifetimes: {
+ created: function(){
+ //在组件实例刚刚被创建时执行,注意此时不能调用 setData
+ },
+ attached: function () {
+ //在组件实例进入页面节点树时执行
+ },
+ ready: function () {
+ // 在组件在视图层布局完成后执行
+ },
+ detached: function () {
+ // 在组件实例被从页面节点树移除时执行
+ },
+
+ },
+
+ /**
+ * 组件的初始数据
+ */
+ data: {
+ show: false,
+ date:''
+ },
+
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+ showPopup() {
+ this.setData({ show: true });
+ },
+ onClose() {
+ this.setData({ show: false });
+ },
+ onChangeDate(e){
+ this.setData({
+ date:e.detail
+ })
+ },
+ onConfirm(){
+ this.setData({
+ value:this.data.date
+ })
+ this.triggerEvent('change',this.data.date)
+ this.setData({ show: false });
+ }
+ }
+})
diff --git a/yanzhu-ui-app/miniprogram/pages/components/voucher-date/index.json b/yanzhu-ui-app/miniprogram/pages/components/voucher-date/index.json
new file mode 100644
index 00000000..e8cfaaf8
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/voucher-date/index.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/components/voucher-date/index.wxml b/yanzhu-ui-app/miniprogram/pages/components/voucher-date/index.wxml
new file mode 100644
index 00000000..5f5d7a59
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/voucher-date/index.wxml
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+ {{placeholder}}
+ 确认
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/components/voucher-date/index.wxss b/yanzhu-ui-app/miniprogram/pages/components/voucher-date/index.wxss
new file mode 100644
index 00000000..0a6d8ecb
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/voucher-date/index.wxss
@@ -0,0 +1,68 @@
+/* pages/components/voucher-select/index.wxss */
+
+.voucher_select_max{
+ padding:0 25rpx;
+ display: flex;
+ align-items: center;
+ background: #212737;
+ height: 90rpx;
+ border-radius: 10rpx;
+}
+
+.voucher_select_min{
+ width: calc(100% - 30rpx);
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+.voucher_select_icon{
+ width: 30rpx;
+ height: 30rpx;
+}
+.voucher_select_icon image{
+ width: 100%;
+ height: 100%;
+}
+
+
+.option_list_title{
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 20rpx;
+ color: #06d4f8;
+ }
+ .option_list_title_btn{
+ color: #1989fa;
+ font-size: 30rpx;
+ }
+
+.popup_style{
+ background: #232a44 !important;
+ }
+.time_select_style{
+ background: none !important;
+}
+
+.time_active_style{
+ color: #ffffff !important;
+}
+.time_list_style{
+ background: none !important;
+ color: #546696 !important;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/components/voucher-datetime/index.js b/yanzhu-ui-app/miniprogram/pages/components/voucher-datetime/index.js
new file mode 100644
index 00000000..4bbc863c
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/voucher-datetime/index.js
@@ -0,0 +1,135 @@
+// pages/components/voucher-select/index.js
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+ width:{
+ type:String
+ },
+ counts:{
+ type:Number
+ },
+ placeholder:{
+ type:String
+ },
+ time:{
+ type:String
+ },
+ maxDate:{
+ type:Number,
+ value:new Date().getTime()
+ },
+ value:{
+ type:String,
+ value:''
+ },
+ currentDate:{
+ type:Number
+ }
+ },
+ /**数据监听 */
+ observers: {
+ counts: function (val) {
+ this.setData({
+ item:val[0],
+ })
+ },
+ time:function(val){
+ var that = this
+ that.setData({
+ value:val,
+ // date:val
+ })
+ // that.onConfirm()
+ }
+ },
+ lifetimes: {
+ created: function(){
+ //在组件实例刚刚被创建时执行,注意此时不能调用 setData
+ },
+ attached: function () {
+ //在组件实例进入页面节点树时执行
+ },
+ ready: function () {
+ // 在组件在视图层布局完成后执行
+ },
+ detached: function () {
+ // 在组件实例被从页面节点树移除时执行
+ },
+
+ },
+
+ /**
+ * 组件的初始数据
+ */
+ data: {
+ show: false,
+ date:'',
+ minDate: new Date(2022,1,1).getTime(),
+ counts:'5',
+ formatter(type, value) {
+ if (type === 'year') {
+ return `${value}`;
+ }
+ if (type === 'month') {
+ return `${value}`;
+ }
+ return value;
+ },
+
+ },
+
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+ showPopup() {
+ this.setData({
+ show: true
+ });
+ },
+ onClose() {
+ this.setData({
+ show: false
+ });
+ },
+ onConfirm() {
+ this.setData({
+ value: this.data.date
+ })
+
+ this.triggerEvent('change', this.data.date)
+ this.setData({
+ show: false
+ });
+ },
+ formatter(type, value) {
+ if (type === 'year') {
+ return `${value}`;
+ }
+ if (type === 'month') {
+ return `${value}`;
+ }
+ return value;
+ },
+ /**
+ * 组件的方法列表
+ */
+ onInput(event) {
+ let date = new Date(event.detail)
+ let Y = date.getFullYear();
+ let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1);
+ let D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + '';
+ let H = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + '';
+ let I = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + '';
+ var lot = Y + '-' + M + '-' + D + ' ' + H + ':' + I +':00';
+ this.setData({
+ date: lot,
+ });
+ },
+
+ },
+
+
+})
diff --git a/yanzhu-ui-app/miniprogram/pages/components/voucher-datetime/index.json b/yanzhu-ui-app/miniprogram/pages/components/voucher-datetime/index.json
new file mode 100644
index 00000000..1eb15585
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/voucher-datetime/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-datetime-picker": "@vant/weapp/datetime-picker/index"
+ }
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/components/voucher-datetime/index.wxml b/yanzhu-ui-app/miniprogram/pages/components/voucher-datetime/index.wxml
new file mode 100644
index 00000000..50fee916
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/voucher-datetime/index.wxml
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+ {{placeholder}}
+ 确认
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/components/voucher-datetime/index.wxss b/yanzhu-ui-app/miniprogram/pages/components/voucher-datetime/index.wxss
new file mode 100644
index 00000000..0a6d8ecb
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/voucher-datetime/index.wxss
@@ -0,0 +1,68 @@
+/* pages/components/voucher-select/index.wxss */
+
+.voucher_select_max{
+ padding:0 25rpx;
+ display: flex;
+ align-items: center;
+ background: #212737;
+ height: 90rpx;
+ border-radius: 10rpx;
+}
+
+.voucher_select_min{
+ width: calc(100% - 30rpx);
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+.voucher_select_icon{
+ width: 30rpx;
+ height: 30rpx;
+}
+.voucher_select_icon image{
+ width: 100%;
+ height: 100%;
+}
+
+
+.option_list_title{
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 20rpx;
+ color: #06d4f8;
+ }
+ .option_list_title_btn{
+ color: #1989fa;
+ font-size: 30rpx;
+ }
+
+.popup_style{
+ background: #232a44 !important;
+ }
+.time_select_style{
+ background: none !important;
+}
+
+.time_active_style{
+ color: #ffffff !important;
+}
+.time_list_style{
+ background: none !important;
+ color: #546696 !important;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/components/voucher-many-select/index.js b/yanzhu-ui-app/miniprogram/pages/components/voucher-many-select/index.js
new file mode 100644
index 00000000..1de9df58
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/voucher-many-select/index.js
@@ -0,0 +1,83 @@
+// pages/components/voucher-select/index.js
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+ columns:{
+ type:Array
+ },
+ placeholder:{
+ type:String
+ },
+ },
+ /**数据监听 */
+ observers: {
+ columns: function (val) {
+ let arrData = val.filter(x => x.type == true);
+ this.setData({
+ forData:val,
+ echoData:arrData
+ })
+ },
+ },
+ lifetimes: {
+ created: function(){
+ //在组件实例刚刚被创建时执行,注意此时不能调用 setData
+ },
+ attached: function () {
+ //在组件实例进入页面节点树时执行
+ },
+ ready: function () {
+ // 在组件在视图层布局完成后执行
+ },
+ detached: function () {
+ // 在组件实例被从页面节点树移除时执行
+ },
+
+ },
+
+ /**
+ * 组件的初始数据
+ */
+ data: {
+
+ show: false,
+ forData:[],
+ echoData:[],
+ },
+
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+ showPopup() {
+ this.setData({ show: true });
+ },
+ onClose() {
+ this.setData({ show: false });
+ },
+ onSelectChange(e){
+ var data = this.data.forData
+ var index = e.currentTarget.dataset.index
+ if(data[index].type == false){
+ data[index].type = true
+ }else{
+ data[index].type = false
+ }
+ this.setData({
+ forData:data
+ })
+ },
+
+ onConfirm(){
+ var data = this.data.forData
+ let arrData = data.filter(x => x.type == true);
+ this.setData({
+ echoData:arrData
+ })
+ this.triggerEvent('change',arrData)
+ this.setData({ show: false });
+ }
+ }
+})
diff --git a/yanzhu-ui-app/miniprogram/pages/components/voucher-many-select/index.json b/yanzhu-ui-app/miniprogram/pages/components/voucher-many-select/index.json
new file mode 100644
index 00000000..e8cfaaf8
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/voucher-many-select/index.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/components/voucher-many-select/index.wxml b/yanzhu-ui-app/miniprogram/pages/components/voucher-many-select/index.wxml
new file mode 100644
index 00000000..a228d825
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/voucher-many-select/index.wxml
@@ -0,0 +1,60 @@
+
+
+
+
+ {{placeholder}}
+
+ {{item.text}}
+
+
+
+
+
+
+
+
+
+
+ 取消
+ {{placeholder}}
+ 确认
+
+
+ {{item.text}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/components/voucher-many-select/index.wxss b/yanzhu-ui-app/miniprogram/pages/components/voucher-many-select/index.wxss
new file mode 100644
index 00000000..43f2c903
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/voucher-many-select/index.wxss
@@ -0,0 +1,102 @@
+/* pages/components/voucher-select/index.wxss */
+
+.voucher_select_max{
+ padding:5rpx 25rpx;
+ display: flex;
+ background: #212737;
+ position: relative;
+ border-radius: 10rpx;
+}
+
+.voucher_select_min{
+ width: calc(100% - 30rpx);
+
+}
+.voucher_select_for{
+ height: 80rpx;
+ line-height: 80rpx;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+
+}
+
+.voucher_select_icon{
+ width: 30rpx;
+ height: 30rpx;
+ position: relative;
+ top: 25rpx;
+}
+.voucher_select_icon image{
+ width: 100%;
+ height: 100%;
+}
+
+.voucher_select_placeholder{
+ color: #6777aa;
+ height: 80rpx;
+ line-height: 80rpx;
+}
+.option_list_max{
+ height: 450rpx;
+ overflow: auto;
+}
+.option_list_list{
+ height: 90rpx;
+ text-align: center;
+ color: #546696;
+ line-height: 90rpx;
+}
+.option_list_list.active{
+ color: #ffffff;
+}
+
+
+
+
+
+
+
+
+
+.option_list_title{
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 20rpx;
+ color: #06d4f8;
+ }
+ .option_list_title_btn{
+ color: #1989fa;
+ font-size: 30rpx;
+ }
+
+.popup_style{
+ background: #232a44 !important;
+ }
+.time_select_style{
+ background: none !important;
+}
+
+.time_active_style{
+ color: #ffffff !important;
+}
+.time_list_style{
+ background: none !important;
+ color: #546696 !important;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/components/voucher-select/index.js b/yanzhu-ui-app/miniprogram/pages/components/voucher-select/index.js
new file mode 100644
index 00000000..cdf5df5b
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/voucher-select/index.js
@@ -0,0 +1,112 @@
+// pages/components/voucher-select/index.js
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+ columns:{
+ type:Array
+ },
+ placeholder:{
+ type:String
+ },
+ selectValue:{
+ type:String
+ },
+ selectIndex:{
+ type:String
+ },
+ background:{
+ type:String
+ },
+ value:{
+ type:String,
+ value:""
+ }
+ },
+ /**数据监听 */
+ observers: {
+ columns: function (val) {
+ if(val.length > 0) {
+ this.setData({
+ item:val[0],
+ value:val[0].text
+ })
+ } else {
+ this.setData({
+ item:[],
+ value:''
+ })
+ }
+ },
+ selectValue:function(val){
+ let columns = this.data.columns;
+ if(val && columns){
+ for(let i=0;i
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+ {{placeholder}}
+ 确认
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/components/voucher-select/index.wxss b/yanzhu-ui-app/miniprogram/pages/components/voucher-select/index.wxss
new file mode 100644
index 00000000..0a6d8ecb
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/voucher-select/index.wxss
@@ -0,0 +1,68 @@
+/* pages/components/voucher-select/index.wxss */
+
+.voucher_select_max{
+ padding:0 25rpx;
+ display: flex;
+ align-items: center;
+ background: #212737;
+ height: 90rpx;
+ border-radius: 10rpx;
+}
+
+.voucher_select_min{
+ width: calc(100% - 30rpx);
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+.voucher_select_icon{
+ width: 30rpx;
+ height: 30rpx;
+}
+.voucher_select_icon image{
+ width: 100%;
+ height: 100%;
+}
+
+
+.option_list_title{
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 20rpx;
+ color: #06d4f8;
+ }
+ .option_list_title_btn{
+ color: #1989fa;
+ font-size: 30rpx;
+ }
+
+.popup_style{
+ background: #232a44 !important;
+ }
+.time_select_style{
+ background: none !important;
+}
+
+.time_active_style{
+ color: #ffffff !important;
+}
+.time_list_style{
+ background: none !important;
+ color: #546696 !important;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/components/voucher-selected/index.js b/yanzhu-ui-app/miniprogram/pages/components/voucher-selected/index.js
new file mode 100644
index 00000000..f543c38e
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/voucher-selected/index.js
@@ -0,0 +1,92 @@
+// pages/components/voucher-select/index.js
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+ columns:{
+ type:Array
+ },
+ placeholder:{
+ type:String
+ },
+ selectValue:{
+ type:String
+ },
+ selectIndex:{
+ type:String
+ },
+ background:{
+ type:String
+ }
+ },
+ /**数据监听 */
+ observers: {
+ columns: function (val) {
+ this.setData({
+ item:val[0],
+ })
+ },
+ selectValue:function(val){
+ this.setData({
+ value:val
+ })
+ },
+ selectIndex:function(val){
+ this.setData({
+ index:val
+ })
+ }
+ },
+ lifetimes: {
+ created: function(){
+ //在组件实例刚刚被创建时执行,注意此时不能调用 setData
+ },
+ attached: function () {
+ //在组件实例进入页面节点树时执行
+ },
+ ready: function () {
+ // 在组件在视图层布局完成后执行
+ },
+ detached: function () {
+ // 在组件实例被从页面节点树移除时执行
+ },
+
+ },
+
+ /**
+ * 组件的初始数据
+ */
+ data: {
+
+ show: false,
+ value:'',
+ item:'',
+ index:''
+
+ },
+
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+ showPopup() {
+ this.setData({ show: true });
+ },
+ onClose() {
+ this.setData({ show: false });
+ },
+ onSelectChange(e){
+ this.setData({
+ item:e.detail.value
+ })
+ },
+ onConfirm(){
+ this.setData({
+ value:this.data.item.text
+ })
+ this.triggerEvent('change',this.data.item)
+ this.setData({ show: false });
+ }
+ }
+})
diff --git a/yanzhu-ui-app/miniprogram/pages/components/voucher-selected/index.json b/yanzhu-ui-app/miniprogram/pages/components/voucher-selected/index.json
new file mode 100644
index 00000000..e8cfaaf8
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/voucher-selected/index.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/components/voucher-selected/index.wxml b/yanzhu-ui-app/miniprogram/pages/components/voucher-selected/index.wxml
new file mode 100644
index 00000000..5ac21537
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/voucher-selected/index.wxml
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+ {{placeholder}}
+ 确认
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/components/voucher-selected/index.wxss b/yanzhu-ui-app/miniprogram/pages/components/voucher-selected/index.wxss
new file mode 100644
index 00000000..291c4d0b
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/voucher-selected/index.wxss
@@ -0,0 +1,69 @@
+/* pages/components/voucher-select/index.wxss */
+
+.voucher_select_max{
+ padding:0 25rpx;
+ display: flex;
+ align-items: center;
+ background: #212737;
+ height: 90rpx;
+ border-radius: 10rpx;
+}
+
+.voucher_select_min{
+ width: calc(100% - 30rpx);
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+.voucher_select_icon{
+ width: 42rpx;
+ height: 42rpx;
+ margin:0 10rpx;
+}
+.voucher_select_icon image{
+ width: 100%;
+ height: 100%;
+}
+
+
+.option_list_title{
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 20rpx;
+ color: #06d4f8;
+ }
+ .option_list_title_btn{
+ color: #1989fa;
+ font-size: 30rpx;
+ }
+
+.popup_style{
+ background: #232a44 !important;
+ }
+.time_select_style{
+ background: none !important;
+}
+
+.time_active_style{
+ color: #ffffff !important;
+}
+.time_list_style{
+ background: none !important;
+ color: #546696 !important;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/components/voucher-selects/index.js b/yanzhu-ui-app/miniprogram/pages/components/voucher-selects/index.js
new file mode 100644
index 00000000..0d372dbf
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/voucher-selects/index.js
@@ -0,0 +1,95 @@
+// pages/components/voucher-select/index.js
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+ columns:{
+ type:Array
+ },
+ placeholder:{
+ type:String
+ },
+ selectValue:{
+ type:String
+ },
+ selectIndex:{
+ type:String
+ },
+ background:{
+ type:String
+ },
+ height:{
+ type:String
+ }
+ },
+ /**数据监听 */
+ observers: {
+ columns: function (val) {
+ this.setData({
+ item:val[0],
+ })
+ },
+ selectValue:function(val){
+ this.setData({
+ value:val
+ })
+ },
+ selectIndex:function(val){
+ this.setData({
+ index:val
+ })
+ }
+ },
+ lifetimes: {
+ created: function(){
+ //在组件实例刚刚被创建时执行,注意此时不能调用 setData
+ },
+ attached: function () {
+ //在组件实例进入页面节点树时执行
+ },
+ ready: function () {
+ // 在组件在视图层布局完成后执行
+ },
+ detached: function () {
+ // 在组件实例被从页面节点树移除时执行
+ },
+
+ },
+
+ /**
+ * 组件的初始数据
+ */
+ data: {
+
+ show: false,
+ value:'',
+ item:'',
+ index:''
+
+ },
+
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+ showPopup() {
+ this.setData({ show: true });
+ },
+ onClose() {
+ this.setData({ show: false });
+ },
+ onSelectChange(e){
+ this.setData({
+ item:e.detail.value
+ })
+ },
+ onConfirm(){
+ this.setData({
+ value:this.data.item.text
+ })
+ this.triggerEvent('change',this.data.item)
+ this.setData({ show: false });
+ }
+ }
+})
diff --git a/yanzhu-ui-app/miniprogram/pages/components/voucher-selects/index.json b/yanzhu-ui-app/miniprogram/pages/components/voucher-selects/index.json
new file mode 100644
index 00000000..e8cfaaf8
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/voucher-selects/index.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/components/voucher-selects/index.wxml b/yanzhu-ui-app/miniprogram/pages/components/voucher-selects/index.wxml
new file mode 100644
index 00000000..13a29522
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/voucher-selects/index.wxml
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+ {{placeholder}}
+ 确认
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/components/voucher-selects/index.wxss b/yanzhu-ui-app/miniprogram/pages/components/voucher-selects/index.wxss
new file mode 100644
index 00000000..0a6d8ecb
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/components/voucher-selects/index.wxss
@@ -0,0 +1,68 @@
+/* pages/components/voucher-select/index.wxss */
+
+.voucher_select_max{
+ padding:0 25rpx;
+ display: flex;
+ align-items: center;
+ background: #212737;
+ height: 90rpx;
+ border-radius: 10rpx;
+}
+
+.voucher_select_min{
+ width: calc(100% - 30rpx);
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+.voucher_select_icon{
+ width: 30rpx;
+ height: 30rpx;
+}
+.voucher_select_icon image{
+ width: 100%;
+ height: 100%;
+}
+
+
+.option_list_title{
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 20rpx;
+ color: #06d4f8;
+ }
+ .option_list_title_btn{
+ color: #1989fa;
+ font-size: 30rpx;
+ }
+
+.popup_style{
+ background: #232a44 !important;
+ }
+.time_select_style{
+ background: none !important;
+}
+
+.time_active_style{
+ color: #ffffff !important;
+}
+.time_list_style{
+ background: none !important;
+ color: #546696 !important;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/index/index.js b/yanzhu-ui-app/miniprogram/pages/index/index.js
new file mode 100644
index 00000000..e825fbc5
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/index/index.js
@@ -0,0 +1,211 @@
+import {
+ findMyTask,
+ getUserInfo,
+ findMyProjectList,
+ selectRoleMenuList
+} from '../../api/publics'
+import {
+ loginOut
+} from '../../api/login'
+import {
+ removeToken
+} from '../../utils/auth'
+import {
+ checkApplyList
+ } from '../../api/projectApply'
+const app = getApp();
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ userData: null,
+ menuList: [],
+ show: false,
+ todoDB: 0,
+ chckDB: 0,
+ isCheckRole: false
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ this.initMenuList();
+ this.loadInfo();
+ this.initMyTask();
+ this.initMyProject();
+ },
+
+ /**
+ * 加载用户信息
+ */
+ loadInfo() {
+ getUserInfo().then(res => {
+ if (res.code == 200) {
+ app.globalData.userData = res.data;
+ this.setData({
+ userData: res.data
+ })
+ let roles = res.data.roles;
+ if(roles!=null && roles.length>0){
+ roles.forEach(role =>{
+ if(role.roleId==88){
+ this.setData({
+ isCheckRole: true,
+ })
+ let params = "activeName=dys&pageNum=1&pageSize=1000";
+ checkApplyList(params).then(dbo =>{
+ this.setData({
+ chckDB: dbo.total,
+ })
+ })
+ }
+ });
+ }
+ }
+ });
+ },
+
+ initMenuList: function () {
+ var that = this;
+ selectRoleMenuList({}).then(res => {
+ if (res.code == 200) {
+ that.setData({
+ menuList: res.data
+ })
+ }
+ });
+ },
+
+ initMyTask: function () {
+ findMyTask({}).then(res => {
+ this.setData({
+ todoDB: res.data.todo
+ })
+ });
+ },
+
+ initMyProject: function () {
+ findMyProjectList().then(res => {
+ if (res.data.length > 0) {
+ let list = [];
+ let activeProject = false;
+ res.data.forEach(item => {
+ //判断选中项目是否在建中...
+ if (item.id == app.globalData.useProjectId) {
+ activeProject = true;
+ }
+ list.push({
+ "id": item.id,
+ "text": item.name
+ });
+ });
+ app.globalData.projectInfoList = list;
+ if (!activeProject) {
+ //没有选中项目默认选中最新项目
+ app.globalData.useProjectId = res.data[0].id;
+ app.globalData.useProjectName = res.data[0].name;
+ }
+ }
+ });
+ },
+
+ /**
+ * 路由跳转
+ */
+ goMenu: function (event) {
+ wx.redirectTo({
+ url: event.currentTarget.dataset.url
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 左侧抽屉显示
+ */
+ showPopup() {
+ this.setData({
+ show: true
+ });
+ },
+
+ /**
+ * 左侧抽屉隐藏
+ */
+ onClosePopup() {
+ this.setData({
+ show: false
+ });
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ },
+
+ /**
+ * 修改密码
+ */
+ XGMM: function () {
+ wx.redirectTo({
+ url: '../updatePwd/updatePwd'
+ })
+ },
+
+ /**
+ * 退出登录
+ */
+ TCDL: function () {
+ loginOut().then(response => {
+ removeToken();
+ wx.redirectTo({
+ url: '../login/login',
+ });
+ });
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/index/index.json b/yanzhu-ui-app/miniprogram/pages/index/index.json
new file mode 100644
index 00000000..ba2821f5
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/index/index.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationStyle":"custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/index/index.wxml b/yanzhu-ui-app/miniprogram/pages/index/index.wxml
new file mode 100644
index 00000000..62f3022e
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/index/index.wxml
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+
+
+ {{userData.parDeptName}}
+
+
+
+
+
+
+
+
+ {{userData.nickName}}
+
+
+
+
+
+
+ 修改密码
+
+
+
+
+
+
+ 退出登录
+
+
+
+
+
+
+
+
+
+
+ {{userData.nickName}}
+
+
+ {{userData.dept.deptName}}
+
+
+ {{userData.parDeptName}}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/index/index.wxss b/yanzhu-ui-app/miniprogram/pages/index/index.wxss
new file mode 100644
index 00000000..f29d951b
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/index/index.wxss
@@ -0,0 +1,64 @@
+page {
+ background: #191d28 url("http://fileimg.makalu.cc/CORE_40247DD946964A15AA0D4000E1031E19.png") no-repeat bottom/100%;
+ }
+.pro_user {
+ background: url("https://guangzhou.sxyanzhu.com/YZLJXM/profile/static/login_name.png") no-repeat left/40rpx;
+ height: 80rpx;
+ line-height: 80rpx;
+ padding-left: 50rpx;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ word-break: break-all;
+}
+
+.pro_dept {
+ background: url("https://guangzhou.sxyanzhu.com/YZLJXM/profile/static/dept.png") no-repeat left/40rpx;
+ height: 80rpx;
+ line-height: 80rpx;
+ padding-left: 50rpx;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ word-break: break-all;
+}
+
+.pro_project {
+ background: url("https://guangzhou.sxyanzhu.com/YZLJXM/profile/static/project.png") no-repeat left/40rpx;
+ height: 80rpx;
+ line-height: 80rpx;
+ padding-left: 50rpx;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ word-break: break-all;
+}
+
+.pro_herads {
+ text-align: right;
+ margin-top: -280rpx;
+}
+
+.pro_herads image {
+ width: 280rpx;
+ height: 280rpx;
+}
+
+.menu_max {
+ padding: 10rpx 50rpx 0;
+}
+
+.menu_min {
+ padding: 30rpx 0;
+ text-align: center;
+}
+
+.menu_min image {
+ width: 150rpx;
+ height: 150rpx;
+}
+
+.menu_min view {
+ padding: 10rpx;
+ color: #89a4eb;
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/login/login.js b/yanzhu-ui-app/miniprogram/pages/login/login.js
new file mode 100644
index 00000000..2c1e07bc
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/login/login.js
@@ -0,0 +1,133 @@
+import {
+ getToken,
+ setToken
+} from '../../utils/auth'
+import {
+ login,
+ getCodeImg,
+ refreshUser,
+} from '../../api/login'
+
+const app = getApp();
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ username: '',
+ password: '',
+ code: '',
+ uuid: '',
+ codeUrl: '',
+ show: false,
+ checked: true
+ },
+
+ //获取填写的账号信息
+ name: function (even) {
+ this.setData({
+ username: even.detail.value
+ })
+ },
+ //获取填写的密码信息
+ psw: function (even) {
+ this.setData({
+ password: even.detail.value
+ })
+ },
+ //获取填写的密码信息
+ code: function (even) {
+ this.setData({
+ code: even.detail.value
+ })
+ },
+
+ onClickShow() {
+ this.setData({
+ show: true
+ });
+ },
+
+ onClickHide() {
+ this.setData({
+ show: false
+ });
+ },
+
+ onLoad: function (option) {
+ if (getToken()) {
+ console.log("Authorization...{}", getToken());
+ //刷新权限信息
+ refreshUser().then(res => {
+ if (res.code == '200') {
+ wx.redirectTo({
+ url: '../index/index',
+ })
+ } else {
+ that.loadCodeImage();
+ }
+ });
+ } else {
+ console.log("未查询到Token...{}...准备重新登录")
+ this.loadCodeImage();
+ }
+ },
+
+ loadCodeImage: function () {
+ getCodeImg().then(res => {
+ let captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled
+ if (captchaEnabled) {
+ this.setData({
+ codeUrl: 'data:image/gif;base64,' + res.img,
+ uuid: res.uuid
+ })
+ }
+ });
+ },
+
+ //登录
+ userLogin: function () {
+ var username = this.data.username;
+ var password = this.data.password;
+ var code = this.data.code;
+ if (username == "") {
+ app.toast("登录账号不能为空");
+ return;
+ }
+ if (password == "") {
+ app.toast("登录密码不能为空");
+ return;
+ }
+ if (code == "") {
+ app.toast("验证码不能为空");
+ return;
+ }
+ //启动蒙版
+ //this.onClickShow();
+ let that = this;
+ //发送请求
+ login({
+ "username": username,
+ "password": password,
+ "code": code,
+ "uuid": that.data.uuid,
+ }).then(res => {
+ if (res.code == '200') {
+ setToken(res.token)
+ //跳转页面
+ wx.redirectTo({
+ url: '../index/index',
+ })
+ } else {
+ that.loadCodeImage();
+ }
+ });
+ },
+
+ getPhoneNumber(e) {
+ var_this = this
+ console.log("getPhoneNumber", e)
+ },
+
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/login/login.json b/yanzhu-ui-app/miniprogram/pages/login/login.json
new file mode 100644
index 00000000..f8186c56
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/login/login.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "van-image": "@vant/weapp/image/index",
+ "van-checkbox": "@vant/weapp/checkbox/index",
+ "van-checkbox-group": "@vant/weapp/checkbox-group/index"
+ }
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/login/login.wxml b/yanzhu-ui-app/miniprogram/pages/login/login.wxml
new file mode 100644
index 00000000..8daf4266
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/login/login.wxml
@@ -0,0 +1,36 @@
+
+
+
+
+
+ 数字工程项目管理系统
+
+
+ 请使用手机号登录
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 立 即 登 录
+
+
+
+
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/login/login.wxss b/yanzhu-ui-app/miniprogram/pages/login/login.wxss
new file mode 100644
index 00000000..7f3e2525
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/login/login.wxss
@@ -0,0 +1,108 @@
+/* pages/login/login.wxss */
+page {
+ background: #191d28 url("http://fileimg.makalu.cc/CORE_40247DD946964A15AA0D4000E1031E19.png") no-repeat bottom/100%;
+}
+
+.login_logo {
+ text-align: center;
+ padding: 50rpx 0rpx;
+}
+
+.login_logo image {
+ height: 120rpx;
+}
+
+.login_title {
+ height: 100rpx;
+ line-height: 100rpx;
+ color: #DDDDDD;
+ font-size: 40rpx;
+ font-weight: bold;
+ text-align: center;
+ word-spacing: 30rpx;
+ background: url("https://guangzhou.sxyanzhu.com/YZLJXM/profile/static/yanzhu_title.png") no-repeat left/100% 100%;
+}
+
+.login_bg {
+ border-radius: 20rpx;
+ padding: 15rpx 60rpx;
+}
+
+.login_dl {
+ color: #728ce3;
+ font-size: 40rpx;
+ font-weight: bold;
+}
+
+.login_ex {
+ padding: 20rpx 0;
+ font-size: 30rpx;
+ border-bottom: 20rpx dashed #728ce3;
+ width: 50%;
+}
+
+.login_input {
+ margin-top: 50rpx;
+}
+
+.login_input .name {
+ background: url("https://guangzhou.sxyanzhu.com/YZLJXM/profile/static/login_name.png") no-repeat left/40rpx;
+ border-bottom: 1px solid #5e6ea2;
+ height: 100rpx;
+ width: 85%;
+ color: #728ce3;
+ padding: 0 50rpx;
+}
+
+.login_input .pass {
+ background: url("https://guangzhou.sxyanzhu.com/YZLJXM/profile/static/login_pass.png") no-repeat left/40rpx;
+ border-bottom: 1px solid #5e6ea2;
+ height: 100rpx;
+ width: 85%;
+ color: #728ce3;
+ padding: 0 50rpx;
+}
+
+.login_input .code {
+ background: url("https://guangzhou.sxyanzhu.com/YZLJXM/profile/static/login_code.png") no-repeat left/40rpx;
+ border-bottom: 1px solid #5e6ea2;
+ height: 100rpx;
+ width: 74%;
+ color: #728ce3;
+ padding: 0 50rpx;
+}
+
+.login_btn {
+ margin: 40rpx 20rpx 0;
+ height: 80rpx;
+ background-image: linear-gradient(#5b9fff, #7655fc);
+ border-radius: 80rpx;
+ text-align: center;
+ line-height: 80rpx;
+}
+
+.wxlogin_btn{
+ margin: 40rpx 20rpx 0;
+ line-height: 80rpx;
+}
+
+.wxlogin_btn button {
+ width: 100%;
+ height: 80rpx;
+ background-image: linear-gradient(#5bffa4, #2d7d33);
+ border-radius: 80rpx;
+ text-align: center;
+ color: #FFFFFF;
+ font-weight: 300;
+}
+
+.login_btn:active {
+ margin: 82rpx 55rpx 0;
+}
+
+.login_code image{
+ margin-top: 50rpx;
+ margin-left: 12rpx;
+ width: 100%;
+ height: 100rpx;
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_check/edit/index.js b/yanzhu-ui-app/miniprogram/pages/project_check/edit/index.js
new file mode 100644
index 00000000..85cfb199
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_check/edit/index.js
@@ -0,0 +1,328 @@
+import {
+ findAllByCategory
+} from '../../../api/publics'
+import {
+ addApplyDetail
+} from '../../../api/projectApply'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ options: {},
+ dataList: [],
+ detailDataList: [],
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ this.setData({
+ options: options,
+ })
+ this.findMyDeptAssetsList();
+ this.newApplyDetail();
+ },
+
+ /**
+ * 栏目触发事件
+ */
+ onClickNav(e) {
+ var index = e.currentTarget.dataset.index
+ let list = this.data.detailDataList;
+ list[index].activeId = null;
+ list[index].mainActiveIndex = e.detail.index;
+ this.setData({
+ detailDataList: list
+ })
+ console.log(e.detail.index, this.data.dataList);
+ },
+
+ /**
+ * 选项触发事件
+ */
+ onClickItem(e) {
+ var index = e.currentTarget.dataset.index
+ let list = this.data.detailDataList;
+ list[index].detailId = e.detail.id;
+ list[index].detailName = e.detail.text;
+ list[index].showDetailsName = e.detail.detailName;
+ if (e.detail.units) {
+ let itemList = [];
+ e.detail.units.split(',').forEach((item, idx) => {
+ if (idx == 0) {
+ list[index].useUnitIndex = idx;
+ list[index].useUnit = item;
+ }
+ itemList.push({
+ id: idx,
+ text: item
+ });
+ });
+ list[index].assetsUnits = itemList;
+ }
+ list[index].activeId = e.detail.id;
+ list[index].showDetailsPopup = false;
+ this.setData({
+ detailDataList: list
+ })
+ },
+
+ //新增问题
+ newApplyDetail() {
+ var data = this.data.detailDataList
+ data.push({
+ detailId: '',
+ detailName: '',
+ showDetailsName: '',
+ showDetailsPopup: false,
+ mainActiveIndex: 0,
+ activeId: [],
+ useUnit: "",
+ useUnitIndex: "",
+ assetsUnits: [],
+ applyNumber: "",
+ assetsVersion: "",
+ useReason: ""
+ })
+ this.setData({
+ detailDataList: data
+ })
+ },
+
+ /**
+ * 删除申请详情
+ * @param {*} e
+ */
+ delApplyDetail(e) {
+ var index = e.currentTarget.dataset.index
+ var data = this.data.detailDataList
+ data.splice(index, 1);
+ this.setData({
+ detailDataList: data
+ })
+ },
+
+ //保存
+ onSave() {
+ let {
+ detailDataList,
+ } = this.data;
+ //数据效验
+ if (detailDataList.length > 0) {
+ for (let i = 0; i < detailDataList.length; i++) {
+ if (!detailDataList[i].detailId || !detailDataList[i].detailName || detailDataList[i].activeId.length == 0) {
+ app.toast("请选择申请明细!")
+ return false;
+ }
+ if (!detailDataList[i].applyNumber) {
+ app.toast("请填写申请数量!")
+ return false;
+ }
+ if (!detailDataList[i].useUnit) {
+ app.toast("请选择单位名称!")
+ return false;
+ }
+ }
+ } else {
+ app.toast("请添加申请明细!")
+ }
+ let that = this;
+ wx.showModal({
+ title: '提示',
+ content: '是否确认添加申请内容?',
+ success: function (sm) {
+ if (sm.confirm) {
+ that.submit()
+ } else if (sm.cancel) {
+ console.log('用户点击取消');
+ }
+ }
+ })
+ },
+
+ submit() {
+ let {
+ options,
+ detailDataList,
+ dataList
+ } = this.data;
+ let applyDetailList = [];
+ detailDataList.forEach(detail => {
+ applyDetailList.push({
+ superTypeKey: options.applyType,
+ typeId: dataList[detail.mainActiveIndex].id,
+ typeName: dataList[detail.mainActiveIndex].name,
+ assetsId: detail.detailId,
+ assetsName: detail.detailName,
+ number: detail.applyNumber,
+ assetsUnit: detail.useUnit,
+ assetsVersion: detail.assetsVersion,
+ useReason: detail.useReason,
+ pushType:3,
+ });
+ });
+ let params = {
+ id: options.id,
+ proProjectApplyDetailList: applyDetailList
+ }
+ addApplyDetail(params).then(res => {
+ if (res.code == '200') {
+ app.toast("添加申请内容成功!", 'success');
+ //跳转页面
+ wx.redirectTo({
+ url: '../info/index?businessKey='+this.data.options.id,
+ })
+ }
+ });
+ },
+
+ //查询部门资产列表信息
+ findMyDeptAssetsList() {
+ findAllByCategory(this.data.options.applyType).then(res => {
+ if (res.code == '200') {
+ let list = [];
+ res.data.forEach(item => {
+ let children = [];
+ item.childrenAssetsTypeList.forEach(child => {
+ children.push({
+ id: child.id,
+ text: child.name,
+ units: child.unit,
+ detailName: item.name + ' > ' + child.name
+ });
+ })
+ list.push({
+ id: item.id,
+ text: item.name,
+ children: children
+ });
+ });
+ this.setData({
+ dataList: list
+ })
+ }
+ });
+ },
+
+ //输入申请数量
+ onInputNumber(e) {
+ var index = e.currentTarget.dataset.index
+ let list = this.data.detailDataList;
+ let value = e.detail.value;
+ list[index].applyNumber = value;
+ this.setData({
+ detailDataList: list
+ })
+ },
+
+ //选择资产单位
+ onSelectUnit(e) {
+ var index = e.currentTarget.dataset.index
+ let list = this.data.detailDataList;
+ list[index].useUnit = e.detail.text;
+ list[index].useUnitIndex = e.detail.id;
+ this.setData({
+ detailDataList: list
+ })
+ },
+
+ //输入规格型号
+ onInputVersion(e) {
+ var index = e.currentTarget.dataset.index
+ let list = this.data.detailDataList;
+ list[index].assetsVersion = e.detail.value;
+ this.setData({
+ detailDataList: list
+ })
+ },
+
+ //输入使用说明
+ onInputUseReason(e) {
+ var index = e.currentTarget.dataset.index
+ let list = this.data.detailDataList;
+ list[index].useReason = e.detail.value;
+ this.setData({
+ detailDataList: list
+ })
+ },
+
+ //关闭申请明细选择
+ onShowPopup(e) {
+ var index = e.currentTarget.dataset.index
+ let list = this.data.detailDataList;
+ list[index].showDetailsPopup = true;
+ this.setData({
+ detailDataList: list
+ })
+ },
+
+ //关闭申请明细选择
+ onClosePopup(e) {
+ var index = e.currentTarget.dataset.index
+ let list = this.data.detailDataList;
+ list[index].showDetailsPopup = false;
+ this.setData({
+ detailDataList: list
+ })
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
+ wx.redirectTo({
+ url: '../info/index?businessKey='+this.data.options.id,
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_check/edit/index.json b/yanzhu-ui-app/miniprogram/pages/project_check/edit/index.json
new file mode 100644
index 00000000..cbc8710a
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_check/edit/index.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "van-popup": "@vant/weapp/popup",
+ "van-tree-select": "@vant/weapp/tree-select/index"
+ },
+ "navigationStyle":"custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_check/edit/index.wxml b/yanzhu-ui-app/miniprogram/pages/project_check/edit/index.wxml
new file mode 100644
index 00000000..b9bef5c8
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_check/edit/index.wxml
@@ -0,0 +1,59 @@
+
+
+
+
+
+ 申请明细 {{ format.indexNumFormat(index) }}
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 添加申请明细
+
+
+
+
+ 取消
+ 提交申请
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_check/edit/index.wxss b/yanzhu-ui-app/miniprogram/pages/project_check/edit/index.wxss
new file mode 100644
index 00000000..648a1cbc
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_check/edit/index.wxss
@@ -0,0 +1,110 @@
+.van-popup{
+ background: none !important;
+}
+.van-image__img{
+ border-radius: 10rpx !important;
+}
+.radio_custom_class{
+ padding: 10rpx 100rpx 10rpx 0;
+}
+.radio_label_class{
+ color: #ffffff !important;
+}
+.max_tab_name{
+ padding: 0 40rpx;
+ font-size:30rpx;
+ height: 460rpx;
+ overflow: auto;
+ margin-top: 20rpx;
+ text-align: center;
+ }
+ .van-popup.van-popup--bottom{
+ background: #232a44;
+ }
+ .van-popup {
+ background-color: var(--popup-background-color,#232a44) !important;
+ }
+ .font_color{
+ padding: 15rpx 0;
+ color: #157dd2;
+ }
+ .active{
+ font-size:30rpx;
+ font-weight: 600;
+ color: #14feff
+ }
+ .van-collapse.van-hairline--top-bottom:after{
+ border-width: 0px 0;
+ }
+ .van-cell.van-cell--borderless{
+ background-color: #2b345b;
+ color: #fff;
+ margin-top: 30rpx;
+ border-radius: 5rpx;
+ }
+ .van-cell.van-cell--borderless:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item__title.van-collapse-item__title--expanded:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item .van-cell:after{
+ border-bottom: 0;
+ }
+ .van-collapse-item.van-hairline--top:after{
+ border-top-width:0
+ }
+ .van-cell.van-cell--clickable{
+ background-color: #2b345b;
+ margin-top: 30rpx;
+ color: #fff;
+ border-radius: 15rpx;
+
+ }
+ .van-cell.van-cell--clickable:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item__wrapper .van-collapse-item__content{
+ background-color: #1e2336;
+ color:#8ca4ec ;
+ border-width: 0px 0;
+ }
+ .text_active{
+ padding-left: 5rpx;
+ color: #8369f5;
+ }
+
+ .van-steps{
+ background-color: transparent !important;
+ }
+ .van-step--horizontal .van-step__circle-container{
+ background-color: transparent !important;
+ }
+ .van-steps--horizontal{
+ padding: 10px 20px !important;
+ }
+
+ .van-sidebar{
+ background-color: #212737!important;
+ }
+ .van-sidebar-item{
+ color: #EFEFEF!important;
+ background-color: #212737!important;
+ }
+ .van-sidebar-item--selected{
+ border-color:var(--sidebar-selected-border-color,#8369f5)!important;
+ background-color: #252d41 !important;
+ color: #83a5ef !important;
+ }
+ .van-tree-select__content{
+ background-color:#252d41 !important;
+ }
+ .van-tree-select__item--active {
+ color: var(--tree-select-item-active-color,#8369f5) !important;
+ }
+ .van-tree-select{
+ height: 800rpx !important;
+ }
+ .van-popup.van-popup--bottom {
+ margin-bottom: -55rpx !important;
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_check/info/index.js b/yanzhu-ui-app/miniprogram/pages/project_check/info/index.js
new file mode 100644
index 00000000..296e23b4
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_check/info/index.js
@@ -0,0 +1,429 @@
+import {
+ allInstanceList,
+ readDeployNotes,
+ findCommentByProcInsId
+} from '../../../api/flowable'
+import {
+ createQr,
+ editApplyChecked,
+ addApplyDetailCheck,
+ findApplyDetailAllCheck
+} from '../../../api/projectApply'
+import {
+ findProjectApplyData
+} from '../../../api/publics'
+import config from '../../../config'
+const app = getApp()
+Page({
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ options: {},
+ active: 100,
+ stepList: [],
+ activeName: "",
+ flowRecordList: [],
+ infoData: {},
+ fileNames: [],
+ minImageList: [],
+ imgTypes: ["png", "jpg", "jpeg"],
+ stopBtnShow: false,
+ popupShow: false,
+ actIdx: 0,
+ popupId: null,
+ popupUnit: "吨",
+ popupNumber: "",
+ popupPrices: "",
+ baseUrl: config.baseUrl,
+ popupViewShow: false,
+ checkDirection: "vertical",
+ checkStepList:[],
+ isCheckRole: false
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ let roles = app.globalData.userData.roles;
+ if(roles!=null && roles.length>0){
+ roles.forEach(role =>{
+ if(role.roleId==88){
+ this.setData({
+ isCheckRole: true,
+ })
+ }
+ });
+ }
+ allInstanceList({
+ 'businessKey': options.businessKey
+ }).then(res => {
+ this.setData({
+ options: res.rows[0]
+ })
+ this.findFlowNodes();
+ this.findCommentByProcInsId();
+ });
+ this.findApplyDataInfo(options.businessKey);
+ },
+
+ //查询工作流节点
+ findFlowNodes() {
+ readDeployNotes(this.data.options.deployId).then(res => {
+ let list = [{
+ text: '开始'
+ }];
+ res.data.forEach((item, idx) => {
+ list.push({
+ text: item.name,
+ desc: ''
+ });
+ });
+ list.push({
+ text: '结束'
+ });
+ this.setData({
+ stepList: list
+ })
+ });
+ },
+
+ //查询审批日志
+ findCommentByProcInsId() {
+ findCommentByProcInsId({
+ procInsId: this.data.options.procInsId
+ }).then(res => {
+ this.setData({
+ flowRecordList: res.data
+ })
+ let list = [];
+ res.data.forEach((item, idx) => {
+ if (item.deleteReason) {
+ item.deleteReason = this.getDeleteReason(item.deleteReason);
+ }
+ if (item.duration) {
+ item.duration = app.getDurationDate(item.duration);
+ }
+ list.push(item);
+ })
+ this.setData({
+ flowRecordList: list
+ })
+ });
+ },
+
+ //查询审批表单参数
+ findApplyDataInfo(businessKey) {
+ findProjectApplyData(businessKey).then(res => {
+ let imgList = [];
+ let fileNames = [];
+ if (res.data.applyFiles) {
+ res.data.applyFiles.split(',').forEach(files => {
+ let fileType = files.split(".")[files.split(".").length - 1].toLowerCase();
+ if (this.data.imgTypes.indexOf(fileType) == -1) {
+ let it = files.split('/');
+ fileNames.push({
+ name: it[it.length - 1],
+ path: files
+ });
+ } else {
+ imgList.push({
+ murl: config.baseUrl + files + '.min.jpg',
+ path: files
+ });
+ }
+ });
+ }
+ this.setData({
+ infoData: res.data,
+ fileNames: fileNames,
+ minImageList: imgList
+ })
+ })
+ },
+
+ // 手风琴
+ onChange(event) {
+ this.setData({
+ activeName: event.detail,
+ });
+ },
+
+ /**
+ * 获取驳回节点
+ * @param {*} val
+ */
+ getDeleteReason(val) {
+ val = val.replace("Change activity to ", "");
+ let flowRecordList = this.data.flowRecordList;
+ for (let i = 0; i < flowRecordList.length; i++) {
+ if (flowRecordList[i].taskDefKey == val) {
+ return "驳回至" + flowRecordList[i].taskName;
+ }
+ }
+ },
+
+ /**
+ * 下载并打开文档
+ * @param {*} e
+ */
+ downFile: function (e) {
+ let {
+ path
+ } = e.currentTarget.dataset.set
+ wx.downloadFile({
+ // 示例 url,并非真实存在
+ url: config.baseUrl + '/common/download/resource?resource=' + path,
+ success: function (res) {
+ const filePath = res.tempFilePath
+ let fpt = filePath.split(".");
+ wx.openDocument({
+ filePath: filePath,
+ fileType: fpt[fpt.length - 1],
+ success: function (res) {
+ console.log('打开文档成功')
+ },
+ fail: function (res) {
+ console.log(res)
+ }
+ })
+ }
+ })
+ },
+
+ //选择退回节点
+ onSelectTargetKey(e) {
+ this.setData({
+ targetKey: e.detail.id,
+ backName: e.detail.name
+ })
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
+ wx.redirectTo({
+ url: '../list/index',
+ })
+ },
+
+ createQrSub(){
+ createQr(this.data.options.businessKey).then(res =>{
+ if(res.code==200){
+ this.setData({
+ "infoData.qrPath": res.data.qrPath
+ })
+ }
+ });
+ },
+
+ /**
+ * 左侧抽屉显示
+ */
+ showPopup(e) {
+ let index = e.currentTarget.dataset.index
+ this.setData({
+ actIdx: index,
+ popupId: this.data.infoData.proProjectApplyDetailList[index].id,
+ popupUnit: this.data.infoData.proProjectApplyDetailList[index].assetsUnit,
+ popupShow: true
+ });
+ },
+
+ /**
+ * 左侧抽屉隐藏
+ */
+ onClosePopup() {
+ this.setData({
+ popupShow: false
+ });
+ },
+
+ /**
+ * 左侧抽屉显示
+ */
+ showViewPopup(e) {
+ let index = e.currentTarget.dataset.index
+ let unit = this.data.infoData.proProjectApplyDetailList[index].assetsUnit;
+ let detailId = this.data.infoData.proProjectApplyDetailList[index].id;
+ findApplyDetailAllCheck(detailId).then(res =>{
+ let list = [];
+ res.data.forEach(item =>{
+ let desc = "【"+item.createBy+"】 验收"+item.checkValue+" "+unit+",单价 "+item.checkPrice;
+ list.push({text: item.createTime, desc: desc })
+ });
+ this.setData({
+ popupViewShow: true,
+ checkStepList: list,
+ });
+ })
+
+ },
+
+ /**
+ * 左侧抽屉隐藏
+ */
+ onCloseViewPopup() {
+ this.setData({
+ popupViewShow: false
+ });
+ },
+
+ //展示图片
+ showImg:function(e){
+ let paths = e.target.dataset.set;
+ let path = [];
+ paths.split(',').forEach(url => {
+ path.push(config.baseUrl + url);
+ });
+ wx.previewImage({
+ urls: path,
+ current: path[0]
+ })
+ },
+
+ /**
+ * 添加验收信息
+ */
+ onAddChecked() {
+ let {
+ popupId,
+ popupNumber,
+ popupPrices
+ } = this.data;
+ if (!popupId) {
+ app.toast("数据异常,请刷新页面重试!")
+ return false;
+ }
+ if (!popupNumber) {
+ app.toast("请填写验收数量!")
+ return false;
+ }
+ if (!popupPrices) {
+ app.toast("请填写验收单价!")
+ return false;
+ }
+ addApplyDetailCheck({'detailId':popupId,'checkValue':popupNumber,'checkPrice':popupPrices}).then(res =>{
+ if(res.code==200){
+ // let da = this.data.infoData;
+ // da.proProjectApplyDetailList[this.data.actIdx].isChecked==1;
+ // da.proProjectApplyDetailList[this.data.actIdx].checkedTotalValue = parseFloat(da.proProjectApplyDetailList[this.data.actIdx].checkedTotalValue)+parseFloat(popupNumber);
+ // this.setData({
+ // popupShow: false,
+ // infoData:da,
+ // popupNumber:"",
+ // popupPrices:"",
+ // });
+ this.setData({
+ popupNumber:"",
+ popupPrices:"",
+ popupShow: false
+ });
+ this.onLoad({'businessKey':this.data.options.businessKey});
+ }
+ });
+ },
+
+ //保存验收结果
+ onCheckedSave(){
+ for(let i=0;i{
+ if(res.code==200){
+ wx.redirectTo({
+ url: '../list/index',
+ })
+ }
+ })
+ },
+
+ //输入验收数量
+ onInputCheckNumber(e) {
+ let value = e.detail.value;
+ this.setData({
+ popupNumber: value
+ })
+ },
+
+ //输入验收单价
+ onInputCheckPrices(e) {
+ let value = e.detail.value;
+ this.setData({
+ popupPrices: value
+ })
+ },
+
+ onAddDetail(){
+ wx.redirectTo({
+ url: '../edit/index?id='+this.data.infoData.id+"&applyType="+this.data.infoData.applyType,
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_check/info/index.json b/yanzhu-ui-app/miniprogram/pages/project_check/info/index.json
new file mode 100644
index 00000000..578215fb
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_check/info/index.json
@@ -0,0 +1,9 @@
+{
+ "usingComponents": {
+ "van-collapse": "@vant/weapp/collapse",
+ "van-collapse-item": "@vant/weapp/collapse-item",
+ "van-steps": "@vant/weapp/steps/index",
+ "van-popup": "@vant/weapp/popup/index"
+ },
+ "navigationStyle":"custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_check/info/index.wxml b/yanzhu-ui-app/miniprogram/pages/project_check/info/index.wxml
new file mode 100644
index 00000000..6830d3b2
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_check/info/index.wxml
@@ -0,0 +1,222 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{(flowRecordList.length-index) < 9 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}}
+ {{item.taskName}}{{item.commentResult}}
+ {{item.commentResult}}
+ {{item.commentResult}}
+
+
+
+
+
+ 办理用户:{{item.assigneeName}}
+
+
+ 办理单位:{{item.deptName}}
+
+
+ 候选办理:{{item.candidate}}
+
+
+ 驳回节点:{{item.deleteReason}}
+
+
+ 接收时间:{{item.startTime}}
+
+
+ 处理时间:{{item.endTime}}
+
+
+ 处理耗时:{{item.duration}}
+
+
+ 处理意见:{{item.message}}
+
+
+
+
+
+
+
+
+
+
+
+ 生成二维码
+
+
+
+
+
+
+ 申请信息
+
+
+
+
+ 临建项目
+ {{ options.projectName||options.businessKeyName }}
+
+
+
+
+ 使用单位
+ {{infoData.createByDeptName}}
+
+
+
+
+ 使用时间
+ {{infoData.useTime}}
+
+
+
+
+ 申请原因
+ {{infoData.applyReason}}
+
+
+
+
+ 申请附件
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+ 申 请 人
+ {{infoData.createBy}}
+
+
+
+
+ 申请时间
+ {{infoData.createTime}}
+
+
+
+
+
+
+
+
+
+ 申请明细 {{ format.indexNumFormat(index) }}
+ 查看验收
+
+
+
+
+
+
+ 申请明细
+ {{item.typeName + ' > '+ item.assetsName }}
+
+
+
+
+ 申请数量
+ {{item.number + ' '+ item.assetsUnit }}
+
+
+
+
+ 规格型号
+ {{item.assetsVersion }}
+
+
+
+
+ 使用说明
+ {{ item.useReason }}
+
+
+
+
+ 验收数量
+ {{ item.checkedTotalValue }}
+
+
+
+ 添加验收
+
+
+
+
+
+
+
+
+
+ 实际到货
+ [{{popupUnit}}]
+
+
+
+
+
+
+ 采购单价
+ [元]
+
+
+
+
+
+
+
+ 确认添加验收
+
+
+
+
+
+
+
+
+
+
+
+ 暂无数据
+
+
+
+
+
+ 添加申请明细
+ 验收完成
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_check/info/index.wxss b/yanzhu-ui-app/miniprogram/pages/project_check/info/index.wxss
new file mode 100644
index 00000000..2677ac96
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_check/info/index.wxss
@@ -0,0 +1,169 @@
+.van-popup{
+ background: none !important;
+}
+.van-image__img{
+ border-radius: 10rpx !important;
+}
+.radio_custom_class{
+ padding: 10rpx 100rpx 10rpx 0;
+}
+.radio_label_class{
+ color: #ffffff !important;
+}
+.max_tab_name{
+ padding: 0 40rpx;
+ font-size:30rpx;
+ height: 460rpx;
+ overflow: auto;
+ margin-top: 20rpx;
+ text-align: center;
+ }
+ .van-popup.van-popup--bottom{
+ background: #232a44;
+ }
+ .van-popup {
+ background-color: var(--popup-background-color,#232a44) !important;
+ }
+ .font_color{
+ padding: 15rpx 0;
+ color: #157dd2;
+ }
+ .active{
+ font-size:30rpx;
+ font-weight: 600;
+ color: #14feff
+ }
+ .van-collapse.van-hairline--top-bottom:after{
+ border-width: 0px 0;
+ }
+ .van-cell.van-cell--borderless{
+ background-color: #2b345b;
+ color: #fff;
+ margin-top: 30rpx;
+ border-radius: 5rpx;
+ }
+ .van-cell.van-cell--borderless:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item__title.van-collapse-item__title--expanded:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item .van-cell:after{
+ border-bottom: 0;
+ }
+ .van-collapse-item.van-hairline--top:after{
+ border-top-width:0
+ }
+ .van-cell.van-cell--clickable{
+ background-color: #2b345b;
+ margin-top: 30rpx;
+ color: #fff;
+ border-radius: 15rpx;
+
+ }
+ .van-cell.van-cell--clickable:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item__wrapper .van-collapse-item__content{
+ background-color: #1e2336;
+ color:#8ca4ec ;
+ border-width: 0px 0;
+ }
+ .gk_open_con view{
+ padding: 10rpx 0;
+ width: 100%;
+ }
+ .gk_open_con image{
+ width: 30rpx;
+ height: 30rpx;
+ margin-right: 5rpx;
+ position: relative;
+ top: 5rpx;
+ }
+ .pass{
+ background-color: #388a38;
+ }
+ .transact{
+ background-color: #8e6424;
+ }
+ .text_active{
+ padding-left: 5rpx;
+ color: #8369f5;
+ }
+ .van-steps{
+ background-color: transparent !important;
+ }
+ .van-step--horizontal .van-step__circle-container{
+ background-color: transparent !important;
+ }
+ .van-steps--horizontal{
+ padding: 10px 20px !important;
+ }
+
+ .inspect_info {
+ padding: 30rpx;
+ background: #1e2336;
+ margin-bottom: 10rpx;
+ }
+
+ .echarts_max{
+ margin-top: 30rpx;
+ padding:0 30rpx;
+ }
+ .echarts_min{
+ background:#1e2336;
+ font-size: 28rpx;
+ padding: 15rpx;
+ border-radius:15rpx;
+ }
+ .eharts_title{
+ height: 40rpx;
+ line-height: 40rpx;
+ padding-left: 40rpx;
+ background: url("https://szgcwx.jhncidg.com/staticFiles/img/menu/CORE_52887EE6A33042408E11C2174974ABA1.png") no-repeat left/35rpx;
+ }
+ .eharts_head{
+ text-align: center;
+ padding: 30rpx 0;
+ }
+ .eharts_head text{
+ color:#0ad7ec;
+ font-size: 40rpx;
+ }
+ .eharts_con{
+ height: 320rpx;
+ width: auto;
+ }
+ .eharts_title_float{
+ float: right;
+ }
+
+ .eharts_title_float text{
+ padding: 0 5rpx;
+ }
+
+ .password-icon {
+ width: 40rpx;
+ height: 40rpx;
+ position: absolute;
+ right: 60rpx;
+ margin-top: -60rpx;
+ z-index: 999;
+ }
+
+ .eharts_title_float_img{
+ width: 40rpx;
+ height: 40rpx;
+ float: right;
+ position: relative;
+ top: 2rpx;
+ }
+ .problem_submit_to image{
+ width: 180rpx;
+ height: 180rpx;
+ }
+
+ /* 新增安全检查 */
+.inspect_info_2 {
+ padding: 30rpx;
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_check/list/index.js b/yanzhu-ui-app/miniprogram/pages/project_check/list/index.js
new file mode 100644
index 00000000..eda3efd4
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_check/list/index.js
@@ -0,0 +1,163 @@
+ import {
+ checkApplyList,
+ findGroupCountByStatus
+ } from '../../../api/projectApply'
+ const app = getApp()
+ Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ jxzCount: 0,
+ ywcCount: 0,
+ activeState: "dys",
+ total: 0,
+ pageNum: 1,
+ pageSize: 10,
+ listData: [],
+ },
+
+ getInfo(e) {
+ let {
+ id
+ } = e.currentTarget.dataset.set
+ wx.redirectTo({
+ url: `../info/index?businessKey=${id}`,
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ //获取缓存数据
+ this.getListData();
+ },
+
+ /**
+ * 查询项目举牌验收数据
+ */
+ getListData() {
+ this.queryCount();
+ let params = "activeName="+ this.data.activeState +"&pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize;
+ checkApplyList(params).then(res =>{
+ if (res.code == "200") {
+ //这里处理this.data.lastDataSize=this.data.pageSize
+ this.setData({
+ total: res.total,
+ listData: this.data.listData.concat(res.rows)
+ })
+ }
+ })
+ },
+
+ /**
+ * 加载更多数据
+ */
+ onScrollToLower() {
+ let nal = Math.ceil(this.data.total / this.data.pageSize);
+ if (this.data.pageNum < nal) {
+ this.setData({
+ pageNum: this.data.pageNum + 1
+ });
+ this.getListData();
+ }
+ },
+
+ //查询统计
+ queryCount() {
+ let params = "activeName="+ this.data.activeState;
+ //查询统计数量
+ findGroupCountByStatus(params).then(res =>{
+ let dys = 0;
+ let yys = 0;
+ res.data.forEach(item => {
+ if(item.applyStatus==10){
+ dys += item.total;
+ }else{
+ yys += item.total;
+ }
+ });
+ this.setData({
+ jxzCount: dys,
+ ywcCount: yys
+ });
+ });
+ },
+
+ /**
+ * 标签切换
+ */
+ typeJump(e) {
+ let index = e.currentTarget.dataset.index;
+ let nav = "";
+ if (index == 1) {
+ nav = 'dys';
+ } else if (index == 2) {
+ nav = 'yys';
+ }
+ this.setData({
+ activeState: nav,
+ pageNum: 1,
+ listData: [],
+ });
+ this.getListData();
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
+ wx.redirectTo({
+ url: '../../../pages/index/index',
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+ })
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_check/list/index.json b/yanzhu-ui-app/miniprogram/pages/project_check/list/index.json
new file mode 100644
index 00000000..ba2821f5
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_check/list/index.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationStyle":"custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_check/list/index.wxml b/yanzhu-ui-app/miniprogram/pages/project_check/list/index.wxml
new file mode 100644
index 00000000..12f96b96
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_check/list/index.wxml
@@ -0,0 +1,56 @@
+
+
+
+ 待验收({{jxzCount}})
+ 已验收({{ywcCount}})
+
+
+
+
+
+
+ {{index < 9 ?'0'+(index+1):(index+1)}}
+
+ {{item.projName}}
+ 待验收
+ 已验收
+
+
+
+
+
+
+ 所属项目:{{item.parProjName}}
+ 申请类型:物资类人工类设备类管理类
+ 申请用户:{{item.createByDeptName}}-{{item.createBy}}
+ 使用时间:{{item.useTime}}
+
+ 申请时间:{{item.createTime}}
+
+
+
+ 申请原因:{{item.applyReason}}
+
+
+
+
+
+
+ 暂无数据
+
+
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_check/list/index.wxss b/yanzhu-ui-app/miniprogram/pages/project_check/list/index.wxss
new file mode 100644
index 00000000..04501e16
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_check/list/index.wxss
@@ -0,0 +1 @@
+/* pages/project_check/list/index.wxss */
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/approveTask/index.js b/yanzhu-ui-app/miniprogram/pages/project_flowable/approveTask/index.js
new file mode 100644
index 00000000..822dc79a
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_flowable/approveTask/index.js
@@ -0,0 +1,457 @@
+import {
+ reject,
+ complete,
+ returnTask,
+ returnList,
+ readDeployNotes,
+ findCommentByProcInsId
+} from '../../../api/flowable'
+import {
+ findProjectApplyData
+} from '../../../api/publics'
+import config from '../../../config'
+const app = getApp()
+Page({
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ options: {},
+ active: 0,
+ stepList: [],
+ rejectNode:false,
+ activeName: "",
+ flowRecordList: [],
+ infoData: {},
+ fileNames: [],
+ minImageList: [],
+ imgTypes: ["png", "jpg", "jpeg"],
+ stopBtnShow: false,
+ comment: "",
+ targetKey:"",
+ targetKeyList: [],
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ this.setData({
+ options: options
+ })
+ this.findFlowNodes();
+ this.findCommentByProcInsId();
+ this.findApplyDataInfo();
+ this.initTargetKeyList();
+ },
+
+ //查询工作流节点
+ findFlowNodes() {
+ readDeployNotes(this.data.options.deployId).then(res => {
+ let list = [{
+ text: '开始'
+ }];
+ let index = this.data.active;
+ res.data.forEach((item,idx) => {
+ if(this.data.options.taskName==item.name){
+ index = idx+1;
+ }
+ list.push({
+ text: item.name,
+ desc: ''
+ });
+ });
+ list.push({
+ text: '结束'
+ });
+ this.setData({
+ active: index,
+ stepList: list
+ })
+ });
+ },
+
+ //查询审批日志
+ findCommentByProcInsId() {
+ findCommentByProcInsId({
+ procInsId: this.data.options.procInsId
+ }).then(res => {
+ this.setData({
+ flowRecordList: res.data
+ })
+ let list = [];
+ res.data.forEach((item, idx) => {
+ if (idx == 1 && (item.commentType == "3" || item.commentType == "2")) {
+ that.setData({
+ rejectNode: true
+ })
+ }
+ if (item.deleteReason) {
+ item.deleteReason = this.getDeleteReason(item.deleteReason);
+ }
+ if (item.duration) {
+ item.duration = app.getDurationDate(item.duration);
+ }
+ list.push(item);
+ })
+ this.setData({
+ flowRecordList: list
+ })
+ });
+ },
+
+ //查询审批表单参数
+ findApplyDataInfo() {
+ findProjectApplyData(this.data.options.businessKey).then(res => {
+ let imgList = [];
+ let fileNames = [];
+ if (res.data.applyFiles) {
+ res.data.applyFiles.split(',').forEach(files => {
+ let fileType = files.split(".")[files.split(".").length - 1].toLowerCase();
+ if (this.data.imgTypes.indexOf(fileType) == -1) {
+ let it = element.split('/');
+ fileNames.push({
+ name: it[it.length - 1],
+ path: files
+ });
+ } else {
+ imgList.push({
+ murl: config.baseUrl + files + '.min.jpg',
+ path: files
+ });
+ }
+ });
+ }
+ this.setData({
+ infoData: res.data,
+ fileNames: fileNames,
+ minImageList: imgList,
+ })
+ })
+ },
+
+ //初始化退回节点
+ initTargetKeyList() {
+ returnList({
+ taskId: this.data.options.taskId
+ }).then(res => {
+ if (res.data && res.data.length > 0) {
+ let list = [];
+ res.data.forEach(item => {
+ list.push({
+ id: item.id,
+ text: item.name
+ })
+ })
+ this.setData({
+ targetKey: list[0].id,
+ targetKeyList: list
+ })
+ }
+ });
+ },
+
+ //退回
+ onBack() {
+ let {
+ options,
+ comment
+ } = this.data;
+ //数据效验
+ if (!options.taskId) {
+ app.toast("数据异常,请刷新页面重试!")
+ return;
+ }
+ if (!comment) {
+ app.toast("请填写审批意见!")
+ return false;
+ }
+ let that = this;
+ //弹出确认
+ wx.showModal({
+ title: '提示',
+ content: '是否确认审批驳回?',
+ success: function (sm) {
+ if (sm.confirm) {
+ that.submitBackTask();
+ }
+ }
+ })
+ },
+
+ /**
+ * 提交退回任务
+ */
+ submitBackTask() {
+ let {
+ options,
+ comment,
+ targetKeyList
+ } = this.data;
+ returnTask({
+ taskId:options.taskId,
+ targetKey:targetKeyList[0].id,
+ comment
+ }).then(res => {
+ if (res.code == 200) {
+ app.toast("驳回申请成功!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: '../await/index',
+ })
+ }, 500)
+ }
+ });
+ },
+
+ //通过
+ onPass() {
+ let {
+ options,
+ comment
+ } = this.data;
+ //数据效验
+ if (!options.taskId) {
+ app.toast("数据异常,请刷新页面重试!")
+ return;
+ }
+ if (comment == "") {
+ app.toast("请填写审批意见!")
+ return;
+ }
+ let that = this;
+ //弹出确认
+ wx.showModal({
+ title: '提示',
+ content: '是否确认审批通过?',
+ success: function (sm) {
+ if (sm.confirm) {
+ that.submitPassTask();
+ }
+ }
+ })
+ },
+
+ /**
+ * 提交审核结果
+ */
+ submitPassTask() {
+ let {
+ options,
+ procInsId,
+ comment
+ } = this.data;
+ complete({
+ taskId:options.taskId,
+ instanceId: procInsId,
+ comment
+ }).then(res => {
+ if (res.code == 200) {
+ app.toast("申请审批通过成功!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: '../await/index',
+ })
+ }, 500)
+ }
+ });
+ },
+
+ //驳回
+ onReject() {
+ let {
+ taskId,
+ procInsId,
+ comment
+ } = this.data;
+ //数据效验
+ if (!taskId || !procInsId) {
+ app.toast("数据异常,请刷新页面重试!")
+ return;
+ }
+ if (comment == "") {
+ app.toast("请填写审批意见!")
+ return;
+ }
+ let that = this;
+ //弹出确认
+ wx.showModal({
+ title: '提示',
+ content: '是否确认审批驳回?',
+ success: function (sm) {
+ if (sm.confirm) {
+ that.submitRejectTask();
+ }
+ }
+ })
+ },
+
+ /**
+ * 提交流程驳回
+ */
+ submitRejectTask() {
+ let {
+ taskId,
+ procInsId,
+ comment
+ } = this.data;
+ reject({
+ taskId,
+ instanceId: procInsId,
+ comment
+ }).then(res => {
+ if (res.code == 200) {
+ app.toast("驳回申请流程成功!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: '../await/index',
+ })
+ }, 500)
+ }
+ });
+ },
+
+ //申请说明
+ commentInput: function (options) {
+ this.data.comment = options.detail.value;
+ },
+
+ // 手风琴
+ onChange(event) {
+ this.setData({
+ activeName: event.detail,
+ });
+ },
+
+ /**
+ * 获取驳回节点
+ * @param {*} val
+ */
+ getDeleteReason(val) {
+ val = val.replace("Change activity to ", "");
+ let flowRecordList = this.data.flowRecordList;
+ for (let i = 0; i < flowRecordList.length; i++) {
+ if (flowRecordList[i].taskDefKey == val) {
+ return "驳回至" + flowRecordList[i].taskName;
+ }
+ }
+ },
+
+ //终止原因
+ commentblur: function (options) {
+ this.data.comment = options.detail.value;
+ },
+
+ //展示图片
+ showImg:function(e){
+ let paths = e.target.dataset.set;
+ let path = [];
+ paths.split(',').forEach(url => {
+ path.push(config.baseUrl + url);
+ });
+ wx.previewImage({
+ urls: path,
+ current: path[0]
+ })
+ },
+
+ /**
+ * 下载并打开文档
+ * @param {*} e
+ */
+ downFile: function (e) {
+ let {
+ path
+ } = e.currentTarget.dataset.set
+ wx.downloadFile({
+ // 示例 url,并非真实存在
+ url: config.baseUrl + '/common/download/resource?resource=' + path,
+ success: function (res) {
+ const filePath = res.tempFilePath
+ let fpt = filePath.split(".");
+ wx.openDocument({
+ filePath: filePath,
+ fileType: fpt[fpt.length - 1],
+ success: function (res) {
+ console.log('打开文档成功')
+ },
+ fail: function (res) {
+ console.log(res)
+ }
+ })
+ }
+ })
+ },
+
+ //选择退回节点
+ onSelectTargetKey(e) {
+ this.setData({
+ targetKey: e.detail.id,
+ backName: e.detail.name
+ })
+ },
+
+ returnToPage: function () {
+ wx.redirectTo({
+ url: '../await/index',
+ })
+ },
+
+ /**
+ * 修改申请
+ */
+ onEditApply: function () {
+ wx.redirectTo({
+ url: `../editTask/index?deployId=${this.data.options.deployId}&procInsId=${this.data.options.procInsId}&nickName=${this.data.options.nickName}&deptName=${this.data.options.deptName}&procDefName=${this.data.options.procDefName}&taskId=${this.data.options.taskId}&taskName=${this.data.options.taskName}&category=${this.data.options.category}&projectName=${this.data.options.projectName}&businessKey=${this.data.options.businessKey}&businessKeyParName=${this.data.options.businessKeyParName}&businessDeptId=${this.data.options.businessDeptId}&startUserId=${this.data.options.startUserId}`,
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/approveTask/index.json b/yanzhu-ui-app/miniprogram/pages/project_flowable/approveTask/index.json
new file mode 100644
index 00000000..4cd33ca1
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_flowable/approveTask/index.json
@@ -0,0 +1,8 @@
+{
+ "usingComponents": {
+ "van-collapse": "@vant/weapp/collapse",
+ "van-collapse-item": "@vant/weapp/collapse-item",
+ "van-steps": "@vant/weapp/steps/index"
+ },
+ "navigationStyle":"custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/approveTask/index.wxml b/yanzhu-ui-app/miniprogram/pages/project_flowable/approveTask/index.wxml
new file mode 100644
index 00000000..2671740b
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_flowable/approveTask/index.wxml
@@ -0,0 +1,186 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{(flowRecordList.length-index) < 9 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}}
+ {{item.taskName}}{{item.commentResult}}
+ {{item.commentResult}}
+ {{item.commentResult}}
+ {{item.commentResult}}
+ {{item.commentResult}}
+ {{item.commentResult}}
+
+
+
+
+
+ 办理用户:{{item.assigneeName}}
+
+
+ 办理单位:{{item.deptName}}
+
+
+ 候选办理:{{item.candidate}}
+
+
+ 驳回节点:{{item.deleteReason}}
+
+
+ 接收时间:{{item.startTime}}
+
+
+ 处理时间:{{item.endTime}}
+
+
+ 处理耗时:{{item.duration}}
+
+
+ 处理意见:{{item.message}}
+
+
+
+
+
+
+
+
+
+
+
+
+ 临建项目
+ {{ options.projectName}}
+
+
+
+
+ 使用单位
+ {{infoData.createByDeptName}}
+
+
+
+
+ 使用时间
+ {{infoData.useTime}}
+
+
+
+
+ 申请原因
+ {{infoData.applyReason}}
+
+
+
+
+ 申请附件
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+ 申 请 人
+ {{infoData.createBy}}
+
+
+
+
+ 申请时间
+ {{infoData.createTime}}
+
+
+
+
+
+
+
+ 申请明细 {{ format.indexNumFormat(index) }}
+
+
+
+ 申请明细
+ {{item.typeName + ' > '+ item.assetsName }}
+
+
+
+
+ 申请数量
+ {{item.number + ' '+ item.assetsUnit }}
+
+
+
+
+ 规格型号
+ {{item.assetsVersion }}
+
+
+
+
+ 使用说明
+ {{ item.useReason }}
+
+
+
+
+
+
+
+ 审批意见
+
+
+
+
+
+ 退回节点
+
+
+
+
+
+
+ 修改申请
+ 任务转办
+ 任务委派
+ 审批驳回
+ 审批通过
+
+
+ 修改申请信息
+
+
+ “任务转办” 指定人处理后由您继续审批。
+
+
+ “任务委派” 任务由指定人进行处理。
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/approveTask/index.wxss b/yanzhu-ui-app/miniprogram/pages/project_flowable/approveTask/index.wxss
new file mode 100644
index 00000000..e03ad559
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_flowable/approveTask/index.wxss
@@ -0,0 +1,102 @@
+/* pageage/safetyManagement/addSafetyInspect/index.wxss */
+.van-popup{
+ background: none !important;
+}
+.van-image__img{
+ border-radius: 10rpx !important;
+}
+.radio_custom_class{
+ padding: 10rpx 100rpx 10rpx 0;
+}
+.radio_label_class{
+ color: #ffffff !important;
+}
+.max_tab_name{
+ padding: 0 40rpx;
+ font-size:30rpx;
+ height: 460rpx;
+ overflow: auto;
+ margin-top: 20rpx;
+ text-align: center;
+}
+.van-popup.van-popup--bottom{
+ background: #232a44;
+}
+.van-popup {
+ background-color: var(--popup-background-color,#232a44) !important;
+ }
+.font_color{
+ padding: 15rpx 0;
+ color: #157dd2;
+}
+.active{
+ font-size:30rpx;
+ font-weight: 600;
+ color: #14feff
+}
+.van-collapse.van-hairline--top-bottom:after{
+ border-width: 0px 0;
+}
+.van-cell.van-cell--borderless{
+ background-color: #2b345b;
+ color: #fff;
+ margin-top: 30rpx;
+ border-radius: 5rpx;
+}
+.van-cell.van-cell--borderless:active{
+ background-color: #2b345b;
+}
+.van-collapse-item__title.van-collapse-item__title--expanded:active{
+ background-color: #2b345b;
+}
+.van-collapse-item .van-cell:after{
+ border-bottom: 0;
+}
+.van-collapse-item.van-hairline--top:after{
+ border-top-width:0
+}
+.van-cell.van-cell--clickable{
+ background-color: #2b345b;
+ margin-top: 30rpx;
+ color: #fff;
+ border-radius: 15rpx;
+
+}
+.van-cell.van-cell--clickable:active{
+ background-color: #2b345b;
+}
+.van-collapse-item__wrapper .van-collapse-item__content{
+ background-color: #1e2336;
+ color:#8ca4ec ;
+ border-width: 0px 0;
+}
+.gk_open_con view{
+ padding: 10rpx 0;
+ width: 100%;
+}
+.gk_open_con image{
+ width: 30rpx;
+ height: 30rpx;
+ margin-right: 5rpx;
+ position: relative;
+ top: 5rpx;
+}
+.pass{
+ background-color: #388a38;
+}
+.transact{
+ background-color: #8e6424;
+}
+.text_active{
+ padding-left: 5rpx;
+ color: #8369f5;
+}
+.van-steps{
+ background-color: transparent !important;
+}
+.van-step--horizontal .van-step__circle-container{
+ background-color: transparent !important;
+}
+.van-steps--horizontal{
+ padding: 10px 20px !important;
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/await/index.js b/yanzhu-ui-app/miniprogram/pages/project_flowable/await/index.js
new file mode 100644
index 00000000..04b5e62a
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_flowable/await/index.js
@@ -0,0 +1,120 @@
+import {
+ myAwaitFlowTaskList
+} from '../../../api/flowable'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ listData: []
+ },
+
+ /**
+ * 查看详情
+ * @param {*} e
+ */
+ infoTap(e) {
+ let {
+ deployId,
+ procInsId,
+ taskId,
+ taskName,
+ category,
+ startDeptName,
+ startUserName,
+ procDefName,
+ businessKey,
+ businessKeyName,
+ businessDeptId,
+ businessKeyParName,
+ startUserId,
+ finishTime
+ } = e.currentTarget.dataset.set
+ if (taskName == "提交申请") {
+ wx.redirectTo({
+ url: `../editTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&category=${category}&projectName=${businessKeyName}&businessKey=${businessKey}&businessKeyParName=${businessKeyParName}&businessDeptId=${businessDeptId}&startUserId=${startUserId}`,
+ })
+ } else {
+ wx.redirectTo({
+ url: `../approveTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&category=${category}&projectName=${businessKeyName}&businessKey=${businessKey}&businessKeyParName=${businessKeyParName}&businessDeptId=${businessDeptId}&startUserId=${startUserId}&finishTime=${finishTime}`,
+ })
+ }
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ this.initListData();
+ },
+
+ /**
+ * 初始化待我办理列表数据
+ */
+ initListData() {
+ myAwaitFlowTaskList({}).then(res => {
+ if (res.code == 200) {
+ this.setData({
+ listData: res.data
+ })
+ }
+ });
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ returnToPage: function () {
+ wx.redirectTo({
+ url: '../../index/index',
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/await/index.json b/yanzhu-ui-app/miniprogram/pages/project_flowable/await/index.json
new file mode 100644
index 00000000..c38e2687
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_flowable/await/index.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "van-overlay": "@vant/weapp/overlay/index" ,
+ "van-popup": "@vant/weapp/popup/index"
+ },
+ "navigationStyle":"custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/await/index.wxml b/yanzhu-ui-app/miniprogram/pages/project_flowable/await/index.wxml
new file mode 100644
index 00000000..153e9617
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_flowable/await/index.wxml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+ {{index < 10 ?'0'+(index+1):(index+1)}}
+ {{item.taskName}}
+ 待审批
+ 审批驳回
+
+
+
+
+ 项目名称:{{item.businessKeyParName}}
+ 临建项目:{{item.businessKeyName}}
+ 申请类型:{{item.procDefName}}
+ 接收时间:{{item.createTime}}
+ 申请用户:{{item.startUserName}}
+ 申请单位:{{item.startDeptName}}
+
+
+
+
+
+
+
+ 暂无数据
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/await/index.wxss b/yanzhu-ui-app/miniprogram/pages/project_flowable/await/index.wxss
new file mode 100644
index 00000000..838c6981
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_flowable/await/index.wxss
@@ -0,0 +1,16 @@
+/* pageage/project_checking_list/project_checking_list.wxss */
+.gd_max{
+ padding:10rpx 50rpx 0;
+ }
+ .gd_min{
+ padding: 30rpx 0;
+ text-align: center;
+ }
+ .gd_min image{
+ width: 150rpx;
+ height: 150rpx;
+ }
+ .gd_min view{
+ padding: 10rpx;
+ color: #89a4eb;
+ }
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/detailTask/index.js b/yanzhu-ui-app/miniprogram/pages/project_flowable/detailTask/index.js
new file mode 100644
index 00000000..af444598
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_flowable/detailTask/index.js
@@ -0,0 +1,386 @@
+import {
+ stopProcess,
+ revokeProcess,
+ deleteInstance,
+ readDeployNotes,
+ findCommentByProcInsId
+} from '../../../api/flowable'
+import {
+ findProjectApplyData
+} from '../../../api/publics'
+import config from '../../../config'
+const app = getApp()
+Page({
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ options: {},
+ active: 100,
+ rejectNode: false,
+ stepList: [],
+ activeName: "",
+ flowRecordList: [],
+ infoData: {},
+ stopShow: false,
+ deleteShow: false,
+ revocationShow: false,
+ fileNames: [],
+ minImageList: [],
+ imgTypes: ["png", "jpg", "jpeg"],
+ stopBtnShow: false,
+ comment: ""
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ this.setData({
+ options: options
+ })
+ this.findFlowNodes();
+ this.findCommentByProcInsId();
+ this.findApplyDataInfo();
+ },
+
+ //查询工作流节点
+ findFlowNodes() {
+ readDeployNotes(this.data.options.deployId).then(res => {
+ let list = [{
+ text: '开始'
+ }];
+ let index = this.data.active;
+ res.data.forEach((item,idx) => {
+ if(this.data.options.taskName==item.name){
+ index = idx+1;
+ }
+ list.push({
+ text: item.name,
+ desc: ''
+ });
+ });
+ list.push({
+ text: '结束'
+ });
+ this.setData({
+ active: index,
+ stepList: list
+ })
+ });
+ },
+
+ //查询审批日志
+ findCommentByProcInsId() {
+ findCommentByProcInsId({
+ procInsId: this.data.options.procInsId
+ }).then(res => {
+ this.setData({
+ flowRecordList: res.data
+ })
+ let list = [];
+ res.data.forEach((item, idx) => {
+ if (idx == 1 && (item.commentType == "3" || item.commentType == "2")) {
+ that.setData({
+ rejectNode: true
+ })
+ }
+ if (item.deleteReason) {
+ item.deleteReason = this.getDeleteReason(item.deleteReason);
+ }
+ if (item.duration) {
+ item.duration = app.getDurationDate(item.duration);
+ }
+ list.push(item);
+ })
+ this.setData({
+ flowRecordList: list
+ })
+ });
+ },
+
+ //查询审批表单参数
+ findApplyDataInfo() {
+ findProjectApplyData(this.data.options.businessKey).then(res => {
+ let imgList = [];
+ let fileNames = [];
+ if (res.data.applyFiles) {
+ res.data.applyFiles.split(',').forEach(files => {
+ let fileType = files.split(".")[files.split(".").length - 1].toLowerCase();
+ if (this.data.imgTypes.indexOf(fileType) == -1) {
+ let it = files.split('/');
+ fileNames.push({
+ name: it[it.length - 1],
+ path: files
+ });
+ } else {
+ imgList.push({
+ murl: config.baseUrl + files + '.min.jpg',
+ path: files
+ });
+ }
+ });
+ }
+ this.setData({
+ infoData: res.data,
+ fileNames: fileNames,
+ minImageList: imgList,
+ stopShow: !this.data.options.finishTime && this.data.options.startUserId == app.globalData.userData.userId,
+ deleteShow: !this.data.options.finishTime && this.data.options.startUserId == app.globalData.userData.userId,
+ revocationShow: !this.data.options.finishTime
+ })
+ })
+ },
+
+ //流程退回
+ onStop() {
+ if (!this.data.stopBtnShow) {
+ app.toast("请填写终止原因!")
+ this.setData({
+ stopBtnShow: true
+ })
+ return;
+ } else {
+ if (this.data.comment == "") {
+ app.toast("请填写终止原因!")
+ this.setData({
+ stopBtnShow: true
+ })
+ return;
+ }
+ }
+ let that = this
+ //弹出确认
+ wx.showModal({
+ title: '提示',
+ content: '是否终止当前流程申请?',
+ success: function (sm) {
+ if (sm.confirm) {
+ that.submitStopProcess();
+ }
+ }
+ })
+ },
+
+ /**
+ * 确认撤回
+ */
+ submitStopProcess() {
+ stopProcess({
+ instanceId: this.data.options.procInsId,
+ comment: this.data.comment
+ }).then(res => {
+ if (res.code == 200) {
+ app.toast("终止流程申请成功!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: '../../index/index',
+ })
+ }, 500)
+ }
+ });
+ },
+
+ //流程删除
+ onDelete() {
+ let that = this
+ //弹出确认
+ wx.showModal({
+ title: '提示',
+ content: '是否确认删除流程申请?',
+ success: function (sm) {
+ if (sm.confirm) {
+ that.submitDeleteInstance();
+ }
+ }
+ })
+ },
+
+ /**
+ * 流程删除
+ */
+ submitDeleteInstance() {
+ deleteInstance(this.data.options.procInsId).then(res => {
+ if (res.code == 200) {
+ app.toast("删除流程申请成功!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: '../../index/index',
+ })
+ }, 500)
+ }
+ });
+ },
+
+ //流程撤回
+ onRevocation() {
+ let that = this
+ //弹出确认
+ wx.showModal({
+ title: '提示',
+ content: '是否确认撤回当前任务流程?',
+ success: function (sm) {
+ if (sm.confirm) {
+ that.submitRevokeProcess();
+ }
+ }
+ });
+ },
+
+ /**
+ * 流程撤回
+ */
+ submitRevokeProcess() {
+ revokeProcess({
+ procInsId: this.data.options.procInsId,
+ instanceId: this.data.options.procInsId,
+ taskId: this.data.options.taskId
+ }).then(res => {
+ if (res.code == 200) {
+ app.toast("撤回流程申请成功!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: '../../index/index',
+ })
+ }, 500)
+ }
+ });
+ },
+
+ // 手风琴
+ onChange(event) {
+ this.setData({
+ activeName: event.detail,
+ });
+ },
+
+ /**
+ * 获取驳回节点
+ * @param {*} val
+ */
+ getDeleteReason(val) {
+ val = val.replace("Change activity to ", "");
+ let flowRecordList = this.data.flowRecordList;
+ for (let i = 0; i < flowRecordList.length; i++) {
+ if (flowRecordList[i].taskDefKey == val) {
+ return "驳回至" + flowRecordList[i].taskName;
+ }
+ }
+ },
+
+ //终止原因
+ commentblur: function (options) {
+ this.data.comment = options.detail.value;
+ },
+
+ /**
+ * 下载并打开文档
+ * @param {*} e
+ */
+ downFile: function (e) {
+ let {
+ path
+ } = e.currentTarget.dataset.set
+ wx.downloadFile({
+ // 示例 url,并非真实存在
+ url: config.baseUrl + '/common/download/resource?resource=' + path,
+ success: function (res) {
+ const filePath = res.tempFilePath
+ let fpt = filePath.split(".");
+ wx.openDocument({
+ filePath: filePath,
+ fileType: fpt[fpt.length - 1],
+ success: function (res) {
+ console.log('打开文档成功')
+ },
+ fail: function (res) {
+ console.log(res)
+ }
+ })
+ }
+ })
+ },
+
+ //选择退回节点
+ onSelectTargetKey(e) {
+ this.setData({
+ targetKey: e.detail.id,
+ backName: e.detail.name
+ })
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
+ if (this.data.options.ret == "finished") {
+ wx.redirectTo({
+ url: '../finished/index',
+ })
+ } else {
+ wx.redirectTo({
+ url: '../myProcessIns/index',
+ })
+ }
+ },
+
+ //展示图片
+ showImg:function(e){
+ let paths = e.target.dataset.set;
+ let path = [];
+ paths.split(',').forEach(url => {
+ path.push(config.baseUrl + url);
+ });
+ wx.previewImage({
+ urls: path,
+ current: path[0]
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/detailTask/index.json b/yanzhu-ui-app/miniprogram/pages/project_flowable/detailTask/index.json
new file mode 100644
index 00000000..4cd33ca1
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_flowable/detailTask/index.json
@@ -0,0 +1,8 @@
+{
+ "usingComponents": {
+ "van-collapse": "@vant/weapp/collapse",
+ "van-collapse-item": "@vant/weapp/collapse-item",
+ "van-steps": "@vant/weapp/steps/index"
+ },
+ "navigationStyle":"custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/detailTask/index.wxml b/yanzhu-ui-app/miniprogram/pages/project_flowable/detailTask/index.wxml
new file mode 100644
index 00000000..f00ad8a1
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_flowable/detailTask/index.wxml
@@ -0,0 +1,169 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{(flowRecordList.length-index) < 9 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}}
+ {{item.taskName}}{{item.commentResult}}
+ {{item.commentResult}}
+ {{item.commentResult}}
+
+
+
+
+
+ 办理用户:{{item.assigneeName}}
+
+
+ 办理单位:{{item.deptName}}
+
+
+ 候选办理:{{item.candidate}}
+
+
+ 驳回节点:{{item.deleteReason}}
+
+
+ 接收时间:{{item.startTime}}
+
+
+ 处理时间:{{item.endTime}}
+
+
+ 处理耗时:{{item.duration}}
+
+
+ 处理意见:{{item.message}}
+
+
+
+
+
+
+
+
+
+
+
+
+ 临建项目
+ {{ options.projectName||options.businessKeyName }}
+
+
+
+
+ 使用单位
+ {{infoData.createByDeptName}}
+
+
+
+
+ 使用时间
+ {{infoData.useTime}}
+
+
+
+
+ 申请原因
+ {{infoData.applyReason}}
+
+
+
+
+ 申请附件
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+ 申 请 人
+ {{infoData.createBy}}
+
+
+
+
+ 申请时间
+ {{infoData.createTime}}
+
+
+
+
+
+
+
+ 申请明细 {{ format.indexNumFormat(index) }}
+
+
+
+ 申请明细
+ {{item.typeName + ' > '+ item.assetsName }}
+
+
+
+
+ 申请数量
+ {{item.number + ' '+ item.assetsUnit }}
+
+
+
+
+ 规格型号
+ {{item.assetsVersion }}
+
+
+
+
+ 使用说明
+ {{ item.useReason }}
+
+
+
+
+
+
+
+
+ 终止原因
+
+
+
+
+
+
+
+
+ 终止
+ 删除
+ 撤回
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/detailTask/index.wxss b/yanzhu-ui-app/miniprogram/pages/project_flowable/detailTask/index.wxss
new file mode 100644
index 00000000..64f57fcf
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_flowable/detailTask/index.wxss
@@ -0,0 +1,101 @@
+.van-popup{
+ background: none !important;
+}
+.van-image__img{
+ border-radius: 10rpx !important;
+}
+.radio_custom_class{
+ padding: 10rpx 100rpx 10rpx 0;
+}
+.radio_label_class{
+ color: #ffffff !important;
+}
+.max_tab_name{
+ padding: 0 40rpx;
+ font-size:30rpx;
+ height: 460rpx;
+ overflow: auto;
+ margin-top: 20rpx;
+ text-align: center;
+ }
+ .van-popup.van-popup--bottom{
+ background: #232a44;
+ }
+ .van-popup {
+ background-color: var(--popup-background-color,#232a44) !important;
+ }
+ .font_color{
+ padding: 15rpx 0;
+ color: #157dd2;
+ }
+ .active{
+ font-size:30rpx;
+ font-weight: 600;
+ color: #14feff
+ }
+ .van-collapse.van-hairline--top-bottom:after{
+ border-width: 0px 0;
+ }
+ .van-cell.van-cell--borderless{
+ background-color: #2b345b;
+ color: #fff;
+ margin-top: 30rpx;
+ border-radius: 5rpx;
+ }
+ .van-cell.van-cell--borderless:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item__title.van-collapse-item__title--expanded:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item .van-cell:after{
+ border-bottom: 0;
+ }
+ .van-collapse-item.van-hairline--top:after{
+ border-top-width:0
+ }
+ .van-cell.van-cell--clickable{
+ background-color: #2b345b;
+ margin-top: 30rpx;
+ color: #fff;
+ border-radius: 15rpx;
+
+ }
+ .van-cell.van-cell--clickable:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item__wrapper .van-collapse-item__content{
+ background-color: #1e2336;
+ color:#8ca4ec ;
+ border-width: 0px 0;
+ }
+ .gk_open_con view{
+ padding: 10rpx 0;
+ width: 100%;
+ }
+ .gk_open_con image{
+ width: 30rpx;
+ height: 30rpx;
+ margin-right: 5rpx;
+ position: relative;
+ top: 5rpx;
+ }
+ .pass{
+ background-color: #388a38;
+ }
+ .transact{
+ background-color: #8e6424;
+ }
+ .text_active{
+ padding-left: 5rpx;
+ color: #8369f5;
+ }
+ .van-steps{
+ background-color: transparent !important;
+ }
+ .van-step--horizontal .van-step__circle-container{
+ background-color: transparent !important;
+ }
+ .van-steps--horizontal{
+ padding: 10px 20px !important;
+ }
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/editTask/index.js b/yanzhu-ui-app/miniprogram/pages/project_flowable/editTask/index.js
new file mode 100644
index 00000000..f2385ddb
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_flowable/editTask/index.js
@@ -0,0 +1,830 @@
+import {
+ complete,
+ stopProcess,
+ readDeployNotes,
+ findCommentByProcInsId
+} from '../../../api/flowable'
+import {
+ findMyDeptList,
+ findAllByCategory,
+ findProjectApplyData
+} from '../../../api/publics'
+import {
+ updateProjectApply
+} from '../../../api/projectApply'
+import {
+ syncFileUpload
+} from '../../../utils/request'
+import config from '../../../config'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ maxDate: new Date(2088, 1, 1).getTime(),
+ deptList: [],
+ deployId: "",
+ procInsId: "",
+ procDefName: "",
+ deptName: "",
+ nickName: "",
+ taskId: "",
+ taskName: "",
+ category: "",
+ projectName: "",
+ businessKey: "",
+ businessDeptId: "",
+ projectParName: "",
+ infoData: {},
+ active: 100,
+ stepList: [],
+ rejectNode: false,
+ limit: 9,
+ imgTypes: ["png", "jpg", "jpeg"],
+ fileTypes: ["pdf", "doc", "docx", "xls", "xlsx"],
+ fileNames: [],
+ minImageList: [],
+ detailDataList: [],
+ dataList: [],
+ stopShow: false,
+ stopBtnShow: false,
+ activeName: "",
+ comment: "",
+ useDeptIdIndex: 0,
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ let {
+ deployId,
+ procInsId,
+ procDefName,
+ deptName,
+ nickName,
+ taskId,
+ taskName,
+ category,
+ businessKey,
+ projectName,
+ businessDeptId,
+ projectParName,
+ startUserId
+ } = options
+ this.setData({
+ businessKey,
+ projectName,
+ procInsId,
+ procDefName,
+ deployId,
+ deptName,
+ nickName,
+ taskId,
+ taskName,
+ category,
+ businessDeptId,
+ projectParName,
+ initData: {
+ id: businessKey,
+ text: projectName
+ },
+ stopShow: startUserId == app.globalData.userData?.userId,
+ })
+ debugger
+ this.initDeptList();
+ this.findMyDeptAssetsList();
+ this.findFlowNodes();
+ this.findCommentByProcInsId();
+ },
+
+ //查询部门资产列表信息
+ findMyDeptAssetsList() {
+ findAllByCategory(this.data.category).then(res => {
+ if (res.code == '200') {
+ let list = [];
+ res.data.forEach(item => {
+ let children = [];
+ item.childrenAssetsTypeList.forEach(child => {
+ children.push({
+ id: child.id,
+ text: child.name,
+ units: child.unit,
+ detailName: item.name + ' > ' + child.name
+ });
+ })
+ list.push({
+ id: item.id,
+ text: item.name,
+ children: children
+ });
+ });
+ this.findApplyDataInfo();
+ this.setData({
+ dataList: list
+ })
+ }
+ });
+ },
+
+ /**
+ * 初始化部门列表
+ */
+ initDeptList() {
+ findMyDeptList().then(res => {
+ let list = [];
+ res.data.forEach(item => {
+ list.push({
+ "id": item.deptId,
+ "text": item.deptName
+ });
+ });
+ this.setData({
+ deptList: list
+ })
+ });
+ },
+
+ //查询工作流节点
+ findFlowNodes() {
+ readDeployNotes(this.data.deployId).then(res => {
+ if (res.code == 200) {
+ let list = [{
+ text: '开始'
+ }];
+ let index = this.data.active;
+ res.data.forEach((item, idx) => {
+ if (this.data.taskName == item.name) {
+ index = idx + 1;
+ }
+ list.push({
+ text: item.name,
+ desc: ''
+ });
+ });
+ list.push({
+ text: '结束'
+ });
+ this.setData({
+ active: index,
+ stepList: list
+ })
+ }
+ });
+ },
+
+ //查询审批日志
+ findCommentByProcInsId() {
+ findCommentByProcInsId({
+ procInsId: this.data.procInsId
+ }).then(res => {
+ this.setData({
+ flowRecordList: res.data
+ })
+ let list = [];
+ res.data.forEach((item, idx) => {
+ if (idx == 1 && (item.commentType == "3" || item.commentType == "2")) {
+ this.setData({
+ rejectNode: true
+ })
+ }
+ if (item.deleteReason) {
+ item.deleteReason = this.getDeleteReason(item.deleteReason);
+ }
+ if (item.duration) {
+ item.duration = app.getDurationDate(item.duration);
+ }
+ list.push(item);
+ })
+ this.setData({
+ flowRecordList: list
+ })
+ });
+ },
+
+ //查询审批表单参数
+ findApplyDataInfo() {
+ findProjectApplyData(this.data.businessKey).then(res => {
+ let imgList = [];
+ let fileNames = [];
+ if (res.data.applyFiles) {
+ res.data.applyFiles.split(',').forEach(files => {
+ if(files){
+ let fileType = files.split(".")[files.split(".").length - 1].toLowerCase();
+ if (this.data.imgTypes.indexOf(fileType) == -1) {
+ let it = files.split('/');
+ fileNames.push({
+ name: it[it.length - 1],
+ path: files
+ });
+ } else {
+ imgList.push(config.baseUrl + files + '.min.jpg');
+ }
+ }
+ });
+ }
+ if (res.data.proProjectApplyDetailList.length > 0) {
+ let data = [];
+ res.data.proProjectApplyDetailList.forEach(item => {
+ let activeId = [];
+ activeId.push(item.typeId);
+ let mainActiveIndex = 0;
+ let useUnitIndex = 0;
+ let assetsUnits = [];
+ this.data.dataList.forEach((_it, _itIndex) => {
+ if (_it.id == item.typeId) {
+ mainActiveIndex = _itIndex;
+ _it.children.forEach((_children, _childrenIndex) => {
+ if (_children.id == item.assetsId && _children.units) {
+ let unitList = _children.units.split(',');
+ if (unitList.length > 0) {
+ unitList.forEach((unit, idx) => {
+ if (unit == item.assetsUnit) {
+ useUnitIndex = idx;
+ }
+ assetsUnits.push({
+ id: idx,
+ text: unit
+ });
+ });
+ }
+ }
+ });
+ }
+ });
+ data.push({
+ detailId: item.assetsId,
+ detailName: item.assetsName,
+ showDetailsName: item.typeName + ' > ' + item.assetsName,
+ showDetailsPopup: false,
+ mainActiveIndex: mainActiveIndex,
+ activeId: activeId,
+ useUnit: item.assetsUnit,
+ assetsUnits: assetsUnits,
+ useUnitIndex: useUnitIndex,
+ applyNumber: item.number,
+ assetsVersion: item.assetsVersion,
+ useReason: item.useReason
+ })
+ });
+ this.setData({
+ detailDataList: data
+ })
+ }
+ this.setData({
+ infoData: res.data,
+ fileNames: fileNames,
+ minImageList: imgList,
+ })
+ })
+ },
+
+ /**
+ * 获取驳回节点
+ * @param {*} val
+ */
+ getDeleteReason(val) {
+ val = val.replace("Change activity to ", "");
+ let flowRecordList = this.data.flowRecordList;
+ for (let i = 0; i < flowRecordList.length; i++) {
+ if (flowRecordList[i].taskDefKey == val) {
+ return "驳回至" + flowRecordList[i].taskName;
+ }
+ }
+ },
+
+ //保存申请
+ onSaveApply() {
+ let {
+ procInsId,
+ initData,
+ infoData,
+ detailDataList,
+ fileNames,
+ minImageList
+ } = this.data;
+ //数据效验
+ if (!procInsId || !initData.id) {
+ app.toast("数据异常,请刷新页面重试!")
+ return false;
+ }
+ if (!infoData.deptId) {
+ app.toast("请选择使用单位!")
+ return false;
+ }
+ if (!infoData.useTime) {
+ app.toast("请选择使用时间!")
+ return false;
+ }
+ if (!infoData.applyReason) {
+ app.toast("请填写申请原因!")
+ return false;
+ }
+ if (detailDataList.length > 0) {
+ for (let i = 0; i < detailDataList.length; i++) {
+ if (!detailDataList[i].detailId || !detailDataList[i].detailName || detailDataList[i].activeId.length == 0) {
+ app.toast("请选择申请明细!")
+ return false;
+ }
+ if (!detailDataList[i].applyNumber) {
+ app.toast("请填写申请数量!")
+ return false;
+ }
+ if (!detailDataList[i].useUnit) {
+ app.toast("请选择单位名称!")
+ return false;
+ }
+ }
+ } else {
+ app.toast("请添加申请明细!")
+ }
+ if (fileNames.length > 0) {
+ for (let i = 0; i < fileNames.length; i++) {
+ if(fileNames[0]){
+ let _fileType = fileNames[0].path.split('.');
+ _fileType = _fileType[_fileType.length - 1].toLowerCase();
+ if (this.data.fileTypes.indexOf(_fileType) == -1) {
+ app.toast("申请附件不支持 [ " + _fileType + " ] 格式!请检查第" + (i + 1) + "个附件")
+ return false;
+ }
+ }
+ }
+ }
+ let that = this;
+ wx.showModal({
+ title: '提示',
+ content: '是否确定提交流程申请?',
+ success: function (sm) {
+ if (sm.confirm) {
+ that.submitBefore();
+ } else if (sm.cancel) {
+ console.log('用户点击取消');
+ }
+ }
+ })
+ },
+
+ /**
+ * 提交前数据准备
+ */
+ submitBefore() {
+ let {
+ fileNames,
+ minImageList
+ } = this.data;
+ if (fileNames.length > 0) {
+ fileNames.forEach(item => {
+ minImageList.push(item.path);
+ });
+ }
+ let fileUrls = [];
+ if (minImageList.length > 0) {
+ minImageList.forEach(item => {
+ //这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
+ if (item.indexOf("/profile/") > -1) {
+ fileUrls.push(item.replace(config.baseUrl, "").replace(".min.jpg", ""));
+ if (fileUrls.length == minImageList.length) {
+ //上传完毕
+ this.submitApply(fileUrls);
+ }
+ } else {
+ syncFileUpload(item).then(res => {
+ fileUrls.push(res.fileName);
+ //验证图片上传完毕
+ if (fileUrls.length == minImageList.length) {
+ this.submitApply(fileUrls);
+ }
+ });
+ }
+ });
+ } else {
+ this.submitApply(fileUrls);
+ }
+ },
+
+ /**
+ * 提交表单
+ */
+ submitApply(fileData) {
+ if (this.data.taskName == '提交申请') {
+ let {
+ taskId,
+ procInsId,
+ infoData,
+ category,
+ dataList,
+ detailDataList
+ } = this.data;
+ let applyDetailList = [];
+ detailDataList.forEach(detail => {
+ applyDetailList.push({
+ superTypeKey: category,
+ typeId: dataList[detail.mainActiveIndex].id,
+ typeName: dataList[detail.mainActiveIndex].text,
+ assetsId: detail.detailId,
+ assetsName: detail.detailName,
+ number: detail.applyNumber,
+ assetsUnit: detail.useUnit,
+ assetsVersion: detail.assetsVersion,
+ useReason: detail.useReason
+ });
+ });
+ let params = {
+ taskId,
+ instanceId: procInsId,
+ comment:"修改并重新提交申请",
+ variables: {},
+ proProjectApply: {
+ id: infoData.id,
+ deptId: infoData.deptId,
+ projId: infoData.projId,
+ projName: infoData.projName,
+ applyType: infoData.applyType,
+ applyStatus: 1,
+ useTime: infoData.useTime,
+ applyReason: infoData.applyReason,
+ applyFiles: fileData.toString(),
+ proProjectApplyDetailList: applyDetailList
+ }
+ }
+ complete(params).then(res => {
+ if (res.code == 200) {
+ app.toast("修改申请信息成功!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: `../../index/index`,
+ })
+ }, 300)
+ }
+ });
+ } else {
+ this.submitData(fileData);
+ }
+ },
+
+ /**
+ * 提交表单
+ */
+ submitData(fileData) {
+ let {
+ infoData,
+ category,
+ dataList,
+ detailDataList
+ } = this.data;
+ let applyDetailList = [];
+ detailDataList.forEach(detail => {
+ applyDetailList.push({
+ superTypeKey: category,
+ typeId: dataList[detail.mainActiveIndex].id,
+ typeName: dataList[detail.mainActiveIndex].text,
+ assetsId: detail.detailId,
+ assetsName: detail.detailName,
+ number: detail.applyNumber,
+ assetsUnit: detail.useUnit,
+ assetsVersion: detail.assetsVersion,
+ useReason: detail.useReason
+ });
+ });
+ let params = {
+ id: infoData.id,
+ deptId: infoData.deptId,
+ projId: infoData.projId,
+ projName: infoData.projName,
+ applyType: infoData.applyType,
+ applyStatus: 1,
+ useTime: infoData.useTime,
+ applyReason: infoData.applyReason,
+ applyFiles: fileData.toString(),
+ proProjectApplyDetailList: applyDetailList
+ }
+ updateProjectApply(params).then(res => {
+ if (res.code == 200) {
+ app.toast("修改申请信息成功!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: `../approveTask/index?deployId=${this.data.deployId}&procInsId=${this.data.procInsId}&nickName=${this.data.nickName}&deptName=${this.data.deptName}&procDefName=${this.data.procDefName}&taskId=${this.data.taskId}&taskName=${this.data.taskName}&category=${this.data.category}&projectName=${this.data.projectName}&businessKey=${this.data.businessKey}&businessKeyParName=${this.data.businessKeyParName}&businessDeptId=${this.data.businessDeptId}&startUserId=${this.data.startUserId}`,
+ })
+ }, 300)
+ }
+ });
+ },
+
+ //申请说明输入
+ applyReasonblur: function (options) {
+ this.data.infoData.applyReason = options.detail.value;
+ },
+
+ //使用单位
+ onSelectDept(e) {
+ this.setData({
+ "infoData.deptId": e.detail.id
+ })
+ },
+
+ //使用时间
+ onInputTime(e) {
+ this.setData({
+ "infoData.useTime": e.detail
+ })
+ },
+
+ /**
+ * 图片上传
+ * @param {*} options
+ */
+ imgUpload(options) {
+ let imgs = options.detail;
+ this.setData({
+ minImageList: imgs
+ });
+ },
+
+ /**
+ * 文件上传
+ * @param {*} options
+ */
+ fileUpload(options) {
+ let files = options.detail;
+ this.setData({
+ fileNames: files
+ });
+ },
+
+ // 手风琴
+ onChange(event) {
+ this.setData({
+ activeName: event.detail,
+ });
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
+ wx.redirectTo({
+ url: '../await/index',
+ })
+ },
+
+ /**
+ * 栏目触发事件
+ */
+ onClickNav(e) {
+ var index = e.currentTarget.dataset.index
+ let list = this.data.detailDataList;
+ list[index].activeId = null;
+ list[index].mainActiveIndex = e.detail.index;
+ this.setData({
+ detailDataList: list
+ })
+ console.log(e.detail.index, this.data.dataList);
+ },
+
+ /**
+ * 选项触发事件
+ */
+ onClickItem(e) {
+ var index = e.currentTarget.dataset.index
+ let list = this.data.detailDataList;
+ list[index].detailId = e.detail.id;
+ list[index].detailName = e.detail.text;
+ list[index].showDetailsName = e.detail.detailName;
+ if (e.detail.units) {
+ let itemList = [];
+ e.detail.units.split(',').forEach((item, idx) => {
+ if (idx == 0) {
+ list[index].useUnitIndex = idx;
+ list[index].useUnit = item;
+ }
+ itemList.push({
+ id: idx,
+ text: item
+ });
+ });
+ list[index].assetsUnits = itemList;
+ }
+ list[index].activeId = e.detail.id;
+ list[index].showDetailsPopup = false;
+ this.setData({
+ detailDataList: list
+ })
+ },
+
+ //新增问题
+ newApplyDetail() {
+ var data = this.data.detailDataList
+ data.push({
+ detailId: '',
+ detailName: '',
+ showDetailsName: '',
+ showDetailsPopup: false,
+ mainActiveIndex: 0,
+ activeId: [],
+ useUnit: "",
+ useUnitIndex: "",
+ assetsUnits: [],
+ applyNumber: "",
+ assetsVersion: "",
+ useReason: ""
+ })
+ this.setData({
+ detailDataList: data
+ })
+ },
+
+ /**
+ * 删除申请详情
+ * @param {*} e
+ */
+ delApplyDetail(e) {
+ var index = e.currentTarget.dataset.index
+ var data = this.data.detailDataList
+ data.splice(index, 1);
+ this.setData({
+ detailDataList: data
+ })
+ },
+
+ //输入申请数量
+ onInputNumber(e) {
+ var index = e.currentTarget.dataset.index
+ let list = this.data.detailDataList;
+ let value = e.detail.value;
+ list[index].applyNumber = value;
+ this.setData({
+ detailDataList: list
+ })
+ },
+
+ //选择资产单位
+ onSelectUnit(e) {
+ var index = e.currentTarget.dataset.index
+ let list = this.data.detailDataList;
+ list[index].useUnit = e.detail.text;
+ list[index].useUnitIndex = e.detail.id;
+ this.setData({
+ detailDataList: list
+ })
+ },
+
+ //输入规格型号
+ onInputVersion(e) {
+ var index = e.currentTarget.dataset.index
+ let list = this.data.detailDataList;
+ list[index].assetsVersion = e.detail.value;
+ this.setData({
+ detailDataList: list
+ })
+ },
+
+ //输入使用说明
+ onInputUseReason(e) {
+ var index = e.currentTarget.dataset.index
+ let list = this.data.detailDataList;
+ list[index].useReason = e.detail.value;
+ this.setData({
+ detailDataList: list
+ })
+ },
+
+ //关闭申请明细选择
+ onShowPopup(e) {
+ var index = e.currentTarget.dataset.index
+ let list = this.data.detailDataList;
+ list[index].showDetailsPopup = true;
+ this.setData({
+ detailDataList: list
+ })
+ },
+
+ //关闭申请明细选择
+ onClosePopup(e) {
+ var index = e.currentTarget.dataset.index
+ let list = this.data.detailDataList;
+ list[index].showDetailsPopup = false;
+ this.setData({
+ detailDataList: list
+ })
+ },
+
+ /**
+ * 切换临建项目
+ * @param {*} e
+ */
+ onProjectSelect: function (e) {
+ let projectId = e.detail.id;
+ let projectName = e.detail.text;
+ app.globalData.useProjectId = projectId;
+ app.globalData.useProjectName = projectName;
+ this.setData({
+ initData: {
+ id: app.globalData.useProjectId,
+ text: app.globalData.useProjectName
+ }
+ })
+ },
+
+ //流程退回
+ onStopApply() {
+ if (!this.data.stopBtnShow) {
+ app.toast("请填写终止原因!")
+ this.setData({
+ stopBtnShow: true
+ })
+ return;
+ } else {
+ if (this.data.comment == "") {
+ app.toast("请填写终止原因!")
+ this.setData({
+ stopBtnShow: true
+ })
+ return;
+ }
+ }
+ let that = this
+ //弹出确认
+ wx.showModal({
+ title: '提示',
+ content: '是否终止当前流程申请?',
+ success: function (sm) {
+ if (sm.confirm) {
+ that.submitStopProcess();
+ }
+ }
+ })
+ },
+
+ /**
+ * 确认撤回
+ */
+ submitStopProcess() {
+ stopProcess({
+ instanceId: this.data.procInsId,
+ comment: this.data.comment
+ }).then(res => {
+ if (res.code == 200) {
+ app.toast("终止流程申请成功!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: '../../index/index',
+ })
+ }, 500)
+ }
+ });
+ },
+
+ //终止原因
+ commentblur: function (options) {
+ this.data.comment = options.detail.value;
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/editTask/index.json b/yanzhu-ui-app/miniprogram/pages/project_flowable/editTask/index.json
new file mode 100644
index 00000000..67590fea
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_flowable/editTask/index.json
@@ -0,0 +1,12 @@
+{
+ "usingComponents": {
+ "van-overlay": "@vant/weapp/overlay/index",
+ "van-collapse": "@vant/weapp/collapse",
+ "van-collapse-item": "@vant/weapp/collapse-item",
+ "van-popup": "@vant/weapp/popup",
+ "van-picker": "@vant/weapp/picker/index",
+ "van-steps": "@vant/weapp/steps/index",
+ "van-tree-select": "@vant/weapp/tree-select/index"
+ },
+ "navigationStyle":"custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/editTask/index.wxml b/yanzhu-ui-app/miniprogram/pages/project_flowable/editTask/index.wxml
new file mode 100644
index 00000000..b7496b38
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_flowable/editTask/index.wxml
@@ -0,0 +1,164 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{(flowRecordList.length-index) < 9 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}}
+ {{item.taskName}}{{item.commentResult}}
+ {{item.commentResult}}
+ {{item.commentResult}}
+ {{item.commentResult}}
+ {{item.commentResult}}
+ {{item.commentResult}}
+
+
+
+
+
+ 办理用户:{{item.assigneeName}}
+
+
+ 办理单位:{{item.deptName}}
+
+
+ 候选办理:{{item.candidate}}
+
+
+ 驳回节点:{{item.deleteReason}}
+
+
+ 接收时间:{{item.startTime}}
+
+
+ 处理时间:{{item.endTime}}
+
+
+ 处理耗时:{{item.duration}}
+
+
+ 处理意见:{{item.message}}
+
+
+
+
+
+
+
+
+
+
+
+ 使用单位
+
+
+
+
+
+ 使用时间
+
+
+
+
+
+ 申请原因
+
+
+
+
+
+ 申请图片
+ [其它格式文件请截图上传、电脑端上传]
+
+
+
+
+
+
+ 申请文件
+ [仅可上传pdf、doc、docx、xls、xlsx]
+
+
+
+
+
+
+
+
+
+
+ 申请明细 {{ format.indexNumFormat(index) }}
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 添加申请明细
+
+
+
+
+
+
+ 终止原因
+
+
+
+
+
+
+
+
+ 取消
+ 终止申请
+ 提交申请
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/editTask/index.wxss b/yanzhu-ui-app/miniprogram/pages/project_flowable/editTask/index.wxss
new file mode 100644
index 00000000..7e98c59b
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_flowable/editTask/index.wxss
@@ -0,0 +1,201 @@
+/* pageage/safetyManagement/addSafetyInspect/index.wxss */
+.van-popup{
+ background: none !important;
+}
+.van-image__img{
+ border-radius: 10rpx !important;
+}
+.radio_custom_class{
+ padding: 10rpx 100rpx 10rpx 0;
+}
+.radio_label_class{
+ color: #ffffff !important;
+}
+.max_tab_name{
+ padding: 0 40rpx;
+ font-size:30rpx;
+ height: 460rpx;
+ overflow: auto;
+ margin-top: 20rpx;
+ text-align: center;
+ }
+ .van-popup.van-popup--bottom{
+ background: #232a44;
+ }
+ .van-popup {
+ background-color: var(--popup-background-color,#232a44) !important;
+ }
+ .font_color{
+ padding: 15rpx 0;
+ color: #157dd2;
+ }
+ .active{
+ font-size:30rpx;
+ font-weight: 600;
+ color: #14feff
+ }
+ .van-collapse.van-hairline--top-bottom:after{
+ border-width: 0px 0;
+ }
+ .van-cell.van-cell--borderless{
+ background-color: #2b345b;
+ color: #fff;
+ margin-top: 30rpx;
+ border-radius: 5rpx;
+ }
+ .van-cell.van-cell--borderless:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item__title.van-collapse-item__title--expanded:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item .van-cell:after{
+ border-bottom: 0;
+ }
+ .van-collapse-item.van-hairline--top:after{
+ border-top-width:0
+ }
+ .van-cell.van-cell--clickable{
+ background-color: #2b345b;
+ margin-top: 30rpx;
+ color: #fff;
+ border-radius: 15rpx;
+
+ }
+ .van-cell.van-cell--clickable:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item__wrapper .van-collapse-item__content{
+ background-color: #1e2336;
+ color:#8ca4ec ;
+ border-width: 0px 0;
+ }
+ .gk_open_con view{
+ padding: 10rpx 0;
+ width: 100%;
+ }
+ .gk_open_con image{
+ width: 30rpx;
+ height: 30rpx;
+ margin-right: 5rpx;
+ position: relative;
+ top: 5rpx;
+ }
+ .pass{
+ background-color: #388a38;
+ }
+ .transact{
+ background-color: #8e6424;
+ }
+ .text_active{
+ padding-left: 5rpx;
+ color: #8369f5;
+ }
+ .van-steps{
+ background-color: transparent !important;
+ }
+ .van-step--horizontal .van-step__circle-container{
+ background-color: transparent !important;
+ }
+ .van-steps--horizontal{
+ padding: 10px 20px !important;
+ }
+ .van-popup{
+ background: none !important;
+ }
+ .van-image__img{
+ border-radius: 10rpx !important;
+ }
+ .radio_custom_class{
+ padding: 10rpx 100rpx 10rpx 0;
+ }
+ .radio_label_class{
+ color: #ffffff !important;
+ }
+ .max_tab_name{
+ padding: 0 40rpx;
+ font-size:30rpx;
+ height: 460rpx;
+ overflow: auto;
+ margin-top: 20rpx;
+ text-align: center;
+ }
+ .van-popup.van-popup--bottom{
+ background: #232a44;
+ }
+ .van-popup {
+ background-color: var(--popup-background-color,#232a44) !important;
+ }
+ .font_color{
+ padding: 15rpx 0;
+ color: #157dd2;
+ }
+ .active{
+ font-size:30rpx;
+ font-weight: 600;
+ color: #14feff
+ }
+ .van-collapse.van-hairline--top-bottom:after{
+ border-width: 0px 0;
+ }
+ .van-cell.van-cell--borderless{
+ background-color: #2b345b;
+ color: #fff;
+ margin-top: 30rpx;
+ border-radius: 5rpx;
+ }
+ .van-cell.van-cell--borderless:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item__title.van-collapse-item__title--expanded:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item .van-cell:after{
+ border-bottom: 0;
+ }
+ .van-collapse-item.van-hairline--top:after{
+ border-top-width:0
+ }
+ .van-cell.van-cell--clickable{
+ background-color: #2b345b;
+ margin-top: 30rpx;
+ color: #fff;
+ border-radius: 15rpx;
+
+ }
+ .van-cell.van-cell--clickable:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item__wrapper .van-collapse-item__content{
+ background-color: #1e2336;
+ color:#8ca4ec ;
+ border-width: 0px 0;
+ }
+ .text_active{
+ padding-left: 5rpx;
+ color: #8369f5;
+ }
+ .van-sidebar{
+ background-color: #212737!important;
+ }
+ .van-sidebar-item{
+ color: #EFEFEF!important;
+ background-color: #212737!important;
+ }
+ .van-sidebar-item--selected{
+ border-color:var(--sidebar-selected-border-color,#8369f5)!important;
+ background-color: #252d41 !important;
+ color: #83a5ef !important;
+ }
+ .van-tree-select__content{
+ background-color:#252d41 !important;
+ }
+ .van-tree-select__item--active {
+ color: var(--tree-select-item-active-color,#8369f5) !important;
+ }
+ .van-tree-select{
+ height: 800rpx !important;
+ }
+ .van-popup.van-popup--bottom {
+ margin-bottom: -55rpx !important;
+ }
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/finished/index.js b/yanzhu-ui-app/miniprogram/pages/project_flowable/finished/index.js
new file mode 100644
index 00000000..b3dcd9f8
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_flowable/finished/index.js
@@ -0,0 +1,144 @@
+import {
+ myFinishedFlowTaskList
+} from '../../../api/flowable'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ initData: {},
+ listData: [],
+ pageNum: 1,
+ pageSize: 50,
+ total: 0,
+ },
+
+ infoTap(e) {
+ let {
+ deployId,
+ procInsId,
+ taskId,
+ taskName,
+ category,
+ startDeptName,
+ startUserName,
+ procDefName,
+ businessKey,
+ businessKeyName,
+ businessDeptId,
+ businessKeyParName,
+ startUserId,
+ finishTime
+ } = e.currentTarget.dataset.set
+ if (!finishTime) {
+ finishTime = "";
+ }
+ wx.redirectTo({
+ url: `../detailTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&category=${category}&projectName=${businessKeyName}&businessKey=${businessKey}&businessKeyParName=${businessKeyParName}&businessDeptId=${businessDeptId}&startUserId=${startUserId}&finishTime=${finishTime}&ret=finished`,
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ this.getListData();
+ },
+
+ /**
+ * 查询项目举牌验收数据
+ */
+ getListData() {
+ let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize;
+ myFinishedFlowTaskList(params).then(res => {
+ if (res.code == 200) {
+ let _list = [];
+ res.rows.forEach( it => {
+ it.duration = app.getDurationDate(it.duration);
+ _list.push(it);
+ });
+ this.setData({
+ total: res.total,
+ listData: this.data.listData.concat(_list)
+ });
+ }
+ });
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
+ wx.redirectTo({
+ url: '../../index/index',
+ })
+ },
+
+ onScrollToLower() {
+ let nal = Math.ceil(this.data.total / this.data.pageSize);
+ if (this.data.pageNum < nal) {
+ this.setData({
+ pageNum: this.data.pageNum + 1
+ });
+ this.getListData();
+ }
+ },
+
+ //项目切换 返回值
+ onProjectSelect(e) {
+ let projectId = e.detail.id;
+ let projectName = e.detail.text;
+ app.globalData.projectId = projectId;
+ app.globalData.projectName = projectName;
+ this.onLoad();
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/finished/index.json b/yanzhu-ui-app/miniprogram/pages/project_flowable/finished/index.json
new file mode 100644
index 00000000..c38e2687
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_flowable/finished/index.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "van-overlay": "@vant/weapp/overlay/index" ,
+ "van-popup": "@vant/weapp/popup/index"
+ },
+ "navigationStyle":"custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/finished/index.wxml b/yanzhu-ui-app/miniprogram/pages/project_flowable/finished/index.wxml
new file mode 100644
index 00000000..b541c2b7
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_flowable/finished/index.wxml
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+ {{index < 10 ?'0'+(index+1):(index+1)}}
+ {{item.endTime}}
+ 已提交
+ 已完成
+ 已退回
+ 已终止
+ 已驳回
+ 已撤回
+
+
+
+
+ 临时项目:{{item.businessKeyName}}
+ 审批事项:{{item.procDefName}}
+
+
+ 当前节点:{{item.taskName}}
+ 流程结束
+
+ 接收时间:{{item.createTime}}
+ 申请用户:{{item.startUserName}}
+ 申请单位:{{item.startDeptName}}
+
+
+
+
+
+
+
+ 暂无数据
+
+
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/finished/index.wxss b/yanzhu-ui-app/miniprogram/pages/project_flowable/finished/index.wxss
new file mode 100644
index 00000000..8aacdd75
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_flowable/finished/index.wxss
@@ -0,0 +1,19 @@
+/* pageage/project_checking_list/project_checking_list.wxss */
+.gd_max{
+ padding:10rpx 50rpx 0;
+ }
+ .gd_min{
+ padding: 30rpx 0;
+ text-align: center;
+ }
+ .gd_min image{
+ width: 150rpx;
+ height: 150rpx;
+ }
+ .gd_min view{
+ padding: 10rpx;
+ color: #89a4eb;
+ }
+ .inspect_max_scroll_1 {
+ height: 82vh;
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/initTask/index.js b/yanzhu-ui-app/miniprogram/pages/project_flowable/initTask/index.js
new file mode 100644
index 00000000..6f7be19a
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_flowable/initTask/index.js
@@ -0,0 +1,547 @@
+import {
+ readNotes,
+ readDeployNotes,
+ startProcessInstance
+} from '../../../api/flowable'
+import {
+ findMyDeptList,
+ findAllByCategory
+} from '../../../api/publics'
+import config from '../../../config'
+import {
+ getToken
+} from '../../../utils/auth'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ maxDate: new Date(2088, 1, 1).getTime(),
+ options: {},
+ initData: {},
+ deptList: [],
+ dataList: [],
+ useDeptId: "",
+ useTime: "",
+ applyReason: "",
+ limit: 9,
+ detailDataList: [],
+ filesData: [],
+ fileType: ["png", "jpg", "jpeg"],
+ flowNodeList: [],
+ flowNodes: [],
+ stepList: [],
+ active: "",
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ this.setData({
+ options: options,
+ initData: {
+ id: app.globalData.useProjectId,
+ text: app.globalData.useProjectName
+ }
+ })
+ this.initDeptList();
+ this.findMyDeptAssetsList();
+ this.findFlowNodes();
+ this.newApplyDetail();
+ },
+
+ /**
+ * 栏目触发事件
+ */
+ onClickNav(e) {
+ var index = e.currentTarget.dataset.index
+ let list = this.data.detailDataList;
+ list[index].activeId = null;
+ list[index].mainActiveIndex = e.detail.index;
+ this.setData({
+ detailDataList: list
+ })
+ console.log(e.detail.index, this.data.dataList);
+ },
+
+ /**
+ * 选项触发事件
+ */
+ onClickItem(e) {
+ var index = e.currentTarget.dataset.index
+ let list = this.data.detailDataList;
+ list[index].detailId = e.detail.id;
+ list[index].detailName = e.detail.text;
+ list[index].showDetailsName = e.detail.detailName;
+ if (e.detail.units) {
+ let itemList = [];
+ e.detail.units.split(',').forEach((item, idx) => {
+ if (idx == 0) {
+ list[index].useUnitIndex = idx;
+ list[index].useUnit = item;
+ }
+ itemList.push({
+ id: idx,
+ text: item
+ });
+ });
+ list[index].assetsUnits = itemList;
+ }
+ list[index].activeId = e.detail.id;
+ list[index].showDetailsPopup = false;
+ this.setData({
+ detailDataList: list
+ })
+ },
+
+ /**
+ * 初始化部门列表
+ */
+ initDeptList() {
+ findMyDeptList().then(res => {
+ let list = [];
+ res.data.forEach(item => {
+ list.push({
+ "id": item.deptId,
+ "text": item.deptName
+ });
+ });
+ this.setData({
+ deptList: list,
+ useDeptId: app.globalData.userData?.deptId,
+ })
+ });
+ },
+
+ //查询工作流节点
+ findFlowNodes() {
+ //readNotes
+ readDeployNotes(this.data.options.deploymentId).then(res => {
+ if (res.code == 200) {
+ let list = [{
+ text: '开始'
+ }];
+ res.data.forEach(item => {
+ list.push({
+ text: item.name,
+ desc: ''
+ });
+ });
+ list.push({
+ text: '结束'
+ });
+ this.setData({
+ stepList: list
+ })
+ }
+ });
+ },
+
+ //新增问题
+ newApplyDetail() {
+ var data = this.data.detailDataList
+ data.push({
+ detailId: '',
+ detailName: '',
+ showDetailsName: '',
+ showDetailsPopup: false,
+ mainActiveIndex: 0,
+ activeId: [],
+ useUnit: "",
+ useUnitIndex: "",
+ assetsUnits: [],
+ applyNumber: "",
+ assetsVersion: "",
+ useReason: ""
+ })
+ this.setData({
+ detailDataList: data
+ })
+ },
+
+ /**
+ * 删除申请详情
+ * @param {*} e
+ */
+ delApplyDetail(e) {
+ var index = e.currentTarget.dataset.index
+ var data = this.data.detailDataList
+ data.splice(index, 1);
+ this.setData({
+ detailDataList: data
+ })
+ },
+
+ //保存
+ onSave() {
+ let {
+ options,
+ initData,
+ useDeptId,
+ useTime,
+ applyReason,
+ detailDataList,
+ filesData
+ } = this.data;
+ //数据效验
+ if (!initData.id || !options.procDefId || !options.category || !options.deploymentId) {
+ app.toast("数据异常,请刷新页面重试!")
+ return false;
+ }
+ if (useDeptId == "") {
+ app.toast("请选择使用单位!")
+ return false;
+ }
+ if (useTime == "") {
+ app.toast("请选择使用时间!")
+ return false;
+ }
+ if (applyReason == "") {
+ app.toast("请填写申请原因!")
+ return false;
+ }
+ if (detailDataList.length > 0) {
+ for (let i = 0; i < detailDataList.length; i++) {
+ if (!detailDataList[i].detailId || !detailDataList[i].detailName || detailDataList[i].activeId.length == 0) {
+ app.toast("请选择申请明细!")
+ return false;
+ }
+ if (!detailDataList[i].applyNumber) {
+ app.toast("请填写申请数量!")
+ return false;
+ }
+ if (!detailDataList[i].useUnit) {
+ app.toast("请选择单位名称!")
+ return false;
+ }
+ }
+ } else {
+ app.toast("请添加申请明细!")
+ }
+ if (filesData.length > 0) {
+ for (let i = 0; i < filesData.length; i++) {
+ let _fileType = filesData[0].split('.');
+ _fileType = _fileType[_fileType.length - 1].toLowerCase();
+ if (this.data.fileType.indexOf(_fileType) == -1) {
+ app.toast("申请附件不支持 [ " + _fileType + " ] 格式!请检查第" + (i + 1) + "个附件")
+ return false;
+ }
+ }
+ }
+ let that = this;
+ wx.showModal({
+ title: '提示',
+ content: '是否确定提交流程申请?',
+ success: function (sm) {
+ if (sm.confirm) {
+ that.submit()
+ } else if (sm.cancel) {
+ console.log('用户点击取消');
+ }
+ }
+ })
+ },
+
+ /**
+ * 表单确认提交
+ */
+ submit() {
+ let {
+ filesData,
+ } = this.data;
+ let fileUrls = [];
+ if (filesData.length > 0) {
+ filesData.forEach(async (item) => {
+ //这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
+ let ajaxResult = await this.syncUploadImage(item);
+ fileUrls.push(ajaxResult.data.fileName);
+ //验证图片上传完毕
+ if (fileUrls.length == filesData.length) {
+ this.sbm(fileUrls.toString());
+ }
+ })
+ } else {
+ this.sbm("");
+ }
+
+ },
+
+ sbm(fileUrls) {
+ let {
+ options,
+ initData,
+ useDeptId,
+ useTime,
+ applyReason,
+ detailDataList,
+ dataList
+ } = this.data;
+ let applyDetailList = [];
+ detailDataList.forEach(detail => {
+ applyDetailList.push({
+ superTypeKey: options.category,
+ typeId: dataList[detail.mainActiveIndex].id,
+ typeName: dataList[detail.mainActiveIndex].name,
+ assetsId: detail.detailId,
+ assetsName: detail.detailName,
+ number: detail.applyNumber,
+ assetsUnit: detail.useUnit,
+ assetsVersion: detail.assetsVersion,
+ useReason: detail.useReason
+ });
+ });
+ let params = {
+ procDefId: options.procDefId,
+ proProjectApply: {
+ deptId: useDeptId,
+ projId: initData.id,
+ projName: initData.text,
+ applyType: options.category,
+ applyStatus: 1,
+ useTime,
+ applyReason,
+ applyFiles: fileUrls,
+ proProjectApplyDetailList: applyDetailList
+ }
+ }
+ startProcessInstance(params).then(res => {
+ if (res.code == '200') {
+ app.toast("提交流程申请成功!", 'success');
+ //跳转页面
+ wx.redirectTo({
+ url: '../../index/index',
+ })
+ }
+ });
+ },
+
+ /**
+ * 这里考虑上传图片异步问题,封装为同步
+ */
+ syncUploadImage(file) {
+ let url = config.baseUrl + "/common/upload";
+ let name = "file";
+ return new Promise((resolve, reject) => {
+ wx.uploadFile({
+ url, // 上传的服务器接口地址
+ filePath: file,
+ header: {
+ "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
+ 'Authorization': 'Bearer ' + getToken(),
+ },
+ name, //上传的所需字段,后端提供
+ formData: null,
+ success: (res) => {
+ // 上传完成操作
+ const data = JSON.parse(res.data)
+ resolve({
+ data: data
+ })
+ },
+ fail: (err) => {
+ //上传失败:修改pedding为reject
+ console.log("访问接口失败", err);
+ wx.showToast({
+ title: "网络出错,上传失败",
+ icon: 'none',
+ duration: 1000
+ });
+ reject(err)
+ }
+ });
+ })
+ },
+
+ //申请说明输入
+ applyReasonblur: function (options) {
+ this.data.applyReason = options.detail.value;
+ },
+
+ //申请附件上传
+ fileUpload(options) {
+ let files = options.detail;
+ this.setData({
+ filesData: files
+ });
+ },
+
+ //使用单位
+ onSelectDept(e) {
+ this.setData({
+ useDeptId: e.detail.id
+ })
+ },
+
+ //使用时间
+ onInputTime(e) {
+ this.setData({
+ useTime: e.detail
+ })
+ },
+
+ //查询部门资产列表信息
+ findMyDeptAssetsList() {
+ findAllByCategory(this.data.options.category).then(res => {
+ if (res.code == '200') {
+ let list = [];
+ res.data.forEach(item => {
+ let children = [];
+ item.childrenAssetsTypeList.forEach(child => {
+ children.push({
+ id: child.id,
+ text: child.name,
+ units: child.unit,
+ detailName: item.name + ' > ' + child.name
+ });
+ })
+ list.push({
+ id: item.id,
+ text: item.name,
+ children: children
+ });
+ });
+ this.setData({
+ dataList: list
+ })
+ }
+ });
+ },
+
+ //输入申请数量
+ onInputNumber(e) {
+ var index = e.currentTarget.dataset.index
+ let list = this.data.detailDataList;
+ let value = e.detail.value;
+ list[index].applyNumber = value;
+ this.setData({
+ detailDataList: list
+ })
+ },
+
+ //选择资产单位
+ onSelectUnit(e) {
+ var index = e.currentTarget.dataset.index
+ let list = this.data.detailDataList;
+ list[index].useUnit = e.detail.text;
+ list[index].useUnitIndex = e.detail.id;
+ this.setData({
+ detailDataList: list
+ })
+ },
+
+ //输入规格型号
+ onInputVersion(e) {
+ var index = e.currentTarget.dataset.index
+ let list = this.data.detailDataList;
+ list[index].assetsVersion = e.detail.value;
+ this.setData({
+ detailDataList: list
+ })
+ },
+
+ //输入使用说明
+ onInputUseReason(e) {
+ var index = e.currentTarget.dataset.index
+ let list = this.data.detailDataList;
+ list[index].useReason = e.detail.value;
+ this.setData({
+ detailDataList: list
+ })
+ },
+
+ //关闭申请明细选择
+ onShowPopup(e) {
+ var index = e.currentTarget.dataset.index
+ let list = this.data.detailDataList;
+ list[index].showDetailsPopup = true;
+ this.setData({
+ detailDataList: list
+ })
+ },
+
+ //关闭申请明细选择
+ onClosePopup(e) {
+ var index = e.currentTarget.dataset.index
+ let list = this.data.detailDataList;
+ list[index].showDetailsPopup = false;
+ this.setData({
+ detailDataList: list
+ })
+ },
+
+ /**
+ * 切换临建项目
+ * @param {*} e
+ */
+ onProjectSelect: function (e) {
+ let projectId = e.detail.id;
+ let projectName = e.detail.text;
+ app.globalData.useProjectId = projectId;
+ app.globalData.useProjectName = projectName;
+ this.setData({
+ initData: {
+ id: app.globalData.useProjectId,
+ text: app.globalData.useProjectName
+ }
+ })
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
+ wx.redirectTo({
+ url: '../myFlowDefinition/index',
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/initTask/index.json b/yanzhu-ui-app/miniprogram/pages/project_flowable/initTask/index.json
new file mode 100644
index 00000000..d3af9c66
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_flowable/initTask/index.json
@@ -0,0 +1,11 @@
+{
+ "usingComponents": {
+ "van-overlay": "@vant/weapp/overlay/index",
+ "van-collapse": "@vant/weapp/collapse",
+ "van-popup": "@vant/weapp/popup",
+ "van-picker": "@vant/weapp/picker/index",
+ "van-steps": "@vant/weapp/steps/index",
+ "van-tree-select": "@vant/weapp/tree-select/index"
+ },
+ "navigationStyle":"custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/initTask/index.wxml b/yanzhu-ui-app/miniprogram/pages/project_flowable/initTask/index.wxml
new file mode 100644
index 00000000..84be4161
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_flowable/initTask/index.wxml
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+ 使用单位
+
+
+
+
+
+ 使用时间
+
+
+
+
+
+ 申请原因
+
+
+
+
+
+ 申请图片
+ [其它格式文件请截图上传或电脑端上传]
+
+
+
+
+
+
+
+
+
+
+ 申请明细 {{ format.indexNumFormat(index) }}
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 添加申请明细
+
+
+
+
+ 取消
+ 提交申请
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/initTask/index.wxss b/yanzhu-ui-app/miniprogram/pages/project_flowable/initTask/index.wxss
new file mode 100644
index 00000000..648a1cbc
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_flowable/initTask/index.wxss
@@ -0,0 +1,110 @@
+.van-popup{
+ background: none !important;
+}
+.van-image__img{
+ border-radius: 10rpx !important;
+}
+.radio_custom_class{
+ padding: 10rpx 100rpx 10rpx 0;
+}
+.radio_label_class{
+ color: #ffffff !important;
+}
+.max_tab_name{
+ padding: 0 40rpx;
+ font-size:30rpx;
+ height: 460rpx;
+ overflow: auto;
+ margin-top: 20rpx;
+ text-align: center;
+ }
+ .van-popup.van-popup--bottom{
+ background: #232a44;
+ }
+ .van-popup {
+ background-color: var(--popup-background-color,#232a44) !important;
+ }
+ .font_color{
+ padding: 15rpx 0;
+ color: #157dd2;
+ }
+ .active{
+ font-size:30rpx;
+ font-weight: 600;
+ color: #14feff
+ }
+ .van-collapse.van-hairline--top-bottom:after{
+ border-width: 0px 0;
+ }
+ .van-cell.van-cell--borderless{
+ background-color: #2b345b;
+ color: #fff;
+ margin-top: 30rpx;
+ border-radius: 5rpx;
+ }
+ .van-cell.van-cell--borderless:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item__title.van-collapse-item__title--expanded:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item .van-cell:after{
+ border-bottom: 0;
+ }
+ .van-collapse-item.van-hairline--top:after{
+ border-top-width:0
+ }
+ .van-cell.van-cell--clickable{
+ background-color: #2b345b;
+ margin-top: 30rpx;
+ color: #fff;
+ border-radius: 15rpx;
+
+ }
+ .van-cell.van-cell--clickable:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item__wrapper .van-collapse-item__content{
+ background-color: #1e2336;
+ color:#8ca4ec ;
+ border-width: 0px 0;
+ }
+ .text_active{
+ padding-left: 5rpx;
+ color: #8369f5;
+ }
+
+ .van-steps{
+ background-color: transparent !important;
+ }
+ .van-step--horizontal .van-step__circle-container{
+ background-color: transparent !important;
+ }
+ .van-steps--horizontal{
+ padding: 10px 20px !important;
+ }
+
+ .van-sidebar{
+ background-color: #212737!important;
+ }
+ .van-sidebar-item{
+ color: #EFEFEF!important;
+ background-color: #212737!important;
+ }
+ .van-sidebar-item--selected{
+ border-color:var(--sidebar-selected-border-color,#8369f5)!important;
+ background-color: #252d41 !important;
+ color: #83a5ef !important;
+ }
+ .van-tree-select__content{
+ background-color:#252d41 !important;
+ }
+ .van-tree-select__item--active {
+ color: var(--tree-select-item-active-color,#8369f5) !important;
+ }
+ .van-tree-select{
+ height: 800rpx !important;
+ }
+ .van-popup.van-popup--bottom {
+ margin-bottom: -55rpx !important;
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/myFlowDefinition/index.js b/yanzhu-ui-app/miniprogram/pages/project_flowable/myFlowDefinition/index.js
new file mode 100644
index 00000000..9a7fad4f
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_flowable/myFlowDefinition/index.js
@@ -0,0 +1,104 @@
+import {
+ myDefinitionList,
+} from '../../../api/flowable'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ pamams: {
+ pageNum: 1,
+ pageSize: 10
+ },
+ listData: [],
+ },
+
+ addInfo(e) {
+ let {
+ id,
+ category,
+ deploymentId
+ } = e.currentTarget.dataset.set
+ wx.redirectTo({
+ url: `../initTask/index?procDefId=${id}&category=${category}&deploymentId=${deploymentId}`,
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ this.getListData();
+ },
+
+ /**
+ * 查询项目举牌验收数据
+ */
+ getListData() {
+ myDefinitionList(this.data.pamams).then(res => {
+ if(res.data.records.length>0){
+ this.setData({
+ listData: res.data.records
+ })
+ }
+ });
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
+ wx.redirectTo({
+ url: '../../index/index',
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/myFlowDefinition/index.json b/yanzhu-ui-app/miniprogram/pages/project_flowable/myFlowDefinition/index.json
new file mode 100644
index 00000000..c38e2687
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_flowable/myFlowDefinition/index.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "van-overlay": "@vant/weapp/overlay/index" ,
+ "van-popup": "@vant/weapp/popup/index"
+ },
+ "navigationStyle":"custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/myFlowDefinition/index.wxml b/yanzhu-ui-app/miniprogram/pages/project_flowable/myFlowDefinition/index.wxml
new file mode 100644
index 00000000..0da2393c
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_flowable/myFlowDefinition/index.wxml
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+ {{index < 10 ?'0'+(index+1):(index+1)}}
+ {{item.name}}{{' v '+item.version}}
+
+
+
+
+ 主要用于申请设备费、维保费、安拆费、运输费、配件配、燃油费、检测费等。
+
+
+
+
+ 主要用于申请主材、辅助材料、周转材料、安装材料等。
+
+
+
+
+ 主要用于申请生活用品、办公用品、差旅费、招待费、广告费、信息化系统、其他费用等。
+
+
+
+
+ 主要用于申请人工类大临、小临、零工等。
+
+
+
+
+
+
+
+
+ 暂无数据
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/myFlowDefinition/index.wxss b/yanzhu-ui-app/miniprogram/pages/project_flowable/myFlowDefinition/index.wxss
new file mode 100644
index 00000000..0b1f79a0
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_flowable/myFlowDefinition/index.wxss
@@ -0,0 +1,6 @@
+page {
+ background: #191d28 url("http://fileimg.makalu.cc/CORE_40247DD946964A15AA0D4000E1031E19.png") no-repeat bottom/100%;
+ }
+.inspect_list_title_text{
+ padding-left: 50rpx;
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/myProcessIns/index.js b/yanzhu-ui-app/miniprogram/pages/project_flowable/myProcessIns/index.js
new file mode 100644
index 00000000..98c458a9
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_flowable/myProcessIns/index.js
@@ -0,0 +1,268 @@
+import {
+ queryTaskCount,
+ myInstanceList
+} from '../../../api/flowable'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ projectId: "",
+ projectData: {},
+ initData: {},
+ show: false,
+ list: [],
+ listData: [],
+ pageNum: 1,
+ pageSize: 10,
+ lastDataSize: 10,
+ activeState: "await",
+ allCount: 0,
+ awaitCount: 0,
+ finishedCount: 0,
+ },
+
+ /**
+ * 标签切换
+ */
+ typeJump(e) {
+ let index = e.currentTarget.dataset.index;
+ let nav = "";
+ if (index == 1) {
+ nav = 'all';
+ } else if (index == 2) {
+ nav = 'await';
+ } else if (index == 3) {
+ nav = 'finished';
+ }
+
+ this.setData({
+ activeState: nav,
+ pageNum: 1,
+ pageSize: 10,
+ lastDataSize: 10,
+ listData: [],
+ list: []
+ });
+ this.getMyDataList();
+ },
+
+ infoTap(e) {
+ let {
+ deployId,
+ procInsId,
+ taskId,
+ taskName,
+ category,
+ startDeptName,
+ startUserName,
+ procDefName,
+ businessKey,
+ businessKeyName,
+ businessDeptId,
+ businessKeyParName,
+ startUserId,
+ finishTime
+ } = e.currentTarget.dataset.set
+ if (taskName == "提交申请") {
+ wx.redirectTo({
+ url: `../editTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&category=${category}&projectName=${businessKeyName}&businessKey=${businessKey}&businessKeyParName=${businessKeyParName}&businessDeptId=${businessDeptId}&startUserId=${startUserId}`,
+ })
+ } else {
+ wx.redirectTo({
+ url: `../detailTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&category=${category}&projectName=${businessKeyName}&businessKey=${businessKey}&businessKeyParName=${businessKeyParName}&businessDeptId=${businessDeptId}&startUserId=${startUserId}&finishTime=${finishTime}&ret=myProcessIns`,
+ })
+ }
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ this.setData({
+ pageNum: 1,
+ pageSize: 10,
+ lastDataSize: 10,
+ listData: [],
+ list: [],
+ initData: app.globalData.searchProject
+ })
+ //查询我的申请数据
+ this.getMyDataList();
+ },
+
+ /**
+ * 查询我的流程申请
+ */
+ getMyDataList() {
+ //进入这里说明数据加载完毕
+ if (this.data.lastDataSize < this.data.pageSize) {
+ //app.toast("已经到底了,暂无可继续加载数据!")
+ return;
+ }
+ var that = this;
+ let param = {
+ "activeName": this.data.activeState
+ }
+ this.queryTaskCount(param);
+ param.pageNum = that.data.pageNum;
+ param.pageSize = that.data.pageSize;
+ myInstanceList(param).then(res => {
+ //这里处理this.data.lastDataSize=this.data.pageSize
+ if (that.data.list.length > 0 && res.rows.length > 0 && that.data.list[0].taskId == res.rows[0].taskId) {
+ that.setData({
+ lastDataSize: 0,
+ })
+ } else {
+ let _list = [];
+ res.rows.forEach(it => {
+ it.duration = that.getDurationDate(it.duration);
+ _list.push(it);
+ });
+ that.setData({
+ pageNum: that.data.pageNum + 1,
+ lastDataSize: res.rows.length,
+ list: res.rows,
+ listData: that.data.listData.concat(_list)
+ })
+ }
+ });
+ },
+
+ /***
+ * 查询申请发起数量统计
+ */
+ queryTaskCount(param) {
+ queryTaskCount(param).then(res => {
+ let awaits = 0;
+ if (res.data.await) {
+ awaits = res.data.await;
+ }
+ let finished = 0;
+ if (res.data.finished) {
+ finished = res.data.finished;
+ }
+ this.setData({
+ allCount: awaits + finished,
+ awaitCount: awaits,
+ finishedCount: finished
+ });
+ });
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
+ wx.redirectTo({
+ url: '../../index/index',
+ })
+ },
+
+ /**
+ * 分页加载数据
+ */
+ onScrollToLower() {
+ console.log("滚动条到底了,开始加载新数据");
+ this.getMyDataList();
+ },
+
+ //项目切换 返回值
+ onProjectSelect(e) {
+ let project = {
+ id: e.detail.id,
+ text: e.detail.text,
+ projectId: e.detail.id,
+ projectName: e.detail.text
+ }
+ app.globalData.searchProject = project;
+ this.onLoad();
+ },
+
+ /**
+ * 获取流程耗时
+ */
+ getDurationDate(val) {
+ let day = 0;
+ let hours = 0;
+ let min = val;
+ if (min > 1440) {
+ day = parseInt(min / 1440);
+ min = min % 1440;
+ if (min > 60) {
+ hours = parseInt(min / 60);
+ min = min % 60;
+ }
+ } else if (min > 60) {
+ hours = parseInt(min / 60);
+ min = min % 60;
+ }
+ if (day > 0) {
+ if (day < 10) day = "0" + day;
+ if (hours < 10) hours = "0" + hours;
+ if (min < 10) min = "0" + min;
+ return day + "天" + hours + "小时" + min + "分钟";
+ }
+ if (hours > 0) {
+ if (hours < 10) hours = "0" + hours;
+ if (min < 10) min = "0" + min;
+ return hours + "小时" + min + "分钟";
+ }
+ if (min > 0) {
+ if (min < 10) min = "0" + min;
+ return min + "分钟";
+ }
+ if (min == 0) {
+ return "1分钟";
+ }
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/myProcessIns/index.json b/yanzhu-ui-app/miniprogram/pages/project_flowable/myProcessIns/index.json
new file mode 100644
index 00000000..c38e2687
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_flowable/myProcessIns/index.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "van-overlay": "@vant/weapp/overlay/index" ,
+ "van-popup": "@vant/weapp/popup/index"
+ },
+ "navigationStyle":"custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/myProcessIns/index.wxml b/yanzhu-ui-app/miniprogram/pages/project_flowable/myProcessIns/index.wxml
new file mode 100644
index 00000000..a9b3d5df
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_flowable/myProcessIns/index.wxml
@@ -0,0 +1,61 @@
+
+
+
+
+ 全部({{allCount}})
+ 进行中({{awaitCount}})
+ 已完成({{finishedCount}})
+
+
+
+
+
+
+ {{index < 10 ?'0'+(index+1):(index+1)}}
+ {{item.createTime}}
+ 进行中
+ 已完成
+ 已退回
+ 已终止
+ 已驳回
+ 已撤回
+
+
+
+
+ 临时项目:{{item.businessKeyName}}
+ 申请类型:{{item.procDefName}}
+ {{' 流程版本v'+item.procDefVersion}}
+ 当前节点:{{item.taskName}}
+ 流程结束
+
+ 处理耗时:{{item.duration}}
+ 办结时间:{{item.finishTime}}
+
+
+
+
+
+
+ 暂无数据
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/myProcessIns/index.wxss b/yanzhu-ui-app/miniprogram/pages/project_flowable/myProcessIns/index.wxss
new file mode 100644
index 00000000..1413b2a8
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_flowable/myProcessIns/index.wxss
@@ -0,0 +1,22 @@
+/* pageage/project_checking_list/project_checking_list.wxss */
+.gd_max{
+ padding:10rpx 50rpx 0;
+ }
+ .gd_min{
+ padding: 30rpx 0;
+ text-align: center;
+ }
+ .gd_min image{
+ width: 150rpx;
+ height: 150rpx;
+ }
+ .gd_min view{
+ padding: 10rpx;
+ color: #89a4eb;
+ }
+ .inspect_max_scroll_1 {
+ height: 82vh;
+}
+.ml10{
+ margin-left: 15rpx;
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_info/add/index.js b/yanzhu-ui-app/miniprogram/pages/project_info/add/index.js
new file mode 100644
index 00000000..b166313f
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_info/add/index.js
@@ -0,0 +1,188 @@
+import {
+ getProjectNo,
+ addProjectInfo,
+} from '../../../api/project'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ parDeptId: null,
+ projectName: null,
+ proNo: "",
+ proName: "",
+ proInfo: "",
+ proAddress: "",
+ proPerson: "",
+ proPersonPhone: "",
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ this.initProNo();
+ this.setData({
+ parDeptId: app.globalData.userData?.parDeptId,
+ parDeptName: app.globalData.userData?.parDeptName
+ });
+ },
+
+ /**
+ * 初始化临建项目编号
+ * @param {*} e
+ */
+ initProNo: function (e) {
+ getProjectNo().then(res => {
+ if (res.code == 200) {
+ this.setData({
+ proNo: res.data
+ });
+ }
+ })
+ },
+
+ /**
+ * 项目名称
+ * @param {*} e
+ */
+ inputProName: function (e) {
+ this.setData({
+ proName: e.detail.value
+ });
+ },
+
+ /**
+ * 项目负责人
+ * @param {*} e
+ */
+ inputProPerson: function (e) {
+ this.setData({
+ proPerson: e.detail.value
+ });
+ },
+
+ /**
+ * 项目负责人电话
+ * @param {*} e
+ */
+ inputProPersonPhone: function (e) {
+ this.setData({
+ proPersonPhone: e.detail.value
+ });
+ },
+
+ /**
+ * 临建项目地址
+ * @param {*} e
+ */
+ onInputProAddress: function (e) {
+ this.setData({
+ proAddress: e.detail.value
+ });
+ },
+
+ /**
+ * 临建项目详情
+ * @param {*} e
+ */
+ onInputProInfo: function (e) {
+ this.setData({
+ proInfo: e.detail.value
+ });
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
+ wx.redirectTo({
+ url: '../list/index',
+ })
+ },
+
+ /**
+ * 提交保存数据
+ */
+ onSaveSubmit: function () {
+ let {
+ proNo,
+ proName,
+ proInfo,
+ proAddress,
+ proPerson,
+ proPersonPhone,
+ } = this.data;
+ //数据效验
+ if (proNo == "") {
+ app.toast("数据异常,请刷新页面重试!")
+ return;
+ }
+ if (proName == "") {
+ app.toast("请填写临建项目名称!")
+ return;
+ }
+ addProjectInfo({
+ no: proNo,
+ name: proName
+ }).then(res => {
+ if (res.code == 200) {
+ app.toast("新增成功!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: '../list/index',
+ })
+ }, 200)
+ }
+ });
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_info/add/index.json b/yanzhu-ui-app/miniprogram/pages/project_info/add/index.json
new file mode 100644
index 00000000..ba2821f5
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_info/add/index.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationStyle":"custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_info/add/index.wxml b/yanzhu-ui-app/miniprogram/pages/project_info/add/index.wxml
new file mode 100644
index 00000000..6aad83f4
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_info/add/index.wxml
@@ -0,0 +1,61 @@
+
+
+
+
+ {{parDeptName}}
+
+
+ 临建项目编号
+
+
+
+
+
+ 临建项目名称
+
+
+
+
+
+ 临建项目地址
+
+
+
+
+
+ 临建项目详情
+
+
+
+
+
+ 项目负责人
+
+
+
+
+
+ 负责人电话
+
+
+
+
+
+
+ 取消
+ 提交保存
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_info/add/index.wxss b/yanzhu-ui-app/miniprogram/pages/project_info/add/index.wxss
new file mode 100644
index 00000000..a9e1de8b
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_info/add/index.wxss
@@ -0,0 +1 @@
+/* pages/project_info/add/index.wxss */
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_info/edit/index.js b/yanzhu-ui-app/miniprogram/pages/project_info/edit/index.js
new file mode 100644
index 00000000..9f1aa7a2
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_info/edit/index.js
@@ -0,0 +1,187 @@
+import {
+ getProjectInfo,
+ updateProjectInfo,
+} from '../../../api/project'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ parDeptId: null,
+ projectName: null,
+ id:null,
+ infoData: {},
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ let {
+ id
+ } = options
+ this.initData(id);
+ this.setData({
+ id,
+ parDeptId: app.globalData.userData?.parDeptId,
+ parDeptName: app.globalData.userData?.parDeptName
+ });
+ },
+
+ /**
+ * 初始化临建项目
+ * @param {*} e
+ */
+ initData: function (id) {
+ getProjectInfo(id).then(res => {
+ if (res.code == 200) {
+ this.setData({
+ infoData: res.data
+ });
+ }
+ })
+ },
+
+ /**
+ * 项目名称
+ * @param {*} e
+ */
+ inputProName: function (e) {
+ this.setData({
+ "infoData.name": e.detail.value
+ });
+ },
+
+ /**
+ * 项目负责人
+ * @param {*} e
+ */
+ inputProPerson: function (e) {
+ this.setData({
+ "infoData.personName": e.detail.value
+ });
+ },
+
+ /**
+ * 项目负责人电话
+ * @param {*} e
+ */
+ inputProPersonPhone: function (e) {
+ this.setData({
+ "infoData.personPhone": e.detail.value
+ });
+ },
+
+ /**
+ * 临建项目地址
+ * @param {*} e
+ */
+ onInputProAddress: function (e) {
+ this.setData({
+ "infoData.address": e.detail.value
+ });
+ },
+
+ /**
+ * 临建项目详情
+ * @param {*} e
+ */
+ onInputProInfo: function (e) {
+ this.setData({
+ "infoData.infos": e.detail.value
+ });
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
+ wx.redirectTo({
+ url: '../list/index',
+ })
+ },
+
+ /**
+ * 提交保存数据
+ */
+ onEditSubmit: function () {
+ let {
+ id,
+ parDeptId,
+ infoData
+ } = this.data;
+ //数据效验
+ if (parDeptId == null || parDeptId == "" || infoData.no == "") {
+ app.toast("数据异常,请刷新页面重试!")
+ return;
+ }
+ if (infoData.name == "") {
+ app.toast("请填写临建项目名称!")
+ return;
+ }
+ updateProjectInfo({
+ id,
+ no: infoData.no,
+ name: infoData.name,
+ deptId: infoData.deptId,
+ }).then(res => {
+ if (res.code == 200) {
+ app.toast("修改成功!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: '../list/index',
+ })
+ }, 200)
+ }
+ });
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_info/edit/index.json b/yanzhu-ui-app/miniprogram/pages/project_info/edit/index.json
new file mode 100644
index 00000000..ba2821f5
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_info/edit/index.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationStyle":"custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_info/edit/index.wxml b/yanzhu-ui-app/miniprogram/pages/project_info/edit/index.wxml
new file mode 100644
index 00000000..0e8a59e2
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_info/edit/index.wxml
@@ -0,0 +1,61 @@
+
+
+
+
+ {{parDeptName}}
+
+
+ 临建项目编号
+
+
+
+
+
+ 临建项目名称
+
+
+
+
+
+ 临建项目地址
+
+
+
+
+
+ 临建项目详情
+
+
+
+
+
+ 项目负责人
+
+
+
+
+
+ 负责人电话
+
+
+
+
+
+
+ 取消
+ 提交保存
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_info/edit/index.wxss b/yanzhu-ui-app/miniprogram/pages/project_info/edit/index.wxss
new file mode 100644
index 00000000..db204a9e
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_info/edit/index.wxss
@@ -0,0 +1 @@
+/* pages/project_info/edit/index.wxss */
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_info/list/index.js b/yanzhu-ui-app/miniprogram/pages/project_info/list/index.js
new file mode 100644
index 00000000..25240d1a
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_info/list/index.js
@@ -0,0 +1,130 @@
+import {
+ listProjectInfo,
+} from '../../../api/project'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ pageNum: 1,
+ pageSize: 50,
+ parDeptId: null,
+ listData: [],
+ total: 0,
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ this.setData({
+ parDeptId: app.globalData.userData?.parDeptId
+ });
+ this.initListData();
+ },
+
+ /**
+ * 初始化临建项目数据
+ */
+ initListData() {
+ let params = "deptId=" + this.data.parDeptId + "&pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize;
+ listProjectInfo(params).then(res => {
+ if (res.code == 200) {
+ this.setData({
+ total: res.total,
+ listData: this.data.listData.concat(res.rows)
+ });
+ }
+ });
+ },
+
+ /**
+ * 加载更多数据
+ */
+ onScrollToLower() {
+ let nal = Math.ceil(this.data.total / this.data.pageSize);
+ if (this.data.pageNum < nal) {
+ this.setData({
+ pageNum: this.data.pageNum + 1
+ });
+ this.initListData();
+ }
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
+ wx.redirectTo({
+ url: '../../index/index',
+ })
+ },
+
+ /**
+ * 新增项目信息
+ */
+ addTap: function () {
+ wx.redirectTo({
+ url: '../add/index',
+ })
+ },
+
+ /**
+ * 修改项目信息
+ */
+ editTap: function (e) {
+ let {id} = e.currentTarget.dataset.set
+ wx.redirectTo({
+ url: '../edit/index?id='+id,
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_info/list/index.json b/yanzhu-ui-app/miniprogram/pages/project_info/list/index.json
new file mode 100644
index 00000000..ba2821f5
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_info/list/index.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationStyle":"custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_info/list/index.wxml b/yanzhu-ui-app/miniprogram/pages/project_info/list/index.wxml
new file mode 100644
index 00000000..50973459
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_info/list/index.wxml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+ {{index < 10 ?'0'+(index+1):(index+1)}}
+ {{item.no}}
+
+
+
+
+ 项目名称:{{item.name}}
+
+
+ 开建时间:{{item.createTime}}
+
+
+
+
+
+
+
+
+ 暂无数据
+
+
+
+
+
+
+ 新增
+
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_info/list/index.wxss b/yanzhu-ui-app/miniprogram/pages/project_info/list/index.wxss
new file mode 100644
index 00000000..061feb2e
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/project_info/list/index.wxss
@@ -0,0 +1 @@
+/* pages/project_info/list/index.wxss */
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/updatePwd/index.js b/yanzhu-ui-app/miniprogram/pages/updatePwd/index.js
new file mode 100644
index 00000000..76675aa6
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/updatePwd/index.js
@@ -0,0 +1,114 @@
+import {
+ loginOut,
+ updatePwd,
+} from '../../api/login'
+import {
+ removeToken
+} from '../../utils/auth'
+const app = getApp()
+Page({
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ loginName: null,
+ oldPsw: '',
+ newPsw: '',
+ password: '',
+ showOldPass: true,
+ showNewPass: true,
+ showPassWord: true
+ },
+
+ seeTap1: function () {
+ let that = this;
+ this.setData({
+ // 切换图标
+ showOldPass: !that.data.showOldPass
+ })
+ },
+
+ seeTap2: function () {
+ let that = this;
+ this.setData({
+ // 切换图标
+ showNewPass: !that.data.showNewPass
+ })
+ },
+
+ seeTap3: function () {
+ let that = this;
+ this.setData({
+ // 切换图标
+ showPassWord: !that.data.showPassWord
+ })
+ if (this.data.newPsw != '' && this.data.newPsw != this.data.password) {
+ app.toast("两次密码输入不一致!");
+ }
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+
+ },
+
+ /**
+ * 添加预警信息
+ */
+ submit: function () {
+ var that = this;
+ if (that.data.oldPsw == '') {
+ app.toast("请输入旧密码!");
+ return;
+ }
+ if (that.data.password == '') {
+ app.toast("请确认新密码!");
+ return;
+ }
+ if (that.data.newPsw != '' && that.data.newPsw != that.data.password) {
+ app.toast("两次密码输入不一致!");
+ return;
+ }
+ if (that.data.oldPsw.length < 6) {
+ app.toast("请输入旧密码长度 [6-20]位字符!");
+ return;
+ }
+ if (that.data.newPsw.length < 6) {
+ app.toast("请输入新密码长度 [6-20]位字符!");
+ return;
+ }
+ if (that.data.password.length < 6) {
+ app.toast("请输入确认密码长度 [6-20]位字符!");
+ return;
+ }
+ let formData = {
+ oldPsw: that.data.oldPsw,
+ newPsw: that.data.newPsw,
+ cfmPsw: that.data.password
+ }
+ updatePwd(formData).then(res => {
+ if (res.data == "200") {
+ loginOut().then(response => {
+ app.toast("密码修改成功,请重新登录!", 'success');
+ removeToken();
+ wx.redirectTo({
+ url: '../login/login',
+ });
+ });
+ }
+ });
+ },
+
+ //返回到项目概况页面
+ goGCLB: function () {
+ wx.redirectTo({
+ url: '../index/index'
+ })
+ },
+ //修改密码
+ QRXG: function () {
+ this.submit();
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/updatePwd/index.json b/yanzhu-ui-app/miniprogram/pages/updatePwd/index.json
new file mode 100644
index 00000000..85233234
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/updatePwd/index.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "van-row": "@vant/weapp/row",
+ "van-col": "@vant/weapp/col"
+ },
+ "navigationStyle":"custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/updatePwd/index.wxml b/yanzhu-ui-app/miniprogram/pages/updatePwd/index.wxml
new file mode 100644
index 00000000..6e89e9bf
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/updatePwd/index.wxml
@@ -0,0 +1,53 @@
+
+
+
+
+ 旧密码
+
+
+
+
+
+
+
+
+ 新密码
+
+
+
+
+
+
+
+
+ 确认密码
+
+
+
+
+
+
+
+
+
+
+ 确认修改
+
+
+
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/updatePwd/index.wxss b/yanzhu-ui-app/miniprogram/pages/updatePwd/index.wxss
new file mode 100644
index 00000000..23dbdea2
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pages/updatePwd/index.wxss
@@ -0,0 +1,7 @@
+.password-icon{
+ width: 40rpx;
+ height: 40rpx;
+ position: absolute;
+ right: 60rpx;
+ margin-top: -66rpx;
+ }
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/project.config.json b/yanzhu-ui-app/miniprogram/project.config.json
new file mode 100644
index 00000000..ee76c865
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/project.config.json
@@ -0,0 +1,29 @@
+{
+ "appid": "wx2350a5efb3f28e66",
+ "compileType": "miniprogram",
+ "libVersion": "3.6.0",
+ "packOptions": {
+ "ignore": [],
+ "include": []
+ },
+ "setting": {
+ "coverView": true,
+ "es6": true,
+ "postcss": true,
+ "minified": true,
+ "enhance": true,
+ "showShadowRootInWxmlPanel": true,
+ "packNpmRelationList": [],
+ "babelSetting": {
+ "ignore": [],
+ "disablePlugins": [],
+ "outputPath": ""
+ },
+ "condition": false
+ },
+ "condition": {},
+ "editorSetting": {
+ "tabIndent": "auto",
+ "tabSize": 4
+ }
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/project.private.config.json b/yanzhu-ui-app/miniprogram/project.private.config.json
new file mode 100644
index 00000000..355608bb
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/project.private.config.json
@@ -0,0 +1,7 @@
+{
+ "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
+ "projectname": "miniprogram",
+ "setting": {
+ "compileHotReLoad": true
+ }
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/sitemap.json b/yanzhu-ui-app/miniprogram/sitemap.json
new file mode 100644
index 00000000..ca02add2
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/sitemap.json
@@ -0,0 +1,7 @@
+{
+ "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
+ "rules": [{
+ "action": "allow",
+ "page": "*"
+ }]
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/style/guide.wxss b/yanzhu-ui-app/miniprogram/style/guide.wxss
new file mode 100644
index 00000000..5a77414e
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/style/guide.wxss
@@ -0,0 +1,144 @@
+page {
+ background: #f6f6f6;
+ display: flex;
+ flex-direction: column;
+ justify-content: flex-start;
+}
+
+.list {
+ margin-top: 40rpx;
+ height: auto;
+ width: 100%;
+ background: #fff;
+ padding: 0 40rpx;
+ border: 1px solid rgba(0, 0, 0, 0.1);
+ border-left: none;
+ border-right: none;
+ transition: all 300ms ease;
+ display: flex;
+ flex-direction: column;
+ align-items: stretch;
+ box-sizing: border-box;
+}
+
+.list-item {
+ width: 100%;
+ padding: 0;
+ line-height: 104rpx;
+ font-size: 34rpx;
+ color: #007aff;
+ border-top: 1px solid rgba(0, 0, 0, 0.1);
+ display: flex;
+ flex-direction: row;
+ align-content: center;
+ justify-content: space-between;
+ box-sizing: border-box;
+}
+
+.list-item:first-child {
+ border-top: none;
+}
+
+.list-item image {
+ max-width: 100%;
+ max-height: 20vh;
+ margin: 20rpx 0;
+}
+
+.request-text {
+ color: #222;
+ padding: 20rpx 0;
+ font-size: 24rpx;
+ line-height: 36rpx;
+ word-break: break-all;
+}
+
+.guide {
+ width: 100%;
+ padding: 40rpx;
+ box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+}
+
+.guide .headline {
+ font-size: 34rpx;
+ font-weight: bold;
+ color: #555;
+ line-height: 40rpx;
+}
+
+.guide .p {
+ margin-top: 20rpx;
+ font-size: 28rpx;
+ line-height: 36rpx;
+ color: #666;
+}
+
+.guide .code {
+ margin-top: 20rpx;
+ font-size: 28rpx;
+ line-height: 36rpx;
+ color: #666;
+ background: white;
+ white-space: pre;
+}
+
+.guide .code-dark {
+ margin-top: 20rpx;
+ background: rgba(0, 0, 0, 0.8);
+ padding: 20rpx;
+ font-size: 28rpx;
+ line-height: 36rpx;
+ border-radius: 6rpx;
+ color: #fff;
+ white-space: pre
+}
+
+.guide image {
+ max-width: 100%;
+}
+
+.guide .image1 {
+ margin-top: 20rpx;
+ max-width: 100%;
+ width: 356px;
+ height: 47px;
+}
+
+.guide .image2 {
+ margin-top: 20rpx;
+ width: 264px;
+ height: 100px;
+}
+
+.guide .flat-image {
+ height: 100px;
+}
+
+.guide .code-image {
+ max-width: 100%;
+}
+
+.guide .copyBtn {
+ width: 180rpx;
+ font-size: 20rpx;
+ margin-top: 16rpx;
+ margin-left: 0;
+}
+
+.guide .nav {
+ margin-top: 50rpx;
+ display: flex;
+ flex-direction: row;
+ align-content: space-between;
+}
+
+.guide .nav .prev {
+ margin-left: unset;
+}
+
+.guide .nav .next {
+ margin-right: unset;
+}
+
diff --git a/yanzhu-ui-app/miniprogram/utils/auth.js b/yanzhu-ui-app/miniprogram/utils/auth.js
new file mode 100644
index 00000000..ce904f0c
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/utils/auth.js
@@ -0,0 +1,12 @@
+const TokenKey = 'YanZhu-App-Token'
+export function getToken() {
+ return wx.getStorageSync(TokenKey)
+}
+
+export function setToken(token) {
+ return wx.setStorageSync(TokenKey, token)
+}
+
+export function removeToken() {
+ return wx.removeStorageSync(TokenKey)
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/utils/format.wxs b/yanzhu-ui-app/miniprogram/utils/format.wxs
new file mode 100644
index 00000000..528d3ef1
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/utils/format.wxs
@@ -0,0 +1,128 @@
+/**
+ * 序号格式化
+ * @param num
+ */
+function indexNumFormat(num) {
+ switch (num) {
+ case 0:
+ num = "Ⅰ";
+ break;
+ case 1:
+ num = "Ⅱ";
+ break;
+ case 2:
+ num = "Ⅲ";
+ break;
+ case 3:
+ num = "Ⅳ";
+ break;
+ case 4:
+ num = "Ⅴ";
+ break;
+ case 5:
+ num = "Ⅵ";
+ break;
+ case 6:
+ num = "Ⅶ";
+ break;
+ case 7:
+ num = "Ⅷ";
+ break;
+ case 8:
+ num = "Ⅸ";
+ break;
+ }
+ return num;
+}
+
+/**
+ * 计算时长
+ * @param val
+ */
+function findDurationDate(val) {
+ // 计算出相差天数
+ let days = Math.floor(val / (24 * 3600 * 1000))
+ // 计算出小时数
+ let leave1 = val % (24 * 3600 * 1000) // 计算天数后剩余的毫秒数
+ let hours = Math.floor(leave1 / (3600 * 1000))
+ // 计算相差分钟数
+ let leave2 = leave1 % (3600 * 1000) // 计算小时数后剩余的毫秒数
+ let minutes = Math.floor(leave2 / (60 * 1000))
+ // 计算相差秒数
+ let leave3 = leave2 % (60 * 1000) // 计算分钟数后剩余的毫秒数
+ let seconds = Math.round(leave3 / 1000)
+ if (days > 0) {
+ if (days < 10) days = "0" + days;
+ if (hours < 10) hours = "0" + hours;
+ if (minutes < 10) minutes = "0" + minutes;
+ if (seconds < 10) seconds = "0" + seconds;
+ return days + '天' + hours + '小时' + minutes + '分钟' + seconds + '秒';
+ }
+ if (hours > 0) {
+ if (hours < 10) hours = "0" + hours;
+ if (minutes < 10) minutes = "0" + minutes;
+ if (seconds < 10) seconds = "0" + seconds;
+ return hours + '小时' + minutes + '分钟' + seconds + '秒';
+ }
+ if (minutes > 0) {
+ if (minutes < 10) minutes = "0" + minutes;
+ if (seconds < 10) seconds = "0" + seconds;
+ return minutes + '分钟' + seconds + '秒';
+ }
+ if (seconds > 0) {
+ if (seconds < 10) seconds = "0" + seconds;
+ return seconds + '秒';
+ }
+}
+
+module.exports = {
+ indexNumFormat: indexNumFormat,
+ findDurationDate: findDurationDate,
+ split:function(str,sign){
+ return str.split(sign);
+ },
+ parseStr:function(str){
+ return JSON.parse(str);
+ },
+ evalStr:function(str){
+ return eval(str);
+ },
+ dateStrEv:function(startDate,endDate){
+ if(startDate){
+ return startDate.split(" ")[0];
+ }else if(endDate){
+ return endDate.split(" ")[0];
+ }else{
+ return "未找到记录";
+ }
+ },
+ dateStr:function(str){
+ if(str){
+ return str.split(" ")[0];
+ }else{
+ return "";
+ }
+ },
+ timeStr:function(str){
+ return str.split(" ")[1];
+ },
+ isHttpImg:function(str){
+ if(str.indexOf("http:")>-1 || str.indexOf("https:")>-1){
+ return true;
+ }else{
+ return false;
+ }
+ },
+ birthDate:function(timestamp){
+ var date = getDate(parseInt(timestamp));
+ var mm = date.getMonth()+1;
+ if(mm<10){
+ mm = '0'+mm;
+ }
+ var dd = date.getDate();
+ if(dd<10){
+ dd = '0'+dd;
+ }
+ return date.getFullYear()+"-"+mm+"-"+dd;
+ }
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/utils/request.js b/yanzhu-ui-app/miniprogram/utils/request.js
new file mode 100644
index 00000000..73ce86bd
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/utils/request.js
@@ -0,0 +1,117 @@
+import config from '../config'
+import {
+ getToken,
+ removeToken
+} from './auth'
+
+const app = getApp()
+
+function doRequest(url, method = 'GET', data, header = {}) {
+ //安全白名单判断
+ if (config.noSecuritys.indexOf(url) == -1 && !getToken()) {
+ removeToken();
+ wx.redirectTo({
+ url: '../login/login',
+ });
+ }
+ wx.showLoading({
+ mask: true,
+ title: url == config.noSecuritys[1] ? '登录中' : '请等待'
+ })
+ return new Promise((resolve, reject) => {
+ wx.request({
+ url: config.baseUrl + url,
+ method: method,
+ data: data,
+ header: {
+ 'content-type': 'application/json',
+ 'Authorization': 'Bearer ' + getToken(),
+ ...header
+ },
+ timeout: config.timeOut,
+ success: function (res) {
+ wx.hideLoading()
+ const code = res.data.code || 200
+ if (code === 401) {
+ removeToken();
+ wx.redirectTo({
+ url: '../login/login',
+ });
+ } else if (code === 500 || code === 403) {
+ app.toast(res.data.msg);
+ setTimeout(() => {
+ resolve(res.data);
+ }, 800)
+ } else {
+ resolve(res.data);
+ }
+ },
+ fail: function (error) {
+ wx.hideLoading()
+ app.toast(error);
+ reject(error)
+ }
+ })
+ })
+}
+
+/**
+ * 这里考虑上传异步问题,封装为同步
+ */
+export function syncFileUpload(file) {
+ if (!getToken()) {
+ removeToken();
+ wx.redirectTo({
+ url: '../login/index',
+ });
+ }
+ wx.showLoading({
+ mask: true,
+ title: '正在上传资源'
+ })
+ return new Promise((resolve, reject) => {
+ wx.uploadFile({
+ url: config.baseUrl + '/common/upload', // 上传的服务器接口地址
+ filePath: file,
+ header: {
+ "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
+ 'Authorization': 'Bearer ' + getToken()
+ },
+ name: "file", //上传的所需字段,后端提供
+ formData: {},
+ success: (res) => {
+ // 上传完成操作
+ wx.hideLoading()
+ let resJson = JSON.parse(res.data)
+ const code = resJson.code || 200
+ if (code === 401) {
+ removeToken();
+ wx.redirectTo({
+ url: '../login/index',
+ });
+ } else if (code === 500 || code === 403) {
+ app.toast(resJson.msg);
+ setTimeout(() => {
+ resolve(resJson);
+ }, 800)
+ resolve(resJson);
+ } else {
+ resolve(resJson);
+ }
+ },
+ fail: (error) => {
+ wx.hideLoading()
+ //上传失败:修改pedding为reject
+ app.toast("网络出错,上传失败")
+ reject(error)
+ }
+ });
+ })
+}
+
+export function request(options) {
+ if(options.method=='get' && options.params){
+ options.url = options.url+"?"+options.params;
+ }
+ return doRequest(options.url, options.method, options.data, options.header)
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/package-lock.json b/yanzhu-ui-app/package-lock.json
deleted file mode 100644
index 5ffa6382..00000000
--- a/yanzhu-ui-app/package-lock.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "name": "v-wordbench",
- "lockfileVersion": 2,
- "requires": true,
- "packages": {
- "": {
- "dependencies": {
- "weixin-js-sdk": "^1.6.5"
- }
- },
- "node_modules/weixin-js-sdk": {
- "version": "1.6.5",
- "resolved": "https://registry.npmmirror.com/weixin-js-sdk/-/weixin-js-sdk-1.6.5.tgz",
- "integrity": "sha512-Gph1WAWB2YN/lMOFB/ymb+hbU/wYazzJgu6PMMktCy9cSCeW5wA6Zwt0dpahJbJ+RJEwtTv2x9iIu0U4enuVSQ=="
- }
- },
- "dependencies": {
- "weixin-js-sdk": {
- "version": "1.6.5",
- "resolved": "https://registry.npmmirror.com/weixin-js-sdk/-/weixin-js-sdk-1.6.5.tgz",
- "integrity": "sha512-Gph1WAWB2YN/lMOFB/ymb+hbU/wYazzJgu6PMMktCy9cSCeW5wA6Zwt0dpahJbJ+RJEwtTv2x9iIu0U4enuVSQ=="
- }
- }
-}
diff --git a/yanzhu-ui-app/package.json b/yanzhu-ui-app/package.json
deleted file mode 100644
index 2b02866d..00000000
--- a/yanzhu-ui-app/package.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "dependencies": {
- "weixin-js-sdk": "^1.6.5"
- }
-}
diff --git a/yanzhu-ui-app/pages.json b/yanzhu-ui-app/pages.json
deleted file mode 100644
index c8eec602..00000000
--- a/yanzhu-ui-app/pages.json
+++ /dev/null
@@ -1,202 +0,0 @@
-{
- "easycom": {
- "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
- },
- "pages": [{
- "path": "pages/login",
- "style": {
- "navigationBarTitleText": "登录",
- "navigationStyle": "custom"
- }
- }, {
- "path": "pages/centerlogin",
- "style": {
- "navigationBarTitleText": "登录身份",
- "navigationStyle": "custom"
- }
- }, {
- "path": "pages/information/index",
- "style": {
- "navigationBarTitleText": "完善信息",
- "navigationStyle": "custom"
- }
- }, {
- "path": "pages/index",
- "style": {
- "navigationBarTitleText": " 任务",
- "navigationStyle": "custom"
- }
- },
- {
- "path": "pages/work/index",
- "style": {
- "navigationBarTitleText": "消息",
- "navigationStyle": "custom"
- }
- },
- {
- "path": "pages/mine/index",
- "style": {
- "navigationBarTitleText": "我的",
- "navigationStyle": "custom"
- }
- },
- {
- "path": "pages/information/index2",
- "style": {
- "navigationBarTitleText": "完善学历",
- "navigationStyle": "custom"
- }
- },
- {
- "path": "pages/information/index3",
- "style": {
- "navigationBarTitleText": "兼职意向",
- "enablePullDownRefresh": false,
- "navigationStyle": "custom"
- }
- },
- {
- "path": "pages/information/index4",
- "style": {
- "navigationBarTitleText": "完善简历",
- "enablePullDownRefresh": false,
- "navigationStyle": "custom"
- }
- },
- {
- "path": "pages/information/end",
- "style": {
- "navigationBarTitleText": "兼职人员注册成功",
- "enablePullDownRefresh": false,
- "navigationStyle": "custom"
- }
- },
- {
- "path": "pages/workNext/index",
- "style": {
- "navigationBarTitleText": "完善公司个人信息",
- "enablePullDownRefresh": false,
- "navigationStyle": "custom"
- }
- },
- {
- "path": "pages/workNext/index2",
- "style": {
- "navigationBarTitleText": "完善公司信息",
- "enablePullDownRefresh": false,
- "navigationStyle": "custom"
- }
- },
- {
- "path": "pages/workNext/index3",
- "style": {
- "navigationBarTitleText": "发布兼职",
- "enablePullDownRefresh": false,
- "navigationStyle": "custom"
- }
- },
- {
- "path": "pages/listdeil/index",
- "style": {
- "navigationBarTitleText": "职位详情",
- "enablePullDownRefresh": false,
- "navigationStyle": "custom"
- }
- },
- {
- "path" : "pages/work/deilorder",
- "style" :
- {
- "navigationBarTitleText" : "信息职位详情",
- "enablePullDownRefresh" : false,
- "navigationStyle": "custom"
- }
- }
- ],
- "subPackages": [{
- "root": "pages_loader",
- "pages": [{
- "path": "pages/index",
- "style": {
- "navigationBarTitleText": "人才大厅",
- "enablePullDownRefresh": false,
- "navigationStyle": "custom"
- }
- },
- {
- "path": "pages/work/index",
- "style": {
- "navigationBarTitleText": "消息",
- "enablePullDownRefresh": false,
- "navigationStyle": "custom"
- }
- },
- {
- "path": "pages/mine/index",
- "style": {
- "navigationBarTitleText": "我的",
- "enablePullDownRefresh": false,
- "navigationStyle": "custom"
- }
- },
- {
- "path": "pages/listdeil/index",
- "style": {
- "navigationBarTitleText": "人才详情",
- "enablePullDownRefresh": false,
- "navigationStyle": "custom"
- }
- },
- {
- "path": "pages/release",
- "style": {
- "navigationBarTitleText": "发布兼职",
- "enablePullDownRefresh": false,
- "navigationStyle": "custom"
- }
- },
- {
- "path" : "pages/work/deilorder",
- "style" :
- {
- "navigationBarTitleText" : "沟通人才详情",
- "enablePullDownRefresh" : false,
- "navigationStyle": "custom"
- }
- }
- ]
- }],
- "globalStyle": {
- "navigationBarTextStyle": "black",
- "navigationBarTitleText": "uni-app",
- "navigationBarBackgroundColor": "#FFFFFF",
- "backgroundColor": "#FFFFFF"
- }
- // "tabBar": {
- // "color": "#000000",
- // "selectedColor": "#000000",
- // "borderStyle": "white",
- // "backgroundColor": "#fff",
- // "borderStyle": "black",
- // "list": [{
- // "pagePath": "pages/index",
- // "iconPath": "static/tabarimg/fz1.png",
- // "selectedIconPath": "static/tabarimg/fz2.png",
- // "text": "首页"
- // },
- // {
- // "pagePath": "pages/work/index",
- // "iconPath": "static/tabarimg/fz3.png",
- // "selectedIconPath": "static/tabarimg/fz4.png",
- // "text": "消息"
- // },
- // {
- // "pagePath": "pages/mine/index",
- // "iconPath": "static/tabarimg/fz3.png",
- // "selectedIconPath": "static/tabarimg/fz4.png",
- // "text": "我的"
- // }
- // ]
- // }
-}
\ No newline at end of file
diff --git a/yanzhu-ui-app/pages/centerlogin.vue b/yanzhu-ui-app/pages/centerlogin.vue
deleted file mode 100644
index d41e0ec7..00000000
--- a/yanzhu-ui-app/pages/centerlogin.vue
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
-
- 请选择角色
-
-
- 我要找人
-
-
-
-
-
-
-
- 我要找工作
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/yanzhu-ui-app/pages/index.vue b/yanzhu-ui-app/pages/index.vue
deleted file mode 100644
index f69207be..00000000
--- a/yanzhu-ui-app/pages/index.vue
+++ /dev/null
@@ -1,191 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- 筛选
-
-
-
-
-
-
-
-
-
-
- Java开发工程师 日结
-
-
-
-
-
-
- 400/天
-
-
-
-
-
-
-
- 公司名称 20人以下
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 招聘要求:xxxxxxxxxxxxxx
-
-
-
-
-
- 张先生
-
-
-
- 工作地址
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/yanzhu-ui-app/pages/information/end.vue b/yanzhu-ui-app/pages/information/end.vue
deleted file mode 100644
index 31ed77d6..00000000
--- a/yanzhu-ui-app/pages/information/end.vue
+++ /dev/null
@@ -1,103 +0,0 @@
-
-
-
-
- x
-
-
-
- 信息创建成功
-
-
-
- 上次真实头像,回复率高
-
-
-
-
-
-
-
-
-
-
-
- 个人简历隐私设置
-
-
-
-
-
-
- {{item.name}}
-
-
- {{item.text}}
-
-
-
-
-
-
-
- 如悉并同意:公开后,在您选择的可见范围内,招
- 聘方主动下载简历时,只能看到您的全名不能看到
- 您的真实电话号码。
-
-
- 之后可在“设置-隐私设置”中更改
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/yanzhu-ui-app/pages/information/index.vue b/yanzhu-ui-app/pages/information/index.vue
deleted file mode 100644
index 2229a7b8..00000000
--- a/yanzhu-ui-app/pages/information/index.vue
+++ /dev/null
@@ -1,109 +0,0 @@
-
-
-
-
-
-
- 请先完善个人信息
-
-
- 信息安全保护中,请放心填写
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/yanzhu-ui-app/pages/information/index2.vue b/yanzhu-ui-app/pages/information/index2.vue
deleted file mode 100644
index dadc4546..00000000
--- a/yanzhu-ui-app/pages/information/index2.vue
+++ /dev/null
@@ -1,94 +0,0 @@
-
-
-
-
-
-
-
- 请先完善学历信息
-
-
- 跳过
-
-
-
- 信息安全保护中,请放心填写
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/yanzhu-ui-app/pages/information/index3.vue b/yanzhu-ui-app/pages/information/index3.vue
deleted file mode 100644
index 13e28750..00000000
--- a/yanzhu-ui-app/pages/information/index3.vue
+++ /dev/null
@@ -1,103 +0,0 @@
-
-
-
-
-
-
-
- 请先完善兼职意向
-
-
-
- 信息安全保护中,请放心填写
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/yanzhu-ui-app/pages/information/index4.vue b/yanzhu-ui-app/pages/information/index4.vue
deleted file mode 100644
index 07d837b2..00000000
--- a/yanzhu-ui-app/pages/information/index4.vue
+++ /dev/null
@@ -1,101 +0,0 @@
-
-
-
-
-
-
-
- 请先完善个人简历
-
-
- 跳过
-
-
-
- 信息安全保护中,请放心填写
-
-
-
-
-
- ---
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/yanzhu-ui-app/pages/listdeil/index.vue b/yanzhu-ui-app/pages/listdeil/index.vue
deleted file mode 100644
index 7dba5929..00000000
--- a/yanzhu-ui-app/pages/listdeil/index.vue
+++ /dev/null
@@ -1,164 +0,0 @@
-
-
-
-
-
-
-
-
- 测试工程师
-
-
- 日结
-
-
-
- 400/天
-
-
-
-
- 公司地址
-
-
- 经验不限
-
-
- 本科
-
-
-
-
-
-
-
-
-
-
- 张先生
-
-
- 公司名称
-
-
-
-
-
-
-
-
- 职位详情页
-
-
-
-
-
-
-
-
- 岗位职责:
-
-
- 1、
-
-
- 2、
-
-
- 3、
-
-
-
-
- 任职要求:
-
-
- 1、
-
-
- 2、
-
-
- 3、
-
-
-
-
-
-
-
-
-
-
-
- 拨打公司电话需要支付1元或xx金豆,确认继续沟通吗
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/yanzhu-ui-app/pages/login.vue b/yanzhu-ui-app/pages/login.vue
deleted file mode 100644
index dd7e8e27..00000000
--- a/yanzhu-ui-app/pages/login.vue
+++ /dev/null
@@ -1,372 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 我已阅读并同意
- 与
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/yanzhu-ui-app/pages/mine/index.vue b/yanzhu-ui-app/pages/mine/index.vue
deleted file mode 100644
index e9fbfc7a..00000000
--- a/yanzhu-ui-app/pages/mine/index.vue
+++ /dev/null
@@ -1,70 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/yanzhu-ui-app/pages/work/deilorder.vue b/yanzhu-ui-app/pages/work/deilorder.vue
deleted file mode 100644
index ef43a0b6..00000000
--- a/yanzhu-ui-app/pages/work/deilorder.vue
+++ /dev/null
@@ -1,178 +0,0 @@
-
-
-
-
-
-
-
-
- 测试工程师
-
-
- 日结
-
-
-
- 400/天
-
-
-
-
- 公司地址
-
-
- 经验不限
-
-
- 本科
-
-
-
-
-
-
-
-
-
-
- 张先生
-
-
- 公司名称
-
-
-
-
-
-
-
-
- 职位详情页
-
-
-
-
-
-
-
-
- 岗位职责:
-
-
- 1、
-
-
- 2、
-
-
- 3、
-
-
-
-
- 任职要求:
-
-
- 1、
-
-
- 2、
-
-
- 3、
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 拨打公司电话需要支付1元或xx金豆,确认继续沟通吗
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/yanzhu-ui-app/pages/work/index.vue b/yanzhu-ui-app/pages/work/index.vue
deleted file mode 100644
index 81b7793a..00000000
--- a/yanzhu-ui-app/pages/work/index.vue
+++ /dev/null
@@ -1,134 +0,0 @@
-
-
-
-
-
-
-
-
- JAVA开发
- 300/天
- 日结
-
-
-
- 待接受
- 已沟通
- 已接受
- 已完成
- 已评价
-
-
-
- 招聘描述:xxxxxxxxxxxxxxx
-
-
-
-
-
- 张先生
- 公司名称
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/yanzhu-ui-app/pages/workNext/index.vue b/yanzhu-ui-app/pages/workNext/index.vue
deleted file mode 100644
index 0a40116c..00000000
--- a/yanzhu-ui-app/pages/workNext/index.vue
+++ /dev/null
@@ -1,176 +0,0 @@
-
-
-
-
-
-
- 请先完善个人信息
-
-
- 信息安全保护中,请放心填写
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/yanzhu-ui-app/pages/workNext/index2.vue b/yanzhu-ui-app/pages/workNext/index2.vue
deleted file mode 100644
index 8b480ad6..00000000
--- a/yanzhu-ui-app/pages/workNext/index2.vue
+++ /dev/null
@@ -1,177 +0,0 @@
-
-
-
-
-
-
-
- 请先完善公司信息
-
-
- 跳过
-
-
-
- 信息安全保护中,请放心填写
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/yanzhu-ui-app/pages/workNext/index3.vue b/yanzhu-ui-app/pages/workNext/index3.vue
deleted file mode 100644
index 274e958d..00000000
--- a/yanzhu-ui-app/pages/workNext/index3.vue
+++ /dev/null
@@ -1,190 +0,0 @@
-
-
-
-
-
-
-
-
- 发布兼职
-
-
- 马上获得优秀人才
-
-
-
- 跳过
-
-
-
- 信息安全保护中,请放心填写
-
-
-
-
-
-
-
-
-
- {{formData.old?formData.old:`请选择`}}
-
-
-
-
- {{formData.degree?formData.degree:`请选择`}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/yanzhu-ui-app/pages_loader/pages/index.vue b/yanzhu-ui-app/pages_loader/pages/index.vue
deleted file mode 100644
index 7bdcfb82..00000000
--- a/yanzhu-ui-app/pages_loader/pages/index.vue
+++ /dev/null
@@ -1,161 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- 发职位
-
-
-
-
-
-
- 筛选
-
-
-
-
-
-
-
-
-
-
-
-
-
- 张先生
-
-
- 25岁
- 本科
- 三年
-
-
-
-
-
-
-
-
- 百易信息技术 · JAVA开发工程师
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/yanzhu-ui-app/pages_loader/pages/listdeil/index.vue b/yanzhu-ui-app/pages_loader/pages/listdeil/index.vue
deleted file mode 100644
index 7ee9f91a..00000000
--- a/yanzhu-ui-app/pages_loader/pages/listdeil/index.vue
+++ /dev/null
@@ -1,80 +0,0 @@
-
-
-
-
-
-
-
- 姓名:张三
-
-
- 学历:本科
-
-
-
-
- 年龄:25岁
-
-
- 工作地:西安
-
-
-
-
-
-
-
-
- 意向岗位:JAVA开发工程师
-
-
- 工作年限:3年
-
-
-
-
- 最近一份工作经历:
-
-
- 百易信息技术 JAVA开发工程师 在职
-
-
-
-
- 教育背景:
-
-
- 2014-2018 北京大学 本科
-
-
-
-
- 个人优势:
-
-
- xxxxxxxxxxx
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/yanzhu-ui-app/pages_loader/pages/mine/index.vue b/yanzhu-ui-app/pages_loader/pages/mine/index.vue
deleted file mode 100644
index 94962295..00000000
--- a/yanzhu-ui-app/pages_loader/pages/mine/index.vue
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/yanzhu-ui-app/pages_loader/pages/release.vue b/yanzhu-ui-app/pages_loader/pages/release.vue
deleted file mode 100644
index b4b7acd2..00000000
--- a/yanzhu-ui-app/pages_loader/pages/release.vue
+++ /dev/null
@@ -1,190 +0,0 @@
-
-
-
-
-
-
-
-
- 发布兼职
-
-
- 马上获得优秀人才
-
-
-
-
-
- 信息安全保护中,请放心填写
-
-
-
-
-
-
-
-
-
- {{formData.old?formData.old:`请选择`}}
-
-
-
-
- {{formData.degree?formData.degree:`请选择`}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/yanzhu-ui-app/pages_loader/pages/work/deilorder.vue b/yanzhu-ui-app/pages_loader/pages/work/deilorder.vue
deleted file mode 100644
index 1398f4f5..00000000
--- a/yanzhu-ui-app/pages_loader/pages/work/deilorder.vue
+++ /dev/null
@@ -1,80 +0,0 @@
-
-
-
-
-
-
-
- 姓名:张三
-
-
- 学历:本科
-
-
-
-
- 年龄:25岁
-
-
- 工作地:西安
-
-
-
-
-
-
-
-
- 意向岗位:JAVA开发工程师
-
-
- 工作年限:3年
-
-
-
-
- 最近一份工作经历:
-
-
- 百易信息技术 JAVA开发工程师 在职
-
-
-
-
- 教育背景:
-
-
- 2014-2018 北京大学 本科
-
-
-
-
- 个人优势:
-
-
- xxxxxxxxxxx
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/yanzhu-ui-app/pages_loader/pages/work/index.vue b/yanzhu-ui-app/pages_loader/pages/work/index.vue
deleted file mode 100644
index f48fc9e4..00000000
--- a/yanzhu-ui-app/pages_loader/pages/work/index.vue
+++ /dev/null
@@ -1,123 +0,0 @@
-
-
-
-
-
-
-
-
-
- 张先生
- 25岁 本科 3年
-
-
-
- 已沟通
- 待接受
- 已接受
- 已完成
- 已评价
-
-
-
-
- 百易信息技术 · JAVA开发工程师
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/yanzhu-ui-app/permission.js b/yanzhu-ui-app/permission.js
deleted file mode 100644
index 28bfcf9d..00000000
--- a/yanzhu-ui-app/permission.js
+++ /dev/null
@@ -1,45 +0,0 @@
-import {
- getToken
-} from '@/utils/auth'
-
-// 登录页面
-const loginPage = "/pages/login"
-// 登录失效页面
-const loginFail = "/pages/login"
-// 页面白名单
-const whiteList = [ ]
-
-// 检查地址白名单
-// function checkWhite(url) {
-// const path = url.split('?')[0]
-// //console.log(path+"全连接")
-// return whiteList.indexOf(path) !== -1
-// }
-
-// 页面跳转验证拦截器
-// let list = ["navigateTo", "redirectTo", "reLaunch", "switchTab"]
-// list.forEach(item => {
-// uni.addInterceptor(item, {
-// invoke(to) {
-// if (getToken()) {
-// if (to.url === loginFail) {
-// uni.reLaunch({
-// url: "/"
-// })
-// }
-// return true
-// } else {
-// if (checkWhite(to.url)) {
-// return true
-// }
-// uni.reLaunch({
-// url: "/"
-// })
-// return false
-// }
-// },
-// fail(err) {
-// //console.log(err)
-// }
-// })
-// })
\ No newline at end of file
diff --git a/yanzhu-ui-app/plugins/auth.js b/yanzhu-ui-app/plugins/auth.js
deleted file mode 100644
index 3b91c14e..00000000
--- a/yanzhu-ui-app/plugins/auth.js
+++ /dev/null
@@ -1,60 +0,0 @@
-import store from '@/store'
-
-function authPermission(permission) {
- const all_permission = "*:*:*"
- const permissions = store.getters && store.getters.permissions
- if (permission && permission.length > 0) {
- return permissions.some(v => {
- return all_permission === v || v === permission
- })
- } else {
- return false
- }
-}
-
-function authRole(role) {
- const super_admin = "admin"
- const roles = store.getters && store.getters.roles
- if (role && role.length > 0) {
- return roles.some(v => {
- return super_admin === v || v === role
- })
- } else {
- return false
- }
-}
-
-export default {
- // 验证用户是否具备某权限
- hasPermi(permission) {
- return authPermission(permission)
- },
- // 验证用户是否含有指定权限,只需包含其中一个
- hasPermiOr(permissions) {
- return permissions.some(item => {
- return authPermission(item)
- })
- },
- // 验证用户是否含有指定权限,必须全部拥有
- hasPermiAnd(permissions) {
- return permissions.every(item => {
- return authPermission(item)
- })
- },
- // 验证用户是否具备某角色
- hasRole(role) {
- return authRole(role)
- },
- // 验证用户是否含有指定角色,只需包含其中一个
- hasRoleOr(roles) {
- return roles.some(item => {
- return authRole(item)
- })
- },
- // 验证用户是否含有指定角色,必须全部拥有
- hasRoleAnd(roles) {
- return roles.every(item => {
- return authRole(item)
- })
- }
-}
diff --git a/yanzhu-ui-app/plugins/index.js b/yanzhu-ui-app/plugins/index.js
deleted file mode 100644
index efbae151..00000000
--- a/yanzhu-ui-app/plugins/index.js
+++ /dev/null
@@ -1,14 +0,0 @@
-import tab from './tab'
-import auth from './auth'
-import modal from './modal'
-
-export default {
- install(Vue) {
- // 页签操作
- Vue.prototype.$tab = tab
- // 认证对象
- Vue.prototype.$auth = auth
- // 模态框对象
- Vue.prototype.$modal = modal
- }
-}
diff --git a/yanzhu-ui-app/plugins/modal.js b/yanzhu-ui-app/plugins/modal.js
deleted file mode 100644
index 99b2215f..00000000
--- a/yanzhu-ui-app/plugins/modal.js
+++ /dev/null
@@ -1,74 +0,0 @@
-export default {
- // 消息提示
- msg(content) {
- uni.showToast({
- title: content,
- icon: 'none'
- })
- },
- // 错误消息
- msgError(content) {
- uni.showToast({
- title: content,
- icon: 'error'
- })
- },
- // 成功消息
- msgSuccess(content) {
- uni.showToast({
- title: content,
- icon: 'success'
- })
- },
- // 隐藏消息
- hideMsg(content) {
- uni.hideToast()
- },
- // 弹出提示
- alert(content, title) {
- uni.showModal({
- title: title || '系统提示',
- content: content,
- showCancel: false
- })
- },
- // 确认窗体
- confirm(content, title) {
- return new Promise((resolve, reject) => {
- uni.showModal({
- title: title || '系统提示',
- content: content,
- cancelText: '取消',
- confirmText: '确定',
- success: function(res) {
- if (res.confirm) {
- resolve(res.confirm)
- }
- }
- })
- })
- },
- // 提示信息
- showToast(option) {
- if (typeof option === "object") {
- uni.showToast(option)
- } else {
- uni.showToast({
- title: option,
- icon: "none",
- duration: 2500
- })
- }
- },
- // 打开遮罩层
- loading(content) {
- uni.showLoading({
- title: content,
- icon: 'none'
- })
- },
- // 关闭遮罩层
- closeLoading() {
- uni.hideLoading()
- }
-}
diff --git a/yanzhu-ui-app/plugins/tab.js b/yanzhu-ui-app/plugins/tab.js
deleted file mode 100644
index 5d1b3058..00000000
--- a/yanzhu-ui-app/plugins/tab.js
+++ /dev/null
@@ -1,30 +0,0 @@
-export default {
- // 关闭所有页面,打开到应用内的某个页面
- reLaunch(url) {
- return uni.reLaunch({
- url: url
- })
- },
- // 跳转到tabBar页面,并关闭其他所有非tabBar页面
- switchTab(url) {
- return uni.switchTab({
- url: url
- })
- },
- // 关闭当前页面,跳转到应用内的某个页面
- redirectTo(url) {
- return uni.redirectTo({
- url: url
- })
- },
- // 保留当前页面,跳转到应用内的某个页面
- navigateTo(url) {
- return uni.navigateTo({
- url: url
- })
- },
- // 关闭当前页面,返回上一页面或多级页面
- navigateBack() {
- return uni.navigateBack()
- }
-}
diff --git a/yanzhu-ui-app/project.config.json b/yanzhu-ui-app/project.config.json
index 958f468d..aeb37468 100644
--- a/yanzhu-ui-app/project.config.json
+++ b/yanzhu-ui-app/project.config.json
@@ -1,31 +1,285 @@
{
- "compileType": "miniprogram",
+ "miniprogramRoot": "miniprogram/",
"setting": {
- "coverView": true,
+ "urlCheck": false,
"es6": true,
- "postcss": true,
- "minified": true,
"enhance": true,
+ "postcss": true,
+ "preloadBackgroundData": false,
+ "minified": true,
+ "newFeature": true,
+ "coverView": true,
+ "nodeModules": false,
+ "autoAudits": false,
"showShadowRootInWxmlPanel": true,
- "packNpmRelationList": [],
+ "scopeDataCheck": false,
+ "uglifyFileName": false,
+ "checkInvalidKey": true,
+ "checkSiteMap": true,
+ "uploadWithSourceMap": true,
+ "compileHotReLoad": false,
+ "lazyloadPlaceholderEnable": false,
+ "useMultiFrameRuntime": false,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
+ "enableEngineNative": false,
+ "useIsolateContext": false,
+ "userConfirmedBundleSwitch": false,
+ "packNpmManually": false,
+ "packNpmRelationList": [],
+ "minifyWXSS": true,
+ "disableUseStrict": false,
+ "minifyWXML": true,
+ "showES6CompileOption": false,
+ "useCompilerPlugins": false,
+ "condition": false,
"ignoreUploadUnusedFiles": true,
- "condition": false
+ "useApiHook": false,
+ "useApiHostProcess": false
},
-
- "condition": {},
+ "simulatorType": "wechat",
+ "simulatorPluginLibVersion": {},
+ "cloudfunctionTemplateRoot": "cloudfunctionTemplate/",
+ "compileType": "miniprogram",
+ "condition": {
+ "miniprogram": {
+ "list": [
+ {
+ "name": "db guide",
+ "pathName": "pages/databaseGuide/databaseGuide",
+ "query": ""
+ },
+ {
+ "name": "pages/gongchengliebiao/gongchengliebiao",
+ "pathName": "pages/gongchengliebiao/gongchengliebiao",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "pages/gengduogongneng/gengduogongneng",
+ "pathName": "pages/gengduogongneng/gengduogongneng",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "pages/login/login",
+ "pathName": "pages/login/login",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "pages/xiangmushipin/xiangmushipin",
+ "pathName": "pages/xiangmushipin/xiangmushipin",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "pages/map/map",
+ "pathName": "pages/map/map",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "pages/gengduogongneng/gengduogongneng",
+ "pathName": "pages/gengduogongneng/gengduogongneng",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "pages/xiangmugaikuang/xiangmugaikuang",
+ "pathName": "pages/xiangmugaikuang/xiangmugaikuang",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "pages/xiangmuhuanjing/xiangmuhuanjing",
+ "pathName": "pages/xiangmuhuanjing/xiangmuhuanjing",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "pages/xiangmuyujing/xiangmuyujing",
+ "pathName": "pages/xiangmuyujing/xiangmuyujing",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "pages/gengduogongneng/gengduogongneng",
+ "pathName": "pages/gengduogongneng/gengduogongneng",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "pages/xiangmugaikuang/xiangmugaikuang",
+ "pathName": "pages/xiangmugaikuang/xiangmugaikuang",
+ "query": "projectId=2&projectName=山西四建月亮湾Ⅱ湾住宅小区建设项目",
+ "scene": null
+ },
+ {
+ "name": "pages/shebieguanli-taji/taji",
+ "pathName": "pages/shebieguanli-taji/taji",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "pages/shebieguanli-shajiangguan/shajiangguan",
+ "pathName": "pages/shebieguanli-shajiangguan/shajiangguan",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "pages/xiangmugaikuang/xiangmugaikuang",
+ "pathName": "pages/xiangmugaikuang/xiangmugaikuang",
+ "query": "projectId=2&projectName=山西四建月亮湾Ⅱ湾住宅小区建设项目",
+ "scene": null
+ },
+ {
+ "name": "pages/xiangmuyujing/xiangmuyujing",
+ "pathName": "pages/xiangmuyujing/xiangmuyujing",
+ "query": "projectId=2&projectName=山西四建月亮湾Ⅱ湾住宅小区建设项目",
+ "scene": null
+ },
+ {
+ "name": "pages/map/map",
+ "pathName": "pages/map/map",
+ "query": "projectId=2&projectName=山西四建月亮湾Ⅱ湾住宅小区建设项目",
+ "scene": null
+ },
+ {
+ "name": "pages/map/map",
+ "pathName": "pages/map/map",
+ "query": "projectId=2&projectName=山西四建月亮湾Ⅱ湾住宅小区建设项目",
+ "scene": null
+ },
+ {
+ "name": "pages/yujingxinxi/yujingxinxi",
+ "pathName": "pages/yujingxinxi/yujingxinxi",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "pages/yujingxinxi/yujingxinxi",
+ "pathName": "pages/yujingxinxi/yujingxinxi",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "pages/xiangmushipin/xiangmushipin",
+ "pathName": "pages/xiangmushipin/xiangmushipin",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "pages/xiangmushipin/xiangmushipin",
+ "pathName": "pages/xiangmushipin/xiangmushipin",
+ "query": "projectId=9&projectName=路桥龙锦花园东区",
+ "scene": null
+ },
+ {
+ "name": "pages/renyuanguanli/renyuanguanli",
+ "pathName": "pages/renyuanguanli/renyuanguanli",
+ "query": "projectId=9&projectName=路桥龙锦花园东区",
+ "scene": null
+ },
+ {
+ "name": "pages/renyuanguanli/renyuanguanli",
+ "pathName": "pages/renyuanguanli/renyuanguanli",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "pages/ranyuanguanli-map/map",
+ "pathName": "pages/ranyuanguanli-map/map",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "pages/renyuanguanli/renyuanguanli",
+ "pathName": "pages/renyuanguanli/renyuanguanli",
+ "query": "projectId=616",
+ "scene": null
+ },
+ {
+ "name": "pages/shebieguanli-shajiangguan/shajiangguan",
+ "pathName": "pages/shebieguanli-jxsb/shajiangguan",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "pages/shebeiguanli-map/jixiedingwei",
+ "pathName": "pages/shebeiguanli-map/jixiedingwei",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "pages/shebieguanli-tzsb/taji",
+ "pathName": "pages/shebieguanli-tzsb/taji",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "pages/jinduguanli/jinduguanli",
+ "pathName": "pages/jinduguanli/jinduguanli",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "pages/xiangmuyujing/xiangmuyujing",
+ "pathName": "pages/xiangmuyujing/xiangmuyujing",
+ "query": "projectId=616",
+ "scene": null
+ },
+ {
+ "name": "pages/anquanguankong/anquanguankong",
+ "pathName": "pages/anquanguankong/anquanguankong",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "pages/nenghaoguanli/nenghaoguanli",
+ "pathName": "pages/nenghaoguanli/nenghaoguanli",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "pages/wuliaoguanli/wuliaoguanli",
+ "pathName": "pages/wuliaoguanli/wuliaoguanli",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "pages/jinduguanli/jinduguanli",
+ "pathName": "pages/jinduguanli/jinduguanli",
+ "query": "projectId=621",
+ "scene": null
+ },
+ {
+ "name": "pages/lw-jibenxinxi/lw-jibenxinxi",
+ "pathName": "pages/lw-jibenxinxi/lw-jibenxinxi",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "pages/lw-gerenxinxi/lw-gerenxinxi",
+ "pathName": "pages/lw-gerenxinxi/lw-gerenxinxi",
+ "query": "register=1",
+ "scene": null
+ }
+ ]
+ }
+ },
+ "srcMiniprogramRoot": "miniprogram/",
"editorSetting": {
- "tabIndent": "insertSpaces",
+ "tabIndent": "auto",
"tabSize": 4
},
- "libVersion": "3.2.0",
+ "libVersion": "3.5.5",
"packOptions": {
"ignore": [],
"include": []
},
- "appid": ""
+ "appid": "wx2350a5efb3f28e66"
}
\ No newline at end of file
diff --git a/yanzhu-ui-app/project.private.config.json b/yanzhu-ui-app/project.private.config.json
index a120190b..2d109de7 100644
--- a/yanzhu-ui-app/project.private.config.json
+++ b/yanzhu-ui-app/project.private.config.json
@@ -1,7 +1,8 @@
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
- "projectname": "applet-fucai",
+ "projectname": "YanZhuProjectApp",
"setting": {
- "compileHotReLoad": true
+ "compileHotReLoad": true,
+ "urlCheck": false
}
}
\ No newline at end of file
diff --git a/yanzhu-ui-app/static/doc.png b/yanzhu-ui-app/static/doc.png
deleted file mode 100644
index 9131f928..00000000
Binary files a/yanzhu-ui-app/static/doc.png and /dev/null differ
diff --git a/yanzhu-ui-app/static/favicon.ico b/yanzhu-ui-app/static/favicon.ico
deleted file mode 100644
index 83e523bd..00000000
Binary files a/yanzhu-ui-app/static/favicon.ico and /dev/null differ
diff --git a/yanzhu-ui-app/static/fileimg.png b/yanzhu-ui-app/static/fileimg.png
deleted file mode 100644
index 455281fd..00000000
Binary files a/yanzhu-ui-app/static/fileimg.png and /dev/null differ
diff --git a/yanzhu-ui-app/static/font/iconfont.ttf b/yanzhu-ui-app/static/font/iconfont.ttf
deleted file mode 100644
index 53915caf..00000000
Binary files a/yanzhu-ui-app/static/font/iconfont.ttf and /dev/null differ
diff --git a/yanzhu-ui-app/static/images/ation.png b/yanzhu-ui-app/static/images/ation.png
deleted file mode 100644
index 4e9a4a0b..00000000
Binary files a/yanzhu-ui-app/static/images/ation.png and /dev/null differ
diff --git a/yanzhu-ui-app/static/images/bgimg.png b/yanzhu-ui-app/static/images/bgimg.png
deleted file mode 100644
index 2fde42dd..00000000
Binary files a/yanzhu-ui-app/static/images/bgimg.png and /dev/null differ
diff --git a/yanzhu-ui-app/static/images/clzgb.png b/yanzhu-ui-app/static/images/clzgb.png
deleted file mode 100644
index fab1d117..00000000
Binary files a/yanzhu-ui-app/static/images/clzgb.png and /dev/null differ
diff --git a/yanzhu-ui-app/static/images/doudi.png b/yanzhu-ui-app/static/images/doudi.png
deleted file mode 100644
index eb7a6948..00000000
Binary files a/yanzhu-ui-app/static/images/doudi.png and /dev/null differ
diff --git a/yanzhu-ui-app/static/images/dsh.png b/yanzhu-ui-app/static/images/dsh.png
deleted file mode 100644
index c071fc3f..00000000
Binary files a/yanzhu-ui-app/static/images/dsh.png and /dev/null differ
diff --git a/yanzhu-ui-app/static/images/img1.png b/yanzhu-ui-app/static/images/img1.png
deleted file mode 100644
index 0869cd9f..00000000
Binary files a/yanzhu-ui-app/static/images/img1.png and /dev/null differ
diff --git a/yanzhu-ui-app/static/images/img2.png b/yanzhu-ui-app/static/images/img2.png
deleted file mode 100644
index a3e5bbde..00000000
Binary files a/yanzhu-ui-app/static/images/img2.png and /dev/null differ
diff --git a/yanzhu-ui-app/static/images/img3.png b/yanzhu-ui-app/static/images/img3.png
deleted file mode 100644
index 6250339d..00000000
Binary files a/yanzhu-ui-app/static/images/img3.png and /dev/null differ
diff --git a/yanzhu-ui-app/static/images/img4.png b/yanzhu-ui-app/static/images/img4.png
deleted file mode 100644
index a718ca2d..00000000
Binary files a/yanzhu-ui-app/static/images/img4.png and /dev/null differ
diff --git a/yanzhu-ui-app/static/images/img5.png b/yanzhu-ui-app/static/images/img5.png
deleted file mode 100644
index d83e4c81..00000000
Binary files a/yanzhu-ui-app/static/images/img5.png and /dev/null differ
diff --git a/yanzhu-ui-app/static/images/img6.png b/yanzhu-ui-app/static/images/img6.png
deleted file mode 100644
index 908c2081..00000000
Binary files a/yanzhu-ui-app/static/images/img6.png and /dev/null differ
diff --git a/yanzhu-ui-app/static/images/minebg.png b/yanzhu-ui-app/static/images/minebg.png
deleted file mode 100644
index 9a9e0154..00000000
Binary files a/yanzhu-ui-app/static/images/minebg.png and /dev/null differ
diff --git a/yanzhu-ui-app/static/images/profile.jpg b/yanzhu-ui-app/static/images/profile.jpg
deleted file mode 100644
index b3a940b2..00000000
Binary files a/yanzhu-ui-app/static/images/profile.jpg and /dev/null differ
diff --git a/yanzhu-ui-app/static/images/shbh.png b/yanzhu-ui-app/static/images/shbh.png
deleted file mode 100644
index 5ce2e49e..00000000
Binary files a/yanzhu-ui-app/static/images/shbh.png and /dev/null differ
diff --git a/yanzhu-ui-app/static/images/ywc.png b/yanzhu-ui-app/static/images/ywc.png
deleted file mode 100644
index a8c20e62..00000000
Binary files a/yanzhu-ui-app/static/images/ywc.png and /dev/null differ
diff --git a/yanzhu-ui-app/static/index.html b/yanzhu-ui-app/static/index.html
deleted file mode 100644
index 2e3e084f..00000000
--- a/yanzhu-ui-app/static/index.html
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
- <%= htmlWebpackPlugin.options.title %>
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/yanzhu-ui-app/static/indexTJ.png b/yanzhu-ui-app/static/indexTJ.png
deleted file mode 100644
index 8237ac49..00000000
Binary files a/yanzhu-ui-app/static/indexTJ.png and /dev/null differ
diff --git a/yanzhu-ui-app/static/logo.png b/yanzhu-ui-app/static/logo.png
deleted file mode 100644
index d9c4bfff..00000000
Binary files a/yanzhu-ui-app/static/logo.png and /dev/null differ
diff --git a/yanzhu-ui-app/static/nav.png b/yanzhu-ui-app/static/nav.png
deleted file mode 100644
index 7c9c6ad9..00000000
Binary files a/yanzhu-ui-app/static/nav.png and /dev/null differ
diff --git a/yanzhu-ui-app/static/pdf.png b/yanzhu-ui-app/static/pdf.png
deleted file mode 100644
index 8c87aa66..00000000
Binary files a/yanzhu-ui-app/static/pdf.png and /dev/null differ
diff --git a/yanzhu-ui-app/static/scss/global.scss b/yanzhu-ui-app/static/scss/global.scss
deleted file mode 100644
index ac636bdf..00000000
--- a/yanzhu-ui-app/static/scss/global.scss
+++ /dev/null
@@ -1,90 +0,0 @@
-.text-center {
- text-align: center;
-}
-
-.font-13 {
- font-size: 13px;
-}
-
-.font-12 {
- font-size: 12px;
-}
-
-.font-11 {
- font-size: 11px;
-}
-
-.text-grey1 {
- color: #888;
-}
-.text-grey2 {
- color: #aaa;
-}
-
-.list-cell-arrow::before {
- content: ' ';
- height: 10px;
- width: 10px;
- border-width: 2px 2px 0 0;
- border-color: #c0c0c0;
- border-style: solid;
- -webkit-transform: matrix(0.5, 0.5, -0.5, 0.5, 0, 0);
- transform: matrix(0.5, 0.5, -0.5, 0.5, 0, 0);
- position: absolute;
- top: 50%;
- margin-top: -6px;
- right: 30rpx;
- }
-
- .list-cell {
- position: relative;
- width: 100%;
- box-sizing: border-box;
- background-color: #fff;
- color: #333;
- padding: 26rpx 30rpx;
- }
-
- .list-cell:first-child {
- border-radius: 8rpx 8rpx 0 0;
- }
-
- .list-cell:last-child {
- border-radius: 0 0 8rpx 8rpx;
- }
-
- .list-cell::after {
- content: '';
- position: absolute;
- border-bottom: 1px solid #eaeef1;
- -webkit-transform: scaleY(0.5) translateZ(0);
- transform: scaleY(0.5) translateZ(0);
- transform-origin: 0 100%;
- bottom: 0;
- right: 0;
- left: 0;
- pointer-events: none;
- }
-
-
- .menu-list {
- margin: 15px 15px;
-
- .menu-item-box {
- width: 100%;
- display: flex;
- align-items: center;
-
- .menu-icon {
- color: #007AFF;
- font-size: 16px;
- margin-right: 5px;
- }
-
- .text-right {
- margin-left: auto;
- margin-right: 34rpx;
- color: #999;
- }
- }
- }
diff --git a/yanzhu-ui-app/static/scss/index.scss b/yanzhu-ui-app/static/scss/index.scss
deleted file mode 100644
index 975f10cc..00000000
--- a/yanzhu-ui-app/static/scss/index.scss
+++ /dev/null
@@ -1,8 +0,0 @@
-// global
-@import "./global.scss";
-// color-ui
-@import "@/static/scss/colorui.css";
-// iconfont
-@import "@/static/font/iconfont.css";
-// uview
-@import "@/uview-ui/index.scss";
\ No newline at end of file
diff --git a/yanzhu-ui-app/static/shujunull.png b/yanzhu-ui-app/static/shujunull.png
deleted file mode 100644
index b4cf96c9..00000000
Binary files a/yanzhu-ui-app/static/shujunull.png and /dev/null differ
diff --git a/yanzhu-ui-app/static/tabarimg/fz1.png b/yanzhu-ui-app/static/tabarimg/fz1.png
deleted file mode 100644
index dfbbb792..00000000
Binary files a/yanzhu-ui-app/static/tabarimg/fz1.png and /dev/null differ
diff --git a/yanzhu-ui-app/static/tabarimg/fz2.png b/yanzhu-ui-app/static/tabarimg/fz2.png
deleted file mode 100644
index 1468201f..00000000
Binary files a/yanzhu-ui-app/static/tabarimg/fz2.png and /dev/null differ
diff --git a/yanzhu-ui-app/static/tabarimg/fz3.png b/yanzhu-ui-app/static/tabarimg/fz3.png
deleted file mode 100644
index d8185742..00000000
Binary files a/yanzhu-ui-app/static/tabarimg/fz3.png and /dev/null differ
diff --git a/yanzhu-ui-app/static/tabarimg/fz4.png b/yanzhu-ui-app/static/tabarimg/fz4.png
deleted file mode 100644
index e8bb68b0..00000000
Binary files a/yanzhu-ui-app/static/tabarimg/fz4.png and /dev/null differ
diff --git a/yanzhu-ui-app/static/upload.png b/yanzhu-ui-app/static/upload.png
deleted file mode 100644
index 3ca1b225..00000000
Binary files a/yanzhu-ui-app/static/upload.png and /dev/null differ
diff --git a/yanzhu-ui-app/static/zip.png b/yanzhu-ui-app/static/zip.png
deleted file mode 100644
index 84450952..00000000
Binary files a/yanzhu-ui-app/static/zip.png and /dev/null differ
diff --git a/yanzhu-ui-app/store/getters.js b/yanzhu-ui-app/store/getters.js
deleted file mode 100644
index 88547941..00000000
--- a/yanzhu-ui-app/store/getters.js
+++ /dev/null
@@ -1,8 +0,0 @@
-const getters = {
- token: state => state.user.token,
- avatar: state => state.user.avatar,
- name: state => state.user.name,
- roles: state => state.user.roles,
- permissions: state => state.user.permissions
-}
-export default getters
diff --git a/yanzhu-ui-app/store/index.js b/yanzhu-ui-app/store/index.js
deleted file mode 100644
index 83a9db56..00000000
--- a/yanzhu-ui-app/store/index.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import Vue from 'vue'
-import Vuex from 'vuex'
-import user from '@/store/modules/user'
-import getters from './getters'
-
-Vue.use(Vuex)
-
-const store = new Vuex.Store({
- modules: {
- user
- },
- getters
-})
-
-export default store
diff --git a/yanzhu-ui-app/store/modules/user.js b/yanzhu-ui-app/store/modules/user.js
deleted file mode 100644
index f6668187..00000000
--- a/yanzhu-ui-app/store/modules/user.js
+++ /dev/null
@@ -1,146 +0,0 @@
-import config from '@/config'
-import storage from '@/utils/storage'
-import constant from '@/utils/constant'
-import { login, logout, getInfo, getOpenIdByCode,getWxUserPhone,phoneLogin} from '@/api/login'
-import { getToken, setToken, removeToken ,setOpenId} from '@/utils/auth'
-
-const baseUrl = config.baseUrl
-
-const user = {
- state: {
- token: getToken(),
- name: storage.get(constant.name),
- avatar: storage.get(constant.avatar),
- roles: storage.get(constant.roles),
- permissions: storage.get(constant.permissions)
- },
-
- mutations: {
- SET_TOKEN: (state, token) => {
- state.token = token
- },
- SET_NAME: (state, name) => {
- state.name = name
- storage.set(constant.name, name)
- },
- SET_AVATAR: (state, avatar) => {
- state.avatar = avatar
- storage.set(constant.avatar, avatar)
- },
- SET_ROLES: (state, roles) => {
- state.roles = roles
- storage.set(constant.roles, roles)
- },
- SET_PERMISSIONS: (state, permissions) => {
- state.permissions = permissions
- storage.set(constant.permissions, permissions)
- },
- SET_USER: (state, user) => {
- state.user = user
- storage.set(constant.user, user)
- },
- },
-
- actions: {
- // 登录
- Login({ commit }, userInfo) {
- const username = userInfo.username.trim()
- const password = userInfo.password
- const code = userInfo.code
- const uuid = userInfo.uuid
- return new Promise((resolve, reject) => {
- login(username, password, code, uuid).then(res => {
- setToken(res.token)
- commit('SET_TOKEN', res.token)
- resolve()
- }).catch(error => {
- reject(error)
- })
- })
- },
-
- // 获取用户信息
- GetInfo({ commit, state }) {
- return new Promise((resolve, reject) => {
- getInfo().then(res => {
- const user = res.data
- const avatar = (user == null || user.avatar == "" || user.avatar == null) ? require("@/static/images/profile.jpg") : baseUrl + user.avatar
- const username = (user == null || user.userName == "" || user.userName == null) ? "" : user.userName
- if (res.roles && res.roles.length > 0) {
- commit('SET_ROLES', res.roles)
- commit('SET_PERMISSIONS', res.permissions)
- } else {
- commit('SET_ROLES', ['ROLE_DEFAULT'])
- }
- commit('SET_NAME', username)
- commit('SET_AVATAR', avatar)
- commit('SET_USER', user)
- resolve(res)
- }).catch(error => {
- reject(error)
- })
- })
- },
-
- // 退出系统
- LogOut({ commit, state }) {
- return new Promise((resolve, reject) => {
- logout(state.token).then(() => {
- commit('SET_TOKEN', '')
- commit('SET_ROLES', [])
- commit('SET_PERMISSIONS', [])
- removeToken()
- storage.clean()
- resolve()
- }).catch(error => {
- reject(error)
- })
- })
- },
-
- // 登录
- phoneLogin({
- commit
- }, userInfo) {
- return new Promise((resolve, reject) => {
- phoneLogin(userInfo).then(res => {
- setToken(res.data.access_token)
- // console.log('phoneLogin',res.WxToken);
- commit('SET_TOKEN', res.data.access_token)
- resolve()
- }).catch(error => {
- reject(error)
- })
- })
- },
-
- // 获取phone
- getWxUserPhone({
- commit
- }, userInfo) {
- return new Promise((resolve, reject) => {
- getWxUserPhone(userInfo).then(res => {
- resolve(res)
- }).catch(error => {
- reject(error)
- })
- })
- },
-
- // 获取openid存session
- getOpenIdByCode({
- commit
- }, userInfo) {
- return new Promise((resolve, reject) => {
- getOpenIdByCode(userInfo).then(res => {
- setOpenId(res.OpenId);
- resolve(res)
- }).catch(error => {
- reject(error)
- })
- })
- },
- }
-}
-
-export default user
diff --git a/yanzhu-ui-app/uni.scss b/yanzhu-ui-app/uni.scss
deleted file mode 100644
index f0565f1c..00000000
--- a/yanzhu-ui-app/uni.scss
+++ /dev/null
@@ -1,66 +0,0 @@
-@import '@/uview-ui/theme.scss';
-
-/**
- * uni-app内置的常用样式变量
- */
-
-/* 行为相关颜色 */
-$uni-color-primary: #007aff;
-$uni-color-success: #4cd964;
-$uni-color-warning: #f0ad4e;
-$uni-color-error: #dd524d;
-
-/* 文字基本颜色 */
-$uni-text-color:#333;//基本色
-$uni-text-color-inverse:#fff;//反色
-$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
-$uni-text-color-placeholder: #808080;
-$uni-text-color-disable:#c0c0c0;
-
-/* 背景颜色 */
-$uni-bg-color:#ffffff;
-$uni-bg-color-grey:#f8f8f8;
-$uni-bg-color-hover:#f1f1f1;//点击状态颜色
-$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
-
-/* 边框颜色 */
-$uni-border-color:#e5e5e5;
-
-/* 尺寸变量 */
-
-/* 文字尺寸 */
-$uni-font-size-sm:12px;
-$uni-font-size-base:14px;
-$uni-font-size-lg:16px;
-
-/* 图片尺寸 */
-$uni-img-size-sm:20px;
-$uni-img-size-base:26px;
-$uni-img-size-lg:40px;
-
-/* Border Radius */
-$uni-border-radius-sm: 2px;
-$uni-border-radius-base: 3px;
-$uni-border-radius-lg: 6px;
-$uni-border-radius-circle: 50%;
-
-/* 水平间距 */
-$uni-spacing-row-sm: 5px;
-$uni-spacing-row-base: 10px;
-$uni-spacing-row-lg: 15px;
-
-/* 垂直间距 */
-$uni-spacing-col-sm: 4px;
-$uni-spacing-col-base: 8px;
-$uni-spacing-col-lg: 12px;
-
-/* 透明度 */
-$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
-
-/* 文章场景相关 */
-$uni-color-title: #2C405A; // 文章标题颜色
-$uni-font-size-title:20px;
-$uni-color-subtitle: #555555; // 二级标题颜色
-$uni-font-size-subtitle:26px;
-$uni-color-paragraph: #3F536E; // 文章段落颜色
-$uni-font-size-paragraph:15px;
diff --git a/yanzhu-ui-app/uni_modules/qiun-data-charts/changelog.md b/yanzhu-ui-app/uni_modules/qiun-data-charts/changelog.md
deleted file mode 100644
index 4d470a42..00000000
--- a/yanzhu-ui-app/uni_modules/qiun-data-charts/changelog.md
+++ /dev/null
@@ -1,320 +0,0 @@
-## 2.5.0-20230101(2023-01-01)
-- 秋云图表组件 修改条件编译顺序,确保uniapp的cli方式的项目依赖不完整时可以正常显示
-- 秋云图表组件 恢复props属性directory的使用,以修复vue3项目中,开启echarts后,echarts目录识别错误的bug
-- uCharts.js 修复区域图、混合图只有一个数据时图表显示不正确的bug
-- uCharts.js 修复折线图、区域图中时间轴类别图表tooltip指示点显示不正确的bug
-- uCharts.js 修复x轴使用labelCount时,并且boundaryGap = 'justify' 并且关闭Y轴显示的时候,最后一个坐标值不显示的bug
-- uCharts.js 修复折线图只有一组数据时 ios16 渲染颜色不正确的bug
-- uCharts.js 修复玫瑰图半径显示不正确的bug
-- uCharts.js 柱状图、山峰图增加正负图功能,y轴网格如果需要显示0轴则由 min max 及 splitNumber 确定,后续版本优化自动显示0轴
-- uCharts.js 柱状图column增加 opts.extra.column.labelPosition,数据标签位置,有效值为 outside外部, insideTop内顶部, center内中间, bottom内底部
-- uCharts.js 雷达图radar增加 opts.extra.radar.labelShow,否显示各项标识文案是,默认true
-- uCharts.js 提示窗tooltip增加 opts.extra.tooltip.boxPadding,提示窗边框填充距离,默认3px
-- uCharts.js 提示窗tooltip增加 opts.extra.tooltip.fontSize,提示窗字体大小配置,默认13px
-- uCharts.js 提示窗tooltip增加 opts.extra.tooltip.lineHeight,提示窗文字行高,默认20px
-- uCharts.js 提示窗tooltip增加 opts.extra.tooltip.legendShow,是否显示左侧图例,默认true
-- uCharts.js 提示窗tooltip增加 opts.extra.tooltip.legendShape,图例形状,图例标识样式,有效值为 auto自动跟随图例, diamond◆, circle●, triangle▲, square■, rect▬, line-
-- uCharts.js 标记线markLine增加 opts.extra.markLine.labelFontSize,字体大小配置,默认13px
-- uCharts.js 标记线markLine增加 opts.extra.markLine.labelPadding,标签边框内填充距离,默认6px
-- uCharts.js 折线图line增加 opts.extra.line.linearType,渐变色类型,可选值 none关闭渐变色,custom 自定义渐变色。使用自定义渐变色时请赋值serie.linearColor作为颜色值
-- uCharts.js 折线图line增加 serie.linearColor,渐变色数组,格式为2维数组[起始位置,颜色值],例如[[0,'#0EE2F8'],[0.3,'#2BDCA8'],[0.6,'#1890FF'],[1,'#9A60B4']]
-- uCharts.js 折线图line增加 opts.extra.line.onShadow,是否开启折线阴影,开启后请赋值serie.setShadow阴影设置
-- uCharts.js 折线图line增加 serie.setShadow,阴影配置,格式为4位数组:[offsetX,offsetY,blur,color]
-- uCharts.js 折线图line增加 opts.extra.line.animation,动画效果方向,可选值为vertical 垂直动画效果,horizontal 水平动画效果
-- uCharts.js X轴xAxis增加 opts.xAxis.lineHeight,X轴字体行高,默认20px
-- uCharts.js X轴xAxis增加 opts.xAxis.marginTop,X轴文字距离轴线的距离,默认0px
-- uCharts.js X轴xAxis增加 opts.xAxis.title,当前X轴标题
-- uCharts.js X轴xAxis增加 opts.xAxis.titleFontSize,标题字体大小,默认13px
-- uCharts.js X轴xAxis增加 opts.xAxis.titleOffsetY,标题纵向偏移距离,负数为向上偏移,正数向下偏移
-- uCharts.js X轴xAxis增加 opts.xAxis.titleOffsetX,标题横向偏移距离,负数为向左偏移,正数向右偏移
-- uCharts.js X轴xAxis增加 opts.xAxis.titleFontColor,标题字体颜色,默认#666666
-
-## 报错TypeError: Cannot read properties of undefined (reading 'length')
-- 如果是uni-modules版本组件,请先登录HBuilderX账号;
-- 在HBuilderX中的manifest.json,点击重新获取uniapp的appid,或者删除appid重新粘贴,重新运行;
-- 如果是cli项目请使用码云上的非uniCloud版本组件;
-- 或者添加uniCloud的依赖;
-- 或者使用原生uCharts;
-## 2.4.5-20221130(2022-11-30)
-- uCharts.js 优化tooltip当文字很多变为左侧显示时,如果画布仍显显示不下,提示框错位置变为以左侧0位置起画
-- uCharts.js 折线图修复特殊情况下只有单点数据,并改变线宽后点变为圆形的bug
-- uCharts.js 修复Y轴disabled启用后无效并报错的bug
-- uCharts.js 修复仪表盘起始结束角度特殊情况下显示不正确的bug
-- uCharts.js 雷达图新增参数 opts.extra.radar.radius , 自定义雷达图半径
-- uCharts.js 折线图、区域图增加tooltip指示点,opts.extra.line.activeType/opts.extra.area.activeType,可选值"none"不启用激活指示点,"hollow"空心点模式,"solid"实心点模式
-## 2.4.4-20221102(2022-11-02)
-- 秋云图表组件 修复使用echarts时reload、reshow无法调用重新渲染的bug,[详见码云PR](https://gitee.com/uCharts/uCharts/pulls/40)
-- 秋云图表组件 修复使用echarts时,初始化时宽高不正确的bug,[详见码云PR](https://gitee.com/uCharts/uCharts/pulls/42)
-- 秋云图表组件 修复uniapp的h5使用history模式时,无法加载echarts的bug
-- 秋云图表组件 小程序端@complete、@scrollLeft、@scrollRight、@getTouchStart、@getTouchMove、@getTouchEnd事件增加opts参数传出,方便一些特殊需求的交互获取数据。
-
-- uCharts.js 修复calTooltipYAxisData方法内formatter格式化方法未与y轴方法同步的问题,[详见码云PR](https://gitee.com/uCharts/uCharts/pulls/43)
-- uCharts.js 地图新增参数opts.series[i].fillOpacity,以透明度方式来设置颜色过度效果,[详见码云PR](https://gitee.com/uCharts/uCharts/pulls/38)
-- uCharts.js 地图新增参数opts.extra.map.active,是否启用点击激活变色
-- uCharts.js 地图新增参数opts.extra.map.activeTextColor,是否启用点击激活变色
-- uCharts.js 地图新增渲染完成事件renderComplete
-- uCharts.js 漏斗图修复当部分数据相同时tooltip提示窗点击错误的bug
-- uCharts.js 漏斗图新增参数series.data[i].centerText 居中标签文案
-- uCharts.js 漏斗图新增参数series.data[i].centerTextSize 居中标签文案字体大小,默认opts.fontSize
-- uCharts.js 漏斗图新增参数series.data[i].centerTextColor 居中标签文案字体颜色,默认#FFFFFF
-- uCharts.js 漏斗图新增参数opts.extra.funnel.minSize 最小值的最小宽度,默认0
-- uCharts.js 进度条新增参数opts.extra.arcbar.direction,动画方向,可选值为cw顺时针、ccw逆时针
-- uCharts.js 混合图新增参数opts.extra.mix.line.width,折线的宽度,默认2
-- uCharts.js 修复tooltip开启horizentalLine水平横线标注时,图表显示错位的bug
-- uCharts.js 优化tooltip当文字很多变为左侧显示时,如果画布仍显显示不下,提示框错位置变为以左侧0位置起画
-- uCharts.js 修复开启滚动条后X轴文字超出绘图区域后的隐藏逻辑
-- uCharts.js 柱状图、条状图修复堆叠模式不能通过{value,color}赋值单个柱子颜色的问题
-- uCharts.js 气泡图修复不识别series.textSize和series.textColor的bug
-
-## 报错TypeError: Cannot read properties of undefined (reading 'length')
-1. 如果是uni-modules版本组件,请先登录HBuilderX账号;
-2. 在HBuilderX中的manifest.json,点击重新获取uniapp的appid,或者删除appid重新粘贴,重新运行;
-3. 如果是cli项目请使用码云上的非uniCloud版本组件;
-4. 或者添加uniCloud的依赖;
-5. 或者使用原生uCharts;
-## 2.4.3-20220505(2022-05-05)
-- 秋云图表组件 修复开启canvas2d后将series赋值为空数组显示加载图标时,再次赋值后画布闪动的bug
-- 秋云图表组件 修复升级hbx最新版后ECharts的highlight方法报错的bug
-- uCharts.js 雷达图新增参数opts.extra.radar.gridEval,数据点位网格抽希,默认1
-- uCharts.js 雷达图新增参数opts.extra.radar.axisLabel, 是否显示刻度点值,默认false
-- uCharts.js 雷达图新增参数opts.extra.radar.axisLabelTofix,刻度点值小数位数,默认0
-- uCharts.js 雷达图新增参数opts.extra.radar.labelPointShow,是否显示末端刻度圆点,默认false
-- uCharts.js 雷达图新增参数opts.extra.radar.labelPointRadius,刻度圆点的半径,默认3
-- uCharts.js 雷达图新增参数opts.extra.radar.labelPointColor,刻度圆点的颜色,默认#cccccc
-- uCharts.js 雷达图新增参数opts.extra.radar.linearType,渐变色类型,可选值"none"关闭渐变,"custom"开启渐变
-- uCharts.js 雷达图新增参数opts.extra.radar.customColor,自定义渐变颜色,数组类型对应series的数组长度以匹配不同series颜色的不同配色方案,例如["#FA7D8D", "#EB88E2"]
-- uCharts.js 雷达图优化支持series.textColor、series.textSize属性
-- uCharts.js 柱状图中温度计式图标,优化支持全圆角类型,修复边框有缝隙的bug,详见官网【演示】中的温度计图表
-- uCharts.js 柱状图新增参数opts.extra.column.activeWidth,当前点击柱状图的背景宽度,默认一个单元格单位
-- uCharts.js 混合图增加opts.extra.mix.area.gradient 区域图是否开启渐变色
-- uCharts.js 混合图增加opts.extra.mix.area.opacity 区域图透明度,默认0.2
-- uCharts.js 饼图、圆环图、玫瑰图、漏斗图,增加opts.series[0].data[i].labelText,自定义标签文字,避免formatter格式化的繁琐,详见官网【演示】中的饼图
-- uCharts.js 饼图、圆环图、玫瑰图、漏斗图,增加opts.series[0].data[i].labelShow,自定义是否显示某一个指示标签,避免因饼图类别太多导致标签重复或者居多导致图形变形的问题,详见官网【演示】中的饼图
-- uCharts.js 增加opts.series[i].legendText/opts.series[0].data[i].legendText(与series.name同级)自定义图例显示文字的方法
-- uCharts.js 优化X轴、Y轴formatter格式化方法增加形参,统一为fromatter:function(value,index,opts){}
-- uCharts.js 修复横屏模式下无法使用双指缩放方法的bug
-- uCharts.js 修复当只有一条数据或者多条数据值相等的时候Y轴自动计算的最大值错误的bug
-- 【官网模板】增加外部自定义图例与图表交互的例子,[点击跳转](https://www.ucharts.cn/v2/#/layout/info?id=2)
-
-## 注意:非unimodules 版本如因更新 hbx 至 3.4.7 导致报错如下,请到码云更新非 unimodules 版本组件,[点击跳转](https://gitee.com/uCharts/uCharts/tree/master/uni-app/uCharts-%E7%BB%84%E4%BB%B6)
-> Error in callback for immediate watcher "uchartsOpts": "SyntaxError: Unexpected token u in JSON at position 0"
-## 2.4.2-20220421(2022-04-21)
-- 秋云图表组件 修复HBX升级3.4.6.20220420版本后echarts报错的问题
-## 2.4.2-20220420(2022-04-20)
-## 重要!此版本uCharts新增了很多功能,修复了诸多已知问题
-- 秋云图表组件 新增onzoom开启双指缩放功能(仅uCharts),前提需要直角坐标系类图表类型,并且ontouch为true、opts.enableScroll为true,详见实例项目K线图
-- 秋云图表组件 新增optsWatch是否监听opts变化,关闭optsWatch后,动态修改opts不会触发图表重绘
-- 秋云图表组件 修复开启canvas2d功能后,动态更新数据后画布闪动的bug
-- 秋云图表组件 去除directory属性,改为自动获取echarts.min.js路径(升级不受影响)
-- 秋云图表组件 增加getImage()方法及@getImage事件,通过ref调用getImage()方法获,触发@getImage事件获取当前画布的base64图片文件流。
-- 秋云图表组件 支付宝、字节跳动、飞书、快手小程序支持开启canvas2d同层渲染设置。
-- 秋云图表组件 新增加【非uniCloud】版本组件,避免有些不需要uniCloud的使用组件发布至小程序需要提交隐私声明问题,请到码云[【非uniCloud版本】](https://gitee.com/uCharts/uCharts/tree/master/uni-app/uCharts-%E7%BB%84%E4%BB%B6),或npm[【非uniCloud版本】](https://www.npmjs.com/package/@qiun/uni-ucharts)下载使用。
-- uCharts.js 新增dobuleZoom双指缩放功能
-- uCharts.js 新增山峰图type="mount",数据格式为饼图类格式,不需要传入categories,具体详见新版官网在线演示
-- uCharts.js 修复折线图当数据中存在null时tooltip报错的bug
-- uCharts.js 修复饼图类当画布比较小时自动计算的半径是负数报错的bug
-- uCharts.js 统一各图表类型的series.formatter格式化方法的形参为(val, index, series, opts),方便格式化时有更多参数可用
-- uCharts.js 标记线功能增加labelText自定义显示文字,增加labelAlign标签显示位置(左侧或右侧),增加标签显示位置微调labelOffsetX、labelOffsetY
-- uCharts.js 修复条状图当数值很小时开启圆角后样式错误的bug
-- uCharts.js 修复X轴开启disabled后,X轴仍占用空间的bug
-- uCharts.js 修复X轴开启滚动条并且开启rotateLabel后,X轴文字与滚动条重叠的bug
-- uCharts.js 增加X轴rotateAngle文字旋转自定义角度,取值范围(-90至90)
-- uCharts.js 修复地图文字标签层级显示不正确的bug
-- uCharts.js 修复饼图、圆环图、玫瑰图当数据全部为0的时候不显示数据标签的bug
-- uCharts.js 修复当opts.padding上边距为0时,Y轴顶部刻度标签位置不正确的bug
-
-## 另外我们还开发了各大原生小程序组件,已发布至码云和npm
-[https://gitee.com/uCharts/uCharts](https://gitee.com/uCharts/uCharts)
-[https://www.npmjs.com/~qiun](https://www.npmjs.com/~qiun)
-
-## 对于原生uCharts文档我们已上线新版官方网站,详情点击下面链接进入官网
-[https://www.uCharts.cn/v2/](https://www.ucharts.cn/v2/)
-## 2.3.7-20220122(2022-01-22)
-## 重要!使用vue3编译,请使用cli模式并升级至最新依赖,HbuilderX编译需要使用3.3.8以上版本
-- uCharts.js 修复uni-app平台组件模式使用vue3编译到小程序报错的bug。
-## 2.3.7-20220118(2022-01-18)
-## 注意,使用vue3的前提是需要3.3.8.20220114-alpha版本的HBuilder!
-## 2.3.67-20220118(2022-01-18)
-- 秋云图表组件 组件初步支持vue3,全端编译会有些问题,具体详见下面修改:
-1. 小程序端运行时,在uni_modules文件夹的qiun-data-charts.js中搜索 new uni_modules_qiunDataCharts_js_sdk_uCharts_uCharts.uCharts,将.uCharts去掉。
-2. 小程序端发行时,在uni_modules文件夹的qiun-data-charts.js中搜索 new e.uCharts,将.uCharts去掉,变为 new e。
-3. 如果觉得上述步骤比较麻烦,如果您的项目只编译到小程序端,可以修改u-charts.js最后一行导出方式,将 export default uCharts;变更为 export default { uCharts: uCharts }; 这样变更后,H5和App端的renderjs会有问题,请开发者自行选择。(此问题非组件问题,请等待DC官方修复Vue3的小程序端)
-## 2.3.6-20220111(2022-01-11)
-- 秋云图表组件 修改组件 props 属性中的 background 默认值为 rgba(0,0,0,0)
-## 2.3.6-20211201(2021-12-01)
-- uCharts.js 修复bar条状图开启圆角模式时,值很小时圆角渲染错误的bug
-## 2.3.5-20211014(2021-10-15)
-- uCharts.js 增加vue3的编译支持(仅原生uCharts,qiun-data-charts组件后续会支持,请关注更新)
-## 2.3.4-20211012(2021-10-12)
-- 秋云图表组件 修复 mac os x 系统 mouseover 事件丢失的 bug
-## 2.3.3-20210706(2021-07-06)
-- uCharts.js 增加雷达图开启数据点值(opts.dataLabel)的显示
-## 2.3.2-20210627(2021-06-27)
-- 秋云图表组件 修复tooltipCustom个别情况下传值不正确报错TypeError: Cannot read property 'name' of undefined的bug
-## 2.3.1-20210616(2021-06-16)
-- uCharts.js 修复圆角柱状图使用4角圆角时,当数值过大时不正确的bug
-## 2.3.0-20210612(2021-06-12)
-- uCharts.js 【重要】uCharts增加nvue兼容,可在nvue项目中使用gcanvas组件渲染uCharts,[详见码云uCharts-demo-nvue](https://gitee.com/uCharts/uCharts)
-- 秋云图表组件 增加tapLegend属性,是否开启图例点击交互事件
-- 秋云图表组件 getIndex事件中增加返回uCharts实例中的opts参数,以便在页面中调用参数
-- 示例项目 pages/other/other.vue增加app端自定义tooltip的方法,详见showOptsTooltip方法
-## 2.2.1-20210603(2021-06-03)
-- uCharts.js 修复饼图、圆环图、玫瑰图,当起始角度不为0时,tooltip位置不准确的bug
-- uCharts.js 增加温度计式柱状图开启顶部半圆形的配置
-## 2.2.0-20210529(2021-05-29)
-- uCharts.js 增加条状图type="bar"
-- 示例项目 pages/ucharts/ucharts.vue增加条状图的demo
-## 2.1.7-20210524(2021-05-24)
-- uCharts.js 修复大数据量模式下曲线图不平滑的bug
-## 2.1.6-20210523(2021-05-23)
-- 秋云图表组件 修复小程序端开启滚动条更新数据后滚动条位置不符合预期的bug
-## 2.1.5-2021051702(2021-05-17)
-- uCharts.js 修复自定义Y轴min和max值为0时不能正确显示的bug
-## 2.1.5-20210517(2021-05-17)
-- uCharts.js 修复Y轴自定义min和max时,未按指定的最大值最小值显示坐标轴刻度的bug
-## 2.1.4-20210516(2021-05-16)
-- 秋云图表组件 优化onWindowResize防抖方法
-- 秋云图表组件 修复APP端uCharts更新数据时,清空series显示loading图标后再显示图表,图表抖动的bug
-- uCharts.js 修复开启canvas2d后,x轴、y轴、series自定义字体大小未按比例缩放的bug
-- 示例项目 修复format-e.vue拼写错误导致app端使用uCharts渲染图表
-## 2.1.3-20210513(2021-05-13)
-- 秋云图表组件 修改uCharts变更chartData数据为updateData方法,支持带滚动条的数据动态打点
-- 秋云图表组件 增加onWindowResize防抖方法 fix by ど誓言,如尘般染指流年づ
-- 秋云图表组件 H5或者APP变更chartData数据显示loading图表时,原数据闪现的bug
-- 秋云图表组件 props增加errorReload禁用错误点击重新加载的方法
-- uCharts.js 增加tooltip显示category(x轴对应点位)标题的功能,opts.extra.tooltip.showCategory,默认为false
-- uCharts.js 修复mix混合图只有柱状图时,tooltip的分割线显示位置不正确的bug
-- uCharts.js 修复开启滚动条,图表在拖动中动态打点,滚动条位置不正确的bug
-- uCharts.js 修复饼图类数据格式为echarts数据格式,series为空数组报错的bug
-- 示例项目 修改uCharts.js更新到v2.1.2版本后,@getIndex方法获取索引值变更为e.currentIndex.index
-- 示例项目 pages/updata/updata.vue增加滚动条拖动更新(数据动态打点)的demo
-- 示例项目 pages/other/other.vue增加errorReload禁用错误点击重新加载的demo
-## 2.1.2-20210509(2021-05-09)
-秋云图表组件 修复APP端初始化时就传入chartData或lacaldata不显示图表的bug
-## 2.1.1-20210509(2021-05-09)
-- 秋云图表组件 变更ECharts的eopts配置在renderjs内执行,支持在config-echarts.js配置文件内写function配置。
-- 秋云图表组件 修复APP端报错Prop being mutated: "onmouse"错误的bug。
-- 秋云图表组件 修复APP端报错Error: Not Found:Page[6][-1,27] at view.umd.min.js:1的bug。
-## 2.1.0-20210507(2021-05-07)
-- 秋云图表组件 修复初始化时就有数据或者数据更新的时候loading加载动画闪动的bug
-- uCharts.js 修复x轴format方法categories为字符串类型时返回NaN的bug
-- uCharts.js 修复series.textColor、legend.fontColor未执行全局默认颜色的bug
-## 2.1.0-20210506(2021-05-06)
-- 秋云图表组件 修复极个别情况下报错item.properties undefined的bug
-- 秋云图表组件 修复极个别情况下关闭加载动画reshow不起作用,无法显示图表的bug
-- 示例项目 pages/ucharts/ucharts.vue 增加时间轴折线图(type="tline")、时间轴区域图(type="tarea")、散点图(type="scatter")、气泡图demo(type="bubble")、倒三角形漏斗图(opts.extra.funnel.type="triangle")、金字塔形漏斗图(opts.extra.funnel.type="pyramid")
-- 示例项目 pages/format-u/format-u.vue 增加X轴format格式化示例
-- uCharts.js 升级至v2.1.0版本
-- uCharts.js 修复 玫瑰图面积模式点击tooltip位置不正确的bug
-- uCharts.js 修复 玫瑰图点击图例,只剩一个类别显示空白的bug
-- uCharts.js 修复 饼图类图点击图例,其他图表tooltip位置某些情况下不准的bug
-- uCharts.js 修复 x轴为矢量轴(时间轴)情况下,点击tooltip位置不正确的bug
-- uCharts.js 修复 词云图获取点击索引偶尔不准的bug
-- uCharts.js 增加 直角坐标系图表X轴format格式化方法(原生uCharts.js用法请使用formatter)
-- uCharts.js 增加 漏斗图扩展配置,倒三角形(opts.extra.funnel.type="triangle"),金字塔形(opts.extra.funnel.type="pyramid")
-- uCharts.js 增加 散点图(opts.type="scatter")、气泡图(opts.type="bubble")
-- 后期计划 完善散点图、气泡图,增加markPoints标记点,增加横向条状图。
-## 2.0.0-20210502(2021-05-02)
-- uCharts.js 修复词云图获取点击索引不正确的bug
-## 2.0.0-20210501(2021-05-01)
-- 秋云图表组件 修复QQ小程序、百度小程序在关闭动画效果情况下,v-for循环使用图表,显示不正确的bug
-## 2.0.0-20210426(2021-04-26)
-- 秋云图表组件 修复QQ小程序不支持canvas2d的bug
-- 秋云图表组件 修复钉钉小程序某些情况点击坐标计算错误的bug
-- uCharts.js 增加 extra.column.categoryGap 参数,柱状图类每个category点位(X轴点)柱子组之间的间距
-- uCharts.js 增加 yAxis.data[i].titleOffsetY 参数,标题纵向偏移距离,负数为向上偏移,正数向下偏移
-- uCharts.js 增加 yAxis.data[i].titleOffsetX 参数,标题横向偏移距离,负数为向左偏移,正数向右偏移
-- uCharts.js 增加 extra.gauge.labelOffset 参数,仪表盘标签文字径向便宜距离,默认13px
-## 2.0.0-20210422-2(2021-04-22)
-秋云图表组件 修复 formatterAssign 未判断 args[key] == null 的情况导致栈溢出的 bug
-## 2.0.0-20210422(2021-04-22)
-- 秋云图表组件 修复H5、APP、支付宝小程序、微信小程序canvas2d模式下横屏模式的bug
-## 2.0.0-20210421(2021-04-21)
-- uCharts.js 修复多行图例的情况下,图例在上方或者下方时,图例float为左侧或者右侧时,第二行及以后的图例对齐方式不正确的bug
-## 2.0.0-20210420(2021-04-20)
-- 秋云图表组件 修复微信小程序开启canvas2d模式后,windows版微信小程序不支持canvas2d模式的bug
-- 秋云图表组件 修改非uni_modules版本为v2.0版本qiun-data-charts组件
-## 2.0.0-20210419(2021-04-19)
-## v1.0版本已停更,建议转uni_modules版本组件方式调用,点击右侧绿色【使用HBuilderX导入插件】即可使用,示例项目请点击右侧蓝色按钮【使用HBuilderX导入示例项目】。
-## 初次使用如果提示未注册<qiun-data-charts>组件,请重启HBuilderX,如仍不好用,请重启电脑;
-## 如果是cli项目,请尝试清理node_modules,重新install,还不行就删除项目,再重新install。
-## 此问题已于DCloud官方确认,HBuilderX下个版本会修复。
-## 其他图表不显示问题详见[常见问题选项卡](https://demo.ucharts.cn)
-## 新手请先完整阅读帮助文档及常见问题3遍,右侧蓝色按钮示例项目请看2遍!
-## [DEMO演示及在线生成工具(v2.0文档)https://demo.ucharts.cn](https://demo.ucharts.cn)
-## [图表组件在项目中的应用参见 UReport数据报表](https://ext.dcloud.net.cn/plugin?id=4651)
-- uCharts.js 修复混合图中柱状图单独设置颜色不生效的bug
-- uCharts.js 修复多Y轴单独设置fontSize时,开启canvas2d后,未对应放大字体的bug
-## 2.0.0-20210418(2021-04-18)
-- 秋云图表组件 增加directory配置,修复H5端history模式下如果发布到二级目录无法正确加载echarts.min.js的bug
-## 2.0.0-20210416(2021-04-16)
-## v1.0版本已停更,建议转uni_modules版本组件方式调用,点击右侧绿色【使用HBuilderX导入插件】即可使用,示例项目请点击右侧蓝色按钮【使用HBuilderX导入示例项目】。
-## 初次使用如果提示未注册<qiun-data-charts>组件,请重启HBuilderX,如仍不好用,请重启电脑;
-## 如果是cli项目,请尝试清理node_modules,重新install,还不行就删除项目,再重新install。
-## 此问题已于DCloud官方确认,HBuilderX下个版本会修复。
-## 其他图表不显示问题详见[常见问题选项卡](https://demo.ucharts.cn)
-## 新手请先完整阅读帮助文档及常见问题3遍,右侧蓝色按钮示例项目请看2遍!
-## [DEMO演示及在线生成工具(v2.0文档)https://demo.ucharts.cn](https://demo.ucharts.cn)
-## [图表组件在项目中的应用参见 UReport数据报表](https://ext.dcloud.net.cn/plugin?id=4651)
-- 秋云图表组件 修复APP端某些情况下报错`Not Found Page`的bug,fix by 高级bug开发技术员
-- 示例项目 修复APP端v-for循环某些情况下报错`Not Found Page`的bug,fix by 高级bug开发技术员
-- uCharts.js 修复非直角坐标系tooltip提示窗右侧超出未变换方向显示的bug
-## 2.0.0-20210415(2021-04-15)
-- 秋云图表组件 修复H5端发布到二级目录下echarts无法加载的bug
-- 秋云图表组件 修复某些情况下echarts.off('finished')移除监听事件报错的bug
-## 2.0.0-20210414(2021-04-14)
-## v1.0版本已停更,建议转uni_modules版本组件方式调用,点击右侧绿色【使用HBuilderX导入插件】即可使用,示例项目请点击右侧蓝色按钮【使用HBuilderX导入示例项目】。
-## 初次使用如果提示未注册<qiun-data-charts>组件,请重启HBuilderX,如仍不好用,请重启电脑;
-## 如果是cli项目,请尝试清理node_modules,重新install,还不行就删除项目,再重新install。
-## 此问题已于DCloud官方确认,HBuilderX下个版本会修复。
-## 其他图表不显示问题详见[常见问题选项卡](https://demo.ucharts.cn)
-## 新手请先完整阅读帮助文档及常见问题3遍,右侧蓝色按钮示例项目请看2遍!
-## [DEMO演示及在线生成工具(v2.0文档)https://demo.ucharts.cn](https://demo.ucharts.cn)
-## [图表组件在项目中的应用参见 UReport数据报表](https://ext.dcloud.net.cn/plugin?id=4651)
-- 秋云图表组件 修复H5端在cli项目下ECharts引用地址错误的bug
-- 示例项目 增加ECharts的formatter用法的示例(详见示例项目format-e.vue)
-- uCharts.js 增加圆环图中心背景色的配置extra.ring.centerColor
-- uCharts.js 修复微信小程序安卓端柱状图开启透明色后显示不正确的bug
-## 2.0.0-20210413(2021-04-13)
-- 秋云图表组件 修复百度小程序多个图表真机未能正确获取根元素dom尺寸的bug
-- 秋云图表组件 修复百度小程序横屏模式方向不正确的bug
-- 秋云图表组件 修改ontouch时,@getTouchStart@getTouchMove@getTouchEnd的触发条件
-- uCharts.js 修复饼图类数据格式series属性不生效的bug
-- uCharts.js 增加时序区域图 详见示例项目中ucharts.vue
-## 2.0.0-20210412-2(2021-04-12)
-## v1.0版本已停更,建议转uni_modules版本组件方式调用,点击右侧绿色【使用HBuilderX导入插件】即可使用,示例项目请点击右侧蓝色按钮【使用HBuilderX导入示例项目】。
-## 初次使用如果提示未注册<qiun-data-charts>组件,请重启HBuilderX。如仍不好用,请重启电脑,此问题已于DCloud官方确认,HBuilderX下个版本会修复。
-## [DEMO演示及在线生成工具(v2.0文档)https://demo.ucharts.cn](https://demo.ucharts.cn)
-## [图表组件在uniCloudAdmin中的应用 UReport数据报表](https://ext.dcloud.net.cn/plugin?id=4651)
-- 秋云图表组件 修复uCharts在APP端横屏模式下不能正确渲染的bug
-- 示例项目 增加ECharts柱状图渐变色、圆角柱状图、横向柱状图(条状图)的示例
-## 2.0.0-20210412(2021-04-12)
-- 秋云图表组件 修复created中判断echarts导致APP端无法识别,改回mounted中判断echarts初始化
-- uCharts.js 修复2d模式下series.textOffset未乘像素比的bug
-## 2.0.0-20210411(2021-04-11)
-## v1.0版本已停更,建议转uni_modules版本组件方式调用,点击右侧绿色【使用HBuilderX导入插件】即可使用,示例项目请点击右侧蓝色按钮【使用HBuilderX导入示例项目】。
-## 初次使用如果提示未注册组件,请重启HBuilderX,并清空小程序开发者工具缓存。
-## [DEMO演示及在线生成工具(v2.0文档)https://demo.ucharts.cn](https://demo.ucharts.cn)
-## [图表组件在uniCloudAdmin中的应用 UReport数据报表](https://ext.dcloud.net.cn/plugin?id=4651)
-- uCharts.js 折线图区域图增加connectNulls断点续连的功能,详见示例项目中ucharts.vue
-- 秋云图表组件 变更初始化方法为created,变更type2d默认值为true,优化2d模式下组件初始化后dom获取不到的bug
-- 秋云图表组件 修复左右布局时,右侧图表点击坐标错误的bug,修复tooltip柱状图自定义颜色显示object的bug
-## 2.0.0-20210410(2021-04-10)
-- 修复左右布局时,右侧图表点击坐标错误的bug,修复柱状图自定义颜色tooltip显示object的bug
-- 增加标记线及柱状图自定义颜色的demo
-## 2.0.0-20210409(2021-04-08)
-## v1.0版本已停更,建议转uni_modules版本组件方式调用,点击右侧【使用HBuilderX导入插件】即可体验,DEMO演示及在线生成工具(v2.0文档)[https://demo.ucharts.cn](https://demo.ucharts.cn)
-## 图表组件在uniCloudAdmin中的应用 [UReport数据报表](https://ext.dcloud.net.cn/plugin?id=4651)
-- uCharts.js 修复钉钉小程序百度小程序measureText不准确的bug,修复2d模式下饼图类activeRadius为按比例放大的bug
-- 修复组件在支付宝小程序端点击位置不准确的bug
-## 2.0.0-20210408(2021-04-07)
-- 修复组件在支付宝小程序端不能显示的bug(目前支付宝小程不能点击交互,后续修复)
-- uCharts.js 修复高分屏下柱状图类,圆弧进度条 自定义宽度不能按比例放大的bug
-## 2.0.0-20210407(2021-04-06)
-## v1.0版本已停更,建议转uni_modules版本组件方式调用,点击右侧【使用HBuilderX导入插件】即可体验,DEMO演示及在线生成工具(v2.0文档)[https://demo.ucharts.cn](https://demo.ucharts.cn)
-## 增加 通过tofix和unit快速格式化y轴的demo add by `howcode`
-## 增加 图表组件在uniCloudAdmin中的应用 [UReport数据报表](https://ext.dcloud.net.cn/plugin?id=4651)
-## 2.0.0-20210406(2021-04-05)
-# 秋云图表组件+uCharts v2.0版本同步上线,使用方法详见https://demo.ucharts.cn帮助页
-## 2.0.0(2021-04-05)
-# 秋云图表组件+uCharts v2.0版本同步上线,使用方法详见https://demo.ucharts.cn帮助页
diff --git a/yanzhu-ui-app/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue b/yanzhu-ui-app/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue
deleted file mode 100644
index 5678f7df..00000000
--- a/yanzhu-ui-app/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue
+++ /dev/null
@@ -1,1618 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/yanzhu-ui-app/uni_modules/qiun-data-charts/components/qiun-error/qiun-error.vue b/yanzhu-ui-app/uni_modules/qiun-data-charts/components/qiun-error/qiun-error.vue
deleted file mode 100644
index b15b19f5..00000000
--- a/yanzhu-ui-app/uni_modules/qiun-data-charts/components/qiun-error/qiun-error.vue
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
- {{errorMessage==null?'请点击重试':errorMessage}}
-
-
-
-
-
-
diff --git a/yanzhu-ui-app/uni_modules/qiun-data-charts/components/qiun-loading/loading1.vue b/yanzhu-ui-app/uni_modules/qiun-data-charts/components/qiun-loading/loading1.vue
deleted file mode 100644
index b7013949..00000000
--- a/yanzhu-ui-app/uni_modules/qiun-data-charts/components/qiun-loading/loading1.vue
+++ /dev/null
@@ -1,162 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/yanzhu-ui-app/uni_modules/qiun-data-charts/components/qiun-loading/loading2.vue b/yanzhu-ui-app/uni_modules/qiun-data-charts/components/qiun-loading/loading2.vue
deleted file mode 100644
index 7541b317..00000000
--- a/yanzhu-ui-app/uni_modules/qiun-data-charts/components/qiun-loading/loading2.vue
+++ /dev/null
@@ -1,170 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/yanzhu-ui-app/uni_modules/qiun-data-charts/components/qiun-loading/loading3.vue b/yanzhu-ui-app/uni_modules/qiun-data-charts/components/qiun-loading/loading3.vue
deleted file mode 100644
index 8e14db33..00000000
--- a/yanzhu-ui-app/uni_modules/qiun-data-charts/components/qiun-loading/loading3.vue
+++ /dev/null
@@ -1,173 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/yanzhu-ui-app/uni_modules/qiun-data-charts/components/qiun-loading/loading4.vue b/yanzhu-ui-app/uni_modules/qiun-data-charts/components/qiun-loading/loading4.vue
deleted file mode 100644
index 77c55b75..00000000
--- a/yanzhu-ui-app/uni_modules/qiun-data-charts/components/qiun-loading/loading4.vue
+++ /dev/null
@@ -1,222 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/yanzhu-ui-app/uni_modules/qiun-data-charts/components/qiun-loading/loading5.vue b/yanzhu-ui-app/uni_modules/qiun-data-charts/components/qiun-loading/loading5.vue
deleted file mode 100644
index cb93a557..00000000
--- a/yanzhu-ui-app/uni_modules/qiun-data-charts/components/qiun-loading/loading5.vue
+++ /dev/null
@@ -1,229 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/yanzhu-ui-app/uni_modules/qiun-data-charts/components/qiun-loading/qiun-loading.vue b/yanzhu-ui-app/uni_modules/qiun-data-charts/components/qiun-loading/qiun-loading.vue
deleted file mode 100644
index 77890607..00000000
--- a/yanzhu-ui-app/uni_modules/qiun-data-charts/components/qiun-loading/qiun-loading.vue
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/yanzhu-ui-app/uni_modules/qiun-data-charts/js_sdk/u-charts/config-echarts.js b/yanzhu-ui-app/uni_modules/qiun-data-charts/js_sdk/u-charts/config-echarts.js
deleted file mode 100644
index 7b8168f7..00000000
--- a/yanzhu-ui-app/uni_modules/qiun-data-charts/js_sdk/u-charts/config-echarts.js
+++ /dev/null
@@ -1,422 +0,0 @@
-/*
- * uCharts®
- * 高性能跨平台图表库,支持H5、APP、小程序(微信/支付宝/百度/头条/QQ/360)、Vue、Taro等支持canvas的框架平台
- * Copyright (c) 2021 QIUN®秋云 https://www.ucharts.cn All rights reserved.
- * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
- * 复制使用请保留本段注释,感谢支持开源!
- *
- * uCharts®官方网站
- * https://www.uCharts.cn
- *
- * 开源地址:
- * https://gitee.com/uCharts/uCharts
- *
- * uni-app插件市场地址:
- * http://ext.dcloud.net.cn/plugin?id=271
- *
- */
-
-// 通用配置项
-
-// 主题颜色配置:如每个图表类型需要不同主题,请在对应图表类型上更改color属性
-const color = ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'];
-
-const cfe = {
- //demotype为自定义图表类型
- "type": ["pie", "ring", "rose", "funnel", "line", "column", "area", "radar", "gauge","candle","demotype"],
- //增加自定义图表类型,如果需要categories,请在这里加入您的图表类型例如最后的"demotype"
- "categories": ["line", "column", "area", "radar", "gauge", "candle","demotype"],
- //instance为实例变量承载属性,option为eopts承载属性,不要删除
- "instance": {},
- "option": {},
- //下面是自定义format配置,因除H5端外的其他端无法通过props传递函数,只能通过此属性对应下标的方式来替换
- "formatter":{
- "tooltipDemo1":function(res){
- let result = ''
- for (let i in res) {
- if (i == 0) {
- result += res[i].axisValueLabel + '年销售额'
- }
- let value = '--'
- if (res[i].data !== null) {
- value = res[i].data
- }
- // #ifdef H5
- result += '\n' + res[i].seriesName + ':' + value + ' 万元'
- // #endif
-
- // #ifdef APP-PLUS
- result += '
' + res[i].marker + res[i].seriesName + ':' + value + ' 万元'
- // #endif
- }
- return result;
- },
- legendFormat:function(name){
- return "自定义图例+"+name;
- },
- yAxisFormatDemo:function (value, index) {
- return value + '元';
- },
- seriesFormatDemo:function(res){
- return res.name + '年' + res.value + '元';
- }
- },
- //这里演示了自定义您的图表类型的option,可以随意命名,之后在组件上 type="demotype" 后,组件会调用这个花括号里的option,如果组件上还存在eopts参数,会将demotype与eopts中option合并后渲染图表。
- "demotype":{
- "color": color,
- //在这里填写echarts的option即可
-
- },
- //下面是自定义配置,请添加项目所需的通用配置
- "column": {
- "color": color,
- "title": {
- "text": ''
- },
- "tooltip": {
- "trigger": 'axis'
- },
- "grid": {
- "top": 30,
- "bottom": 50,
- "right": 15,
- "left": 40
- },
- "legend": {
- "bottom": 'left',
- },
- "toolbox": {
- "show": false,
- },
- "xAxis": {
- "type": 'category',
- "axisLabel": {
- "color": '#666666'
- },
- "axisLine": {
- "lineStyle": {
- "color": '#CCCCCC'
- }
- },
- "boundaryGap": true,
- "data": []
- },
- "yAxis": {
- "type": 'value',
- "axisTick": {
- "show": false,
- },
- "axisLabel": {
- "color": '#666666'
- },
- "axisLine": {
- "lineStyle": {
- "color": '#CCCCCC'
- }
- },
- },
- "seriesTemplate": {
- "name": '',
- "type": 'bar',
- "data": [],
- "barwidth": 20,
- "label": {
- "show": true,
- "color": "#666666",
- "position": 'top',
- },
- },
- },
- "line": {
- "color": color,
- "title": {
- "text": ''
- },
- "tooltip": {
- "trigger": 'axis'
- },
- "grid": {
- "top": 30,
- "bottom": 50,
- "right": 15,
- "left": 40
- },
- "legend": {
- "bottom": 'left',
- },
- "toolbox": {
- "show": false,
- },
- "xAxis": {
- "type": 'category',
- "axisLabel": {
- "color": '#666666'
- },
- "axisLine": {
- "lineStyle": {
- "color": '#CCCCCC'
- }
- },
- "boundaryGap": true,
- "data": []
- },
- "yAxis": {
- "type": 'value',
- "axisTick": {
- "show": false,
- },
- "axisLabel": {
- "color": '#666666'
- },
- "axisLine": {
- "lineStyle": {
- "color": '#CCCCCC'
- }
- },
- },
- "seriesTemplate": {
- "name": '',
- "type": 'line',
- "data": [],
- "barwidth": 20,
- "label": {
- "show": true,
- "color": "#666666",
- "position": 'top',
- },
- },
- },
- "area": {
- "color": color,
- "title": {
- "text": ''
- },
- "tooltip": {
- "trigger": 'axis'
- },
- "grid": {
- "top": 30,
- "bottom": 50,
- "right": 15,
- "left": 40
- },
- "legend": {
- "bottom": 'left',
- },
- "toolbox": {
- "show": false,
- },
- "xAxis": {
- "type": 'category',
- "axisLabel": {
- "color": '#666666'
- },
- "axisLine": {
- "lineStyle": {
- "color": '#CCCCCC'
- }
- },
- "boundaryGap": true,
- "data": []
- },
- "yAxis": {
- "type": 'value',
- "axisTick": {
- "show": false,
- },
- "axisLabel": {
- "color": '#666666'
- },
- "axisLine": {
- "lineStyle": {
- "color": '#CCCCCC'
- }
- },
- },
- "seriesTemplate": {
- "name": '',
- "type": 'line',
- "data": [],
- "areaStyle": {},
- "label": {
- "show": true,
- "color": "#666666",
- "position": 'top',
- },
- },
- },
- "pie": {
- "color": color,
- "title": {
- "text": ''
- },
- "tooltip": {
- "trigger": 'item'
- },
- "grid": {
- "top": 40,
- "bottom": 30,
- "right": 15,
- "left": 15
- },
- "legend": {
- "bottom": 'left',
- },
- "seriesTemplate": {
- "name": '',
- "type": 'pie',
- "data": [],
- "radius": '50%',
- "label": {
- "show": true,
- "color": "#666666",
- "position": 'top',
- },
- },
- },
- "ring": {
- "color": color,
- "title": {
- "text": ''
- },
- "tooltip": {
- "trigger": 'item'
- },
- "grid": {
- "top": 40,
- "bottom": 30,
- "right": 15,
- "left": 15
- },
- "legend": {
- "bottom": 'left',
- },
- "seriesTemplate": {
- "name": '',
- "type": 'pie',
- "data": [],
- "radius": ['40%', '70%'],
- "avoidLabelOverlap": false,
- "label": {
- "show": true,
- "color": "#666666",
- "position": 'top',
- },
- "labelLine": {
- "show": true
- },
- },
- },
- "rose": {
- "color": color,
- "title": {
- "text": ''
- },
- "tooltip": {
- "trigger": 'item'
- },
- "legend": {
- "top": 'bottom'
- },
- "seriesTemplate": {
- "name": '',
- "type": 'pie',
- "data": [],
- "radius": "55%",
- "center": ['50%', '50%'],
- "roseType": 'area',
- },
- },
- "funnel": {
- "color": color,
- "title": {
- "text": ''
- },
- "tooltip": {
- "trigger": 'item',
- "formatter": "{b} : {c}%"
- },
- "legend": {
- "top": 'bottom'
- },
- "seriesTemplate": {
- "name": '',
- "type": 'funnel',
- "left": '10%',
- "top": 60,
- "bottom": 60,
- "width": '80%',
- "min": 0,
- "max": 100,
- "minSize": '0%',
- "maxSize": '100%',
- "sort": 'descending',
- "gap": 2,
- "label": {
- "show": true,
- "position": 'inside'
- },
- "labelLine": {
- "length": 10,
- "lineStyle": {
- "width": 1,
- "type": 'solid'
- }
- },
- "itemStyle": {
- "bordercolor": '#fff',
- "borderwidth": 1
- },
- "emphasis": {
- "label": {
- "fontSize": 20
- }
- },
- "data": [],
- },
- },
- "gauge": {
- "color": color,
- "tooltip": {
- "formatter": '{a}
{b} : {c}%'
- },
- "seriesTemplate": {
- "name": '业务指标',
- "type": 'gauge',
- "detail": {"formatter": '{value}%'},
- "data": [{"value": 50, "name": '完成率'}]
- },
- },
- "candle": {
- "xAxis": {
- "data": []
- },
- "yAxis": {},
- "color": color,
- "title": {
- "text": ''
- },
- "dataZoom": [{
- "type": 'inside',
- "xAxisIndex": [0, 1],
- "start": 10,
- "end": 100
- },
- {
- "show": true,
- "xAxisIndex": [0, 1],
- "type": 'slider',
- "bottom": 10,
- "start": 10,
- "end": 100
- }
- ],
- "seriesTemplate": {
- "name": '',
- "type": 'k',
- "data": [],
- },
- }
-}
-
-export default cfe;
\ No newline at end of file
diff --git a/yanzhu-ui-app/uni_modules/qiun-data-charts/js_sdk/u-charts/config-ucharts.js b/yanzhu-ui-app/uni_modules/qiun-data-charts/js_sdk/u-charts/config-ucharts.js
deleted file mode 100644
index 17b28b3b..00000000
--- a/yanzhu-ui-app/uni_modules/qiun-data-charts/js_sdk/u-charts/config-ucharts.js
+++ /dev/null
@@ -1,606 +0,0 @@
-/*
- * uCharts®
- * 高性能跨平台图表库,支持H5、APP、小程序(微信/支付宝/百度/头条/QQ/360)、Vue、Taro等支持canvas的框架平台
- * Copyright (c) 2021 QIUN®秋云 https://www.ucharts.cn All rights reserved.
- * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
- * 复制使用请保留本段注释,感谢支持开源!
- *
- * uCharts®官方网站
- * https://www.uCharts.cn
- *
- * 开源地址:
- * https://gitee.com/uCharts/uCharts
- *
- * uni-app插件市场地址:
- * http://ext.dcloud.net.cn/plugin?id=271
- *
- */
-
-// 主题颜色配置:如每个图表类型需要不同主题,请在对应图表类型上更改color属性
-const color = ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'];
-
-//事件转换函数,主要用作格式化x轴为时间轴,根据需求自行修改
-const formatDateTime = (timeStamp, returnType)=>{
- var date = new Date();
- date.setTime(timeStamp * 1000);
- var y = date.getFullYear();
- var m = date.getMonth() + 1;
- m = m < 10 ? ('0' + m) : m;
- var d = date.getDate();
- d = d < 10 ? ('0' + d) : d;
- var h = date.getHours();
- h = h < 10 ? ('0' + h) : h;
- var minute = date.getMinutes();
- var second = date.getSeconds();
- minute = minute < 10 ? ('0' + minute) : minute;
- second = second < 10 ? ('0' + second) : second;
- if(returnType == 'full'){return y + '-' + m + '-' + d + ' '+ h +':' + minute + ':' + second;}
- if(returnType == 'y-m-d'){return y + '-' + m + '-' + d;}
- if(returnType == 'h:m'){return h +':' + minute;}
- if(returnType == 'h:m:s'){return h +':' + minute +':' + second;}
- return [y, m, d, h, minute, second];
-}
-
-const cfu = {
- //demotype为自定义图表类型,一般不需要自定义图表类型,只需要改根节点上对应的类型即可
- "type":["pie","ring","rose","word","funnel","map","arcbar","line","column","mount","bar","area","radar","gauge","candle","mix","tline","tarea","scatter","bubble","demotype"],
- "range":["饼状图","圆环图","玫瑰图","词云图","漏斗图","地图","圆弧进度条","折线图","柱状图","山峰图","条状图","区域图","雷达图","仪表盘","K线图","混合图","时间轴折线","时间轴区域","散点图","气泡图","自定义类型"],
- //增加自定义图表类型,如果需要categories,请在这里加入您的图表类型,例如最后的"demotype"
- //自定义类型时需要注意"tline","tarea","scatter","bubble"等时间轴(矢量x轴)类图表,没有categories,不需要加入categories
- "categories":["line","column","mount","bar","area","radar","gauge","candle","mix","demotype"],
- //instance为实例变量承载属性,不要删除
- "instance":{},
- //option为opts及eopts承载属性,不要删除
- "option":{},
- //下面是自定义format配置,因除H5端外的其他端无法通过props传递函数,只能通过此属性对应下标的方式来替换
- "formatter":{
- "yAxisDemo1":function(val, index, opts){return val+'元'},
- "yAxisDemo2":function(val, index, opts){return val.toFixed(2)},
- "xAxisDemo1":function(val, index, opts){return val+'年';},
- "xAxisDemo2":function(val, index, opts){return formatDateTime(val,'h:m')},
- "seriesDemo1":function(val, index, series, opts){return val+'元'},
- "tooltipDemo1":function(item, category, index, opts){
- if(index==0){
- return '随便用'+item.data+'年'
- }else{
- return '其他我没改'+item.data+'天'
- }
- },
- "pieDemo":function(val, index, series, opts){
- if(index !== undefined){
- return series[index].name+':'+series[index].data+'元'
- }
- },
- },
- //这里演示了自定义您的图表类型的option,可以随意命名,之后在组件上 type="demotype" 后,组件会调用这个花括号里的option,如果组件上还存在opts参数,会将demotype与opts中option合并后渲染图表。
- "demotype":{
- //我这里把曲线图当做了自定义图表类型,您可以根据需要随意指定类型或配置
- "type": "line",
- "color": color,
- "padding": [15,10,0,15],
- "xAxis": {
- "disableGrid": true,
- },
- "yAxis": {
- "gridType": "dash",
- "dashLength": 2,
- },
- "legend": {
- },
- "extra": {
- "line": {
- "type": "curve",
- "width": 2
- },
- }
- },
- //下面是自定义配置,请添加项目所需的通用配置
- "pie":{
- "type": "pie",
- "color": color,
- "padding": [5,5,5,5],
- "extra": {
- "pie": {
- "activeOpacity": 0.5,
- "activeRadius": 10,
- "offsetAngle": 0,
- "labelWidth": 15,
- "border": true,
- "borderWidth": 3,
- "borderColor": "#FFFFFF"
- },
- }
- },
- "ring":{
- "type": "ring",
- "color": color,
- "padding": [5,5,5,5],
- "rotate": false,
- "dataLabel": true,
- "legend": {
- "show": true,
- "position": "right",
- "lineHeight": 25,
- },
- "title": {
- "name": "收益率",
- "fontSize": 15,
- "color": "#666666"
- },
- "subtitle": {
- "name": "70%",
- "fontSize": 25,
- "color": "#7cb5ec"
- },
- "extra": {
- "ring": {
- "ringWidth":30,
- "activeOpacity": 0.5,
- "activeRadius": 10,
- "offsetAngle": 0,
- "labelWidth": 15,
- "border": true,
- "borderWidth": 3,
- "borderColor": "#FFFFFF"
- },
- },
- },
- "rose":{
- "type": "rose",
- "color": color,
- "padding": [5,5,5,5],
- "legend": {
- "show": true,
- "position": "left",
- "lineHeight": 25,
- },
- "extra": {
- "rose": {
- "type": "area",
- "minRadius": 50,
- "activeOpacity": 0.5,
- "activeRadius": 10,
- "offsetAngle": 0,
- "labelWidth": 15,
- "border": false,
- "borderWidth": 2,
- "borderColor": "#FFFFFF"
- },
- }
- },
- "word":{
- "type": "word",
- "color": color,
- "extra": {
- "word": {
- "type": "normal",
- "autoColors": false
- }
- }
- },
- "funnel":{
- "type": "funnel",
- "color": color,
- "padding": [15,15,0,15],
- "extra": {
- "funnel": {
- "activeOpacity": 0.3,
- "activeWidth": 10,
- "border": true,
- "borderWidth": 2,
- "borderColor": "#FFFFFF",
- "fillOpacity": 1,
- "labelAlign": "right"
- },
- }
- },
- "map":{
- "type": "map",
- "color": color,
- "padding": [0,0,0,0],
- "dataLabel": true,
- "extra": {
- "map": {
- "border": true,
- "borderWidth": 1,
- "borderColor": "#666666",
- "fillOpacity": 0.6,
- "activeBorderColor": "#F04864",
- "activeFillColor": "#FACC14",
- "activeFillOpacity": 1
- },
- }
- },
- "arcbar":{
- "type": "arcbar",
- "color": color,
- "title": {
- "name": "百分比",
- "fontSize": 25,
- "color": "#00FF00"
- },
- "subtitle": {
- "name": "默认标题",
- "fontSize": 15,
- "color": "#666666"
- },
- "extra": {
- "arcbar": {
- "type": "default",
- "width": 12,
- "backgroundColor": "#E9E9E9",
- "startAngle": 0.75,
- "endAngle": 0.25,
- "gap": 2
- }
- }
- },
- "line":{
- "type": "line",
- "color": color,
- "padding": [15,10,0,15],
- "xAxis": {
- "disableGrid": true,
- },
- "yAxis": {
- "gridType": "dash",
- "dashLength": 2,
- },
- "legend": {
- },
- "extra": {
- "line": {
- "type": "straight",
- "width": 2,
- "activeType": "hollow"
- },
- }
- },
- "tline":{
- "type": "line",
- "color": color,
- "padding": [15,10,0,15],
- "xAxis": {
- "disableGrid": false,
- "boundaryGap":"justify",
- },
- "yAxis": {
- "gridType": "dash",
- "dashLength": 2,
- "data":[
- {
- "min":0,
- "max":80
- }
- ]
- },
- "legend": {
- },
- "extra": {
- "line": {
- "type": "curve",
- "width": 2,
- "activeType": "hollow"
- },
- }
- },
- "tarea":{
- "type": "area",
- "color": color,
- "padding": [15,10,0,15],
- "xAxis": {
- "disableGrid": true,
- "boundaryGap":"justify",
- },
- "yAxis": {
- "gridType": "dash",
- "dashLength": 2,
- "data":[
- {
- "min":0,
- "max":80
- }
- ]
- },
- "legend": {
- },
- "extra": {
- "area": {
- "type": "curve",
- "opacity": 0.2,
- "addLine": true,
- "width": 2,
- "gradient": true,
- "activeType": "hollow"
- },
- }
- },
- "column":{
- "type": "column",
- "color": color,
- "padding": [15,15,0,5],
- "xAxis": {
- "disableGrid": true,
- },
- "yAxis": {
- "data":[{"min":0}]
- },
- "legend": {
- },
- "extra": {
- "column": {
- "type": "group",
- "width": 30,
- "activeBgColor": "#000000",
- "activeBgOpacity": 0.08
- },
- }
- },
- "mount":{
- "type": "mount",
- "color": color,
- "padding": [15,15,0,5],
- "xAxis": {
- "disableGrid": true,
- },
- "yAxis": {
- "data":[{"min":0}]
- },
- "legend": {
- },
- "extra": {
- "mount": {
- "type": "mount",
- "widthRatio": 1.5,
- },
- }
- },
- "bar":{
- "type": "bar",
- "color": color,
- "padding": [15,30,0,5],
- "xAxis": {
- "boundaryGap":"justify",
- "disableGrid":false,
- "min":0,
- "axisLine":false
- },
- "yAxis": {
- },
- "legend": {
- },
- "extra": {
- "bar": {
- "type": "group",
- "width": 30,
- "meterBorde": 1,
- "meterFillColor": "#FFFFFF",
- "activeBgColor": "#000000",
- "activeBgOpacity": 0.08
- },
- }
- },
- "area":{
- "type": "area",
- "color": color,
- "padding": [15,15,0,15],
- "xAxis": {
- "disableGrid": true,
- },
- "yAxis": {
- "gridType": "dash",
- "dashLength": 2,
- },
- "legend": {
- },
- "extra": {
- "area": {
- "type": "straight",
- "opacity": 0.2,
- "addLine": true,
- "width": 2,
- "gradient": false,
- "activeType": "hollow"
- },
- }
- },
- "radar":{
- "type": "radar",
- "color": color,
- "padding": [5,5,5,5],
- "dataLabel": false,
- "legend": {
- "show": true,
- "position": "right",
- "lineHeight": 25,
- },
- "extra": {
- "radar": {
- "gridType": "radar",
- "gridColor": "#CCCCCC",
- "gridCount": 3,
- "opacity": 0.2,
- "max": 200,
- "labelShow": true
- },
- }
- },
- "gauge":{
- "type": "gauge",
- "color": color,
- "title": {
- "name": "66Km/H",
- "fontSize": 25,
- "color": "#2fc25b",
- "offsetY": 50
- },
- "subtitle": {
- "name": "实时速度",
- "fontSize": 15,
- "color": "#1890ff",
- "offsetY": -50
- },
- "extra": {
- "gauge": {
- "type": "default",
- "width": 30,
- "labelColor": "#666666",
- "startAngle": 0.75,
- "endAngle": 0.25,
- "startNumber": 0,
- "endNumber": 100,
- "labelFormat": "",
- "splitLine": {
- "fixRadius": 0,
- "splitNumber": 10,
- "width": 30,
- "color": "#FFFFFF",
- "childNumber": 5,
- "childWidth": 12
- },
- "pointer": {
- "width": 24,
- "color": "auto"
- }
- }
- }
- },
- "candle":{
- "type": "candle",
- "color": color,
- "padding": [15,15,0,15],
- "enableScroll": true,
- "enableMarkLine": true,
- "dataLabel": false,
- "xAxis": {
- "labelCount": 4,
- "itemCount": 40,
- "disableGrid": true,
- "gridColor": "#CCCCCC",
- "gridType": "solid",
- "dashLength": 4,
- "scrollShow": true,
- "scrollAlign": "left",
- "scrollColor": "#A6A6A6",
- "scrollBackgroundColor": "#EFEBEF"
- },
- "yAxis": {
- },
- "legend": {
- },
- "extra": {
- "candle": {
- "color": {
- "upLine": "#f04864",
- "upFill": "#f04864",
- "downLine": "#2fc25b",
- "downFill": "#2fc25b"
- },
- "average": {
- "show": true,
- "name": ["MA5","MA10","MA30"],
- "day": [5,10,20],
- "color": ["#1890ff","#2fc25b","#facc14"]
- }
- },
- "markLine": {
- "type": "dash",
- "dashLength": 5,
- "data": [
- {
- "value": 2150,
- "lineColor": "#f04864",
- "showLabel": true
- },
- {
- "value": 2350,
- "lineColor": "#f04864",
- "showLabel": true
- }
- ]
- }
- }
- },
- "mix":{
- "type": "mix",
- "color": color,
- "padding": [15,15,0,15],
- "xAxis": {
- "disableGrid": true,
- },
- "yAxis": {
- "disabled": false,
- "disableGrid": false,
- "splitNumber": 5,
- "gridType": "dash",
- "dashLength": 4,
- "gridColor": "#CCCCCC",
- "padding": 10,
- "showTitle": true,
- "data": []
- },
- "legend": {
- },
- "extra": {
- "mix": {
- "column": {
- "width": 20
- }
- },
- }
- },
- "scatter":{
- "type": "scatter",
- "color":color,
- "padding":[15,15,0,15],
- "dataLabel":false,
- "xAxis": {
- "disableGrid": false,
- "gridType":"dash",
- "splitNumber":5,
- "boundaryGap":"justify",
- "min":0
- },
- "yAxis": {
- "disableGrid": false,
- "gridType":"dash",
- },
- "legend": {
- },
- "extra": {
- "scatter": {
- },
- }
- },
- "bubble":{
- "type": "bubble",
- "color":color,
- "padding":[15,15,0,15],
- "xAxis": {
- "disableGrid": false,
- "gridType":"dash",
- "splitNumber":5,
- "boundaryGap":"justify",
- "min":0,
- "max":250
- },
- "yAxis": {
- "disableGrid": false,
- "gridType":"dash",
- "data":[{
- "min":0,
- "max":150
- }]
- },
- "legend": {
- },
- "extra": {
- "bubble": {
- "border":2,
- "opacity": 0.5,
- },
- }
- }
-}
-
-export default cfu;
\ No newline at end of file
diff --git a/yanzhu-ui-app/uni_modules/qiun-data-charts/js_sdk/u-charts/readme.md b/yanzhu-ui-app/uni_modules/qiun-data-charts/js_sdk/u-charts/readme.md
deleted file mode 100644
index d307ba39..00000000
--- a/yanzhu-ui-app/uni_modules/qiun-data-charts/js_sdk/u-charts/readme.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# uCharts JSSDK说明
-1、如不使用uCharts组件,可直接引用u-charts.js,打包编译后会`自动压缩`,压缩后体积约为`120kb`。
-2、如果120kb的体积仍需压缩,请手到uCharts官网通过在线定制选择您需要的图表。
-3、config-ucharts.js为uCharts组件的用户配置文件,升级前请`自行备份config-ucharts.js`文件,以免被强制覆盖。
-4、config-echarts.js为ECharts组件的用户配置文件,升级前请`自行备份config-echarts.js`文件,以免被强制覆盖。
\ No newline at end of file
diff --git a/yanzhu-ui-app/uni_modules/qiun-data-charts/js_sdk/u-charts/u-charts.js b/yanzhu-ui-app/uni_modules/qiun-data-charts/js_sdk/u-charts/u-charts.js
deleted file mode 100644
index f78bde5b..00000000
--- a/yanzhu-ui-app/uni_modules/qiun-data-charts/js_sdk/u-charts/u-charts.js
+++ /dev/null
@@ -1,7706 +0,0 @@
-/*
- * uCharts (R)
- * 高性能跨平台图表库,支持H5、APP、小程序(微信/支付宝/百度/头条/QQ/360/快手)、Vue、Taro等支持canvas的框架平台
- * Copyright (C) 2018-2022 QIUN (R) 秋云 https://www.ucharts.cn All rights reserved.
- * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
- * 复制使用请保留本段注释,感谢支持开源!
- *
- * uCharts (R) 官方网站
- * https://www.uCharts.cn
- *
- * 开源地址:
- * https://gitee.com/uCharts/uCharts
- *
- * uni-app插件市场地址:
- * http://ext.dcloud.net.cn/plugin?id=271
- *
- */
-
-'use strict';
-
-var config = {
- version: 'v2.5.0-20230101',
- yAxisWidth: 15,
- xAxisHeight: 22,
- padding: [10, 10, 10, 10],
- rotate: false,
- fontSize: 13,
- fontColor: '#666666',
- dataPointShape: ['circle', 'circle', 'circle', 'circle'],
- color: ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'],
- linearColor: ['#0EE2F8', '#2BDCA8', '#FA7D8D', '#EB88E2', '#2AE3A0', '#0EE2F8', '#EB88E2', '#6773E3', '#F78A85'],
- pieChartLinePadding: 15,
- pieChartTextPadding: 5,
- titleFontSize: 20,
- subtitleFontSize: 15,
- radarLabelTextMargin: 13,
-};
-
-var assign = function(target, ...varArgs) {
- if (target == null) {
- throw new TypeError('[uCharts] Cannot convert undefined or null to object');
- }
- if (!varArgs || varArgs.length <= 0) {
- return target;
- }
- // 深度合并对象
- function deepAssign(obj1, obj2) {
- for (let key in obj2) {
- obj1[key] = obj1[key] && obj1[key].toString() === "[object Object]" ?
- deepAssign(obj1[key], obj2[key]) : obj1[key] = obj2[key];
- }
- return obj1;
- }
- varArgs.forEach(val => {
- target = deepAssign(target, val);
- });
- return target;
-};
-
-var util = {
- toFixed: function toFixed(num, limit) {
- limit = limit || 2;
- if (this.isFloat(num)) {
- num = num.toFixed(limit);
- }
- return num;
- },
- isFloat: function isFloat(num) {
- return num % 1 !== 0;
- },
- approximatelyEqual: function approximatelyEqual(num1, num2) {
- return Math.abs(num1 - num2) < 1e-10;
- },
- isSameSign: function isSameSign(num1, num2) {
- return Math.abs(num1) === num1 && Math.abs(num2) === num2 || Math.abs(num1) !== num1 && Math.abs(num2) !== num2;
- },
- isSameXCoordinateArea: function isSameXCoordinateArea(p1, p2) {
- return this.isSameSign(p1.x, p2.x);
- },
- isCollision: function isCollision(obj1, obj2) {
- obj1.end = {};
- obj1.end.x = obj1.start.x + obj1.width;
- obj1.end.y = obj1.start.y - obj1.height;
- obj2.end = {};
- obj2.end.x = obj2.start.x + obj2.width;
- obj2.end.y = obj2.start.y - obj2.height;
- var flag = obj2.start.x > obj1.end.x || obj2.end.x < obj1.start.x || obj2.end.y > obj1.start.y || obj2.start.y < obj1.end.y;
- return !flag;
- }
-};
-
-//兼容H5点击事件
-function getH5Offset(e) {
- e.mp = {
- changedTouches: []
- };
- e.mp.changedTouches.push({
- x: e.offsetX,
- y: e.offsetY
- });
- return e;
-}
-
-// hex 转 rgba
-function hexToRgb(hexValue, opc) {
- var rgx = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
- var hex = hexValue.replace(rgx, function(m, r, g, b) {
- return r + r + g + g + b + b;
- });
- var rgb = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
- var r = parseInt(rgb[1], 16);
- var g = parseInt(rgb[2], 16);
- var b = parseInt(rgb[3], 16);
- return 'rgba(' + r + ',' + g + ',' + b + ',' + opc + ')';
-}
-
-function findRange(num, type, limit) {
- if (isNaN(num)) {
- throw new Error('[uCharts] series数据需为Number格式');
- }
- limit = limit || 10;
- type = type ? type : 'upper';
- var multiple = 1;
- while (limit < 1) {
- limit *= 10;
- multiple *= 10;
- }
- if (type === 'upper') {
- num = Math.ceil(num * multiple);
- } else {
- num = Math.floor(num * multiple);
- }
- while (num % limit !== 0) {
- if (type === 'upper') {
- if (num == num + 1) { //修复数据值过大num++无效的bug by 向日葵 @xrk_jy
- break;
- }
- num++;
- } else {
- num--;
- }
- }
- return num / multiple;
-}
-
-function calCandleMA(dayArr, nameArr, colorArr, kdata) {
- let seriesTemp = [];
- for (let k = 0; k < dayArr.length; k++) {
- let seriesItem = {
- data: [],
- name: nameArr[k],
- color: colorArr[k]
- };
- for (let i = 0, len = kdata.length; i < len; i++) {
- if (i < dayArr[k]) {
- seriesItem.data.push(null);
- continue;
- }
- let sum = 0;
- for (let j = 0; j < dayArr[k]; j++) {
- sum += kdata[i - j][1];
- }
- seriesItem.data.push(+(sum / dayArr[k]).toFixed(3));
- }
- seriesTemp.push(seriesItem);
- }
- return seriesTemp;
-}
-
-function calValidDistance(self, distance, chartData, config, opts) {
- var dataChartAreaWidth = opts.width - opts.area[1] - opts.area[3];
- var dataChartWidth = chartData.eachSpacing * (opts.chartData.xAxisData.xAxisPoints.length - 1);
- if(opts.type == 'mount' && opts.extra && opts.extra.mount && opts.extra.mount.widthRatio && opts.extra.mount.widthRatio > 1){
- if(opts.extra.mount.widthRatio>2) opts.extra.mount.widthRatio = 2
- dataChartWidth += (opts.extra.mount.widthRatio - 1)*chartData.eachSpacing;
- }
- var validDistance = distance;
- if (distance >= 0) {
- validDistance = 0;
- self.uevent.trigger('scrollLeft');
- self.scrollOption.position = 'left'
- opts.xAxis.scrollPosition = 'left';
- } else if (Math.abs(distance) >= dataChartWidth - dataChartAreaWidth) {
- validDistance = dataChartAreaWidth - dataChartWidth;
- self.uevent.trigger('scrollRight');
- self.scrollOption.position = 'right'
- opts.xAxis.scrollPosition = 'right';
- } else {
- self.scrollOption.position = distance
- opts.xAxis.scrollPosition = distance;
- }
- return validDistance;
-}
-
-function isInAngleRange(angle, startAngle, endAngle) {
- function adjust(angle) {
- while (angle < 0) {
- angle += 2 * Math.PI;
- }
- while (angle > 2 * Math.PI) {
- angle -= 2 * Math.PI;
- }
- return angle;
- }
- angle = adjust(angle);
- startAngle = adjust(startAngle);
- endAngle = adjust(endAngle);
- if (startAngle > endAngle) {
- endAngle += 2 * Math.PI;
- if (angle < startAngle) {
- angle += 2 * Math.PI;
- }
- }
- return angle >= startAngle && angle <= endAngle;
-}
-
-function createCurveControlPoints(points, i) {
- function isNotMiddlePoint(points, i) {
- if (points[i - 1] && points[i + 1]) {
- return points[i].y >= Math.max(points[i - 1].y, points[i + 1].y) || points[i].y <= Math.min(points[i - 1].y,
- points[i + 1].y);
- } else {
- return false;
- }
- }
- function isNotMiddlePointX(points, i) {
- if (points[i - 1] && points[i + 1]) {
- return points[i].x >= Math.max(points[i - 1].x, points[i + 1].x) || points[i].x <= Math.min(points[i - 1].x,
- points[i + 1].x);
- } else {
- return false;
- }
- }
- var a = 0.2;
- var b = 0.2;
- var pAx = null;
- var pAy = null;
- var pBx = null;
- var pBy = null;
- if (i < 1) {
- pAx = points[0].x + (points[1].x - points[0].x) * a;
- pAy = points[0].y + (points[1].y - points[0].y) * a;
- } else {
- pAx = points[i].x + (points[i + 1].x - points[i - 1].x) * a;
- pAy = points[i].y + (points[i + 1].y - points[i - 1].y) * a;
- }
-
- if (i > points.length - 3) {
- var last = points.length - 1;
- pBx = points[last].x - (points[last].x - points[last - 1].x) * b;
- pBy = points[last].y - (points[last].y - points[last - 1].y) * b;
- } else {
- pBx = points[i + 1].x - (points[i + 2].x - points[i].x) * b;
- pBy = points[i + 1].y - (points[i + 2].y - points[i].y) * b;
- }
- if (isNotMiddlePoint(points, i + 1)) {
- pBy = points[i + 1].y;
- }
- if (isNotMiddlePoint(points, i)) {
- pAy = points[i].y;
- }
- if (isNotMiddlePointX(points, i + 1)) {
- pBx = points[i + 1].x;
- }
- if (isNotMiddlePointX(points, i)) {
- pAx = points[i].x;
- }
- if (pAy >= Math.max(points[i].y, points[i + 1].y) || pAy <= Math.min(points[i].y, points[i + 1].y)) {
- pAy = points[i].y;
- }
- if (pBy >= Math.max(points[i].y, points[i + 1].y) || pBy <= Math.min(points[i].y, points[i + 1].y)) {
- pBy = points[i + 1].y;
- }
- if (pAx >= Math.max(points[i].x, points[i + 1].x) || pAx <= Math.min(points[i].x, points[i + 1].x)) {
- pAx = points[i].x;
- }
- if (pBx >= Math.max(points[i].x, points[i + 1].x) || pBx <= Math.min(points[i].x, points[i + 1].x)) {
- pBx = points[i + 1].x;
- }
- return {
- ctrA: {
- x: pAx,
- y: pAy
- },
- ctrB: {
- x: pBx,
- y: pBy
- }
- };
-}
-
-
-function convertCoordinateOrigin(x, y, center) {
- return {
- x: center.x + x,
- y: center.y - y
- };
-}
-
-function avoidCollision(obj, target) {
- if (target) {
- // is collision test
- while (util.isCollision(obj, target)) {
- if (obj.start.x > 0) {
- obj.start.y--;
- } else if (obj.start.x < 0) {
- obj.start.y++;
- } else {
- if (obj.start.y > 0) {
- obj.start.y++;
- } else {
- obj.start.y--;
- }
- }
- }
- }
- return obj;
-}
-
-function fixPieSeries(series, opts, config){
- let pieSeriesArr = [];
- if(series.length>0 && series[0].data.constructor.toString().indexOf('Array') > -1){
- opts._pieSeries_ = series;
- let oldseries = series[0].data;
- for (var i = 0; i < oldseries.length; i++) {
- oldseries[i].formatter = series[0].formatter;
- oldseries[i].data = oldseries[i].value;
- pieSeriesArr.push(oldseries[i]);
- }
- opts.series = pieSeriesArr;
- }else{
- pieSeriesArr = series;
- }
- return pieSeriesArr;
-}
-
-function fillSeries(series, opts, config) {
- var index = 0;
- for (var i = 0; i < series.length; i++) {
- let item = series[i];
- if (!item.color) {
- item.color = config.color[index];
- index = (index + 1) % config.color.length;
- }
- if (!item.linearIndex) {
- item.linearIndex = i;
- }
- if (!item.index) {
- item.index = 0;
- }
- if (!item.type) {
- item.type = opts.type;
- }
- if (typeof item.show == "undefined") {
- item.show = true;
- }
- if (!item.type) {
- item.type = opts.type;
- }
- if (!item.pointShape) {
- item.pointShape = "circle";
- }
- if (!item.legendShape) {
- switch (item.type) {
- case 'line':
- item.legendShape = "line";
- break;
- case 'column':
- case 'bar':
- item.legendShape = "rect";
- break;
- case 'area':
- case 'mount':
- item.legendShape = "triangle";
- break;
- default:
- item.legendShape = "circle";
- }
- }
- }
- return series;
-}
-
-function fillCustomColor(linearType, customColor, series, config) {
- var newcolor = customColor || [];
- if (linearType == 'custom' && newcolor.length == 0 ) {
- newcolor = config.linearColor;
- }
- if (linearType == 'custom' && newcolor.length < series.length) {
- let chazhi = series.length - newcolor.length;
- for (var i = 0; i < chazhi; i++) {
- newcolor.push(config.linearColor[(i + 1) % config.linearColor.length]);
- }
- }
- return newcolor;
-}
-
-function getDataRange(minData, maxData) {
- var limit = 0;
- var range = maxData - minData;
- if (range >= 10000) {
- limit = 1000;
- } else if (range >= 1000) {
- limit = 100;
- } else if (range >= 100) {
- limit = 10;
- } else if (range >= 10) {
- limit = 5;
- } else if (range >= 1) {
- limit = 1;
- } else if (range >= 0.1) {
- limit = 0.1;
- } else if (range >= 0.01) {
- limit = 0.01;
- } else if (range >= 0.001) {
- limit = 0.001;
- } else if (range >= 0.0001) {
- limit = 0.0001;
- } else if (range >= 0.00001) {
- limit = 0.00001;
- } else {
- limit = 0.000001;
- }
- return {
- minRange: findRange(minData, 'lower', limit),
- maxRange: findRange(maxData, 'upper', limit)
- };
-}
-
-function measureText(text, fontSize, context) {
- var width = 0;
- text = String(text);
- // #ifdef MP-ALIPAY || MP-BAIDU || APP-NVUE
- context = false;
- // #endif
- if (context !== false && context !== undefined && context.setFontSize && context.measureText) {
- context.setFontSize(fontSize);
- return context.measureText(text).width;
- } else {
- var text = text.split('');
- for (let i = 0; i < text.length; i++) {
- let item = text[i];
- if (/[a-zA-Z]/.test(item)) {
- width += 7;
- } else if (/[0-9]/.test(item)) {
- width += 5.5;
- } else if (/\./.test(item)) {
- width += 2.7;
- } else if (/-/.test(item)) {
- width += 3.25;
- } else if (/:/.test(item)) {
- width += 2.5;
- } else if (/[\u4e00-\u9fa5]/.test(item)) {
- width += 10;
- } else if (/\(|\)/.test(item)) {
- width += 3.73;
- } else if (/\s/.test(item)) {
- width += 2.5;
- } else if (/%/.test(item)) {
- width += 8;
- } else {
- width += 10;
- }
- }
- return width * fontSize / 10;
- }
-}
-
-function dataCombine(series) {
- return series.reduce(function(a, b) {
- return (a.data ? a.data : a).concat(b.data);
- }, []);
-}
-
-function dataCombineStack(series, len) {
- var sum = new Array(len);
- for (var j = 0; j < sum.length; j++) {
- sum[j] = 0;
- }
- for (var i = 0; i < series.length; i++) {
- for (var j = 0; j < sum.length; j++) {
- sum[j] += series[i].data[j];
- }
- }
- return series.reduce(function(a, b) {
- return (a.data ? a.data : a).concat(b.data).concat(sum);
- }, []);
-}
-
-function getTouches(touches, opts, e) {
- let x, y;
- if (touches.clientX) {
- if (opts.rotate) {
- y = opts.height - touches.clientX * opts.pix;
- x = (touches.pageY - e.currentTarget.offsetTop - (opts.height / opts.pix / 2) * (opts.pix - 1)) * opts.pix;
- } else {
- x = touches.clientX * opts.pix;
- y = (touches.pageY - e.currentTarget.offsetTop - (opts.height / opts.pix / 2) * (opts.pix - 1)) * opts.pix;
- }
- } else {
- if (opts.rotate) {
- y = opts.height - touches.x * opts.pix;
- x = touches.y * opts.pix;
- } else {
- x = touches.x * opts.pix;
- y = touches.y * opts.pix;
- }
- }
- return {
- x: x,
- y: y
- }
-}
-
-function getSeriesDataItem(series, index, group) {
- var data = [];
- var newSeries = [];
- var indexIsArr = index.constructor.toString().indexOf('Array') > -1;
- if(indexIsArr){
- let tempSeries = filterSeries(series);
- for (var i = 0; i < group.length; i++) {
- newSeries.push(tempSeries[group[i]]);
- }
- }else{
- newSeries = series;
- };
- for (let i = 0; i < newSeries.length; i++) {
- let item = newSeries[i];
- let tmpindex = -1;
- if(indexIsArr){
- tmpindex = index[i];
- }else{
- tmpindex = index;
- }
- if (item.data[tmpindex] !== null && typeof item.data[tmpindex] !== 'undefined' && item.show) {
- let seriesItem = {};
- seriesItem.color = item.color;
- seriesItem.type = item.type;
- seriesItem.style = item.style;
- seriesItem.pointShape = item.pointShape;
- seriesItem.disableLegend = item.disableLegend;
- seriesItem.legendShape = item.legendShape;
- seriesItem.name = item.name;
- seriesItem.show = item.show;
- seriesItem.data = item.formatter ? item.formatter(item.data[tmpindex]) : item.data[tmpindex];
- data.push(seriesItem);
- }
- }
- return data;
-}
-
-function getMaxTextListLength(list, fontSize, context) {
- var lengthList = list.map(function(item) {
- return measureText(item, fontSize, context);
- });
- return Math.max.apply(null, lengthList);
-}
-
-function getRadarCoordinateSeries(length) {
- var eachAngle = 2 * Math.PI / length;
- var CoordinateSeries = [];
- for (var i = 0; i < length; i++) {
- CoordinateSeries.push(eachAngle * i);
- }
- return CoordinateSeries.map(function(item) {
- return -1 * item + Math.PI / 2;
- });
-}
-
-function getToolTipData(seriesData, opts, index, group, categories) {
- var option = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
- var calPoints = opts.chartData.calPoints?opts.chartData.calPoints:[];
- let points = {};
- if(group.length > 0){
- let filterPoints = [];
- for (let i = 0; i < group.length; i++) {
- filterPoints.push(calPoints[group[i]])
- }
- points = filterPoints[0][index[0]];
- }else{
- for (let i = 0; i < calPoints.length; i++) {
- if(calPoints[i][index]){
- points = calPoints[i][index];
- break;
- }
- }
- };
- var textList = seriesData.map(function(item) {
- let titleText = null;
- if (opts.categories && opts.categories.length>0) {
- titleText = categories[index];
- };
- return {
- text: option.formatter ? option.formatter(item, titleText, index, opts) : item.name + ': ' + item.data,
- color: item.color,
- legendShape: opts.extra.tooltip.legendShape == 'auto'? item.legendShape : opts.extra.tooltip.legendShape
- };
- });
- var offset = {
- x: Math.round(points.x),
- y: Math.round(points.y)
- };
- return {
- textList: textList,
- offset: offset
- };
-}
-
-function getMixToolTipData(seriesData, opts, index, categories) {
- var option = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
- var points = opts.chartData.xAxisPoints[index] + opts.chartData.eachSpacing / 2;
- var textList = seriesData.map(function(item) {
- return {
- text: option.formatter ? option.formatter(item, categories[index], index, opts) : item.name + ': ' + item.data,
- color: item.color,
- disableLegend: item.disableLegend ? true : false,
- legendShape: opts.extra.tooltip.legendShape == 'auto'? item.legendShape : opts.extra.tooltip.legendShape
- };
- });
- textList = textList.filter(function(item) {
- if (item.disableLegend !== true) {
- return item;
- }
- });
- var offset = {
- x: Math.round(points),
- y: 0
- };
- return {
- textList: textList,
- offset: offset
- };
-}
-
-function getCandleToolTipData(series, seriesData, opts, index, categories, extra) {
- var option = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : {};
- var calPoints = opts.chartData.calPoints;
- let upColor = extra.color.upFill;
- let downColor = extra.color.downFill;
- //颜色顺序为开盘,收盘,最低,最高
- let color = [upColor, upColor, downColor, upColor];
- var textList = [];
- seriesData.map(function(item) {
- if (index == 0) {
- if (item.data[1] - item.data[0] < 0) {
- color[1] = downColor;
- } else {
- color[1] = upColor;
- }
- } else {
- if (item.data[0] < series[index - 1][1]) {
- color[0] = downColor;
- }
- if (item.data[1] < item.data[0]) {
- color[1] = downColor;
- }
- if (item.data[2] > series[index - 1][1]) {
- color[2] = upColor;
- }
- if (item.data[3] < series[index - 1][1]) {
- color[3] = downColor;
- }
- }
- let text1 = {
- text: '开盘:' + item.data[0],
- color: color[0],
- legendShape: opts.extra.tooltip.legendShape == 'auto'? item.legendShape : opts.extra.tooltip.legendShape
- };
- let text2 = {
- text: '收盘:' + item.data[1],
- color: color[1],
- legendShape: opts.extra.tooltip.legendShape == 'auto'? item.legendShape : opts.extra.tooltip.legendShape
- };
- let text3 = {
- text: '最低:' + item.data[2],
- color: color[2],
- legendShape: opts.extra.tooltip.legendShape == 'auto'? item.legendShape : opts.extra.tooltip.legendShape
- };
- let text4 = {
- text: '最高:' + item.data[3],
- color: color[3],
- legendShape: opts.extra.tooltip.legendShape == 'auto'? item.legendShape : opts.extra.tooltip.legendShape
- };
- textList.push(text1, text2, text3, text4);
- });
- var validCalPoints = [];
- var offset = {
- x: 0,
- y: 0
- };
- for (let i = 0; i < calPoints.length; i++) {
- let points = calPoints[i];
- if (typeof points[index] !== 'undefined' && points[index] !== null) {
- validCalPoints.push(points[index]);
- }
- }
- offset.x = Math.round(validCalPoints[0][0].x);
- return {
- textList: textList,
- offset: offset
- };
-}
-
-function filterSeries(series) {
- let tempSeries = [];
- for (let i = 0; i < series.length; i++) {
- if (series[i].show == true) {
- tempSeries.push(series[i])
- }
- }
- return tempSeries;
-}
-
-function findCurrentIndex(currentPoints, calPoints, opts, config) {
- var offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
- var current={ index:-1, group:[] };
- var spacing = opts.chartData.eachSpacing / 2;
- let xAxisPoints = [];
- if (calPoints && calPoints.length > 0) {
- if (!opts.categories) {
- spacing = 0;
- }else{
- for (let i = 1; i < opts.chartData.xAxisPoints.length; i++) {
- xAxisPoints.push(opts.chartData.xAxisPoints[i] - spacing);
- }
- if ((opts.type == 'line' || opts.type == 'area') && opts.xAxis.boundaryGap == 'justify') {
- xAxisPoints = opts.chartData.xAxisPoints;
- }
- }
- if (isInExactChartArea(currentPoints, opts, config)) {
- if (!opts.categories) {
- let timePoints = Array(calPoints.length);
- for (let i = 0; i < calPoints.length; i++) {
- timePoints[i] = Array(calPoints[i].length)
- for (let j = 0; j < calPoints[i].length; j++) {
- timePoints[i][j] = (Math.abs(calPoints[i][j].x - currentPoints.x));
- }
- };
- let pointValue = Array(timePoints.length);
- let pointIndex = Array(timePoints.length);
- for (let i = 0; i < timePoints.length; i++) {
- pointValue[i] = Math.min.apply(null, timePoints[i]);
- pointIndex[i] = timePoints[i].indexOf(pointValue[i]);
- }
- let minValue = Math.min.apply(null, pointValue);
- current.index = [];
- for (let i = 0; i < pointValue.length; i++) {
- if(pointValue[i] == minValue){
- current.group.push(i);
- current.index.push(pointIndex[i]);
- }
- };
- }else{
- xAxisPoints.forEach(function(item, index) {
- if (currentPoints.x + offset + spacing > item) {
- current.index = index;
- }
- });
- }
- }
- }
- return current;
-}
-
-function findBarChartCurrentIndex(currentPoints, calPoints, opts, config) {
- var offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
- var current={ index:-1, group:[] };
- var spacing = opts.chartData.eachSpacing / 2;
- let yAxisPoints = opts.chartData.yAxisPoints;
- if (calPoints && calPoints.length > 0) {
- if (isInExactChartArea(currentPoints, opts, config)) {
- yAxisPoints.forEach(function(item, index) {
- if (currentPoints.y + offset + spacing > item) {
- current.index = index;
- }
- });
- }
- }
- return current;
-}
-
-function findLegendIndex(currentPoints, legendData, opts) {
- let currentIndex = -1;
- let gap = 0;
- if (isInExactLegendArea(currentPoints, legendData.area)) {
- let points = legendData.points;
- let index = -1;
- for (let i = 0, len = points.length; i < len; i++) {
- let item = points[i];
- for (let j = 0; j < item.length; j++) {
- index += 1;
- let area = item[j]['area'];
- if (area && currentPoints.x > area[0] - gap && currentPoints.x < area[2] + gap && currentPoints.y > area[1] - gap && currentPoints.y < area[3] + gap) {
- currentIndex = index;
- break;
- }
- }
- }
- return currentIndex;
- }
- return currentIndex;
-}
-
-function isInExactLegendArea(currentPoints, area) {
- return currentPoints.x > area.start.x && currentPoints.x < area.end.x && currentPoints.y > area.start.y && currentPoints.y < area.end.y;
-}
-
-function isInExactChartArea(currentPoints, opts, config) {
- return currentPoints.x <= opts.width - opts.area[1] + 10 && currentPoints.x >= opts.area[3] - 10 && currentPoints.y >= opts.area[0] && currentPoints.y <= opts.height - opts.area[2];
-}
-
-function findRadarChartCurrentIndex(currentPoints, radarData, count) {
- var eachAngleArea = 2 * Math.PI / count;
- var currentIndex = -1;
- if (isInExactPieChartArea(currentPoints, radarData.center, radarData.radius)) {
- var fixAngle = function fixAngle(angle) {
- if (angle < 0) {
- angle += 2 * Math.PI;
- }
- if (angle > 2 * Math.PI) {
- angle -= 2 * Math.PI;
- }
- return angle;
- };
- var angle = Math.atan2(radarData.center.y - currentPoints.y, currentPoints.x - radarData.center.x);
- angle = -1 * angle;
- if (angle < 0) {
- angle += 2 * Math.PI;
- }
- var angleList = radarData.angleList.map(function(item) {
- item = fixAngle(-1 * item);
- return item;
- });
- angleList.forEach(function(item, index) {
- var rangeStart = fixAngle(item - eachAngleArea / 2);
- var rangeEnd = fixAngle(item + eachAngleArea / 2);
- if (rangeEnd < rangeStart) {
- rangeEnd += 2 * Math.PI;
- }
- if (angle >= rangeStart && angle <= rangeEnd || angle + 2 * Math.PI >= rangeStart && angle + 2 * Math.PI <= rangeEnd) {
- currentIndex = index;
- }
- });
- }
- return currentIndex;
-}
-
-function findFunnelChartCurrentIndex(currentPoints, funnelData) {
- var currentIndex = -1;
- for (var i = 0, len = funnelData.series.length; i < len; i++) {
- var item = funnelData.series[i];
- if (currentPoints.x > item.funnelArea[0] && currentPoints.x < item.funnelArea[2] && currentPoints.y > item.funnelArea[1] && currentPoints.y < item.funnelArea[3]) {
- currentIndex = i;
- break;
- }
- }
- return currentIndex;
-}
-
-function findWordChartCurrentIndex(currentPoints, wordData) {
- var currentIndex = -1;
- for (var i = 0, len = wordData.length; i < len; i++) {
- var item = wordData[i];
- if (currentPoints.x > item.area[0] && currentPoints.x < item.area[2] && currentPoints.y > item.area[1] && currentPoints.y < item.area[3]) {
- currentIndex = i;
- break;
- }
- }
- return currentIndex;
-}
-
-function findMapChartCurrentIndex(currentPoints, opts) {
- var currentIndex = -1;
- var cData = opts.chartData.mapData;
- var data = opts.series;
- var tmp = pointToCoordinate(currentPoints.y, currentPoints.x, cData.bounds, cData.scale, cData.xoffset, cData.yoffset);
- var poi = [tmp.x, tmp.y];
- for (var i = 0, len = data.length; i < len; i++) {
- var item = data[i].geometry.coordinates;
- if (isPoiWithinPoly(poi, item, opts.chartData.mapData.mercator)) {
- currentIndex = i;
- break;
- }
- }
- return currentIndex;
-}
-
-function findRoseChartCurrentIndex(currentPoints, pieData, opts) {
- var currentIndex = -1;
- var series = getRoseDataPoints(opts._series_, opts.extra.rose.type, pieData.radius, pieData.radius);
- if (pieData && pieData.center && isInExactPieChartArea(currentPoints, pieData.center, pieData.radius)) {
- var angle = Math.atan2(pieData.center.y - currentPoints.y, currentPoints.x - pieData.center.x);
- angle = -angle;
- if(opts.extra.rose && opts.extra.rose.offsetAngle){
- angle = angle - opts.extra.rose.offsetAngle * Math.PI / 180;
- }
- for (var i = 0, len = series.length; i < len; i++) {
- if (isInAngleRange(angle, series[i]._start_, series[i]._start_ + series[i]._rose_proportion_ * 2 * Math.PI)) {
- currentIndex = i;
- break;
- }
- }
- }
- return currentIndex;
-}
-
-function findPieChartCurrentIndex(currentPoints, pieData, opts) {
- var currentIndex = -1;
- var series = getPieDataPoints(pieData.series);
- if (pieData && pieData.center && isInExactPieChartArea(currentPoints, pieData.center, pieData.radius)) {
- var angle = Math.atan2(pieData.center.y - currentPoints.y, currentPoints.x - pieData.center.x);
- angle = -angle;
- if(opts.extra.pie && opts.extra.pie.offsetAngle){
- angle = angle - opts.extra.pie.offsetAngle * Math.PI / 180;
- }
- if(opts.extra.ring && opts.extra.ring.offsetAngle){
- angle = angle - opts.extra.ring.offsetAngle * Math.PI / 180;
- }
- for (var i = 0, len = series.length; i < len; i++) {
- if (isInAngleRange(angle, series[i]._start_, series[i]._start_ + series[i]._proportion_ * 2 * Math.PI)) {
- currentIndex = i;
- break;
- }
- }
- }
- return currentIndex;
-}
-
-function isInExactPieChartArea(currentPoints, center, radius) {
- return Math.pow(currentPoints.x - center.x, 2) + Math.pow(currentPoints.y - center.y, 2) <= Math.pow(radius, 2);
-}
-
-
-function splitPoints(points,eachSeries) {
- var newPoints = [];
- var items = [];
- points.forEach(function(item, index) {
- if(eachSeries.connectNulls){
- if (item !== null) {
- items.push(item);
- }
- }else{
- if (item !== null) {
- items.push(item);
- } else {
- if (items.length) {
- newPoints.push(items);
- }
- items = [];
- }
- }
-
- });
- if (items.length) {
- newPoints.push(items);
- }
- return newPoints;
-}
-
-
-function calLegendData(series, opts, config, chartData, context) {
- let legendData = {
- area: {
- start: {
- x: 0,
- y: 0
- },
- end: {
- x: 0,
- y: 0
- },
- width: 0,
- height: 0,
- wholeWidth: 0,
- wholeHeight: 0
- },
- points: [],
- widthArr: [],
- heightArr: []
- };
- if (opts.legend.show === false) {
- chartData.legendData = legendData;
- return legendData;
- }
- let padding = opts.legend.padding * opts.pix;
- let margin = opts.legend.margin * opts.pix;
- let fontSize = opts.legend.fontSize ? opts.legend.fontSize * opts.pix : config.fontSize;
- let shapeWidth = 15 * opts.pix;
- let shapeRight = 5 * opts.pix;
- let lineHeight = Math.max(opts.legend.lineHeight * opts.pix, fontSize);
- if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
- let legendList = [];
- let widthCount = 0;
- let widthCountArr = [];
- let currentRow = [];
- for (let i = 0; i < series.length; i++) {
- let item = series[i];
- const legendText = item.legendText ? item.legendText : item.name;
- let itemWidth = shapeWidth + shapeRight + measureText(legendText || 'undefined', fontSize, context) + opts.legend.itemGap * opts.pix;
- if (widthCount + itemWidth > opts.width - opts.area[1] - opts.area[3]) {
- legendList.push(currentRow);
- widthCountArr.push(widthCount - opts.legend.itemGap * opts.pix);
- widthCount = itemWidth;
- currentRow = [item];
- } else {
- widthCount += itemWidth;
- currentRow.push(item);
- }
- }
- if (currentRow.length) {
- legendList.push(currentRow);
- widthCountArr.push(widthCount - opts.legend.itemGap * opts.pix);
- legendData.widthArr = widthCountArr;
- let legendWidth = Math.max.apply(null, widthCountArr);
- switch (opts.legend.float) {
- case 'left':
- legendData.area.start.x = opts.area[3];
- legendData.area.end.x = opts.area[3] + legendWidth + 2 * padding;
- break;
- case 'right':
- legendData.area.start.x = opts.width - opts.area[1] - legendWidth - 2 * padding;
- legendData.area.end.x = opts.width - opts.area[1];
- break;
- default:
- legendData.area.start.x = (opts.width - legendWidth) / 2 - padding;
- legendData.area.end.x = (opts.width + legendWidth) / 2 + padding;
- }
- legendData.area.width = legendWidth + 2 * padding;
- legendData.area.wholeWidth = legendWidth + 2 * padding;
- legendData.area.height = legendList.length * lineHeight + 2 * padding;
- legendData.area.wholeHeight = legendList.length * lineHeight + 2 * padding + 2 * margin;
- legendData.points = legendList;
- }
- } else {
- let len = series.length;
- let maxHeight = opts.height - opts.area[0] - opts.area[2] - 2 * margin - 2 * padding;
- let maxLength = Math.min(Math.floor(maxHeight / lineHeight), len);
- legendData.area.height = maxLength * lineHeight + padding * 2;
- legendData.area.wholeHeight = maxLength * lineHeight + padding * 2;
- switch (opts.legend.float) {
- case 'top':
- legendData.area.start.y = opts.area[0] + margin;
- legendData.area.end.y = opts.area[0] + margin + legendData.area.height;
- break;
- case 'bottom':
- legendData.area.start.y = opts.height - opts.area[2] - margin - legendData.area.height;
- legendData.area.end.y = opts.height - opts.area[2] - margin;
- break;
- default:
- legendData.area.start.y = (opts.height - legendData.area.height) / 2;
- legendData.area.end.y = (opts.height + legendData.area.height) / 2;
- }
- let lineNum = len % maxLength === 0 ? len / maxLength : Math.floor((len / maxLength) + 1);
- let currentRow = [];
- for (let i = 0; i < lineNum; i++) {
- let temp = series.slice(i * maxLength, i * maxLength + maxLength);
- currentRow.push(temp);
- }
- legendData.points = currentRow;
- if (currentRow.length) {
- for (let i = 0; i < currentRow.length; i++) {
- let item = currentRow[i];
- let maxWidth = 0;
- for (let j = 0; j < item.length; j++) {
- let itemWidth = shapeWidth + shapeRight + measureText(item[j].name || 'undefined', fontSize, context) + opts.legend.itemGap * opts.pix;
- if (itemWidth > maxWidth) {
- maxWidth = itemWidth;
- }
- }
- legendData.widthArr.push(maxWidth);
- legendData.heightArr.push(item.length * lineHeight + padding * 2);
- }
- let legendWidth = 0
- for (let i = 0; i < legendData.widthArr.length; i++) {
- legendWidth += legendData.widthArr[i];
- }
- legendData.area.width = legendWidth - opts.legend.itemGap * opts.pix + 2 * padding;
- legendData.area.wholeWidth = legendData.area.width + padding;
- }
- }
- switch (opts.legend.position) {
- case 'top':
- legendData.area.start.y = opts.area[0] + margin;
- legendData.area.end.y = opts.area[0] + margin + legendData.area.height;
- break;
- case 'bottom':
- legendData.area.start.y = opts.height - opts.area[2] - legendData.area.height - margin;
- legendData.area.end.y = opts.height - opts.area[2] - margin;
- break;
- case 'left':
- legendData.area.start.x = opts.area[3];
- legendData.area.end.x = opts.area[3] + legendData.area.width;
- break;
- case 'right':
- legendData.area.start.x = opts.width - opts.area[1] - legendData.area.width;
- legendData.area.end.x = opts.width - opts.area[1];
- break;
- }
- chartData.legendData = legendData;
- return legendData;
-}
-
-function calCategoriesData(categories, opts, config, eachSpacing, context) {
- var result = {
- angle: 0,
- xAxisHeight: opts.xAxis.lineHeight * opts.pix + opts.xAxis.marginTop * opts.pix
- };
- var fontSize = opts.xAxis.fontSize * opts.pix;
- var categoriesTextLenth = categories.map(function(item,index) {
- var xitem = opts.xAxis.formatter ? opts.xAxis.formatter(item,index,opts) : item;
- return measureText(String(xitem), fontSize, context);
- });
- var maxTextLength = Math.max.apply(this, categoriesTextLenth);
- if (opts.xAxis.rotateLabel == true) {
- result.angle = opts.xAxis.rotateAngle * Math.PI / 180;
- let tempHeight = opts.xAxis.marginTop * opts.pix * 2 + Math.abs(maxTextLength * Math.sin(result.angle))
- tempHeight = tempHeight < fontSize + opts.xAxis.marginTop * opts.pix * 2 ? tempHeight + opts.xAxis.marginTop * opts.pix * 2 : tempHeight;
- result.xAxisHeight = tempHeight;
- }
- if (opts.enableScroll && opts.xAxis.scrollShow) {
- result.xAxisHeight += 6 * opts.pix;
- }
- if (opts.xAxis.disabled){
- result.xAxisHeight = 0;
- }
- return result;
-}
-
-function getXAxisTextList(series, opts, config, stack) {
- var index = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : -1;
- var data;
- if (stack == 'stack') {
- data = dataCombineStack(series, opts.categories.length);
- } else {
- data = dataCombine(series);
- }
- var sorted = [];
- // remove null from data
- data = data.filter(function(item) {
- //return item !== null;
- if (typeof item === 'object' && item !== null) {
- if (item.constructor.toString().indexOf('Array') > -1) {
- return item !== null;
- } else {
- return item.value !== null;
- }
- } else {
- return item !== null;
- }
- });
- data.map(function(item) {
- if (typeof item === 'object') {
- if (item.constructor.toString().indexOf('Array') > -1) {
- if (opts.type == 'candle') {
- item.map(function(subitem) {
- sorted.push(subitem);
- })
- } else {
- sorted.push(item[0]);
- }
- } else {
- sorted.push(item.value);
- }
- } else {
- sorted.push(item);
- }
- })
-
- var minData = 0;
- var maxData = 0;
- if (sorted.length > 0) {
- minData = Math.min.apply(this, sorted);
- maxData = Math.max.apply(this, sorted);
- }
- //为了兼容v1.9.0之前的项目
- if (index > -1) {
- if (typeof opts.xAxis.data[index].min === 'number') {
- minData = Math.min(opts.xAxis.data[index].min, minData);
- }
- if (typeof opts.xAxis.data[index].max === 'number') {
- maxData = Math.max(opts.xAxis.data[index].max, maxData);
- }
- } else {
- if (typeof opts.xAxis.min === 'number') {
- minData = Math.min(opts.xAxis.min, minData);
- }
- if (typeof opts.xAxis.max === 'number') {
- maxData = Math.max(opts.xAxis.max, maxData);
- }
- }
- if (minData === maxData) {
- var rangeSpan = maxData || 10;
- maxData += rangeSpan;
- }
- //var dataRange = getDataRange(minData, maxData);
- var minRange = minData;
- var maxRange = maxData;
- var range = [];
- var eachRange = (maxRange - minRange) / opts.xAxis.splitNumber;
- for (var i = 0; i <= opts.xAxis.splitNumber; i++) {
- range.push(minRange + eachRange * i);
- }
- return range;
-}
-
-function calXAxisData(series, opts, config, context) {
- //堆叠图重算Y轴
- var columnstyle = assign({}, {
- type: ""
- }, opts.extra.bar);
- var result = {
- angle: 0,
- xAxisHeight: opts.xAxis.lineHeight * opts.pix + opts.xAxis.marginTop * opts.pix
- };
- result.ranges = getXAxisTextList(series, opts, config, columnstyle.type);
- result.rangesFormat = result.ranges.map(function(item) {
- //item = opts.xAxis.formatter ? opts.xAxis.formatter(item) : util.toFixed(item, 2);
- item = util.toFixed(item, 2);
- return item;
- });
- var xAxisScaleValues = result.ranges.map(function(item) {
- // 如果刻度值是浮点数,则保留两位小数
- item = util.toFixed(item, 2);
- // 若有自定义格式则调用自定义的格式化函数
- //item = opts.xAxis.formatter ? opts.xAxis.formatter(Number(item)) : item;
- return item;
- });
- result = Object.assign(result, getXAxisPoints(xAxisScaleValues, opts, config));
- // 计算X轴刻度的属性譬如每个刻度的间隔,刻度的起始点\结束点以及总长
- var eachSpacing = result.eachSpacing;
- var textLength = xAxisScaleValues.map(function(item) {
- return measureText(item, opts.xAxis.fontSize * opts.pix, context);
- });
- if (opts.xAxis.disabled === true) {
- result.xAxisHeight = 0;
- }
- return result;
-}
-
-function getRadarDataPoints(angleList, center, radius, series, opts) {
- var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
- var radarOption = opts.extra.radar || {};
- radarOption.max = radarOption.max || 0;
- var maxData = Math.max(radarOption.max, Math.max.apply(null, dataCombine(series)));
- var data = [];
- for (let i = 0; i < series.length; i++) {
- let each = series[i];
- let listItem = {};
- listItem.color = each.color;
- listItem.legendShape = each.legendShape;
- listItem.pointShape = each.pointShape;
- listItem.data = [];
- each.data.forEach(function(item, index) {
- let tmp = {};
- tmp.angle = angleList[index];
- tmp.proportion = item / maxData;
- tmp.value = item;
- tmp.position = convertCoordinateOrigin(radius * tmp.proportion * process * Math.cos(tmp.angle), radius * tmp.proportion * process * Math.sin(tmp.angle), center);
- listItem.data.push(tmp);
- });
- data.push(listItem);
- }
- return data;
-}
-
-function getPieDataPoints(series, radius) {
- var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
- var count = 0;
- var _start_ = 0;
- for (let i = 0; i < series.length; i++) {
- let item = series[i];
- item.data = item.data === null ? 0 : item.data;
- count += item.data;
- }
- for (let i = 0; i < series.length; i++) {
- let item = series[i];
- item.data = item.data === null ? 0 : item.data;
- if (count === 0) {
- item._proportion_ = 1 / series.length * process;
- } else {
- item._proportion_ = item.data / count * process;
- }
- item._radius_ = radius;
- }
- for (let i = 0; i < series.length; i++) {
- let item = series[i];
- item._start_ = _start_;
- _start_ += 2 * item._proportion_ * Math.PI;
- }
- return series;
-}
-
-function getFunnelDataPoints(series, radius, option, eachSpacing) {
- var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
- for (let i = 0; i < series.length; i++) {
- if(option.type == 'funnel'){
- series[i].radius = series[i].data / series[0].data * radius * process;
- }else{
- series[i].radius = (eachSpacing * (series.length - i)) / (eachSpacing * series.length) * radius * process;
- }
- series[i]._proportion_ = series[i].data / series[0].data;
- }
- // if(option.type !== 'pyramid'){
- // series.reverse();
- // }
- return series;
-}
-
-function getRoseDataPoints(series, type, minRadius, radius) {
- var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
- var count = 0;
- var _start_ = 0;
- var dataArr = [];
- for (let i = 0; i < series.length; i++) {
- let item = series[i];
- item.data = item.data === null ? 0 : item.data;
- count += item.data;
- dataArr.push(item.data);
- }
- var minData = Math.min.apply(null, dataArr);
- var maxData = Math.max.apply(null, dataArr);
- var radiusLength = radius - minRadius;
- for (let i = 0; i < series.length; i++) {
- let item = series[i];
- item.data = item.data === null ? 0 : item.data;
- if (count === 0) {
- item._proportion_ = 1 / series.length * process;
- item._rose_proportion_ = 1 / series.length * process;
- } else {
- item._proportion_ = item.data / count * process;
- if(type == 'area'){
- item._rose_proportion_ = 1 / series.length * process;
- }else{
- item._rose_proportion_ = item.data / count * process;
- }
- }
- item._radius_ = minRadius + radiusLength * ((item.data - minData) / (maxData - minData)) || radius;
- }
- for (let i = 0; i < series.length; i++) {
- let item = series[i];
- item._start_ = _start_;
- _start_ += 2 * item._rose_proportion_ * Math.PI;
- }
- return series;
-}
-
-function getArcbarDataPoints(series, arcbarOption) {
- var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
- if (process == 1) {
- process = 0.999999;
- }
- for (let i = 0; i < series.length; i++) {
- let item = series[i];
- item.data = item.data === null ? 0 : item.data;
- let totalAngle;
- if (arcbarOption.type == 'circle') {
- totalAngle = 2;
- } else {
- if(arcbarOption.direction == 'ccw'){
- if (arcbarOption.startAngle < arcbarOption.endAngle) {
- totalAngle = 2 + arcbarOption.startAngle - arcbarOption.endAngle;
- } else {
- totalAngle = arcbarOption.startAngle - arcbarOption.endAngle;
- }
- }else{
- if (arcbarOption.endAngle < arcbarOption.startAngle) {
- totalAngle = 2 + arcbarOption.endAngle - arcbarOption.startAngle;
- } else {
- totalAngle = arcbarOption.startAngle - arcbarOption.endAngle;
- }
- }
- }
- item._proportion_ = totalAngle * item.data * process + arcbarOption.startAngle;
- if(arcbarOption.direction == 'ccw'){
- item._proportion_ = arcbarOption.startAngle - totalAngle * item.data * process ;
- }
- if (item._proportion_ >= 2) {
- item._proportion_ = item._proportion_ % 2;
- }
- }
- return series;
-}
-
-function getGaugeArcbarDataPoints(series, arcbarOption) {
- var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
- if (process == 1) {
- process = 0.999999;
- }
- for (let i = 0; i < series.length; i++) {
- let item = series[i];
- item.data = item.data === null ? 0 : item.data;
- let totalAngle;
- if (arcbarOption.type == 'circle') {
- totalAngle = 2;
- } else {
- if (arcbarOption.endAngle < arcbarOption.startAngle) {
- totalAngle = 2 + arcbarOption.endAngle - arcbarOption.startAngle;
- } else {
- totalAngle = arcbarOption.startAngle - arcbarOption.endAngle;
- }
- }
- item._proportion_ = totalAngle * item.data * process + arcbarOption.startAngle;
- if (item._proportion_ >= 2) {
- item._proportion_ = item._proportion_ % 2;
- }
- }
- return series;
-}
-
-function getGaugeAxisPoints(categories, startAngle, endAngle) {
- let totalAngle;
- if (endAngle < startAngle) {
- totalAngle = 2 + endAngle - startAngle;
- } else {
- totalAngle = startAngle - endAngle;
- }
- let tempStartAngle = startAngle;
- for (let i = 0; i < categories.length; i++) {
- categories[i].value = categories[i].value === null ? 0 : categories[i].value;
- categories[i]._startAngle_ = tempStartAngle;
- categories[i]._endAngle_ = totalAngle * categories[i].value + startAngle;
- if (categories[i]._endAngle_ >= 2) {
- categories[i]._endAngle_ = categories[i]._endAngle_ % 2;
- }
- tempStartAngle = categories[i]._endAngle_;
- }
- return categories;
-}
-
-function getGaugeDataPoints(series, categories, gaugeOption) {
- let process = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
- for (let i = 0; i < series.length; i++) {
- let item = series[i];
- item.data = item.data === null ? 0 : item.data;
- if (gaugeOption.pointer.color == 'auto') {
- for (let i = 0; i < categories.length; i++) {
- if (item.data <= categories[i].value) {
- item.color = categories[i].color;
- break;
- }
- }
- } else {
- item.color = gaugeOption.pointer.color;
- }
- let totalAngle;
- if (gaugeOption.endAngle < gaugeOption.startAngle) {
- totalAngle = 2 + gaugeOption.endAngle - gaugeOption.startAngle;
- } else {
- totalAngle = gaugeOption.startAngle - gaugeOption.endAngle;
- }
- item._endAngle_ = totalAngle * item.data + gaugeOption.startAngle;
- item._oldAngle_ = gaugeOption.oldAngle;
- if (gaugeOption.oldAngle < gaugeOption.endAngle) {
- item._oldAngle_ += 2;
- }
- if (item.data >= gaugeOption.oldData) {
- item._proportion_ = (item._endAngle_ - item._oldAngle_) * process + gaugeOption.oldAngle;
- } else {
- item._proportion_ = item._oldAngle_ - (item._oldAngle_ - item._endAngle_) * process;
- }
- if (item._proportion_ >= 2) {
- item._proportion_ = item._proportion_ % 2;
- }
- }
- return series;
-}
-
-function getPieTextMaxLength(series, config, context, opts) {
- series = getPieDataPoints(series);
- let maxLength = 0;
- for (let i = 0; i < series.length; i++) {
- let item = series[i];
- let text = item.formatter ? item.formatter(+item._proportion_.toFixed(2)) : util.toFixed(item._proportion_ * 100) + '%';
- maxLength = Math.max(maxLength, measureText(text, item.textSize * opts.pix || config.fontSize, context));
- }
- return maxLength;
-}
-
-function fixColumeData(points, eachSpacing, columnLen, index, config, opts) {
- return points.map(function(item) {
- if (item === null) {
- return null;
- }
- var seriesGap = 0;
- var categoryGap = 0;
- if (opts.type == 'mix') {
- seriesGap = opts.extra.mix.column.seriesGap * opts.pix || 0;
- categoryGap = opts.extra.mix.column.categoryGap * opts.pix || 0;
- } else {
- seriesGap = opts.extra.column.seriesGap * opts.pix || 0;
- categoryGap = opts.extra.column.categoryGap * opts.pix || 0;
- }
- seriesGap = Math.min(seriesGap, eachSpacing / columnLen)
- categoryGap = Math.min(categoryGap, eachSpacing / columnLen)
- item.width = Math.ceil((eachSpacing - 2 * categoryGap - seriesGap * (columnLen - 1)) / columnLen);
- if (opts.extra.mix && opts.extra.mix.column.width && +opts.extra.mix.column.width > 0) {
- item.width = Math.min(item.width, +opts.extra.mix.column.width * opts.pix);
- }
- if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
- item.width = Math.min(item.width, +opts.extra.column.width * opts.pix);
- }
- if (item.width <= 0) {
- item.width = 1;
- }
- item.x += (index + 0.5 - columnLen / 2) * (item.width + seriesGap);
- return item;
- });
-}
-
-function fixBarData(points, eachSpacing, columnLen, index, config, opts) {
- return points.map(function(item) {
- if (item === null) {
- return null;
- }
- var seriesGap = 0;
- var categoryGap = 0;
- seriesGap = opts.extra.bar.seriesGap * opts.pix || 0;
- categoryGap = opts.extra.bar.categoryGap * opts.pix || 0;
- seriesGap = Math.min(seriesGap, eachSpacing / columnLen)
- categoryGap = Math.min(categoryGap, eachSpacing / columnLen)
- item.width = Math.ceil((eachSpacing - 2 * categoryGap - seriesGap * (columnLen - 1)) / columnLen);
- if (opts.extra.bar && opts.extra.bar.width && +opts.extra.bar.width > 0) {
- item.width = Math.min(item.width, +opts.extra.bar.width * opts.pix);
- }
- if (item.width <= 0) {
- item.width = 1;
- }
- item.y += (index + 0.5 - columnLen / 2) * (item.width + seriesGap);
- return item;
- });
-}
-
-function fixColumeMeterData(points, eachSpacing, columnLen, index, config, opts, border) {
- var categoryGap = opts.extra.column.categoryGap * opts.pix || 0;
- return points.map(function(item) {
- if (item === null) {
- return null;
- }
- item.width = eachSpacing - 2 * categoryGap;
- if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
- item.width = Math.min(item.width, +opts.extra.column.width * opts.pix);
- }
- if (index > 0) {
- item.width -= border;
- }
- return item;
- });
-}
-
-function fixColumeStackData(points, eachSpacing, columnLen, index, config, opts, series) {
- var categoryGap = opts.extra.column.categoryGap * opts.pix || 0;
- return points.map(function(item, indexn) {
- if (item === null) {
- return null;
- }
- item.width = Math.ceil(eachSpacing - 2 * categoryGap);
- if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
- item.width = Math.min(item.width, +opts.extra.column.width * opts.pix);
- }
- if (item.width <= 0) {
- item.width = 1;
- }
- return item;
- });
-}
-
-function fixBarStackData(points, eachSpacing, columnLen, index, config, opts, series) {
- var categoryGap = opts.extra.bar.categoryGap * opts.pix || 0;
- return points.map(function(item, indexn) {
- if (item === null) {
- return null;
- }
- item.width = Math.ceil(eachSpacing - 2 * categoryGap);
- if (opts.extra.bar && opts.extra.bar.width && +opts.extra.bar.width > 0) {
- item.width = Math.min(item.width, +opts.extra.bar.width * opts.pix);
- }
- if (item.width <= 0) {
- item.width = 1;
- }
- return item;
- });
-}
-
-function getXAxisPoints(categories, opts, config) {
- var spacingValid = opts.width - opts.area[1] - opts.area[3];
- var dataCount = opts.enableScroll ? Math.min(opts.xAxis.itemCount, categories.length) : categories.length;
- if ((opts.type == 'line' || opts.type == 'area' || opts.type == 'scatter' || opts.type == 'bubble' || opts.type == 'bar') && dataCount > 1 && opts.xAxis.boundaryGap == 'justify') {
- dataCount -= 1;
- }
- var widthRatio = 0;
- if(opts.type == 'mount' && opts.extra && opts.extra.mount && opts.extra.mount.widthRatio && opts.extra.mount.widthRatio > 1){
- if(opts.extra.mount.widthRatio>2) opts.extra.mount.widthRatio = 2
- widthRatio = opts.extra.mount.widthRatio - 1;
- dataCount += widthRatio;
- }
- var eachSpacing = spacingValid / dataCount;
- var xAxisPoints = [];
- var startX = opts.area[3];
- var endX = opts.width - opts.area[1];
- categories.forEach(function(item, index) {
- xAxisPoints.push(startX + widthRatio / 2 * eachSpacing + index * eachSpacing);
- });
- if (opts.xAxis.boundaryGap !== 'justify') {
- if (opts.enableScroll === true) {
- xAxisPoints.push(startX + widthRatio * eachSpacing + categories.length * eachSpacing);
- } else {
- xAxisPoints.push(endX);
- }
- }
- return {
- xAxisPoints: xAxisPoints,
- startX: startX,
- endX: endX,
- eachSpacing: eachSpacing
- };
-}
-
-function getCandleDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config) {
- var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;
- var points = [];
- var validHeight = opts.height - opts.area[0] - opts.area[2];
- data.forEach(function(item, index) {
- if (item === null) {
- points.push(null);
- } else {
- var cPoints = [];
- item.forEach(function(items, indexs) {
- var point = {};
- point.x = xAxisPoints[index] + Math.round(eachSpacing / 2);
- var value = items.value || items;
- var height = validHeight * (value - minRange) / (maxRange - minRange);
- height *= process;
- point.y = opts.height - Math.round(height) - opts.area[2];
- cPoints.push(point);
- });
- points.push(cPoints);
- }
- });
- return points;
-}
-
-function getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config) {
- var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;
- var boundaryGap = 'center';
- if (opts.type == 'line' || opts.type == 'area' || opts.type == 'scatter' || opts.type == 'bubble' ) {
- boundaryGap = opts.xAxis.boundaryGap;
- }
- var points = [];
- var validHeight = opts.height - opts.area[0] - opts.area[2];
- var validWidth = opts.width - opts.area[1] - opts.area[3];
- data.forEach(function(item, index) {
- if (item === null) {
- points.push(null);
- } else {
- var point = {};
- point.color = item.color;
- point.x = xAxisPoints[index];
- var value = item;
- if (typeof item === 'object' && item !== null) {
- if (item.constructor.toString().indexOf('Array') > -1) {
- let xranges, xminRange, xmaxRange;
- xranges = [].concat(opts.chartData.xAxisData.ranges);
- xminRange = xranges.shift();
- xmaxRange = xranges.pop();
- value = item[1];
- point.x = opts.area[3] + validWidth * (item[0] - xminRange) / (xmaxRange - xminRange);
- if(opts.type == 'bubble'){
- point.r = item[2];
- point.t = item[3];
- }
- } else {
- value = item.value;
- }
- }
- if (boundaryGap == 'center') {
- point.x += eachSpacing / 2;
- }
- var height = validHeight * (value - minRange) / (maxRange - minRange);
- height *= process;
- point.y = opts.height - height - opts.area[2];
- points.push(point);
- }
- });
- return points;
-}
-
-function getLineDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, lineOption, process){
- var process = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
- var boundaryGap = opts.xAxis.boundaryGap;
- var points = [];
- var validHeight = opts.height - opts.area[0] - opts.area[2];
- var validWidth = opts.width - opts.area[1] - opts.area[3];
- data.forEach(function(item, index) {
- if (item === null) {
- points.push(null);
- } else {
- var point = {};
- point.color = item.color;
- if(lineOption.animation == 'vertical'){
- point.x = xAxisPoints[index];
- var value = item;
- if (typeof item === 'object' && item !== null) {
- if (item.constructor.toString().indexOf('Array') > -1) {
- let xranges, xminRange, xmaxRange;
- xranges = [].concat(opts.chartData.xAxisData.ranges);
- xminRange = xranges.shift();
- xmaxRange = xranges.pop();
- value = item[1];
- point.x = opts.area[3] + validWidth * (item[0] - xminRange) / (xmaxRange - xminRange);
- } else {
- value = item.value;
- }
- }
- if (boundaryGap == 'center') {
- point.x += eachSpacing / 2;
- }
- var height = validHeight * (value - minRange) / (maxRange - minRange);
- height *= process;
- point.y = opts.height - height - opts.area[2];
- points.push(point);
- }else{
- point.x = xAxisPoints[0] + eachSpacing * index * process;
- var value = item;
- if (boundaryGap == 'center') {
- point.x += eachSpacing / 2;
- }
- var height = validHeight * (value - minRange) / (maxRange - minRange);
- point.y = opts.height - height - opts.area[2];
- points.push(point);
- }
- }
- });
- return points;
-}
-
-function getColumnDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, zeroPoints, process){
- var process = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
- var points = [];
- var validHeight = opts.height - opts.area[0] - opts.area[2];
- var validWidth = opts.width - opts.area[1] - opts.area[3];
- data.forEach(function(item, index) {
- if (item === null) {
- points.push(null);
- } else {
- var point = {};
- point.color = item.color;
- point.x = xAxisPoints[index];
- var value = item;
- if (typeof item === 'object' && item !== null) {
- if (item.constructor.toString().indexOf('Array') > -1) {
- let xranges, xminRange, xmaxRange;
- xranges = [].concat(opts.chartData.xAxisData.ranges);
- xminRange = xranges.shift();
- xmaxRange = xranges.pop();
- value = item[1];
- point.x = opts.area[3] + validWidth * (item[0] - xminRange) / (xmaxRange - xminRange);
- } else {
- value = item.value;
- }
- }
- point.x += eachSpacing / 2;
- var height = validHeight * (value * process - minRange) / (maxRange - minRange);
- point.y = opts.height - height - opts.area[2];
- points.push(point);
- }
- });
- return points;
-}
-
-function getMountDataPoints(series, minRange, maxRange, xAxisPoints, eachSpacing, opts, mountOption, zeroPoints) {
- var process = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
- var points = [];
- var validHeight = opts.height - opts.area[0] - opts.area[2];
- var validWidth = opts.width - opts.area[1] - opts.area[3];
- var mountWidth = eachSpacing * mountOption.widthRatio;
- series.forEach(function(item, index) {
- if (item === null) {
- points.push(null);
- } else {
- var point = {};
- point.color = item.color;
- point.x = xAxisPoints[index];
- point.x += eachSpacing / 2;
- var value = item.data;
- var height = validHeight * (value * process - minRange) / (maxRange - minRange);
- point.y = opts.height - height - opts.area[2];
- point.value = value;
- point.width = mountWidth;
- points.push(point);
- }
- });
- return points;
-}
-
-function getBarDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config) {
- var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;
- var points = [];
- var validHeight = opts.height - opts.area[0] - opts.area[2];
- var validWidth = opts.width - opts.area[1] - opts.area[3];
- data.forEach(function(item, index) {
- if (item === null) {
- points.push(null);
- } else {
- var point = {};
- point.color = item.color;
- point.y = yAxisPoints[index];
- var value = item;
- if (typeof item === 'object' && item !== null) {
- value = item.value;
- }
- var height = validWidth * (value - minRange) / (maxRange - minRange);
- height *= process;
- point.height = height;
- point.value = value;
- point.x = height + opts.area[3];
- points.push(point);
- }
- });
- return points;
-}
-
-function getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, stackSeries) {
- var process = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : 1;
- var points = [];
- var validHeight = opts.height - opts.area[0] - opts.area[2];
- data.forEach(function(item, index) {
- if (item === null) {
- points.push(null);
- } else {
- var point = {};
- point.color = item.color;
- point.x = xAxisPoints[index] + Math.round(eachSpacing / 2);
-
- if (seriesIndex > 0) {
- var value = 0;
- for (let i = 0; i <= seriesIndex; i++) {
- value += stackSeries[i].data[index];
- }
- var value0 = value - item;
- var height = validHeight * (value - minRange) / (maxRange - minRange);
- var height0 = validHeight * (value0 - minRange) / (maxRange - minRange);
- } else {
- var value = item;
- if (typeof item === 'object' && item !== null) {
- value = item.value;
- }
- var height = validHeight * (value - minRange) / (maxRange - minRange);
- var height0 = 0;
- }
- var heightc = height0;
- height *= process;
- heightc *= process;
- point.y = opts.height - Math.round(height) - opts.area[2];
- point.y0 = opts.height - Math.round(heightc) - opts.area[2];
- points.push(point);
- }
- });
- return points;
-}
-
-function getBarStackDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, seriesIndex, stackSeries) {
- var process = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : 1;
- var points = [];
- var validHeight = opts.width - opts.area[1] - opts.area[3];
- data.forEach(function(item, index) {
- if (item === null) {
- points.push(null);
- } else {
- var point = {};
- point.color = item.color;
- point.y = yAxisPoints[index];
- if (seriesIndex > 0) {
- var value = 0;
- for (let i = 0; i <= seriesIndex; i++) {
- value += stackSeries[i].data[index];
- }
- var value0 = value - item;
- var height = validHeight * (value - minRange) / (maxRange - minRange);
- var height0 = validHeight * (value0 - minRange) / (maxRange - minRange);
- } else {
- var value = item;
- if (typeof item === 'object' && item !== null) {
- value = item.value;
- }
- var height = validHeight * (value - minRange) / (maxRange - minRange);
- var height0 = 0;
- }
- var heightc = height0;
- height *= process;
- heightc *= process;
- point.height = height - heightc;
- point.x = opts.area[3] + height;
- point.x0 = opts.area[3] + heightc;
- points.push(point);
- }
- });
- return points;
-}
-
-function getYAxisTextList(series, opts, config, stack, yData) {
- var index = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : -1;
- var data;
- if (stack == 'stack') {
- data = dataCombineStack(series, opts.categories.length);
- } else {
- data = dataCombine(series);
- }
- var sorted = [];
- // remove null from data
- data = data.filter(function(item) {
- //return item !== null;
- if (typeof item === 'object' && item !== null) {
- if (item.constructor.toString().indexOf('Array') > -1) {
- return item !== null;
- } else {
- return item.value !== null;
- }
- } else {
- return item !== null;
- }
- });
- data.map(function(item) {
- if (typeof item === 'object') {
- if (item.constructor.toString().indexOf('Array') > -1) {
- if (opts.type == 'candle') {
- item.map(function(subitem) {
- sorted.push(subitem);
- })
- } else {
- sorted.push(item[1]);
- }
- } else {
- sorted.push(item.value);
- }
- } else {
- sorted.push(item);
- }
- })
- var minData = yData.min || 0;
- var maxData = yData.max || 0;
- if (sorted.length > 0) {
- minData = Math.min.apply(this, sorted);
- maxData = Math.max.apply(this, sorted);
- }
- if (minData === maxData) {
- if(maxData == 0){
- maxData = 10;
- }else{
- minData = 0;
- }
- }
- var dataRange = getDataRange(minData, maxData);
- var minRange = (yData.min === undefined || yData.min === null) ? dataRange.minRange : yData.min;
- var maxRange = (yData.max === undefined || yData.max === null) ? dataRange.maxRange : yData.max;
- var eachRange = (maxRange - minRange) / opts.yAxis.splitNumber;
- var range = [];
- for (var i = 0; i <= opts.yAxis.splitNumber; i++) {
- range.push(minRange + eachRange * i);
- }
- return range.reverse();
-}
-
-function calYAxisData(series, opts, config, context) {
- //堆叠图重算Y轴
- var columnstyle = assign({}, {
- type: ""
- }, opts.extra.column);
- //如果是多Y轴,重新计算
- var YLength = opts.yAxis.data.length;
- var newSeries = new Array(YLength);
- if (YLength > 0) {
- for (let i = 0; i < YLength; i++) {
- newSeries[i] = [];
- for (let j = 0; j < series.length; j++) {
- if (series[j].index == i) {
- newSeries[i].push(series[j]);
- }
- }
- }
- var rangesArr = new Array(YLength);
- var rangesFormatArr = new Array(YLength);
- var yAxisWidthArr = new Array(YLength);
-
- for (let i = 0; i < YLength; i++) {
- let yData = opts.yAxis.data[i];
- //如果总开关不显示,强制每个Y轴为不显示
- if (opts.yAxis.disabled == true) {
- yData.disabled = true;
- }
- if(yData.type === 'categories'){
- if(!yData.formatter){
- yData.formatter = (val,index,opts) => {return val + (yData.unit || '')};
- }
- yData.categories = yData.categories || opts.categories;
- rangesArr[i] = yData.categories;
- }else{
- if(!yData.formatter){
- yData.formatter = (val,index,opts) => {return util.toFixed(val, yData.tofix || 0) + (yData.unit || '')};
- }
- rangesArr[i] = getYAxisTextList(newSeries[i], opts, config, columnstyle.type, yData, i);
- }
- let yAxisFontSizes = yData.fontSize * opts.pix || config.fontSize;
- yAxisWidthArr[i] = {
- position: yData.position ? yData.position : 'left',
- width: 0
- };
- rangesFormatArr[i] = rangesArr[i].map(function(items,index) {
- items = yData.formatter(items,index,opts);
- yAxisWidthArr[i].width = Math.max(yAxisWidthArr[i].width, measureText(items, yAxisFontSizes, context) + 5);
- return items;
- });
- let calibration = yData.calibration ? 4 * opts.pix : 0;
- yAxisWidthArr[i].width += calibration + 3 * opts.pix;
- if (yData.disabled === true) {
- yAxisWidthArr[i].width = 0;
- }
- }
- } else {
- var rangesArr = new Array(1);
- var rangesFormatArr = new Array(1);
- var yAxisWidthArr = new Array(1);
- if(opts.type === 'bar'){
- rangesArr[0] = opts.categories;
- if(!opts.yAxis.formatter){
- opts.yAxis.formatter = (val,index,opts) => {return val + (opts.yAxis.unit || '')}
- }
- }else{
- if(!opts.yAxis.formatter){
- opts.yAxis.formatter = (val,index,opts) => {return val.toFixed(opts.yAxis.tofix ) + (opts.yAxis.unit || '')}
- }
- rangesArr[0] = getYAxisTextList(series, opts, config, columnstyle.type, {});
- }
- yAxisWidthArr[0] = {
- position: 'left',
- width: 0
- };
- var yAxisFontSize = opts.yAxis.fontSize * opts.pix || config.fontSize;
- rangesFormatArr[0] = rangesArr[0].map(function(item,index) {
- item = opts.yAxis.formatter(item,index,opts);
- yAxisWidthArr[0].width = Math.max(yAxisWidthArr[0].width, measureText(item, yAxisFontSize, context) + 5);
- return item;
- });
- yAxisWidthArr[0].width += 3 * opts.pix;
- if (opts.yAxis.disabled === true) {
- yAxisWidthArr[0] = {
- position: 'left',
- width: 0
- };
- opts.yAxis.data[0] = {
- disabled: true
- };
- } else {
- opts.yAxis.data[0] = {
- disabled: false,
- position: 'left',
- max: opts.yAxis.max,
- min: opts.yAxis.min,
- formatter: opts.yAxis.formatter
- };
- if(opts.type === 'bar'){
- opts.yAxis.data[0].categories = opts.categories;
- opts.yAxis.data[0].type = 'categories';
- }
- }
- }
- return {
- rangesFormat: rangesFormatArr,
- ranges: rangesArr,
- yAxisWidth: yAxisWidthArr
- };
-}
-
-function calTooltipYAxisData(point, series, opts, config, eachSpacing) {
- let ranges = [].concat(opts.chartData.yAxisData.ranges);
- let spacingValid = opts.height - opts.area[0] - opts.area[2];
- let minAxis = opts.area[0];
- let items = [];
- for (let i = 0; i < ranges.length; i++) {
- let maxVal = Math.max.apply(this, ranges[i]);
- let minVal = Math.min.apply(this, ranges[i]);
- let item = maxVal - (maxVal - minVal) * (point - minAxis) / spacingValid;
- item = opts.yAxis.data && opts.yAxis.data[i].formatter ? opts.yAxis.data[i].formatter(item, i, opts) : item.toFixed(0);
- items.push(String(item))
- }
- return items;
-}
-
-function calMarkLineData(points, opts) {
- let minRange, maxRange;
- let spacingValid = opts.height - opts.area[0] - opts.area[2];
- for (let i = 0; i < points.length; i++) {
- points[i].yAxisIndex = points[i].yAxisIndex ? points[i].yAxisIndex : 0;
- let range = [].concat(opts.chartData.yAxisData.ranges[points[i].yAxisIndex]);
- minRange = range.pop();
- maxRange = range.shift();
- let height = spacingValid * (points[i].value - minRange) / (maxRange - minRange);
- points[i].y = opts.height - Math.round(height) - opts.area[2];
- }
- return points;
-}
-
-function contextRotate(context, opts) {
- if (opts.rotateLock !== true) {
- context.translate(opts.height, 0);
- context.rotate(90 * Math.PI / 180);
- } else if (opts._rotate_ !== true) {
- context.translate(opts.height, 0);
- context.rotate(90 * Math.PI / 180);
- opts._rotate_ = true;
- }
-}
-
-function drawPointShape(points, color, shape, context, opts) {
- context.beginPath();
- if (opts.dataPointShapeType == 'hollow') {
- context.setStrokeStyle(color);
- context.setFillStyle(opts.background);
- context.setLineWidth(2 * opts.pix);
- } else {
- context.setStrokeStyle("#ffffff");
- context.setFillStyle(color);
- context.setLineWidth(1 * opts.pix);
- }
- if (shape === 'diamond') {
- points.forEach(function(item, index) {
- if (item !== null) {
- context.moveTo(item.x, item.y - 4.5);
- context.lineTo(item.x - 4.5, item.y);
- context.lineTo(item.x, item.y + 4.5);
- context.lineTo(item.x + 4.5, item.y);
- context.lineTo(item.x, item.y - 4.5);
- }
- });
- } else if (shape === 'circle') {
- points.forEach(function(item, index) {
- if (item !== null) {
- context.moveTo(item.x + 2.5 * opts.pix, item.y);
- context.arc(item.x, item.y, 3 * opts.pix, 0, 2 * Math.PI, false);
- }
- });
- } else if (shape === 'square') {
- points.forEach(function(item, index) {
- if (item !== null) {
- context.moveTo(item.x - 3.5, item.y - 3.5);
- context.rect(item.x - 3.5, item.y - 3.5, 7, 7);
- }
- });
- } else if (shape === 'triangle') {
- points.forEach(function(item, index) {
- if (item !== null) {
- context.moveTo(item.x, item.y - 4.5);
- context.lineTo(item.x - 4.5, item.y + 4.5);
- context.lineTo(item.x + 4.5, item.y + 4.5);
- context.lineTo(item.x, item.y - 4.5);
- }
- });
- } else if (shape === 'none') {
- return;
- }
- context.closePath();
- context.fill();
- context.stroke();
-}
-
-function drawActivePoint(points, color, shape, context, opts, option, seriesIndex) {
- if(!opts.tooltip){
- return
- }
- if(opts.tooltip.group.length>0 && opts.tooltip.group.includes(seriesIndex) == false){
- return
- }
- var pointIndex = typeof opts.tooltip.index === 'number' ? opts.tooltip.index : opts.tooltip.index[opts.tooltip.group.indexOf(seriesIndex)];
- context.beginPath();
- if (option.activeType == 'hollow') {
- context.setStrokeStyle(color);
- context.setFillStyle(opts.background);
- context.setLineWidth(2 * opts.pix);
- } else {
- context.setStrokeStyle("#ffffff");
- context.setFillStyle(color);
- context.setLineWidth(1 * opts.pix);
- }
- if (shape === 'diamond') {
- points.forEach(function(item, index) {
- if (item !== null && pointIndex == index ) {
- context.moveTo(item.x, item.y - 4.5);
- context.lineTo(item.x - 4.5, item.y);
- context.lineTo(item.x, item.y + 4.5);
- context.lineTo(item.x + 4.5, item.y);
- context.lineTo(item.x, item.y - 4.5);
- }
- });
- } else if (shape === 'circle') {
- points.forEach(function(item, index) {
- if (item !== null && pointIndex == index) {
- context.moveTo(item.x + 2.5 * opts.pix, item.y);
- context.arc(item.x, item.y, 3 * opts.pix, 0, 2 * Math.PI, false);
- }
- });
- } else if (shape === 'square') {
- points.forEach(function(item, index) {
- if (item !== null && pointIndex == index) {
- context.moveTo(item.x - 3.5, item.y - 3.5);
- context.rect(item.x - 3.5, item.y - 3.5, 7, 7);
- }
- });
- } else if (shape === 'triangle') {
- points.forEach(function(item, index) {
- if (item !== null && pointIndex == index) {
- context.moveTo(item.x, item.y - 4.5);
- context.lineTo(item.x - 4.5, item.y + 4.5);
- context.lineTo(item.x + 4.5, item.y + 4.5);
- context.lineTo(item.x, item.y - 4.5);
- }
- });
- } else if (shape === 'none') {
- return;
- }
- context.closePath();
- context.fill();
- context.stroke();
-}
-
-function drawRingTitle(opts, config, context, center) {
- var titlefontSize = opts.title.fontSize || config.titleFontSize;
- var subtitlefontSize = opts.subtitle.fontSize || config.subtitleFontSize;
- var title = opts.title.name || '';
- var subtitle = opts.subtitle.name || '';
- var titleFontColor = opts.title.color || opts.fontColor;
- var subtitleFontColor = opts.subtitle.color || opts.fontColor;
- var titleHeight = title ? titlefontSize : 0;
- var subtitleHeight = subtitle ? subtitlefontSize : 0;
- var margin = 5;
- if (subtitle) {
- var textWidth = measureText(subtitle, subtitlefontSize * opts.pix, context);
- var startX = center.x - textWidth / 2 + (opts.subtitle.offsetX|| 0) * opts.pix ;
- var startY = center.y + subtitlefontSize * opts.pix / 2 + (opts.subtitle.offsetY || 0) * opts.pix;
- if (title) {
- startY += (titleHeight * opts.pix + margin) / 2;
- }
- context.beginPath();
- context.setFontSize(subtitlefontSize * opts.pix);
- context.setFillStyle(subtitleFontColor);
- context.fillText(subtitle, startX, startY);
- context.closePath();
- context.stroke();
- }
- if (title) {
- var _textWidth = measureText(title, titlefontSize * opts.pix, context);
- var _startX = center.x - _textWidth / 2 + (opts.title.offsetX || 0);
- var _startY = center.y + titlefontSize * opts.pix / 2 + (opts.title.offsetY || 0) * opts.pix;
- if (subtitle) {
- _startY -= (subtitleHeight * opts.pix + margin) / 2;
- }
- context.beginPath();
- context.setFontSize(titlefontSize * opts.pix);
- context.setFillStyle(titleFontColor);
- context.fillText(title, _startX, _startY);
- context.closePath();
- context.stroke();
- }
-}
-
-function drawPointText(points, series, config, context, opts) {
- // 绘制数据文案
- var data = series.data;
- var textOffset = series.textOffset ? series.textOffset : 0;
- points.forEach(function(item, index) {
- if (item !== null) {
- context.beginPath();
- var fontSize = series.textSize ? series.textSize * opts.pix : config.fontSize;
- context.setFontSize(fontSize);
- context.setFillStyle(series.textColor || opts.fontColor);
- var value = data[index]
- if (typeof data[index] === 'object' && data[index] !== null) {
- if (data[index].constructor.toString().indexOf('Array')>-1) {
- value = data[index][1];
- } else {
- value = data[index].value
- }
- }
- var formatVal = series.formatter ? series.formatter(value,index,series,opts) : value;
- context.setTextAlign('center');
- context.fillText(String(formatVal), item.x, item.y - 4 + textOffset * opts.pix);
- context.closePath();
- context.stroke();
- context.setTextAlign('left');
- }
- });
-}
-
-function drawColumePointText(points, series, config, context, opts) {
- // 绘制数据文案
- var data = series.data;
- var textOffset = series.textOffset ? series.textOffset : 0;
- var Position = opts.extra.column.labelPosition;
- points.forEach(function(item, index) {
- if (item !== null) {
- context.beginPath();
- var fontSize = series.textSize ? series.textSize * opts.pix : config.fontSize;
- context.setFontSize(fontSize);
- context.setFillStyle(series.textColor || opts.fontColor);
- var value = data[index]
- if (typeof data[index] === 'object' && data[index] !== null) {
- if (data[index].constructor.toString().indexOf('Array')>-1) {
- value = data[index][1];
- } else {
- value = data[index].value
- }
- }
- var formatVal = series.formatter ? series.formatter(value,index,series,opts) : value;
- context.setTextAlign('center');
- var startY = item.y - 4 * opts.pix + textOffset * opts.pix;
- if(item.y > series.zeroPoints){
- startY = item.y + textOffset * opts.pix + fontSize;
- }
- if(Position == 'insideTop'){
- startY = item.y + fontSize + textOffset * opts.pix;
- if(item.y > series.zeroPoints){
- startY = item.y - textOffset * opts.pix - 4 * opts.pix;
- }
- }
- if(Position == 'center'){
- startY = item.y + textOffset * opts.pix + (opts.height - opts.area[2] - item.y + fontSize)/2;
- if(series.zeroPoints < opts.height - opts.area[2]){
- startY = item.y + textOffset * opts.pix + (series.zeroPoints - item.y + fontSize)/2;
- }
- if(item.y > series.zeroPoints){
- startY = item.y - textOffset * opts.pix - (item.y - series.zeroPoints - fontSize)/2;
- }
- if(opts.extra.column.type == 'stack'){
- startY = item.y + textOffset * opts.pix + (item.y0 - item.y + fontSize)/2;
- }
- }
- if(Position == 'bottom'){
- startY = opts.height - opts.area[2] + textOffset * opts.pix - 4 * opts.pix;
- if(series.zeroPoints < opts.height - opts.area[2]){
- startY = series.zeroPoints + textOffset * opts.pix - 4 * opts.pix;
- }
- if(item.y > series.zeroPoints){
- startY = series.zeroPoints - textOffset * opts.pix + fontSize + 2 * opts.pix;
- }
- if(opts.extra.column.type == 'stack'){
- startY = item.y0 + textOffset * opts.pix - 4 * opts.pix;
- }
- }
- context.fillText(String(formatVal), item.x, startY);
- context.closePath();
- context.stroke();
- context.setTextAlign('left');
- }
- });
-}
-
-function drawMountPointText(points, series, config, context, opts, zeroPoints) {
- // 绘制数据文案
- var data = series.data;
- var textOffset = series.textOffset ? series.textOffset : 0;
- var Position = opts.extra.mount.labelPosition;
- points.forEach(function(item, index) {
- if (item !== null) {
- context.beginPath();
- var fontSize = series[index].textSize ? series[index].textSize * opts.pix : config.fontSize;
- context.setFontSize(fontSize);
- context.setFillStyle(series[index].textColor || opts.fontColor);
- var value = item.value
- var formatVal = series[index].formatter ? series[index].formatter(value,index,series,opts) : value;
- context.setTextAlign('center');
- var startY = item.y - 4 * opts.pix + textOffset * opts.pix;
- if(item.y > zeroPoints){
- startY = item.y + textOffset * opts.pix + fontSize;
- }
- context.fillText(String(formatVal), item.x, startY);
- context.closePath();
- context.stroke();
- context.setTextAlign('left');
- }
- });
-}
-
-function drawBarPointText(points, series, config, context, opts) {
- // 绘制数据文案
- var data = series.data;
- var textOffset = series.textOffset ? series.textOffset : 0;
- points.forEach(function(item, index) {
- if (item !== null) {
- context.beginPath();
- var fontSize = series.textSize ? series.textSize * opts.pix : config.fontSize;
- context.setFontSize(fontSize);
- context.setFillStyle(series.textColor || opts.fontColor);
- var value = data[index]
- if (typeof data[index] === 'object' && data[index] !== null) {
- value = data[index].value ;
- }
- var formatVal = series.formatter ? series.formatter(value,index,series,opts) : value;
- context.setTextAlign('left');
- context.fillText(String(formatVal), item.x + 4 * opts.pix , item.y + fontSize / 2 - 3 );
- context.closePath();
- context.stroke();
- }
- });
-}
-
-function drawGaugeLabel(gaugeOption, radius, centerPosition, opts, config, context) {
- radius -= gaugeOption.width / 2 + gaugeOption.labelOffset * opts.pix;
- radius = radius < 10 ? 10 : radius;
- let totalAngle;
- if (gaugeOption.endAngle < gaugeOption.startAngle) {
- totalAngle = 2 + gaugeOption.endAngle - gaugeOption.startAngle;
- } else {
- totalAngle = gaugeOption.startAngle - gaugeOption.endAngle;
- }
- let splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
- let totalNumber = gaugeOption.endNumber - gaugeOption.startNumber;
- let splitNumber = totalNumber / gaugeOption.splitLine.splitNumber;
- let nowAngle = gaugeOption.startAngle;
- let nowNumber = gaugeOption.startNumber;
- for (let i = 0; i < gaugeOption.splitLine.splitNumber + 1; i++) {
- var pos = {
- x: radius * Math.cos(nowAngle * Math.PI),
- y: radius * Math.sin(nowAngle * Math.PI)
- };
- var labelText = gaugeOption.formatter ? gaugeOption.formatter(nowNumber,i,opts) : nowNumber;
- pos.x += centerPosition.x - measureText(labelText, config.fontSize, context) / 2;
- pos.y += centerPosition.y;
- var startX = pos.x;
- var startY = pos.y;
- context.beginPath();
- context.setFontSize(config.fontSize);
- context.setFillStyle(gaugeOption.labelColor || opts.fontColor);
- context.fillText(labelText, startX, startY + config.fontSize / 2);
- context.closePath();
- context.stroke();
- nowAngle += splitAngle;
- if (nowAngle >= 2) {
- nowAngle = nowAngle % 2;
- }
- nowNumber += splitNumber;
- }
-}
-
-function drawRadarLabel(angleList, radius, centerPosition, opts, config, context) {
- var radarOption = opts.extra.radar || {};
- angleList.forEach(function(angle, index) {
- if(radarOption.labelPointShow === true && opts.categories[index] !== ''){
- var posPoint = {
- x: radius * Math.cos(angle),
- y: radius * Math.sin(angle)
- };
- var posPointAxis = convertCoordinateOrigin(posPoint.x, posPoint.y, centerPosition);
- context.setFillStyle(radarOption.labelPointColor);
- context.beginPath();
- context.arc(posPointAxis.x, posPointAxis.y, radarOption.labelPointRadius * opts.pix, 0, 2 * Math.PI, false);
- context.closePath();
- context.fill();
- }
- if(radarOption.labelShow === true){
- var pos = {
- x: (radius + config.radarLabelTextMargin * opts.pix) * Math.cos(angle),
- y: (radius + config.radarLabelTextMargin * opts.pix) * Math.sin(angle)
- };
- var posRelativeCanvas = convertCoordinateOrigin(pos.x, pos.y, centerPosition);
- var startX = posRelativeCanvas.x;
- var startY = posRelativeCanvas.y;
- if (util.approximatelyEqual(pos.x, 0)) {
- startX -= measureText(opts.categories[index] || '', config.fontSize, context) / 2;
- } else if (pos.x < 0) {
- startX -= measureText(opts.categories[index] || '', config.fontSize, context);
- }
- context.beginPath();
- context.setFontSize(config.fontSize);
- context.setFillStyle(radarOption.labelColor || opts.fontColor);
- context.fillText(opts.categories[index] || '', startX, startY + config.fontSize / 2);
- context.closePath();
- context.stroke();
- }
- });
-
-}
-
-function drawPieText(series, opts, config, context, radius, center) {
- var lineRadius = config.pieChartLinePadding;
- var textObjectCollection = [];
- var lastTextObject = null;
- var seriesConvert = series.map(function(item,index) {
- var text = item.formatter ? item.formatter(item,index,series,opts) : util.toFixed(item._proportion_.toFixed(4) * 100) + '%';
- text = item.labelText ? item.labelText : text;
- var arc = 2 * Math.PI - (item._start_ + 2 * Math.PI * item._proportion_ / 2);
- if (item._rose_proportion_) {
- arc = 2 * Math.PI - (item._start_ + 2 * Math.PI * item._rose_proportion_ / 2);
- }
- var color = item.color;
- var radius = item._radius_;
- return {
- arc: arc,
- text: text,
- color: color,
- radius: radius,
- textColor: item.textColor,
- textSize: item.textSize,
- labelShow: item.labelShow
- };
- });
- for (let i = 0; i < seriesConvert.length; i++) {
- let item = seriesConvert[i];
- // line end
- let orginX1 = Math.cos(item.arc) * (item.radius + lineRadius);
- let orginY1 = Math.sin(item.arc) * (item.radius + lineRadius);
- // line start
- let orginX2 = Math.cos(item.arc) * item.radius;
- let orginY2 = Math.sin(item.arc) * item.radius;
- // text start
- let orginX3 = orginX1 >= 0 ? orginX1 + config.pieChartTextPadding : orginX1 - config.pieChartTextPadding;
- let orginY3 = orginY1;
- let textWidth = measureText(item.text, item.textSize * opts.pix || config.fontSize, context);
- let startY = orginY3;
- if (lastTextObject && util.isSameXCoordinateArea(lastTextObject.start, {
- x: orginX3
- })) {
- if (orginX3 > 0) {
- startY = Math.min(orginY3, lastTextObject.start.y);
- } else if (orginX1 < 0) {
- startY = Math.max(orginY3, lastTextObject.start.y);
- } else {
- if (orginY3 > 0) {
- startY = Math.max(orginY3, lastTextObject.start.y);
- } else {
- startY = Math.min(orginY3, lastTextObject.start.y);
- }
- }
- }
- if (orginX3 < 0) {
- orginX3 -= textWidth;
- }
- let textObject = {
- lineStart: {
- x: orginX2,
- y: orginY2
- },
- lineEnd: {
- x: orginX1,
- y: orginY1
- },
- start: {
- x: orginX3,
- y: startY
- },
- width: textWidth,
- height: config.fontSize,
- text: item.text,
- color: item.color,
- textColor: item.textColor,
- textSize: item.textSize
- };
- lastTextObject = avoidCollision(textObject, lastTextObject);
- textObjectCollection.push(lastTextObject);
- }
- for (let i = 0; i < textObjectCollection.length; i++) {
- if(seriesConvert[i].labelShow === false){
- continue;
- }
- let item = textObjectCollection[i];
- let lineStartPoistion = convertCoordinateOrigin(item.lineStart.x, item.lineStart.y, center);
- let lineEndPoistion = convertCoordinateOrigin(item.lineEnd.x, item.lineEnd.y, center);
- let textPosition = convertCoordinateOrigin(item.start.x, item.start.y, center);
- context.setLineWidth(1 * opts.pix);
- context.setFontSize(item.textSize * opts.pix || config.fontSize);
- context.beginPath();
- context.setStrokeStyle(item.color);
- context.setFillStyle(item.color);
- context.moveTo(lineStartPoistion.x, lineStartPoistion.y);
- let curveStartX = item.start.x < 0 ? textPosition.x + item.width : textPosition.x;
- let textStartX = item.start.x < 0 ? textPosition.x - 5 : textPosition.x + 5;
- context.quadraticCurveTo(lineEndPoistion.x, lineEndPoistion.y, curveStartX, textPosition.y);
- context.moveTo(lineStartPoistion.x, lineStartPoistion.y);
- context.stroke();
- context.closePath();
- context.beginPath();
- context.moveTo(textPosition.x + item.width, textPosition.y);
- context.arc(curveStartX, textPosition.y, 2 * opts.pix, 0, 2 * Math.PI);
- context.closePath();
- context.fill();
- context.beginPath();
- context.setFontSize(item.textSize * opts.pix || config.fontSize);
- context.setFillStyle(item.textColor || opts.fontColor);
- context.fillText(item.text, textStartX, textPosition.y + 3);
- context.closePath();
- context.stroke();
- context.closePath();
- }
-}
-
-function drawToolTipSplitLine(offsetX, opts, config, context) {
- var toolTipOption = opts.extra.tooltip || {};
- toolTipOption.gridType = toolTipOption.gridType == undefined ? 'solid' : toolTipOption.gridType;
- toolTipOption.dashLength = toolTipOption.dashLength == undefined ? 4 : toolTipOption.dashLength;
- var startY = opts.area[0];
- var endY = opts.height - opts.area[2];
- if (toolTipOption.gridType == 'dash') {
- context.setLineDash([toolTipOption.dashLength, toolTipOption.dashLength]);
- }
- context.setStrokeStyle(toolTipOption.gridColor || '#cccccc');
- context.setLineWidth(1 * opts.pix);
- context.beginPath();
- context.moveTo(offsetX, startY);
- context.lineTo(offsetX, endY);
- context.stroke();
- context.setLineDash([]);
- if (toolTipOption.xAxisLabel) {
- let labelText = opts.categories[opts.tooltip.index];
- context.setFontSize(config.fontSize);
- let textWidth = measureText(labelText, config.fontSize, context);
- let textX = offsetX - 0.5 * textWidth;
- let textY = endY + 2 * opts.pix;
- context.beginPath();
- context.setFillStyle(hexToRgb(toolTipOption.labelBgColor || config.toolTipBackground, toolTipOption.labelBgOpacity || config.toolTipOpacity));
- context.setStrokeStyle(toolTipOption.labelBgColor || config.toolTipBackground);
- context.setLineWidth(1 * opts.pix);
- context.rect(textX - toolTipOption.boxPadding * opts.pix, textY, textWidth + 2 * toolTipOption.boxPadding * opts.pix, config.fontSize + 2 * toolTipOption.boxPadding * opts.pix);
- context.closePath();
- context.stroke();
- context.fill();
- context.beginPath();
- context.setFontSize(config.fontSize);
- context.setFillStyle(toolTipOption.labelFontColor || opts.fontColor);
- context.fillText(String(labelText), textX, textY + toolTipOption.boxPadding * opts.pix + config.fontSize);
- context.closePath();
- context.stroke();
- }
-}
-
-function drawMarkLine(opts, config, context) {
- let markLineOption = assign({}, {
- type: 'solid',
- dashLength: 4,
- data: []
- }, opts.extra.markLine);
- let startX = opts.area[3];
- let endX = opts.width - opts.area[1];
- let points = calMarkLineData(markLineOption.data, opts);
- for (let i = 0; i < points.length; i++) {
- let item = assign({}, {
- lineColor: '#DE4A42',
- showLabel: false,
- labelFontSize: 13,
- labelPadding: 6,
- labelFontColor: '#666666',
- labelBgColor: '#DFE8FF',
- labelBgOpacity: 0.8,
- labelAlign: 'left',
- labelOffsetX: 0,
- labelOffsetY: 0,
- }, points[i]);
- if (markLineOption.type == 'dash') {
- context.setLineDash([markLineOption.dashLength, markLineOption.dashLength]);
- }
- context.setStrokeStyle(item.lineColor);
- context.setLineWidth(1 * opts.pix);
- context.beginPath();
- context.moveTo(startX, item.y);
- context.lineTo(endX, item.y);
- context.stroke();
- context.setLineDash([]);
- if (item.showLabel) {
- let fontSize = item.labelFontSize * opts.pix;
- let labelText = item.labelText ? item.labelText : item.value;
- context.setFontSize(fontSize);
- let textWidth = measureText(labelText, fontSize, context);
- let bgWidth = textWidth + item.labelPadding * opts.pix * 2;
- let bgStartX = item.labelAlign == 'left' ? opts.area[3] - bgWidth : opts.width - opts.area[1];
- bgStartX += item.labelOffsetX;
- let bgStartY = item.y - 0.5 * fontSize - item.labelPadding * opts.pix;
- bgStartY += item.labelOffsetY;
- let textX = bgStartX + item.labelPadding * opts.pix;
- let textY = item.y;
- context.setFillStyle(hexToRgb(item.labelBgColor, item.labelBgOpacity));
- context.setStrokeStyle(item.labelBgColor);
- context.setLineWidth(1 * opts.pix);
- context.beginPath();
- context.rect(bgStartX, bgStartY, bgWidth, fontSize + 2 * item.labelPadding * opts.pix);
- context.closePath();
- context.stroke();
- context.fill();
- context.setFontSize(fontSize);
- context.setTextAlign('left');
- context.setFillStyle(item.labelFontColor);
- context.fillText(String(labelText), textX, bgStartY + fontSize + item.labelPadding * opts.pix/2);
- context.stroke();
- context.setTextAlign('left');
- }
- }
-}
-
-function drawToolTipHorizentalLine(opts, config, context, eachSpacing, xAxisPoints) {
- var toolTipOption = assign({}, {
- gridType: 'solid',
- dashLength: 4
- }, opts.extra.tooltip);
- var startX = opts.area[3];
- var endX = opts.width - opts.area[1];
- if (toolTipOption.gridType == 'dash') {
- context.setLineDash([toolTipOption.dashLength, toolTipOption.dashLength]);
- }
- context.setStrokeStyle(toolTipOption.gridColor || '#cccccc');
- context.setLineWidth(1 * opts.pix);
- context.beginPath();
- context.moveTo(startX, opts.tooltip.offset.y);
- context.lineTo(endX, opts.tooltip.offset.y);
- context.stroke();
- context.setLineDash([]);
- if (toolTipOption.yAxisLabel) {
- let boxPadding = toolTipOption.boxPadding * opts.pix;
- let labelText = calTooltipYAxisData(opts.tooltip.offset.y, opts.series, opts, config, eachSpacing);
- let widthArr = opts.chartData.yAxisData.yAxisWidth;
- let tStartLeft = opts.area[3];
- let tStartRight = opts.width - opts.area[1];
- for (let i = 0; i < labelText.length; i++) {
- context.setFontSize(toolTipOption.fontSize * opts.pix);
- let textWidth = measureText(labelText[i], toolTipOption.fontSize * opts.pix, context);
- let bgStartX, bgEndX, bgWidth;
- if (widthArr[i].position == 'left') {
- bgStartX = tStartLeft - (textWidth + boxPadding * 2) - 2 * opts.pix;
- bgEndX = Math.max(bgStartX, bgStartX + textWidth + boxPadding * 2);
- } else {
- bgStartX = tStartRight + 2 * opts.pix;
- bgEndX = Math.max(bgStartX + widthArr[i].width, bgStartX + textWidth + boxPadding * 2);
- }
- bgWidth = bgEndX - bgStartX;
- let textX = bgStartX + (bgWidth - textWidth) / 2;
- let textY = opts.tooltip.offset.y;
- context.beginPath();
- context.setFillStyle(hexToRgb(toolTipOption.labelBgColor || config.toolTipBackground, toolTipOption.labelBgOpacity || config.toolTipOpacity));
- context.setStrokeStyle(toolTipOption.labelBgColor || config.toolTipBackground);
- context.setLineWidth(1 * opts.pix);
- context.rect(bgStartX, textY - 0.5 * config.fontSize - boxPadding, bgWidth, config.fontSize + 2 * boxPadding);
- context.closePath();
- context.stroke();
- context.fill();
- context.beginPath();
- context.setFontSize(config.fontSize);
- context.setFillStyle(toolTipOption.labelFontColor || opts.fontColor);
- context.fillText(labelText[i], textX, textY + 0.5 * config.fontSize);
- context.closePath();
- context.stroke();
- if (widthArr[i].position == 'left') {
- tStartLeft -= (widthArr[i].width + opts.yAxis.padding * opts.pix);
- } else {
- tStartRight += widthArr[i].width + opts.yAxis.padding * opts.pix;
- }
- }
- }
-}
-
-function drawToolTipSplitArea(offsetX, opts, config, context, eachSpacing) {
- var toolTipOption = assign({}, {
- activeBgColor: '#000000',
- activeBgOpacity: 0.08,
- activeWidth: eachSpacing
- }, opts.extra.column);
- toolTipOption.activeWidth = toolTipOption.activeWidth > eachSpacing ? eachSpacing : toolTipOption.activeWidth;
- var startY = opts.area[0];
- var endY = opts.height - opts.area[2];
- context.beginPath();
- context.setFillStyle(hexToRgb(toolTipOption.activeBgColor, toolTipOption.activeBgOpacity));
- context.rect(offsetX - toolTipOption.activeWidth / 2, startY, toolTipOption.activeWidth, endY - startY);
- context.closePath();
- context.fill();
- context.setFillStyle("#FFFFFF");
-}
-
-function drawBarToolTipSplitArea(offsetX, opts, config, context, eachSpacing) {
- var toolTipOption = assign({}, {
- activeBgColor: '#000000',
- activeBgOpacity: 0.08
- }, opts.extra.bar);
- var startX = opts.area[3];
- var endX = opts.width - opts.area[1];
- context.beginPath();
- context.setFillStyle(hexToRgb(toolTipOption.activeBgColor, toolTipOption.activeBgOpacity));
- context.rect( startX ,offsetX - eachSpacing / 2 , endX - startX,eachSpacing);
- context.closePath();
- context.fill();
- context.setFillStyle("#FFFFFF");
-}
-
-
-function drawToolTip(textList, offset, opts, config, context, eachSpacing, xAxisPoints) {
- var toolTipOption = assign({}, {
- showBox: true,
- showArrow: true,
- showCategory: false,
- bgColor: '#000000',
- bgOpacity: 0.7,
- borderColor: '#000000',
- borderWidth: 0,
- borderRadius: 0,
- borderOpacity: 0.7,
- boxPadding: 3,
- fontColor: '#FFFFFF',
- fontSize: 13,
- lineHeight: 20,
- legendShow: true,
- legendShape: 'auto',
- splitLine: true,
- }, opts.extra.tooltip);
- if(toolTipOption.showCategory==true && opts.categories){
- textList.unshift({text:opts.categories[opts.tooltip.index],color:null})
- }
- var fontSize = toolTipOption.fontSize * opts.pix;
- var lineHeight = toolTipOption.lineHeight * opts.pix;
- var boxPadding = toolTipOption.boxPadding * opts.pix;
- var legendWidth = fontSize;
- var legendMarginRight = 5 * opts.pix;
- if(toolTipOption.legendShow == false){
- legendWidth = 0;
- legendMarginRight = 0;
- }
- var arrowWidth = toolTipOption.showArrow ? 8 * opts.pix : 0;
- var isOverRightBorder = false;
- if (opts.type == 'line' || opts.type == 'mount' || opts.type == 'area' || opts.type == 'candle' || opts.type == 'mix') {
- if (toolTipOption.splitLine == true) {
- drawToolTipSplitLine(opts.tooltip.offset.x, opts, config, context);
- }
- }
- offset = assign({
- x: 0,
- y: 0
- }, offset);
- offset.y -= 8 * opts.pix;
- var textWidth = textList.map(function(item) {
- return measureText(item.text, fontSize, context);
- });
- var toolTipWidth = legendWidth + legendMarginRight + 4 * boxPadding + Math.max.apply(null, textWidth);
- var toolTipHeight = 2 * boxPadding + textList.length * lineHeight;
- if (toolTipOption.showBox == false) {
- return
- }
- // if beyond the right border
- if (offset.x - Math.abs(opts._scrollDistance_ || 0) + arrowWidth + toolTipWidth > opts.width) {
- isOverRightBorder = true;
- }
- if (toolTipHeight + offset.y > opts.height) {
- offset.y = opts.height - toolTipHeight;
- }
- // draw background rect
- context.beginPath();
- context.setFillStyle(hexToRgb(toolTipOption.bgColor, toolTipOption.bgOpacity));
- context.setLineWidth(toolTipOption.borderWidth * opts.pix);
- context.setStrokeStyle(hexToRgb(toolTipOption.borderColor, toolTipOption.borderOpacity));
- var radius = toolTipOption.borderRadius;
- if (isOverRightBorder) {
- // 增加左侧仍然超出的判断
- if(toolTipWidth + arrowWidth > opts.width){
- offset.x = opts.width + Math.abs(opts._scrollDistance_ || 0) + arrowWidth + (toolTipWidth - opts.width)
- }
- if(toolTipWidth > offset.x){
- offset.x = opts.width + Math.abs(opts._scrollDistance_ || 0) + arrowWidth + (toolTipWidth - opts.width)
- }
- if (toolTipOption.showArrow) {
- context.moveTo(offset.x, offset.y + 10 * opts.pix);
- context.lineTo(offset.x - arrowWidth, offset.y + 10 * opts.pix + 5 * opts.pix);
- }
- context.arc(offset.x - arrowWidth - radius, offset.y + toolTipHeight - radius, radius, 0, Math.PI / 2, false);
- context.arc(offset.x - arrowWidth - Math.round(toolTipWidth) + radius, offset.y + toolTipHeight - radius, radius,
- Math.PI / 2, Math.PI, false);
- context.arc(offset.x - arrowWidth - Math.round(toolTipWidth) + radius, offset.y + radius, radius, -Math.PI, -Math.PI / 2, false);
- context.arc(offset.x - arrowWidth - radius, offset.y + radius, radius, -Math.PI / 2, 0, false);
- if (toolTipOption.showArrow) {
- context.lineTo(offset.x - arrowWidth, offset.y + 10 * opts.pix - 5 * opts.pix);
- context.lineTo(offset.x, offset.y + 10 * opts.pix);
- }
- } else {
- if (toolTipOption.showArrow) {
- context.moveTo(offset.x, offset.y + 10 * opts.pix);
- context.lineTo(offset.x + arrowWidth, offset.y + 10 * opts.pix - 5 * opts.pix);
- }
- context.arc(offset.x + arrowWidth + radius, offset.y + radius, radius, -Math.PI, -Math.PI / 2, false);
- context.arc(offset.x + arrowWidth + Math.round(toolTipWidth) - radius, offset.y + radius, radius, -Math.PI / 2, 0,
- false);
- context.arc(offset.x + arrowWidth + Math.round(toolTipWidth) - radius, offset.y + toolTipHeight - radius, radius, 0,
- Math.PI / 2, false);
- context.arc(offset.x + arrowWidth + radius, offset.y + toolTipHeight - radius, radius, Math.PI / 2, Math.PI, false);
- if (toolTipOption.showArrow) {
- context.lineTo(offset.x + arrowWidth, offset.y + 10 * opts.pix + 5 * opts.pix);
- context.lineTo(offset.x, offset.y + 10 * opts.pix);
- }
- }
- context.closePath();
- context.fill();
- if (toolTipOption.borderWidth > 0) {
- context.stroke();
- }
- // draw legend
- if(toolTipOption.legendShow){
- textList.forEach(function(item, index) {
- if (item.color !== null) {
- context.beginPath();
- context.setFillStyle(item.color);
- var startX = offset.x + arrowWidth + 2 * boxPadding;
- var startY = offset.y + (lineHeight - fontSize) / 2 + lineHeight * index + boxPadding + 1;
- if (isOverRightBorder) {
- startX = offset.x - toolTipWidth - arrowWidth + 2 * boxPadding;
- }
- switch (item.legendShape) {
- case 'line':
- context.moveTo(startX, startY + 0.5 * legendWidth - 2 * opts.pix);
- context.fillRect(startX, startY + 0.5 * legendWidth - 2 * opts.pix, legendWidth, 4 * opts.pix);
- break;
- case 'triangle':
- context.moveTo(startX + 7.5 * opts.pix, startY + 0.5 * legendWidth - 5 * opts.pix);
- context.lineTo(startX + 2.5 * opts.pix, startY + 0.5 * legendWidth + 5 * opts.pix);
- context.lineTo(startX + 12.5 * opts.pix, startY + 0.5 * legendWidth + 5 * opts.pix);
- context.lineTo(startX + 7.5 * opts.pix, startY + 0.5 * legendWidth - 5 * opts.pix);
- break;
- case 'diamond':
- context.moveTo(startX + 7.5 * opts.pix, startY + 0.5 * legendWidth - 5 * opts.pix);
- context.lineTo(startX + 2.5 * opts.pix, startY + 0.5 * legendWidth);
- context.lineTo(startX + 7.5 * opts.pix, startY + 0.5 * legendWidth + 5 * opts.pix);
- context.lineTo(startX + 12.5 * opts.pix, startY + 0.5 * legendWidth);
- context.lineTo(startX + 7.5 * opts.pix, startY + 0.5 * legendWidth - 5 * opts.pix);
- break;
- case 'circle':
- context.moveTo(startX + 7.5 * opts.pix, startY + 0.5 * legendWidth);
- context.arc(startX + 7.5 * opts.pix, startY + 0.5 * legendWidth, 5 * opts.pix, 0, 2 * Math.PI);
- break;
- case 'rect':
- context.moveTo(startX, startY + 0.5 * legendWidth - 5 * opts.pix);
- context.fillRect(startX, startY + 0.5 * legendWidth - 5 * opts.pix, 15 * opts.pix, 10 * opts.pix);
- break;
- case 'square':
- context.moveTo(startX + 2 * opts.pix, startY + 0.5 * legendWidth - 5 * opts.pix);
- context.fillRect(startX + 2 * opts.pix, startY + 0.5 * legendWidth - 5 * opts.pix, 10 * opts.pix, 10 * opts.pix);
- break;
- default:
- context.moveTo(startX, startY + 0.5 * legendWidth - 5 * opts.pix);
- context.fillRect(startX, startY + 0.5 * legendWidth - 5 * opts.pix, 15 * opts.pix, 10 * opts.pix);
- }
- context.closePath();
- context.fill();
- }
- });
- }
-
- // draw text list
- textList.forEach(function(item, index) {
- var startX = offset.x + arrowWidth + 2 * boxPadding + legendWidth + legendMarginRight;
- if (isOverRightBorder) {
- startX = offset.x - toolTipWidth - arrowWidth + 2 * boxPadding + legendWidth + legendMarginRight;
- }
- var startY = offset.y + lineHeight * index + (lineHeight - fontSize)/2 - 1 + boxPadding + fontSize;
- context.beginPath();
- context.setFontSize(fontSize);
- context.setTextBaseline('normal');
- context.setFillStyle(toolTipOption.fontColor);
- context.fillText(item.text, startX, startY);
- context.closePath();
- context.stroke();
- });
-}
-
-function drawColumnDataPoints(series, opts, config, context) {
- let process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
- let xAxisData = opts.chartData.xAxisData,
- xAxisPoints = xAxisData.xAxisPoints,
- eachSpacing = xAxisData.eachSpacing;
- let columnOption = assign({}, {
- type: 'group',
- width: eachSpacing / 2,
- meterBorder: 4,
- meterFillColor: '#FFFFFF',
- barBorderCircle: false,
- barBorderRadius: [],
- seriesGap: 2,
- linearType: 'none',
- linearOpacity: 1,
- customColor: [],
- colorStop: 0,
- labelPosition: 'outside'
- }, opts.extra.column);
- let calPoints = [];
- context.save();
- let leftNum = -2;
- let rightNum = xAxisPoints.length + 2;
- if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
- context.translate(opts._scrollDistance_, 0);
- leftNum = Math.floor(-opts._scrollDistance_ / eachSpacing) - 2;
- rightNum = leftNum + opts.xAxis.itemCount + 4;
- }
- if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) {
- drawToolTipSplitArea(opts.tooltip.offset.x, opts, config, context, eachSpacing);
- }
- columnOption.customColor = fillCustomColor(columnOption.linearType, columnOption.customColor, series, config);
- series.forEach(function(eachSeries, seriesIndex) {
- let ranges, minRange, maxRange;
- ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
- minRange = ranges.pop();
- maxRange = ranges.shift();
-
- // 计算0轴坐标
- let spacingValid = opts.height - opts.area[0] - opts.area[2];
- let zeroHeight = spacingValid * (0 - minRange) / (maxRange - minRange);
- let zeroPoints = opts.height - Math.round(zeroHeight) - opts.area[2];
- eachSeries.zeroPoints = zeroPoints;
- var data = eachSeries.data;
- switch (columnOption.type) {
- case 'group':
- var points = getColumnDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, zeroPoints, process);
- var tooltipPoints = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
- calPoints.push(tooltipPoints);
- points = fixColumeData(points, eachSpacing, series.length, seriesIndex, config, opts);
- for (let i = 0; i < points.length; i++) {
- let item = points[i];
- //fix issues/I27B1N yyoinge & Joeshu
- if (item !== null && i > leftNum && i < rightNum) {
- var startX = item.x - item.width / 2;
- var height = opts.height - item.y - opts.area[2];
- context.beginPath();
- var fillColor = item.color || eachSeries.color
- var strokeColor = item.color || eachSeries.color
- if (columnOption.linearType !== 'none') {
- var grd = context.createLinearGradient(startX, item.y, startX, zeroPoints);
- //透明渐变
- if (columnOption.linearType == 'opacity') {
- grd.addColorStop(0, hexToRgb(fillColor, columnOption.linearOpacity));
- grd.addColorStop(1, hexToRgb(fillColor, 1));
- } else {
- grd.addColorStop(0, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
- grd.addColorStop(columnOption.colorStop, hexToRgb(columnOption.customColor[eachSeries.linearIndex],columnOption.linearOpacity));
- grd.addColorStop(1, hexToRgb(fillColor, 1));
- }
- fillColor = grd
- }
- // 圆角边框
- if ((columnOption.barBorderRadius && columnOption.barBorderRadius.length === 4) || columnOption.barBorderCircle === true) {
- const left = startX;
- const top = item.y > zeroPoints ? zeroPoints : item.y;
- const width = item.width;
- const height = Math.abs(zeroPoints - item.y);
- if (columnOption.barBorderCircle) {
- columnOption.barBorderRadius = [width / 2, width / 2, 0, 0];
- }
- if(item.y > zeroPoints){
- columnOption.barBorderRadius = [0, 0,width / 2, width / 2];
- }
- let [r0, r1, r2, r3] = columnOption.barBorderRadius;
- let minRadius = Math.min(width/2,height/2);
- r0 = r0 > minRadius ? minRadius : r0;
- r1 = r1 > minRadius ? minRadius : r1;
- r2 = r2 > minRadius ? minRadius : r2;
- r3 = r3 > minRadius ? minRadius : r3;
- r0 = r0 < 0 ? 0 : r0;
- r1 = r1 < 0 ? 0 : r1;
- r2 = r2 < 0 ? 0 : r2;
- r3 = r3 < 0 ? 0 : r3;
- context.arc(left + r0, top + r0, r0, -Math.PI, -Math.PI / 2);
- context.arc(left + width - r1, top + r1, r1, -Math.PI / 2, 0);
- context.arc(left + width - r2, top + height - r2, r2, 0, Math.PI / 2);
- context.arc(left + r3, top + height - r3, r3, Math.PI / 2, Math.PI);
- } else {
- context.moveTo(startX, item.y);
- context.lineTo(startX + item.width, item.y);
- context.lineTo(startX + item.width, zeroPoints);
- context.lineTo(startX, zeroPoints);
- context.lineTo(startX, item.y);
- context.setLineWidth(1)
- context.setStrokeStyle(strokeColor);
- }
- context.setFillStyle(fillColor);
- context.closePath();
- //context.stroke();
- context.fill();
- }
- };
- break;
- case 'stack':
- // 绘制堆叠数据图
- var points = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
- calPoints.push(points);
- points = fixColumeStackData(points, eachSpacing, series.length, seriesIndex, config, opts, series);
- for (let i = 0; i < points.length; i++) {
- let item = points[i];
- if (item !== null && i > leftNum && i < rightNum) {
- context.beginPath();
- var fillColor = item.color || eachSeries.color;
- var startX = item.x - item.width / 2 + 1;
- var height = opts.height - item.y - opts.area[2];
- var height0 = opts.height - item.y0 - opts.area[2];
- if (seriesIndex > 0) {
- height -= height0;
- }
- context.setFillStyle(fillColor);
- context.moveTo(startX, item.y);
- context.fillRect(startX, item.y, item.width, height);
- context.closePath();
- context.fill();
- }
- };
- break;
- case 'meter':
- // 绘制温度计数据图
- var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
- calPoints.push(points);
- points = fixColumeMeterData(points, eachSpacing, series.length, seriesIndex, config, opts, columnOption.meterBorder);
- for (let i = 0; i < points.length; i++) {
- let item = points[i];
- if (item !== null && i > leftNum && i < rightNum) {
- //画背景颜色
- context.beginPath();
- if (seriesIndex == 0 && columnOption.meterBorder > 0) {
- context.setStrokeStyle(eachSeries.color);
- context.setLineWidth(columnOption.meterBorder * opts.pix);
- }
- if(seriesIndex == 0){
- context.setFillStyle(columnOption.meterFillColor);
- }else{
- context.setFillStyle(item.color || eachSeries.color);
- }
- var startX = item.x - item.width / 2;
- var height = opts.height - item.y - opts.area[2];
- if ((columnOption.barBorderRadius && columnOption.barBorderRadius.length === 4) || columnOption.barBorderCircle === true) {
- const left = startX;
- const top = item.y;
- const width = item.width;
- const height = zeroPoints - item.y;
- if (columnOption.barBorderCircle) {
- columnOption.barBorderRadius = [width / 2, width / 2, 0, 0];
- }
- let [r0, r1, r2, r3] = columnOption.barBorderRadius;
- let minRadius = Math.min(width/2,height/2);
- r0 = r0 > minRadius ? minRadius : r0;
- r1 = r1 > minRadius ? minRadius : r1;
- r2 = r2 > minRadius ? minRadius : r2;
- r3 = r3 > minRadius ? minRadius : r3;
- r0 = r0 < 0 ? 0 : r0;
- r1 = r1 < 0 ? 0 : r1;
- r2 = r2 < 0 ? 0 : r2;
- r3 = r3 < 0 ? 0 : r3;
- context.arc(left + r0, top + r0, r0, -Math.PI, -Math.PI / 2);
- context.arc(left + width - r1, top + r1, r1, -Math.PI / 2, 0);
- context.arc(left + width - r2, top + height - r2, r2, 0, Math.PI / 2);
- context.arc(left + r3, top + height - r3, r3, Math.PI / 2, Math.PI);
- context.fill();
- }else{
- context.moveTo(startX, item.y);
- context.lineTo(startX + item.width, item.y);
- context.lineTo(startX + item.width, zeroPoints);
- context.lineTo(startX, zeroPoints);
- context.lineTo(startX, item.y);
- context.fill();
- }
- if (seriesIndex == 0 && columnOption.meterBorder > 0) {
- context.closePath();
- context.stroke();
- }
- }
- }
- break;
- }
- });
-
- if (opts.dataLabel !== false && process === 1) {
- series.forEach(function(eachSeries, seriesIndex) {
- let ranges, minRange, maxRange;
- ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
- minRange = ranges.pop();
- maxRange = ranges.shift();
- var data = eachSeries.data;
- switch (columnOption.type) {
- case 'group':
- var points = getColumnDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
- points = fixColumeData(points, eachSpacing, series.length, seriesIndex, config, opts);
- drawColumePointText(points, eachSeries, config, context, opts);
- break;
- case 'stack':
- var points = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
- drawColumePointText(points, eachSeries, config, context, opts);
- break;
- case 'meter':
- var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
- drawColumePointText(points, eachSeries, config, context, opts);
- break;
- }
- });
- }
- context.restore();
- return {
- xAxisPoints: xAxisPoints,
- calPoints: calPoints,
- eachSpacing: eachSpacing
- };
-}
-
-function drawMountDataPoints(series, opts, config, context) {
- let process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
- let xAxisData = opts.chartData.xAxisData,
- xAxisPoints = xAxisData.xAxisPoints,
- eachSpacing = xAxisData.eachSpacing;
- let mountOption = assign({}, {
- type: 'mount',
- widthRatio: 1,
- borderWidth: 1,
- barBorderCircle: false,
- barBorderRadius: [],
- linearType: 'none',
- linearOpacity: 1,
- customColor: [],
- colorStop: 0,
- }, opts.extra.mount);
- mountOption.widthRatio = mountOption.widthRatio <= 0 ? 0 : mountOption.widthRatio;
- mountOption.widthRatio = mountOption.widthRatio >= 2 ? 2 : mountOption.widthRatio;
- let calPoints = [];
- context.save();
- let leftNum = -2;
- let rightNum = xAxisPoints.length + 2;
- if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
- context.translate(opts._scrollDistance_, 0);
- leftNum = Math.floor(-opts._scrollDistance_ / eachSpacing) - 2;
- rightNum = leftNum + opts.xAxis.itemCount + 4;
- }
- mountOption.customColor = fillCustomColor(mountOption.linearType, mountOption.customColor, series, config);
- let ranges, minRange, maxRange;
- ranges = [].concat(opts.chartData.yAxisData.ranges[0]);
- minRange = ranges.pop();
- maxRange = ranges.shift();
-
- // 计算0轴坐标
- let spacingValid = opts.height - opts.area[0] - opts.area[2];
- let zeroHeight = spacingValid * (0 - minRange) / (maxRange - minRange);
- let zeroPoints = opts.height - Math.round(zeroHeight) - opts.area[2];
-
- var points = getMountDataPoints(series, minRange, maxRange, xAxisPoints, eachSpacing, opts, mountOption, zeroPoints, process);
- switch (mountOption.type) {
- case 'bar':
- for (let i = 0; i < points.length; i++) {
- let item = points[i];
- if (item !== null && i > leftNum && i < rightNum) {
- var startX = item.x - eachSpacing*mountOption.widthRatio/2;
- var height = opts.height - item.y - opts.area[2];
- context.beginPath();
- var fillColor = item.color || series[i].color
- var strokeColor = item.color || series[i].color
- if (mountOption.linearType !== 'none') {
- var grd = context.createLinearGradient(startX, item.y, startX, zeroPoints);
- //透明渐变
- if (mountOption.linearType == 'opacity') {
- grd.addColorStop(0, hexToRgb(fillColor, mountOption.linearOpacity));
- grd.addColorStop(1, hexToRgb(fillColor, 1));
- } else {
- grd.addColorStop(0, hexToRgb(mountOption.customColor[series[i].linearIndex], mountOption.linearOpacity));
- grd.addColorStop(mountOption.colorStop, hexToRgb(mountOption.customColor[series[i].linearIndex],mountOption.linearOpacity));
- grd.addColorStop(1, hexToRgb(fillColor, 1));
- }
- fillColor = grd
- }
- // 圆角边框
- if ((mountOption.barBorderRadius && mountOption.barBorderRadius.length === 4) || mountOption.barBorderCircle === true) {
- const left = startX;
- const top = item.y > zeroPoints ? zeroPoints : item.y;
- const width = item.width;
- const height = Math.abs(zeroPoints - item.y);
- if (mountOption.barBorderCircle) {
- mountOption.barBorderRadius = [width / 2, width / 2, 0, 0];
- }
- if(item.y > zeroPoints){
- mountOption.barBorderRadius = [0, 0,width / 2, width / 2];
- }
- let [r0, r1, r2, r3] = mountOption.barBorderRadius;
- let minRadius = Math.min(width/2,height/2);
- r0 = r0 > minRadius ? minRadius : r0;
- r1 = r1 > minRadius ? minRadius : r1;
- r2 = r2 > minRadius ? minRadius : r2;
- r3 = r3 > minRadius ? minRadius : r3;
- r0 = r0 < 0 ? 0 : r0;
- r1 = r1 < 0 ? 0 : r1;
- r2 = r2 < 0 ? 0 : r2;
- r3 = r3 < 0 ? 0 : r3;
- context.arc(left + r0, top + r0, r0, -Math.PI, -Math.PI / 2);
- context.arc(left + width - r1, top + r1, r1, -Math.PI / 2, 0);
- context.arc(left + width - r2, top + height - r2, r2, 0, Math.PI / 2);
- context.arc(left + r3, top + height - r3, r3, Math.PI / 2, Math.PI);
- } else {
- context.moveTo(startX, item.y);
- context.lineTo(startX + item.width, item.y);
- context.lineTo(startX + item.width, zeroPoints);
- context.lineTo(startX, zeroPoints);
- context.lineTo(startX, item.y);
- }
- context.setStrokeStyle(strokeColor);
- context.setFillStyle(fillColor);
- if(mountOption.borderWidth > 0){
- context.setLineWidth(mountOption.borderWidth * opts.pix);
- context.closePath();
- context.stroke();
- }
- context.fill();
- }
- };
- break;
- case 'triangle':
- for (let i = 0; i < points.length; i++) {
- let item = points[i];
- if (item !== null && i > leftNum && i < rightNum) {
- var startX = item.x - eachSpacing*mountOption.widthRatio/2;
- var height = opts.height - item.y - opts.area[2];
- context.beginPath();
- var fillColor = item.color || series[i].color
- var strokeColor = item.color || series[i].color
- if (mountOption.linearType !== 'none') {
- var grd = context.createLinearGradient(startX, item.y, startX, zeroPoints);
- //透明渐变
- if (mountOption.linearType == 'opacity') {
- grd.addColorStop(0, hexToRgb(fillColor, mountOption.linearOpacity));
- grd.addColorStop(1, hexToRgb(fillColor, 1));
- } else {
- grd.addColorStop(0, hexToRgb(mountOption.customColor[series[i].linearIndex], mountOption.linearOpacity));
- grd.addColorStop(mountOption.colorStop, hexToRgb(mountOption.customColor[series[i].linearIndex],mountOption.linearOpacity));
- grd.addColorStop(1, hexToRgb(fillColor, 1));
- }
- fillColor = grd
- }
- context.moveTo(startX, zeroPoints);
- context.lineTo(item.x, item.y);
- context.lineTo(startX + item.width, zeroPoints);
- context.setStrokeStyle(strokeColor);
- context.setFillStyle(fillColor);
- if(mountOption.borderWidth > 0){
- context.setLineWidth(mountOption.borderWidth * opts.pix);
- context.stroke();
- }
- context.fill();
- }
- };
- break;
- case 'mount':
- for (let i = 0; i < points.length; i++) {
- let item = points[i];
- if (item !== null && i > leftNum && i < rightNum) {
- var startX = item.x - eachSpacing*mountOption.widthRatio/2;
- var height = opts.height - item.y - opts.area[2];
- context.beginPath();
- var fillColor = item.color || series[i].color
- var strokeColor = item.color || series[i].color
- if (mountOption.linearType !== 'none') {
- var grd = context.createLinearGradient(startX, item.y, startX, zeroPoints);
- //透明渐变
- if (mountOption.linearType == 'opacity') {
- grd.addColorStop(0, hexToRgb(fillColor, mountOption.linearOpacity));
- grd.addColorStop(1, hexToRgb(fillColor, 1));
- } else {
- grd.addColorStop(0, hexToRgb(mountOption.customColor[series[i].linearIndex], mountOption.linearOpacity));
- grd.addColorStop(mountOption.colorStop, hexToRgb(mountOption.customColor[series[i].linearIndex],mountOption.linearOpacity));
- grd.addColorStop(1, hexToRgb(fillColor, 1));
- }
- fillColor = grd
- }
- context.moveTo(startX, zeroPoints);
- context.bezierCurveTo(item.x - item.width/4, zeroPoints, item.x - item.width/4, item.y, item.x, item.y);
- context.bezierCurveTo(item.x + item.width/4, item.y, item.x + item.width/4, zeroPoints, startX + item.width, zeroPoints);
- context.setStrokeStyle(strokeColor);
- context.setFillStyle(fillColor);
- if(mountOption.borderWidth > 0){
- context.setLineWidth(mountOption.borderWidth * opts.pix);
- context.stroke();
- }
- context.fill();
- }
- };
- break;
- case 'sharp':
- for (let i = 0; i < points.length; i++) {
- let item = points[i];
- if (item !== null && i > leftNum && i < rightNum) {
- var startX = item.x - eachSpacing*mountOption.widthRatio/2;
- var height = opts.height - item.y - opts.area[2];
- context.beginPath();
- var fillColor = item.color || series[i].color
- var strokeColor = item.color || series[i].color
- if (mountOption.linearType !== 'none') {
- var grd = context.createLinearGradient(startX, item.y, startX, zeroPoints);
- //透明渐变
- if (mountOption.linearType == 'opacity') {
- grd.addColorStop(0, hexToRgb(fillColor, mountOption.linearOpacity));
- grd.addColorStop(1, hexToRgb(fillColor, 1));
- } else {
- grd.addColorStop(0, hexToRgb(mountOption.customColor[series[i].linearIndex], mountOption.linearOpacity));
- grd.addColorStop(mountOption.colorStop, hexToRgb(mountOption.customColor[series[i].linearIndex],mountOption.linearOpacity));
- grd.addColorStop(1, hexToRgb(fillColor, 1));
- }
- fillColor = grd
- }
- context.moveTo(startX, zeroPoints);
- context.quadraticCurveTo(item.x - 0, zeroPoints - height/4, item.x, item.y);
- context.quadraticCurveTo(item.x + 0, zeroPoints - height/4, startX + item.width, zeroPoints)
- context.setStrokeStyle(strokeColor);
- context.setFillStyle(fillColor);
- if(mountOption.borderWidth > 0){
- context.setLineWidth(mountOption.borderWidth * opts.pix);
- context.stroke();
- }
- context.fill();
- }
- };
- break;
- }
-
- if (opts.dataLabel !== false && process === 1) {
- let ranges, minRange, maxRange;
- ranges = [].concat(opts.chartData.yAxisData.ranges[0]);
- minRange = ranges.pop();
- maxRange = ranges.shift();
- var points = getMountDataPoints(series, minRange, maxRange, xAxisPoints, eachSpacing, opts, mountOption, zeroPoints, process);
- drawMountPointText(points, series, config, context, opts, zeroPoints);
- }
- context.restore();
- return {
- xAxisPoints: xAxisPoints,
- calPoints: points,
- eachSpacing: eachSpacing
- };
-}
-
-function drawBarDataPoints(series, opts, config, context) {
- let process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
- let yAxisPoints = [];
- let eachSpacing = (opts.height - opts.area[0] - opts.area[2])/opts.categories.length;
- for (let i = 0; i < opts.categories.length; i++) {
- yAxisPoints.push(opts.area[0] + eachSpacing / 2 + eachSpacing * i);
- }
- let columnOption = assign({}, {
- type: 'group',
- width: eachSpacing / 2,
- meterBorder: 4,
- meterFillColor: '#FFFFFF',
- barBorderCircle: false,
- barBorderRadius: [],
- seriesGap: 2,
- linearType: 'none',
- linearOpacity: 1,
- customColor: [],
- colorStop: 0,
- }, opts.extra.bar);
- let calPoints = [];
- context.save();
- let leftNum = -2;
- let rightNum = yAxisPoints.length + 2;
- if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) {
- drawBarToolTipSplitArea(opts.tooltip.offset.y, opts, config, context, eachSpacing);
- }
- columnOption.customColor = fillCustomColor(columnOption.linearType, columnOption.customColor, series, config);
- series.forEach(function(eachSeries, seriesIndex) {
- let ranges, minRange, maxRange;
- ranges = [].concat(opts.chartData.xAxisData.ranges);
- maxRange = ranges.pop();
- minRange = ranges.shift();
- var data = eachSeries.data;
- switch (columnOption.type) {
- case 'group':
- var points = getBarDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, process);
- var tooltipPoints = getBarStackDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
- calPoints.push(tooltipPoints);
- points = fixBarData(points, eachSpacing, series.length, seriesIndex, config, opts);
- for (let i = 0; i < points.length; i++) {
- let item = points[i];
- //fix issues/I27B1N yyoinge & Joeshu
- if (item !== null && i > leftNum && i < rightNum) {
- //var startX = item.x - item.width / 2;
- var startX = opts.area[3];
- var startY = item.y - item.width / 2;
- var height = item.height;
- context.beginPath();
- var fillColor = item.color || eachSeries.color
- var strokeColor = item.color || eachSeries.color
- if (columnOption.linearType !== 'none') {
- var grd = context.createLinearGradient(startX, item.y, item.x, item.y);
- //透明渐变
- if (columnOption.linearType == 'opacity') {
- grd.addColorStop(0, hexToRgb(fillColor, columnOption.linearOpacity));
- grd.addColorStop(1, hexToRgb(fillColor, 1));
- } else {
- grd.addColorStop(0, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
- grd.addColorStop(columnOption.colorStop, hexToRgb(columnOption.customColor[eachSeries.linearIndex],columnOption.linearOpacity));
- grd.addColorStop(1, hexToRgb(fillColor, 1));
- }
- fillColor = grd
- }
- // 圆角边框
- if ((columnOption.barBorderRadius && columnOption.barBorderRadius.length === 4) || columnOption.barBorderCircle === true) {
- const left = startX;
- const width = item.width;
- const top = item.y - item.width / 2;
- const height = item.height;
- if (columnOption.barBorderCircle) {
- columnOption.barBorderRadius = [width / 2, width / 2, 0, 0];
- }
- let [r0, r1, r2, r3] = columnOption.barBorderRadius;
- let minRadius = Math.min(width/2,height/2);
- r0 = r0 > minRadius ? minRadius : r0;
- r1 = r1 > minRadius ? minRadius : r1;
- r2 = r2 > minRadius ? minRadius : r2;
- r3 = r3 > minRadius ? minRadius : r3;
- r0 = r0 < 0 ? 0 : r0;
- r1 = r1 < 0 ? 0 : r1;
- r2 = r2 < 0 ? 0 : r2;
- r3 = r3 < 0 ? 0 : r3;
-
- context.arc(left + r3, top + r3, r3, -Math.PI, -Math.PI / 2);
- context.arc(item.x - r0, top + r0, r0, -Math.PI / 2, 0);
- context.arc(item.x - r1, top + width - r1, r1, 0, Math.PI / 2);
- context.arc(left + r2, top + width - r2, r2, Math.PI / 2, Math.PI);
- } else {
- context.moveTo(startX, startY);
- context.lineTo(item.x, startY);
- context.lineTo(item.x, startY + item.width);
- context.lineTo(startX, startY + item.width);
- context.lineTo(startX, startY);
- context.setLineWidth(1)
- context.setStrokeStyle(strokeColor);
- }
- context.setFillStyle(fillColor);
- context.closePath();
- //context.stroke();
- context.fill();
- }
- };
- break;
- case 'stack':
- // 绘制堆叠数据图
- var points = getBarStackDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
- calPoints.push(points);
- points = fixBarStackData(points, eachSpacing, series.length, seriesIndex, config, opts, series);
- for (let i = 0; i < points.length; i++) {
- let item = points[i];
- if (item !== null && i > leftNum && i < rightNum) {
- context.beginPath();
- var fillColor = item.color || eachSeries.color;
- var startX = item.x0;
- context.setFillStyle(fillColor);
- context.moveTo(startX, item.y - item.width/2);
- context.fillRect(startX, item.y - item.width/2, item.height , item.width);
- context.closePath();
- context.fill();
- }
- };
- break;
- }
- });
-
- if (opts.dataLabel !== false && process === 1) {
- series.forEach(function(eachSeries, seriesIndex) {
- let ranges, minRange, maxRange;
- ranges = [].concat(opts.chartData.xAxisData.ranges);
- maxRange = ranges.pop();
- minRange = ranges.shift();
- var data = eachSeries.data;
- switch (columnOption.type) {
- case 'group':
- var points = getBarDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, process);
- points = fixBarData(points, eachSpacing, series.length, seriesIndex, config, opts);
- drawBarPointText(points, eachSeries, config, context, opts);
- break;
- case 'stack':
- var points = getBarStackDataPoints(data, minRange, maxRange, yAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
- drawBarPointText(points, eachSeries, config, context, opts);
- break;
- }
- });
- }
- return {
- yAxisPoints: yAxisPoints,
- calPoints: calPoints,
- eachSpacing: eachSpacing
- };
-}
-
-function drawCandleDataPoints(series, seriesMA, opts, config, context) {
- var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
- var candleOption = assign({}, {
- color: {},
- average: {}
- }, opts.extra.candle);
- candleOption.color = assign({}, {
- upLine: '#f04864',
- upFill: '#f04864',
- downLine: '#2fc25b',
- downFill: '#2fc25b'
- }, candleOption.color);
- candleOption.average = assign({}, {
- show: false,
- name: [],
- day: [],
- color: config.color
- }, candleOption.average);
- opts.extra.candle = candleOption;
- let xAxisData = opts.chartData.xAxisData,
- xAxisPoints = xAxisData.xAxisPoints,
- eachSpacing = xAxisData.eachSpacing;
- let calPoints = [];
- context.save();
- let leftNum = -2;
- let rightNum = xAxisPoints.length + 2;
- let leftSpace = 0;
- let rightSpace = opts.width + eachSpacing;
- if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
- context.translate(opts._scrollDistance_, 0);
- leftNum = Math.floor(-opts._scrollDistance_ / eachSpacing) - 2;
- rightNum = leftNum + opts.xAxis.itemCount + 4;
- leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
- rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
- }
- //画均线
- if (candleOption.average.show || seriesMA) { //Merge pull request !12 from 邱贵翔
- seriesMA.forEach(function(eachSeries, seriesIndex) {
- let ranges, minRange, maxRange;
- ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
- minRange = ranges.pop();
- maxRange = ranges.shift();
- var data = eachSeries.data;
- var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
- var splitPointList = splitPoints(points,eachSeries);
- for (let i = 0; i < splitPointList.length; i++) {
- let points = splitPointList[i];
- context.beginPath();
- context.setStrokeStyle(eachSeries.color);
- context.setLineWidth(1);
- if (points.length === 1) {
- context.moveTo(points[0].x, points[0].y);
- context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI);
- } else {
- context.moveTo(points[0].x, points[0].y);
- let startPoint = 0;
- for (let j = 0; j < points.length; j++) {
- let item = points[j];
- if (startPoint == 0 && item.x > leftSpace) {
- context.moveTo(item.x, item.y);
- startPoint = 1;
- }
- if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
- var ctrlPoint = createCurveControlPoints(points, j - 1);
- context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x,
- item.y);
- }
- }
- context.moveTo(points[0].x, points[0].y);
- }
- context.closePath();
- context.stroke();
- }
- });
- }
- //画K线
- series.forEach(function(eachSeries, seriesIndex) {
- let ranges, minRange, maxRange;
- ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
- minRange = ranges.pop();
- maxRange = ranges.shift();
- var data = eachSeries.data;
- var points = getCandleDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
- calPoints.push(points);
- var splitPointList = splitPoints(points,eachSeries);
- for (let i = 0; i < splitPointList[0].length; i++) {
- if (i > leftNum && i < rightNum) {
- let item = splitPointList[0][i];
- context.beginPath();
- //如果上涨
- if (data[i][1] - data[i][0] > 0) {
- context.setStrokeStyle(candleOption.color.upLine);
- context.setFillStyle(candleOption.color.upFill);
- context.setLineWidth(1 * opts.pix);
- context.moveTo(item[3].x, item[3].y); //顶点
- context.lineTo(item[1].x, item[1].y); //收盘中间点
- context.lineTo(item[1].x - eachSpacing / 4, item[1].y); //收盘左侧点
- context.lineTo(item[0].x - eachSpacing / 4, item[0].y); //开盘左侧点
- context.lineTo(item[0].x, item[0].y); //开盘中间点
- context.lineTo(item[2].x, item[2].y); //底点
- context.lineTo(item[0].x, item[0].y); //开盘中间点
- context.lineTo(item[0].x + eachSpacing / 4, item[0].y); //开盘右侧点
- context.lineTo(item[1].x + eachSpacing / 4, item[1].y); //收盘右侧点
- context.lineTo(item[1].x, item[1].y); //收盘中间点
- context.moveTo(item[3].x, item[3].y); //顶点
- } else {
- context.setStrokeStyle(candleOption.color.downLine);
- context.setFillStyle(candleOption.color.downFill);
- context.setLineWidth(1 * opts.pix);
- context.moveTo(item[3].x, item[3].y); //顶点
- context.lineTo(item[0].x, item[0].y); //开盘中间点
- context.lineTo(item[0].x - eachSpacing / 4, item[0].y); //开盘左侧点
- context.lineTo(item[1].x - eachSpacing / 4, item[1].y); //收盘左侧点
- context.lineTo(item[1].x, item[1].y); //收盘中间点
- context.lineTo(item[2].x, item[2].y); //底点
- context.lineTo(item[1].x, item[1].y); //收盘中间点
- context.lineTo(item[1].x + eachSpacing / 4, item[1].y); //收盘右侧点
- context.lineTo(item[0].x + eachSpacing / 4, item[0].y); //开盘右侧点
- context.lineTo(item[0].x, item[0].y); //开盘中间点
- context.moveTo(item[3].x, item[3].y); //顶点
- }
- context.closePath();
- context.fill();
- context.stroke();
- }
- }
- });
- context.restore();
- return {
- xAxisPoints: xAxisPoints,
- calPoints: calPoints,
- eachSpacing: eachSpacing
- };
-}
-
-function drawAreaDataPoints(series, opts, config, context) {
- var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
- var areaOption = assign({}, {
- type: 'straight',
- opacity: 0.2,
- addLine: false,
- width: 2,
- gradient: false,
- activeType: 'none'
- }, opts.extra.area);
- let xAxisData = opts.chartData.xAxisData,
- xAxisPoints = xAxisData.xAxisPoints,
- eachSpacing = xAxisData.eachSpacing;
- let endY = opts.height - opts.area[2];
- let calPoints = [];
- context.save();
- let leftSpace = 0;
- let rightSpace = opts.width + eachSpacing;
- if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
- context.translate(opts._scrollDistance_, 0);
- leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
- rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
- }
- series.forEach(function(eachSeries, seriesIndex) {
- let ranges, minRange, maxRange;
- ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
- minRange = ranges.pop();
- maxRange = ranges.shift();
- let data = eachSeries.data;
- let points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
- calPoints.push(points);
- let splitPointList = splitPoints(points,eachSeries);
- for (let i = 0; i < splitPointList.length; i++) {
- let points = splitPointList[i];
- // 绘制区域数
- context.beginPath();
- context.setStrokeStyle(hexToRgb(eachSeries.color, areaOption.opacity));
- if (areaOption.gradient) {
- let gradient = context.createLinearGradient(0, opts.area[0], 0, opts.height - opts.area[2]);
- gradient.addColorStop('0', hexToRgb(eachSeries.color, areaOption.opacity));
- gradient.addColorStop('1.0', hexToRgb("#FFFFFF", 0.1));
- context.setFillStyle(gradient);
- } else {
- context.setFillStyle(hexToRgb(eachSeries.color, areaOption.opacity));
- }
- context.setLineWidth(areaOption.width * opts.pix);
- if (points.length > 1) {
- let firstPoint = points[0];
- let lastPoint = points[points.length - 1];
- context.moveTo(firstPoint.x, firstPoint.y);
- let startPoint = 0;
- if (areaOption.type === 'curve') {
- for (let j = 0; j < points.length; j++) {
- let item = points[j];
- if (startPoint == 0 && item.x > leftSpace) {
- context.moveTo(item.x, item.y);
- startPoint = 1;
- }
- if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
- let ctrlPoint = createCurveControlPoints(points, j - 1);
- context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);
- }
- };
- }
- if (areaOption.type === 'straight') {
- for (let j = 0; j < points.length; j++) {
- let item = points[j];
- if (startPoint == 0 && item.x > leftSpace) {
- context.moveTo(item.x, item.y);
- startPoint = 1;
- }
- if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
- context.lineTo(item.x, item.y);
- }
- };
- }
- if (areaOption.type === 'step') {
- for (let j = 0; j < points.length; j++) {
- let item = points[j];
- if (startPoint == 0 && item.x > leftSpace) {
- context.moveTo(item.x, item.y);
- startPoint = 1;
- }
- if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
- context.lineTo(item.x, points[j - 1].y);
- context.lineTo(item.x, item.y);
- }
- };
- }
- context.lineTo(lastPoint.x, endY);
- context.lineTo(firstPoint.x, endY);
- context.lineTo(firstPoint.x, firstPoint.y);
- } else {
- let item = points[0];
- context.moveTo(item.x - eachSpacing / 2, item.y);
- // context.lineTo(item.x + eachSpacing / 2, item.y);
- // context.lineTo(item.x + eachSpacing / 2, endY);
- // context.lineTo(item.x - eachSpacing / 2, endY);
- // context.moveTo(item.x - eachSpacing / 2, item.y);
- }
- context.closePath();
- context.fill();
- //画连线
- if (areaOption.addLine) {
- if (eachSeries.lineType == 'dash') {
- let dashLength = eachSeries.dashLength ? eachSeries.dashLength : 8;
- dashLength *= opts.pix;
- context.setLineDash([dashLength, dashLength]);
- }
- context.beginPath();
- context.setStrokeStyle(eachSeries.color);
- context.setLineWidth(areaOption.width * opts.pix);
- if (points.length === 1) {
- context.moveTo(points[0].x, points[0].y);
- // context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI);
- } else {
- context.moveTo(points[0].x, points[0].y);
- let startPoint = 0;
- if (areaOption.type === 'curve') {
- for (let j = 0; j < points.length; j++) {
- let item = points[j];
- if (startPoint == 0 && item.x > leftSpace) {
- context.moveTo(item.x, item.y);
- startPoint = 1;
- }
- if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
- let ctrlPoint = createCurveControlPoints(points, j - 1);
- context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);
- }
- };
- }
- if (areaOption.type === 'straight') {
- for (let j = 0; j < points.length; j++) {
- let item = points[j];
- if (startPoint == 0 && item.x > leftSpace) {
- context.moveTo(item.x, item.y);
- startPoint = 1;
- }
- if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
- context.lineTo(item.x, item.y);
- }
- };
- }
- if (areaOption.type === 'step') {
- for (let j = 0; j < points.length; j++) {
- let item = points[j];
- if (startPoint == 0 && item.x > leftSpace) {
- context.moveTo(item.x, item.y);
- startPoint = 1;
- }
- if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
- context.lineTo(item.x, points[j - 1].y);
- context.lineTo(item.x, item.y);
- }
- };
- }
- context.moveTo(points[0].x, points[0].y);
- }
- context.stroke();
- context.setLineDash([]);
- }
- }
- //画点
- if (opts.dataPointShape !== false) {
- drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
- }
- drawActivePoint(points, eachSeries.color, eachSeries.pointShape, context, opts, areaOption,seriesIndex);
- });
-
- if (opts.dataLabel !== false && process === 1) {
- series.forEach(function(eachSeries, seriesIndex) {
- let ranges, minRange, maxRange;
- ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
- minRange = ranges.pop();
- maxRange = ranges.shift();
- var data = eachSeries.data;
- var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
- drawPointText(points, eachSeries, config, context, opts);
- });
- }
- context.restore();
- return {
- xAxisPoints: xAxisPoints,
- calPoints: calPoints,
- eachSpacing: eachSpacing
- };
-}
-
-function drawScatterDataPoints(series, opts, config, context) {
- var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
- var scatterOption = assign({}, {
- type: 'circle'
- }, opts.extra.scatter);
- let xAxisData = opts.chartData.xAxisData,
- xAxisPoints = xAxisData.xAxisPoints,
- eachSpacing = xAxisData.eachSpacing;
- var calPoints = [];
- context.save();
- let leftSpace = 0;
- let rightSpace = opts.width + eachSpacing;
- if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
- context.translate(opts._scrollDistance_, 0);
- leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
- rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
- }
- series.forEach(function(eachSeries, seriesIndex) {
- let ranges, minRange, maxRange;
- ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
- minRange = ranges.pop();
- maxRange = ranges.shift();
- var data = eachSeries.data;
- var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
- context.beginPath();
- context.setStrokeStyle(eachSeries.color);
- context.setFillStyle(eachSeries.color);
- context.setLineWidth(1 * opts.pix);
- var shape = eachSeries.pointShape;
- if (shape === 'diamond') {
- points.forEach(function(item, index) {
- if (item !== null) {
- context.moveTo(item.x, item.y - 4.5);
- context.lineTo(item.x - 4.5, item.y);
- context.lineTo(item.x, item.y + 4.5);
- context.lineTo(item.x + 4.5, item.y);
- context.lineTo(item.x, item.y - 4.5);
- }
- });
- } else if (shape === 'circle') {
- points.forEach(function(item, index) {
- if (item !== null) {
- context.moveTo(item.x + 2.5 * opts.pix, item.y);
- context.arc(item.x, item.y, 3 * opts.pix, 0, 2 * Math.PI, false);
- }
- });
- } else if (shape === 'square') {
- points.forEach(function(item, index) {
- if (item !== null) {
- context.moveTo(item.x - 3.5, item.y - 3.5);
- context.rect(item.x - 3.5, item.y - 3.5, 7, 7);
- }
- });
- } else if (shape === 'triangle') {
- points.forEach(function(item, index) {
- if (item !== null) {
- context.moveTo(item.x, item.y - 4.5);
- context.lineTo(item.x - 4.5, item.y + 4.5);
- context.lineTo(item.x + 4.5, item.y + 4.5);
- context.lineTo(item.x, item.y - 4.5);
- }
- });
- } else if (shape === 'triangle') {
- return;
- }
- context.closePath();
- context.fill();
- context.stroke();
- });
- if (opts.dataLabel !== false && process === 1) {
- series.forEach(function(eachSeries, seriesIndex) {
- let ranges, minRange, maxRange;
- ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
- minRange = ranges.pop();
- maxRange = ranges.shift();
- var data = eachSeries.data;
- var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
- drawPointText(points, eachSeries, config, context, opts);
- });
- }
- context.restore();
- return {
- xAxisPoints: xAxisPoints,
- calPoints: calPoints,
- eachSpacing: eachSpacing
- };
-}
-
-function drawBubbleDataPoints(series, opts, config, context) {
- var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
- var bubbleOption = assign({}, {
- opacity: 1,
- border:2
- }, opts.extra.bubble);
- let xAxisData = opts.chartData.xAxisData,
- xAxisPoints = xAxisData.xAxisPoints,
- eachSpacing = xAxisData.eachSpacing;
- var calPoints = [];
- context.save();
- let leftSpace = 0;
- let rightSpace = opts.width + eachSpacing;
- if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
- context.translate(opts._scrollDistance_, 0);
- leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
- rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
- }
- series.forEach(function(eachSeries, seriesIndex) {
- let ranges, minRange, maxRange;
- ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
- minRange = ranges.pop();
- maxRange = ranges.shift();
- var data = eachSeries.data;
- var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
- context.beginPath();
- context.setStrokeStyle(eachSeries.color);
- context.setLineWidth(bubbleOption.border * opts.pix);
- context.setFillStyle(hexToRgb(eachSeries.color, bubbleOption.opacity));
- points.forEach(function(item, index) {
- context.moveTo(item.x + item.r, item.y);
- context.arc(item.x, item.y, item.r * opts.pix, 0, 2 * Math.PI, false);
- });
- context.closePath();
- context.fill();
- context.stroke();
-
- if (opts.dataLabel !== false && process === 1) {
- points.forEach(function(item, index) {
- context.beginPath();
- var fontSize = eachSeries.textSize * opts.pix || config.fontSize;
- context.setFontSize(fontSize);
- context.setFillStyle(eachSeries.textColor || "#FFFFFF");
- context.setTextAlign('center');
- context.fillText(String(item.t), item.x, item.y + fontSize/2);
- context.closePath();
- context.stroke();
- context.setTextAlign('left');
- });
- }
- });
- context.restore();
- return {
- xAxisPoints: xAxisPoints,
- calPoints: calPoints,
- eachSpacing: eachSpacing
- };
-}
-
-function drawLineDataPoints(series, opts, config, context) {
- var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
- var lineOption = assign({}, {
- type: 'straight',
- width: 2,
- activeType: 'none',
- linearType: 'none',
- onShadow: false,
- animation: 'vertical',
- }, opts.extra.line);
- lineOption.width *= opts.pix;
- let xAxisData = opts.chartData.xAxisData,
- xAxisPoints = xAxisData.xAxisPoints,
- eachSpacing = xAxisData.eachSpacing;
- var calPoints = [];
- context.save();
- let leftSpace = 0;
- let rightSpace = opts.width + eachSpacing;
- if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
- context.translate(opts._scrollDistance_, 0);
- leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
- rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
- }
- series.forEach(function(eachSeries, seriesIndex) {
- // 这段很神奇的代码用于解决ios16的setStrokeStyle失效的bug
- context.beginPath();
- context.setStrokeStyle(eachSeries.color);
- context.moveTo(-10000, -10000);
- context.lineTo(-10001, -10001);
- context.stroke();
- let ranges, minRange, maxRange;
- ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
- minRange = ranges.pop();
- maxRange = ranges.shift();
- var data = eachSeries.data;
- var points = getLineDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, lineOption, process);
- calPoints.push(points);
- var splitPointList = splitPoints(points,eachSeries);
- if (eachSeries.lineType == 'dash') {
- let dashLength = eachSeries.dashLength ? eachSeries.dashLength : 8;
- dashLength *= opts.pix;
- context.setLineDash([dashLength, dashLength]);
- }
- context.beginPath();
- var strokeColor = eachSeries.color;
- if (lineOption.linearType !== 'none' && eachSeries.linearColor && eachSeries.linearColor.length > 0) {
- var grd = context.createLinearGradient(opts.chartData.xAxisData.startX, opts.height/2, opts.chartData.xAxisData.endX, opts.height/2);
- for (var i = 0; i < eachSeries.linearColor.length; i++) {
- grd.addColorStop(eachSeries.linearColor[i][0], hexToRgb(eachSeries.linearColor[i][1], 1));
- }
- strokeColor = grd
- }
- context.setStrokeStyle(strokeColor);
- if (lineOption.onShadow == true && eachSeries.setShadow && eachSeries.setShadow.length > 0) {
- context.setShadow(eachSeries.setShadow[0], eachSeries.setShadow[1], eachSeries.setShadow[2], eachSeries.setShadow[3]);
- }else{
- context.setShadow(0, 0, 0, 'rgba(0,0,0,0)');
- }
- context.setLineWidth(lineOption.width);
- splitPointList.forEach(function(points, index) {
- if (points.length === 1) {
- context.moveTo(points[0].x, points[0].y);
- // context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI);
- } else {
- context.moveTo(points[0].x, points[0].y);
- let startPoint = 0;
- if (lineOption.type === 'curve') {
- for (let j = 0; j < points.length; j++) {
- let item = points[j];
- if (startPoint == 0 && item.x > leftSpace) {
- context.moveTo(item.x, item.y);
- startPoint = 1;
- }
- if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
- var ctrlPoint = createCurveControlPoints(points, j - 1);
- context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);
- }
- };
- }
- if (lineOption.type === 'straight') {
- for (let j = 0; j < points.length; j++) {
- let item = points[j];
- if (startPoint == 0 && item.x > leftSpace) {
- context.moveTo(item.x, item.y);
- startPoint = 1;
- }
- if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
- context.lineTo(item.x, item.y);
- }
- };
- }
- if (lineOption.type === 'step') {
- for (let j = 0; j < points.length; j++) {
- let item = points[j];
- if (startPoint == 0 && item.x > leftSpace) {
- context.moveTo(item.x, item.y);
- startPoint = 1;
- }
- if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
- context.lineTo(item.x, points[j - 1].y);
- context.lineTo(item.x, item.y);
- }
- };
- }
- context.moveTo(points[0].x, points[0].y);
- }
- });
- context.stroke();
- context.setLineDash([]);
- if (opts.dataPointShape !== false) {
- drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
- }
- drawActivePoint(points, eachSeries.color, eachSeries.pointShape, context, opts, lineOption);
- });
- if (opts.dataLabel !== false && process === 1) {
- series.forEach(function(eachSeries, seriesIndex) {
- let ranges, minRange, maxRange;
- ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
- minRange = ranges.pop();
- maxRange = ranges.shift();
- var data = eachSeries.data;
- var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
- drawPointText(points, eachSeries, config, context, opts);
- });
- }
- context.restore();
- return {
- xAxisPoints: xAxisPoints,
- calPoints: calPoints,
- eachSpacing: eachSpacing
- };
-}
-
-function drawMixDataPoints(series, opts, config, context) {
- let process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
- let xAxisData = opts.chartData.xAxisData,
- xAxisPoints = xAxisData.xAxisPoints,
- eachSpacing = xAxisData.eachSpacing;
- let columnOption = assign({}, {
- width: eachSpacing / 2,
- barBorderCircle: false,
- barBorderRadius: [],
- seriesGap: 2,
- linearType: 'none',
- linearOpacity: 1,
- customColor: [],
- colorStop: 0,
- }, opts.extra.mix.column);
- let areaOption = assign({}, {
- opacity: 0.2,
- gradient: false
- }, opts.extra.mix.area);
- let lineOption = assign({}, {
- width: 2
- }, opts.extra.mix.line);
- let endY = opts.height - opts.area[2];
- let calPoints = [];
- var columnIndex = 0;
- var columnLength = 0;
- series.forEach(function(eachSeries, seriesIndex) {
- if (eachSeries.type == 'column') {
- columnLength += 1;
- }
- });
- context.save();
- let leftNum = -2;
- let rightNum = xAxisPoints.length + 2;
- let leftSpace = 0;
- let rightSpace = opts.width + eachSpacing;
- if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
- context.translate(opts._scrollDistance_, 0);
- leftNum = Math.floor(-opts._scrollDistance_ / eachSpacing) - 2;
- rightNum = leftNum + opts.xAxis.itemCount + 4;
- leftSpace = -opts._scrollDistance_ - eachSpacing * 2 + opts.area[3];
- rightSpace = leftSpace + (opts.xAxis.itemCount + 4) * eachSpacing;
- }
- columnOption.customColor = fillCustomColor(columnOption.linearType, columnOption.customColor, series, config);
- series.forEach(function(eachSeries, seriesIndex) {
- let ranges, minRange, maxRange;
- ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
- minRange = ranges.pop();
- maxRange = ranges.shift();
- var data = eachSeries.data;
- var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
- calPoints.push(points);
- // 绘制柱状数据图
- if (eachSeries.type == 'column') {
- points = fixColumeData(points, eachSpacing, columnLength, columnIndex, config, opts);
- for (let i = 0; i < points.length; i++) {
- let item = points[i];
- if (item !== null && i > leftNum && i < rightNum) {
- var startX = item.x - item.width / 2;
- var height = opts.height - item.y - opts.area[2];
- context.beginPath();
- var fillColor = item.color || eachSeries.color
- var strokeColor = item.color || eachSeries.color
- if (columnOption.linearType !== 'none') {
- var grd = context.createLinearGradient(startX, item.y, startX, opts.height - opts.area[2]);
- //透明渐变
- if (columnOption.linearType == 'opacity') {
- grd.addColorStop(0, hexToRgb(fillColor, columnOption.linearOpacity));
- grd.addColorStop(1, hexToRgb(fillColor, 1));
- } else {
- grd.addColorStop(0, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
- grd.addColorStop(columnOption.colorStop, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
- grd.addColorStop(1, hexToRgb(fillColor, 1));
- }
- fillColor = grd
- }
- // 圆角边框
- if ((columnOption.barBorderRadius && columnOption.barBorderRadius.length === 4) || columnOption.barBorderCircle) {
- const left = startX;
- const top = item.y;
- const width = item.width;
- const height = opts.height - opts.area[2] - item.y;
- if (columnOption.barBorderCircle) {
- columnOption.barBorderRadius = [width / 2, width / 2, 0, 0];
- }
- let [r0, r1, r2, r3] = columnOption.barBorderRadius;
- let minRadius = Math.min(width/2,height/2);
- r0 = r0 > minRadius ? minRadius : r0;
- r1 = r1 > minRadius ? minRadius : r1;
- r2 = r2 > minRadius ? minRadius : r2;
- r3 = r3 > minRadius ? minRadius : r3;
- r0 = r0 < 0 ? 0 : r0;
- r1 = r1 < 0 ? 0 : r1;
- r2 = r2 < 0 ? 0 : r2;
- r3 = r3 < 0 ? 0 : r3;
- context.arc(left + r0, top + r0, r0, -Math.PI, -Math.PI / 2);
- context.arc(left + width - r1, top + r1, r1, -Math.PI / 2, 0);
- context.arc(left + width - r2, top + height - r2, r2, 0, Math.PI / 2);
- context.arc(left + r3, top + height - r3, r3, Math.PI / 2, Math.PI);
- } else {
- context.moveTo(startX, item.y);
- context.lineTo(startX + item.width, item.y);
- context.lineTo(startX + item.width, opts.height - opts.area[2]);
- context.lineTo(startX, opts.height - opts.area[2]);
- context.lineTo(startX, item.y);
- context.setLineWidth(1)
- context.setStrokeStyle(strokeColor);
- }
- context.setFillStyle(fillColor);
- context.closePath();
- context.fill();
- }
- }
- columnIndex += 1;
- }
- //绘制区域图数据
- if (eachSeries.type == 'area') {
- let splitPointList = splitPoints(points,eachSeries);
- for (let i = 0; i < splitPointList.length; i++) {
- let points = splitPointList[i];
- // 绘制区域数据
- context.beginPath();
- context.setStrokeStyle(eachSeries.color);
- context.setStrokeStyle(hexToRgb(eachSeries.color, areaOption.opacity));
- if (areaOption.gradient) {
- let gradient = context.createLinearGradient(0, opts.area[0], 0, opts.height - opts.area[2]);
- gradient.addColorStop('0', hexToRgb(eachSeries.color, areaOption.opacity));
- gradient.addColorStop('1.0', hexToRgb("#FFFFFF", 0.1));
- context.setFillStyle(gradient);
- } else {
- context.setFillStyle(hexToRgb(eachSeries.color, areaOption.opacity));
- }
- context.setLineWidth(2 * opts.pix);
- if (points.length > 1) {
- var firstPoint = points[0];
- let lastPoint = points[points.length - 1];
- context.moveTo(firstPoint.x, firstPoint.y);
- let startPoint = 0;
- if (eachSeries.style === 'curve') {
- for (let j = 0; j < points.length; j++) {
- let item = points[j];
- if (startPoint == 0 && item.x > leftSpace) {
- context.moveTo(item.x, item.y);
- startPoint = 1;
- }
- if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
- var ctrlPoint = createCurveControlPoints(points, j - 1);
- context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);
- }
- };
- } else {
- for (let j = 0; j < points.length; j++) {
- let item = points[j];
- if (startPoint == 0 && item.x > leftSpace) {
- context.moveTo(item.x, item.y);
- startPoint = 1;
- }
- if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
- context.lineTo(item.x, item.y);
- }
- };
- }
- context.lineTo(lastPoint.x, endY);
- context.lineTo(firstPoint.x, endY);
- context.lineTo(firstPoint.x, firstPoint.y);
- } else {
- let item = points[0];
- context.moveTo(item.x - eachSpacing / 2, item.y);
- // context.lineTo(item.x + eachSpacing / 2, item.y);
- // context.lineTo(item.x + eachSpacing / 2, endY);
- // context.lineTo(item.x - eachSpacing / 2, endY);
- // context.moveTo(item.x - eachSpacing / 2, item.y);
- }
- context.closePath();
- context.fill();
- }
- }
- // 绘制折线数据图
- if (eachSeries.type == 'line') {
- var splitPointList = splitPoints(points,eachSeries);
- splitPointList.forEach(function(points, index) {
- if (eachSeries.lineType == 'dash') {
- let dashLength = eachSeries.dashLength ? eachSeries.dashLength : 8;
- dashLength *= opts.pix;
- context.setLineDash([dashLength, dashLength]);
- }
- context.beginPath();
- context.setStrokeStyle(eachSeries.color);
- context.setLineWidth(lineOption.width * opts.pix);
- if (points.length === 1) {
- context.moveTo(points[0].x, points[0].y);
- // context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI);
- } else {
- context.moveTo(points[0].x, points[0].y);
- let startPoint = 0;
- if (eachSeries.style == 'curve') {
- for (let j = 0; j < points.length; j++) {
- let item = points[j];
- if (startPoint == 0 && item.x > leftSpace) {
- context.moveTo(item.x, item.y);
- startPoint = 1;
- }
- if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
- var ctrlPoint = createCurveControlPoints(points, j - 1);
- context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y,
- item.x, item.y);
- }
- }
- } else {
- for (let j = 0; j < points.length; j++) {
- let item = points[j];
- if (startPoint == 0 && item.x > leftSpace) {
- context.moveTo(item.x, item.y);
- startPoint = 1;
- }
- if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
- context.lineTo(item.x, item.y);
- }
- }
- }
- context.moveTo(points[0].x, points[0].y);
- }
- context.stroke();
- context.setLineDash([]);
- });
- }
- // 绘制点数据图
- if (eachSeries.type == 'point') {
- eachSeries.addPoint = true;
- }
- if (eachSeries.addPoint == true && eachSeries.type !== 'column') {
- drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
- }
- });
- if (opts.dataLabel !== false && process === 1) {
- var columnIndex = 0;
- series.forEach(function(eachSeries, seriesIndex) {
- let ranges, minRange, maxRange;
- ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
- minRange = ranges.pop();
- maxRange = ranges.shift();
- var data = eachSeries.data;
- var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
- if (eachSeries.type !== 'column') {
- drawPointText(points, eachSeries, config, context, opts);
- } else {
- points = fixColumeData(points, eachSpacing, columnLength, columnIndex, config, opts);
- drawPointText(points, eachSeries, config, context, opts);
- columnIndex += 1;
- }
- });
- }
- context.restore();
- return {
- xAxisPoints: xAxisPoints,
- calPoints: calPoints,
- eachSpacing: eachSpacing,
- }
-}
-
-
-function drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints) {
- var toolTipOption = opts.extra.tooltip || {};
- if (toolTipOption.horizentalLine && opts.tooltip && process === 1 && (opts.type == 'line' || opts.type == 'area' || opts.type == 'column' || opts.type == 'mount' || opts.type == 'candle' || opts.type == 'mix')) {
- drawToolTipHorizentalLine(opts, config, context, eachSpacing, xAxisPoints)
- }
- context.save();
- if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
- context.translate(opts._scrollDistance_, 0);
- }
- if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) {
- drawToolTip(opts.tooltip.textList, opts.tooltip.offset, opts, config, context, eachSpacing, xAxisPoints);
- }
- context.restore();
-
-}
-
-function drawXAxis(categories, opts, config, context) {
-
- let xAxisData = opts.chartData.xAxisData,
- xAxisPoints = xAxisData.xAxisPoints,
- startX = xAxisData.startX,
- endX = xAxisData.endX,
- eachSpacing = xAxisData.eachSpacing;
- var boundaryGap = 'center';
- if (opts.type == 'bar' || opts.type == 'line' || opts.type == 'area'|| opts.type == 'scatter' || opts.type == 'bubble') {
- boundaryGap = opts.xAxis.boundaryGap;
- }
- var startY = opts.height - opts.area[2];
- var endY = opts.area[0];
-
- //绘制滚动条
- if (opts.enableScroll && opts.xAxis.scrollShow) {
- var scrollY = opts.height - opts.area[2] + config.xAxisHeight;
- var scrollScreenWidth = endX - startX;
- var scrollTotalWidth = eachSpacing * (xAxisPoints.length - 1);
- if(opts.type == 'mount' && opts.extra && opts.extra.mount && opts.extra.mount.widthRatio && opts.extra.mount.widthRatio > 1){
- if(opts.extra.mount.widthRatio>2) opts.extra.mount.widthRatio = 2
- scrollTotalWidth += (opts.extra.mount.widthRatio - 1)*eachSpacing;
- }
- var scrollWidth = scrollScreenWidth * scrollScreenWidth / scrollTotalWidth;
- var scrollLeft = 0;
- if (opts._scrollDistance_) {
- scrollLeft = -opts._scrollDistance_ * (scrollScreenWidth) / scrollTotalWidth;
- }
- context.beginPath();
- context.setLineCap('round');
- context.setLineWidth(6 * opts.pix);
- context.setStrokeStyle(opts.xAxis.scrollBackgroundColor || "#EFEBEF");
- context.moveTo(startX, scrollY);
- context.lineTo(endX, scrollY);
- context.stroke();
- context.closePath();
- context.beginPath();
- context.setLineCap('round');
- context.setLineWidth(6 * opts.pix);
- context.setStrokeStyle(opts.xAxis.scrollColor || "#A6A6A6");
- context.moveTo(startX + scrollLeft, scrollY);
- context.lineTo(startX + scrollLeft + scrollWidth, scrollY);
- context.stroke();
- context.closePath();
- context.setLineCap('butt');
- }
- context.save();
- if (opts._scrollDistance_ && opts._scrollDistance_ !== 0) {
- context.translate(opts._scrollDistance_, 0);
- }
- //绘制X轴刻度线
- if (opts.xAxis.calibration === true) {
- context.setStrokeStyle(opts.xAxis.gridColor || "#cccccc");
- context.setLineCap('butt');
- context.setLineWidth(1 * opts.pix);
- xAxisPoints.forEach(function(item, index) {
- if (index > 0) {
- context.beginPath();
- context.moveTo(item - eachSpacing / 2, startY);
- context.lineTo(item - eachSpacing / 2, startY + 3 * opts.pix);
- context.closePath();
- context.stroke();
- }
- });
- }
- //绘制X轴网格
- if (opts.xAxis.disableGrid !== true) {
- context.setStrokeStyle(opts.xAxis.gridColor || "#cccccc");
- context.setLineCap('butt');
- context.setLineWidth(1 * opts.pix);
- if (opts.xAxis.gridType == 'dash') {
- context.setLineDash([opts.xAxis.dashLength * opts.pix, opts.xAxis.dashLength * opts.pix]);
- }
- opts.xAxis.gridEval = opts.xAxis.gridEval || 1;
- xAxisPoints.forEach(function(item, index) {
- if (index % opts.xAxis.gridEval == 0) {
- context.beginPath();
- context.moveTo(item, startY);
- context.lineTo(item, endY);
- context.stroke();
- }
- });
- context.setLineDash([]);
- }
- //绘制X轴文案
- if (opts.xAxis.disabled !== true) {
- // 对X轴列表做抽稀处理
- //默认全部显示X轴标签
- let maxXAxisListLength = categories.length;
- //如果设置了X轴单屏数量
- if (opts.xAxis.labelCount) {
- //如果设置X轴密度
- if (opts.xAxis.itemCount) {
- maxXAxisListLength = Math.ceil(categories.length / opts.xAxis.itemCount * opts.xAxis.labelCount);
- } else {
- maxXAxisListLength = opts.xAxis.labelCount;
- }
- maxXAxisListLength -= 1;
- }
-
- let ratio = Math.ceil(categories.length / maxXAxisListLength);
-
- let newCategories = [];
- let cgLength = categories.length;
- for (let i = 0; i < cgLength; i++) {
- if (i % ratio !== 0) {
- newCategories.push("");
- } else {
- newCategories.push(categories[i]);
- }
- }
- newCategories[cgLength - 1] = categories[cgLength - 1];
- var xAxisFontSize = opts.xAxis.fontSize * opts.pix || config.fontSize;
- if (config._xAxisTextAngle_ === 0) {
- newCategories.forEach(function(item, index) {
- var xitem = opts.xAxis.formatter ? opts.xAxis.formatter(item,index,opts) : item;
- var offset = -measureText(String(xitem), xAxisFontSize, context) / 2;
- if (boundaryGap == 'center') {
- offset += eachSpacing / 2;
- }
- var scrollHeight = 0;
- if (opts.xAxis.scrollShow) {
- scrollHeight = 6 * opts.pix;
- }
- // 如果在主视图区域内
- var _scrollDistance_ = opts._scrollDistance_ || 0;
- var truePoints = boundaryGap == 'center' ? xAxisPoints[index] + eachSpacing / 2 : xAxisPoints[index];
- if((truePoints - Math.abs(_scrollDistance_)) >= (opts.area[3] - 1) && (truePoints - Math.abs(_scrollDistance_)) <= (opts.width - opts.area[1] + 1)){
- context.beginPath();
- context.setFontSize(xAxisFontSize);
- context.setFillStyle(opts.xAxis.fontColor || opts.fontColor);
- context.fillText(String(xitem), xAxisPoints[index] + offset, startY + opts.xAxis.marginTop * opts.pix + (opts.xAxis.lineHeight - opts.xAxis.fontSize) * opts.pix / 2 + opts.xAxis.fontSize * opts.pix);
- context.closePath();
- context.stroke();
- }
- });
- } else {
- newCategories.forEach(function(item, index) {
- var xitem = opts.xAxis.formatter ? opts.xAxis.formatter(item) : item;
- // 如果在主视图区域内
- var _scrollDistance_ = opts._scrollDistance_ || 0;
- var truePoints = boundaryGap == 'center' ? xAxisPoints[index] + eachSpacing / 2 : xAxisPoints[index];
- if((truePoints - Math.abs(_scrollDistance_)) >= (opts.area[3] - 1) && (truePoints - Math.abs(_scrollDistance_)) <= (opts.width - opts.area[1] + 1)){
- context.save();
- context.beginPath();
- context.setFontSize(xAxisFontSize);
- context.setFillStyle(opts.xAxis.fontColor || opts.fontColor);
- var textWidth = measureText(String(xitem), xAxisFontSize, context);
- var offsetX = xAxisPoints[index];
- if (boundaryGap == 'center') {
- offsetX = xAxisPoints[index] + eachSpacing / 2;
- }
- var scrollHeight = 0;
- if (opts.xAxis.scrollShow) {
- scrollHeight = 6 * opts.pix;
- }
- var offsetY = startY + opts.xAxis.marginTop * opts.pix + xAxisFontSize - xAxisFontSize * Math.abs(Math.sin(config._xAxisTextAngle_));
- if(opts.xAxis.rotateAngle < 0){
- offsetX -= xAxisFontSize / 2;
- textWidth = 0;
- }else{
- offsetX += xAxisFontSize / 2;
- textWidth = -textWidth;
- }
- context.translate(offsetX, offsetY);
- context.rotate(-1 * config._xAxisTextAngle_);
- context.fillText(String(xitem), textWidth , 0 );
- context.closePath();
- context.stroke();
- context.restore();
- }
- });
- }
- }
- context.restore();
-
- //画X轴标题
- if (opts.xAxis.title) {
- context.beginPath();
- context.setFontSize(opts.xAxis.titleFontSize * opts.pix);
- context.setFillStyle(opts.xAxis.titleFontColor);
- context.fillText(String(opts.xAxis.title), opts.width - opts.area[1] + opts.xAxis.titleOffsetX * opts.pix,opts.height - opts.area[2] + opts.xAxis.marginTop * opts.pix + (opts.xAxis.lineHeight - opts.xAxis.titleFontSize) * opts.pix / 2 + (opts.xAxis.titleFontSize + opts.xAxis.titleOffsetY) * opts.pix);
- context.closePath();
- context.stroke();
- }
-
- //绘制X轴轴线
- if (opts.xAxis.axisLine) {
- context.beginPath();
- context.setStrokeStyle(opts.xAxis.axisLineColor);
- context.setLineWidth(1 * opts.pix);
- context.moveTo(startX, opts.height - opts.area[2]);
- context.lineTo(endX, opts.height - opts.area[2]);
- context.stroke();
- }
-}
-
-function drawYAxisGrid(categories, opts, config, context) {
- if (opts.yAxis.disableGrid === true) {
- return;
- }
- let spacingValid = opts.height - opts.area[0] - opts.area[2];
- let eachSpacing = spacingValid / opts.yAxis.splitNumber;
- let startX = opts.area[3];
- let xAxisPoints = opts.chartData.xAxisData.xAxisPoints,
- xAxiseachSpacing = opts.chartData.xAxisData.eachSpacing;
- let TotalWidth = xAxiseachSpacing * (xAxisPoints.length - 1);
- if(opts.type == 'mount' && opts.extra && opts.extra.mount && opts.extra.mount.widthRatio && opts.extra.mount.widthRatio > 1 ){
- if(opts.extra.mount.widthRatio>2) opts.extra.mount.widthRatio = 2
- TotalWidth += (opts.extra.mount.widthRatio - 1) * xAxiseachSpacing;
- }
- let endX = startX + TotalWidth;
- let points = [];
- let startY = 1
- if (opts.xAxis.axisLine === false) {
- startY = 0
- }
- for (let i = startY; i < opts.yAxis.splitNumber + 1; i++) {
- points.push(opts.height - opts.area[2] - eachSpacing * i);
- }
- context.save();
- if (opts._scrollDistance_ && opts._scrollDistance_ !== 0) {
- context.translate(opts._scrollDistance_, 0);
- }
- if (opts.yAxis.gridType == 'dash') {
- context.setLineDash([opts.yAxis.dashLength * opts.pix, opts.yAxis.dashLength * opts.pix]);
- }
- context.setStrokeStyle(opts.yAxis.gridColor);
- context.setLineWidth(1 * opts.pix);
- points.forEach(function(item, index) {
- context.beginPath();
- context.moveTo(startX, item);
- context.lineTo(endX, item);
- context.stroke();
- });
- context.setLineDash([]);
- context.restore();
-}
-
-function drawYAxis(series, opts, config, context) {
- if (opts.yAxis.disabled === true) {
- return;
- }
- var spacingValid = opts.height - opts.area[0] - opts.area[2];
- var eachSpacing = spacingValid / opts.yAxis.splitNumber;
- var startX = opts.area[3];
- var endX = opts.width - opts.area[1];
- var endY = opts.height - opts.area[2];
- // set YAxis background
- context.beginPath();
- context.setFillStyle(opts.background);
- if (opts.enableScroll == true && opts.xAxis.scrollPosition && opts.xAxis.scrollPosition !== 'left') {
- context.fillRect(0, 0, startX, endY + 2 * opts.pix);
- }
- if (opts.enableScroll == true && opts.xAxis.scrollPosition && opts.xAxis.scrollPosition !== 'right') {
- context.fillRect(endX, 0, opts.width, endY + 2 * opts.pix);
- }
- context.closePath();
- context.stroke();
-
- let tStartLeft = opts.area[3];
- let tStartRight = opts.width - opts.area[1];
- let tStartCenter = opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2;
- if (opts.yAxis.data) {
- for (let i = 0; i < opts.yAxis.data.length; i++) {
- let yData = opts.yAxis.data[i];
- var points = [];
- if(yData.type === 'categories'){
- for (let i = 0; i <= yData.categories.length; i++) {
- points.push(opts.area[0] + spacingValid / yData.categories.length / 2 + spacingValid / yData.categories.length * i);
- }
- }else{
- for (let i = 0; i <= opts.yAxis.splitNumber; i++) {
- points.push(opts.area[0] + eachSpacing * i);
- }
- }
- if (yData.disabled !== true) {
- let rangesFormat = opts.chartData.yAxisData.rangesFormat[i];
- let yAxisFontSize = yData.fontSize ? yData.fontSize * opts.pix : config.fontSize;
- let yAxisWidth = opts.chartData.yAxisData.yAxisWidth[i];
- let textAlign = yData.textAlign || "right";
- //画Y轴刻度及文案
- rangesFormat.forEach(function(item, index) {
- var pos = points[index];
- context.beginPath();
- context.setFontSize(yAxisFontSize);
- context.setLineWidth(1 * opts.pix);
- context.setStrokeStyle(yData.axisLineColor || '#cccccc');
- context.setFillStyle(yData.fontColor || opts.fontColor);
- let tmpstrat = 0;
- let gapwidth = 4 * opts.pix;
- if (yAxisWidth.position == 'left') {
- //画刻度线
- if (yData.calibration == true) {
- context.moveTo(tStartLeft, pos);
- context.lineTo(tStartLeft - 3 * opts.pix, pos);
- gapwidth += 3 * opts.pix;
- }
- //画文字
- switch (textAlign) {
- case "left":
- context.setTextAlign('left');
- tmpstrat = tStartLeft - yAxisWidth.width
- break;
- case "right":
- context.setTextAlign('right');
- tmpstrat = tStartLeft - gapwidth
- break;
- default:
- context.setTextAlign('center');
- tmpstrat = tStartLeft - yAxisWidth.width / 2
- }
- context.fillText(String(item), tmpstrat, pos + yAxisFontSize / 2 - 3 * opts.pix);
-
- } else if (yAxisWidth.position == 'right') {
- //画刻度线
- if (yData.calibration == true) {
- context.moveTo(tStartRight, pos);
- context.lineTo(tStartRight + 3 * opts.pix, pos);
- gapwidth += 3 * opts.pix;
- }
- switch (textAlign) {
- case "left":
- context.setTextAlign('left');
- tmpstrat = tStartRight + gapwidth
- break;
- case "right":
- context.setTextAlign('right');
- tmpstrat = tStartRight + yAxisWidth.width
- break;
- default:
- context.setTextAlign('center');
- tmpstrat = tStartRight + yAxisWidth.width / 2
- }
- context.fillText(String(item), tmpstrat, pos + yAxisFontSize / 2 - 3 * opts.pix);
- } else if (yAxisWidth.position == 'center') {
- //画刻度线
- if (yData.calibration == true) {
- context.moveTo(tStartCenter, pos);
- context.lineTo(tStartCenter - 3 * opts.pix, pos);
- gapwidth += 3 * opts.pix;
- }
- //画文字
- switch (textAlign) {
- case "left":
- context.setTextAlign('left');
- tmpstrat = tStartCenter - yAxisWidth.width
- break;
- case "right":
- context.setTextAlign('right');
- tmpstrat = tStartCenter - gapwidth
- break;
- default:
- context.setTextAlign('center');
- tmpstrat = tStartCenter - yAxisWidth.width / 2
- }
- context.fillText(String(item), tmpstrat, pos + yAxisFontSize / 2 - 3 * opts.pix);
- }
- context.closePath();
- context.stroke();
- context.setTextAlign('left');
- });
- //画Y轴轴线
- if (yData.axisLine !== false) {
- context.beginPath();
- context.setStrokeStyle(yData.axisLineColor || '#cccccc');
- context.setLineWidth(1 * opts.pix);
- if (yAxisWidth.position == 'left') {
- context.moveTo(tStartLeft, opts.height - opts.area[2]);
- context.lineTo(tStartLeft, opts.area[0]);
- } else if (yAxisWidth.position == 'right') {
- context.moveTo(tStartRight, opts.height - opts.area[2]);
- context.lineTo(tStartRight, opts.area[0]);
- } else if (yAxisWidth.position == 'center') {
- context.moveTo(tStartCenter, opts.height - opts.area[2]);
- context.lineTo(tStartCenter, opts.area[0]);
- }
- context.stroke();
- }
- //画Y轴标题
- if (opts.yAxis.showTitle) {
- let titleFontSize = yData.titleFontSize * opts.pix || config.fontSize;
- let title = yData.title;
- context.beginPath();
- context.setFontSize(titleFontSize);
- context.setFillStyle(yData.titleFontColor || opts.fontColor);
- if (yAxisWidth.position == 'left') {
- context.fillText(title, tStartLeft - measureText(title, titleFontSize, context) / 2 + (yData.titleOffsetX || 0), opts.area[0] - (10 - (yData.titleOffsetY || 0)) * opts.pix);
- } else if (yAxisWidth.position == 'right') {
- context.fillText(title, tStartRight - measureText(title, titleFontSize, context) / 2 + (yData.titleOffsetX || 0), opts.area[0] - (10 - (yData.titleOffsetY || 0)) * opts.pix);
- } else if (yAxisWidth.position == 'center') {
- context.fillText(title, tStartCenter - measureText(title, titleFontSize, context) / 2 + (yData.titleOffsetX || 0), opts.area[0] - (10 - (yData.titleOffsetY || 0)) * opts.pix);
- }
- context.closePath();
- context.stroke();
- }
- if (yAxisWidth.position == 'left') {
- tStartLeft -= (yAxisWidth.width + opts.yAxis.padding * opts.pix);
- } else {
- tStartRight += yAxisWidth.width + opts.yAxis.padding * opts.pix;
- }
- }
- }
- }
-
-}
-
-function drawLegend(series, opts, config, context, chartData) {
- if (opts.legend.show === false) {
- return;
- }
- let legendData = chartData.legendData;
- let legendList = legendData.points;
- let legendArea = legendData.area;
- let padding = opts.legend.padding * opts.pix;
- let fontSize = opts.legend.fontSize * opts.pix;
- let shapeWidth = 15 * opts.pix;
- let shapeRight = 5 * opts.pix;
- let itemGap = opts.legend.itemGap * opts.pix;
- let lineHeight = Math.max(opts.legend.lineHeight * opts.pix, fontSize);
- //画背景及边框
- context.beginPath();
- context.setLineWidth(opts.legend.borderWidth * opts.pix);
- context.setStrokeStyle(opts.legend.borderColor);
- context.setFillStyle(opts.legend.backgroundColor);
- context.moveTo(legendArea.start.x, legendArea.start.y);
- context.rect(legendArea.start.x, legendArea.start.y, legendArea.width, legendArea.height);
- context.closePath();
- context.fill();
- context.stroke();
- legendList.forEach(function(itemList, listIndex) {
- let width = 0;
- let height = 0;
- width = legendData.widthArr[listIndex];
- height = legendData.heightArr[listIndex];
- let startX = 0;
- let startY = 0;
- if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
- switch (opts.legend.float) {
- case 'left':
- startX = legendArea.start.x + padding;
- break;
- case 'right':
- startX = legendArea.start.x + legendArea.width - width;
- break;
- default:
- startX = legendArea.start.x + (legendArea.width - width) / 2;
- }
- startY = legendArea.start.y + padding + listIndex * lineHeight;
- } else {
- if (listIndex == 0) {
- width = 0;
- } else {
- width = legendData.widthArr[listIndex - 1];
- }
- startX = legendArea.start.x + padding + width;
- startY = legendArea.start.y + padding + (legendArea.height - height) / 2;
- }
- context.setFontSize(config.fontSize);
- for (let i = 0; i < itemList.length; i++) {
- let item = itemList[i];
- item.area = [0, 0, 0, 0];
- item.area[0] = startX;
- item.area[1] = startY;
- item.area[3] = startY + lineHeight;
- context.beginPath();
- context.setLineWidth(1 * opts.pix);
- context.setStrokeStyle(item.show ? item.color : opts.legend.hiddenColor);
- context.setFillStyle(item.show ? item.color : opts.legend.hiddenColor);
- switch (item.legendShape) {
- case 'line':
- context.moveTo(startX, startY + 0.5 * lineHeight - 2 * opts.pix);
- context.fillRect(startX, startY + 0.5 * lineHeight - 2 * opts.pix, 15 * opts.pix, 4 * opts.pix);
- break;
- case 'triangle':
- context.moveTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
- context.lineTo(startX + 2.5 * opts.pix, startY + 0.5 * lineHeight + 5 * opts.pix);
- context.lineTo(startX + 12.5 * opts.pix, startY + 0.5 * lineHeight + 5 * opts.pix);
- context.lineTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
- break;
- case 'diamond':
- context.moveTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
- context.lineTo(startX + 2.5 * opts.pix, startY + 0.5 * lineHeight);
- context.lineTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight + 5 * opts.pix);
- context.lineTo(startX + 12.5 * opts.pix, startY + 0.5 * lineHeight);
- context.lineTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
- break;
- case 'circle':
- context.moveTo(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight);
- context.arc(startX + 7.5 * opts.pix, startY + 0.5 * lineHeight, 5 * opts.pix, 0, 2 * Math.PI);
- break;
- case 'rect':
- context.moveTo(startX, startY + 0.5 * lineHeight - 5 * opts.pix);
- context.fillRect(startX, startY + 0.5 * lineHeight - 5 * opts.pix, 15 * opts.pix, 10 * opts.pix);
- break;
- case 'square':
- context.moveTo(startX + 5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix);
- context.fillRect(startX + 5 * opts.pix, startY + 0.5 * lineHeight - 5 * opts.pix, 10 * opts.pix, 10 * opts.pix);
- break;
- case 'none':
- break;
- default:
- context.moveTo(startX, startY + 0.5 * lineHeight - 5 * opts.pix);
- context.fillRect(startX, startY + 0.5 * lineHeight - 5 * opts.pix, 15 * opts.pix, 10 * opts.pix);
- }
- context.closePath();
- context.fill();
- context.stroke();
- startX += shapeWidth + shapeRight;
- let fontTrans = 0.5 * lineHeight + 0.5 * fontSize - 2;
- const legendText = item.legendText ? item.legendText : item.name;
- context.beginPath();
- context.setFontSize(fontSize);
- context.setFillStyle(item.show ? opts.legend.fontColor : opts.legend.hiddenColor);
- context.fillText(legendText, startX, startY + fontTrans);
- context.closePath();
- context.stroke();
- if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
- startX += measureText(legendText, fontSize, context) + itemGap;
- item.area[2] = startX;
- } else {
- item.area[2] = startX + measureText(legendText, fontSize, context) + itemGap;;
- startX -= shapeWidth + shapeRight;
- startY += lineHeight;
- }
- }
- });
-}
-
-function drawPieDataPoints(series, opts, config, context) {
- var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
- var pieOption = assign({}, {
- activeOpacity: 0.5,
- activeRadius: 10,
- offsetAngle: 0,
- labelWidth: 15,
- ringWidth: 30,
- customRadius: 0,
- border: false,
- borderWidth: 2,
- borderColor: '#FFFFFF',
- centerColor: '#FFFFFF',
- linearType: 'none',
- customColor: [],
- }, opts.type == "pie" ? opts.extra.pie : opts.extra.ring);
- var centerPosition = {
- x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
- y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
- };
- if (config.pieChartLinePadding == 0) {
- config.pieChartLinePadding = pieOption.activeRadius * opts.pix;
- }
-
- var radius = Math.min((opts.width - opts.area[1] - opts.area[3]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding - config._pieTextMaxLength_, (opts.height - opts.area[0] - opts.area[2]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding);
- radius = radius < 10 ? 10 : radius;
- if (pieOption.customRadius > 0) {
- radius = pieOption.customRadius * opts.pix;
- }
- series = getPieDataPoints(series, radius, process);
- var activeRadius = pieOption.activeRadius * opts.pix;
- pieOption.customColor = fillCustomColor(pieOption.linearType, pieOption.customColor, series, config);
- series = series.map(function(eachSeries) {
- eachSeries._start_ += (pieOption.offsetAngle) * Math.PI / 180;
- return eachSeries;
- });
- series.forEach(function(eachSeries, seriesIndex) {
- if (opts.tooltip) {
- if (opts.tooltip.index == seriesIndex) {
- context.beginPath();
- context.setFillStyle(hexToRgb(eachSeries.color, pieOption.activeOpacity || 0.5));
- context.moveTo(centerPosition.x, centerPosition.y);
- context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_ + activeRadius, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._proportion_ * Math.PI);
- context.closePath();
- context.fill();
- }
- }
- context.beginPath();
- context.setLineWidth(pieOption.borderWidth * opts.pix);
- context.lineJoin = "round";
- context.setStrokeStyle(pieOption.borderColor);
- var fillcolor = eachSeries.color;
- if (pieOption.linearType == 'custom') {
- var grd;
- if(context.createCircularGradient){
- grd = context.createCircularGradient(centerPosition.x, centerPosition.y, eachSeries._radius_)
- }else{
- grd = context.createRadialGradient(centerPosition.x, centerPosition.y, 0,centerPosition.x, centerPosition.y, eachSeries._radius_)
- }
- grd.addColorStop(0, hexToRgb(pieOption.customColor[eachSeries.linearIndex], 1))
- grd.addColorStop(1, hexToRgb(eachSeries.color, 1))
- fillcolor = grd
- }
- context.setFillStyle(fillcolor);
- context.moveTo(centerPosition.x, centerPosition.y);
- context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._proportion_ * Math.PI);
- context.closePath();
- context.fill();
- if (pieOption.border == true) {
- context.stroke();
- }
- });
- if (opts.type === 'ring') {
- var innerPieWidth = radius * 0.6;
- if (typeof pieOption.ringWidth === 'number' && pieOption.ringWidth > 0) {
- innerPieWidth = Math.max(0, radius - pieOption.ringWidth * opts.pix);
- }
- context.beginPath();
- context.setFillStyle(pieOption.centerColor);
- context.moveTo(centerPosition.x, centerPosition.y);
- context.arc(centerPosition.x, centerPosition.y, innerPieWidth, 0, 2 * Math.PI);
- context.closePath();
- context.fill();
- }
- if (opts.dataLabel !== false && process === 1) {
- drawPieText(series, opts, config, context, radius, centerPosition);
- }
- if (process === 1 && opts.type === 'ring') {
- drawRingTitle(opts, config, context, centerPosition);
- }
- return {
- center: centerPosition,
- radius: radius,
- series: series
- };
-}
-
-function drawRoseDataPoints(series, opts, config, context) {
- var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
- var roseOption = assign({}, {
- type: 'area',
- activeOpacity: 0.5,
- activeRadius: 10,
- offsetAngle: 0,
- labelWidth: 15,
- border: false,
- borderWidth: 2,
- borderColor: '#FFFFFF',
- linearType: 'none',
- customColor: [],
- }, opts.extra.rose);
- if (config.pieChartLinePadding == 0) {
- config.pieChartLinePadding = roseOption.activeRadius * opts.pix;
- }
- var centerPosition = {
- x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
- y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
- };
- var radius = Math.min((opts.width - opts.area[1] - opts.area[3]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding - config._pieTextMaxLength_, (opts.height - opts.area[0] - opts.area[2]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding);
- radius = radius < 10 ? 10 : radius;
- var minRadius = roseOption.minRadius || radius * 0.5;
- if(radius < minRadius){
- radius = minRadius + 10;
- }
- series = getRoseDataPoints(series, roseOption.type, minRadius, radius, process);
- var activeRadius = roseOption.activeRadius * opts.pix;
- roseOption.customColor = fillCustomColor(roseOption.linearType, roseOption.customColor, series, config);
- series = series.map(function(eachSeries) {
- eachSeries._start_ += (roseOption.offsetAngle || 0) * Math.PI / 180;
- return eachSeries;
- });
- series.forEach(function(eachSeries, seriesIndex) {
- if (opts.tooltip) {
- if (opts.tooltip.index == seriesIndex) {
- context.beginPath();
- context.setFillStyle(hexToRgb(eachSeries.color, roseOption.activeOpacity || 0.5));
- context.moveTo(centerPosition.x, centerPosition.y);
- context.arc(centerPosition.x, centerPosition.y, activeRadius + eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._rose_proportion_ * Math.PI);
- context.closePath();
- context.fill();
- }
- }
- context.beginPath();
- context.setLineWidth(roseOption.borderWidth * opts.pix);
- context.lineJoin = "round";
- context.setStrokeStyle(roseOption.borderColor);
- var fillcolor = eachSeries.color;
- if (roseOption.linearType == 'custom') {
- var grd;
- if(context.createCircularGradient){
- grd = context.createCircularGradient(centerPosition.x, centerPosition.y, eachSeries._radius_)
- }else{
- grd = context.createRadialGradient(centerPosition.x, centerPosition.y, 0,centerPosition.x, centerPosition.y, eachSeries._radius_)
- }
- grd.addColorStop(0, hexToRgb(roseOption.customColor[eachSeries.linearIndex], 1))
- grd.addColorStop(1, hexToRgb(eachSeries.color, 1))
- fillcolor = grd
- }
- context.setFillStyle(fillcolor);
- context.moveTo(centerPosition.x, centerPosition.y);
- context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._rose_proportion_ * Math.PI);
- context.closePath();
- context.fill();
- if (roseOption.border == true) {
- context.stroke();
- }
- });
-
- if (opts.dataLabel !== false && process === 1) {
- drawPieText(series, opts, config, context, radius, centerPosition);
- }
- return {
- center: centerPosition,
- radius: radius,
- series: series
- };
-}
-
-function drawArcbarDataPoints(series, opts, config, context) {
- var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
- var arcbarOption = assign({}, {
- startAngle: 0.75,
- endAngle: 0.25,
- type: 'default',
- direction: 'cw',
- lineCap: 'round',
- width: 12 ,
- gap: 2 ,
- linearType: 'none',
- customColor: [],
- }, opts.extra.arcbar);
- series = getArcbarDataPoints(series, arcbarOption, process);
- var centerPosition;
- if (arcbarOption.centerX || arcbarOption.centerY) {
- centerPosition = {
- x: arcbarOption.centerX ? arcbarOption.centerX : opts.width / 2,
- y: arcbarOption.centerY ? arcbarOption.centerY : opts.height / 2
- };
- } else {
- centerPosition = {
- x: opts.width / 2,
- y: opts.height / 2
- };
- }
- var radius;
- if (arcbarOption.radius) {
- radius = arcbarOption.radius;
- } else {
- radius = Math.min(centerPosition.x, centerPosition.y);
- radius -= 5 * opts.pix;
- radius -= arcbarOption.width / 2;
- }
- radius = radius < 10 ? 10 : radius;
- arcbarOption.customColor = fillCustomColor(arcbarOption.linearType, arcbarOption.customColor, series, config);
-
- for (let i = 0; i < series.length; i++) {
- let eachSeries = series[i];
- //背景颜色
- context.setLineWidth(arcbarOption.width * opts.pix);
- context.setStrokeStyle(arcbarOption.backgroundColor || '#E9E9E9');
- context.setLineCap(arcbarOption.lineCap);
- context.beginPath();
- if (arcbarOption.type == 'default') {
- context.arc(centerPosition.x, centerPosition.y, radius - (arcbarOption.width * opts.pix + arcbarOption.gap * opts.pix) * i, arcbarOption.startAngle * Math.PI, arcbarOption.endAngle * Math.PI, arcbarOption.direction == 'ccw');
- } else {
- context.arc(centerPosition.x, centerPosition.y, radius - (arcbarOption.width * opts.pix + arcbarOption.gap * opts.pix) * i, 0, 2 * Math.PI, arcbarOption.direction == 'ccw');
- }
- context.stroke();
- //进度条
- var fillColor = eachSeries.color
- if(arcbarOption.linearType == 'custom'){
- var grd = context.createLinearGradient(centerPosition.x - radius, centerPosition.y, centerPosition.x + radius, centerPosition.y);
- grd.addColorStop(1, hexToRgb(arcbarOption.customColor[eachSeries.linearIndex], 1))
- grd.addColorStop(0, hexToRgb(eachSeries.color, 1))
- fillColor = grd;
- }
- context.setLineWidth(arcbarOption.width * opts.pix);
- context.setStrokeStyle(fillColor);
- context.setLineCap(arcbarOption.lineCap);
- context.beginPath();
- context.arc(centerPosition.x, centerPosition.y, radius - (arcbarOption.width * opts.pix + arcbarOption.gap * opts.pix) * i, arcbarOption.startAngle * Math.PI, eachSeries._proportion_ * Math.PI, arcbarOption.direction == 'ccw');
- context.stroke();
- }
- drawRingTitle(opts, config, context, centerPosition);
- return {
- center: centerPosition,
- radius: radius,
- series: series
- };
-}
-
-function drawGaugeDataPoints(categories, series, opts, config, context) {
- var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
- var gaugeOption = assign({}, {
- type: 'default',
- startAngle: 0.75,
- endAngle: 0.25,
- width: 15,
- labelOffset:13,
- splitLine: {
- fixRadius: 0,
- splitNumber: 10,
- width: 15,
- color: '#FFFFFF',
- childNumber: 5,
- childWidth: 5
- },
- pointer: {
- width: 15,
- color: 'auto'
- }
- }, opts.extra.gauge);
- if (gaugeOption.oldAngle == undefined) {
- gaugeOption.oldAngle = gaugeOption.startAngle;
- }
- if (gaugeOption.oldData == undefined) {
- gaugeOption.oldData = 0;
- }
- categories = getGaugeAxisPoints(categories, gaugeOption.startAngle, gaugeOption.endAngle);
- var centerPosition = {
- x: opts.width / 2,
- y: opts.height / 2
- };
- var radius = Math.min(centerPosition.x, centerPosition.y);
- radius -= 5 * opts.pix;
- radius -= gaugeOption.width / 2;
- radius = radius < 10 ? 10 : radius;
- var innerRadius = radius - gaugeOption.width;
- var totalAngle = 0;
- //判断仪表盘的样式:default百度样式,progress新样式
- if (gaugeOption.type == 'progress') {
- //## 第一步画中心圆形背景和进度条背景
- //中心圆形背景
- var pieRadius = radius - gaugeOption.width * 3;
- context.beginPath();
- let gradient = context.createLinearGradient(centerPosition.x, centerPosition.y - pieRadius, centerPosition.x, centerPosition.y + pieRadius);
- //配置渐变填充(起点:中心点向上减半径;结束点中心点向下加半径)
- gradient.addColorStop('0', hexToRgb(series[0].color, 0.3));
- gradient.addColorStop('1.0', hexToRgb("#FFFFFF", 0.1));
- context.setFillStyle(gradient);
- context.arc(centerPosition.x, centerPosition.y, pieRadius, 0, 2 * Math.PI, false);
- context.fill();
- //画进度条背景
- context.setLineWidth(gaugeOption.width);
- context.setStrokeStyle(hexToRgb(series[0].color, 0.3));
- context.setLineCap('round');
- context.beginPath();
- context.arc(centerPosition.x, centerPosition.y, innerRadius, gaugeOption.startAngle * Math.PI, gaugeOption.endAngle * Math.PI, false);
- context.stroke();
- //## 第二步画刻度线
- if (gaugeOption.endAngle < gaugeOption.startAngle) {
- totalAngle = 2 + gaugeOption.endAngle - gaugeOption.startAngle;
- } else {
- totalAngle = gaugeOption.startAngle - gaugeOption.endAngle;
- }
- let splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
- let childAngle = totalAngle / gaugeOption.splitLine.splitNumber / gaugeOption.splitLine.childNumber;
- let startX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius;
- let endX = -radius - gaugeOption.width - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.width;
- context.save();
- context.translate(centerPosition.x, centerPosition.y);
- context.rotate((gaugeOption.startAngle - 1) * Math.PI);
- let len = gaugeOption.splitLine.splitNumber * gaugeOption.splitLine.childNumber + 1;
- let proc = series[0].data * process;
- for (let i = 0; i < len; i++) {
- context.beginPath();
- //刻度线随进度变色
- if (proc > (i / len)) {
- context.setStrokeStyle(hexToRgb(series[0].color, 1));
- } else {
- context.setStrokeStyle(hexToRgb(series[0].color, 0.3));
- }
- context.setLineWidth(3 * opts.pix);
- context.moveTo(startX, 0);
- context.lineTo(endX, 0);
- context.stroke();
- context.rotate(childAngle * Math.PI);
- }
- context.restore();
- //## 第三步画进度条
- series = getGaugeArcbarDataPoints(series, gaugeOption, process);
- context.setLineWidth(gaugeOption.width);
- context.setStrokeStyle(series[0].color);
- context.setLineCap('round');
- context.beginPath();
- context.arc(centerPosition.x, centerPosition.y, innerRadius, gaugeOption.startAngle * Math.PI, series[0]._proportion_ * Math.PI, false);
- context.stroke();
- //## 第四步画指针
- let pointerRadius = radius - gaugeOption.width * 2.5;
- context.save();
- context.translate(centerPosition.x, centerPosition.y);
- context.rotate((series[0]._proportion_ - 1) * Math.PI);
- context.beginPath();
- context.setLineWidth(gaugeOption.width / 3);
- let gradient3 = context.createLinearGradient(0, -pointerRadius * 0.6, 0, pointerRadius * 0.6);
- gradient3.addColorStop('0', hexToRgb('#FFFFFF', 0));
- gradient3.addColorStop('0.5', hexToRgb(series[0].color, 1));
- gradient3.addColorStop('1.0', hexToRgb('#FFFFFF', 0));
- context.setStrokeStyle(gradient3);
- context.arc(0, 0, pointerRadius, 0.85 * Math.PI, 1.15 * Math.PI, false);
- context.stroke();
- context.beginPath();
- context.setLineWidth(1);
- context.setStrokeStyle(series[0].color);
- context.setFillStyle(series[0].color);
- context.moveTo(-pointerRadius - gaugeOption.width / 3 / 2, -4);
- context.lineTo(-pointerRadius - gaugeOption.width / 3 / 2 - 4, 0);
- context.lineTo(-pointerRadius - gaugeOption.width / 3 / 2, 4);
- context.lineTo(-pointerRadius - gaugeOption.width / 3 / 2, -4);
- context.stroke();
- context.fill();
- context.restore();
- //default百度样式
- } else {
- //画背景
- context.setLineWidth(gaugeOption.width);
- context.setLineCap('butt');
- for (let i = 0; i < categories.length; i++) {
- let eachCategories = categories[i];
- context.beginPath();
- context.setStrokeStyle(eachCategories.color);
- context.arc(centerPosition.x, centerPosition.y, radius, eachCategories._startAngle_ * Math.PI, eachCategories._endAngle_ * Math.PI, false);
- context.stroke();
- }
- context.save();
- //画刻度线
- if (gaugeOption.endAngle < gaugeOption.startAngle) {
- totalAngle = 2 + gaugeOption.endAngle - gaugeOption.startAngle;
- } else {
- totalAngle = gaugeOption.startAngle - gaugeOption.endAngle;
- }
- let splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
- let childAngle = totalAngle / gaugeOption.splitLine.splitNumber / gaugeOption.splitLine.childNumber;
- let startX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius;
- let endX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.width;
- let childendX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.childWidth;
- context.translate(centerPosition.x, centerPosition.y);
- context.rotate((gaugeOption.startAngle - 1) * Math.PI);
- for (let i = 0; i < gaugeOption.splitLine.splitNumber + 1; i++) {
- context.beginPath();
- context.setStrokeStyle(gaugeOption.splitLine.color);
- context.setLineWidth(2 * opts.pix);
- context.moveTo(startX, 0);
- context.lineTo(endX, 0);
- context.stroke();
- context.rotate(splitAngle * Math.PI);
- }
- context.restore();
- context.save();
- context.translate(centerPosition.x, centerPosition.y);
- context.rotate((gaugeOption.startAngle - 1) * Math.PI);
- for (let i = 0; i < gaugeOption.splitLine.splitNumber * gaugeOption.splitLine.childNumber + 1; i++) {
- context.beginPath();
- context.setStrokeStyle(gaugeOption.splitLine.color);
- context.setLineWidth(1 * opts.pix);
- context.moveTo(startX, 0);
- context.lineTo(childendX, 0);
- context.stroke();
- context.rotate(childAngle * Math.PI);
- }
- context.restore();
- //画指针
- series = getGaugeDataPoints(series, categories, gaugeOption, process);
- for (let i = 0; i < series.length; i++) {
- let eachSeries = series[i];
- context.save();
- context.translate(centerPosition.x, centerPosition.y);
- context.rotate((eachSeries._proportion_ - 1) * Math.PI);
- context.beginPath();
- context.setFillStyle(eachSeries.color);
- context.moveTo(gaugeOption.pointer.width, 0);
- context.lineTo(0, -gaugeOption.pointer.width / 2);
- context.lineTo(-innerRadius, 0);
- context.lineTo(0, gaugeOption.pointer.width / 2);
- context.lineTo(gaugeOption.pointer.width, 0);
- context.closePath();
- context.fill();
- context.beginPath();
- context.setFillStyle('#FFFFFF');
- context.arc(0, 0, gaugeOption.pointer.width / 6, 0, 2 * Math.PI, false);
- context.fill();
- context.restore();
- }
- if (opts.dataLabel !== false) {
- drawGaugeLabel(gaugeOption, radius, centerPosition, opts, config, context);
- }
- }
- //画仪表盘标题,副标题
- drawRingTitle(opts, config, context, centerPosition);
- if (process === 1 && opts.type === 'gauge') {
- opts.extra.gauge.oldAngle = series[0]._proportion_;
- opts.extra.gauge.oldData = series[0].data;
- }
- return {
- center: centerPosition,
- radius: radius,
- innerRadius: innerRadius,
- categories: categories,
- totalAngle: totalAngle
- };
-}
-
-function drawRadarDataPoints(series, opts, config, context) {
- var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
- var radarOption = assign({}, {
- gridColor: '#cccccc',
- gridType: 'radar',
- gridEval:1,
- axisLabel:false,
- axisLabelTofix:0,
- labelShow:true,
- labelColor:'#666666',
- labelPointShow:false,
- labelPointRadius:3,
- labelPointColor:'#cccccc',
- opacity: 0.2,
- gridCount: 3,
- border:false,
- borderWidth:2,
- linearType: 'none',
- customColor: [],
- }, opts.extra.radar);
- var coordinateAngle = getRadarCoordinateSeries(opts.categories.length);
- var centerPosition = {
- x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
- y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
- };
- var xr = (opts.width - opts.area[1] - opts.area[3]) / 2
- var yr = (opts.height - opts.area[0] - opts.area[2]) / 2
- var radius = Math.min(xr - (getMaxTextListLength(opts.categories, config.fontSize, context) + config.radarLabelTextMargin), yr - config.radarLabelTextMargin);
- radius -= config.radarLabelTextMargin * opts.pix;
- radius = radius < 10 ? 10 : radius;
- radius = radarOption.radius ? radarOption.radius : radius;
- // 画分割线
- context.beginPath();
- context.setLineWidth(1 * opts.pix);
- context.setStrokeStyle(radarOption.gridColor);
- coordinateAngle.forEach(function(angle,index) {
- var pos = convertCoordinateOrigin(radius * Math.cos(angle), radius * Math.sin(angle), centerPosition);
- context.moveTo(centerPosition.x, centerPosition.y);
- if (index % radarOption.gridEval == 0) {
- context.lineTo(pos.x, pos.y);
- }
- });
- context.stroke();
- context.closePath();
-
- // 画背景网格
- var _loop = function _loop(i) {
- var startPos = {};
- context.beginPath();
- context.setLineWidth(1 * opts.pix);
- context.setStrokeStyle(radarOption.gridColor);
- if (radarOption.gridType == 'radar') {
- coordinateAngle.forEach(function(angle, index) {
- var pos = convertCoordinateOrigin(radius / radarOption.gridCount * i * Math.cos(angle), radius /
- radarOption.gridCount * i * Math.sin(angle), centerPosition);
- if (index === 0) {
- startPos = pos;
- context.moveTo(pos.x, pos.y);
- } else {
- context.lineTo(pos.x, pos.y);
- }
- });
- context.lineTo(startPos.x, startPos.y);
- } else {
- var pos = convertCoordinateOrigin(radius / radarOption.gridCount * i * Math.cos(1.5), radius / radarOption.gridCount * i * Math.sin(1.5), centerPosition);
- context.arc(centerPosition.x, centerPosition.y, centerPosition.y - pos.y, 0, 2 * Math.PI, false);
- }
- context.stroke();
- context.closePath();
- };
- for (var i = 1; i <= radarOption.gridCount; i++) {
- _loop(i);
- }
- radarOption.customColor = fillCustomColor(radarOption.linearType, radarOption.customColor, series, config);
- var radarDataPoints = getRadarDataPoints(coordinateAngle, centerPosition, radius, series, opts, process);
- radarDataPoints.forEach(function(eachSeries, seriesIndex) {
- // 绘制区域数据
- context.beginPath();
- context.setLineWidth(radarOption.borderWidth * opts.pix);
- context.setStrokeStyle(eachSeries.color);
-
- var fillcolor = hexToRgb(eachSeries.color, radarOption.opacity);
- if (radarOption.linearType == 'custom') {
- var grd;
- if(context.createCircularGradient){
- grd = context.createCircularGradient(centerPosition.x, centerPosition.y, radius)
- }else{
- grd = context.createRadialGradient(centerPosition.x, centerPosition.y, 0,centerPosition.x, centerPosition.y, radius)
- }
- grd.addColorStop(0, hexToRgb(radarOption.customColor[series[seriesIndex].linearIndex], radarOption.opacity))
- grd.addColorStop(1, hexToRgb(eachSeries.color, radarOption.opacity))
- fillcolor = grd
- }
-
- context.setFillStyle(fillcolor);
- eachSeries.data.forEach(function(item, index) {
- if (index === 0) {
- context.moveTo(item.position.x, item.position.y);
- } else {
- context.lineTo(item.position.x, item.position.y);
- }
- });
- context.closePath();
- context.fill();
- if(radarOption.border === true){
- context.stroke();
- }
- context.closePath();
- if (opts.dataPointShape !== false) {
- var points = eachSeries.data.map(function(item) {
- return item.position;
- });
- drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
- }
- });
- // 画刻度值
- if(radarOption.axisLabel === true){
- const maxData = Math.max(radarOption.max, Math.max.apply(null, dataCombine(series)));
- const stepLength = radius / radarOption.gridCount;
- const fontSize = opts.fontSize * opts.pix;
- context.setFontSize(fontSize);
- context.setFillStyle(opts.fontColor);
- context.setTextAlign('left');
- for (var i = 0; i < radarOption.gridCount + 1; i++) {
- let label = i * maxData / radarOption.gridCount;
- label = label.toFixed(radarOption.axisLabelTofix);
- context.fillText(String(label), centerPosition.x + 3 * opts.pix, centerPosition.y - i * stepLength + fontSize / 2);
- }
- }
-
- // draw label text
- drawRadarLabel(coordinateAngle, radius, centerPosition, opts, config, context);
-
- // draw dataLabel
- if (opts.dataLabel !== false && process === 1) {
- radarDataPoints.forEach(function(eachSeries, seriesIndex) {
- context.beginPath();
- var fontSize = eachSeries.textSize * opts.pix || config.fontSize;
- context.setFontSize(fontSize);
- context.setFillStyle(eachSeries.textColor || opts.fontColor);
- eachSeries.data.forEach(function(item, index) {
- //如果是中心点垂直的上下点位
- if(Math.abs(item.position.x - centerPosition.x)<2){
- //如果在上面
- if(item.position.y < centerPosition.y){
- context.setTextAlign('center');
- context.fillText(item.value, item.position.x, item.position.y - 4);
- }else{
- context.setTextAlign('center');
- context.fillText(item.value, item.position.x, item.position.y + fontSize + 2);
- }
- }else{
- //如果在左侧
- if(item.position.x < centerPosition.x){
- context.setTextAlign('right');
- context.fillText(item.value, item.position.x - 4, item.position.y + fontSize / 2 - 2);
- }else{
- context.setTextAlign('left');
- context.fillText(item.value, item.position.x + 4, item.position.y + fontSize / 2 - 2);
- }
- }
- });
- context.closePath();
- context.stroke();
- });
- context.setTextAlign('left');
- }
-
- return {
- center: centerPosition,
- radius: radius,
- angleList: coordinateAngle
- };
-}
-
-// 经纬度转墨卡托
-function lonlat2mercator(longitude, latitude) {
- var mercator = Array(2);
- var x = longitude * 20037508.34 / 180;
- var y = Math.log(Math.tan((90 + latitude) * Math.PI / 360)) / (Math.PI / 180);
- y = y * 20037508.34 / 180;
- mercator[0] = x;
- mercator[1] = y;
- return mercator;
-}
-
-// 墨卡托转经纬度
-function mercator2lonlat(longitude, latitude) {
- var lonlat = Array(2)
- var x = longitude / 20037508.34 * 180;
- var y = latitude / 20037508.34 * 180;
- y = 180 / Math.PI * (2 * Math.atan(Math.exp(y * Math.PI / 180)) - Math.PI / 2);
- lonlat[0] = x;
- lonlat[1] = y;
- return lonlat;
-}
-
-function getBoundingBox(data) {
- var bounds = {},coords;
- bounds.xMin = 180;
- bounds.xMax = 0;
- bounds.yMin = 90;
- bounds.yMax = 0
- for (var i = 0; i < data.length; i++) {
- var coorda = data[i].geometry.coordinates
- for (var k = 0; k < coorda.length; k++) {
- coords = coorda[k];
- if (coords.length == 1) {
- coords = coords[0]
- }
- for (var j = 0; j < coords.length; j++) {
- var longitude = coords[j][0];
- var latitude = coords[j][1];
- var point = {
- x: longitude,
- y: latitude
- }
- bounds.xMin = bounds.xMin < point.x ? bounds.xMin : point.x;
- bounds.xMax = bounds.xMax > point.x ? bounds.xMax : point.x;
- bounds.yMin = bounds.yMin < point.y ? bounds.yMin : point.y;
- bounds.yMax = bounds.yMax > point.y ? bounds.yMax : point.y;
- }
- }
- }
- return bounds;
-}
-
-function coordinateToPoint(latitude, longitude, bounds, scale, xoffset, yoffset) {
- return {
- x: (longitude - bounds.xMin) * scale + xoffset,
- y: (bounds.yMax - latitude) * scale + yoffset
- };
-}
-
-function pointToCoordinate(pointY, pointX, bounds, scale, xoffset, yoffset) {
- return {
- x: (pointX - xoffset) / scale + bounds.xMin,
- y: bounds.yMax - (pointY - yoffset) / scale
- };
-}
-
-function isRayIntersectsSegment(poi, s_poi, e_poi) {
- if (s_poi[1] == e_poi[1]) {
- return false;
- }
- if (s_poi[1] > poi[1] && e_poi[1] > poi[1]) {
- return false;
- }
- if (s_poi[1] < poi[1] && e_poi[1] < poi[1]) {
- return false;
- }
- if (s_poi[1] == poi[1] && e_poi[1] > poi[1]) {
- return false;
- }
- if (e_poi[1] == poi[1] && s_poi[1] > poi[1]) {
- return false;
- }
- if (s_poi[0] < poi[0] && e_poi[1] < poi[1]) {
- return false;
- }
- let xseg = e_poi[0] - (e_poi[0] - s_poi[0]) * (e_poi[1] - poi[1]) / (e_poi[1] - s_poi[1]);
- if (xseg < poi[0]) {
- return false;
- } else {
- return true;
- }
-}
-
-function isPoiWithinPoly(poi, poly, mercator) {
- let sinsc = 0;
- for (let i = 0; i < poly.length; i++) {
- let epoly = poly[i][0];
- if (poly.length == 1) {
- epoly = poly[i][0]
- }
- for (let j = 0; j < epoly.length - 1; j++) {
- let s_poi = epoly[j];
- let e_poi = epoly[j + 1];
- if (mercator) {
- s_poi = lonlat2mercator(epoly[j][0], epoly[j][1]);
- e_poi = lonlat2mercator(epoly[j + 1][0], epoly[j + 1][1]);
- }
- if (isRayIntersectsSegment(poi, s_poi, e_poi)) {
- sinsc += 1;
- }
- }
- }
- if (sinsc % 2 == 1) {
- return true;
- } else {
- return false;
- }
-}
-
-function drawMapDataPoints(series, opts, config, context) {
- var mapOption = assign({}, {
- border: true,
- mercator: false,
- borderWidth: 1,
- active:true,
- borderColor: '#666666',
- fillOpacity: 0.6,
- activeBorderColor: '#f04864',
- activeFillColor: '#facc14',
- activeFillOpacity: 1
- }, opts.extra.map);
- var coords, point;
- var data = series;
- var bounds = getBoundingBox(data);
- if (mapOption.mercator) {
- var max = lonlat2mercator(bounds.xMax, bounds.yMax)
- var min = lonlat2mercator(bounds.xMin, bounds.yMin)
- bounds.xMax = max[0]
- bounds.yMax = max[1]
- bounds.xMin = min[0]
- bounds.yMin = min[1]
- }
- var xScale = opts.width / Math.abs(bounds.xMax - bounds.xMin);
- var yScale = opts.height / Math.abs(bounds.yMax - bounds.yMin);
- var scale = xScale < yScale ? xScale : yScale;
- var xoffset = opts.width / 2 - Math.abs(bounds.xMax - bounds.xMin) / 2 * scale;
- var yoffset = opts.height / 2 - Math.abs(bounds.yMax - bounds.yMin) / 2 * scale;
- for (var i = 0; i < data.length; i++) {
- context.beginPath();
- context.setLineWidth(mapOption.borderWidth * opts.pix);
- context.setStrokeStyle(mapOption.borderColor);
- context.setFillStyle(hexToRgb(series[i].color, series[i].fillOpacity||mapOption.fillOpacity));
- if (mapOption.active == true && opts.tooltip) {
- if (opts.tooltip.index == i) {
- context.setStrokeStyle(mapOption.activeBorderColor);
- context.setFillStyle(hexToRgb(mapOption.activeFillColor, mapOption.activeFillOpacity));
- }
- }
- var coorda = data[i].geometry.coordinates
- for (var k = 0; k < coorda.length; k++) {
- coords = coorda[k];
- if (coords.length == 1) {
- coords = coords[0]
- }
- for (var j = 0; j < coords.length; j++) {
- var gaosi = Array(2);
- if (mapOption.mercator) {
- gaosi = lonlat2mercator(coords[j][0], coords[j][1])
- } else {
- gaosi = coords[j]
- }
- point = coordinateToPoint(gaosi[1], gaosi[0], bounds, scale, xoffset, yoffset)
- if (j === 0) {
- context.beginPath();
- context.moveTo(point.x, point.y);
- } else {
- context.lineTo(point.x, point.y);
- }
- }
- context.fill();
- if (mapOption.border == true) {
- context.stroke();
- }
- }
- }
- if (opts.dataLabel == true) {
- for (var i = 0; i < data.length; i++) {
- var centerPoint = data[i].properties.centroid;
- if (centerPoint) {
- if (mapOption.mercator) {
- centerPoint = lonlat2mercator(data[i].properties.centroid[0], data[i].properties.centroid[1])
- }
- point = coordinateToPoint(centerPoint[1], centerPoint[0], bounds, scale, xoffset, yoffset);
- let fontSize = data[i].textSize * opts.pix || config.fontSize;
- let fontColor = data[i].textColor || opts.fontColor;
- if(mapOption.active && mapOption.activeTextColor && opts.tooltip && opts.tooltip.index == i){
- fontColor = mapOption.activeTextColor;
- }
- let text = data[i].properties.name;
- context.beginPath();
- context.setFontSize(fontSize)
- context.setFillStyle(fontColor)
- context.fillText(text, point.x - measureText(text, fontSize, context) / 2, point.y + fontSize / 2);
- context.closePath();
- context.stroke();
- }
- }
- }
- opts.chartData.mapData = {
- bounds: bounds,
- scale: scale,
- xoffset: xoffset,
- yoffset: yoffset,
- mercator: mapOption.mercator
- }
- drawToolTipBridge(opts, config, context, 1);
- context.draw();
-}
-
-function normalInt(min, max, iter) {
- iter = iter == 0 ? 1 : iter;
- var arr = [];
- for (var i = 0; i < iter; i++) {
- arr[i] = Math.random();
- };
- return Math.floor(arr.reduce(function(i, j) {
- return i + j
- }) / iter * (max - min)) + min;
-};
-
-function collisionNew(area, points, width, height) {
- var isIn = false;
- for (let i = 0; i < points.length; i++) {
- if (points[i].area) {
- if (area[3] < points[i].area[1] || area[0] > points[i].area[2] || area[1] > points[i].area[3] || area[2] < points[i].area[0]) {
- if (area[0] < 0 || area[1] < 0 || area[2] > width || area[3] > height) {
- isIn = true;
- break;
- } else {
- isIn = false;
- }
- } else {
- isIn = true;
- break;
- }
- }
- }
- return isIn;
-};
-
-function getWordCloudPoint(opts, type, context) {
- let points = opts.series;
- switch (type) {
- case 'normal':
- for (let i = 0; i < points.length; i++) {
- let text = points[i].name;
- let tHeight = points[i].textSize * opts.pix;
- let tWidth = measureText(text, tHeight, context);
- let x, y;
- let area;
- let breaknum = 0;
- while (true) {
- breaknum++;
- x = normalInt(-opts.width / 2, opts.width / 2, 5) - tWidth / 2;
- y = normalInt(-opts.height / 2, opts.height / 2, 5) + tHeight / 2;
- area = [x - 5 + opts.width / 2, y - 5 - tHeight + opts.height / 2, x + tWidth + 5 + opts.width / 2, y + 5 +
- opts.height / 2
- ];
- let isCollision = collisionNew(area, points, opts.width, opts.height);
- if (!isCollision) break;
- if (breaknum == 1000) {
- area = [-100, -100, -100, -100];
- break;
- }
- };
- points[i].area = area;
- }
- break;
- case 'vertical':
- function Spin() {
- //获取均匀随机值,是否旋转,旋转的概率为(1-0.5)
- if (Math.random() > 0.7) {
- return true;
- } else {
- return false
- };
- };
- for (let i = 0; i < points.length; i++) {
- let text = points[i].name;
- let tHeight = points[i].textSize * opts.pix;
- let tWidth = measureText(text, tHeight, context);
- let isSpin = Spin();
- let x, y, area, areav;
- let breaknum = 0;
- while (true) {
- breaknum++;
- let isCollision;
- if (isSpin) {
- x = normalInt(-opts.width / 2, opts.width / 2, 5) - tWidth / 2;
- y = normalInt(-opts.height / 2, opts.height / 2, 5) + tHeight / 2;
- area = [y - 5 - tWidth + opts.width / 2, (-x - 5 + opts.height / 2), y + 5 + opts.width / 2, (-x + tHeight + 5 + opts.height / 2)];
- areav = [opts.width - (opts.width / 2 - opts.height / 2) - (-x + tHeight + 5 + opts.height / 2) - 5, (opts.height / 2 - opts.width / 2) + (y - 5 - tWidth + opts.width / 2) - 5, opts.width - (opts.width / 2 - opts.height / 2) - (-x + tHeight + 5 + opts.height / 2) + tHeight, (opts.height / 2 - opts.width / 2) + (y - 5 - tWidth + opts.width / 2) + tWidth + 5];
- isCollision = collisionNew(areav, points, opts.height, opts.width);
- } else {
- x = normalInt(-opts.width / 2, opts.width / 2, 5) - tWidth / 2;
- y = normalInt(-opts.height / 2, opts.height / 2, 5) + tHeight / 2;
- area = [x - 5 + opts.width / 2, y - 5 - tHeight + opts.height / 2, x + tWidth + 5 + opts.width / 2, y + 5 + opts.height / 2];
- isCollision = collisionNew(area, points, opts.width, opts.height);
- }
- if (!isCollision) break;
- if (breaknum == 1000) {
- area = [-1000, -1000, -1000, -1000];
- break;
- }
- };
- if (isSpin) {
- points[i].area = areav;
- points[i].areav = area;
- } else {
- points[i].area = area;
- }
- points[i].rotate = isSpin;
- };
- break;
- }
- return points;
-}
-
-function drawWordCloudDataPoints(series, opts, config, context) {
- let process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
- let wordOption = assign({}, {
- type: 'normal',
- autoColors: true
- }, opts.extra.word);
- if (!opts.chartData.wordCloudData) {
- opts.chartData.wordCloudData = getWordCloudPoint(opts, wordOption.type, context);
- }
- context.beginPath();
- context.setFillStyle(opts.background);
- context.rect(0, 0, opts.width, opts.height);
- context.fill();
- context.save();
- let points = opts.chartData.wordCloudData;
- context.translate(opts.width / 2, opts.height / 2);
- for (let i = 0; i < points.length; i++) {
- context.save();
- if (points[i].rotate) {
- context.rotate(90 * Math.PI / 180);
- }
- let text = points[i].name;
- let tHeight = points[i].textSize * opts.pix;
- let tWidth = measureText(text, tHeight, context);
- context.beginPath();
- context.setStrokeStyle(points[i].color);
- context.setFillStyle(points[i].color);
- context.setFontSize(tHeight);
- if (points[i].rotate) {
- if (points[i].areav[0] > 0) {
- if (opts.tooltip) {
- if (opts.tooltip.index == i) {
- context.strokeText(text, (points[i].areav[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].areav[1] + 5 + tHeight - opts.height / 2) * process);
- } else {
- context.fillText(text, (points[i].areav[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].areav[1] + 5 + tHeight - opts.height / 2) * process);
- }
- } else {
- context.fillText(text, (points[i].areav[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].areav[1] + 5 + tHeight - opts.height / 2) * process);
- }
- }
- } else {
- if (points[i].area[0] > 0) {
- if (opts.tooltip) {
- if (opts.tooltip.index == i) {
- context.strokeText(text, (points[i].area[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].area[1] + 5 + tHeight - opts.height / 2) * process);
- } else {
- context.fillText(text, (points[i].area[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].area[1] + 5 + tHeight - opts.height / 2) * process);
- }
- } else {
- context.fillText(text, (points[i].area[0] + 5 - opts.width / 2) * process - tWidth * (1 - process) / 2, (points[i].area[1] + 5 + tHeight - opts.height / 2) * process);
- }
- }
- }
- context.stroke();
- context.restore();
- }
- context.restore();
-}
-
-function drawFunnelDataPoints(series, opts, config, context) {
- let process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
- let funnelOption = assign({}, {
- type:'funnel',
- activeWidth: 10,
- activeOpacity: 0.3,
- border: false,
- borderWidth: 2,
- borderColor: '#FFFFFF',
- fillOpacity: 1,
- minSize: 0,
- labelAlign: 'right',
- linearType: 'none',
- customColor: [],
- }, opts.extra.funnel);
- let eachSpacing = (opts.height - opts.area[0] - opts.area[2]) / series.length;
- let centerPosition = {
- x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
- y: opts.height - opts.area[2]
- };
- let activeWidth = funnelOption.activeWidth * opts.pix;
- let radius = Math.min((opts.width - opts.area[1] - opts.area[3]) / 2 - activeWidth, (opts.height - opts.area[0] - opts.area[2]) / 2 - activeWidth);
- let seriesNew = getFunnelDataPoints(series, radius, funnelOption, eachSpacing, process);
- context.save();
- context.translate(centerPosition.x, centerPosition.y);
- funnelOption.customColor = fillCustomColor(funnelOption.linearType, funnelOption.customColor, series, config);
- if(funnelOption.type == 'pyramid'){
- for (let i = 0; i < seriesNew.length; i++) {
- if (i == seriesNew.length -1) {
- if (opts.tooltip) {
- if (opts.tooltip.index == i) {
- context.beginPath();
- context.setFillStyle(hexToRgb(seriesNew[i].color, funnelOption.activeOpacity));
- context.moveTo(-activeWidth, -eachSpacing);
- context.lineTo(-seriesNew[i].radius - activeWidth, 0);
- context.lineTo(seriesNew[i].radius + activeWidth, 0);
- context.lineTo(activeWidth, -eachSpacing);
- context.lineTo(-activeWidth, -eachSpacing);
- context.closePath();
- context.fill();
- }
- }
- seriesNew[i].funnelArea = [centerPosition.x - seriesNew[i].radius, centerPosition.y - eachSpacing * (i + 1), centerPosition.x + seriesNew[i].radius, centerPosition.y - eachSpacing * i];
- context.beginPath();
- context.setLineWidth(funnelOption.borderWidth * opts.pix);
- context.setStrokeStyle(funnelOption.borderColor);
- var fillColor = hexToRgb(seriesNew[i].color, funnelOption.fillOpacity);
- if (funnelOption.linearType == 'custom') {
- var grd = context.createLinearGradient(seriesNew[i].radius, -eachSpacing, -seriesNew[i].radius, -eachSpacing);
- grd.addColorStop(0, hexToRgb(seriesNew[i].color, funnelOption.fillOpacity));
- grd.addColorStop(0.5, hexToRgb(funnelOption.customColor[seriesNew[i].linearIndex], funnelOption.fillOpacity));
- grd.addColorStop(1, hexToRgb(seriesNew[i].color, funnelOption.fillOpacity));
- fillColor = grd
- }
- context.setFillStyle(fillColor);
- context.moveTo(0, -eachSpacing);
- context.lineTo(-seriesNew[i].radius, 0);
- context.lineTo(seriesNew[i].radius, 0);
- context.lineTo(0, -eachSpacing);
- context.closePath();
- context.fill();
- if (funnelOption.border == true) {
- context.stroke();
- }
- } else {
- if (opts.tooltip) {
- if (opts.tooltip.index == i) {
- context.beginPath();
- context.setFillStyle(hexToRgb(seriesNew[i].color, funnelOption.activeOpacity));
- context.moveTo(0, 0);
- context.lineTo(-seriesNew[i].radius - activeWidth, 0);
- context.lineTo(-seriesNew[i + 1].radius - activeWidth, -eachSpacing);
- context.lineTo(seriesNew[i + 1].radius + activeWidth, -eachSpacing);
- context.lineTo(seriesNew[i].radius + activeWidth, 0);
- context.lineTo(0, 0);
- context.closePath();
- context.fill();
- }
- }
- seriesNew[i].funnelArea = [centerPosition.x - seriesNew[i].radius, centerPosition.y - eachSpacing * (i + 1), centerPosition.x + seriesNew[i].radius, centerPosition.y - eachSpacing * i];
- context.beginPath();
- context.setLineWidth(funnelOption.borderWidth * opts.pix);
- context.setStrokeStyle(funnelOption.borderColor);
- var fillColor = hexToRgb(seriesNew[i].color, funnelOption.fillOpacity);
- if (funnelOption.linearType == 'custom') {
- var grd = context.createLinearGradient(seriesNew[i].radius, -eachSpacing, -seriesNew[i].radius, -eachSpacing);
- grd.addColorStop(0, hexToRgb(seriesNew[i].color, funnelOption.fillOpacity));
- grd.addColorStop(0.5, hexToRgb(funnelOption.customColor[seriesNew[i].linearIndex], funnelOption.fillOpacity));
- grd.addColorStop(1, hexToRgb(seriesNew[i].color, funnelOption.fillOpacity));
- fillColor = grd
- }
- context.setFillStyle(fillColor);
- context.moveTo(0, 0);
- context.lineTo(-seriesNew[i].radius, 0);
- context.lineTo(-seriesNew[i + 1].radius, -eachSpacing);
- context.lineTo(seriesNew[i + 1].radius, -eachSpacing);
- context.lineTo(seriesNew[i].radius, 0);
- context.lineTo(0, 0);
- context.closePath();
- context.fill();
- if (funnelOption.border == true) {
- context.stroke();
- }
- }
- context.translate(0, -eachSpacing)
- }
- }else{
- context.translate(0, - (seriesNew.length - 1) * eachSpacing);
- for (let i = 0; i < seriesNew.length; i++) {
- if (i == seriesNew.length - 1) {
- if (opts.tooltip) {
- if (opts.tooltip.index == i) {
- context.beginPath();
- context.setFillStyle(hexToRgb(seriesNew[i].color, funnelOption.activeOpacity));
- context.moveTo(-activeWidth - funnelOption.minSize/2, 0);
- context.lineTo(-seriesNew[i].radius - activeWidth, -eachSpacing);
- context.lineTo(seriesNew[i].radius + activeWidth, -eachSpacing);
- context.lineTo(activeWidth + funnelOption.minSize/2, 0);
- context.lineTo(-activeWidth - funnelOption.minSize/2, 0);
- context.closePath();
- context.fill();
- }
- }
- seriesNew[i].funnelArea = [centerPosition.x - seriesNew[i].radius, centerPosition.y - eachSpacing, centerPosition.x + seriesNew[i].radius, centerPosition.y ];
- context.beginPath();
- context.setLineWidth(funnelOption.borderWidth * opts.pix);
- context.setStrokeStyle(funnelOption.borderColor);
- var fillColor = hexToRgb(seriesNew[i].color, funnelOption.fillOpacity);
- if (funnelOption.linearType == 'custom') {
- var grd = context.createLinearGradient(seriesNew[i].radius, -eachSpacing, -seriesNew[i].radius, -eachSpacing);
- grd.addColorStop(0, hexToRgb(seriesNew[i].color, funnelOption.fillOpacity));
- grd.addColorStop(0.5, hexToRgb(funnelOption.customColor[seriesNew[i].linearIndex], funnelOption.fillOpacity));
- grd.addColorStop(1, hexToRgb(seriesNew[i].color, funnelOption.fillOpacity));
- fillColor = grd
- }
- context.setFillStyle(fillColor);
- context.moveTo(0, 0);
- context.lineTo(-funnelOption.minSize/2, 0);
- context.lineTo(-seriesNew[i].radius, -eachSpacing);
- context.lineTo(seriesNew[i].radius, -eachSpacing);
- context.lineTo(funnelOption.minSize/2, 0);
- context.lineTo(0, 0);
- context.closePath();
- context.fill();
- if (funnelOption.border == true) {
- context.stroke();
- }
- } else {
- if (opts.tooltip) {
- if (opts.tooltip.index == i) {
- context.beginPath();
- context.setFillStyle(hexToRgb(seriesNew[i].color, funnelOption.activeOpacity));
- context.moveTo(0, 0);
- context.lineTo(-seriesNew[i + 1].radius - activeWidth, 0);
- context.lineTo(-seriesNew[i].radius - activeWidth, -eachSpacing);
- context.lineTo(seriesNew[i].radius + activeWidth, -eachSpacing);
- context.lineTo(seriesNew[i + 1].radius + activeWidth, 0);
- context.lineTo(0, 0);
- context.closePath();
- context.fill();
- }
- }
- seriesNew[i].funnelArea = [centerPosition.x - seriesNew[i].radius, centerPosition.y - eachSpacing * (seriesNew.length - i), centerPosition.x + seriesNew[i].radius, centerPosition.y - eachSpacing * (seriesNew.length - i - 1)];
- context.beginPath();
- context.setLineWidth(funnelOption.borderWidth * opts.pix);
- context.setStrokeStyle(funnelOption.borderColor);
- var fillColor = hexToRgb(seriesNew[i].color, funnelOption.fillOpacity);
- if (funnelOption.linearType == 'custom') {
- var grd = context.createLinearGradient(seriesNew[i].radius, -eachSpacing, -seriesNew[i].radius, -eachSpacing);
- grd.addColorStop(0, hexToRgb(seriesNew[i].color, funnelOption.fillOpacity));
- grd.addColorStop(0.5, hexToRgb(funnelOption.customColor[seriesNew[i].linearIndex], funnelOption.fillOpacity));
- grd.addColorStop(1, hexToRgb(seriesNew[i].color, funnelOption.fillOpacity));
- fillColor = grd
- }
- context.setFillStyle(fillColor);
- context.moveTo(0, 0);
- context.lineTo(-seriesNew[i + 1].radius, 0);
- context.lineTo(-seriesNew[i].radius, -eachSpacing);
- context.lineTo(seriesNew[i].radius, -eachSpacing);
- context.lineTo(seriesNew[i + 1].radius, 0);
- context.lineTo(0, 0);
- context.closePath();
- context.fill();
- if (funnelOption.border == true) {
- context.stroke();
- }
- }
- context.translate(0, eachSpacing)
- }
- }
-
- context.restore();
- if (opts.dataLabel !== false && process === 1) {
- drawFunnelText(seriesNew, opts, context, eachSpacing, funnelOption.labelAlign, activeWidth, centerPosition);
- }
- if (process === 1) {
- drawFunnelCenterText(seriesNew, opts, context, eachSpacing, funnelOption.labelAlign, activeWidth, centerPosition);
- }
- return {
- center: centerPosition,
- radius: radius,
- series: seriesNew
- };
-}
-
-function drawFunnelText(series, opts, context, eachSpacing, labelAlign, activeWidth, centerPosition) {
- for (let i = 0; i < series.length; i++) {
- let item = series[i];
- if(item.labelShow === false){
- continue;
- }
- let startX, endX, startY, fontSize;
- let text = item.formatter ? item.formatter(item,i,series,opts) : util.toFixed(item._proportion_ * 100) + '%';
- text = item.labelText ? item.labelText : text;
- if (labelAlign == 'right') {
- if (i == series.length -1) {
- startX = (item.funnelArea[2] + centerPosition.x) / 2;
- } else {
- startX = (item.funnelArea[2] + series[i + 1].funnelArea[2]) / 2;
- }
- endX = startX + activeWidth * 2;
- startY = item.funnelArea[1] + eachSpacing / 2;
- fontSize = item.textSize * opts.pix || opts.fontSize * opts.pix;
- context.setLineWidth(1 * opts.pix);
- context.setStrokeStyle(item.color);
- context.setFillStyle(item.color);
- context.beginPath();
- context.moveTo(startX, startY);
- context.lineTo(endX, startY);
- context.stroke();
- context.closePath();
- context.beginPath();
- context.moveTo(endX, startY);
- context.arc(endX, startY, 2 * opts.pix, 0, 2 * Math.PI);
- context.closePath();
- context.fill();
- context.beginPath();
- context.setFontSize(fontSize);
- context.setFillStyle(item.textColor || opts.fontColor);
- context.fillText(text, endX + 5, startY + fontSize / 2 - 2);
- context.closePath();
- context.stroke();
- context.closePath();
- }
- if (labelAlign == 'left') {
- if (i == series.length -1) {
- startX = (item.funnelArea[0] + centerPosition.x) / 2;
- } else {
- startX = (item.funnelArea[0] + series[i + 1].funnelArea[0]) / 2;
- }
- endX = startX - activeWidth * 2;
- startY = item.funnelArea[1] + eachSpacing / 2;
- fontSize = item.textSize * opts.pix || opts.fontSize * opts.pix;
- context.setLineWidth(1 * opts.pix);
- context.setStrokeStyle(item.color);
- context.setFillStyle(item.color);
- context.beginPath();
- context.moveTo(startX, startY);
- context.lineTo(endX, startY);
- context.stroke();
- context.closePath();
- context.beginPath();
- context.moveTo(endX, startY);
- context.arc(endX, startY, 2, 0, 2 * Math.PI);
- context.closePath();
- context.fill();
- context.beginPath();
- context.setFontSize(fontSize);
- context.setFillStyle(item.textColor || opts.fontColor);
- context.fillText(text, endX - 5 - measureText(text, fontSize, context), startY + fontSize / 2 - 2);
- context.closePath();
- context.stroke();
- context.closePath();
- }
- }
-}
-
-function drawFunnelCenterText(series, opts, context, eachSpacing, labelAlign, activeWidth, centerPosition) {
- for (let i = 0; i < series.length; i++) {
- let item = series[i];
- let startY, fontSize;
- if (item.centerText) {
- startY = item.funnelArea[1] + eachSpacing / 2;
- fontSize = item.centerTextSize * opts.pix || opts.fontSize * opts.pix;
- context.beginPath();
- context.setFontSize(fontSize);
- context.setFillStyle(item.centerTextColor || "#FFFFFF");
- context.fillText(item.centerText, centerPosition.x - measureText(item.centerText, fontSize, context) / 2, startY + fontSize / 2 - 2);
- context.closePath();
- context.stroke();
- context.closePath();
- }
- }
-}
-
-
-function drawCanvas(opts, context) {
- context.save();
- context.translate(0, 0.5);
- context.restore();
- context.draw();
-}
-
-var Timing = {
- easeIn: function easeIn(pos) {
- return Math.pow(pos, 3);
- },
- easeOut: function easeOut(pos) {
- return Math.pow(pos - 1, 3) + 1;
- },
- easeInOut: function easeInOut(pos) {
- if ((pos /= 0.5) < 1) {
- return 0.5 * Math.pow(pos, 3);
- } else {
- return 0.5 * (Math.pow(pos - 2, 3) + 2);
- }
- },
- linear: function linear(pos) {
- return pos;
- }
-};
-
-function Animation(opts) {
- this.isStop = false;
- opts.duration = typeof opts.duration === 'undefined' ? 1000 : opts.duration;
- opts.timing = opts.timing || 'easeInOut';
- var delay = 17;
- function createAnimationFrame() {
- if (typeof setTimeout !== 'undefined') {
- return function(step, delay) {
- setTimeout(function() {
- var timeStamp = +new Date();
- step(timeStamp);
- }, delay);
- };
- } else if (typeof requestAnimationFrame !== 'undefined') {
- return requestAnimationFrame;
- } else {
- return function(step) {
- step(null);
- };
- }
- };
- var animationFrame = createAnimationFrame();
- var startTimeStamp = null;
- var _step = function step(timestamp) {
- if (timestamp === null || this.isStop === true) {
- opts.onProcess && opts.onProcess(1);
- opts.onAnimationFinish && opts.onAnimationFinish();
- return;
- }
- if (startTimeStamp === null) {
- startTimeStamp = timestamp;
- }
- if (timestamp - startTimeStamp < opts.duration) {
- var process = (timestamp - startTimeStamp) / opts.duration;
- var timingFunction = Timing[opts.timing];
- process = timingFunction(process);
- opts.onProcess && opts.onProcess(process);
- animationFrame(_step, delay);
- } else {
- opts.onProcess && opts.onProcess(1);
- opts.onAnimationFinish && opts.onAnimationFinish();
- }
- };
- _step = _step.bind(this);
- animationFrame(_step, delay);
-}
-
-Animation.prototype.stop = function() {
- this.isStop = true;
-};
-
-function drawCharts(type, opts, config, context) {
- var _this = this;
- var series = opts.series;
- //兼容ECharts饼图类数据格式
- if (type === 'pie' || type === 'ring' || type === 'mount' || type === 'rose' || type === 'funnel') {
- series = fixPieSeries(series, opts, config);
- }
- var categories = opts.categories;
- if (type === 'mount') {
- categories = [];
- for (let j = 0; j < series.length; j++) {
- if(series[j].show !== false) categories.push(series[j].name)
- }
- opts.categories = categories;
- }
- series = fillSeries(series, opts, config);
- var duration = opts.animation ? opts.duration : 0;
- _this.animationInstance && _this.animationInstance.stop();
- var seriesMA = null;
- if (type == 'candle') {
- let average = assign({}, opts.extra.candle.average);
- if (average.show) {
- seriesMA = calCandleMA(average.day, average.name, average.color, series[0].data);
- seriesMA = fillSeries(seriesMA, opts, config);
- opts.seriesMA = seriesMA;
- } else if (opts.seriesMA) {
- seriesMA = opts.seriesMA = fillSeries(opts.seriesMA, opts, config);
- } else {
- seriesMA = series;
- }
- } else {
- seriesMA = series;
- }
- /* 过滤掉show=false的series */
- opts._series_ = series = filterSeries(series);
- //重新计算图表区域
- opts.area = new Array(4);
- //复位绘图区域
- for (let j = 0; j < 4; j++) {
- opts.area[j] = opts.padding[j] * opts.pix;
- }
- //通过计算三大区域:图例、X轴、Y轴的大小,确定绘图区域
- var _calLegendData = calLegendData(seriesMA, opts, config, opts.chartData, context),
- legendHeight = _calLegendData.area.wholeHeight,
- legendWidth = _calLegendData.area.wholeWidth;
-
- switch (opts.legend.position) {
- case 'top':
- opts.area[0] += legendHeight;
- break;
- case 'bottom':
- opts.area[2] += legendHeight;
- break;
- case 'left':
- opts.area[3] += legendWidth;
- break;
- case 'right':
- opts.area[1] += legendWidth;
- break;
- }
-
- let _calYAxisData = {},
- yAxisWidth = 0;
- if (opts.type === 'line' || opts.type === 'column'|| opts.type === 'mount' || opts.type === 'area' || opts.type === 'mix' || opts.type === 'candle' || opts.type === 'scatter' || opts.type === 'bubble' || opts.type === 'bar') {
- _calYAxisData = calYAxisData(series, opts, config, context);
- yAxisWidth = _calYAxisData.yAxisWidth;
- //如果显示Y轴标题
- if (opts.yAxis.showTitle) {
- let maxTitleHeight = 0;
- for (let i = 0; i < opts.yAxis.data.length; i++) {
- maxTitleHeight = Math.max(maxTitleHeight, opts.yAxis.data[i].titleFontSize ? opts.yAxis.data[i].titleFontSize * opts.pix : config.fontSize)
- }
- opts.area[0] += maxTitleHeight;
- }
- let rightIndex = 0,
- leftIndex = 0;
- //计算主绘图区域左右位置
- for (let i = 0; i < yAxisWidth.length; i++) {
- if (yAxisWidth[i].position == 'left') {
- if (leftIndex > 0) {
- opts.area[3] += yAxisWidth[i].width + opts.yAxis.padding * opts.pix;
- } else {
- opts.area[3] += yAxisWidth[i].width;
- }
- leftIndex += 1;
- } else if (yAxisWidth[i].position == 'right') {
- if (rightIndex > 0) {
- opts.area[1] += yAxisWidth[i].width + opts.yAxis.padding * opts.pix;
- } else {
- opts.area[1] += yAxisWidth[i].width;
- }
- rightIndex += 1;
- }
- }
- } else {
- config.yAxisWidth = yAxisWidth;
- }
- opts.chartData.yAxisData = _calYAxisData;
-
- if (opts.categories && opts.categories.length && opts.type !== 'radar' && opts.type !== 'gauge' && opts.type !== 'bar') {
- opts.chartData.xAxisData = getXAxisPoints(opts.categories, opts, config);
- let _calCategoriesData = calCategoriesData(opts.categories, opts, config, opts.chartData.xAxisData.eachSpacing, context),
- xAxisHeight = _calCategoriesData.xAxisHeight,
- angle = _calCategoriesData.angle;
- config.xAxisHeight = xAxisHeight;
- config._xAxisTextAngle_ = angle;
- opts.area[2] += xAxisHeight;
- opts.chartData.categoriesData = _calCategoriesData;
- } else {
- if (opts.type === 'line' || opts.type === 'area' || opts.type === 'scatter' || opts.type === 'bubble' || opts.type === 'bar') {
- opts.chartData.xAxisData = calXAxisData(series, opts, config, context);
- categories = opts.chartData.xAxisData.rangesFormat;
- let _calCategoriesData = calCategoriesData(categories, opts, config, opts.chartData.xAxisData.eachSpacing, context),
- xAxisHeight = _calCategoriesData.xAxisHeight,
- angle = _calCategoriesData.angle;
- config.xAxisHeight = xAxisHeight;
- config._xAxisTextAngle_ = angle;
- opts.area[2] += xAxisHeight;
- opts.chartData.categoriesData = _calCategoriesData;
- } else {
- opts.chartData.xAxisData = {
- xAxisPoints: []
- };
- }
- }
-
- //计算右对齐偏移距离
- if (opts.enableScroll && opts.xAxis.scrollAlign == 'right' && opts._scrollDistance_ === undefined) {
- let offsetLeft = 0,
- xAxisPoints = opts.chartData.xAxisData.xAxisPoints,
- startX = opts.chartData.xAxisData.startX,
- endX = opts.chartData.xAxisData.endX,
- eachSpacing = opts.chartData.xAxisData.eachSpacing;
- let totalWidth = eachSpacing * (xAxisPoints.length - 1);
- let screenWidth = endX - startX;
- offsetLeft = screenWidth - totalWidth;
- _this.scrollOption.currentOffset = offsetLeft;
- _this.scrollOption.startTouchX = offsetLeft;
- _this.scrollOption.distance = 0;
- _this.scrollOption.lastMoveTime = 0;
- opts._scrollDistance_ = offsetLeft;
- }
-
- if (type === 'pie' || type === 'ring' || type === 'rose') {
- config._pieTextMaxLength_ = opts.dataLabel === false ? 0 : getPieTextMaxLength(seriesMA, config, context, opts);
- }
-
- switch (type) {
- case 'word':
- this.animationInstance = new Animation({
- timing: opts.timing,
- duration: duration,
- onProcess: function(process) {
- context.clearRect(0, 0, opts.width, opts.height);
- if (opts.rotate) {
- contextRotate(context, opts);
- }
- drawWordCloudDataPoints(series, opts, config, context, process);
- drawCanvas(opts, context);
- },
- onAnimationFinish: function onAnimationFinish() {
- _this.uevent.trigger('renderComplete');
- }
- });
- break;
- case 'map':
- context.clearRect(0, 0, opts.width, opts.height);
- drawMapDataPoints(series, opts, config, context);
- setTimeout(()=>{
- this.uevent.trigger('renderComplete');
- },50)
- break;
- case 'funnel':
- this.animationInstance = new Animation({
- timing: opts.timing,
- duration: duration,
- onProcess: function(process) {
- context.clearRect(0, 0, opts.width, opts.height);
- if (opts.rotate) {
- contextRotate(context, opts);
- }
- opts.chartData.funnelData = drawFunnelDataPoints(series, opts, config, context, process);
- drawLegend(opts.series, opts, config, context, opts.chartData);
- drawToolTipBridge(opts, config, context, process);
- drawCanvas(opts, context);
- },
- onAnimationFinish: function onAnimationFinish() {
- _this.uevent.trigger('renderComplete');
- }
- });
- break;
- case 'line':
- this.animationInstance = new Animation({
- timing: opts.timing,
- duration: duration,
- onProcess: function onProcess(process) {
- context.clearRect(0, 0, opts.width, opts.height);
- if (opts.rotate) {
- contextRotate(context, opts);
- }
- drawYAxisGrid(categories, opts, config, context);
- drawXAxis(categories, opts, config, context);
- var _drawLineDataPoints = drawLineDataPoints(series, opts, config, context, process),
- xAxisPoints = _drawLineDataPoints.xAxisPoints,
- calPoints = _drawLineDataPoints.calPoints,
- eachSpacing = _drawLineDataPoints.eachSpacing;
- opts.chartData.xAxisPoints = xAxisPoints;
- opts.chartData.calPoints = calPoints;
- opts.chartData.eachSpacing = eachSpacing;
- drawYAxis(series, opts, config, context);
- if (opts.enableMarkLine !== false && process === 1) {
- drawMarkLine(opts, config, context);
- }
- drawLegend(opts.series, opts, config, context, opts.chartData);
- drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
- drawCanvas(opts, context);
- },
- onAnimationFinish: function onAnimationFinish() {
- _this.uevent.trigger('renderComplete');
- }
- });
- break;
- case 'scatter':
- this.animationInstance = new Animation({
- timing: opts.timing,
- duration: duration,
- onProcess: function onProcess(process) {
- context.clearRect(0, 0, opts.width, opts.height);
- if (opts.rotate) {
- contextRotate(context, opts);
- }
- drawYAxisGrid(categories, opts, config, context);
- drawXAxis(categories, opts, config, context);
- var _drawScatterDataPoints = drawScatterDataPoints(series, opts, config, context, process),
- xAxisPoints = _drawScatterDataPoints.xAxisPoints,
- calPoints = _drawScatterDataPoints.calPoints,
- eachSpacing = _drawScatterDataPoints.eachSpacing;
- opts.chartData.xAxisPoints = xAxisPoints;
- opts.chartData.calPoints = calPoints;
- opts.chartData.eachSpacing = eachSpacing;
- drawYAxis(series, opts, config, context);
- if (opts.enableMarkLine !== false && process === 1) {
- drawMarkLine(opts, config, context);
- }
- drawLegend(opts.series, opts, config, context, opts.chartData);
- drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
- drawCanvas(opts, context);
- },
- onAnimationFinish: function onAnimationFinish() {
- _this.uevent.trigger('renderComplete');
- }
- });
- break;
- case 'bubble':
- this.animationInstance = new Animation({
- timing: opts.timing,
- duration: duration,
- onProcess: function onProcess(process) {
- context.clearRect(0, 0, opts.width, opts.height);
- if (opts.rotate) {
- contextRotate(context, opts);
- }
- drawYAxisGrid(categories, opts, config, context);
- drawXAxis(categories, opts, config, context);
- var _drawBubbleDataPoints = drawBubbleDataPoints(series, opts, config, context, process),
- xAxisPoints = _drawBubbleDataPoints.xAxisPoints,
- calPoints = _drawBubbleDataPoints.calPoints,
- eachSpacing = _drawBubbleDataPoints.eachSpacing;
- opts.chartData.xAxisPoints = xAxisPoints;
- opts.chartData.calPoints = calPoints;
- opts.chartData.eachSpacing = eachSpacing;
- drawYAxis(series, opts, config, context);
- if (opts.enableMarkLine !== false && process === 1) {
- drawMarkLine(opts, config, context);
- }
- drawLegend(opts.series, opts, config, context, opts.chartData);
- drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
- drawCanvas(opts, context);
- },
- onAnimationFinish: function onAnimationFinish() {
- _this.uevent.trigger('renderComplete');
- }
- });
- break;
- case 'mix':
- this.animationInstance = new Animation({
- timing: opts.timing,
- duration: duration,
- onProcess: function onProcess(process) {
- context.clearRect(0, 0, opts.width, opts.height);
- if (opts.rotate) {
- contextRotate(context, opts);
- }
- drawYAxisGrid(categories, opts, config, context);
- drawXAxis(categories, opts, config, context);
- var _drawMixDataPoints = drawMixDataPoints(series, opts, config, context, process),
- xAxisPoints = _drawMixDataPoints.xAxisPoints,
- calPoints = _drawMixDataPoints.calPoints,
- eachSpacing = _drawMixDataPoints.eachSpacing;
- opts.chartData.xAxisPoints = xAxisPoints;
- opts.chartData.calPoints = calPoints;
- opts.chartData.eachSpacing = eachSpacing;
- drawYAxis(series, opts, config, context);
- if (opts.enableMarkLine !== false && process === 1) {
- drawMarkLine(opts, config, context);
- }
- drawLegend(opts.series, opts, config, context, opts.chartData);
- drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
- drawCanvas(opts, context);
- },
- onAnimationFinish: function onAnimationFinish() {
- _this.uevent.trigger('renderComplete');
- }
- });
- break;
- case 'column':
- this.animationInstance = new Animation({
- timing: opts.timing,
- duration: duration,
- onProcess: function onProcess(process) {
- context.clearRect(0, 0, opts.width, opts.height);
- if (opts.rotate) {
- contextRotate(context, opts);
- }
- drawYAxisGrid(categories, opts, config, context);
- drawXAxis(categories, opts, config, context);
- var _drawColumnDataPoints = drawColumnDataPoints(series, opts, config, context, process),
- xAxisPoints = _drawColumnDataPoints.xAxisPoints,
- calPoints = _drawColumnDataPoints.calPoints,
- eachSpacing = _drawColumnDataPoints.eachSpacing;
- opts.chartData.xAxisPoints = xAxisPoints;
- opts.chartData.calPoints = calPoints;
- opts.chartData.eachSpacing = eachSpacing;
- drawYAxis(series, opts, config, context);
- if (opts.enableMarkLine !== false && process === 1) {
- drawMarkLine(opts, config, context);
- }
- drawLegend(opts.series, opts, config, context, opts.chartData);
- drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
- drawCanvas(opts, context);
- },
- onAnimationFinish: function onAnimationFinish() {
- _this.uevent.trigger('renderComplete');
- }
- });
- break;
- case 'mount':
- this.animationInstance = new Animation({
- timing: opts.timing,
- duration: duration,
- onProcess: function onProcess(process) {
- context.clearRect(0, 0, opts.width, opts.height);
- if (opts.rotate) {
- contextRotate(context, opts);
- }
- drawYAxisGrid(categories, opts, config, context);
- drawXAxis(categories, opts, config, context);
- var _drawMountDataPoints = drawMountDataPoints(series, opts, config, context, process),
- xAxisPoints = _drawMountDataPoints.xAxisPoints,
- calPoints = _drawMountDataPoints.calPoints,
- eachSpacing = _drawMountDataPoints.eachSpacing;
- opts.chartData.xAxisPoints = xAxisPoints;
- opts.chartData.calPoints = calPoints;
- opts.chartData.eachSpacing = eachSpacing;
- drawYAxis(series, opts, config, context);
- if (opts.enableMarkLine !== false && process === 1) {
- drawMarkLine(opts, config, context);
- }
- drawLegend(opts.series, opts, config, context, opts.chartData);
- drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
- drawCanvas(opts, context);
- },
- onAnimationFinish: function onAnimationFinish() {
- _this.uevent.trigger('renderComplete');
- }
- });
- break;
- case 'bar':
- this.animationInstance = new Animation({
- timing: opts.timing,
- duration: duration,
- onProcess: function onProcess(process) {
- context.clearRect(0, 0, opts.width, opts.height);
- if (opts.rotate) {
- contextRotate(context, opts);
- }
- drawXAxis(categories, opts, config, context);
- var _drawBarDataPoints = drawBarDataPoints(series, opts, config, context, process),
- yAxisPoints = _drawBarDataPoints.yAxisPoints,
- calPoints = _drawBarDataPoints.calPoints,
- eachSpacing = _drawBarDataPoints.eachSpacing;
- opts.chartData.yAxisPoints = yAxisPoints;
- opts.chartData.xAxisPoints = opts.chartData.xAxisData.xAxisPoints;
- opts.chartData.calPoints = calPoints;
- opts.chartData.eachSpacing = eachSpacing;
- drawYAxis(series, opts, config, context);
- if (opts.enableMarkLine !== false && process === 1) {
- drawMarkLine(opts, config, context);
- }
- drawLegend(opts.series, opts, config, context, opts.chartData);
- drawToolTipBridge(opts, config, context, process, eachSpacing, yAxisPoints);
- drawCanvas(opts, context);
- },
- onAnimationFinish: function onAnimationFinish() {
- _this.uevent.trigger('renderComplete');
- }
- });
- break;
- case 'area':
- this.animationInstance = new Animation({
- timing: opts.timing,
- duration: duration,
- onProcess: function onProcess(process) {
- context.clearRect(0, 0, opts.width, opts.height);
- if (opts.rotate) {
- contextRotate(context, opts);
- }
- drawYAxisGrid(categories, opts, config, context);
- drawXAxis(categories, opts, config, context);
- var _drawAreaDataPoints = drawAreaDataPoints(series, opts, config, context, process),
- xAxisPoints = _drawAreaDataPoints.xAxisPoints,
- calPoints = _drawAreaDataPoints.calPoints,
- eachSpacing = _drawAreaDataPoints.eachSpacing;
- opts.chartData.xAxisPoints = xAxisPoints;
- opts.chartData.calPoints = calPoints;
- opts.chartData.eachSpacing = eachSpacing;
- drawYAxis(series, opts, config, context);
- if (opts.enableMarkLine !== false && process === 1) {
- drawMarkLine(opts, config, context);
- }
- drawLegend(opts.series, opts, config, context, opts.chartData);
- drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
- drawCanvas(opts, context);
- },
- onAnimationFinish: function onAnimationFinish() {
- _this.uevent.trigger('renderComplete');
- }
- });
- break;
- case 'ring':
- this.animationInstance = new Animation({
- timing: opts.timing,
- duration: duration,
- onProcess: function onProcess(process) {
- context.clearRect(0, 0, opts.width, opts.height);
- if (opts.rotate) {
- contextRotate(context, opts);
- }
- opts.chartData.pieData = drawPieDataPoints(series, opts, config, context, process);
- drawLegend(opts.series, opts, config, context, opts.chartData);
- drawToolTipBridge(opts, config, context, process);
- drawCanvas(opts, context);
- },
- onAnimationFinish: function onAnimationFinish() {
- _this.uevent.trigger('renderComplete');
- }
- });
- break;
- case 'pie':
- this.animationInstance = new Animation({
- timing: opts.timing,
- duration: duration,
- onProcess: function onProcess(process) {
- context.clearRect(0, 0, opts.width, opts.height);
- if (opts.rotate) {
- contextRotate(context, opts);
- }
- opts.chartData.pieData = drawPieDataPoints(series, opts, config, context, process);
- drawLegend(opts.series, opts, config, context, opts.chartData);
- drawToolTipBridge(opts, config, context, process);
- drawCanvas(opts, context);
- },
- onAnimationFinish: function onAnimationFinish() {
- _this.uevent.trigger('renderComplete');
- }
- });
- break;
- case 'rose':
- this.animationInstance = new Animation({
- timing: opts.timing,
- duration: duration,
- onProcess: function onProcess(process) {
- context.clearRect(0, 0, opts.width, opts.height);
- if (opts.rotate) {
- contextRotate(context, opts);
- }
- opts.chartData.pieData = drawRoseDataPoints(series, opts, config, context, process);
- drawLegend(opts.series, opts, config, context, opts.chartData);
- drawToolTipBridge(opts, config, context, process);
- drawCanvas(opts, context);
- },
- onAnimationFinish: function onAnimationFinish() {
- _this.uevent.trigger('renderComplete');
- }
- });
- break;
- case 'radar':
- this.animationInstance = new Animation({
- timing: opts.timing,
- duration: duration,
- onProcess: function onProcess(process) {
- context.clearRect(0, 0, opts.width, opts.height);
- if (opts.rotate) {
- contextRotate(context, opts);
- }
- opts.chartData.radarData = drawRadarDataPoints(series, opts, config, context, process);
- drawLegend(opts.series, opts, config, context, opts.chartData);
- drawToolTipBridge(opts, config, context, process);
- drawCanvas(opts, context);
- },
- onAnimationFinish: function onAnimationFinish() {
- _this.uevent.trigger('renderComplete');
- }
- });
- break;
- case 'arcbar':
- this.animationInstance = new Animation({
- timing: opts.timing,
- duration: duration,
- onProcess: function onProcess(process) {
- context.clearRect(0, 0, opts.width, opts.height);
- if (opts.rotate) {
- contextRotate(context, opts);
- }
- opts.chartData.arcbarData = drawArcbarDataPoints(series, opts, config, context, process);
- drawCanvas(opts, context);
- },
- onAnimationFinish: function onAnimationFinish() {
- _this.uevent.trigger('renderComplete');
- }
- });
- break;
- case 'gauge':
- this.animationInstance = new Animation({
- timing: opts.timing,
- duration: duration,
- onProcess: function onProcess(process) {
- context.clearRect(0, 0, opts.width, opts.height);
- if (opts.rotate) {
- contextRotate(context, opts);
- }
- opts.chartData.gaugeData = drawGaugeDataPoints(categories, series, opts, config, context, process);
- drawCanvas(opts, context);
- },
- onAnimationFinish: function onAnimationFinish() {
- _this.uevent.trigger('renderComplete');
- }
- });
- break;
- case 'candle':
- this.animationInstance = new Animation({
- timing: opts.timing,
- duration: duration,
- onProcess: function onProcess(process) {
- context.clearRect(0, 0, opts.width, opts.height);
- if (opts.rotate) {
- contextRotate(context, opts);
- }
- drawYAxisGrid(categories, opts, config, context);
- drawXAxis(categories, opts, config, context);
- var _drawCandleDataPoints = drawCandleDataPoints(series, seriesMA, opts, config, context, process),
- xAxisPoints = _drawCandleDataPoints.xAxisPoints,
- calPoints = _drawCandleDataPoints.calPoints,
- eachSpacing = _drawCandleDataPoints.eachSpacing;
- opts.chartData.xAxisPoints = xAxisPoints;
- opts.chartData.calPoints = calPoints;
- opts.chartData.eachSpacing = eachSpacing;
- drawYAxis(series, opts, config, context);
- if (opts.enableMarkLine !== false && process === 1) {
- drawMarkLine(opts, config, context);
- }
- if (seriesMA) {
- drawLegend(seriesMA, opts, config, context, opts.chartData);
- } else {
- drawLegend(opts.series, opts, config, context, opts.chartData);
- }
- drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
- drawCanvas(opts, context);
- },
- onAnimationFinish: function onAnimationFinish() {
- _this.uevent.trigger('renderComplete');
- }
- });
- break;
- }
-}
-
-function uChartsEvent() {
- this.events = {};
-}
-
-uChartsEvent.prototype.addEventListener = function(type, listener) {
- this.events[type] = this.events[type] || [];
- this.events[type].push(listener);
-};
-
-uChartsEvent.prototype.delEventListener = function(type) {
- this.events[type] = [];
-};
-
-uChartsEvent.prototype.trigger = function() {
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
- var type = args[0];
- var params = args.slice(1);
- if (!!this.events[type]) {
- this.events[type].forEach(function(listener) {
- try {
- listener.apply(null, params);
- } catch (e) {
- //console.log('[uCharts] '+e);
- }
- });
- }
-};
-
-var uCharts = function uCharts(opts) {
- opts.pix = opts.pixelRatio ? opts.pixelRatio : 1;
- opts.fontSize = opts.fontSize ? opts.fontSize : 13;
- opts.fontColor = opts.fontColor ? opts.fontColor : config.fontColor;
- if (opts.background == "" || opts.background == "none") {
- opts.background = "#FFFFFF"
- }
- opts.title = assign({}, opts.title);
- opts.subtitle = assign({}, opts.subtitle);
- opts.duration = opts.duration ? opts.duration : 1000;
- opts.yAxis = assign({}, {
- data: [],
- showTitle: false,
- disabled: false,
- disableGrid: false,
- gridSet: 'number',
- splitNumber: 5,
- gridType: 'solid',
- dashLength: 4 * opts.pix,
- gridColor: '#cccccc',
- padding: 10,
- fontColor: '#666666'
- }, opts.yAxis);
- opts.xAxis = assign({}, {
- rotateLabel: false,
- rotateAngle:45,
- disabled: false,
- disableGrid: false,
- splitNumber: 5,
- calibration:false,
- fontColor: '#666666',
- fontSize: 13,
- lineHeight: 20,
- marginTop: 0,
- gridType: 'solid',
- dashLength: 4,
- scrollAlign: 'left',
- boundaryGap: 'center',
- axisLine: true,
- axisLineColor: '#cccccc',
- titleFontSize: 13,
- titleOffsetY: 0,
- titleOffsetX: 0,
- titleFontColor: '#666666'
- }, opts.xAxis);
- opts.xAxis.scrollPosition = opts.xAxis.scrollAlign;
- opts.legend = assign({}, {
- show: true,
- position: 'bottom',
- float: 'center',
- backgroundColor: 'rgba(0,0,0,0)',
- borderColor: 'rgba(0,0,0,0)',
- borderWidth: 0,
- padding: 5,
- margin: 5,
- itemGap: 10,
- fontSize: opts.fontSize,
- lineHeight: opts.fontSize,
- fontColor: opts.fontColor,
- formatter: {},
- hiddenColor: '#CECECE'
- }, opts.legend);
- opts.extra = assign({
- tooltip:{
- legendShape: 'auto'
- }
- }, opts.extra);
- opts.rotate = opts.rotate ? true : false;
- opts.animation = opts.animation ? true : false;
- opts.rotate = opts.rotate ? true : false;
- opts.canvas2d = opts.canvas2d ? true : false;
-
- let config$$1 = assign({}, config);
- config$$1.color = opts.color ? opts.color : config$$1.color;
- if (opts.type == 'pie') {
- config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.pie.labelWidth * opts.pix || config$$1.pieChartLinePadding * opts.pix;
- }
- if (opts.type == 'ring') {
- config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.ring.labelWidth * opts.pix || config$$1.pieChartLinePadding * opts.pix;
- }
- if (opts.type == 'rose') {
- config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.rose.labelWidth * opts.pix || config$$1.pieChartLinePadding * opts.pix;
- }
- config$$1.pieChartTextPadding = opts.dataLabel === false ? 0 : config$$1.pieChartTextPadding * opts.pix;
-
- //屏幕旋转
- config$$1.rotate = opts.rotate;
- if (opts.rotate) {
- let tempWidth = opts.width;
- let tempHeight = opts.height;
- opts.width = tempHeight;
- opts.height = tempWidth;
- }
-
- //适配高分屏
- opts.padding = opts.padding ? opts.padding : config$$1.padding;
- config$$1.yAxisWidth = config.yAxisWidth * opts.pix;
- config$$1.fontSize = opts.fontSize * opts.pix;
- config$$1.titleFontSize = config.titleFontSize * opts.pix;
- config$$1.subtitleFontSize = config.subtitleFontSize * opts.pix;
- if(!opts.context){
- throw new Error('[uCharts] 未获取到context!注意:v2.0版本后,需要自行获取canvas的绘图上下文并传入opts.context!');
- }
- this.context = opts.context;
- if (!this.context.setTextAlign) {
- this.context.setStrokeStyle = function(e) {
- return this.strokeStyle = e;
- }
- this.context.setLineWidth = function(e) {
- return this.lineWidth = e;
- }
- this.context.setLineCap = function(e) {
- return this.lineCap = e;
- }
- this.context.setFontSize = function(e) {
- return this.font = e + "px sans-serif";
- }
- this.context.setFillStyle = function(e) {
- return this.fillStyle = e;
- }
- this.context.setTextAlign = function(e) {
- return this.textAlign = e;
- }
- this.context.setTextBaseline = function(e) {
- return this.textBaseline = e;
- }
- this.context.setShadow = function(offsetX,offsetY,blur,color) {
- this.shadowColor = color;
- this.shadowOffsetX = offsetX;
- this.shadowOffsetY = offsetY;
- this.shadowBlur = blur;
- }
- this.context.draw = function() {}
- }
- //兼容NVUEsetLineDash
- if(!this.context.setLineDash){
- this.context.setLineDash = function(e) {}
- }
- opts.chartData = {};
- this.uevent = new uChartsEvent();
- this.scrollOption = {
- currentOffset: 0,
- startTouchX: 0,
- distance: 0,
- lastMoveTime: 0
- };
- this.opts = opts;
- this.config = config$$1;
- drawCharts.call(this, opts.type, opts, config$$1, this.context);
-};
-
-uCharts.prototype.updateData = function() {
- let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
- this.opts = assign({}, this.opts, data);
- this.opts.updateData = true;
- let scrollPosition = data.scrollPosition || 'current';
- switch (scrollPosition) {
- case 'current':
- this.opts._scrollDistance_ = this.scrollOption.currentOffset;
- break;
- case 'left':
- this.opts._scrollDistance_ = 0;
- this.scrollOption = {
- currentOffset: 0,
- startTouchX: 0,
- distance: 0,
- lastMoveTime: 0
- };
- break;
- case 'right':
- let _calYAxisData = calYAxisData(this.opts.series, this.opts, this.config, this.context), yAxisWidth = _calYAxisData.yAxisWidth;
- this.config.yAxisWidth = yAxisWidth;
- let offsetLeft = 0;
- let _getXAxisPoints0 = getXAxisPoints(this.opts.categories, this.opts, this.config), xAxisPoints = _getXAxisPoints0.xAxisPoints,
- startX = _getXAxisPoints0.startX,
- endX = _getXAxisPoints0.endX,
- eachSpacing = _getXAxisPoints0.eachSpacing;
- let totalWidth = eachSpacing * (xAxisPoints.length - 1);
- let screenWidth = endX - startX;
- offsetLeft = screenWidth - totalWidth;
- this.scrollOption = {
- currentOffset: offsetLeft,
- startTouchX: offsetLeft,
- distance: 0,
- lastMoveTime: 0
- };
- this.opts._scrollDistance_ = offsetLeft;
- break;
- }
- drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
-};
-
-uCharts.prototype.zoom = function() {
- var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.opts.xAxis.itemCount;
- if (this.opts.enableScroll !== true) {
- console.log('[uCharts] 请启用滚动条后使用')
- return;
- }
- //当前屏幕中间点
- let centerPoint = Math.round(Math.abs(this.scrollOption.currentOffset) / this.opts.chartData.eachSpacing) + Math.round(this.opts.xAxis.itemCount / 2);
- this.opts.animation = false;
- this.opts.xAxis.itemCount = val.itemCount;
- //重新计算x轴偏移距离
- let _calYAxisData = calYAxisData(this.opts.series, this.opts, this.config, this.context),
- yAxisWidth = _calYAxisData.yAxisWidth;
- this.config.yAxisWidth = yAxisWidth;
- let offsetLeft = 0;
- let _getXAxisPoints0 = getXAxisPoints(this.opts.categories, this.opts, this.config),
- xAxisPoints = _getXAxisPoints0.xAxisPoints,
- startX = _getXAxisPoints0.startX,
- endX = _getXAxisPoints0.endX,
- eachSpacing = _getXAxisPoints0.eachSpacing;
- let centerLeft = eachSpacing * centerPoint;
- let screenWidth = endX - startX;
- let MaxLeft = screenWidth - eachSpacing * (xAxisPoints.length - 1);
- offsetLeft = screenWidth / 2 - centerLeft;
- if (offsetLeft > 0) {
- offsetLeft = 0;
- }
- if (offsetLeft < MaxLeft) {
- offsetLeft = MaxLeft;
- }
- this.scrollOption = {
- currentOffset: offsetLeft,
- startTouchX: 0,
- distance: 0,
- lastMoveTime: 0
- };
- calValidDistance(this, offsetLeft, this.opts.chartData, this.config, this.opts);
- this.opts._scrollDistance_ = offsetLeft;
- drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
-};
-
-uCharts.prototype.dobuleZoom = function(e) {
- if (this.opts.enableScroll !== true) {
- console.log('[uCharts] 请启用滚动条后使用')
- return;
- }
- const tcs = e.changedTouches;
- if (tcs.length < 2) {
- return;
- }
- for (var i = 0; i < tcs.length; i++) {
- tcs[i].x = tcs[i].x ? tcs[i].x : tcs[i].clientX;
- tcs[i].y = tcs[i].y ? tcs[i].y : tcs[i].clientY;
- }
- const ntcs = [getTouches(tcs[0], this.opts, e),getTouches(tcs[1], this.opts, e)];
- const xlength = Math.abs(ntcs[0].x - ntcs[1].x);
- // 记录初始的两指之间的数据
- if(!this.scrollOption.moveCount){
- let cts0 = {changedTouches:[{x:tcs[0].x,y:this.opts.area[0] / this.opts.pix + 2}]};
- let cts1 = {changedTouches:[{x:tcs[1].x,y:this.opts.area[0] / this.opts.pix + 2}]};
- if(this.opts.rotate){
- cts0 = {changedTouches:[{x:this.opts.height / this.opts.pix - this.opts.area[0] / this.opts.pix - 2,y:tcs[0].y}]};
- cts1 = {changedTouches:[{x:this.opts.height / this.opts.pix - this.opts.area[0] / this.opts.pix - 2,y:tcs[1].y}]};
- }
- const moveCurrent1 = this.getCurrentDataIndex(cts0).index;
- const moveCurrent2 = this.getCurrentDataIndex(cts1).index;
- const moveCount = Math.abs(moveCurrent1 - moveCurrent2);
- this.scrollOption.moveCount = moveCount;
- this.scrollOption.moveCurrent1 = Math.min(moveCurrent1, moveCurrent2);
- this.scrollOption.moveCurrent2 = Math.max(moveCurrent1, moveCurrent2);
- return;
- }
-
- let currentEachSpacing = xlength / this.scrollOption.moveCount;
- let itemCount = (this.opts.width - this.opts.area[1] - this.opts.area[3]) / currentEachSpacing;
- itemCount = itemCount <= 2 ? 2 : itemCount;
- itemCount = itemCount >= this.opts.categories.length ? this.opts.categories.length : itemCount;
- this.opts.animation = false;
- this.opts.xAxis.itemCount = itemCount;
- // 重新计算滚动条偏移距离
- let offsetLeft = 0;
- let _getXAxisPoints0 = getXAxisPoints(this.opts.categories, this.opts, this.config),
- xAxisPoints = _getXAxisPoints0.xAxisPoints,
- startX = _getXAxisPoints0.startX,
- endX = _getXAxisPoints0.endX,
- eachSpacing = _getXAxisPoints0.eachSpacing;
- let currentLeft = eachSpacing * this.scrollOption.moveCurrent1;
- let screenWidth = endX - startX;
- let MaxLeft = screenWidth - eachSpacing * (xAxisPoints.length - 1);
- offsetLeft = -currentLeft+Math.min(ntcs[0].x,ntcs[1].x)-this.opts.area[3]-eachSpacing;
- if (offsetLeft > 0) {
- offsetLeft = 0;
- }
- if (offsetLeft < MaxLeft) {
- offsetLeft = MaxLeft;
- }
- this.scrollOption.currentOffset= offsetLeft;
- this.scrollOption.startTouchX= 0;
- this.scrollOption.distance=0;
- calValidDistance(this, offsetLeft, this.opts.chartData, this.config, this.opts);
- this.opts._scrollDistance_ = offsetLeft;
- drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
-}
-
-uCharts.prototype.stopAnimation = function() {
- this.animationInstance && this.animationInstance.stop();
-};
-
-uCharts.prototype.addEventListener = function(type, listener) {
- this.uevent.addEventListener(type, listener);
-};
-
-uCharts.prototype.delEventListener = function(type) {
- this.uevent.delEventListener(type);
-};
-
-uCharts.prototype.getCurrentDataIndex = function(e) {
- var touches = null;
- if (e.changedTouches) {
- touches = e.changedTouches[0];
- } else {
- touches = e.mp.changedTouches[0];
- }
- if (touches) {
- let _touches$ = getTouches(touches, this.opts, e);
- if (this.opts.type === 'pie' || this.opts.type === 'ring') {
- return findPieChartCurrentIndex({
- x: _touches$.x,
- y: _touches$.y
- }, this.opts.chartData.pieData, this.opts);
- } else if (this.opts.type === 'rose') {
- return findRoseChartCurrentIndex({
- x: _touches$.x,
- y: _touches$.y
- }, this.opts.chartData.pieData, this.opts);
- } else if (this.opts.type === 'radar') {
- return findRadarChartCurrentIndex({
- x: _touches$.x,
- y: _touches$.y
- }, this.opts.chartData.radarData, this.opts.categories.length);
- } else if (this.opts.type === 'funnel') {
- return findFunnelChartCurrentIndex({
- x: _touches$.x,
- y: _touches$.y
- }, this.opts.chartData.funnelData);
- } else if (this.opts.type === 'map') {
- return findMapChartCurrentIndex({
- x: _touches$.x,
- y: _touches$.y
- }, this.opts);
- } else if (this.opts.type === 'word') {
- return findWordChartCurrentIndex({
- x: _touches$.x,
- y: _touches$.y
- }, this.opts.chartData.wordCloudData);
- } else if (this.opts.type === 'bar') {
- return findBarChartCurrentIndex({
- x: _touches$.x,
- y: _touches$.y
- }, this.opts.chartData.calPoints, this.opts, this.config, Math.abs(this.scrollOption.currentOffset));
- } else {
- return findCurrentIndex({
- x: _touches$.x,
- y: _touches$.y
- }, this.opts.chartData.calPoints, this.opts, this.config, Math.abs(this.scrollOption.currentOffset));
- }
- }
- return -1;
-};
-
-uCharts.prototype.getLegendDataIndex = function(e) {
- var touches = null;
- if (e.changedTouches) {
- touches = e.changedTouches[0];
- } else {
- touches = e.mp.changedTouches[0];
- }
- if (touches) {
- let _touches$ = getTouches(touches, this.opts, e);
- return findLegendIndex({
- x: _touches$.x,
- y: _touches$.y
- }, this.opts.chartData.legendData);
- }
- return -1;
-};
-
-uCharts.prototype.touchLegend = function(e) {
- var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- var touches = null;
- if (e.changedTouches) {
- touches = e.changedTouches[0];
- } else {
- touches = e.mp.changedTouches[0];
- }
- if (touches) {
- var _touches$ = getTouches(touches, this.opts, e);
- var index = this.getLegendDataIndex(e);
- if (index >= 0) {
- if (this.opts.type == 'candle') {
- this.opts.seriesMA[index].show = !this.opts.seriesMA[index].show;
- } else {
- this.opts.series[index].show = !this.opts.series[index].show;
- }
- this.opts.animation = option.animation ? true : false;
- this.opts._scrollDistance_ = this.scrollOption.currentOffset;
- drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
- }
- }
-
-};
-
-uCharts.prototype.showToolTip = function(e) {
- var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- var touches = null;
- if (e.changedTouches) {
- touches = e.changedTouches[0];
- } else {
- touches = e.mp.changedTouches[0];
- }
- if (!touches) {
- console.log("[uCharts] 未获取到event坐标信息");
- }
- var _touches$ = getTouches(touches, this.opts, e);
- var currentOffset = this.scrollOption.currentOffset;
- var opts = assign({}, this.opts, {
- _scrollDistance_: currentOffset,
- animation: false
- });
- if (this.opts.type === 'line' || this.opts.type === 'area' || this.opts.type === 'column' || this.opts.type === 'scatter' || this.opts.type === 'bubble') {
- var current = this.getCurrentDataIndex(e);
- var index = option.index == undefined ? current.index : option.index;
- if (index > -1 || index.length>0) {
- var seriesData = getSeriesDataItem(this.opts.series, index, current.group);
- if (seriesData.length !== 0) {
- var _getToolTipData = getToolTipData(seriesData, this.opts, index, current.group, this.opts.categories, option),
- textList = _getToolTipData.textList,
- offset = _getToolTipData.offset;
- offset.y = _touches$.y;
- opts.tooltip = {
- textList: option.textList !== undefined ? option.textList : textList,
- offset: option.offset !== undefined ? option.offset : offset,
- option: option,
- index: index,
- group: current.group
- };
- }
- }
- drawCharts.call(this, opts.type, opts, this.config, this.context);
- }
- if (this.opts.type === 'mount') {
- var index = option.index == undefined ? this.getCurrentDataIndex(e).index : option.index;
- if (index > -1) {
- var opts = assign({}, this.opts, {animation: false});
- var seriesData = assign({}, opts._series_[index]);
- var textList = [{
- text: option.formatter ? option.formatter(seriesData, undefined, index, opts) : seriesData.name + ': ' + seriesData.data,
- color: seriesData.color,
- legendShape: this.opts.extra.tooltip.legendShape == 'auto' ? seriesData.legendShape : this.opts.extra.tooltip.legendShape
- }];
- var offset = {
- x: opts.chartData.calPoints[index].x,
- y: _touches$.y
- };
- opts.tooltip = {
- textList: option.textList ? option.textList : textList,
- offset: option.offset !== undefined ? option.offset : offset,
- option: option,
- index: index
- };
- }
-
- drawCharts.call(this, opts.type, opts, this.config, this.context);
- }
- if (this.opts.type === 'bar') {
- var current = this.getCurrentDataIndex(e);
- var index = option.index == undefined ? current.index : option.index;
- if (index > -1 || index.length>0) {
- var seriesData = getSeriesDataItem(this.opts.series, index, current.group);
- if (seriesData.length !== 0) {
- var _getToolTipData = getToolTipData(seriesData, this.opts, index, current.group, this.opts.categories, option),
- textList = _getToolTipData.textList,
- offset = _getToolTipData.offset;
- offset.x = _touches$.x;
- opts.tooltip = {
- textList: option.textList !== undefined ? option.textList : textList,
- offset: option.offset !== undefined ? option.offset : offset,
- option: option,
- index: index
- };
- }
- }
- drawCharts.call(this, opts.type, opts, this.config, this.context);
- }
- if (this.opts.type === 'mix') {
- var current = this.getCurrentDataIndex(e);
- var index = option.index == undefined ? current.index : option.index;
- if (index > -1) {
- var currentOffset = this.scrollOption.currentOffset;
- var opts = assign({}, this.opts, {
- _scrollDistance_: currentOffset,
- animation: false
- });
- var seriesData = getSeriesDataItem(this.opts.series, index);
- if (seriesData.length !== 0) {
- var _getMixToolTipData = getMixToolTipData(seriesData, this.opts, index, this.opts.categories, option),
- textList = _getMixToolTipData.textList,
- offset = _getMixToolTipData.offset;
- offset.y = _touches$.y;
- opts.tooltip = {
- textList: option.textList ? option.textList : textList,
- offset: option.offset !== undefined ? option.offset : offset,
- option: option,
- index: index
- };
- }
- }
- drawCharts.call(this, opts.type, opts, this.config, this.context);
- }
- if (this.opts.type === 'candle') {
- var current = this.getCurrentDataIndex(e);
- var index = option.index == undefined ? current.index : option.index;
- if (index > -1) {
- var currentOffset = this.scrollOption.currentOffset;
- var opts = assign({}, this.opts, {
- _scrollDistance_: currentOffset,
- animation: false
- });
- var seriesData = getSeriesDataItem(this.opts.series, index);
- if (seriesData.length !== 0) {
- var _getToolTipData = getCandleToolTipData(this.opts.series[0].data, seriesData, this.opts, index, this.opts.categories, this.opts.extra.candle, option),
- textList = _getToolTipData.textList,
- offset = _getToolTipData.offset;
- offset.y = _touches$.y;
- opts.tooltip = {
- textList: option.textList ? option.textList : textList,
- offset: option.offset !== undefined ? option.offset : offset,
- option: option,
- index: index
- };
- }
- }
- drawCharts.call(this, opts.type, opts, this.config, this.context);
- }
- if (this.opts.type === 'pie' || this.opts.type === 'ring' || this.opts.type === 'rose' || this.opts.type === 'funnel') {
- var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
- if (index > -1) {
- var opts = assign({}, this.opts, {animation: false});
- var seriesData = assign({}, opts._series_[index]);
- var textList = [{
- text: option.formatter ? option.formatter(seriesData, undefined, index, opts) : seriesData.name + ': ' + seriesData.data,
- color: seriesData.color,
- legendShape: this.opts.extra.tooltip.legendShape == 'auto' ? seriesData.legendShape : this.opts.extra.tooltip.legendShape
- }];
- var offset = {
- x: _touches$.x,
- y: _touches$.y
- };
- opts.tooltip = {
- textList: option.textList ? option.textList : textList,
- offset: option.offset !== undefined ? option.offset : offset,
- option: option,
- index: index
- };
- }
- drawCharts.call(this, opts.type, opts, this.config, this.context);
- }
- if (this.opts.type === 'map') {
- var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
- if (index > -1) {
- var opts = assign({}, this.opts, {animation: false});
- var seriesData = assign({}, this.opts.series[index]);
- seriesData.name = seriesData.properties.name
- var textList = [{
- text: option.formatter ? option.formatter(seriesData, undefined, index, this.opts) : seriesData.name,
- color: seriesData.color,
- legendShape: this.opts.extra.tooltip.legendShape == 'auto' ? seriesData.legendShape : this.opts.extra.tooltip.legendShape
- }];
- var offset = {
- x: _touches$.x,
- y: _touches$.y
- };
- opts.tooltip = {
- textList: option.textList ? option.textList : textList,
- offset: option.offset !== undefined ? option.offset : offset,
- option: option,
- index: index
- };
- }
- opts.updateData = false;
- drawCharts.call(this, opts.type, opts, this.config, this.context);
- }
- if (this.opts.type === 'word') {
- var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
- if (index > -1) {
- var opts = assign({}, this.opts, {animation: false});
- var seriesData = assign({}, this.opts.series[index]);
- var textList = [{
- text: option.formatter ? option.formatter(seriesData, undefined, index, this.opts) : seriesData.name,
- color: seriesData.color,
- legendShape: this.opts.extra.tooltip.legendShape == 'auto' ? seriesData.legendShape : this.opts.extra.tooltip.legendShape
- }];
- var offset = {
- x: _touches$.x,
- y: _touches$.y
- };
- opts.tooltip = {
- textList: option.textList ? option.textList : textList,
- offset: option.offset !== undefined ? option.offset : offset,
- option: option,
- index: index
- };
- }
- opts.updateData = false;
- drawCharts.call(this, opts.type, opts, this.config, this.context);
- }
- if (this.opts.type === 'radar') {
- var index = option.index == undefined ? this.getCurrentDataIndex(e) : option.index;
- if (index > -1) {
- var opts = assign({}, this.opts, {animation: false});
- var seriesData = getSeriesDataItem(this.opts.series, index);
- if (seriesData.length !== 0) {
- var textList = seriesData.map((item) => {
- return {
- text: option.formatter ? option.formatter(item, this.opts.categories[index], index, this.opts) : item.name + ': ' + item.data,
- color: item.color,
- legendShape: this.opts.extra.tooltip.legendShape == 'auto' ? item.legendShape : this.opts.extra.tooltip.legendShape
- };
- });
- var offset = {
- x: _touches$.x,
- y: _touches$.y
- };
- opts.tooltip = {
- textList: option.textList ? option.textList : textList,
- offset: option.offset !== undefined ? option.offset : offset,
- option: option,
- index: index
- };
- }
- }
- drawCharts.call(this, opts.type, opts, this.config, this.context);
- }
-};
-
-uCharts.prototype.translate = function(distance) {
- this.scrollOption = {
- currentOffset: distance,
- startTouchX: distance,
- distance: 0,
- lastMoveTime: 0
- };
- let opts = assign({}, this.opts, {
- _scrollDistance_: distance,
- animation: false
- });
- drawCharts.call(this, this.opts.type, opts, this.config, this.context);
-};
-
-uCharts.prototype.scrollStart = function(e) {
- var touches = null;
- if (e.changedTouches) {
- touches = e.changedTouches[0];
- } else {
- touches = e.mp.changedTouches[0];
- }
- var _touches$ = getTouches(touches, this.opts, e);
- if (touches && this.opts.enableScroll === true) {
- this.scrollOption.startTouchX = _touches$.x;
- }
-};
-
-uCharts.prototype.scroll = function(e) {
- if (this.scrollOption.lastMoveTime === 0) {
- this.scrollOption.lastMoveTime = Date.now();
- }
- let Limit = this.opts.touchMoveLimit || 60;
- let currMoveTime = Date.now();
- let duration = currMoveTime - this.scrollOption.lastMoveTime;
- if (duration < Math.floor(1000 / Limit)) return;
- if (this.scrollOption.startTouchX == 0) return;
- this.scrollOption.lastMoveTime = currMoveTime;
- var touches = null;
- if (e.changedTouches) {
- touches = e.changedTouches[0];
- } else {
- touches = e.mp.changedTouches[0];
- }
- if (touches && this.opts.enableScroll === true) {
- var _touches$ = getTouches(touches, this.opts, e);
- var _distance;
- _distance = _touches$.x - this.scrollOption.startTouchX;
- var currentOffset = this.scrollOption.currentOffset;
- var validDistance = calValidDistance(this, currentOffset + _distance, this.opts.chartData, this.config, this.opts);
- this.scrollOption.distance = _distance = validDistance - currentOffset;
- var opts = assign({}, this.opts, {
- _scrollDistance_: currentOffset + _distance,
- animation: false
- });
- this.opts = opts;
- drawCharts.call(this, opts.type, opts, this.config, this.context);
- return currentOffset + _distance;
- }
-};
-
-uCharts.prototype.scrollEnd = function(e) {
- if (this.opts.enableScroll === true) {
- var _scrollOption = this.scrollOption,
- currentOffset = _scrollOption.currentOffset,
- distance = _scrollOption.distance;
- this.scrollOption.currentOffset = currentOffset + distance;
- this.scrollOption.distance = 0;
- this.scrollOption.moveCount = 0;
- }
-};
-
-export default uCharts;
\ No newline at end of file
diff --git a/yanzhu-ui-app/uni_modules/qiun-data-charts/js_sdk/u-charts/u-charts.min.js b/yanzhu-ui-app/uni_modules/qiun-data-charts/js_sdk/u-charts/u-charts.min.js
deleted file mode 100644
index 0902ecd3..00000000
--- a/yanzhu-ui-app/uni_modules/qiun-data-charts/js_sdk/u-charts/u-charts.min.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * uCharts (R)
- * 高性能跨平台图表库,支持H5、APP、小程序(微信/支付宝/百度/头条/QQ/360/快手)、Vue、Taro等支持canvas的框架平台
- * Copyright (C) 2021 QIUN (R) 秋云 https://www.ucharts.cn All rights reserved.
- * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
- * 复制使用请保留本段注释,感谢支持开源!
- *
- * uCharts (R) 官方网站
- * https://www.uCharts.cn
- *
- * 开源地址:
- * https://gitee.com/uCharts/uCharts
- *
- * uni-app插件市场地址:
- * http://ext.dcloud.net.cn/plugin?id=271
- *
- */
-"use strict";var config={version:"v2.5.0-20230101",yAxisWidth:15,xAxisHeight:22,padding:[10,10,10,10],rotate:false,fontSize:13,fontColor:"#666666",dataPointShape:["circle","circle","circle","circle"],color:["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],linearColor:["#0EE2F8","#2BDCA8","#FA7D8D","#EB88E2","#2AE3A0","#0EE2F8","#EB88E2","#6773E3","#F78A85"],pieChartLinePadding:15,pieChartTextPadding:5,titleFontSize:20,subtitleFontSize:15,radarLabelTextMargin:13};var assign=function(e,...t){if(e==null){throw new TypeError("[uCharts] Cannot convert undefined or null to object")}if(!t||t.length<=0){return e}function i(e,a){for(let t in a){e[t]=e[t]&&e[t].toString()==="[object Object]"?i(e[t],a[t]):e[t]=a[t]}return e}t.forEach(t=>{e=i(e,t)});return e};var util={toFixed:function t(e,a){a=a||2;if(this.isFloat(e)){e=e.toFixed(a)}return e},isFloat:function t(e){return e%1!==0},approximatelyEqual:function t(e,a){return Math.abs(e-a)<1e-10},isSameSign:function t(e,a){return Math.abs(e)===e&&Math.abs(a)===a||Math.abs(e)!==e&&Math.abs(a)!==a},isSameXCoordinateArea:function t(e,a){return this.isSameSign(e.x,a.x)},isCollision:function t(e,a){e.end={};e.end.x=e.start.x+e.width;e.end.y=e.start.y-e.height;a.end={};a.end.x=a.start.x+a.width;a.end.y=a.start.y-a.height;var i=a.start.x>e.end.x||a.end.xe.start.y||a.start.y1){if(r.extra.mount.widthRatio>2)r.extra.mount.widthRatio=2;n+=(r.extra.mount.widthRatio-1)*a.eachSpacing}var l=e;if(e>=0){l=0;t.uevent.trigger("scrollLeft");t.scrollOption.position="left";r.xAxis.scrollPosition="left"}else if(Math.abs(e)>=n-o){l=o-n;t.uevent.trigger("scrollRight");t.scrollOption.position="right";r.xAxis.scrollPosition="right"}else{t.scrollOption.position=e;r.xAxis.scrollPosition=e}return l}function isInAngleRange(t,e,a){function i(t){while(t<0){t+=2*Math.PI}while(t>2*Math.PI){t-=2*Math.PI}return t}t=i(t);e=i(e);a=i(a);if(e>a){a+=2*Math.PI;if(t=e&&t<=a}function createCurveControlPoints(t,e){function a(t,e){if(t[e-1]&&t[e+1]){return t[e].y>=Math.max(t[e-1].y,t[e+1].y)||t[e].y<=Math.min(t[e-1].y,t[e+1].y)}else{return false}}function c(t,e){if(t[e-1]&&t[e+1]){return t[e].x>=Math.max(t[e-1].x,t[e+1].x)||t[e].x<=Math.min(t[e-1].x,t[e+1].x)}else{return false}}var i=.2;var r=.2;var o=null;var n=null;var l=null;var s=null;if(e<1){o=t[0].x+(t[1].x-t[0].x)*i;n=t[0].y+(t[1].y-t[0].y)*i}else{o=t[e].x+(t[e+1].x-t[e-1].x)*i;n=t[e].y+(t[e+1].y-t[e-1].y)*i}if(e>t.length-3){var h=t.length-1;l=t[h].x-(t[h].x-t[h-1].x)*r;s=t[h].y-(t[h].y-t[h-1].y)*r}else{l=t[e+1].x-(t[e+2].x-t[e].x)*r;s=t[e+1].y-(t[e+2].y-t[e].y)*r}if(a(t,e+1)){s=t[e+1].y}if(a(t,e)){n=t[e].y}if(c(t,e+1)){l=t[e+1].x}if(c(t,e)){o=t[e].x}if(n>=Math.max(t[e].y,t[e+1].y)||n<=Math.min(t[e].y,t[e+1].y)){n=t[e].y}if(s>=Math.max(t[e].y,t[e+1].y)||s<=Math.min(t[e].y,t[e+1].y)){s=t[e+1].y}if(o>=Math.max(t[e].x,t[e+1].x)||o<=Math.min(t[e].x,t[e+1].x)){o=t[e].x}if(l>=Math.max(t[e].x,t[e+1].x)||l<=Math.min(t[e].x,t[e+1].x)){l=t[e+1].x}return{ctrA:{x:o,y:n},ctrB:{x:l,y:s}}}function convertCoordinateOrigin(t,e,a){return{x:a.x+t,y:a.y-e}}function avoidCollision(t,e){if(e){while(util.isCollision(t,e)){if(t.start.x>0){t.start.y--}else if(t.start.x<0){t.start.y++}else{if(t.start.y>0){t.start.y++}else{t.start.y--}}}}return t}function fixPieSeries(e,a,t){let i=[];if(e.length>0&&e[0].data.constructor.toString().indexOf("Array")>-1){a._pieSeries_=e;let t=e[0].data;for(var r=0;r=1e4){a=1e3}else if(i>=1e3){a=100}else if(i>=100){a=10}else if(i>=10){a=5}else if(i>=1){a=1}else if(i>=.1){a=.1}else if(i>=.01){a=.01}else if(i>=.001){a=.001}else if(i>=1e-4){a=1e-4}else if(i>=1e-5){a=1e-5}else{a=1e-6}return{minRange:findRange(t,"lower",a),maxRange:findRange(e,"upper",a)}}function measureText(a,t,e){var i=0;a=String(a);e=false;if(e!==false&&e!==undefined&&e.setFontSize&&e.measureText){e.setFontSize(t);return e.measureText(a).width}else{var a=a.split("");for(let e=0;e-1;if(n){let t=filterSeries(e);for(var l=0;l5&&arguments[5]!==undefined?arguments[5]:{};var l=a.chartData.calPoints?a.chartData.calPoints:[];let s={};if(r.length>0){let e=[];for(let t=0;t0){e=o[i]}return{text:n.formatter?n.formatter(t,e,i,a):t.name+": "+t.data,color:t.color,legendShape:a.extra.tooltip.legendShape=="auto"?t.legendShape:a.extra.tooltip.legendShape}});var h={x:Math.round(s.x),y:Math.round(s.y)};return{textList:e,offset:h}}function getMixToolTipData(t,e,a,i){var r=arguments.length>4&&arguments[4]!==undefined?arguments[4]:{};var o=e.chartData.xAxisPoints[a]+e.chartData.eachSpacing/2;var n=t.map(function(t){return{text:r.formatter?r.formatter(t,i[a],a,e):t.name+": "+t.data,color:t.color,disableLegend:t.disableLegend?true:false,legendShape:e.extra.tooltip.legendShape=="auto"?t.legendShape:e.extra.tooltip.legendShape}});n=n.filter(function(t){if(t.disableLegend!==true){return t}});var l={x:Math.round(o),y:0};return{textList:n,offset:l}}function getCandleToolTipData(o,e,n,l,i,t){var r=arguments.length>6&&arguments[6]!==undefined?arguments[6]:{};var a=n.chartData.calPoints;let s=t.color.upFill;let h=t.color.downFill;let c=[s,s,h,s];var d=[];e.map(function(t){if(l==0){if(t.data[1]-t.data[0]<0){c[1]=h}else{c[1]=s}}else{if(t.data[0]o[l-1][1]){c[2]=s}if(t.data[3]4&&arguments[4]!==undefined?arguments[4]:0;var l={index:-1,group:[]};var i=e.chartData.eachSpacing/2;let r=[];if(n&&n.length>0){if(!e.categories){i=0}else{for(let t=1;tt){l.index=e}})}}}return l}function findBarChartCurrentIndex(a,t,e,i){var r=arguments.length>4&&arguments[4]!==undefined?arguments[4]:0;var o={index:-1,group:[]};var n=e.chartData.eachSpacing/2;let l=e.chartData.yAxisPoints;if(t&&t.length>0){if(isInExactChartArea(a,e,i)){l.forEach(function(t,e){if(a.y+r+n>t){o.index=e}})}}return o}function findLegendIndex(o,t,e){let n=-1;let l=0;if(isInExactLegendArea(o,t.area)){let i=t.points;let r=-1;for(let t=0,e=i.length;tt[0]-l&&o.xt[1]-l&&o.ye.start.x&&t.xe.start.y&&t.y=e.area[3]-10&&t.y>=e.area[0]&&t.y<=e.height-e.area[2]}function findRadarChartCurrentIndex(t,e,a){var r=2*Math.PI/a;var o=-1;if(isInExactPieChartArea(t,e.center,e.radius)){var n=function t(e){if(e<0){e+=2*Math.PI}if(e>2*Math.PI){e-=2*Math.PI}return e};var l=Math.atan2(e.center.y-t.y,t.x-e.center.x);l=-1*l;if(l<0){l+=2*Math.PI}var i=e.angleList.map(function(t){t=n(-1*t);return t});i.forEach(function(t,e){var a=n(t-r/2);var i=n(t+r/2);if(i=a&&l<=i||l+2*Math.PI>=a&&l+2*Math.PI<=i){o=e}})}return o}function findFunnelChartCurrentIndex(t,e){var a=-1;for(var i=0,r=e.series.length;io.funnelArea[0]&&t.xo.funnelArea[1]&&t.yo.area[0]&&t.xo.area[1]&&t.ys.width-s.area[1]-s.area[3]){i.push(n);o.push(r-s.legend.itemGap*s.pix);r=e;n=[t]}else{r+=e;n.push(t)}}if(n.length){i.push(n);o.push(r-s.legend.itemGap*s.pix);c.widthArr=o;let t=Math.max.apply(null,o);switch(s.legend.float){case"left":c.area.start.x=s.area[3];c.area.end.x=s.area[3]+t+2*d;break;case"right":c.area.start.x=s.width-s.area[1]-t-2*d;c.area.end.x=s.width-s.area[1];break;default:c.area.start.x=(s.width-t)/2-d;c.area.end.x=(s.width+t)/2+d}c.area.width=t+2*d;c.area.wholeWidth=t+2*d;c.area.height=i.length*u+2*d;c.area.wholeHeight=i.length*u+2*d+2*x;c.points=i}}else{let t=l.length;let e=s.height-s.area[0]-s.area[2]-2*x-2*d;let a=Math.min(Math.floor(e/u),t);c.area.height=a*u+d*2;c.area.wholeHeight=a*u+d*2;switch(s.legend.float){case"top":c.area.start.y=s.area[0]+x;c.area.end.y=s.area[0]+x+c.area.height;break;case"bottom":c.area.start.y=s.height-s.area[2]-x-c.area.height;c.area.end.y=s.height-s.area[2]-x;break;default:c.area.start.y=(s.height-c.area.height)/2;c.area.end.y=(s.height+c.area.height)/2}let i=t%a===0?t/a:Math.floor(t/a+1);let r=[];for(let e=0;ei){i=t}}c.widthArr.push(i);c.heightArr.push(a.length*u+d*2)}let e=0;for(let t=0;t4&&arguments[4]!==undefined?arguments[4]:-1;var i;if(c=="stack"){i=dataCombineStack(t,e.categories.length)}else{i=dataCombine(t)}var r=[];i=i.filter(function(t){if(typeof t==="object"&&t!==null){if(t.constructor.toString().indexOf("Array")>-1){return t!==null}else{return t.value!==null}}else{return t!==null}});i.map(function(t){if(typeof t==="object"){if(t.constructor.toString().indexOf("Array")>-1){if(e.type=="candle"){t.map(function(t){r.push(t)})}else{r.push(t[0])}}else{r.push(t.value)}}else{r.push(t)}});var o=0;var n=0;if(r.length>0){o=Math.min.apply(this,r);n=Math.max.apply(this,r)}if(a>-1){if(typeof e.xAxis.data[a].min==="number"){o=Math.min(e.xAxis.data[a].min,o)}if(typeof e.xAxis.data[a].max==="number"){n=Math.max(e.xAxis.data[a].max,n)}}else{if(typeof e.xAxis.min==="number"){o=Math.min(e.xAxis.min,o)}if(typeof e.xAxis.max==="number"){n=Math.max(e.xAxis.max,n)}}if(o===n){var d=n||10;n+=d}var l=o;var x=n;var f=[];var p=(x-l)/e.xAxis.splitNumber;for(var s=0;s<=e.xAxis.splitNumber;s++){f.push(l+p*s)}return f}function calXAxisData(t,e,a,i){var r=assign({},{type:""},e.extra.bar);var o={angle:0,xAxisHeight:e.xAxis.lineHeight*e.pix+e.xAxis.marginTop*e.pix};o.ranges=getXAxisTextList(t,e,a,r.type);o.rangesFormat=o.ranges.map(function(t){t=util.toFixed(t,2);return t});var n=o.ranges.map(function(t){t=util.toFixed(t,2);return t});o=Object.assign(o,getXAxisPoints(n,e,a));var l=o.eachSpacing;var s=n.map(function(t){return measureText(t,e.xAxis.fontSize*e.pix,i)});if(e.xAxis.disabled===true){o.xAxisHeight=0}return o}function getRadarDataPoints(r,o,n,a,t){var l=arguments.length>5&&arguments[5]!==undefined?arguments[5]:1;var e=t.extra.radar||{};e.max=e.max||0;var s=Math.max(e.max,Math.max.apply(null,dataCombine(a)));var h=[];for(let e=0;e2&&arguments[2]!==undefined?arguments[2]:1;var o=0;var n=0;for(let e=0;e4&&arguments[4]!==undefined?arguments[4]:1;for(let t=0;t4&&arguments[4]!==undefined?arguments[4]:1;var l=0;var s=0;var h=[];for(let e=0;e2&&arguments[2]!==undefined?arguments[2]:1;if(o==1){o=.999999}for(let a=0;a=2){t._proportion_=t._proportion_%2}}return i}function getGaugeArcbarDataPoints(i,r){var o=arguments.length>2&&arguments[2]!==undefined?arguments[2]:1;if(o==1){o=.999999}for(let a=0;a=2){t._proportion_=t._proportion_%2}}return i}function getGaugeAxisPoints(e,a,t){let i;if(t=2){e[t]._endAngle_=e[t]._endAngle_%2}r=e[t]._endAngle_}return e}function getGaugeDataPoints(i,r,o){let n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:1;for(let a=0;a=o.oldData){e._proportion_=(e._endAngle_-e._oldAngle_)*n+o.oldAngle}else{e._proportion_=e._oldAngle_-(e._oldAngle_-e._endAngle_)*n}if(e._proportion_>=2){e._proportion_=e._proportion_%2}}return i}function getPieTextMaxLength(i,r,o,n){i=getPieDataPoints(i);let l=0;for(let a=0;a0){t.width=Math.min(t.width,+n.extra.mix.column.width*n.pix)}if(n.extra.column&&n.extra.column.width&&+n.extra.column.width>0){t.width=Math.min(t.width,+n.extra.column.width*n.pix)}if(t.width<=0){t.width=1}t.x+=(o+.5-r/2)*(t.width+e);return t})}function fixBarData(t,i,r,o,e,n){return t.map(function(t){if(t===null){return null}var e=0;var a=0;e=n.extra.bar.seriesGap*n.pix||0;a=n.extra.bar.categoryGap*n.pix||0;e=Math.min(e,i/r);a=Math.min(a,i/r);t.width=Math.ceil((i-2*a-e*(r-1))/r);if(n.extra.bar&&n.extra.bar.width&&+n.extra.bar.width>0){t.width=Math.min(t.width,+n.extra.bar.width*n.pix)}if(t.width<=0){t.width=1}t.y+=(o+.5-r/2)*(t.width+e);return t})}function fixColumeMeterData(t,e,a,i,r,o,n){var l=o.extra.column.categoryGap*o.pix||0;return t.map(function(t){if(t===null){return null}t.width=e-2*l;if(o.extra.column&&o.extra.column.width&&+o.extra.column.width>0){t.width=Math.min(t.width,+o.extra.column.width*o.pix)}if(i>0){t.width-=n}return t})}function fixColumeStackData(t,a,e,i,r,o,n){var l=o.extra.column.categoryGap*o.pix||0;return t.map(function(t,e){if(t===null){return null}t.width=Math.ceil(a-2*l);if(o.extra.column&&o.extra.column.width&&+o.extra.column.width>0){t.width=Math.min(t.width,+o.extra.column.width*o.pix)}if(t.width<=0){t.width=1}return t})}function fixBarStackData(t,a,e,i,r,o,n){var l=o.extra.bar.categoryGap*o.pix||0;return t.map(function(t,e){if(t===null){return null}t.width=Math.ceil(a-2*l);if(o.extra.bar&&o.extra.bar.width&&+o.extra.bar.width>0){t.width=Math.min(t.width,+o.extra.bar.width*o.pix)}if(t.width<=0){t.width=1}return t})}function getXAxisPoints(t,e,h){var a=e.width-e.area[1]-e.area[3];var i=e.enableScroll?Math.min(e.xAxis.itemCount,t.length):t.length;if((e.type=="line"||e.type=="area"||e.type=="scatter"||e.type=="bubble"||e.type=="bar")&&i>1&&e.xAxis.boundaryGap=="justify"){i-=1}var r=0;if(e.type=="mount"&&e.extra&&e.extra.mount&&e.extra.mount.widthRatio&&e.extra.mount.widthRatio>1){if(e.extra.mount.widthRatio>2)e.extra.mount.widthRatio=2;r=e.extra.mount.widthRatio-1;i+=r}var o=a/i;var n=[];var l=e.area[3];var s=e.width-e.area[1];t.forEach(function(t,e){n.push(l+r/2*o+e*o)});if(e.xAxis.boundaryGap!=="justify"){if(e.enableScroll===true){n.push(l+r*o+t.length*o)}else{n.push(s)}}return{xAxisPoints:n,startX:l,endX:s,eachSpacing:o}}function getCandleDataPoints(t,l,s,h,c,d,a){var x=arguments.length>7&&arguments[7]!==undefined?arguments[7]:1;var e=[];var f=d.height-d.area[0]-d.area[2];t.forEach(function(t,o){if(t===null){e.push(null)}else{var n=[];t.forEach(function(t,e){var a={};a.x=h[o]+Math.round(c/2);var i=t.value||t;var r=f*(i-l)/(s-l);r*=x;a.y=d.height-Math.round(r)-d.area[2];n.push(a)});e.push(n)}});return e}function getDataPoints(t,a,n,l,s,h,e){var c=arguments.length>7&&arguments[7]!==undefined?arguments[7]:1;var d="center";if(h.type=="line"||h.type=="area"||h.type=="scatter"||h.type=="bubble"){d=h.xAxis.boundaryGap}var x=[];var f=h.height-h.area[0]-h.area[2];var p=h.width-h.area[1]-h.area[3];t.forEach(function(i,t){if(i===null){x.push(null)}else{var r={};r.color=i.color;r.x=l[t];var o=i;if(typeof i==="object"&&i!==null){if(i.constructor.toString().indexOf("Array")>-1){let t,e,a;t=[].concat(h.chartData.xAxisData.ranges);e=t.shift();a=t.pop();o=i[1];r.x=h.area[3]+p*(i[0]-e)/(a-e);if(h.type=="bubble"){r.r=i[2];r.t=i[3]}}else{o=i.value}}if(d=="center"){r.x+=s/2}var e=f*(o-a)/(n-a);e*=c;r.y=h.height-e-h.area[2];x.push(r)}});return x}function getLineDataPoints(t,a,n,l,s,h,e,p,c){var c=arguments.length>8&&arguments[8]!==undefined?arguments[8]:1;var d=h.xAxis.boundaryGap;var x=[];var f=h.height-h.area[0]-h.area[2];var u=h.width-h.area[1]-h.area[3];t.forEach(function(i,t){if(i===null){x.push(null)}else{var r={};r.color=i.color;if(p.animation=="vertical"){r.x=l[t];var o=i;if(typeof i==="object"&&i!==null){if(i.constructor.toString().indexOf("Array")>-1){let t,e,a;t=[].concat(h.chartData.xAxisData.ranges);e=t.shift();a=t.pop();o=i[1];r.x=h.area[3]+u*(i[0]-e)/(a-e)}else{o=i.value}}if(d=="center"){r.x+=s/2}var e=f*(o-a)/(n-a);e*=c;r.y=h.height-e-h.area[2];x.push(r)}else{r.x=l[0]+s*t*c;var o=i;if(d=="center"){r.x+=s/2}var e=f*(o-a)/(n-a);r.y=h.height-e-h.area[2];x.push(r)}}});return x}function getColumnDataPoints(t,a,n,l,s,h,e,i,c){var c=arguments.length>8&&arguments[8]!==undefined?arguments[8]:1;var d=[];var x=h.height-h.area[0]-h.area[2];var f=h.width-h.area[1]-h.area[3];t.forEach(function(i,t){if(i===null){d.push(null)}else{var r={};r.color=i.color;r.x=l[t];var o=i;if(typeof i==="object"&&i!==null){if(i.constructor.toString().indexOf("Array")>-1){let t,e,a;t=[].concat(h.chartData.xAxisData.ranges);e=t.shift();a=t.pop();o=i[1];r.x=h.area[3]+f*(i[0]-e)/(a-e)}else{o=i.value}}r.x+=s/2;var e=x*(o*c-a)/(n-a);r.y=h.height-e-h.area[2];d.push(r)}});return d}function getMountDataPoints(t,o,n,l,s,h,e,a){var c=arguments.length>8&&arguments[8]!==undefined?arguments[8]:1;var d=[];var x=h.height-h.area[0]-h.area[2];var i=h.width-h.area[1]-h.area[3];var f=s*e.widthRatio;t.forEach(function(t,e){if(t===null){d.push(null)}else{var a={};a.color=t.color;a.x=l[e];a.x+=s/2;var i=t.data;var r=x*(i*c-o)/(n-o);a.y=h.height-r-h.area[2];a.value=i;a.width=f;d.push(a)}});return d}function getBarDataPoints(t,o,n,l,e,s,a){var h=arguments.length>7&&arguments[7]!==undefined?arguments[7]:1;var c=[];var i=s.height-s.area[0]-s.area[2];var d=s.width-s.area[1]-s.area[3];t.forEach(function(t,e){if(t===null){c.push(null)}else{var a={};a.color=t.color;a.y=l[e];var i=t;if(typeof t==="object"&&t!==null){i=t.value}var r=d*(i-o)/(n-o);r*=h;a.height=r;a.value=i;a.x=r+s.area[3];c.push(a)}});return c}function getStackDataPoints(t,s,h,c,g,d,e,x,y){var f=arguments.length>9&&arguments[9]!==undefined?arguments[9]:1;var p=[];var u=d.height-d.area[0]-d.area[2];t.forEach(function(t,e){if(t===null){p.push(null)}else{var a={};a.color=t.color;a.x=c[e]+Math.round(g/2);if(x>0){var i=0;for(let t=0;t<=x;t++){i+=y[t].data[e]}var r=i-t;var o=u*(i-s)/(h-s);var n=u*(r-s)/(h-s)}else{var i=t;if(typeof t==="object"&&t!==null){i=t.value}var o=u*(i-s)/(h-s);var n=0}var l=n;o*=f;l*=f;a.y=d.height-Math.round(o)-d.area[2];a.y0=d.height-Math.round(l)-d.area[2];p.push(a)}});return p}function getBarStackDataPoints(t,s,h,c,e,d,a,x,g){var f=arguments.length>9&&arguments[9]!==undefined?arguments[9]:1;var p=[];var u=d.width-d.area[1]-d.area[3];t.forEach(function(t,e){if(t===null){p.push(null)}else{var a={};a.color=t.color;a.y=c[e];if(x>0){var i=0;for(let t=0;t<=x;t++){i+=g[t].data[e]}var r=i-t;var o=u*(i-s)/(h-s);var n=u*(r-s)/(h-s)}else{var i=t;if(typeof t==="object"&&t!==null){i=t.value}var o=u*(i-s)/(h-s);var n=0}var l=n;o*=f;l*=f;a.height=o-l;a.x=d.area[3]+o;a.x0=d.area[3]+l;p.push(a)}});return p}function getYAxisTextList(t,e,h,c,a){var d=arguments.length>5&&arguments[5]!==undefined?arguments[5]:-1;var i;if(c=="stack"){i=dataCombineStack(t,e.categories.length)}else{i=dataCombine(t)}var r=[];i=i.filter(function(t){if(typeof t==="object"&&t!==null){if(t.constructor.toString().indexOf("Array")>-1){return t!==null}else{return t.value!==null}}else{return t!==null}});i.map(function(t){if(typeof t==="object"){if(t.constructor.toString().indexOf("Array")>-1){if(e.type=="candle"){t.map(function(t){r.push(t)})}else{r.push(t[1])}}else{r.push(t.value)}}else{r.push(t)}});var o=a.min||0;var n=a.max||0;if(r.length>0){o=Math.min.apply(this,r);n=Math.max.apply(this,r)}if(o===n){if(n==0){n=10}else{o=0}}var l=getDataRange(o,n);var x=a.min===undefined||a.min===null?l.minRange:a.min;var f=a.max===undefined||a.max===null?l.maxRange:a.max;var p=(f-x)/e.yAxis.splitNumber;var u=[];for(var s=0;s<=e.yAxis.splitNumber;s++){u.push(x+p*s)}return u.reverse()}function calYAxisData(a,o,e,n){var l=assign({},{type:""},o.extra.column);var t=o.yAxis.data.length;var s=new Array(t);if(t>0){for(let e=0;e{return t+(i.unit||"")}}i.categories=i.categories||o.categories;h[r]=i.categories}else{if(!i.formatter){i.formatter=(t,e,a)=>{return util.toFixed(t,i.tofix||0)+(i.unit||"")}}h[r]=getYAxisTextList(s[r],o,e,l.type,i,r)}let a=i.fontSize*o.pix||e.fontSize;d[r]={position:i.position?i.position:"left",width:0};c[r]=h[r].map(function(t,e){t=i.formatter(t,e,o);d[r].width=Math.max(d[r].width,measureText(t,a,n)+5);return t});let t=i.calibration?4*o.pix:0;d[r].width+=t+3*o.pix;if(i.disabled===true){d[r].width=0}}}else{var h=new Array(1);var c=new Array(1);var d=new Array(1);if(o.type==="bar"){h[0]=o.categories;if(!o.yAxis.formatter){o.yAxis.formatter=(t,e,a)=>{return t+(a.yAxis.unit||"")}}}else{if(!o.yAxis.formatter){o.yAxis.formatter=(t,e,a)=>{return t.toFixed(a.yAxis.tofix)+(a.yAxis.unit||"")}}h[0]=getYAxisTextList(a,o,e,l.type,{})}d[0]={position:"left",width:0};var i=o.yAxis.fontSize*o.pix||e.fontSize;c[0]=h[0].map(function(t,e){t=o.yAxis.formatter(t,e,o);d[0].width=Math.max(d[0].width,measureText(t,i,n)+5);return t});d[0].width+=3*o.pix;if(o.yAxis.disabled===true){d[0]={position:"left",width:0};o.yAxis.data[0]={disabled:true}}else{o.yAxis.data[0]={disabled:false,position:"left",max:o.yAxis.max,min:o.yAxis.min,formatter:o.yAxis.formatter};if(o.type==="bar"){o.yAxis.data[0].categories=o.categories;o.yAxis.data[0].type="categories"}}}return{rangesFormat:c,ranges:h,yAxisWidth:d}}function calTooltipYAxisData(r,t,o,e,a){let n=[].concat(o.chartData.yAxisData.ranges);let l=o.height-o.area[0]-o.area[2];let s=o.area[0];let h=[];for(let i=0;i0&&r.tooltip.group.includes(n)==false){return}var l=typeof r.tooltip.index==="number"?r.tooltip.index:r.tooltip.index[r.tooltip.group.indexOf(n)];i.beginPath();if(o.activeType=="hollow"){i.setStrokeStyle(e);i.setFillStyle(r.background);i.setLineWidth(2*r.pix)}else{i.setStrokeStyle("#ffffff");i.setFillStyle(e);i.setLineWidth(1*r.pix)}if(a==="diamond"){t.forEach(function(t,e){if(t!==null&&l==e){i.moveTo(t.x,t.y-4.5);i.lineTo(t.x-4.5,t.y);i.lineTo(t.x,t.y+4.5);i.lineTo(t.x+4.5,t.y);i.lineTo(t.x,t.y-4.5)}})}else if(a==="circle"){t.forEach(function(t,e){if(t!==null&&l==e){i.moveTo(t.x+2.5*r.pix,t.y);i.arc(t.x,t.y,3*r.pix,0,2*Math.PI,false)}})}else if(a==="square"){t.forEach(function(t,e){if(t!==null&&l==e){i.moveTo(t.x-3.5,t.y-3.5);i.rect(t.x-3.5,t.y-3.5,7,7)}})}else if(a==="triangle"){t.forEach(function(t,e){if(t!==null&&l==e){i.moveTo(t.x,t.y-4.5);i.lineTo(t.x-4.5,t.y+4.5);i.lineTo(t.x+4.5,t.y+4.5);i.lineTo(t.x,t.y-4.5)}})}else if(a==="none"){return}i.closePath();i.fill();i.stroke()}function drawRingTitle(t,e,a,i){var r=t.title.fontSize||e.titleFontSize;var o=t.subtitle.fontSize||e.subtitleFontSize;var n=t.title.name||"";var l=t.subtitle.name||"";var c=t.title.color||t.fontColor;var d=t.subtitle.color||t.fontColor;var x=n?r:0;var f=l?o:0;var s=5;if(l){var p=measureText(l,o*t.pix,a);var u=i.x-p/2+(t.subtitle.offsetX||0)*t.pix;var h=i.y+o*t.pix/2+(t.subtitle.offsetY||0)*t.pix;if(n){h+=(x*t.pix+s)/2}a.beginPath();a.setFontSize(o*t.pix);a.setFillStyle(d);a.fillText(l,u,h);a.closePath();a.stroke()}if(n){var g=measureText(n,r*t.pix,a);var y=i.x-g/2+(t.title.offsetX||0);var v=i.y+r*t.pix/2+(t.title.offsetY||0)*t.pix;if(l){v-=(f*t.pix+s)/2}a.beginPath();a.setFontSize(r*t.pix);a.setFillStyle(c);a.fillText(n,y,v);a.closePath();a.stroke()}}function drawPointText(t,o,n,l,s){var h=o.data;var c=o.textOffset?o.textOffset:0;t.forEach(function(t,e){if(t!==null){l.beginPath();var a=o.textSize?o.textSize*s.pix:n.fontSize;l.setFontSize(a);l.setFillStyle(o.textColor||s.fontColor);var i=h[e];if(typeof h[e]==="object"&&h[e]!==null){if(h[e].constructor.toString().indexOf("Array")>-1){i=h[e][1]}else{i=h[e].value}}var r=o.formatter?o.formatter(i,e,o,s):i;l.setTextAlign("center");l.fillText(String(r),t.x,t.y-4+c*s.pix);l.closePath();l.stroke();l.setTextAlign("left")}})}function drawColumePointText(t,n,l,s,h){var c=n.data;var d=n.textOffset?n.textOffset:0;var x=h.extra.column.labelPosition;t.forEach(function(t,e){if(t!==null){s.beginPath();var a=n.textSize?n.textSize*h.pix:l.fontSize;s.setFontSize(a);s.setFillStyle(n.textColor||h.fontColor);var i=c[e];if(typeof c[e]==="object"&&c[e]!==null){if(c[e].constructor.toString().indexOf("Array")>-1){i=c[e][1]}else{i=c[e].value}}var r=n.formatter?n.formatter(i,e,n,h):i;s.setTextAlign("center");var o=t.y-4*h.pix+d*h.pix;if(t.y>n.zeroPoints){o=t.y+d*h.pix+a}if(x=="insideTop"){o=t.y+a+d*h.pix;if(t.y>n.zeroPoints){o=t.y-d*h.pix-4*h.pix}}if(x=="center"){o=t.y+d*h.pix+(h.height-h.area[2]-t.y+a)/2;if(n.zeroPointsn.zeroPoints){o=t.y-d*h.pix-(t.y-n.zeroPoints-a)/2}if(h.extra.column.type=="stack"){o=t.y+d*h.pix+(t.y0-t.y+a)/2}}if(x=="bottom"){o=h.height-h.area[2]+d*h.pix-4*h.pix;if(n.zeroPointsn.zeroPoints){o=n.zeroPoints-d*h.pix+a+2*h.pix}if(h.extra.column.type=="stack"){o=t.y0+d*h.pix-4*h.pix}}s.fillText(String(r),t.x,o);s.closePath();s.stroke();s.setTextAlign("left")}})}function drawMountPointText(t,n,l,s,h,c){var e=n.data;var d=n.textOffset?n.textOffset:0;var a=h.extra.mount.labelPosition;t.forEach(function(t,e){if(t!==null){s.beginPath();var a=n[e].textSize?n[e].textSize*h.pix:l.fontSize;s.setFontSize(a);s.setFillStyle(n[e].textColor||h.fontColor);var i=t.value;var r=n[e].formatter?n[e].formatter(i,e,n,h):i;s.setTextAlign("center");var o=t.y-4*h.pix+d*h.pix;if(t.y>c){o=t.y+d*h.pix+a}s.fillText(String(r),t.x,o);s.closePath();s.stroke();s.setTextAlign("left")}})}function drawBarPointText(t,o,n,l,s){var h=o.data;var e=o.textOffset?o.textOffset:0;t.forEach(function(t,e){if(t!==null){l.beginPath();var a=o.textSize?o.textSize*s.pix:n.fontSize;l.setFontSize(a);l.setFillStyle(o.textColor||s.fontColor);var i=h[e];if(typeof h[e]==="object"&&h[e]!==null){i=h[e].value}var r=o.formatter?o.formatter(i,e,o,s):i;l.setTextAlign("left");l.fillText(String(r),t.x+4*s.pix,t.y+a/2-3);l.closePath();l.stroke()}})}function drawGaugeLabel(e,a,i,r,o,n){a-=e.width/2+e.labelOffset*r.pix;a=a<10?10:a;let t;if(e.endAngle=2){l=l%2}s+=x}}function drawRadarLabel(t,s,h,c,d,x){var f=c.extra.radar||{};t.forEach(function(t,e){if(f.labelPointShow===true&&c.categories[e]!==""){var a={x:s*Math.cos(t),y:s*Math.sin(t)};var i=convertCoordinateOrigin(a.x,a.y,h);x.setFillStyle(f.labelPointColor);x.beginPath();x.arc(i.x,i.y,f.labelPointRadius*c.pix,0,2*Math.PI,false);x.closePath();x.fill()}if(f.labelShow===true){var r={x:(s+d.radarLabelTextMargin*c.pix)*Math.cos(t),y:(s+d.radarLabelTextMargin*c.pix)*Math.sin(t)};var o=convertCoordinateOrigin(r.x,r.y,h);var n=o.x;var l=o.y;if(util.approximatelyEqual(r.x,0)){n-=measureText(c.categories[e]||"",d.fontSize,x)/2}else if(r.x<0){n-=measureText(c.categories[e]||"",d.fontSize,x)}x.beginPath();x.setFontSize(d.fontSize);x.setFillStyle(f.labelColor||c.fontColor);x.fillText(c.categories[e]||"",n,l+d.fontSize/2);x.closePath();x.stroke()}})}function drawPieText(n,d,x,f,t,l){var p=x.pieChartLinePadding;var u=[];var g=null;var y=n.map(function(t,e){var a=t.formatter?t.formatter(t,e,n,d):util.toFixed(t._proportion_.toFixed(4)*100)+"%";a=t.labelText?t.labelText:a;var i=2*Math.PI-(t._start_+2*Math.PI*t._proportion_/2);if(t._rose_proportion_){i=2*Math.PI-(t._start_+2*Math.PI*t._rose_proportion_/2)}var r=t.color;var o=t._radius_;return{arc:i,text:a,color:r,radius:o,textColor:t.textColor,textSize:t.textSize,labelShow:t.labelShow}});for(let c=0;c=0?e+x.pieChartTextPadding:e-x.pieChartTextPadding;let n=a;let l=measureText(t.text,t.textSize*d.pix||x.fontSize,f);let s=n;if(g&&util.isSameXCoordinateArea(g.start,{x:o})){if(o>0){s=Math.min(n,g.start.y)}else if(e<0){s=Math.max(n,g.start.y)}else{if(n>0){s=Math.max(n,g.start.y)}else{s=Math.min(n,g.start.y)}}}if(o<0){o-=l}let h={lineStart:{x:i,y:r},lineEnd:{x:e,y:a},start:{x:o,y:s},width:l,height:x.fontSize,text:t.text,color:t.color,textColor:t.textColor,textSize:t.textSize};g=avoidCollision(h,g);u.push(g)}for(let n=0;nr?r:o.activeWidth;var n=e.area[0];var l=e.height-e.area[2];i.beginPath();i.setFillStyle(hexToRgb(o.activeBgColor,o.activeBgOpacity));i.rect(t-o.activeWidth/2,n,o.activeWidth,l-n);i.closePath();i.fill();i.setFillStyle("#FFFFFF")}function drawBarToolTipSplitArea(t,e,a,i,r){var o=assign({},{activeBgColor:"#000000",activeBgOpacity:.08},e.extra.bar);var n=e.area[3];var l=e.width-e.area[1];i.beginPath();i.setFillStyle(hexToRgb(o.activeBgColor,o.activeBgOpacity));i.rect(n,t-r/2,l-n,r);i.closePath();i.fill();i.setFillStyle("#FFFFFF")}function drawToolTip(e,r,o,a,n,i,f){var l=assign({},{showBox:true,showArrow:true,showCategory:false,bgColor:"#000000",bgOpacity:.7,borderColor:"#000000",borderWidth:0,borderRadius:0,borderOpacity:.7,boxPadding:3,fontColor:"#FFFFFF",fontSize:13,lineHeight:20,legendShow:true,legendShape:"auto",splitLine:true},o.extra.tooltip);if(l.showCategory==true&&o.categories){e.unshift({text:o.categories[o.tooltip.index],color:null})}var s=l.fontSize*o.pix;var p=l.lineHeight*o.pix;var h=l.boxPadding*o.pix;var c=s;var u=5*o.pix;if(l.legendShow==false){c=0;u=0}var d=l.showArrow?8*o.pix:0;var g=false;if(o.type=="line"||o.type=="mount"||o.type=="area"||o.type=="candle"||o.type=="mix"){if(l.splitLine==true){drawToolTipSplitLine(o.tooltip.offset.x,o,a,n)}}r=assign({x:0,y:0},r);r.y-=8*o.pix;var y=e.map(function(t){return measureText(t.text,s,n)});var x=c+u+4*h+Math.max.apply(null,y);var v=2*h+e.length*p;if(l.showBox==false){return}if(r.x-Math.abs(o._scrollDistance_||0)+d+x>o.width){g=true}if(v+r.y>o.height){r.y=o.height-v}n.beginPath();n.setFillStyle(hexToRgb(l.bgColor,l.bgOpacity));n.setLineWidth(l.borderWidth*o.pix);n.setStrokeStyle(hexToRgb(l.borderColor,l.borderOpacity));var t=l.borderRadius;if(g){if(x+d>o.width){r.x=o.width+Math.abs(o._scrollDistance_||0)+d+(x-o.width)}if(x>r.x){r.x=o.width+Math.abs(o._scrollDistance_||0)+d+(x-o.width)}if(l.showArrow){n.moveTo(r.x,r.y+10*o.pix);n.lineTo(r.x-d,r.y+10*o.pix+5*o.pix)}n.arc(r.x-d-t,r.y+v-t,t,0,Math.PI/2,false);n.arc(r.x-d-Math.round(x)+t,r.y+v-t,t,Math.PI/2,Math.PI,false);n.arc(r.x-d-Math.round(x)+t,r.y+t,t,-Math.PI,-Math.PI/2,false);n.arc(r.x-d-t,r.y+t,t,-Math.PI/2,0,false);if(l.showArrow){n.lineTo(r.x-d,r.y+10*o.pix-5*o.pix);n.lineTo(r.x,r.y+10*o.pix)}}else{if(l.showArrow){n.moveTo(r.x,r.y+10*o.pix);n.lineTo(r.x+d,r.y+10*o.pix-5*o.pix)}n.arc(r.x+d+t,r.y+t,t,-Math.PI,-Math.PI/2,false);n.arc(r.x+d+Math.round(x)-t,r.y+t,t,-Math.PI/2,0,false);n.arc(r.x+d+Math.round(x)-t,r.y+v-t,t,0,Math.PI/2,false);n.arc(r.x+d+t,r.y+v-t,t,Math.PI/2,Math.PI,false);if(l.showArrow){n.lineTo(r.x+d,r.y+10*o.pix+5*o.pix);n.lineTo(r.x,r.y+10*o.pix)}}n.closePath();n.fill();if(l.borderWidth>0){n.stroke()}if(l.legendShow){e.forEach(function(t,e){if(t.color!==null){n.beginPath();n.setFillStyle(t.color);var a=r.x+d+2*h;var i=r.y+(p-s)/2+p*e+h+1;if(g){a=r.x-x-d+2*h}switch(t.legendShape){case"line":n.moveTo(a,i+.5*c-2*o.pix);n.fillRect(a,i+.5*c-2*o.pix,c,4*o.pix);break;case"triangle":n.moveTo(a+7.5*o.pix,i+.5*c-5*o.pix);n.lineTo(a+2.5*o.pix,i+.5*c+5*o.pix);n.lineTo(a+12.5*o.pix,i+.5*c+5*o.pix);n.lineTo(a+7.5*o.pix,i+.5*c-5*o.pix);break;case"diamond":n.moveTo(a+7.5*o.pix,i+.5*c-5*o.pix);n.lineTo(a+2.5*o.pix,i+.5*c);n.lineTo(a+7.5*o.pix,i+.5*c+5*o.pix);n.lineTo(a+12.5*o.pix,i+.5*c);n.lineTo(a+7.5*o.pix,i+.5*c-5*o.pix);break;case"circle":n.moveTo(a+7.5*o.pix,i+.5*c);n.arc(a+7.5*o.pix,i+.5*c,5*o.pix,0,2*Math.PI);break;case"rect":n.moveTo(a,i+.5*c-5*o.pix);n.fillRect(a,i+.5*c-5*o.pix,15*o.pix,10*o.pix);break;case"square":n.moveTo(a+2*o.pix,i+.5*c-5*o.pix);n.fillRect(a+2*o.pix,i+.5*c-5*o.pix,10*o.pix,10*o.pix);break;default:n.moveTo(a,i+.5*c-5*o.pix);n.fillRect(a,i+.5*c-5*o.pix,15*o.pix,10*o.pix)}n.closePath();n.fill()}})}e.forEach(function(t,e){var a=r.x+d+2*h+c+u;if(g){a=r.x-x-d+2*h+c+u}var i=r.y+p*e+(p-s)/2-1+h+s;n.beginPath();n.setFontSize(s);n.setTextBaseline("normal");n.setFillStyle(l.fontColor);n.fillText(t.text,a,i);n.closePath();n.stroke()})}function drawColumnDataPoints(T,b,S,w){let A=arguments.length>4&&arguments[4]!==undefined?arguments[4]:1;let t=b.chartData.xAxisData,P=t.xAxisPoints,C=t.eachSpacing;let D=assign({},{type:"group",width:C/2,meterBorder:4,meterFillColor:"#FFFFFF",barBorderCircle:false,barBorderRadius:[],seriesGap:2,linearType:"none",linearOpacity:1,customColor:[],colorStop:0,labelPosition:"outside"},b.extra.column);let M=[];w.save();let L=-2;let F=P.length+2;if(b._scrollDistance_&&b._scrollDistance_!==0&&b.enableScroll===true){w.translate(b._scrollDistance_,0);L=Math.floor(-b._scrollDistance_/C)-2;F=L+b.xAxis.itemCount+4}if(b.tooltip&&b.tooltip.textList&&b.tooltip.textList.length&&A===1){drawToolTipSplitArea(b.tooltip.offset.x,b,S,w,C)}D.customColor=fillCustomColor(D.linearType,D.customColor,T,S);T.forEach(function(a,i){let e,t,o;e=[].concat(b.chartData.yAxisData.ranges[a.index]);t=e.pop();o=e.shift();let x=b.height-b.area[0]-b.area[2];let f=x*(0-t)/(o-t);let n=b.height-Math.round(f)-b.area[2];a.zeroPoints=n;var p=a.data;switch(D.type){case"group":var r=getColumnDataPoints(p,t,o,P,C,b,S,n,A);var u=getStackDataPoints(p,t,o,P,C,b,S,i,T,A);M.push(u);r=fixColumeData(r,C,T.length,i,S,b);for(let t=0;tL&&tn?n:o.y;const d=o.width;const s=Math.abs(n-o.y);if(D.barBorderCircle){D.barBorderRadius=[d/2,d/2,0,0]}if(o.y>n){D.barBorderRadius=[0,0,d/2,d/2]}let[t,e,a,i]=D.barBorderRadius;let r=Math.min(d/2,s/2);t=t>r?r:t;e=e>r?r:e;a=a>r?r:a;i=i>r?r:i;t=t<0?0:t;e=e<0?0:e;a=a<0?0:a;i=i<0?0:i;w.arc(h+t,c+t,t,-Math.PI,-Math.PI/2);w.arc(h+d-e,c+e,e,-Math.PI/2,0);w.arc(h+d-a,c+s-a,a,0,Math.PI/2);w.arc(h+i,c+s-i,i,Math.PI/2,Math.PI)}else{w.moveTo(l,o.y);w.lineTo(l+o.width,o.y);w.lineTo(l+o.width,n);w.lineTo(l,n);w.lineTo(l,o.y);w.setLineWidth(1);w.setStrokeStyle(y)}w.setFillStyle(g);w.closePath();w.fill()}};break;case"stack":var r=getStackDataPoints(p,t,o,P,C,b,S,i,T,A);M.push(r);r=fixColumeStackData(r,C,T.length,i,S,b,T);for(let e=0;eL&&e0){s-=m}w.setFillStyle(g);w.moveTo(l,t.y);w.fillRect(l,t.y,t.width,s);w.closePath();w.fill()}};break;case"meter":var r=getDataPoints(p,t,o,P,C,b,S,A);M.push(r);r=fixColumeMeterData(r,C,T.length,i,S,b,D.meterBorder);for(let t=0;tL&&t0){w.setStrokeStyle(a.color);w.setLineWidth(D.meterBorder*b.pix)}if(i==0){w.setFillStyle(D.meterFillColor)}else{w.setFillStyle(o.color||a.color)}var l=o.x-o.width/2;var s=b.height-o.y-b.area[2];if(D.barBorderRadius&&D.barBorderRadius.length===4||D.barBorderCircle===true){const h=l;const c=o.y;const d=o.width;const s=n-o.y;if(D.barBorderCircle){D.barBorderRadius=[d/2,d/2,0,0]}let[t,e,a,i]=D.barBorderRadius;let r=Math.min(d/2,s/2);t=t>r?r:t;e=e>r?r:e;a=a>r?r:a;i=i>r?r:i;t=t<0?0:t;e=e<0?0:e;a=a<0?0:a;i=i<0?0:i;w.arc(h+t,c+t,t,-Math.PI,-Math.PI/2);w.arc(h+d-e,c+e,e,-Math.PI/2,0);w.arc(h+d-a,c+s-a,a,0,Math.PI/2);w.arc(h+i,c+s-i,i,Math.PI/2,Math.PI);w.fill()}else{w.moveTo(l,o.y);w.lineTo(l+o.width,o.y);w.lineTo(l+o.width,n);w.lineTo(l,n);w.lineTo(l,o.y);w.fill()}if(i==0&&D.meterBorder>0){w.closePath();w.stroke()}}}break}});if(b.dataLabel!==false&&A===1){T.forEach(function(t,e){let a,i,r;a=[].concat(b.chartData.yAxisData.ranges[t.index]);i=a.pop();r=a.shift();var o=t.data;switch(D.type){case"group":var n=getColumnDataPoints(o,i,r,P,C,b,S,A);n=fixColumeData(n,C,T.length,e,S,b);drawColumePointText(n,t,S,w,b);break;case"stack":var n=getStackDataPoints(o,i,r,P,C,b,S,e,T,A);drawColumePointText(n,t,S,w,b);break;case"meter":var n=getDataPoints(o,i,r,P,C,b,S,A);drawColumePointText(n,t,S,w,b);break}})}w.restore();return{xAxisPoints:P,calPoints:M,eachSpacing:C}}function drawMountDataPoints(i,r,o,n){let f=arguments.length>4&&arguments[4]!==undefined?arguments[4]:1;let t=r.chartData.xAxisData,p=t.xAxisPoints,l=t.eachSpacing;let s=assign({},{type:"mount",widthRatio:1,borderWidth:1,barBorderCircle:false,barBorderRadius:[],linearType:"none",linearOpacity:1,customColor:[],colorStop:0},r.extra.mount);s.widthRatio=s.widthRatio<=0?0:s.widthRatio;s.widthRatio=s.widthRatio>=2?2:s.widthRatio;let e=[];n.save();let u=-2;let g=p.length+2;if(r._scrollDistance_&&r._scrollDistance_!==0&&r.enableScroll===true){n.translate(r._scrollDistance_,0);u=Math.floor(-r._scrollDistance_/l)-2;g=u+r.xAxis.itemCount+4}s.customColor=fillCustomColor(s.linearType,s.customColor,i,o);let y,v,m;y=[].concat(r.chartData.yAxisData.ranges[0]);v=y.pop();m=y.shift();let T=r.height-r.area[0]-r.area[2];let b=T*(0-v)/(m-v);let h=r.height-Math.round(b)-r.area[2];var c=getMountDataPoints(i,v,m,p,l,r,s,h,f);switch(s.type){case"bar":for(let t=0;tu&&th?h:o.y;const C=o.width;const S=Math.abs(h-o.y);if(s.barBorderCircle){s.barBorderRadius=[C/2,C/2,0,0]}if(o.y>h){s.barBorderRadius=[0,0,C/2,C/2]}let[t,e,a,i]=s.barBorderRadius;let r=Math.min(C/2,S/2);t=t>r?r:t;e=e>r?r:e;a=a>r?r:a;i=i>r?r:i;t=t<0?0:t;e=e<0?0:e;a=a<0?0:a;i=i<0?0:i;n.arc(A+t,P+t,t,-Math.PI,-Math.PI/2);n.arc(A+C-e,P+e,e,-Math.PI/2,0);n.arc(A+C-a,P+S-a,a,0,Math.PI/2);n.arc(A+i,P+S-i,i,Math.PI/2,Math.PI)}else{n.moveTo(d,o.y);n.lineTo(d+o.width,o.y);n.lineTo(d+o.width,h);n.lineTo(d,h);n.lineTo(d,o.y)}n.setStrokeStyle(w);n.setFillStyle(a);if(s.borderWidth>0){n.setLineWidth(s.borderWidth*r.pix);n.closePath();n.stroke()}n.fill()}};break;case"triangle":for(let e=0;eu&&e0){n.setLineWidth(s.borderWidth*r.pix);n.stroke()}n.fill()}};break;case"mount":for(let e=0;eu&&e0){n.setLineWidth(s.borderWidth*r.pix);n.stroke()}n.fill()}};break;case"sharp":for(let e=0;eu&&e0){n.setLineWidth(s.borderWidth*r.pix);n.stroke()}n.fill()}};break}if(r.dataLabel!==false&&f===1){let t,e,a;t=[].concat(r.chartData.yAxisData.ranges[0]);e=t.pop();a=t.shift();var c=getMountDataPoints(i,e,a,p,l,r,s,h,f);drawMountPointText(c,i,o,n,r,h)}n.restore();return{xAxisPoints:p,calPoints:c,eachSpacing:l}}function drawBarDataPoints(y,v,m,T){let b=arguments.length>4&&arguments[4]!==undefined?arguments[4]:1;let S=[];let w=(v.height-v.area[0]-v.area[2])/v.categories.length;for(let t=0;tC&&tr?r:t;e=e>r?r:e;a=a>r?r:a;i=i>r?r:i;t=t<0?0:t;e=e<0?0:e;a=a<0?0:a;i=i<0?0:i;T.arc(g+i,c+i,i,-Math.PI,-Math.PI/2);T.arc(o.x-t,c+t,t,-Math.PI/2,0);T.arc(o.x-e,c+h-e,e,0,Math.PI/2);T.arc(g+a,c+h-a,a,Math.PI/2,Math.PI)}else{T.moveTo(n,r);T.lineTo(o.x,r);T.lineTo(o.x,r+o.width);T.lineTo(n,r+o.width);T.lineTo(n,r);T.setLineWidth(1);T.setStrokeStyle(u)}T.setFillStyle(l);T.closePath();T.fill()}};break;case"stack":var i=getBarStackDataPoints(x,e,d,S,w,v,m,t,y,b);P.push(i);i=fixBarStackData(i,w,y.length,t,m,v,y);for(let e=0;eC&&e5&&arguments[5]!==undefined?arguments[5]:1;var s=assign({},{color:{},average:{}},h.extra.candle);s.color=assign({},{upLine:"#f04864",upFill:"#f04864",downLine:"#2fc25b",downFill:"#2fc25b"},s.color);s.average=assign({},{show:false,name:[],day:[],color:c.color},s.average);h.extra.candle=s;let a=h.chartData.xAxisData,x=a.xAxisPoints,f=a.eachSpacing;let y=[];d.save();let p=-2;let v=x.length+2;let u=0;let m=h.width+f;if(h._scrollDistance_&&h._scrollDistance_!==0&&h.enableScroll===true){d.translate(h._scrollDistance_,0);p=Math.floor(-h._scrollDistance_/f)-2;v=p+h.xAxis.itemCount+4;u=-h._scrollDistance_-f*2+h.area[3];m=u+(h.xAxis.itemCount+4)*f}if(s.average.show||t){t.forEach(function(e,t){let a,i,r;a=[].concat(h.chartData.yAxisData.ranges[e.index]);i=a.pop();r=a.shift();var o=e.data;var n=getDataPoints(o,i,r,x,f,h,c,g);var l=splitPoints(n,e);for(let t=0;tu){d.moveTo(t.x,t.y);a=1}if(e>0&&t.x>u&&t.xp&&e0){d.setStrokeStyle(s.color.upLine);d.setFillStyle(s.color.upFill);d.setLineWidth(1*h.pix);d.moveTo(t[3].x,t[3].y);d.lineTo(t[1].x,t[1].y);d.lineTo(t[1].x-f/4,t[1].y);d.lineTo(t[0].x-f/4,t[0].y);d.lineTo(t[0].x,t[0].y);d.lineTo(t[2].x,t[2].y);d.lineTo(t[0].x,t[0].y);d.lineTo(t[0].x+f/4,t[0].y);d.lineTo(t[1].x+f/4,t[1].y);d.lineTo(t[1].x,t[1].y);d.moveTo(t[3].x,t[3].y)}else{d.setStrokeStyle(s.color.downLine);d.setFillStyle(s.color.downFill);d.setLineWidth(1*h.pix);d.moveTo(t[3].x,t[3].y);d.lineTo(t[0].x,t[0].y);d.lineTo(t[0].x-f/4,t[0].y);d.lineTo(t[1].x-f/4,t[1].y);d.lineTo(t[1].x,t[1].y);d.lineTo(t[2].x,t[2].y);d.lineTo(t[1].x,t[1].y);d.lineTo(t[1].x+f/4,t[1].y);d.lineTo(t[0].x+f/4,t[0].y);d.lineTo(t[0].x,t[0].y);d.moveTo(t[3].x,t[3].y)}d.closePath();d.fill();d.stroke()}}});d.restore();return{xAxisPoints:x,calPoints:y,eachSpacing:f}}function drawAreaDataPoints(t,s,h,c){var d=arguments.length>4&&arguments[4]!==undefined?arguments[4]:1;var x=assign({},{type:"straight",opacity:.2,addLine:false,width:2,gradient:false,activeType:"none"},s.extra.area);let e=s.chartData.xAxisData,f=e.xAxisPoints,p=e.eachSpacing;let y=s.height-s.area[2];let v=[];c.save();let u=0;let g=s.width+p;if(s._scrollDistance_&&s._scrollDistance_!==0&&s.enableScroll===true){c.translate(s._scrollDistance_,0);u=-s._scrollDistance_-p*2+s.area[3];g=u+(s.xAxis.itemCount+4)*p}t.forEach(function(e,t){let a,i,r;a=[].concat(s.chartData.yAxisData.ranges[e.index]);i=a.pop();r=a.shift();let o=e.data;let n=getDataPoints(o,i,r,f,p,s,h,d);v.push(n);let l=splitPoints(n,e);for(let t=0;t1){let t=r[0];let e=r[r.length-1];c.moveTo(t.x,t.y);let i=0;if(x.type==="curve"){for(let a=0;au){c.moveTo(e.x,e.y);i=1}if(a>0&&e.x>u&&e.xu){c.moveTo(t.x,t.y);i=1}if(e>0&&t.x>u&&t.xu){c.moveTo(t.x,t.y);i=1}if(e>0&&t.x>u&&t.xu){c.moveTo(e.x,e.y);i=1}if(a>0&&e.x>u&&e.xu){c.moveTo(t.x,t.y);i=1}if(e>0&&t.x>u&&t.xu){c.moveTo(t.x,t.y);i=1}if(e>0&&t.x>u&&t.x4&&arguments[4]!==undefined?arguments[4]:1;var i=assign({},{type:"circle"},s.extra.scatter);let e=s.chartData.xAxisData,x=e.xAxisPoints,f=e.eachSpacing;var r=[];c.save();let a=0;let o=s.width+f;if(s._scrollDistance_&&s._scrollDistance_!==0&&s.enableScroll===true){c.translate(s._scrollDistance_,0);a=-s._scrollDistance_-f*2+s.area[3];o=a+(s.xAxis.itemCount+4)*f}t.forEach(function(t,e){let a,i,r;a=[].concat(s.chartData.yAxisData.ranges[t.index]);i=a.pop();r=a.shift();var o=t.data;var n=getDataPoints(o,i,r,x,f,s,h,d);c.beginPath();c.setStrokeStyle(t.color);c.setFillStyle(t.color);c.setLineWidth(1*s.pix);var l=t.pointShape;if(l==="diamond"){n.forEach(function(t,e){if(t!==null){c.moveTo(t.x,t.y-4.5);c.lineTo(t.x-4.5,t.y);c.lineTo(t.x,t.y+4.5);c.lineTo(t.x+4.5,t.y);c.lineTo(t.x,t.y-4.5)}})}else if(l==="circle"){n.forEach(function(t,e){if(t!==null){c.moveTo(t.x+2.5*s.pix,t.y);c.arc(t.x,t.y,3*s.pix,0,2*Math.PI,false)}})}else if(l==="square"){n.forEach(function(t,e){if(t!==null){c.moveTo(t.x-3.5,t.y-3.5);c.rect(t.x-3.5,t.y-3.5,7,7)}})}else if(l==="triangle"){n.forEach(function(t,e){if(t!==null){c.moveTo(t.x,t.y-4.5);c.lineTo(t.x-4.5,t.y+4.5);c.lineTo(t.x+4.5,t.y+4.5);c.lineTo(t.x,t.y-4.5)}})}else if(l==="triangle"){return}c.closePath();c.fill();c.stroke()});if(s.dataLabel!==false&&d===1){t.forEach(function(t,e){let a,i,r;a=[].concat(s.chartData.yAxisData.ranges[t.index]);i=a.pop();r=a.shift();var o=t.data;var n=getDataPoints(o,i,r,x,f,s,h,d);drawPointText(n,t,h,c,s)})}c.restore();return{xAxisPoints:x,calPoints:r,eachSpacing:f}}function drawBubbleDataPoints(a,l,s,h){var c=arguments.length>4&&arguments[4]!==undefined?arguments[4]:1;var d=assign({},{opacity:1,border:2},l.extra.bubble);let t=l.chartData.xAxisData,x=t.xAxisPoints,f=t.eachSpacing;var i=[];h.save();let e=0;let r=l.width+f;if(l._scrollDistance_&&l._scrollDistance_!==0&&l.enableScroll===true){h.translate(l._scrollDistance_,0);e=-l._scrollDistance_-f*2+l.area[3];r=e+(l.xAxis.itemCount+4)*f}a.forEach(function(i,t){let e,a,r;e=[].concat(l.chartData.yAxisData.ranges[i.index]);a=e.pop();r=e.shift();var o=i.data;var n=getDataPoints(o,a,r,x,f,l,s,c);h.beginPath();h.setStrokeStyle(i.color);h.setLineWidth(d.border*l.pix);h.setFillStyle(hexToRgb(i.color,d.opacity));n.forEach(function(t,e){h.moveTo(t.x+t.r,t.y);h.arc(t.x,t.y,t.r*l.pix,0,2*Math.PI,false)});h.closePath();h.fill();h.stroke();if(l.dataLabel!==false&&c===1){n.forEach(function(t,e){h.beginPath();var a=i.textSize*l.pix||s.fontSize;h.setFontSize(a);h.setFillStyle(i.textColor||"#FFFFFF");h.setTextAlign("center");h.fillText(String(t.t),t.x,t.y+a/2);h.closePath();h.stroke();h.setTextAlign("left")})}});h.restore();return{xAxisPoints:x,calPoints:i,eachSpacing:f}}function drawLineDataPoints(t,d,x,f){var p=arguments.length>4&&arguments[4]!==undefined?arguments[4]:1;var u=assign({},{type:"straight",width:2,activeType:"none",linearType:"none",onShadow:false,animation:"vertical"},d.extra.line);u.width*=d.pix;let e=d.chartData.xAxisData,g=e.xAxisPoints,y=e.eachSpacing;var T=[];f.save();let v=0;let m=d.width+y;if(d._scrollDistance_&&d._scrollDistance_!==0&&d.enableScroll===true){f.translate(d._scrollDistance_,0);v=-d._scrollDistance_-y*2+d.area[3];m=v+(d.xAxis.itemCount+4)*y}t.forEach(function(e,c){f.beginPath();f.setStrokeStyle(e.color);f.moveTo(-1e4,-1e4);f.lineTo(-10001,-10001);f.stroke();let t,a,i;t=[].concat(d.chartData.yAxisData.ranges[e.index]);a=t.pop();i=t.shift();var r=e.data;var o=getLineDataPoints(r,a,i,g,y,d,x,u,p);T.push(o);var n=splitPoints(o,e);if(e.lineType=="dash"){let t=e.dashLength?e.dashLength:8;t*=d.pix;f.setLineDash([t,t])}f.beginPath();var l=e.color;if(u.linearType!=="none"&&e.linearColor&&e.linearColor.length>0){var s=f.createLinearGradient(d.chartData.xAxisData.startX,d.height/2,d.chartData.xAxisData.endX,d.height/2);for(var h=0;h0){f.setShadow(e.setShadow[0],e.setShadow[1],e.setShadow[2],e.setShadow[3])}else{f.setShadow(0,0,0,"rgba(0,0,0,0)")}f.setLineWidth(u.width);n.forEach(function(i,t){if(i.length===1){f.moveTo(i[0].x,i[0].y)}else{f.moveTo(i[0].x,i[0].y);let a=0;if(u.type==="curve"){for(let e=0;ev){f.moveTo(t.x,t.y);a=1}if(e>0&&t.x>v&&t.xv){f.moveTo(t.x,t.y);a=1}if(e>0&&t.x>v&&t.xv){f.moveTo(t.x,t.y);a=1}if(e>0&&t.x>v&&t.x4&&arguments[4]!==undefined?arguments[4]:1;let e=v.chartData.xAxisData,b=e.xAxisPoints,S=e.eachSpacing;let w=assign({},{width:S/2,barBorderCircle:false,barBorderRadius:[],seriesGap:2,linearType:"none",linearOpacity:1,customColor:[],colorStop:0},v.extra.mix.column);let A=assign({},{opacity:.2,gradient:false},v.extra.mix.area);let M=assign({},{width:2},v.extra.mix.line);let L=v.height-v.area[2];let F=[];var _=0;var k=0;t.forEach(function(t,e){if(t.type=="column"){k+=1}});T.save();let R=-2;let I=b.length+2;let P=0;let C=v.width+S;if(v._scrollDistance_&&v._scrollDistance_!==0&&v.enableScroll===true){T.translate(v._scrollDistance_,0);R=Math.floor(-v._scrollDistance_/S)-2;I=R+v.xAxis.itemCount+4;P=-v._scrollDistance_-S*2+v.area[3];C=P+(v.xAxis.itemCount+4)*S}w.customColor=fillCustomColor(w.linearType,w.customColor,t,m);t.forEach(function(n,t){let o,x,f;o=[].concat(v.chartData.yAxisData.ranges[n.index]);x=o.pop();f=o.shift();var p=n.data;var a=getDataPoints(p,x,f,b,S,v,m,D);F.push(a);if(n.type=="column"){a=fixColumeData(a,S,k,_,m,v);for(let t=0;tR&&tr?r:t;e=e>r?r:e;a=a>r?r:a;i=i>r?r:i;t=t<0?0:t;e=e<0?0:e;a=a<0?0:a;i=i<0?0:i;T.arc(h+t,c+t,t,-Math.PI,-Math.PI/2);T.arc(h+d-e,c+e,e,-Math.PI/2,0);T.arc(h+d-a,c+s-a,a,0,Math.PI/2);T.arc(h+i,c+s-i,i,Math.PI/2,Math.PI)}else{T.moveTo(l,o.y);T.lineTo(l+o.width,o.y);T.lineTo(l+o.width,v.height-v.area[2]);T.lineTo(l,v.height-v.area[2]);T.lineTo(l,o.y);T.setLineWidth(1);T.setStrokeStyle(u)}T.setFillStyle(e);T.closePath();T.fill()}}_+=1}if(n.type=="area"){let e=splitPoints(a,n);for(let t=0;t1){var r=i[0];let t=i[i.length-1];T.moveTo(r.x,r.y);let a=0;if(n.style==="curve"){for(let e=0;eP){T.moveTo(t.x,t.y);a=1}if(e>0&&t.x>P&&t.xP){T.moveTo(t.x,t.y);a=1}if(e>0&&t.x>P&&t.xP){T.moveTo(t.x,t.y);a=1}if(e>0&&t.x>P&&t.xP){T.moveTo(t.x,t.y);a=1}if(e>0&&t.x>P&&t.x1){if(h.extra.mount.widthRatio>2)h.extra.mount.widthRatio=2;l+=(h.extra.mount.widthRatio-1)*f}var s=n*n/l;var y=0;if(h._scrollDistance_){y=-h._scrollDistance_*n/l}d.beginPath();d.setLineCap("round");d.setLineWidth(6*h.pix);d.setStrokeStyle(h.xAxis.scrollBackgroundColor||"#EFEBEF");d.moveTo(t,o);d.lineTo(a,o);d.stroke();d.closePath();d.beginPath();d.setLineCap("round");d.setLineWidth(6*h.pix);d.setStrokeStyle(h.xAxis.scrollColor||"#A6A6A6");d.moveTo(t+y,o);d.lineTo(t+y+s,o);d.stroke();d.closePath();d.setLineCap("butt")}d.save();if(h._scrollDistance_&&h._scrollDistance_!==0){d.translate(h._scrollDistance_,0)}if(h.xAxis.calibration===true){d.setStrokeStyle(h.xAxis.gridColor||"#cccccc");d.setLineCap("butt");d.setLineWidth(1*h.pix);x.forEach(function(t,e){if(e>0){d.beginPath();d.moveTo(t-f/2,u);d.lineTo(t-f/2,u+3*h.pix);d.closePath();d.stroke()}})}if(h.xAxis.disableGrid!==true){d.setStrokeStyle(h.xAxis.gridColor||"#cccccc");d.setLineCap("butt");d.setLineWidth(1*h.pix);if(h.xAxis.gridType=="dash"){d.setLineDash([h.xAxis.dashLength*h.pix,h.xAxis.dashLength*h.pix])}h.xAxis.gridEval=h.xAxis.gridEval||1;x.forEach(function(t,e){if(e%h.xAxis.gridEval==0){d.beginPath();d.moveTo(t,u);d.lineTo(t,i);d.stroke()}});d.setLineDash([])}if(h.xAxis.disabled!==true){let t=r.length;if(h.xAxis.labelCount){if(h.xAxis.itemCount){t=Math.ceil(r.length/h.xAxis.itemCount*h.xAxis.labelCount)}else{t=h.xAxis.labelCount}t-=1}let e=Math.ceil(r.length/t);let a=[];let i=r.length;for(let t=0;t=h.area[3]-1&&n-Math.abs(o)<=h.width-h.area[1]+1){d.beginPath();d.setFontSize(g);d.setFillStyle(h.xAxis.fontColor||h.fontColor);d.fillText(String(a),x[e]+i,u+h.xAxis.marginTop*h.pix+(h.xAxis.lineHeight-h.xAxis.fontSize)*h.pix/2+h.xAxis.fontSize*h.pix);d.closePath();d.stroke()}})}else{a.forEach(function(t,e){var a=h.xAxis.formatter?h.xAxis.formatter(t):t;var i=h._scrollDistance_||0;var r=p=="center"?x[e]+f/2:x[e];if(r-Math.abs(i)>=h.area[3]-1&&r-Math.abs(i)<=h.width-h.area[1]+1){d.save();d.beginPath();d.setFontSize(g);d.setFillStyle(h.xAxis.fontColor||h.fontColor);var o=measureText(String(a),g,d);var n=x[e];if(p=="center"){n=x[e]+f/2}var l=0;if(h.xAxis.scrollShow){l=6*h.pix}var s=u+h.xAxis.marginTop*h.pix+g-g*Math.abs(Math.sin(c._xAxisTextAngle_));if(h.xAxis.rotateAngle<0){n-=g/2;o=0}else{n+=g/2;o=-o}d.translate(n,s);d.rotate(-1*c._xAxisTextAngle_);d.fillText(String(a),o,0);d.closePath();d.stroke();d.restore()}})}}d.restore();if(h.xAxis.title){d.beginPath();d.setFontSize(h.xAxis.titleFontSize*h.pix);d.setFillStyle(h.xAxis.titleFontColor);d.fillText(String(h.xAxis.title),h.width-h.area[1]+h.xAxis.titleOffsetX*h.pix,h.height-h.area[2]+h.xAxis.marginTop*h.pix+(h.xAxis.lineHeight-h.xAxis.titleFontSize)*h.pix/2+(h.xAxis.titleFontSize+h.xAxis.titleOffsetY)*h.pix);d.closePath();d.stroke()}if(h.xAxis.axisLine){d.beginPath();d.setStrokeStyle(h.xAxis.axisLineColor);d.setLineWidth(1*h.pix);d.moveTo(t,h.height-h.area[2]);d.lineTo(a,h.height-h.area[2]);d.stroke()}}function drawYAxisGrid(c,e,d,a){if(e.yAxis.disableGrid===true){return}let t=e.height-e.area[0]-e.area[2];let i=t/e.yAxis.splitNumber;let r=e.area[3];let o=e.chartData.xAxisData.xAxisPoints,n=e.chartData.xAxisData.eachSpacing;let l=n*(o.length-1);if(e.type=="mount"&&e.extra&&e.extra.mount&&e.extra.mount.widthRatio&&e.extra.mount.widthRatio>1){if(e.extra.mount.widthRatio>2)e.extra.mount.widthRatio=2;l+=(e.extra.mount.widthRatio-1)*n}let x=r+l;let s=[];let h=1;if(e.xAxis.axisLine===false){h=0}for(let t=h;t4&&arguments[4]!==undefined?arguments[4]:1;var n=assign({},{activeOpacity:.5,activeRadius:10,offsetAngle:0,labelWidth:15,ringWidth:30,customRadius:0,border:false,borderWidth:2,borderColor:"#FFFFFF",centerColor:"#FFFFFF",linearType:"none",customColor:[]},r.type=="pie"?r.extra.pie:r.extra.ring);var l={x:r.area[3]+(r.width-r.area[1]-r.area[3])/2,y:r.area[0]+(r.height-r.area[0]-r.area[2])/2};if(e.pieChartLinePadding==0){e.pieChartLinePadding=n.activeRadius*r.pix}var i=Math.min((r.width-r.area[1]-r.area[3])/2-e.pieChartLinePadding-e.pieChartTextPadding-e._pieTextMaxLength_,(r.height-r.area[0]-r.area[2])/2-e.pieChartLinePadding-e.pieChartTextPadding);i=i<10?10:i;if(n.customRadius>0){i=n.customRadius*r.pix}t=getPieDataPoints(t,i,a);var h=n.activeRadius*r.pix;n.customColor=fillCustomColor(n.linearType,n.customColor,t,e);t=t.map(function(t){t._start_+=n.offsetAngle*Math.PI/180;return t});t.forEach(function(t,e){if(r.tooltip){if(r.tooltip.index==e){o.beginPath();o.setFillStyle(hexToRgb(t.color,n.activeOpacity||.5));o.moveTo(l.x,l.y);o.arc(l.x,l.y,t._radius_+h,t._start_,t._start_+2*t._proportion_*Math.PI);o.closePath();o.fill()}}o.beginPath();o.setLineWidth(n.borderWidth*r.pix);o.lineJoin="round";o.setStrokeStyle(n.borderColor);var a=t.color;if(n.linearType=="custom"){var i;if(o.createCircularGradient){i=o.createCircularGradient(l.x,l.y,t._radius_)}else{i=o.createRadialGradient(l.x,l.y,0,l.x,l.y,t._radius_)}i.addColorStop(0,hexToRgb(n.customColor[t.linearIndex],1));i.addColorStop(1,hexToRgb(t.color,1));a=i}o.setFillStyle(a);o.moveTo(l.x,l.y);o.arc(l.x,l.y,t._radius_,t._start_,t._start_+2*t._proportion_*Math.PI);o.closePath();o.fill();if(n.border==true){o.stroke()}});if(r.type==="ring"){var s=i*.6;if(typeof n.ringWidth==="number"&&n.ringWidth>0){s=Math.max(0,i-n.ringWidth*r.pix)}o.beginPath();o.setFillStyle(n.centerColor);o.moveTo(l.x,l.y);o.arc(l.x,l.y,s,0,2*Math.PI);o.closePath();o.fill()}if(r.dataLabel!==false&&a===1){drawPieText(t,r,e,o,i,l)}if(a===1&&r.type==="ring"){drawRingTitle(r,e,o,l)}return{center:l,radius:i,series:t}}function drawRoseDataPoints(t,r,e,o){var a=arguments.length>4&&arguments[4]!==undefined?arguments[4]:1;var n=assign({},{type:"area",activeOpacity:.5,activeRadius:10,offsetAngle:0,labelWidth:15,border:false,borderWidth:2,borderColor:"#FFFFFF",linearType:"none",customColor:[]},r.extra.rose);if(e.pieChartLinePadding==0){e.pieChartLinePadding=n.activeRadius*r.pix}var l={x:r.area[3]+(r.width-r.area[1]-r.area[3])/2,y:r.area[0]+(r.height-r.area[0]-r.area[2])/2};var i=Math.min((r.width-r.area[1]-r.area[3])/2-e.pieChartLinePadding-e.pieChartTextPadding-e._pieTextMaxLength_,(r.height-r.area[0]-r.area[2])/2-e.pieChartLinePadding-e.pieChartTextPadding);i=i<10?10:i;var s=n.minRadius||i*.5;if(i4&&arguments[4]!==undefined?arguments[4]:1;var o=assign({},{startAngle:.75,endAngle:.25,type:"default",direction:"cw",lineCap:"round",width:12,gap:2,linearType:"none",customColor:[]},i.extra.arcbar);a=getArcbarDataPoints(a,o,e);var n;if(o.centerX||o.centerY){n={x:o.centerX?o.centerX:i.width/2,y:o.centerY?o.centerY:i.height/2}}else{n={x:i.width/2,y:i.height/2}}var l;if(o.radius){l=o.radius}else{l=Math.min(n.x,n.y);l-=5*i.pix;l-=o.width/2}l=l<10?10:l;o.customColor=fillCustomColor(o.linearType,o.customColor,a,t);for(let e=0;e5&&arguments[5]!==undefined?arguments[5]:1;var f=assign({},{type:"default",startAngle:.75,endAngle:.25,width:15,labelOffset:13,splitLine:{fixRadius:0,splitNumber:10,width:15,color:"#FFFFFF",childNumber:5,childWidth:5},pointer:{width:15,color:"auto"}},c.extra.gauge);if(f.oldAngle==undefined){f.oldAngle=f.startAngle}if(f.oldData==undefined){f.oldData=0}n=getGaugeAxisPoints(n,f.startAngle,f.endAngle);var p={x:c.width/2,y:c.height/2};var u=Math.min(p.x,p.y);u-=5*c.pix;u-=f.width/2;u=u<10?10:u;var g=u-f.width;var y=0;if(f.type=="progress"){var v=u-f.width*3;d.beginPath();let t=d.createLinearGradient(p.x,p.y-v,p.x,p.y+v);t.addColorStop("0",hexToRgb(h[0].color,.3));t.addColorStop("1.0",hexToRgb("#FFFFFF",.1));d.setFillStyle(t);d.arc(p.x,p.y,v,0,2*Math.PI,false);d.fill();d.setLineWidth(f.width);d.setStrokeStyle(hexToRgb(h[0].color,.3));d.setLineCap("round");d.beginPath();d.arc(p.x,p.y,g,f.startAngle*Math.PI,f.endAngle*Math.PI,false);d.stroke();if(f.endAnglet/o){d.setStrokeStyle(hexToRgb(h[0].color,1))}else{d.setStrokeStyle(hexToRgb(h[0].color,.3))}d.setLineWidth(3*c.pix);d.moveTo(i,0);d.lineTo(r,0);d.stroke();d.rotate(a*Math.PI)}d.restore();h=getGaugeArcbarDataPoints(h,f,x);d.setLineWidth(f.width);d.setStrokeStyle(h[0].color);d.setLineCap("round");d.beginPath();d.arc(p.x,p.y,g,f.startAngle*Math.PI,h[0]._proportion_*Math.PI,false);d.stroke();let l=u-f.width*2.5;d.save();d.translate(p.x,p.y);d.rotate((h[0]._proportion_-1)*Math.PI);d.beginPath();d.setLineWidth(f.width/3);let s=d.createLinearGradient(0,-l*.6,0,l*.6);s.addColorStop("0",hexToRgb("#FFFFFF",0));s.addColorStop("0.5",hexToRgb(h[0].color,1));s.addColorStop("1.0",hexToRgb("#FFFFFF",0));d.setStrokeStyle(s);d.arc(0,0,l,.85*Math.PI,1.15*Math.PI,false);d.stroke();d.beginPath();d.setLineWidth(1);d.setStrokeStyle(h[0].color);d.setFillStyle(h[0].color);d.moveTo(-l-f.width/3/2,-4);d.lineTo(-l-f.width/3/2-4,0);d.lineTo(-l-f.width/3/2,4);d.lineTo(-l-f.width/3/2,-4);d.stroke();d.fill();d.restore()}else{d.setLineWidth(f.width);d.setLineCap("butt");for(let e=0;e4&&arguments[4]!==undefined?arguments[4]:1;var s=assign({},{gridColor:"#cccccc",gridType:"radar",gridEval:1,axisLabel:false,axisLabelTofix:0,labelShow:true,labelColor:"#666666",labelPointShow:false,labelPointRadius:3,labelPointColor:"#cccccc",opacity:.2,gridCount:3,border:false,borderWidth:2,linearType:"none",customColor:[]},n.extra.radar);var a=getRadarCoordinateSeries(n.categories.length);var h={x:n.area[3]+(n.width-n.area[1]-n.area[3])/2,y:n.area[0]+(n.height-n.area[0]-n.area[2])/2};var r=(n.width-n.area[1]-n.area[3])/2;var d=(n.height-n.area[0]-n.area[2])/2;var c=Math.min(r-(getMaxTextListLength(n.categories,i.fontSize,l)+i.radarLabelTextMargin),d-i.radarLabelTextMargin);c-=i.radarLabelTextMargin*n.pix;c=c<10?10:c;c=s.radius?s.radius:c;l.beginPath();l.setLineWidth(1*n.pix);l.setStrokeStyle(s.gridColor);a.forEach(function(t,e){var a=convertCoordinateOrigin(c*Math.cos(t),c*Math.sin(t),h);l.moveTo(h.x,h.y);if(e%s.gridEval==0){l.lineTo(a.x,a.y)}});l.stroke();l.closePath();var x=function t(i){var r={};l.beginPath();l.setLineWidth(1*n.pix);l.setStrokeStyle(s.gridColor);if(s.gridType=="radar"){a.forEach(function(t,e){var a=convertCoordinateOrigin(c/s.gridCount*i*Math.cos(t),c/s.gridCount*i*Math.sin(t),h);if(e===0){r=a;l.moveTo(a.x,a.y)}else{l.lineTo(a.x,a.y)}});l.lineTo(r.x,r.y)}else{var e=convertCoordinateOrigin(c/s.gridCount*i*Math.cos(1.5),c/s.gridCount*i*Math.sin(1.5),h);l.arc(h.x,h.y,h.y-e.y,0,2*Math.PI,false)}l.stroke();l.closePath()};for(var e=1;e<=s.gridCount;e++){x(e)}s.customColor=fillCustomColor(s.linearType,s.customColor,o,i);var f=getRadarDataPoints(a,h,c,o,n,t);f.forEach(function(t,e){l.beginPath();l.setLineWidth(s.borderWidth*n.pix);l.setStrokeStyle(t.color);var a=hexToRgb(t.color,s.opacity);if(s.linearType=="custom"){var i;if(l.createCircularGradient){i=l.createCircularGradient(h.x,h.y,c)}else{i=l.createRadialGradient(h.x,h.y,0,h.x,h.y,c)}i.addColorStop(0,hexToRgb(s.customColor[o[e].linearIndex],s.opacity));i.addColorStop(1,hexToRgb(t.color,s.opacity));a=i}l.setFillStyle(a);t.data.forEach(function(t,e){if(e===0){l.moveTo(t.position.x,t.position.y)}else{l.lineTo(t.position.x,t.position.y)}});l.closePath();l.fill();if(s.border===true){l.stroke()}l.closePath();if(n.dataPointShape!==false){var r=t.data.map(function(t){return t.position});drawPointShape(r,t.color,t.pointShape,l,n)}});if(s.axisLabel===true){const p=Math.max(s.max,Math.max.apply(null,dataCombine(o)));const u=c/s.gridCount;const g=n.fontSize*n.pix;l.setFontSize(g);l.setFillStyle(n.fontColor);l.setTextAlign("left");for(var e=0;eh.x?e.xMax:h.x;e.yMin=e.yMinh.y?e.yMax:h.y}}}return e}function coordinateToPoint(t,e,a,i,r,o){return{x:(e-a.xMin)*i+r,y:(a.yMax-t)*i+o}}function pointToCoordinate(t,e,a,i,r,o){return{x:(e-r)/i+a.xMin,y:a.yMax-(t-o)/i}}function isRayIntersectsSegment(t,e,a){if(e[1]==a[1]){return false}if(e[1]>t[1]&&a[1]>t[1]){return false}if(e[1]t[1]){return false}if(a[1]==t[1]&&e[1]>t[1]){return false}if(e[0]a[t].area[2]||e[1]>a[t].area[3]||e[2]i||e[3]>r){o=true;break}else{o=false}}else{o=true;break}}}return o}function getWordCloudPoint(c,t,d){let x=c.series;switch(t){case"normal":for(let l=0;l.7){return true}else{return false}};for(let h=0;h4&&arguments[4]!==undefined?arguments[4]:1;let a=assign({},{type:"normal",autoColors:true},r.extra.word);if(!r.chartData.wordCloudData){r.chartData.wordCloudData=getWordCloudPoint(r,a.type,o)}o.beginPath();o.setFillStyle(r.background);o.rect(0,0,r.width,r.height);o.fill();o.save();let l=r.chartData.wordCloudData;o.translate(r.width/2,r.height/2);for(let i=0;i0){if(r.tooltip){if(r.tooltip.index==i){o.strokeText(t,(l[i].areav[0]+5-r.width/2)*n-a*(1-n)/2,(l[i].areav[1]+5+e-r.height/2)*n)}else{o.fillText(t,(l[i].areav[0]+5-r.width/2)*n-a*(1-n)/2,(l[i].areav[1]+5+e-r.height/2)*n)}}else{o.fillText(t,(l[i].areav[0]+5-r.width/2)*n-a*(1-n)/2,(l[i].areav[1]+5+e-r.height/2)*n)}}}else{if(l[i].area[0]>0){if(r.tooltip){if(r.tooltip.index==i){o.strokeText(t,(l[i].area[0]+5-r.width/2)*n-a*(1-n)/2,(l[i].area[1]+5+e-r.height/2)*n)}else{o.fillText(t,(l[i].area[0]+5-r.width/2)*n-a*(1-n)/2,(l[i].area[1]+5+e-r.height/2)*n)}}else{o.fillText(t,(l[i].area[0]+5-r.width/2)*n-a*(1-n)/2,(l[i].area[1]+5+e-r.height/2)*n)}}}o.stroke();o.restore()}o.restore()}function drawFunnelDataPoints(t,e,c,a){let d=arguments.length>4&&arguments[4]!==undefined?arguments[4]:1;let i=assign({},{type:"funnel",activeWidth:10,activeOpacity:.3,border:false,borderWidth:2,borderColor:"#FFFFFF",fillOpacity:1,minSize:0,labelAlign:"right",linearType:"none",customColor:[]},e.extra.funnel);let r=(e.height-e.area[0]-e.area[2])/t.length;let o={x:e.area[3]+(e.width-e.area[1]-e.area[3])/2,y:e.height-e.area[2]};let n=i.activeWidth*e.pix;let x=Math.min((e.width-e.area[1]-e.area[3])/2-n,(e.height-e.area[0]-e.area[2])/2-n);let l=getFunnelDataPoints(t,x,i,r,d);a.save();a.translate(o.x,o.y);i.customColor=fillCustomColor(i.linearType,i.customColor,t,c);if(i.type=="pyramid"){for(let t=0;t0){l.area[3]+=i[t].width+l.yAxis.padding*l.pix}else{l.area[3]+=i[t].width}a+=1}else if(i[t].position=="right"){if(e>0){l.area[1]+=i[t].width+l.yAxis.padding*l.pix}else{l.area[1]+=i[t].width}e+=1}}}else{n.yAxisWidth=i}l.chartData.yAxisData=f;if(l.categories&&l.categories.length&&l.type!=="radar"&&l.type!=="gauge"&&l.type!=="bar"){l.chartData.xAxisData=getXAxisPoints(l.categories,l,n);let t=calCategoriesData(l.categories,l,n,l.chartData.xAxisData.eachSpacing,s),e=t.xAxisHeight,a=t.angle;n.xAxisHeight=e;n._xAxisTextAngle_=a;l.area[2]+=e;l.chartData.categoriesData=t}else{if(l.type==="line"||l.type==="area"||l.type==="scatter"||l.type==="bubble"||l.type==="bar"){l.chartData.xAxisData=calXAxisData(c,l,n,s);d=l.chartData.xAxisData.rangesFormat;let t=calCategoriesData(d,l,n,l.chartData.xAxisData.eachSpacing,s),e=t.xAxisHeight,a=t.angle;n.xAxisHeight=e;n._xAxisTextAngle_=a;l.area[2]+=e;l.chartData.categoriesData=t}else{l.chartData.xAxisData={xAxisPoints:[]}}}if(l.enableScroll&&l.xAxis.scrollAlign=="right"&&l._scrollDistance_===undefined){let t=0,e=l.chartData.xAxisData.xAxisPoints,a=l.chartData.xAxisData.startX,i=l.chartData.xAxisData.endX,r=l.chartData.xAxisData.eachSpacing;let o=r*(e.length-1);let n=i-a;t=n-o;h.scrollOption.currentOffset=t;h.scrollOption.startTouchX=t;h.scrollOption.distance=0;h.scrollOption.lastMoveTime=0;l._scrollDistance_=t}if(t==="pie"||t==="ring"||t==="rose"){n._pieTextMaxLength_=l.dataLabel===false?0:getPieTextMaxLength(x,n,s,l)}switch(t){case"word":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function(t){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}drawWordCloudDataPoints(c,l,n,s,t);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break;case"map":s.clearRect(0,0,l.width,l.height);drawMapDataPoints(c,l,n,s);setTimeout(()=>{this.uevent.trigger("renderComplete")},50);break;case"funnel":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function(t){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}l.chartData.funnelData=drawFunnelDataPoints(c,l,n,s,t);drawLegend(l.series,l,n,s,l.chartData);drawToolTipBridge(l,n,s,t);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break;case"line":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function t(e){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}drawYAxisGrid(d,l,n,s);drawXAxis(d,l,n,s);var a=drawLineDataPoints(c,l,n,s,e),i=a.xAxisPoints,r=a.calPoints,o=a.eachSpacing;l.chartData.xAxisPoints=i;l.chartData.calPoints=r;l.chartData.eachSpacing=o;drawYAxis(c,l,n,s);if(l.enableMarkLine!==false&&e===1){drawMarkLine(l,n,s)}drawLegend(l.series,l,n,s,l.chartData);drawToolTipBridge(l,n,s,e,o,i);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break;case"scatter":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function t(e){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}drawYAxisGrid(d,l,n,s);drawXAxis(d,l,n,s);var a=drawScatterDataPoints(c,l,n,s,e),i=a.xAxisPoints,r=a.calPoints,o=a.eachSpacing;l.chartData.xAxisPoints=i;l.chartData.calPoints=r;l.chartData.eachSpacing=o;drawYAxis(c,l,n,s);if(l.enableMarkLine!==false&&e===1){drawMarkLine(l,n,s)}drawLegend(l.series,l,n,s,l.chartData);drawToolTipBridge(l,n,s,e,o,i);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break;case"bubble":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function t(e){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}drawYAxisGrid(d,l,n,s);drawXAxis(d,l,n,s);var a=drawBubbleDataPoints(c,l,n,s,e),i=a.xAxisPoints,r=a.calPoints,o=a.eachSpacing;l.chartData.xAxisPoints=i;l.chartData.calPoints=r;l.chartData.eachSpacing=o;drawYAxis(c,l,n,s);if(l.enableMarkLine!==false&&e===1){drawMarkLine(l,n,s)}drawLegend(l.series,l,n,s,l.chartData);drawToolTipBridge(l,n,s,e,o,i);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break;case"mix":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function t(e){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}drawYAxisGrid(d,l,n,s);drawXAxis(d,l,n,s);var a=drawMixDataPoints(c,l,n,s,e),i=a.xAxisPoints,r=a.calPoints,o=a.eachSpacing;l.chartData.xAxisPoints=i;l.chartData.calPoints=r;l.chartData.eachSpacing=o;drawYAxis(c,l,n,s);if(l.enableMarkLine!==false&&e===1){drawMarkLine(l,n,s)}drawLegend(l.series,l,n,s,l.chartData);drawToolTipBridge(l,n,s,e,o,i);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break;case"column":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function t(e){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}drawYAxisGrid(d,l,n,s);drawXAxis(d,l,n,s);var a=drawColumnDataPoints(c,l,n,s,e),i=a.xAxisPoints,r=a.calPoints,o=a.eachSpacing;l.chartData.xAxisPoints=i;l.chartData.calPoints=r;l.chartData.eachSpacing=o;drawYAxis(c,l,n,s);if(l.enableMarkLine!==false&&e===1){drawMarkLine(l,n,s)}drawLegend(l.series,l,n,s,l.chartData);drawToolTipBridge(l,n,s,e,o,i);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break;case"mount":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function t(e){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}drawYAxisGrid(d,l,n,s);drawXAxis(d,l,n,s);var a=drawMountDataPoints(c,l,n,s,e),i=a.xAxisPoints,r=a.calPoints,o=a.eachSpacing;l.chartData.xAxisPoints=i;l.chartData.calPoints=r;l.chartData.eachSpacing=o;drawYAxis(c,l,n,s);if(l.enableMarkLine!==false&&e===1){drawMarkLine(l,n,s)}drawLegend(l.series,l,n,s,l.chartData);drawToolTipBridge(l,n,s,e,o,i);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break;case"bar":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function t(e){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}drawXAxis(d,l,n,s);var a=drawBarDataPoints(c,l,n,s,e),i=a.yAxisPoints,r=a.calPoints,o=a.eachSpacing;l.chartData.yAxisPoints=i;l.chartData.xAxisPoints=l.chartData.xAxisData.xAxisPoints;l.chartData.calPoints=r;l.chartData.eachSpacing=o;drawYAxis(c,l,n,s);if(l.enableMarkLine!==false&&e===1){drawMarkLine(l,n,s)}drawLegend(l.series,l,n,s,l.chartData);drawToolTipBridge(l,n,s,e,o,i);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break;case"area":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function t(e){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}drawYAxisGrid(d,l,n,s);drawXAxis(d,l,n,s);var a=drawAreaDataPoints(c,l,n,s,e),i=a.xAxisPoints,r=a.calPoints,o=a.eachSpacing;l.chartData.xAxisPoints=i;l.chartData.calPoints=r;l.chartData.eachSpacing=o;drawYAxis(c,l,n,s);if(l.enableMarkLine!==false&&e===1){drawMarkLine(l,n,s)}drawLegend(l.series,l,n,s,l.chartData);drawToolTipBridge(l,n,s,e,o,i);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break;case"ring":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function t(e){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}l.chartData.pieData=drawPieDataPoints(c,l,n,s,e);drawLegend(l.series,l,n,s,l.chartData);drawToolTipBridge(l,n,s,e);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break;case"pie":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function t(e){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}l.chartData.pieData=drawPieDataPoints(c,l,n,s,e);drawLegend(l.series,l,n,s,l.chartData);drawToolTipBridge(l,n,s,e);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break;case"rose":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function t(e){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}l.chartData.pieData=drawRoseDataPoints(c,l,n,s,e);drawLegend(l.series,l,n,s,l.chartData);drawToolTipBridge(l,n,s,e);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break;case"radar":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function t(e){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}l.chartData.radarData=drawRadarDataPoints(c,l,n,s,e);drawLegend(l.series,l,n,s,l.chartData);drawToolTipBridge(l,n,s,e);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break;case"arcbar":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function t(e){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}l.chartData.arcbarData=drawArcbarDataPoints(c,l,n,s,e);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break;case"gauge":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function t(e){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}l.chartData.gaugeData=drawGaugeDataPoints(d,c,l,n,s,e);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break;case"candle":this.animationInstance=new Animation({timing:l.timing,duration:e,onProcess:function t(e){s.clearRect(0,0,l.width,l.height);if(l.rotate){contextRotate(s,l)}drawYAxisGrid(d,l,n,s);drawXAxis(d,l,n,s);var a=drawCandleDataPoints(c,x,l,n,s,e),i=a.xAxisPoints,r=a.calPoints,o=a.eachSpacing;l.chartData.xAxisPoints=i;l.chartData.calPoints=r;l.chartData.eachSpacing=o;drawYAxis(c,l,n,s);if(l.enableMarkLine!==false&&e===1){drawMarkLine(l,n,s)}if(x){drawLegend(x,l,n,s,l.chartData)}else{drawLegend(l.series,l,n,s,l.chartData)}drawToolTipBridge(l,n,s,e,o,i);drawCanvas(l,s)},onAnimationFinish:function t(){h.uevent.trigger("renderComplete")}});break}}function uChartsEvent(){this.events={}}uChartsEvent.prototype.addEventListener=function(t,e){this.events[t]=this.events[t]||[];this.events[t].push(e)};uChartsEvent.prototype.delEventListener=function(t){this.events[t]=[]};uChartsEvent.prototype.trigger=function(){for(var t=arguments.length,e=Array(t),a=0;a0&&arguments[0]!==undefined?arguments[0]:{};this.opts=assign({},this.opts,t);this.opts.updateData=true;let c=t.scrollPosition||"current";switch(c){case"current":this.opts._scrollDistance_=this.scrollOption.currentOffset;break;case"left":this.opts._scrollDistance_=0;this.scrollOption={currentOffset:0,startTouchX:0,distance:0,lastMoveTime:0};break;case"right":let t=calYAxisData(this.opts.series,this.opts,this.config,this.context),e=t.yAxisWidth;this.config.yAxisWidth=e;let a=0;let i=getXAxisPoints(this.opts.categories,this.opts,this.config),r=i.xAxisPoints,o=i.startX,n=i.endX,l=i.eachSpacing;let s=l*(r.length-1);let h=n-o;a=h-s;this.scrollOption={currentOffset:a,startTouchX:a,distance:0,lastMoveTime:0};this.opts._scrollDistance_=a;break}drawCharts.call(this,this.opts.type,this.opts,this.config,this.context)};uCharts.prototype.zoom=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.opts.xAxis.itemCount;if(this.opts.enableScroll!==true){console.log("[uCharts] 请启用滚动条后使用");return}let e=Math.round(Math.abs(this.scrollOption.currentOffset)/this.opts.chartData.eachSpacing)+Math.round(this.opts.xAxis.itemCount/2);this.opts.animation=false;this.opts.xAxis.itemCount=t.itemCount;let a=calYAxisData(this.opts.series,this.opts,this.config,this.context),i=a.yAxisWidth;this.config.yAxisWidth=i;let r=0;let o=getXAxisPoints(this.opts.categories,this.opts,this.config),h=o.xAxisPoints,c=o.startX,d=o.endX,n=o.eachSpacing;let x=n*e;let l=d-c;let s=l-n*(h.length-1);r=l/2-x;if(r>0){r=0}if(r=this.opts.categories.length?this.opts.categories.length:r;this.opts.animation=false;this.opts.xAxis.itemCount=r;let o=0;let n=getXAxisPoints(this.opts.categories,this.opts,this.config),x=n.xAxisPoints,f=n.startX,p=n.endX,l=n.eachSpacing;let u=l*this.scrollOption.moveCurrent1;let g=p-f;let y=g-l*(x.length-1);o=-u+Math.min(i[0].x,i[1].x)-this.opts.area[3]-l;if(o>0){o=0}if(o1&&arguments[1]!==undefined?arguments[1]:{};var a=null;if(t.changedTouches){a=t.changedTouches[0]}else{a=t.mp.changedTouches[0]}if(a){var i=getTouches(a,this.opts,t);var r=this.getLegendDataIndex(t);if(r>=0){if(this.opts.type=="candle"){this.opts.seriesMA[r].show=!this.opts.seriesMA[r].show}else{this.opts.series[r].show=!this.opts.series[r].show}this.opts.animation=e.animation?true:false;this.opts._scrollDistance_=this.scrollOption.currentOffset;drawCharts.call(this,this.opts.type,this.opts,this.config,this.context)}}};uCharts.prototype.showToolTip=function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var c=null;if(t.changedTouches){c=t.changedTouches[0]}else{c=t.mp.changedTouches[0]}if(!c){console.log("[uCharts] 未获取到event坐标信息")}var a=getTouches(c,this.opts,t);var d=this.scrollOption.currentOffset;var i=assign({},this.opts,{_scrollDistance_:d,animation:false});if(this.opts.type==="line"||this.opts.type==="area"||this.opts.type==="column"||this.opts.type==="scatter"||this.opts.type==="bubble"){var r=this.getCurrentDataIndex(t);var o=e.index==undefined?r.index:e.index;if(o>-1||o.length>0){var n=getSeriesDataItem(this.opts.series,o,r.group);if(n.length!==0){var l=getToolTipData(n,this.opts,o,r.group,this.opts.categories,e),s=l.textList,h=l.offset;h.y=a.y;i.tooltip={textList:e.textList!==undefined?e.textList:s,offset:e.offset!==undefined?e.offset:h,option:e,index:o,group:r.group}}}drawCharts.call(this,i.type,i,this.config,this.context)}if(this.opts.type==="mount"){var o=e.index==undefined?this.getCurrentDataIndex(t).index:e.index;if(o>-1){var i=assign({},this.opts,{animation:false});var n=assign({},i._series_[o]);var s=[{text:e.formatter?e.formatter(n,undefined,o,i):n.name+": "+n.data,color:n.color,legendShape:this.opts.extra.tooltip.legendShape=="auto"?n.legendShape:this.opts.extra.tooltip.legendShape}];var h={x:i.chartData.calPoints[o].x,y:a.y};i.tooltip={textList:e.textList?e.textList:s,offset:e.offset!==undefined?e.offset:h,option:e,index:o}}drawCharts.call(this,i.type,i,this.config,this.context)}if(this.opts.type==="bar"){var r=this.getCurrentDataIndex(t);var o=e.index==undefined?r.index:e.index;if(o>-1||o.length>0){var n=getSeriesDataItem(this.opts.series,o,r.group);if(n.length!==0){var l=getToolTipData(n,this.opts,o,r.group,this.opts.categories,e),s=l.textList,h=l.offset;h.x=a.x;i.tooltip={textList:e.textList!==undefined?e.textList:s,offset:e.offset!==undefined?e.offset:h,option:e,index:o}}}drawCharts.call(this,i.type,i,this.config,this.context)}if(this.opts.type==="mix"){var r=this.getCurrentDataIndex(t);var o=e.index==undefined?r.index:e.index;if(o>-1){var d=this.scrollOption.currentOffset;var i=assign({},this.opts,{_scrollDistance_:d,animation:false});var n=getSeriesDataItem(this.opts.series,o);if(n.length!==0){var x=getMixToolTipData(n,this.opts,o,this.opts.categories,e),s=x.textList,h=x.offset;h.y=a.y;i.tooltip={textList:e.textList?e.textList:s,offset:e.offset!==undefined?e.offset:h,option:e,index:o}}}drawCharts.call(this,i.type,i,this.config,this.context)}if(this.opts.type==="candle"){var r=this.getCurrentDataIndex(t);var o=e.index==undefined?r.index:e.index;if(o>-1){var d=this.scrollOption.currentOffset;var i=assign({},this.opts,{_scrollDistance_:d,animation:false});var n=getSeriesDataItem(this.opts.series,o);if(n.length!==0){var l=getCandleToolTipData(this.opts.series[0].data,n,this.opts,o,this.opts.categories,this.opts.extra.candle,e),s=l.textList,h=l.offset;h.y=a.y;i.tooltip={textList:e.textList?e.textList:s,offset:e.offset!==undefined?e.offset:h,option:e,index:o}}}drawCharts.call(this,i.type,i,this.config,this.context)}if(this.opts.type==="pie"||this.opts.type==="ring"||this.opts.type==="rose"||this.opts.type==="funnel"){var o=e.index==undefined?this.getCurrentDataIndex(t):e.index;if(o>-1){var i=assign({},this.opts,{animation:false});var n=assign({},i._series_[o]);var s=[{text:e.formatter?e.formatter(n,undefined,o,i):n.name+": "+n.data,color:n.color,legendShape:this.opts.extra.tooltip.legendShape=="auto"?n.legendShape:this.opts.extra.tooltip.legendShape}];var h={x:a.x,y:a.y};i.tooltip={textList:e.textList?e.textList:s,offset:e.offset!==undefined?e.offset:h,option:e,index:o}}drawCharts.call(this,i.type,i,this.config,this.context)}if(this.opts.type==="map"){var o=e.index==undefined?this.getCurrentDataIndex(t):e.index;if(o>-1){var i=assign({},this.opts,{animation:false});var n=assign({},this.opts.series[o]);n.name=n.properties.name;var s=[{text:e.formatter?e.formatter(n,undefined,o,this.opts):n.name,color:n.color,legendShape:this.opts.extra.tooltip.legendShape=="auto"?n.legendShape:this.opts.extra.tooltip.legendShape}];var h={x:a.x,y:a.y};i.tooltip={textList:e.textList?e.textList:s,offset:e.offset!==undefined?e.offset:h,option:e,index:o}}i.updateData=false;drawCharts.call(this,i.type,i,this.config,this.context)}if(this.opts.type==="word"){var o=e.index==undefined?this.getCurrentDataIndex(t):e.index;if(o>-1){var i=assign({},this.opts,{animation:false});var n=assign({},this.opts.series[o]);var s=[{text:e.formatter?e.formatter(n,undefined,o,this.opts):n.name,color:n.color,legendShape:this.opts.extra.tooltip.legendShape=="auto"?n.legendShape:this.opts.extra.tooltip.legendShape}];var h={x:a.x,y:a.y};i.tooltip={textList:e.textList?e.textList:s,offset:e.offset!==undefined?e.offset:h,option:e,index:o}}i.updateData=false;drawCharts.call(this,i.type,i,this.config,this.context)}if(this.opts.type==="radar"){var o=e.index==undefined?this.getCurrentDataIndex(t):e.index;if(o>-1){var i=assign({},this.opts,{animation:false});var n=getSeriesDataItem(this.opts.series,o);if(n.length!==0){var s=n.map(t=>{return{text:e.formatter?e.formatter(t,this.opts.categories[o],o,this.opts):t.name+": "+t.data,color:t.color,legendShape:this.opts.extra.tooltip.legendShape=="auto"?t.legendShape:this.opts.extra.tooltip.legendShape}});var h={x:a.x,y:a.y};i.tooltip={textList:e.textList?e.textList:s,offset:e.offset!==undefined?e.offset:h,option:e,index:o}}}drawCharts.call(this,i.type,i,this.config,this.context)}};uCharts.prototype.translate=function(t){this.scrollOption={currentOffset:t,startTouchX:t,distance:0,lastMoveTime:0};let e=assign({},this.opts,{_scrollDistance_:t,animation:false});drawCharts.call(this,this.opts.type,e,this.config,this.context)};uCharts.prototype.scrollStart=function(t){var e=null;if(t.changedTouches){e=t.changedTouches[0]}else{e=t.mp.changedTouches[0]}var a=getTouches(e,this.opts,t);if(e&&this.opts.enableScroll===true){this.scrollOption.startTouchX=a.x}};uCharts.prototype.scroll=function(t){if(this.scrollOption.lastMoveTime===0){this.scrollOption.lastMoveTime=Date.now()}let e=this.opts.touchMoveLimit||60;let a=Date.now();let i=a-this.scrollOption.lastMoveTime;if(i=0){var o="touchend"!==n?e.targetTouches[0]:e.changedTouches[0];o&&st(t,o,e,i)}else st(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&gw.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function ht(t,e,i){pw?t.addEventListener(e,i):t.attachEvent("on"+e,i)}function ct(t,e,i){pw?t.removeEventListener(e,i):t.detachEvent("on"+e,i)}function dt(t){return 2===t.which||3===t.which}function ft(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}function pt(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function gt(t,e,i){return{type:t,event:i,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:mt}}function mt(t){mw(this.event)}function vt(){}function yt(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var n,o=t;o;){if(o.clipPath&&!o.clipPath.contain(e,i))return!1;o.silent&&(n=!0),o=o.parent}return!n||xw}return!1}function xt(){var t=new bw(6);return _t(t),t}function _t(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function wt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function bt(t,e,i){var n=e[0]*i[0]+e[2]*i[1],o=e[1]*i[0]+e[3]*i[1],a=e[0]*i[2]+e[2]*i[3],r=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=o,t[2]=a,t[3]=r,t[4]=s,t[5]=l,t}function St(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t}function Mt(t,e,i){var n=e[0],o=e[2],a=e[4],r=e[1],s=e[3],l=e[5],u=Math.sin(i),h=Math.cos(i);return t[0]=n*h+r*u,t[1]=-n*u+r*h,t[2]=o*h+s*u,t[3]=-o*u+h*s,t[4]=h*a+u*l,t[5]=h*l-u*a,t}function It(t,e,i){var n=i[0],o=i[1];return t[0]=e[0]*n,t[1]=e[1]*o,t[2]=e[2]*n,t[3]=e[3]*o,t[4]=e[4]*n,t[5]=e[5]*o,t}function Tt(t,e){var i=e[0],n=e[2],o=e[4],a=e[1],r=e[3],s=e[5],l=i*r-a*n;return l?(l=1/l,t[0]=r*l,t[1]=-a*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-r*o)*l,t[5]=(a*o-i*s)*l,t):null}function At(t){var e=xt();return wt(e,t),e}function Dt(t){return t>Iw||t<-Iw}function Ct(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedTime=0,this._paused=!1}function Lt(t){return(t=Math.round(t))<0?0:t>255?255:t}function kt(t){return(t=Math.round(t))<0?0:t>360?360:t}function Pt(t){return t<0?0:t>1?1:t}function Nt(t){return Lt(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function Ot(t){return Pt(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function Et(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function Rt(t,e,i){return t+(e-t)*i}function zt(t,e,i,n,o){return t[0]=e,t[1]=i,t[2]=n,t[3]=o,t}function Bt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function Vt(t,e){Vw&&Bt(Vw,e),Vw=Bw.put(t,Vw||e.slice())}function Gt(t,e){if(t){e=e||[];var i=Bw.get(t);if(i)return Bt(e,i);var n=(t+="").replace(/ /g,"").toLowerCase();if(n in zw)return Bt(e,zw[n]),Vt(t,e),e;if("#"!==n.charAt(0)){var o=n.indexOf("("),a=n.indexOf(")");if(-1!==o&&a+1===n.length){var r=n.substr(0,o),s=n.substr(o+1,a-(o+1)).split(","),l=1;switch(r){case"rgba":if(4!==s.length)return void zt(e,0,0,0,1);l=Ot(s.pop());case"rgb":return 3!==s.length?void zt(e,0,0,0,1):(zt(e,Nt(s[0]),Nt(s[1]),Nt(s[2]),l),Vt(t,e),e);case"hsla":return 4!==s.length?void zt(e,0,0,0,1):(s[3]=Ot(s[3]),Ft(s,e),Vt(t,e),e);case"hsl":return 3!==s.length?void zt(e,0,0,0,1):(Ft(s,e),Vt(t,e),e);default:return}}zt(e,0,0,0,1)}else{if(4===n.length)return(u=parseInt(n.substr(1),16))>=0&&u<=4095?(zt(e,(3840&u)>>4|(3840&u)>>8,240&u|(240&u)>>4,15&u|(15&u)<<4,1),Vt(t,e),e):void zt(e,0,0,0,1);if(7===n.length){var u=parseInt(n.substr(1),16);return u>=0&&u<=16777215?(zt(e,(16711680&u)>>16,(65280&u)>>8,255&u,1),Vt(t,e),e):void zt(e,0,0,0,1)}}}}function Ft(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=Ot(t[1]),o=Ot(t[2]),a=o<=.5?o*(n+1):o+n-o*n,r=2*o-a;return e=e||[],zt(e,Lt(255*Et(r,a,i+1/3)),Lt(255*Et(r,a,i)),Lt(255*Et(r,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Wt(t){if(t){var e,i,n=t[0]/255,o=t[1]/255,a=t[2]/255,r=Math.min(n,o,a),s=Math.max(n,o,a),l=s-r,u=(s+r)/2;if(0===l)e=0,i=0;else{i=u<.5?l/(s+r):l/(2-s-r);var h=((s-n)/6+l/2)/l,c=((s-o)/6+l/2)/l,d=((s-a)/6+l/2)/l;n===s?e=d-c:o===s?e=1/3+h-d:a===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,u];return null!=t[3]&&f.push(t[3]),f}}function Ht(t,e){var i=Gt(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,i[n]>255?i[n]=255:t[n]<0&&(i[n]=0);return qt(i,4===i.length?"rgba":"rgb")}}function Zt(t){var e=Gt(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Ut(t,e,i){if(e&&e.length&&t>=0&&t<=1){i=i||[];var n=t*(e.length-1),o=Math.floor(n),a=Math.ceil(n),r=e[o],s=e[a],l=n-o;return i[0]=Lt(Rt(r[0],s[0],l)),i[1]=Lt(Rt(r[1],s[1],l)),i[2]=Lt(Rt(r[2],s[2],l)),i[3]=Pt(Rt(r[3],s[3],l)),i}}function Xt(t,e,i){if(e&&e.length&&t>=0&&t<=1){var n=t*(e.length-1),o=Math.floor(n),a=Math.ceil(n),r=Gt(e[o]),s=Gt(e[a]),l=n-o,u=qt([Lt(Rt(r[0],s[0],l)),Lt(Rt(r[1],s[1],l)),Lt(Rt(r[2],s[2],l)),Pt(Rt(r[3],s[3],l))],"rgba");return i?{color:u,leftIndex:o,rightIndex:a,value:n}:u}}function jt(t,e,i,n){if(t=Gt(t))return t=Wt(t),null!=e&&(t[0]=kt(e)),null!=i&&(t[1]=Ot(i)),null!=n&&(t[2]=Ot(n)),qt(Ft(t),"rgba")}function Yt(t,e){if((t=Gt(t))&&null!=e)return t[3]=Pt(e),qt(t,"rgba")}function qt(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}}function Kt(t,e){return t[e]}function $t(t,e,i){t[e]=i}function Jt(t,e,i){return(e-t)*i+t}function Qt(t,e,i){return i>.5?e:t}function te(t,e,i,n,o){var a=t.length;if(1===o)for(s=0;so)t.length=o;else for(r=n;r=0&&!(m[i]<=e);i--);i=Math.min(i,u-2)}else{for(i=L;ie);i++);i=Math.min(i-1,u-2)}L=i,k=e;var n=m[i+1]-m[i];if(0!==n)if(I=(e-m[i])/n,l)if(A=v[i],T=v[0===i?i:i-1],D=v[i>u-2?u-1:i+1],C=v[i>u-3?u-1:i+2],d)ne(T,A,D,C,I,I*I,I*I*I,r(t,o),g);else{if(f)a=ne(T,A,D,C,I,I*I,I*I*I,P,1),a=re(P);else{if(p)return Qt(A,D,I);a=oe(T,A,D,C,I,I*I,I*I*I)}s(t,o,a)}else if(d)te(v[i],v[i+1],I,r(t,o),g);else{var a;if(f)te(v[i],v[i+1],I,P,1),a=re(P);else{if(p)return Qt(v[i],v[i+1],I);a=Jt(v[i],v[i+1],I)}s(t,o,a)}},ondestroy:i});return e&&"spline"!==e&&(N.easing=e),N}}}function ue(t,e,i,n,o,a,r,s){_(n)?(a=o,o=n,n=0):x(o)?(a=o,o="linear",n=0):x(n)?(a=n,n=0):x(i)?(a=i,i=500):i||(i=500),t.stopAnimation(),he(t,"",t,e,i,n,s);var l=t.animators.slice(),u=l.length;u||a&&a();for(var h=0;h0&&t.animate(e,!1).when(null==o?500:o,s).delay(a||0)}function ce(t,e,i,n){if(e){var o={};o[e]={},o[e][i]=n,t.attr(o)}else t.attr(i,n)}function de(t,e,i,n){i<0&&(t+=i,i=-i),n<0&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}function fe(t){for(var e=0;t>=eb;)e|=1&t,t>>=1;return t+e}function pe(t,e,i,n){var o=e+1;if(o===i)return 1;if(n(t[o++],t[e])<0){for(;o=0;)o++;return o-e}function ge(t,e,i){for(i--;e>>1])<0?l=a:s=a+1;var u=n-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=r}}function ve(t,e,i,n,o,a){var r=0,s=0,l=1;if(a(t,e[i+o])>0){for(s=n-o;l0;)r=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),r+=o,l+=o}else{for(s=o+1;ls&&(l=s);var u=r;r=o-l,l=o-u}for(r++;r>>1);a(t,e[i+h])>0?r=h+1:l=h}return l}function ye(t,e,i,n,o,a){var r=0,s=0,l=1;if(a(t,e[i+o])<0){for(s=o+1;ls&&(l=s);var u=r;r=o-l,l=o-u}else{for(s=n-o;l=0;)r=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),r+=o,l+=o}for(r++;r>>1);a(t,e[i+h])<0?l=h:r=h+1}return l}function xe(t,e){function i(i){var s=a[i],u=r[i],h=a[i+1],c=r[i+1];r[i]=u+c,i===l-3&&(a[i+1]=a[i+2],r[i+1]=r[i+2]),l--;var d=ye(t[h],t,s,u,0,e);s+=d,0!==(u-=d)&&0!==(c=ve(t[s+u-1],t,h,c,c-1,e))&&(u<=c?n(s,u,h,c):o(s,u,h,c))}function n(i,n,o,a){var r=0;for(r=0;r=ib||f>=ib);if(p)break;g<0&&(g=0),g+=2}if((s=g)<1&&(s=1),1===n){for(r=0;r=0;r--)t[f+r]=t[d+r];if(0===n){v=!0;break}}if(t[c--]=u[h--],1==--a){v=!0;break}if(0!=(m=a-ve(t[l],u,0,a,a-1,e))){for(a-=m,f=(c-=m)+1,d=(h-=m)+1,r=0;r=ib||m>=ib);if(v)break;p<0&&(p=0),p+=2}if((s=p)<1&&(s=1),1===a){for(f=(c-=n)+1,d=(l-=n)+1,r=n-1;r>=0;r--)t[f+r]=t[d+r];t[c]=u[h]}else{if(0===a)throw new Error;for(d=c-(a-1),r=0;r=0;r--)t[f+r]=t[d+r];t[c]=u[h]}else for(d=c-(a-1),r=0;r1;){var t=l-2;if(t>=1&&r[t-1]<=r[t]+r[t+1]||t>=2&&r[t-2]<=r[t]+r[t-1])r[t-1]r[t+1])break;i(t)}},this.forceMergeRuns=function(){for(;l>1;){var t=l-2;t>0&&r[t-1]s&&(l=s),me(t,i,i+l,i+a,e),a=l}r.pushRun(i,a),r.mergeRuns(),o-=a,i+=a}while(0!==o);r.forceMergeRuns()}}function we(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function be(t,e,i){var n=null==e.x?0:e.x,o=null==e.x2?1:e.x2,a=null==e.y?0:e.y,r=null==e.y2?0:e.y2;return e.global||(n=n*i.width+i.x,o=o*i.width+i.x,a=a*i.height+i.y,r=r*i.height+i.y),n=isNaN(n)?0:n,o=isNaN(o)?1:o,a=isNaN(a)?0:a,r=isNaN(r)?0:r,t.createLinearGradient(n,a,o,r)}function Se(t,e,i){var n=i.width,o=i.height,a=Math.min(n,o),r=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(r=r*n+i.x,s=s*o+i.y,l*=a),t.createRadialGradient(r,s,0,r,s,l)}function Me(){return!1}function Ie(t,e,i){var n=iw(),o=e.getWidth(),a=e.getHeight(),r=n.style;return r&&(r.position="absolute",r.left=0,r.top=0,r.width=o+"px",r.height=a+"px",n.setAttribute("data-zr-dom-id",t)),n.width=o*i,n.height=a*i,n}function Te(t){if("string"==typeof t){var e=mb.get(t);return e&&e.image}return t}function Ae(t,e,i,n,o){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!i)return e;var a=mb.get(t),r={hostEl:i,cb:n,cbPayload:o};return a?!Ce(e=a.image)&&a.pending.push(r):((e=new Image).onload=e.onerror=De,mb.put(t,e.__cachedImgObj={image:e,pending:[r]}),e.src=e.__zrImageSrc=t),e}return t}return e}function De(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;exb&&(yb=0,vb={}),yb++,vb[i]=o,o}function ke(t,e,i,n,o,a,r,s){return r?Ne(t,e,i,n,o,a,r,s):Pe(t,e,i,n,o,a,s)}function Pe(t,e,i,n,o,a,r){var s=He(t,e,o,a,r),l=Le(t,e);o&&(l+=o[1]+o[3]);var u=s.outerHeight,h=new de(Oe(0,l,i),Ee(0,u,n),l,u);return h.lineHeight=s.lineHeight,h}function Ne(t,e,i,n,o,a,r,s){var l=Ze(t,{rich:r,truncate:s,font:e,textAlign:i,textPadding:o,textLineHeight:a}),u=l.outerWidth,h=l.outerHeight;return new de(Oe(0,u,i),Ee(0,h,n),u,h)}function Oe(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function Ee(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function Re(t,e,i){var n=e.x,o=e.y,a=e.height,r=e.width,s=a/2,l="left",u="top";switch(t){case"left":n-=i,o+=s,l="right",u="middle";break;case"right":n+=i+r,o+=s,u="middle";break;case"top":n+=r/2,o-=i,l="center",u="bottom";break;case"bottom":n+=r/2,o+=a+i,l="center";break;case"inside":n+=r/2,o+=s,l="center",u="middle";break;case"insideLeft":n+=i,o+=s,u="middle";break;case"insideRight":n+=r-i,o+=s,l="right",u="middle";break;case"insideTop":n+=r/2,o+=i,l="center";break;case"insideBottom":n+=r/2,o+=a-i,l="center",u="bottom";break;case"insideTopLeft":n+=i,o+=i;break;case"insideTopRight":n+=r-i,o+=i,l="right";break;case"insideBottomLeft":n+=i,o+=a-i,u="bottom";break;case"insideBottomRight":n+=r-i,o+=a-i,l="right",u="bottom"}return{x:n,y:o,textAlign:l,textVerticalAlign:u}}function ze(t,e,i,n,o){if(!e)return"";var a=(t+"").split("\n");o=Be(e,i,n,o);for(var r=0,s=a.length;r=r;l++)s-=r;var u=Le(i,e);return u>s&&(i="",u=0),s=t-u,n.ellipsis=i,n.ellipsisWidth=u,n.contentWidth=s,n.containerWidth=t,n}function Ve(t,e){var i=e.containerWidth,n=e.font,o=e.contentWidth;if(!i)return"";var a=Le(t,n);if(a<=i)return t;for(var r=0;;r++){if(a<=o||r>=e.maxIterations){t+=e.ellipsis;break}var s=0===r?Ge(t,o,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*o/a):0;a=Le(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function Ge(t,e,i,n){for(var o=0,a=0,r=t.length;au)t="",r=[];else if(null!=h)for(var c=Be(h-(i?i[1]+i[3]:0),e,o.ellipsis,{minChar:o.minChar,placeholder:o.placeholder}),d=0,f=r.length;do&&Ue(i,t.substring(o,a)),Ue(i,n[2],n[1]),o=_b.lastIndex}of)return{lines:[],width:0,height:0};k.textWidth=Le(k.text,_);var b=y.textWidth,S=null==b||"auto"===b;if("string"==typeof b&&"%"===b.charAt(b.length-1))k.percentWidth=b,u.push(k),b=0;else{if(S){b=k.textWidth;var M=y.textBackgroundColor,I=M&&M.image;I&&Ce(I=Te(I))&&(b=Math.max(b,I.width*w/I.height))}var T=x?x[1]+x[3]:0;b+=T;var C=null!=d?d-m:null;null!=C&&Cl&&(i*=l/(c=i+n),n*=l/c),o+a>l&&(o*=l/(c=o+a),a*=l/c),n+o>u&&(n*=u/(c=n+o),o*=u/c),i+a>u&&(i*=u/(c=i+a),a*=u/c),t.moveTo(r+i,s),t.lineTo(r+l-n,s),0!==n&&t.arc(r+l-n,s+n,n,-Math.PI/2,0),t.lineTo(r+l,s+u-o),0!==o&&t.arc(r+l-o,s+u-o,o,0,Math.PI/2),t.lineTo(r+a,s+u),0!==a&&t.arc(r+a,s+u-a,a,Math.PI/2,Math.PI),t.lineTo(r,s+i),0!==i&&t.arc(r+i,s+i,i,Math.PI,1.5*Math.PI)}function Ye(t){return qe(t),d(t.rich,qe),t}function qe(t){if(t){t.font=Xe(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||Mb[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||Ib[i]?i:"top",t.textPadding&&(t.textPadding=L(t.textPadding))}}function Ke(t,e,i,n,o,a){n.rich?Je(t,e,i,n,o,a):$e(t,e,i,n,o,a)}function $e(t,e,i,n,o,a){var r,s=ii(n),l=!1,u=e.__attrCachedBy===rb.PLAIN_TEXT;a!==sb?(a&&(r=a.style,l=!s&&u&&r),e.__attrCachedBy=s?rb.NONE:rb.PLAIN_TEXT):u&&(e.__attrCachedBy=rb.NONE);var h=n.font||Sb;l&&h===(r.font||Sb)||(e.font=h);var c=t.__computedFont;t.__styleFont!==h&&(t.__styleFont=h,c=t.__computedFont=e.font);var d=n.textPadding,f=n.textLineHeight,p=t.__textCotentBlock;p&&!t.__dirtyText||(p=t.__textCotentBlock=He(i,c,d,f,n.truncate));var g=p.outerHeight,m=p.lines,v=p.lineHeight,y=ai(g,n,o),x=y.baseX,_=y.baseY,w=y.textAlign||"left",b=y.textVerticalAlign;ti(e,n,o,x,_);var S=Ee(_,g,b),M=x,I=S;if(s||d){var T=Le(i,c);d&&(T+=d[1]+d[3]);var A=Oe(x,T,w);s&&ni(t,e,n,A,S,T,g),d&&(M=hi(x,w,d),I+=d[0])}e.textAlign=w,e.textBaseline="middle",e.globalAlpha=n.opacity||1;for(B=0;B=0&&"right"===(_=b[C]).textAlign;)ei(t,e,_,n,M,v,D,"right"),I-=_.width,D-=_.width,C--;for(A+=(a-(A-m)-(y-D)-I)/2;T<=C;)ei(t,e,_=b[T],n,M,v,A+_.width/2,"center"),A+=_.width,T++;v+=M}}function ti(t,e,i,n,o){if(i&&e.textRotation){var a=e.textOrigin;"center"===a?(n=i.width/2+i.x,o=i.height/2+i.y):a&&(n=a[0]+i.x,o=a[1]+i.y),t.translate(n,o),t.rotate(-e.textRotation),t.translate(-n,-o)}}function ei(t,e,i,n,o,a,r,s){var l=n.rich[i.styleName]||{};l.text=i.text;var u=i.textVerticalAlign,h=a+o/2;"top"===u?h=a+i.height/2:"bottom"===u&&(h=a+o-i.height/2),!i.isLineHolder&&ii(l)&&ni(t,e,l,"right"===s?r-i.width:"center"===s?r-i.width/2:r,h-i.height/2,i.width,i.height);var c=i.textPadding;c&&(r=hi(r,s,c),h-=i.height/2-c[2]-i.textHeight/2),ri(e,"shadowBlur",D(l.textShadowBlur,n.textShadowBlur,0)),ri(e,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),ri(e,"shadowOffsetX",D(l.textShadowOffsetX,n.textShadowOffsetX,0)),ri(e,"shadowOffsetY",D(l.textShadowOffsetY,n.textShadowOffsetY,0)),ri(e,"textAlign",s),ri(e,"textBaseline","middle"),ri(e,"font",i.font||Sb);var d=si(l.textStroke||n.textStroke,p),f=li(l.textFill||n.textFill),p=A(l.textStrokeWidth,n.textStrokeWidth);d&&(ri(e,"lineWidth",p),ri(e,"strokeStyle",d),e.strokeText(i.text,r,h)),f&&(ri(e,"fillStyle",f),e.fillText(i.text,r,h))}function ii(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function ni(t,e,i,n,o,a,r){var s=i.textBackgroundColor,l=i.textBorderWidth,u=i.textBorderColor,h=_(s);if(ri(e,"shadowBlur",i.textBoxShadowBlur||0),ri(e,"shadowColor",i.textBoxShadowColor||"transparent"),ri(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),ri(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var c=i.textBorderRadius;c?je(e,{x:n,y:o,width:a,height:r,r:c}):e.rect(n,o,a,r),e.closePath()}if(h)if(ri(e,"fillStyle",s),null!=i.fillOpacity){f=e.globalAlpha;e.globalAlpha=i.fillOpacity*i.opacity,e.fill(),e.globalAlpha=f}else e.fill();else if(w(s)){var d=s.image;(d=Ae(d,null,t,oi,s))&&Ce(d)&&e.drawImage(d,n,o,a,r)}if(l&&u)if(ri(e,"lineWidth",l),ri(e,"strokeStyle",u),null!=i.strokeOpacity){var f=e.globalAlpha;e.globalAlpha=i.strokeOpacity*i.opacity,e.stroke(),e.globalAlpha=f}else e.stroke()}function oi(t,e){e.image=t}function ai(t,e,i){var n=e.x||0,o=e.y||0,a=e.textAlign,r=e.textVerticalAlign;if(i){var s=e.textPosition;if(s instanceof Array)n=i.x+ui(s[0],i.width),o=i.y+ui(s[1],i.height);else{var l=Re(s,i,e.textDistance);n=l.x,o=l.y,a=a||l.textAlign,r=r||l.textVerticalAlign}var u=e.textOffset;u&&(n+=u[0],o+=u[1])}return{baseX:n,baseY:o,textAlign:a,textVerticalAlign:r}}function ri(t,e,i){return t[e]=ab(t,e,i),t[e]}function si(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function li(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function ui(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function hi(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function ci(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function di(t){t=t||{},Kw.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new ub(t.style,this),this._rect=null,this.__clipPaths=[]}function fi(t){di.call(this,t)}function pi(t){return parseInt(t,10)}function gi(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}function mi(t,e,i){return Cb.copy(t.getBoundingRect()),t.transform&&Cb.applyTransform(t.transform),Lb.width=e,Lb.height=i,!Cb.intersect(Lb)}function vi(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i