@xysfe/actui2 0.0.6 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/lib/BScroll/index.js +1 -1
  2. package/lib/BScroll/index.mjs +1 -5
  3. package/lib/CouponLayer/index.js +1 -1
  4. package/lib/CouponLayer/index.mjs +2 -2
  5. package/lib/DiseaseListLayer/index.js +1 -1
  6. package/lib/DiseaseListLayer/index.mjs +2 -2
  7. package/lib/GoldBenefitDemo/benefit/slider/index.js +1 -1
  8. package/lib/GoldBenefitDemo/benefit/slider/index.mjs +2 -2
  9. package/lib/GoldBenefitDemo/costTable/index.js +1 -1
  10. package/lib/GoldBenefitDemo/costTable/index.mjs +2 -2
  11. package/lib/GoldCost/costTable/index.js +1 -1
  12. package/lib/GoldCost/costTable/index.mjs +4 -4
  13. package/lib/GoldFinance/benefit/slider/index.js +1 -1
  14. package/lib/GoldFinance/benefit/slider/index.mjs +2 -2
  15. package/lib/GoldFinance/costTable/index.js +1 -1
  16. package/lib/GoldFinance/costTable/index.mjs +2 -2
  17. package/lib/GoldFinanceChart/costTable/index.js +1 -1
  18. package/lib/GoldFinanceChart/costTable/index.mjs +2 -2
  19. package/lib/GoldFinanceChartV3/costTable/index.js +1 -1
  20. package/lib/GoldFinanceChartV3/costTable/index.mjs +4 -4
  21. package/lib/GoldFinanceV2/benefit/slider/index.js +1 -1
  22. package/lib/GoldFinanceV2/benefit/slider/index.mjs +2 -2
  23. package/lib/GoldFinanceV2/costTable/index.js +1 -1
  24. package/lib/GoldFinanceV2/costTable/index.mjs +2 -2
  25. package/lib/GoldMulSelect/mulSelect/index.js +1 -1
  26. package/lib/GoldMulSelect/mulSelect/index.mjs +2 -2
  27. package/lib/GoldPayLimitLayer/index.js +1 -1
  28. package/lib/GoldPayLimitLayer/index.mjs +2 -2
  29. package/lib/GoldPayLimitLayer/signIntroduct/index.js +1 -1
  30. package/lib/GoldPayLimitLayer/signIntroduct/index.mjs +2 -2
  31. package/lib/GoldPayLimitLayer/table/index.js +1 -1
  32. package/lib/GoldPayLimitLayer/table/index.mjs +2 -2
  33. package/lib/Marketing/teleport/index.js +1 -1
  34. package/lib/Marketing/teleport/index.mjs +2 -1
  35. package/lib/MedicalListLayer/index.js +1 -1
  36. package/lib/MedicalListLayer/index.mjs +2 -2
  37. package/lib/Picker/index.js +1 -1
  38. package/lib/Picker/index.mjs +2 -2
  39. package/lib/PickerLongText/index.js +1 -1
  40. package/lib/PickerLongText/index.mjs +2 -2
  41. package/lib/PlanSetting/index.js +1 -1
  42. package/lib/PlanSetting/index.mjs +1 -1
  43. package/lib/PlanSetting/style.css +1 -1
  44. package/lib/ProPosterLayer/index.js +1 -1
  45. package/lib/ProPosterLayer/index.mjs +1 -1
  46. package/lib/ProductLayer/productDetailLayer/index.js +1 -1
  47. package/lib/ProductLayer/productDetailLayer/index.mjs +4 -5
  48. package/lib/ProductLayer/productDetailLayer/style.css +1 -1
  49. package/lib/RecordRuleLayer/index.js +1 -1
  50. package/lib/RecordRuleLayer/index.mjs +4 -4
  51. package/lib/Rule/index.js +1 -1
  52. package/lib/Rule/index.mjs +2 -2
  53. package/lib/SlidePoster/index.js +1 -1
  54. package/lib/SlidePoster/index.mjs +1 -1
  55. package/lib/common/scroll/index.js +1 -1
  56. package/lib/common/scroll/index.mjs +2 -2
  57. package/lib/common/scrollZoom/scroll/index.js +1 -1
  58. package/lib/common/scrollZoom/scroll/index.mjs +2 -2
  59. package/lib/index.js +1 -1
  60. package/lib/index.mjs +6 -5
  61. package/lib/utils/vueAwesomeSwiper/index.js +1 -1
  62. package/lib/utils/vueAwesomeSwiper/index.mjs +7 -1
  63. package/package.json +4 -3
  64. package/types/components/BScroll/index.d.ts +1 -1
  65. package/types/utils/vueAwesomeSwiper.d.ts +2 -1
@@ -4,7 +4,7 @@ import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js/instance/in
4
4
  import _spliceInstanceProperty from "@babel/runtime-corejs3/core-js/instance/splice";
5
5
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
6
6
  import { A as ActPopup } from "../../common/popup/index.mjs";
7
- import { b as bScroll } from "../../BScroll/index.mjs";
7
+ import BScrollModule__default from "better-scroll";
8
8
  import { h as hexToRgb } from "../../utils/helpers/index.mjs";
9
9
  import { n as normalizeComponent } from "../../common/index.mjs";
10
10
  import './style.css';var _sfc_main = {
@@ -59,7 +59,7 @@ import './style.css';var _sfc_main = {
59
59
  this.isVisible = true;
60
60
  this.$nextTick(function() {
61
61
  if (!_this.scroll) {
62
- _this.scroll = new bScroll(_this.$refs.content, {
62
+ _this.scroll = new BScrollModule__default(_this.$refs.content, {
63
63
  click: true
64
64
  });
65
65
  } else {
@@ -1 +1 @@
1
- "use strict";require('./style.css');var _concatInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/concat");var _forEachInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/for-each");var _sliceInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/slice");var _findIndexInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/find-index");var _includesInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/includes");var utils_create=require("../utils/create/index.js");var common_goldlayer=require("../common/goldlayer/index.js");var GoldPayLimitLayer_table=require("./table/index.js");var GoldPayLimitLayer_signIntroduct=require("./signIntroduct/index.js");var BScroll=require("../BScroll/index.js");var mixins_visible=require("../mixins/visible/index.js");var utils_helpers=require("../utils/helpers/index.js");var common=require("../common/index.js");var paySceneMap={1:"首期限额说明",2:"续期限额说明",3:"首期+续期限额说明"};var payTypeMap={1:"微信",2:"支付宝",3:"银联"};var _sfc_main={name:"ActGoldPayLimitLayer",mixins:[mixins_visible.visibleMixin],components:{ActGoldLayer:common_goldlayer.ActGoldLayer,payTable:GoldPayLimitLayer_table.payTable,signIntroduct:GoldPayLimitLayer_signIntroduct.signIntroduct},props:{title:{type:String,default:"支付限额说明"},brandColor:{type:String,default:"#8C7FEE"},btnColor:{type:String,default:"#8C7FEE"},payLimitData:{type:Array,default:function _default(){return[]}},defaultPayScene:{type:Number,default:1},defaultPayType:{type:Number,default:1}},data:function data(){return{paySceneMap,payTypeMap,activePaySceneIndex:0,activePayTypeIndex:0,curPayRule:[],renderData:[],renderSignDesc:[],titleData:"",state:1,paySceneLineShow:false}},computed:{isCps:function isCps(){if(this.brandColor!=="#8C7FEE"){return true}return false},renderRuleDetail:function renderRuleDetail(){var ruleDetailData=[];var ruleDetailConfig={};for(var i=0;i<this.renderData.length;i++){if(this.renderData[i].active){var payRule=this.renderData[i].payRule||[];for(var j=0;j<payRule.length;j++){if(payRule[j].active){var ruleDetail=payRule[j].ruleDetail||[];var res=this.transRuleDetail(ruleDetail);ruleDetailData=res.ruleDetailData;ruleDetailConfig=res.ruleDetailConfig;break}}}else{continue}}return{ruleDetailData,ruleDetailConfig}},selectPayTypeIndex:function selectPayTypeIndex(){for(var i=0;i<this.curPayRule.length;i++){if(this.curPayRule[i].active){return i}}return 0},payTypeWrapClass:function payTypeWrapClass(){var _context;return _concatInstanceProperty(_context="select-back-".concat(this.curPayRule.length,"-")).call(_context,this.selectPayTypeIndex)},renderPayIntroduct:function renderPayIntroduct(){var renderPayIntroduct2=[];for(var i=0;i<this.renderData.length;i++){if(this.renderData[i].active){var payRule=this.renderData[i].payRule||[];for(var j=0;j<payRule.length;j++){if(payRule[j].active&&payRule[j].payDesc&&utils_helpers.isArray(payRule[j].payDesc)){renderPayIntroduct2=payRule[j].payDesc}}}}return renderPayIntroduct2},payTypeShow:function payTypeShow(){return this.curPayRule.length>1}},methods:{close:function close(){this.hide();this.$emit("close")},reset:function reset(){this.titleData="";this.state=1},toSignIntroduct:function toSignIntroduct(){this.titleData="名词说明";this.state=2},toPayLimitShow:function toPayLimitShow(){this.titleData="";this.state=1},paySceneSelect:function paySceneSelect(renderData,index){for(var i=0;i<renderData.length;i++){if(index===i&&!renderData[i].active){this.curPayRule=renderData[i].payRule||[];this.refreshScroller();this.scrollToActiveTab()}renderData[i].active=index===i}},transRuleDetail:function transRuleDetail(ruleDetail){var _this=this;if(!(ruleDetail&&utils_helpers.isArray(ruleDetail)))return;var transData={};var ruleDetailData=[];var realLimitShow=false;var batchLimitShow=false;var signTypeShow=false;var realAndBatchRuleShow=false;_forEachInstanceProperty(ruleDetail).call(ruleDetail,function(item){var renderRow={payItemName:item.payItemName};renderRow.payItemType=item.payItemType||"";if(~~item.canReal===1){var _context2,_context3;realLimitShow=true;var oneText=Number(item.realRule.once)?"".concat(Number(item.realRule.once)/1e4,"万"):"无";var dayText=Number(item.realRule.day)?"".concat(Number(item.realRule.day)/1e4,"万"):"无";var monthText=Number(item.realRule.month)?"".concat(Number(item.realRule.month)/1e4,"万"):"无";renderRow.payItemRealRule=_concatInstanceProperty(_context2=_concatInstanceProperty(_context3="".concat(oneText,"/")).call(_context3,dayText,"/")).call(_context2,monthText)}else{renderRow.payItemRealRule="--"}if(~~item.canBatch===1){var _context4,_context5;batchLimitShow=true;var _oneText=Number(item.batchRule.once)?"".concat(Number(item.batchRule.once)/1e4,"万"):"无";var _dayText=Number(item.batchRule.day)?"".concat(Number(item.batchRule.day)/1e4,"万"):"无";var _monthText=Number(item.batchRule.month)?"".concat(Number(item.batchRule.month)/1e4,"万"):"无";renderRow.payItemBatchRule=_concatInstanceProperty(_context4=_concatInstanceProperty(_context5="".concat(_oneText,"/")).call(_context5,_dayText,"/")).call(_context4,_monthText)}else{renderRow.payItemBatchRule="--"}if(~~item.canReal&&~~item.canBatch&&item.rbDesc){realAndBatchRuleShow=true}if(item.rbDesc){var _context6,_context7;renderRow.rbDesc={showDesc:item.rbDesc.length>6?_concatInstanceProperty(_context6="".concat(_sliceInstanceProperty(_context7=item.rbDesc).call(_context7,0,6),'...<span style="color:')).call(_context6,_this.brandColor,';">></span>'):item.rbDesc,fullDesc:item.rbDesc,needShowFullDesc:item.rbDesc.length>6}}else{renderRow.rbDesc={showDesc:"--",needShowFullDesc:false}}if(~~item.needSign===1&&item.signType!=="流程内签约"){signTypeShow=true}if(~~item.needSign===1){renderRow.signType=item.signType}else{renderRow.signType="无"}if(transData[item.payItemCode]){transData[item.payItemCode].push(renderRow)}else{transData[item.payItemCode]=[renderRow]}});for(var key in transData){if(transData[key]){ruleDetailData.push(transData[key])}}return{ruleDetailData,ruleDetailConfig:{realLimitShow,batchLimitShow,signTypeShow,realAndBatchRuleShow}}},payTypeSelect:function payTypeSelect(curPayRule,index){for(var i=0;i<curPayRule.length;i++){if(index===i&&!curPayRule[i].active){this.refreshScroller()}curPayRule[i].active=index===i}},initRenderData:function initRenderData(){var _this2=this;var data2=utils_helpers.deepCopy(this.payLimitData);var renderSignDesc=[];var matchPayScene=_findIndexInstanceProperty(data2).call(data2,function(payData){return payData.payScene===_this2.defaultPayScene});matchPayScene=matchPayScene<0?0:matchPayScene;for(var i=0;i<data2.length;i++){this.$set(data2[i],"active",i===matchPayScene);var payRule=data2[i].payRule;if(i===matchPayScene){this.curPayRule=payRule}var matchPayType=_findIndexInstanceProperty(payRule).call(payRule,function(payData){return payData.payType===_this2.defaultPayType});matchPayType=matchPayType<0?0:matchPayType;var _loop=function _loop2(){_this2.$set(payRule[j],"active",i===matchPayScene?j===matchPayType:j===0);var ruleDetail=payRule[j].ruleDetail||[];var _loop22=function _loop23(k2){if(~~ruleDetail[k2].needSign!==1)return 1;var index=_findIndexInstanceProperty(renderSignDesc).call(renderSignDesc,function(item){return item.signType===ruleDetail[k2].signType&&item.signDesc===ruleDetail[k2].signDesc});if(index<0){renderSignDesc.push({signType:ruleDetail[k2].signType,signDesc:ruleDetail[k2].signDesc})}};for(var k=0;k<ruleDetail.length;k++){if(_loop22(k))continue}};for(var j=0;j<payRule.length;j++){_loop()}}this.renderSignDesc=renderSignDesc;this.renderData=data2},refreshScroller:function refreshScroller(){var _this3=this;if(this.scroller){this.$nextTick(function(){_this3.scroller.refresh();_this3.paySceneLineShow=false})}},scrollToActiveTab:function scrollToActiveTab(){var _this4=this;this.$nextTick(function(){var activeBars=_this4.$refs.activeBar;var slideBar=_this4.$refs.slideBar;if(!activeBars||!activeBars.length||!slideBar)return;var activeBar;for(var i=0;i<activeBars.length;i++){var _context8;if(_includesInstanceProperty(_context8=activeBars[i].className).call(_context8,"isActive")){activeBar=activeBars[i];break}}if(!activeBar)return;var offsetLeft=activeBar.offsetLeft;slideBar.style.transform="translateX(".concat(offsetLeft,"px)")})},throttle:function throttle(fn,delay,atleast){var timer;var previous;return function(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}var now=+new Date;if(!previous)previous=now;if(now-previous>atleast){fn.apply(void 0,args);previous=now}else{clearTimeout(timer);timer=setTimeout(function(){fn.apply(void 0,args)},delay)}}},handelScroll:function handelScroll(pos){if(Math.abs(pos.y)>=18){this.paySceneLineShow=true}else{this.paySceneLineShow=false}}},created:function created(){this.initRenderData()},watch:{isVisible:function isVisible(value){var _this5=this;if(value){this.scrollToActiveTab();this.$nextTick(function(){var limitIntroduct=_this5.$refs.limitIntroduct;if(limitIntroduct){if(!_this5.scroller){_this5.scroller=new BScroll.bScroll(limitIntroduct,{bounce:false,click:true,probeType:3});var scrollFunc=_this5.throttle(_this5.handelScroll,50,100);_this5.scroller.on("scroll",scrollFunc)}else{_this5.scroller.refresh();_this5.paySceneLineShow=false}}})}else{this.reset()}},defaultPayScene:function defaultPayScene(){this.initRenderData()}}};var _sfc_render=function render(){var _vm=this,_c=_vm._self._c;return _c("act-gold-layer",{attrs:{"visible":_vm.isVisible,"center":false,"title":_vm.titleData||_vm.title},on:{"close":_vm.close}},[_c("div",{staticClass:"return",attrs:{"slot":"headerLeft"},on:{"click":_vm.toPayLimitShow},slot:"headerLeft"},[_vm.state===2?_c("i",{staticClass:"return-icon"}):_vm._e()]),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.state===1,expression:"state === 1"}],staticClass:"limit-layer-body"},[_vm.renderData.length>1?_c("div",{staticClass:"pay-scene"},[_c("div",{ref:"slideBar",staticClass:"pay-scene-slide-bar",style:{"background-color":_vm.brandColor}}),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.paySceneLineShow,expression:"paySceneLineShow"}],staticClass:"pay-scene-line"}),_vm._l(_vm.renderData,function(item,index){return _c("div",{key:index,class:["pay-scene-tab",{"active":item.active}],on:{"click":function click($event){return _vm.paySceneSelect(_vm.renderData,index)}}},[_c("span",[_vm._v(" "+_vm._s(_vm.paySceneMap[item.payScene])+" ")]),_c("div",{ref:"activeBar",refInFor:true,class:["active-block",{"isActive":item.active}]})])})],2):_vm._e(),_c("div",{staticClass:"gradual-color"}),_c("div",{ref:"limitIntroduct",staticClass:"introduct-wrap"},[_c("div",{staticClass:"introduct-body"},[_c("div",{staticClass:"introduct"},[_vm.payTypeShow?_c("div",{class:["pay-type-wrap",_vm.payTypeWrapClass]},[_c("div",{staticClass:"pay-type"},_vm._l(_vm.curPayRule,function(item,index){return _c("div",{key:index,class:["pay-type-tab",{"active":item.active}],style:{"color":item.active?_vm.brandColor:""},on:{"click":function click($event){return _vm.payTypeSelect(_vm.curPayRule,index)}}},[_vm._v(" "+_vm._s(item.payTypeDesc||_vm.payTypeMap[item.payType])+" ")])}),0)]):_vm._e(),_c("div",{staticClass:"pay-introduct",style:{"padding-top":!_vm.payTypeShow?"16px":""}},[_c("p",{staticClass:"title"},[_vm._v(" 支付说明: ")]),_c("div",{staticClass:"pay-introduct-content"},[_vm._v(" *实际以支付页面展示的支付方式为准 ")]),_vm.renderPayIntroduct&&_vm.renderPayIntroduct.length?_vm._l(_vm.renderPayIntroduct,function(item,index){return _c("div",{key:index,staticClass:"pay-introduct-content"},[_c("span",[_vm._v(_vm._s(index+1)+"、")]),_c("p",[_vm._v(_vm._s(item))])])}):_vm._e()],2),_c("div",{staticClass:"pay-table-content"},[_vm.isVisible?_c("pay-table",{attrs:{"ruleDetailData":_vm.renderRuleDetail.ruleDetailData,"ruleDetailConfig":_vm.renderRuleDetail.ruleDetailConfig,"brandColor":_vm.brandColor},on:{"toSignIntroduct":_vm.toSignIntroduct}}):_vm._e()],1)])])])]),_c("sign-introduct",{attrs:{"visible":_vm.state===2,"renderSignDesc":_vm.renderSignDesc,"isCps":_vm.isCps}})],1)};var _sfc_staticRenderFns=[];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"882a85fc");var GoldPayLimitLayer=__component__.exports;GoldPayLimitLayer.install=function(Vue){Vue.component(GoldPayLimitLayer.name,GoldPayLimitLayer);Vue.prototype["$createGoldPayLimitLayer"]=utils_create.create(GoldPayLimitLayer,Vue)};exports.GoldPayLimitLayer=GoldPayLimitLayer;
1
+ "use strict";require('./style.css');var _concatInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/concat");var _forEachInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/for-each");var _sliceInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/slice");var _findIndexInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/find-index");var _includesInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/includes");var utils_create=require("../utils/create/index.js");var common_goldlayer=require("../common/goldlayer/index.js");var GoldPayLimitLayer_table=require("./table/index.js");var GoldPayLimitLayer_signIntroduct=require("./signIntroduct/index.js");var BScrollModule=require("better-scroll");var mixins_visible=require("../mixins/visible/index.js");var utils_helpers=require("../utils/helpers/index.js");var common=require("../common/index.js");var paySceneMap={1:"首期限额说明",2:"续期限额说明",3:"首期+续期限额说明"};var payTypeMap={1:"微信",2:"支付宝",3:"银联"};var _sfc_main={name:"ActGoldPayLimitLayer",mixins:[mixins_visible.visibleMixin],components:{ActGoldLayer:common_goldlayer.ActGoldLayer,payTable:GoldPayLimitLayer_table.payTable,signIntroduct:GoldPayLimitLayer_signIntroduct.signIntroduct},props:{title:{type:String,default:"支付限额说明"},brandColor:{type:String,default:"#8C7FEE"},btnColor:{type:String,default:"#8C7FEE"},payLimitData:{type:Array,default:function _default(){return[]}},defaultPayScene:{type:Number,default:1},defaultPayType:{type:Number,default:1}},data:function data(){return{paySceneMap,payTypeMap,activePaySceneIndex:0,activePayTypeIndex:0,curPayRule:[],renderData:[],renderSignDesc:[],titleData:"",state:1,paySceneLineShow:false}},computed:{isCps:function isCps(){if(this.brandColor!=="#8C7FEE"){return true}return false},renderRuleDetail:function renderRuleDetail(){var ruleDetailData=[];var ruleDetailConfig={};for(var i=0;i<this.renderData.length;i++){if(this.renderData[i].active){var payRule=this.renderData[i].payRule||[];for(var j=0;j<payRule.length;j++){if(payRule[j].active){var ruleDetail=payRule[j].ruleDetail||[];var res=this.transRuleDetail(ruleDetail);ruleDetailData=res.ruleDetailData;ruleDetailConfig=res.ruleDetailConfig;break}}}else{continue}}return{ruleDetailData,ruleDetailConfig}},selectPayTypeIndex:function selectPayTypeIndex(){for(var i=0;i<this.curPayRule.length;i++){if(this.curPayRule[i].active){return i}}return 0},payTypeWrapClass:function payTypeWrapClass(){var _context;return _concatInstanceProperty(_context="select-back-".concat(this.curPayRule.length,"-")).call(_context,this.selectPayTypeIndex)},renderPayIntroduct:function renderPayIntroduct(){var renderPayIntroduct2=[];for(var i=0;i<this.renderData.length;i++){if(this.renderData[i].active){var payRule=this.renderData[i].payRule||[];for(var j=0;j<payRule.length;j++){if(payRule[j].active&&payRule[j].payDesc&&utils_helpers.isArray(payRule[j].payDesc)){renderPayIntroduct2=payRule[j].payDesc}}}}return renderPayIntroduct2},payTypeShow:function payTypeShow(){return this.curPayRule.length>1}},methods:{close:function close(){this.hide();this.$emit("close")},reset:function reset(){this.titleData="";this.state=1},toSignIntroduct:function toSignIntroduct(){this.titleData="名词说明";this.state=2},toPayLimitShow:function toPayLimitShow(){this.titleData="";this.state=1},paySceneSelect:function paySceneSelect(renderData,index){for(var i=0;i<renderData.length;i++){if(index===i&&!renderData[i].active){this.curPayRule=renderData[i].payRule||[];this.refreshScroller();this.scrollToActiveTab()}renderData[i].active=index===i}},transRuleDetail:function transRuleDetail(ruleDetail){var _this=this;if(!(ruleDetail&&utils_helpers.isArray(ruleDetail)))return;var transData={};var ruleDetailData=[];var realLimitShow=false;var batchLimitShow=false;var signTypeShow=false;var realAndBatchRuleShow=false;_forEachInstanceProperty(ruleDetail).call(ruleDetail,function(item){var renderRow={payItemName:item.payItemName};renderRow.payItemType=item.payItemType||"";if(~~item.canReal===1){var _context2,_context3;realLimitShow=true;var oneText=Number(item.realRule.once)?"".concat(Number(item.realRule.once)/1e4,"万"):"无";var dayText=Number(item.realRule.day)?"".concat(Number(item.realRule.day)/1e4,"万"):"无";var monthText=Number(item.realRule.month)?"".concat(Number(item.realRule.month)/1e4,"万"):"无";renderRow.payItemRealRule=_concatInstanceProperty(_context2=_concatInstanceProperty(_context3="".concat(oneText,"/")).call(_context3,dayText,"/")).call(_context2,monthText)}else{renderRow.payItemRealRule="--"}if(~~item.canBatch===1){var _context4,_context5;batchLimitShow=true;var _oneText=Number(item.batchRule.once)?"".concat(Number(item.batchRule.once)/1e4,"万"):"无";var _dayText=Number(item.batchRule.day)?"".concat(Number(item.batchRule.day)/1e4,"万"):"无";var _monthText=Number(item.batchRule.month)?"".concat(Number(item.batchRule.month)/1e4,"万"):"无";renderRow.payItemBatchRule=_concatInstanceProperty(_context4=_concatInstanceProperty(_context5="".concat(_oneText,"/")).call(_context5,_dayText,"/")).call(_context4,_monthText)}else{renderRow.payItemBatchRule="--"}if(~~item.canReal&&~~item.canBatch&&item.rbDesc){realAndBatchRuleShow=true}if(item.rbDesc){var _context6,_context7;renderRow.rbDesc={showDesc:item.rbDesc.length>6?_concatInstanceProperty(_context6="".concat(_sliceInstanceProperty(_context7=item.rbDesc).call(_context7,0,6),'...<span style="color:')).call(_context6,_this.brandColor,';">></span>'):item.rbDesc,fullDesc:item.rbDesc,needShowFullDesc:item.rbDesc.length>6}}else{renderRow.rbDesc={showDesc:"--",needShowFullDesc:false}}if(~~item.needSign===1&&item.signType!=="流程内签约"){signTypeShow=true}if(~~item.needSign===1){renderRow.signType=item.signType}else{renderRow.signType="无"}if(transData[item.payItemCode]){transData[item.payItemCode].push(renderRow)}else{transData[item.payItemCode]=[renderRow]}});for(var key in transData){if(transData[key]){ruleDetailData.push(transData[key])}}return{ruleDetailData,ruleDetailConfig:{realLimitShow,batchLimitShow,signTypeShow,realAndBatchRuleShow}}},payTypeSelect:function payTypeSelect(curPayRule,index){for(var i=0;i<curPayRule.length;i++){if(index===i&&!curPayRule[i].active){this.refreshScroller()}curPayRule[i].active=index===i}},initRenderData:function initRenderData(){var _this2=this;var data2=utils_helpers.deepCopy(this.payLimitData);var renderSignDesc=[];var matchPayScene=_findIndexInstanceProperty(data2).call(data2,function(payData){return payData.payScene===_this2.defaultPayScene});matchPayScene=matchPayScene<0?0:matchPayScene;for(var i=0;i<data2.length;i++){this.$set(data2[i],"active",i===matchPayScene);var payRule=data2[i].payRule;if(i===matchPayScene){this.curPayRule=payRule}var matchPayType=_findIndexInstanceProperty(payRule).call(payRule,function(payData){return payData.payType===_this2.defaultPayType});matchPayType=matchPayType<0?0:matchPayType;var _loop=function _loop2(){_this2.$set(payRule[j],"active",i===matchPayScene?j===matchPayType:j===0);var ruleDetail=payRule[j].ruleDetail||[];var _loop22=function _loop23(k2){if(~~ruleDetail[k2].needSign!==1)return 1;var index=_findIndexInstanceProperty(renderSignDesc).call(renderSignDesc,function(item){return item.signType===ruleDetail[k2].signType&&item.signDesc===ruleDetail[k2].signDesc});if(index<0){renderSignDesc.push({signType:ruleDetail[k2].signType,signDesc:ruleDetail[k2].signDesc})}};for(var k=0;k<ruleDetail.length;k++){if(_loop22(k))continue}};for(var j=0;j<payRule.length;j++){_loop()}}this.renderSignDesc=renderSignDesc;this.renderData=data2},refreshScroller:function refreshScroller(){var _this3=this;if(this.scroller){this.$nextTick(function(){_this3.scroller.refresh();_this3.paySceneLineShow=false})}},scrollToActiveTab:function scrollToActiveTab(){var _this4=this;this.$nextTick(function(){var activeBars=_this4.$refs.activeBar;var slideBar=_this4.$refs.slideBar;if(!activeBars||!activeBars.length||!slideBar)return;var activeBar;for(var i=0;i<activeBars.length;i++){var _context8;if(_includesInstanceProperty(_context8=activeBars[i].className).call(_context8,"isActive")){activeBar=activeBars[i];break}}if(!activeBar)return;var offsetLeft=activeBar.offsetLeft;slideBar.style.transform="translateX(".concat(offsetLeft,"px)")})},throttle:function throttle(fn,delay,atleast){var timer;var previous;return function(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}var now=+new Date;if(!previous)previous=now;if(now-previous>atleast){fn.apply(void 0,args);previous=now}else{clearTimeout(timer);timer=setTimeout(function(){fn.apply(void 0,args)},delay)}}},handelScroll:function handelScroll(pos){if(Math.abs(pos.y)>=18){this.paySceneLineShow=true}else{this.paySceneLineShow=false}}},created:function created(){this.initRenderData()},watch:{isVisible:function isVisible(value){var _this5=this;if(value){this.scrollToActiveTab();this.$nextTick(function(){var limitIntroduct=_this5.$refs.limitIntroduct;if(limitIntroduct){if(!_this5.scroller){_this5.scroller=new BScrollModule(limitIntroduct,{bounce:false,click:true,probeType:3});var scrollFunc=_this5.throttle(_this5.handelScroll,50,100);_this5.scroller.on("scroll",scrollFunc)}else{_this5.scroller.refresh();_this5.paySceneLineShow=false}}})}else{this.reset()}},defaultPayScene:function defaultPayScene(){this.initRenderData()}}};var _sfc_render=function render(){var _vm=this,_c=_vm._self._c;return _c("act-gold-layer",{attrs:{"visible":_vm.isVisible,"center":false,"title":_vm.titleData||_vm.title},on:{"close":_vm.close}},[_c("div",{staticClass:"return",attrs:{"slot":"headerLeft"},on:{"click":_vm.toPayLimitShow},slot:"headerLeft"},[_vm.state===2?_c("i",{staticClass:"return-icon"}):_vm._e()]),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.state===1,expression:"state === 1"}],staticClass:"limit-layer-body"},[_vm.renderData.length>1?_c("div",{staticClass:"pay-scene"},[_c("div",{ref:"slideBar",staticClass:"pay-scene-slide-bar",style:{"background-color":_vm.brandColor}}),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.paySceneLineShow,expression:"paySceneLineShow"}],staticClass:"pay-scene-line"}),_vm._l(_vm.renderData,function(item,index){return _c("div",{key:index,class:["pay-scene-tab",{"active":item.active}],on:{"click":function click($event){return _vm.paySceneSelect(_vm.renderData,index)}}},[_c("span",[_vm._v(" "+_vm._s(_vm.paySceneMap[item.payScene])+" ")]),_c("div",{ref:"activeBar",refInFor:true,class:["active-block",{"isActive":item.active}]})])})],2):_vm._e(),_c("div",{staticClass:"gradual-color"}),_c("div",{ref:"limitIntroduct",staticClass:"introduct-wrap"},[_c("div",{staticClass:"introduct-body"},[_c("div",{staticClass:"introduct"},[_vm.payTypeShow?_c("div",{class:["pay-type-wrap",_vm.payTypeWrapClass]},[_c("div",{staticClass:"pay-type"},_vm._l(_vm.curPayRule,function(item,index){return _c("div",{key:index,class:["pay-type-tab",{"active":item.active}],style:{"color":item.active?_vm.brandColor:""},on:{"click":function click($event){return _vm.payTypeSelect(_vm.curPayRule,index)}}},[_vm._v(" "+_vm._s(item.payTypeDesc||_vm.payTypeMap[item.payType])+" ")])}),0)]):_vm._e(),_c("div",{staticClass:"pay-introduct",style:{"padding-top":!_vm.payTypeShow?"16px":""}},[_c("p",{staticClass:"title"},[_vm._v(" 支付说明: ")]),_c("div",{staticClass:"pay-introduct-content"},[_vm._v(" *实际以支付页面展示的支付方式为准 ")]),_vm.renderPayIntroduct&&_vm.renderPayIntroduct.length?_vm._l(_vm.renderPayIntroduct,function(item,index){return _c("div",{key:index,staticClass:"pay-introduct-content"},[_c("span",[_vm._v(_vm._s(index+1)+"、")]),_c("p",[_vm._v(_vm._s(item))])])}):_vm._e()],2),_c("div",{staticClass:"pay-table-content"},[_vm.isVisible?_c("pay-table",{attrs:{"ruleDetailData":_vm.renderRuleDetail.ruleDetailData,"ruleDetailConfig":_vm.renderRuleDetail.ruleDetailConfig,"brandColor":_vm.brandColor},on:{"toSignIntroduct":_vm.toSignIntroduct}}):_vm._e()],1)])])])]),_c("sign-introduct",{attrs:{"visible":_vm.state===2,"renderSignDesc":_vm.renderSignDesc,"isCps":_vm.isCps}})],1)};var _sfc_staticRenderFns=[];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"882a85fc");var GoldPayLimitLayer=__component__.exports;GoldPayLimitLayer.install=function(Vue){Vue.component(GoldPayLimitLayer.name,GoldPayLimitLayer);Vue.prototype["$createGoldPayLimitLayer"]=utils_create.create(GoldPayLimitLayer,Vue)};exports.GoldPayLimitLayer=GoldPayLimitLayer;
@@ -7,7 +7,7 @@ import { c as create } from "../utils/create/index.mjs";
7
7
  import { A as ActGoldLayer } from "../common/goldlayer/index.mjs";
8
8
  import { p as payTable } from "./table/index.mjs";
9
9
  import { s as signIntroduct } from "./signIntroduct/index.mjs";
10
- import { b as bScroll } from "../BScroll/index.mjs";
10
+ import BScrollModule__default from "better-scroll";
11
11
  import { v as visibleMixin } from "../mixins/visible/index.mjs";
12
12
  import { m as deepCopy, l as isArray } from "../utils/helpers/index.mjs";
13
13
  import { n as normalizeComponent } from "../common/index.mjs";
@@ -359,7 +359,7 @@ var _sfc_main = {
359
359
  var limitIntroduct = _this5.$refs.limitIntroduct;
360
360
  if (limitIntroduct) {
361
361
  if (!_this5.scroller) {
362
- _this5.scroller = new bScroll(limitIntroduct, {
362
+ _this5.scroller = new BScrollModule__default(limitIntroduct, {
363
363
  bounce: false,
364
364
  click: true,
365
365
  probeType: 3
@@ -1 +1 @@
1
- "use strict";require('./style.css');var BScroll=require("../../BScroll/index.js");var common=require("../../common/index.js");var _sfc_main={name:"PayLimitSignIntroduct",data:function data(){return{}},props:{renderSignDesc:{type:Array,default:function _default(){return[]}},visible:{type:Boolean,default:false},isCps:{type:Boolean,default:false}},methods:{initScroll:function initScroll(){var _this=this;this.$nextTick(function(){var signWrapper=_this.$refs.signWrapper;if(signWrapper){if(!_this.scroller){_this.scroller=new BScroll.bScroll(signWrapper,{bounce:false})}else{_this.scroller.refresh()}}})}},watch:{visible:function visible(value){if(value){this.initScroll()}}}};var _sfc_render=function render(){var _vm=this,_c=_vm._self._c;return _c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.visible,expression:"visible"}],staticClass:"sign-introduct"},[_c("div",{staticClass:"gradual-color"}),_c("div",{ref:"signWrapper",staticClass:"sign-introduct-body"},[_c("div",{staticClass:"sign-introduct-content"},[_c("div",{staticClass:"sign-introduct-items"},[_vm._l(_vm.renderSignDesc,function(item,index){return[_c("div",{key:"sing-introduct-item".concat(index),staticClass:"sign-introduct-item"},[_c("div",{staticClass:"head-title"},[_c("p",[_vm._v(_vm._s(item.signType))]),_c("div",{staticClass:"head-bg",class:{"cps":_vm.isCps}})]),_c("div",{staticClass:"bottom-line"}),_c("p",{staticClass:"content"},[_vm._v(" "+_vm._s(item.signDesc)+" ")])])]})],2)])])])};var _sfc_staticRenderFns=[];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"0c7b2c0b");var signIntroduct=__component__.exports;exports.signIntroduct=signIntroduct;
1
+ "use strict";require('./style.css');var BScrollModule=require("better-scroll");var common=require("../../common/index.js");var _sfc_main={name:"PayLimitSignIntroduct",data:function data(){return{}},props:{renderSignDesc:{type:Array,default:function _default(){return[]}},visible:{type:Boolean,default:false},isCps:{type:Boolean,default:false}},methods:{initScroll:function initScroll(){var _this=this;this.$nextTick(function(){var signWrapper=_this.$refs.signWrapper;if(signWrapper){if(!_this.scroller){_this.scroller=new BScrollModule(signWrapper,{bounce:false})}else{_this.scroller.refresh()}}})}},watch:{visible:function visible(value){if(value){this.initScroll()}}}};var _sfc_render=function render(){var _vm=this,_c=_vm._self._c;return _c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.visible,expression:"visible"}],staticClass:"sign-introduct"},[_c("div",{staticClass:"gradual-color"}),_c("div",{ref:"signWrapper",staticClass:"sign-introduct-body"},[_c("div",{staticClass:"sign-introduct-content"},[_c("div",{staticClass:"sign-introduct-items"},[_vm._l(_vm.renderSignDesc,function(item,index){return[_c("div",{key:"sing-introduct-item".concat(index),staticClass:"sign-introduct-item"},[_c("div",{staticClass:"head-title"},[_c("p",[_vm._v(_vm._s(item.signType))]),_c("div",{staticClass:"head-bg",class:{"cps":_vm.isCps}})]),_c("div",{staticClass:"bottom-line"}),_c("p",{staticClass:"content"},[_vm._v(" "+_vm._s(item.signDesc)+" ")])])]})],2)])])])};var _sfc_staticRenderFns=[];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"0c7b2c0b");var signIntroduct=__component__.exports;exports.signIntroduct=signIntroduct;
@@ -1,4 +1,4 @@
1
- import { b as bScroll } from "../../BScroll/index.mjs";
1
+ import BScrollModule__default from "better-scroll";
2
2
  import { n as normalizeComponent } from "../../common/index.mjs";
3
3
  import './style.css';var _sfc_main = {
4
4
  name: "PayLimitSignIntroduct",
@@ -30,7 +30,7 @@ import './style.css';var _sfc_main = {
30
30
  var signWrapper = _this.$refs.signWrapper;
31
31
  if (signWrapper) {
32
32
  if (!_this.scroller) {
33
- _this.scroller = new bScroll(signWrapper, {
33
+ _this.scroller = new BScrollModule__default(signWrapper, {
34
34
  bounce: false
35
35
  });
36
36
  } else {
@@ -1 +1 @@
1
- "use strict";require('./style.css');var BScroll=require("../../BScroll/index.js");var utils_helpers=require("../../utils/helpers/index.js");var __$_require_41378d9c__=require("../../assets/question.ce8a.png");var common=require("../../common/index.js");var _sfc_main={name:"PayLimitTable",props:{ruleDetailData:{type:Array,default:function _default(){return[]}},ruleDetailConfig:{type:Object,default:function _default2(){return[]}},brandColor:{type:String,default:"#8C7FEE"}},computed:{showTable:function showTable(){if(this.ruleDetailData&&utils_helpers.isArray(this.ruleDetailData)&&this.ruleDetailData.length){return true}return false}},data:function data(){return{dialog:null}},methods:{showFullDesc:function showFullDesc(rbDesc){if(rbDesc.needShowFullDesc){if(this.dialog){this.dialog.setData("",rbDesc.fullDesc)}else{this.dialog=this.$createGoldDialog({closable:true,content:rbDesc.fullDesc,showConfirmButton:false})}this.dialog.show()}},toSignIntroduct:function toSignIntroduct(){this.$emit("toSignIntroduct")}},watch:{ruleDetailData:{handler:function handler(value){var _this=this;if(value){this.$nextTick(function(){var tables=_this.$refs.payTable;if(tables){if(!_this.scroller){_this.scroller=new BScroll.bScroll(tables,{scrollX:true,scrollY:false,click:true,bounce:false})}else{_this.scroller.refresh()}}})}},immediate:true}}};var _sfc_render=function render(){var _vm=this,_c=_vm._self._c;return _c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.showTable,expression:"showTable"}],ref:"payTable",staticClass:"pay-table"},[_c("div",{staticStyle:{"display":"inline-block","padding":"0 12px","min-width":"100%"}},[_c("table",{staticClass:"pay-table-body"},[_c("thead",[_c("tr",[_c("th",{staticClass:"center"},[_vm._v(" 支付方式 ")]),_c("th",[_vm._v("支付类型")]),_vm.ruleDetailConfig.realLimitShow?_c("th",[_vm._v(" 单笔/单日/单月 "),_c("br"),_vm._v(" 实时限额 ")]):_vm._e(),_vm.ruleDetailConfig.batchLimitShow?_c("th",[_vm._v(" 单笔/单日/单月 "),_c("br"),_vm._v(" 非实时限额 ")]):_vm._e(),_vm.ruleDetailConfig.realAndBatchRuleShow?_c("th",[_vm._v(" 实时扣和 "),_c("br"),_vm._v(" 非实时扣款规则 ")]):_vm._e(),_vm.ruleDetailConfig.signTypeShow?_c("th",{staticClass:"with-icon",on:{"click":_vm.toSignIntroduct}},[_vm._m(0)]):_vm._e()])]),_c("tbody",[_vm._l(_vm.ruleDetailData,function(curGroupRuleDetail,i){return _vm._l(curGroupRuleDetail,function(curRuleDetail,j){return _c("tr",{key:i+j},[j===0?_c("td",{staticClass:"center",style:{"border-bottom":i===_vm.ruleDetailData.length-1?"none":""},attrs:{"rowspan":j===0?curGroupRuleDetail.length:1}},[_vm._v(" "+_vm._s(curRuleDetail.payItemName)+" ")]):_vm._e(),_c("td",[_vm._v(" "+_vm._s(curRuleDetail.payItemType)+" ")]),_vm.ruleDetailConfig.realLimitShow?_c("td",[_vm._v(" "+_vm._s(curRuleDetail.payItemRealRule)+" ")]):_vm._e(),_vm.ruleDetailConfig.batchLimitShow?_c("td",[_vm._v(" "+_vm._s(curRuleDetail.payItemBatchRule)+" ")]):_vm._e(),_vm.ruleDetailConfig.realAndBatchRuleShow?_c("td",{domProps:{"innerHTML":_vm._s(curRuleDetail.rbDesc.showDesc)},on:{"click":function click($event){return _vm.showFullDesc(curRuleDetail.rbDesc)}}}):_vm._e(),_vm.ruleDetailConfig.signTypeShow?_c("td",[_vm._v(" "+_vm._s(curRuleDetail.signType)+" ")]):_vm._e()])})})],2)])])])};var _sfc_staticRenderFns=[function(){var _vm=this,_c=_vm._self._c;return _c("div",[_vm._v(" 签约方式 "),_c("img",{attrs:{"src":__$_require_41378d9c__,"alt":""}})])}];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"7a638d25");var payTable=__component__.exports;exports.payTable=payTable;
1
+ "use strict";require('./style.css');var BScrollModule=require("better-scroll");var utils_helpers=require("../../utils/helpers/index.js");var __$_require_41378d9c__=require("../../assets/question.ce8a.png");var common=require("../../common/index.js");var _sfc_main={name:"PayLimitTable",props:{ruleDetailData:{type:Array,default:function _default(){return[]}},ruleDetailConfig:{type:Object,default:function _default2(){return[]}},brandColor:{type:String,default:"#8C7FEE"}},computed:{showTable:function showTable(){if(this.ruleDetailData&&utils_helpers.isArray(this.ruleDetailData)&&this.ruleDetailData.length){return true}return false}},data:function data(){return{dialog:null}},methods:{showFullDesc:function showFullDesc(rbDesc){if(rbDesc.needShowFullDesc){if(this.dialog){this.dialog.setData("",rbDesc.fullDesc)}else{this.dialog=this.$createGoldDialog({closable:true,content:rbDesc.fullDesc,showConfirmButton:false})}this.dialog.show()}},toSignIntroduct:function toSignIntroduct(){this.$emit("toSignIntroduct")}},watch:{ruleDetailData:{handler:function handler(value){var _this=this;if(value){this.$nextTick(function(){var tables=_this.$refs.payTable;if(tables){if(!_this.scroller){_this.scroller=new BScrollModule(tables,{scrollX:true,scrollY:false,click:true,bounce:false})}else{_this.scroller.refresh()}}})}},immediate:true}}};var _sfc_render=function render(){var _vm=this,_c=_vm._self._c;return _c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.showTable,expression:"showTable"}],ref:"payTable",staticClass:"pay-table"},[_c("div",{staticStyle:{"display":"inline-block","padding":"0 12px","min-width":"100%"}},[_c("table",{staticClass:"pay-table-body"},[_c("thead",[_c("tr",[_c("th",{staticClass:"center"},[_vm._v(" 支付方式 ")]),_c("th",[_vm._v("支付类型")]),_vm.ruleDetailConfig.realLimitShow?_c("th",[_vm._v(" 单笔/单日/单月 "),_c("br"),_vm._v(" 实时限额 ")]):_vm._e(),_vm.ruleDetailConfig.batchLimitShow?_c("th",[_vm._v(" 单笔/单日/单月 "),_c("br"),_vm._v(" 非实时限额 ")]):_vm._e(),_vm.ruleDetailConfig.realAndBatchRuleShow?_c("th",[_vm._v(" 实时扣和 "),_c("br"),_vm._v(" 非实时扣款规则 ")]):_vm._e(),_vm.ruleDetailConfig.signTypeShow?_c("th",{staticClass:"with-icon",on:{"click":_vm.toSignIntroduct}},[_vm._m(0)]):_vm._e()])]),_c("tbody",[_vm._l(_vm.ruleDetailData,function(curGroupRuleDetail,i){return _vm._l(curGroupRuleDetail,function(curRuleDetail,j){return _c("tr",{key:i+j},[j===0?_c("td",{staticClass:"center",style:{"border-bottom":i===_vm.ruleDetailData.length-1?"none":""},attrs:{"rowspan":j===0?curGroupRuleDetail.length:1}},[_vm._v(" "+_vm._s(curRuleDetail.payItemName)+" ")]):_vm._e(),_c("td",[_vm._v(" "+_vm._s(curRuleDetail.payItemType)+" ")]),_vm.ruleDetailConfig.realLimitShow?_c("td",[_vm._v(" "+_vm._s(curRuleDetail.payItemRealRule)+" ")]):_vm._e(),_vm.ruleDetailConfig.batchLimitShow?_c("td",[_vm._v(" "+_vm._s(curRuleDetail.payItemBatchRule)+" ")]):_vm._e(),_vm.ruleDetailConfig.realAndBatchRuleShow?_c("td",{domProps:{"innerHTML":_vm._s(curRuleDetail.rbDesc.showDesc)},on:{"click":function click($event){return _vm.showFullDesc(curRuleDetail.rbDesc)}}}):_vm._e(),_vm.ruleDetailConfig.signTypeShow?_c("td",[_vm._v(" "+_vm._s(curRuleDetail.signType)+" ")]):_vm._e()])})})],2)])])])};var _sfc_staticRenderFns=[function(){var _vm=this,_c=_vm._self._c;return _c("div",[_vm._v(" 签约方式 "),_c("img",{attrs:{"src":__$_require_41378d9c__,"alt":""}})])}];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"7a638d25");var payTable=__component__.exports;exports.payTable=payTable;
@@ -1,4 +1,4 @@
1
- import { b as bScroll } from "../../BScroll/index.mjs";
1
+ import BScrollModule__default from "better-scroll";
2
2
  import { l as isArray } from "../../utils/helpers/index.mjs";
3
3
  import __$_require_41378d9c__ from "../../assets/question.ce8a.png";
4
4
  import { n as normalizeComponent } from "../../common/index.mjs";
@@ -64,7 +64,7 @@ import './style.css';var _sfc_main = {
64
64
  var tables = _this.$refs.payTable;
65
65
  if (tables) {
66
66
  if (!_this.scroller) {
67
- _this.scroller = new bScroll(tables, {
67
+ _this.scroller = new BScrollModule__default(tables, {
68
68
  scrollX: true,
69
69
  scrollY: false,
70
70
  click: true,
@@ -1 +1 @@
1
- "use strict";var Vue=require("vue");var common=require("../../common/index.js");function isDef(val){return val!==void 0&&val!==null}var _sfc_main=Vue.defineComponent({props:{to:{type:[String,Object,Element]}},setup:function setup(props,_ref){var slots=_ref.slots;var container=document.body;var div=document.createElement("div");var vm=null;var resolveTarget=function resolveTarget2(){if(!isDef(props.to))return null;var target=Vue.unref(props.to);if(typeof target==="string"){var _document,_document$querySelect;return(_document=document)===null||_document===void 0||(_document$querySelect=_document.querySelector)===null||_document$querySelect===void 0?void 0:_document$querySelect.call(_document,target)}return target||null};var moveTo=function moveTo2(next){var target=next||document.body;if(!div)return;if(div.parentNode){div.parentNode.removeChild(div)}container=target;container.appendChild(div)};Vue.watch(resolveTarget,function(target){moveTo(target)},{immediate:true});Vue.onMounted(function(){vm=new Vue({el:div,render:function render(){var _slots$default;return(_slots$default=slots.default)===null||_slots$default===void 0?void 0:_slots$default.call(slots)[0]}})});Vue.onUnmounted(function(){if(vm){var _container;vm.$destroy();div&&((_container=container)===null||_container===void 0?void 0:_container.contains(div))&&container.removeChild(div);div=null;vm=null}});Vue.onUpdated(function(){var _vm;(_vm=vm)===null||_vm===void 0||_vm.$forceUpdate()});return function(){return null}}});var _sfc_render=null;var _sfc_staticRenderFns=null;var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,null);var xTeleport=__component__.exports;exports.xTeleport=xTeleport;
1
+ "use strict";var Vue=require("vue");var common=require("../../common/index.js");function isDef(val){return val!==void 0&&val!==null}var _sfc_main=Vue.defineComponent({name:"xTeleport",props:{to:{type:[String,Object,Element]}},setup:function setup(props,_ref){var slots=_ref.slots;var container=document.body;var div=document.createElement("div");var vm=null;var resolveTarget=function resolveTarget2(){if(!isDef(props.to))return null;var target=Vue.unref(props.to);if(typeof target==="string"){var _document,_document$querySelect;return(_document=document)===null||_document===void 0||(_document$querySelect=_document.querySelector)===null||_document$querySelect===void 0?void 0:_document$querySelect.call(_document,target)}return target||null};var moveTo=function moveTo2(next){var target=next||document.body;if(!div)return;if(div.parentNode){div.parentNode.removeChild(div)}container=target;container.appendChild(div)};Vue.watch(resolveTarget,function(target){moveTo(target)},{immediate:true});Vue.onMounted(function(){vm=new Vue({el:div,render:function render(){var _slots$default;return(_slots$default=slots.default)===null||_slots$default===void 0?void 0:_slots$default.call(slots)[0]}})});Vue.onUnmounted(function(){if(vm){var _container;vm.$destroy();div&&((_container=container)===null||_container===void 0?void 0:_container.contains(div))&&container.removeChild(div);div=null;vm=null}});Vue.onUpdated(function(){var _vm;(_vm=vm)===null||_vm===void 0||_vm.$forceUpdate()});return function(){return null}}});var _sfc_render=null;var _sfc_staticRenderFns=null;var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,null);var xTeleport=__component__.exports;exports.xTeleport=xTeleport;
@@ -4,8 +4,9 @@ function isDef(val) {
4
4
  return val !== void 0 && val !== null;
5
5
  }
6
6
  var _sfc_main = defineComponent({
7
+ name: "xTeleport",
7
8
  props: {
8
- // to 支持选择器 / DOM / ref,未命中时默认挂 body
9
+ // to 支持选择器 / DOM / ref,未命中时默认挂 body
9
10
  to: {
10
11
  type: [String, Object, Element]
11
12
  }
@@ -1 +1 @@
1
- "use strict";require('./style.css');var _Object$getOwnPropertySymbols=require("@babel/runtime-corejs3/core-js/object/get-own-property-symbols");var _Object$getOwnPropertyDescriptor=require("@babel/runtime-corejs3/core-js/object/get-own-property-descriptor");var _Object$getOwnPropertyDescriptors=require("@babel/runtime-corejs3/core-js/object/get-own-property-descriptors");var _Object$defineProperties=require("@babel/runtime-corejs3/core-js/object/define-properties");var _Object$defineProperty=require("@babel/runtime-corejs3/core-js/object/define-property");var _defineProperty=require("@babel/runtime-corejs3/helpers/defineProperty");var _toConsumableArray=require("@babel/runtime-corejs3/helpers/toConsumableArray");var _indexOfInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/index-of");var _filterInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/filter");var _forEachInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/for-each");var _concatInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/concat");var _mapInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/map");var _valuesInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/values");var _findIndexInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/find-index");var _Object$keys=require("@babel/runtime-corejs3/core-js/object/keys");function ownKeys(e,r){var t=_Object$keys(e);if(_Object$getOwnPropertySymbols){var o=_Object$getOwnPropertySymbols(e);r&&(o=_filterInstanceProperty(o).call(o,function(r2){return _Object$getOwnPropertyDescriptor(e,r2).enumerable})),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var _context11,_context12;var t=null!=arguments[r]?arguments[r]:{};r%2?_forEachInstanceProperty(_context11=ownKeys(Object(t),true)).call(_context11,function(r2){_defineProperty(e,r2,t[r2])}):_Object$getOwnPropertyDescriptors?_Object$defineProperties(e,_Object$getOwnPropertyDescriptors(t)):_forEachInstanceProperty(_context12=ownKeys(Object(t))).call(_context12,function(r2){_Object$defineProperty(e,r2,_Object$getOwnPropertyDescriptor(t,r2))})}return e}var utils_create=require("../utils/create/index.js");var common_goldlayer=require("../common/goldlayer/index.js");var Loading=require("../Loading/index.js");var BScroll=require("../BScroll/index.js");var MedicalListLayer_component_medicalList=require("./component/medicalList/index.js");var utils_helpers=require("../utils/helpers/index.js");var __$_require_263bdd0a__=require("../assets/icon-search.3c97.png");var __$_require_e9a2481a__=require("../assets/icon-close.b233.png");var __$_require_450b57d0__=require("../assets/icon-nodata.16b6.png");var __$_require_5419c642__=require("../assets/icon-nodata-cps.192f.png");var common=require("../common/index.js");var _sfc_main={name:"MedicalListLayer",data:function data(){return{selectValue:[],isVisible:false,searchKeyword:"",hasSearched:false,filterOptions:[],medicalList:[],totalCount:0,pageSize:20,currentPage:1,hasMore:false,loading:false,zIndex:999,firstFilters:[],activeFirstKey:"",isShowTagMenu:false,secondTagFilters:{},docmHeight:document.documentElement.clientHeight,pickerContentHeight:0,searchHeight:"",isShowActLoading:false}},components:{ActGoldLayer:common_goldlayer.ActGoldLayer,MedicalList:MedicalListLayer_component_medicalList.MedicalList,ActLoading:Loading.Loading},props:{paramsData:{type:Object,default:function _default(){return{}}},title:{type:String,default:"药品清单"},isCps:{type:Boolean,default:false},searchEmptyResultTips:{type:String,default:"找不到相关药品"},searchEmptyResultDesc:{type:String,default:"您可以更换一下药品名称搜索哦"},placeholder:{type:String,default:"请输入您要查询的药品名称"},brandColor:{type:String,default:"#8c7fee"}},created:function created(){var _this=this;var u=navigator.userAgent;if(_indexOfInstanceProperty(u).call(u,"Android")>-1||_indexOfInstanceProperty(u).call(u,"Adr")>-1){this.handleResize=function(){if(_this.pickerContentHeight===0){return}var showHeight=document.body.clientHeight;if(_this.docmHeight>showHeight){_this.$refs.pickerContent.style.height=_this.docmHeight-showHeight+"px";_this.searchHeight=_this.pickerContentHeight+showHeight-_this.docmHeight+"px"}else{_this.$refs.pickerContent.style.height=_this.pickerContentHeight+"px";_this.searchHeight="100%"}};window.addEventListener("resize",this.handleResize)}},beforeDestroy:function beforeDestroy(){if(this.handleResize){window.removeEventListener("resize",this.handleResize)}},methods:{maskClick:function maskClick(){this.closeDropdown();this.isVisible=false},cancel:function cancel(){this.isVisible=false},show:function show(){this.isVisible=true;if(!this.medicalList.length){this.initData()}else{this.refreshScroll()}},initData:function initData(){this.currentPage=1;this.medicalList=[];this.fetchData(true)},fetchData:function fetchData(){var _context,_this2=this;var init=arguments.length>0&&arguments[0]!==void 0?arguments[0]:false;var reset=arguments.length>1&&arguments[1]!==void 0?arguments[1]:false;if(this.loading)return;if(init){this.isShowActLoading=true}this.loading=true;var postData={filter:{},page:this.currentPage,showNum:20};for(var key in this.paramsData){var value=this.paramsData[key];if(value!==""&&value!=null&&value!==void 0){postData[key]=this.paramsData[key]}}if(this.searchKeyword){_filterInstanceProperty(postData).name=this.searchKeyword}_forEachInstanceProperty(_context=this.firstFilters).call(_context,function(filter){if(filter.selectedValue){_filterInstanceProperty(postData)[filter.key]=filter.selectedValue}});this.$fetch("/buy/getMedicineList",postData).then(function(res){var ret=res.ret,errmsg=res.errmsg,data2=res.data;if(+ret===0){if(reset){_this2.medicalList=[];_this2.scrollTop()}var newList=data2.list||[];_this2.totalCount=Number(data2.count)||0;_this2.transformMedicalList(newList);_this2.hasMore=_this2.medicalList.length<_this2.totalCount;_this2.loading=false;if(!_this2.filterOptions||!_this2.filterOptions.length){_this2.filterOptions=data2.filterLabels||[];_this2.transformFilterOptions()}_this2.refreshScroll()}else{_this2.$toast.show(errmsg)}}).catch(function(err){}).finally(function(){_this2.loading=false;_this2.isShowActLoading=false;_this2.hasSearched=true})},transformMedicalList:function transformMedicalList(list){var _context2;var color=this.isCps?"#F05A4B":"#8C7FEE";if(this.searchKeyword){var reg=new RegExp("(".concat(this.searchKeyword,")"),"g");_forEachInstanceProperty(list).call(list,function(item){item.name=item.name.replace(reg,'<span style="color: '.concat(color,';">$1</span>'))})}this.medicalList=_concatInstanceProperty(_context2=[]).call(_context2,_toConsumableArray(this.medicalList),_toConsumableArray(list))},transformFilterOptions:function transformFilterOptions(){var _context3,_context4,_this3=this;this.firstFilters=_mapInstanceProperty(_context3=this.filterOptions).call(_context3,function(filter){return _objectSpread(_objectSpread({},filter),{},{selectedValue:"",selectedText:""})});this.secondTagFilters={};_forEachInstanceProperty(_context4=this.filterOptions).call(_context4,function(filter){var _context5;var key=filter.key;var values=_mapInstanceProperty(_context5=_valuesInstanceProperty(filter)).call(_context5,function(value){return _objectSpread(_objectSpread({},value),{},{actived:false})});values.unshift({value:"",text:"全部",actived:true});_this3.secondTagFilters[key]=values})},closeDropdown:function closeDropdown(){this.isShowTagMenu=false},isOptionSelected:function isOptionSelected(option){return option.actived},toggleDropdown:function toggleDropdown(item){if(this.activeFirstKey===item.key){this.isShowTagMenu=!this.isShowTagMenu;if(!this.isShowTagMenu){this.activeFirstKey=""}}else{this.isShowTagMenu=true;this.activeFirstKey=item.key}},selectOption:function selectOption(option){var _context6,_this4=this;var filterIndex=_findIndexInstanceProperty(_context6=this.firstFilters).call(_context6,function(item){return item.key===_this4.activeFirstKey});if(filterIndex!==-1){this.firstFilters[filterIndex].selectedValue=option.value;this.firstFilters[filterIndex].selectedText=option.text;if(this.secondTagFilters[this.activeFirstKey]){var _context7;_forEachInstanceProperty(_context7=this.secondTagFilters[this.activeFirstKey]).call(_context7,function(item){item.actived=item.value===option.value})}}this.activeFirstKey=null;this.isShowTagMenu=false;this.resetSearch()},getDisplayText:function getDisplayText(item){return item.selectedValue?item.selectedText:item.text},getFilterValues:function getFilterValues(){var _context8;return _mapInstanceProperty(_context8=this.firstFilters).call(_context8,function(filter){return{key:filter.key,selectedValue:filter.selectedOption?filter.selectedOption.value:null}})},loadMore:function loadMore(){if(!this.hasMore||this.loading)return;this.currentPage++;this.fetchData()},handleSearch:function handleSearch(){var _context9,_context0,_this5=this;_forEachInstanceProperty(_context9=this.firstFilters).call(_context9,function(filter){filter.selectedValue="";filter.selectedText=""});_forEachInstanceProperty(_context0=_Object$keys(this.secondTagFilters)).call(_context0,function(key){var _context1;_forEachInstanceProperty(_context1=_this5.secondTagFilters[key]).call(_context1,function(item){item.actived=item.value===""})});this.resetSearch()},clear:function clear(){this.searchKeyword="";this.resetSearch()},resetSearch:function resetSearch(){this.currentPage=1;this.fetchData(false,true)},refreshScroll:function refreshScroll(){var _this6=this;this.$nextTick(function(){if(!_this6.scroll){_this6.scroll=new BScroll.bScroll(_this6.$refs.medicalList,{click:true,damping:.6});_this6.scroll.on("scrollEnd",function(){if(_this6.scroll.y<=_this6.scroll.maxScrollY+50){if(_this6.hasMore&&!_this6.loading){_this6.loadMore()}}})}else{_this6.scroll.refresh()}})},scrollTop:function scrollTop(){this.scroll.scrollTo(0,0,300)}},watch:{isVisible:function isVisible(newVal){var _this7=this;if(!this.pickerContentHeight&&newVal){this.$nextTick(function(){_this7.pickerContentHeight=utils_helpers.outerHeight(_this7.$refs.pickerContent)})}}}};var _sfc_render=function render(){var _vm=this,_c=_vm._self._c;return _c("div",{staticClass:"layer-wrap"},[_c("act-gold-layer",{attrs:{"visible":_vm.isVisible,"title":_vm.title,"center":false,"mask":true,"zIndex":_vm.zIndex},on:{"close":_vm.maskClick}},[_c("div",{ref:"pickerContent",staticClass:"picker-content"},[_c("div",{staticClass:"content",on:{"click":_vm.closeDropdown}},[_c("div",{staticClass:"gradual-color"}),_c("div",{staticClass:"header-box"},[_c("form",{staticClass:"search-box",on:{"submit":function submit($event){$event.preventDefault();return _vm.handleSearch.apply(null,arguments)}}},[_c("img",{staticClass:"search-icon",attrs:{"src":__$_require_263bdd0a__,"alt":""}}),_c("input",{directives:[{name:"model",rawName:"v-model",value:_vm.searchKeyword,expression:"searchKeyword"}],attrs:{"type":"text","placeholder":_vm.placeholder},domProps:{"value":_vm.searchKeyword},on:{"keyup":function keyup($event){var _context10;if(!_indexOfInstanceProperty(_context10=$event.type).call(_context10,"key")&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter"))return null;return _vm.handleSearch.apply(null,arguments)},"input":function input($event){if($event.target.composing)return;_vm.searchKeyword=$event.target.value}}}),_vm.searchKeyword?_c("img",{staticClass:"close-icon",attrs:{"src":__$_require_e9a2481a__,"alt":""},on:{"click":_vm.clear}}):_vm._e(),_c("button",{staticStyle:{"display":"none"},attrs:{"type":"submit"}},[_vm._v("搜索")])])]),_c("div",{staticClass:"search-content"},[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.firstFilters&&_vm.firstFilters.length,expression:"firstFilters && firstFilters.length"}],staticClass:"search-tags-content",on:{"click":function click($event){$event.stopPropagation()}}},[_c("div",{staticClass:"search-tags-first"},_vm._l(_vm.firstFilters,function(item,index){return _c("div",{key:item.key,staticClass:"filter-item",on:{"click":function click($event){return _vm.toggleDropdown(item,index)}}},[_c("span",{class:{"active":item.selectedValue,"cps":_vm.isCps}},[_vm._v(_vm._s(_vm.getDisplayText(item)))]),_c("i",{class:["arrow-icon",_vm.activeFirstKey===item.key?"up":"down"]})])}),0),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.isShowTagMenu,expression:"isShowTagMenu"}],staticClass:"search-tags-second dropdown-menu"},[_c("div",{staticClass:"dropdown-menu-container"},_vm._l(_vm.secondTagFilters[_vm.activeFirstKey],function(option){return _c("div",{key:option.value,staticClass:"dropdown-item",class:{"active":_vm.isOptionSelected(option),"cps":_vm.isCps},on:{"click":function click($event){return _vm.selectOption(option)}}},[_vm._v(" "+_vm._s(option.text)+" ")])}),0)])]),_c("div",{staticStyle:{"height":"4.5rem","width":"100%"}}),_c("div",{staticClass:"table-scroll-bg",style:"height: ".concat(5*_vm.medicalList.length,"rem")}),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.medicalList&&_vm.medicalList.length,expression:"medicalList && medicalList.length"}],ref:"medicalList",staticClass:"medical-list-scroll"},[_c("div",{staticClass:"scroll-content"},[_c("div",{staticClass:"scroll-list"},[_c("medical-list",{attrs:{"list":_vm.medicalList}}),_vm.hasMore?_c("div",{staticClass:"load-more",on:{"click":_vm.loadMore}},[_vm._v(" 滑动加载更多 ")]):_vm._e()],1),_c("div",{staticStyle:{"height":"3.2rem","width":"100%"}})])]),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.hasSearched&&_vm.medicalList.length===0,expression:"hasSearched && medicalList.length === 0"}],staticClass:"search-empty"},[!_vm.isCps?_c("img",{attrs:{"src":__$_require_450b57d0__}}):_c("img",{attrs:{"src":__$_require_5419c642__}}),_c("h4",{staticClass:"tip"},[_vm._v(_vm._s(_vm.searchEmptyResultTips))]),_c("p",{staticClass:"desc"},[_vm._v(_vm._s(_vm.searchEmptyResultDesc))])]),_vm.isShowActLoading?_c("div",{staticClass:"loading"},[_c("act-loading",{directives:[{name:"show",rawName:"v-show",value:true,expression:"true"}],attrs:{"type":"cir3","color":_vm.brandColor,"size":35}})],1):_vm._e()])])])])],1)};var _sfc_staticRenderFns=[];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"fd644c7c");var MedicalListLayer=__component__.exports;MedicalListLayer.install=function(Vue){Vue.component(MedicalListLayer.name,MedicalListLayer);Vue.prototype["$createMedicalListLayer"]=utils_create.create(MedicalListLayer,Vue)};exports.MedicalListLayer=MedicalListLayer;
1
+ "use strict";require('./style.css');var _Object$getOwnPropertySymbols=require("@babel/runtime-corejs3/core-js/object/get-own-property-symbols");var _Object$getOwnPropertyDescriptor=require("@babel/runtime-corejs3/core-js/object/get-own-property-descriptor");var _Object$getOwnPropertyDescriptors=require("@babel/runtime-corejs3/core-js/object/get-own-property-descriptors");var _Object$defineProperties=require("@babel/runtime-corejs3/core-js/object/define-properties");var _Object$defineProperty=require("@babel/runtime-corejs3/core-js/object/define-property");var _defineProperty=require("@babel/runtime-corejs3/helpers/defineProperty");var _toConsumableArray=require("@babel/runtime-corejs3/helpers/toConsumableArray");var _indexOfInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/index-of");var _filterInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/filter");var _forEachInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/for-each");var _concatInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/concat");var _mapInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/map");var _valuesInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/values");var _findIndexInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/find-index");var _Object$keys=require("@babel/runtime-corejs3/core-js/object/keys");function ownKeys(e,r){var t=_Object$keys(e);if(_Object$getOwnPropertySymbols){var o=_Object$getOwnPropertySymbols(e);r&&(o=_filterInstanceProperty(o).call(o,function(r2){return _Object$getOwnPropertyDescriptor(e,r2).enumerable})),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var _context11,_context12;var t=null!=arguments[r]?arguments[r]:{};r%2?_forEachInstanceProperty(_context11=ownKeys(Object(t),true)).call(_context11,function(r2){_defineProperty(e,r2,t[r2])}):_Object$getOwnPropertyDescriptors?_Object$defineProperties(e,_Object$getOwnPropertyDescriptors(t)):_forEachInstanceProperty(_context12=ownKeys(Object(t))).call(_context12,function(r2){_Object$defineProperty(e,r2,_Object$getOwnPropertyDescriptor(t,r2))})}return e}var utils_create=require("../utils/create/index.js");var common_goldlayer=require("../common/goldlayer/index.js");var Loading=require("../Loading/index.js");var BScrollModule=require("better-scroll");var MedicalListLayer_component_medicalList=require("./component/medicalList/index.js");var utils_helpers=require("../utils/helpers/index.js");var __$_require_263bdd0a__=require("../assets/icon-search.3c97.png");var __$_require_e9a2481a__=require("../assets/icon-close.b233.png");var __$_require_450b57d0__=require("../assets/icon-nodata.16b6.png");var __$_require_5419c642__=require("../assets/icon-nodata-cps.192f.png");var common=require("../common/index.js");var _sfc_main={name:"MedicalListLayer",data:function data(){return{selectValue:[],isVisible:false,searchKeyword:"",hasSearched:false,filterOptions:[],medicalList:[],totalCount:0,pageSize:20,currentPage:1,hasMore:false,loading:false,zIndex:999,firstFilters:[],activeFirstKey:"",isShowTagMenu:false,secondTagFilters:{},docmHeight:document.documentElement.clientHeight,pickerContentHeight:0,searchHeight:"",isShowActLoading:false}},components:{ActGoldLayer:common_goldlayer.ActGoldLayer,MedicalList:MedicalListLayer_component_medicalList.MedicalList,ActLoading:Loading.Loading},props:{paramsData:{type:Object,default:function _default(){return{}}},title:{type:String,default:"药品清单"},isCps:{type:Boolean,default:false},searchEmptyResultTips:{type:String,default:"找不到相关药品"},searchEmptyResultDesc:{type:String,default:"您可以更换一下药品名称搜索哦"},placeholder:{type:String,default:"请输入您要查询的药品名称"},brandColor:{type:String,default:"#8c7fee"}},created:function created(){var _this=this;var u=navigator.userAgent;if(_indexOfInstanceProperty(u).call(u,"Android")>-1||_indexOfInstanceProperty(u).call(u,"Adr")>-1){this.handleResize=function(){if(_this.pickerContentHeight===0){return}var showHeight=document.body.clientHeight;if(_this.docmHeight>showHeight){_this.$refs.pickerContent.style.height=_this.docmHeight-showHeight+"px";_this.searchHeight=_this.pickerContentHeight+showHeight-_this.docmHeight+"px"}else{_this.$refs.pickerContent.style.height=_this.pickerContentHeight+"px";_this.searchHeight="100%"}};window.addEventListener("resize",this.handleResize)}},beforeDestroy:function beforeDestroy(){if(this.handleResize){window.removeEventListener("resize",this.handleResize)}},methods:{maskClick:function maskClick(){this.closeDropdown();this.isVisible=false},cancel:function cancel(){this.isVisible=false},show:function show(){this.isVisible=true;if(!this.medicalList.length){this.initData()}else{this.refreshScroll()}},initData:function initData(){this.currentPage=1;this.medicalList=[];this.fetchData(true)},fetchData:function fetchData(){var _context,_this2=this;var init=arguments.length>0&&arguments[0]!==void 0?arguments[0]:false;var reset=arguments.length>1&&arguments[1]!==void 0?arguments[1]:false;if(this.loading)return;if(init){this.isShowActLoading=true}this.loading=true;var postData={filter:{},page:this.currentPage,showNum:20};for(var key in this.paramsData){var value=this.paramsData[key];if(value!==""&&value!=null&&value!==void 0){postData[key]=this.paramsData[key]}}if(this.searchKeyword){_filterInstanceProperty(postData).name=this.searchKeyword}_forEachInstanceProperty(_context=this.firstFilters).call(_context,function(filter){if(filter.selectedValue){_filterInstanceProperty(postData)[filter.key]=filter.selectedValue}});this.$fetch("/buy/getMedicineList",postData).then(function(res){var ret=res.ret,errmsg=res.errmsg,data2=res.data;if(+ret===0){if(reset){_this2.medicalList=[];_this2.scrollTop()}var newList=data2.list||[];_this2.totalCount=Number(data2.count)||0;_this2.transformMedicalList(newList);_this2.hasMore=_this2.medicalList.length<_this2.totalCount;_this2.loading=false;if(!_this2.filterOptions||!_this2.filterOptions.length){_this2.filterOptions=data2.filterLabels||[];_this2.transformFilterOptions()}_this2.refreshScroll()}else{_this2.$toast.show(errmsg)}}).catch(function(err){}).finally(function(){_this2.loading=false;_this2.isShowActLoading=false;_this2.hasSearched=true})},transformMedicalList:function transformMedicalList(list){var _context2;var color=this.isCps?"#F05A4B":"#8C7FEE";if(this.searchKeyword){var reg=new RegExp("(".concat(this.searchKeyword,")"),"g");_forEachInstanceProperty(list).call(list,function(item){item.name=item.name.replace(reg,'<span style="color: '.concat(color,';">$1</span>'))})}this.medicalList=_concatInstanceProperty(_context2=[]).call(_context2,_toConsumableArray(this.medicalList),_toConsumableArray(list))},transformFilterOptions:function transformFilterOptions(){var _context3,_context4,_this3=this;this.firstFilters=_mapInstanceProperty(_context3=this.filterOptions).call(_context3,function(filter){return _objectSpread(_objectSpread({},filter),{},{selectedValue:"",selectedText:""})});this.secondTagFilters={};_forEachInstanceProperty(_context4=this.filterOptions).call(_context4,function(filter){var _context5;var key=filter.key;var values=_mapInstanceProperty(_context5=_valuesInstanceProperty(filter)).call(_context5,function(value){return _objectSpread(_objectSpread({},value),{},{actived:false})});values.unshift({value:"",text:"全部",actived:true});_this3.secondTagFilters[key]=values})},closeDropdown:function closeDropdown(){this.isShowTagMenu=false},isOptionSelected:function isOptionSelected(option){return option.actived},toggleDropdown:function toggleDropdown(item){if(this.activeFirstKey===item.key){this.isShowTagMenu=!this.isShowTagMenu;if(!this.isShowTagMenu){this.activeFirstKey=""}}else{this.isShowTagMenu=true;this.activeFirstKey=item.key}},selectOption:function selectOption(option){var _context6,_this4=this;var filterIndex=_findIndexInstanceProperty(_context6=this.firstFilters).call(_context6,function(item){return item.key===_this4.activeFirstKey});if(filterIndex!==-1){this.firstFilters[filterIndex].selectedValue=option.value;this.firstFilters[filterIndex].selectedText=option.text;if(this.secondTagFilters[this.activeFirstKey]){var _context7;_forEachInstanceProperty(_context7=this.secondTagFilters[this.activeFirstKey]).call(_context7,function(item){item.actived=item.value===option.value})}}this.activeFirstKey=null;this.isShowTagMenu=false;this.resetSearch()},getDisplayText:function getDisplayText(item){return item.selectedValue?item.selectedText:item.text},getFilterValues:function getFilterValues(){var _context8;return _mapInstanceProperty(_context8=this.firstFilters).call(_context8,function(filter){return{key:filter.key,selectedValue:filter.selectedOption?filter.selectedOption.value:null}})},loadMore:function loadMore(){if(!this.hasMore||this.loading)return;this.currentPage++;this.fetchData()},handleSearch:function handleSearch(){var _context9,_context0,_this5=this;_forEachInstanceProperty(_context9=this.firstFilters).call(_context9,function(filter){filter.selectedValue="";filter.selectedText=""});_forEachInstanceProperty(_context0=_Object$keys(this.secondTagFilters)).call(_context0,function(key){var _context1;_forEachInstanceProperty(_context1=_this5.secondTagFilters[key]).call(_context1,function(item){item.actived=item.value===""})});this.resetSearch()},clear:function clear(){this.searchKeyword="";this.resetSearch()},resetSearch:function resetSearch(){this.currentPage=1;this.fetchData(false,true)},refreshScroll:function refreshScroll(){var _this6=this;this.$nextTick(function(){if(!_this6.scroll){_this6.scroll=new BScrollModule(_this6.$refs.medicalList,{click:true,damping:.6});_this6.scroll.on("scrollEnd",function(){if(_this6.scroll.y<=_this6.scroll.maxScrollY+50){if(_this6.hasMore&&!_this6.loading){_this6.loadMore()}}})}else{_this6.scroll.refresh()}})},scrollTop:function scrollTop(){this.scroll.scrollTo(0,0,300)}},watch:{isVisible:function isVisible(newVal){var _this7=this;if(!this.pickerContentHeight&&newVal){this.$nextTick(function(){_this7.pickerContentHeight=utils_helpers.outerHeight(_this7.$refs.pickerContent)})}}}};var _sfc_render=function render(){var _vm=this,_c=_vm._self._c;return _c("div",{staticClass:"layer-wrap"},[_c("act-gold-layer",{attrs:{"visible":_vm.isVisible,"title":_vm.title,"center":false,"mask":true,"zIndex":_vm.zIndex},on:{"close":_vm.maskClick}},[_c("div",{ref:"pickerContent",staticClass:"picker-content"},[_c("div",{staticClass:"content",on:{"click":_vm.closeDropdown}},[_c("div",{staticClass:"gradual-color"}),_c("div",{staticClass:"header-box"},[_c("form",{staticClass:"search-box",on:{"submit":function submit($event){$event.preventDefault();return _vm.handleSearch.apply(null,arguments)}}},[_c("img",{staticClass:"search-icon",attrs:{"src":__$_require_263bdd0a__,"alt":""}}),_c("input",{directives:[{name:"model",rawName:"v-model",value:_vm.searchKeyword,expression:"searchKeyword"}],attrs:{"type":"text","placeholder":_vm.placeholder},domProps:{"value":_vm.searchKeyword},on:{"keyup":function keyup($event){var _context10;if(!_indexOfInstanceProperty(_context10=$event.type).call(_context10,"key")&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter"))return null;return _vm.handleSearch.apply(null,arguments)},"input":function input($event){if($event.target.composing)return;_vm.searchKeyword=$event.target.value}}}),_vm.searchKeyword?_c("img",{staticClass:"close-icon",attrs:{"src":__$_require_e9a2481a__,"alt":""},on:{"click":_vm.clear}}):_vm._e(),_c("button",{staticStyle:{"display":"none"},attrs:{"type":"submit"}},[_vm._v("搜索")])])]),_c("div",{staticClass:"search-content"},[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.firstFilters&&_vm.firstFilters.length,expression:"firstFilters && firstFilters.length"}],staticClass:"search-tags-content",on:{"click":function click($event){$event.stopPropagation()}}},[_c("div",{staticClass:"search-tags-first"},_vm._l(_vm.firstFilters,function(item,index){return _c("div",{key:item.key,staticClass:"filter-item",on:{"click":function click($event){return _vm.toggleDropdown(item,index)}}},[_c("span",{class:{"active":item.selectedValue,"cps":_vm.isCps}},[_vm._v(_vm._s(_vm.getDisplayText(item)))]),_c("i",{class:["arrow-icon",_vm.activeFirstKey===item.key?"up":"down"]})])}),0),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.isShowTagMenu,expression:"isShowTagMenu"}],staticClass:"search-tags-second dropdown-menu"},[_c("div",{staticClass:"dropdown-menu-container"},_vm._l(_vm.secondTagFilters[_vm.activeFirstKey],function(option){return _c("div",{key:option.value,staticClass:"dropdown-item",class:{"active":_vm.isOptionSelected(option),"cps":_vm.isCps},on:{"click":function click($event){return _vm.selectOption(option)}}},[_vm._v(" "+_vm._s(option.text)+" ")])}),0)])]),_c("div",{staticStyle:{"height":"4.5rem","width":"100%"}}),_c("div",{staticClass:"table-scroll-bg",style:"height: ".concat(5*_vm.medicalList.length,"rem")}),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.medicalList&&_vm.medicalList.length,expression:"medicalList && medicalList.length"}],ref:"medicalList",staticClass:"medical-list-scroll"},[_c("div",{staticClass:"scroll-content"},[_c("div",{staticClass:"scroll-list"},[_c("medical-list",{attrs:{"list":_vm.medicalList}}),_vm.hasMore?_c("div",{staticClass:"load-more",on:{"click":_vm.loadMore}},[_vm._v(" 滑动加载更多 ")]):_vm._e()],1),_c("div",{staticStyle:{"height":"3.2rem","width":"100%"}})])]),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.hasSearched&&_vm.medicalList.length===0,expression:"hasSearched && medicalList.length === 0"}],staticClass:"search-empty"},[!_vm.isCps?_c("img",{attrs:{"src":__$_require_450b57d0__}}):_c("img",{attrs:{"src":__$_require_5419c642__}}),_c("h4",{staticClass:"tip"},[_vm._v(_vm._s(_vm.searchEmptyResultTips))]),_c("p",{staticClass:"desc"},[_vm._v(_vm._s(_vm.searchEmptyResultDesc))])]),_vm.isShowActLoading?_c("div",{staticClass:"loading"},[_c("act-loading",{directives:[{name:"show",rawName:"v-show",value:true,expression:"true"}],attrs:{"type":"cir3","color":_vm.brandColor,"size":35}})],1):_vm._e()])])])])],1)};var _sfc_staticRenderFns=[];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"fd644c7c");var MedicalListLayer=__component__.exports;MedicalListLayer.install=function(Vue){Vue.component(MedicalListLayer.name,MedicalListLayer);Vue.prototype["$createMedicalListLayer"]=utils_create.create(MedicalListLayer,Vue)};exports.MedicalListLayer=MedicalListLayer;
@@ -16,7 +16,7 @@ import _Object$keys from "@babel/runtime-corejs3/core-js/object/keys";
16
16
  import { c as create } from "../utils/create/index.mjs";
17
17
  import { A as ActGoldLayer } from "../common/goldlayer/index.mjs";
18
18
  import { L as Loading } from "../Loading/index.mjs";
19
- import { b as bScroll } from "../BScroll/index.mjs";
19
+ import BScrollModule__default from "better-scroll";
20
20
  import { M as MedicalList } from "./component/medicalList/index.mjs";
21
21
  import { o as outerHeight } from "../utils/helpers/index.mjs";
22
22
  import __$_require_263bdd0a__ from "../assets/icon-search.3c97.png";
@@ -338,7 +338,7 @@ var _sfc_main = {
338
338
  var _this6 = this;
339
339
  this.$nextTick(function() {
340
340
  if (!_this6.scroll) {
341
- _this6.scroll = new bScroll(_this6.$refs.medicalList, {
341
+ _this6.scroll = new BScrollModule__default(_this6.$refs.medicalList, {
342
342
  click: true,
343
343
  damping: 0.6
344
344
  });
@@ -1 +1 @@
1
- "use strict";require('./style.css');var _toConsumableArray=require("@babel/runtime-corejs3/helpers/toConsumableArray");var _sliceInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/slice");var _forEachInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/for-each");var _spliceInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/splice");var _everyInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/every");var utils_create=require("../utils/create/index.js");var BScroll=require("../BScroll/index.js");var common_popup=require("../common/popup/index.js");var mixins_popup=require("../mixins/popup/index.js");var mixins_noscroll=require("../mixins/noscroll/index.js");var mixins_basicPicker=require("../mixins/basic-picker/index.js");var mixins_picker=require("../mixins/picker/index.js");var mixins_visible=require("../mixins/visible/index.js");var utils_BScroll_constants=require("../utils/BScroll/constants/index.js");var common=require("../common/index.js");var EVENT_SELECT="select";var EVENT_VALUE_CHANGE="value-change";var EVENT_CANCEL="cancel";var EVENT_CHANGE="change";var _sfc_main={name:"ActPicker",mixins:[mixins_popup.popupMixin,mixins_visible.visibleMixin,mixins_basicPicker.basicPickerMixin,mixins_picker.pickerMixin,mixins_noscroll.noscrollMixin],props:{pending:{type:Boolean,default:false}},data:function data(){var _context;return{finalData:_sliceInstanceProperty(_context=this.data).call(_context)}},created:function created(){this._values=[];this._indexes=this.selectedIndex},methods:{confirm:function confirm(){if(!this._canConfirm()){return}this.hide();var changed=false;var pickerSelectedText=[];var length=this.finalData.length;var oldLength=this._values.length;if(oldLength!==length){changed=true;oldLength>length&&(this._values.length=this._indexes.length=length)}for(var i=0;i<length;i++){var index=this._getSelectIndex(this.wheels[i]);this._indexes[i]=index;var value=null;var text="";if(this.finalData[i].length){value=this.finalData[i][index][this.valueKey];text=this.finalData[i][index][this.textKey]}if(this._values[i]!==value){changed=true}this._values[i]=value;pickerSelectedText[i]=text}this.$emit(EVENT_SELECT,this._values,this._indexes,pickerSelectedText);if(changed){this.$emit(EVENT_VALUE_CHANGE,this._values,this._indexes,pickerSelectedText)}},maskClick:function maskClick(){this.maskClosable&&this.cancel()},cancel:function cancel(){this.hide();this.$emit(EVENT_CANCEL)},show:function show(){var _this=this;if(this.isVisible){return}this.isVisible=true;if(!this.wheels||this.dirty){this.$nextTick(function(){_this.wheels=_this.wheels||[];var wheelWrapper=_this.$refs.wheelWrapper;for(var i2=0;i2<_this.finalData.length;i2++){_this._createWheel(wheelWrapper,i2).enable();_this.wheels[i2].wheelTo(_this._indexes[i2])}_this.dirty&&_this._destroyExtraWheels();_this.dirty=false})}else{for(var i=0;i<this.finalData.length;i++){this.wheels[i].enable();this.wheels[i].wheelTo(this._indexes[i])}}},hide:function hide(){if(!this.isVisible){return}this.isVisible=false;for(var i=0;i<this.finalData.length;i++){this.wheels[i].disable()}},setData:function setData(data2,selectedIndex){var _this2=this;this._indexes=selectedIndex?_toConsumableArray(selectedIndex):[];this.finalData=_sliceInstanceProperty(data2).call(data2);if(this.isVisible){this.$nextTick(function(){var _context2;var wheelWrapper=_this2.$refs.wheelWrapper;_forEachInstanceProperty(_context2=_this2.finalData).call(_context2,function(item,i){_this2._createWheel(wheelWrapper,i);_this2.wheels[i].wheelTo(_this2._indexes[i])});_this2._destroyExtraWheels()})}else{this.dirty=true}},refill:function refill(datas){var _this3=this;var ret=[];if(!datas.length){return ret}_forEachInstanceProperty(datas).call(datas,function(data2,index){ret[index]=_this3.refillColumn(index,data2)});return ret},refillColumn:function refillColumn(index,data2){var _this4=this;var wheelWrapper=this.$refs.wheelWrapper;var scroll=wheelWrapper.children[index].querySelector(".act-picker-wheel-scroll");var wheel=this.wheels?this.wheels[index]:false;var dist=0;if(scroll&&wheel){var oldData=this.finalData[index];this.$set(this.finalData,index,data2);var selectedIndex=wheel.getSelectedIndex();if(oldData.length){var oldValue=oldData[selectedIndex][this.valueKey];for(var i=0;i<data2.length;i++){if(data2[i][this.valueKey]===oldValue){dist=i;break}}}this._indexes[index]=dist;this.$nextTick(function(){wheel=_this4._createWheel(wheelWrapper,index);wheel.wheelTo(dist)})}return dist},scrollTo:function scrollTo(index,dist){var wheel=this.wheels[index];this._indexes[index]=dist;wheel.wheelTo(dist)},refresh:function refresh(){var _this5=this;this.$nextTick(function(){var _context3;_forEachInstanceProperty(_context3=_this5.wheels).call(_context3,function(wheel){wheel.refresh()})})},_createWheel:function _createWheel(wheelWrapper,i){var _this6=this;if(!this.wheels[i]){var wheel=this.wheels[i]=new BScroll.bScroll(wheelWrapper.children[i],{wheel:{selectedIndex:this._indexes[i]||0,wheelWrapperClass:"act-picker-wheel-scroll",wheelItemClass:"act-picker-wheel-item"},swipeTime:this.swipeTime,observeDOM:false,useTransition:utils_BScroll_constants.USE_TRANSITION});wheel.on("scrollStart",function(){wheel.inScroll=true});wheel.on("scrollEnd",function(){_this6.$emit(EVENT_CHANGE,i,_this6._getSelectIndex(wheel));wheel.inScroll=false})}else{this.wheels[i].refresh()}return this.wheels[i]},_destroyExtraWheels:function _destroyExtraWheels(){var dataLength=this.finalData.length;if(this.wheels.length>dataLength){var _context4;var extraWheels=_spliceInstanceProperty(_context4=this.wheels).call(_context4,dataLength);_forEachInstanceProperty(extraWheels).call(extraWheels,function(wheel){wheel.destroy()})}},_canConfirm:function _canConfirm(){var _context5;return!this.pending&&_everyInstanceProperty(_context5=this.wheels).call(_context5,function(wheel){if(utils_BScroll_constants.USE_TRANSITION){return!wheel.isInTransition}return!(wheel.inScroll||wheel.isInTransition)})},_getFlexOrder:function _getFlexOrder(data2){if(data2[0]){return data2[0][this.orderKey]}return 0},_getSelectIndex:function _getSelectIndex(wheel){var y=wheel.y;var selectedIndex;if(utils_BScroll_constants.USE_TRANSITION){selectedIndex=wheel.getSelectedIndex()}else{if(y>wheel.minScrollY){selectedIndex=0}else if(y<wheel.maxScrollY){selectedIndex=wheel.items.length-1}else{selectedIndex=Math.round(Math.abs(y/wheel.itemHeight))}}return selectedIndex}},beforeDestroy:function beforeDestroy(){var _context6;this.wheels&&_forEachInstanceProperty(_context6=this.wheels).call(_context6,function(wheel){wheel.destroy()});this.wheels=null},components:{ActPopup:common_popup.ActPopup}};var _sfc_render=function render(){var _vm=this,_c=_vm._self._c;return _c("transition",{attrs:{"name":"act-picker-fade"}},[_c("act-popup",{directives:[{name:"show",rawName:"v-show",value:_vm.isVisible,expression:"isVisible"}],attrs:{"type":"picker","mask":true,"center":false,"topBorderRadius":true,"zIndex":_vm.zIndex},on:{"touchmove":function touchmove($event){$event.preventDefault()},"mask-click":_vm.maskClick}},[_c("transition",{attrs:{"name":"act-picker-move"}},[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.isVisible,expression:"isVisible"}],staticClass:"act-picker-panel",on:{"click":function click($event){$event.stopPropagation()}}},[_c("div",{staticClass:"act-picker-choose"},[_c("span",{staticClass:"act-picker-cancel",style:{color:_vm.cancelColor},on:{"click":_vm.cancel}},[_vm._v(_vm._s(_vm._cancelTxt))]),_c("span",{staticClass:"act-picker-confirm",style:{color:_vm.confirmColor},on:{"click":_vm.confirm}},[_vm._v(_vm._s(_vm._confirmTxt))]),_c("div",{staticClass:"act-picker-title-group"},[_c("h1",{staticClass:"act-picker-title",domProps:{"innerHTML":_vm._s(_vm.title)}}),_vm.subtitle?_c("h2",{staticClass:"act-picker-subtitle",domProps:{"innerHTML":_vm._s(_vm.subtitle)}}):_vm._e()])]),_c("div",{staticClass:"act-picker-content"},[_c("i",{staticClass:"border-bottom-1px"}),_c("i",{staticClass:"border-top-1px"}),_c("div",{ref:"wheelWrapper",staticClass:"act-picker-wheel-wrapper"},_vm._l(_vm.finalData,function(data2,index){return _c("div",{key:index,style:{order:_vm._getFlexOrder(data2)}},[_c("ul",{staticClass:"act-picker-wheel-scroll"},_vm._l(data2,function(item,id2){return _c("li",{key:id2,staticClass:"act-picker-wheel-item",domProps:{"innerHTML":_vm._s(item[_vm.textKey])}})}),0)])}),0)]),_c("div",{staticClass:"act-picker-footer"})])])],1)],1)};var _sfc_staticRenderFns=[];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"aa70d6e1");var Picker=__component__.exports;Picker.install=function(Vue){Vue.component(Picker.name,Picker);Vue.prototype["$createPicker"]=utils_create.create(Picker,Vue)};exports.Picker=Picker;
1
+ "use strict";require('./style.css');var _toConsumableArray=require("@babel/runtime-corejs3/helpers/toConsumableArray");var _sliceInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/slice");var _forEachInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/for-each");var _spliceInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/splice");var _everyInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/every");var utils_create=require("../utils/create/index.js");var BScrollModule=require("better-scroll");var common_popup=require("../common/popup/index.js");var mixins_popup=require("../mixins/popup/index.js");var mixins_noscroll=require("../mixins/noscroll/index.js");var mixins_basicPicker=require("../mixins/basic-picker/index.js");var mixins_picker=require("../mixins/picker/index.js");var mixins_visible=require("../mixins/visible/index.js");var utils_BScroll_constants=require("../utils/BScroll/constants/index.js");var common=require("../common/index.js");var EVENT_SELECT="select";var EVENT_VALUE_CHANGE="value-change";var EVENT_CANCEL="cancel";var EVENT_CHANGE="change";var _sfc_main={name:"ActPicker",mixins:[mixins_popup.popupMixin,mixins_visible.visibleMixin,mixins_basicPicker.basicPickerMixin,mixins_picker.pickerMixin,mixins_noscroll.noscrollMixin],props:{pending:{type:Boolean,default:false}},data:function data(){var _context;return{finalData:_sliceInstanceProperty(_context=this.data).call(_context)}},created:function created(){this._values=[];this._indexes=this.selectedIndex},methods:{confirm:function confirm(){if(!this._canConfirm()){return}this.hide();var changed=false;var pickerSelectedText=[];var length=this.finalData.length;var oldLength=this._values.length;if(oldLength!==length){changed=true;oldLength>length&&(this._values.length=this._indexes.length=length)}for(var i=0;i<length;i++){var index=this._getSelectIndex(this.wheels[i]);this._indexes[i]=index;var value=null;var text="";if(this.finalData[i].length){value=this.finalData[i][index][this.valueKey];text=this.finalData[i][index][this.textKey]}if(this._values[i]!==value){changed=true}this._values[i]=value;pickerSelectedText[i]=text}this.$emit(EVENT_SELECT,this._values,this._indexes,pickerSelectedText);if(changed){this.$emit(EVENT_VALUE_CHANGE,this._values,this._indexes,pickerSelectedText)}},maskClick:function maskClick(){this.maskClosable&&this.cancel()},cancel:function cancel(){this.hide();this.$emit(EVENT_CANCEL)},show:function show(){var _this=this;if(this.isVisible){return}this.isVisible=true;if(!this.wheels||this.dirty){this.$nextTick(function(){_this.wheels=_this.wheels||[];var wheelWrapper=_this.$refs.wheelWrapper;for(var i2=0;i2<_this.finalData.length;i2++){_this._createWheel(wheelWrapper,i2).enable();_this.wheels[i2].wheelTo(_this._indexes[i2])}_this.dirty&&_this._destroyExtraWheels();_this.dirty=false})}else{for(var i=0;i<this.finalData.length;i++){this.wheels[i].enable();this.wheels[i].wheelTo(this._indexes[i])}}},hide:function hide(){if(!this.isVisible){return}this.isVisible=false;for(var i=0;i<this.finalData.length;i++){this.wheels[i].disable()}},setData:function setData(data2,selectedIndex){var _this2=this;this._indexes=selectedIndex?_toConsumableArray(selectedIndex):[];this.finalData=_sliceInstanceProperty(data2).call(data2);if(this.isVisible){this.$nextTick(function(){var _context2;var wheelWrapper=_this2.$refs.wheelWrapper;_forEachInstanceProperty(_context2=_this2.finalData).call(_context2,function(item,i){_this2._createWheel(wheelWrapper,i);_this2.wheels[i].wheelTo(_this2._indexes[i])});_this2._destroyExtraWheels()})}else{this.dirty=true}},refill:function refill(datas){var _this3=this;var ret=[];if(!datas.length){return ret}_forEachInstanceProperty(datas).call(datas,function(data2,index){ret[index]=_this3.refillColumn(index,data2)});return ret},refillColumn:function refillColumn(index,data2){var _this4=this;var wheelWrapper=this.$refs.wheelWrapper;var scroll=wheelWrapper.children[index].querySelector(".act-picker-wheel-scroll");var wheel=this.wheels?this.wheels[index]:false;var dist=0;if(scroll&&wheel){var oldData=this.finalData[index];this.$set(this.finalData,index,data2);var selectedIndex=wheel.getSelectedIndex();if(oldData.length){var oldValue=oldData[selectedIndex][this.valueKey];for(var i=0;i<data2.length;i++){if(data2[i][this.valueKey]===oldValue){dist=i;break}}}this._indexes[index]=dist;this.$nextTick(function(){wheel=_this4._createWheel(wheelWrapper,index);wheel.wheelTo(dist)})}return dist},scrollTo:function scrollTo(index,dist){var wheel=this.wheels[index];this._indexes[index]=dist;wheel.wheelTo(dist)},refresh:function refresh(){var _this5=this;this.$nextTick(function(){var _context3;_forEachInstanceProperty(_context3=_this5.wheels).call(_context3,function(wheel){wheel.refresh()})})},_createWheel:function _createWheel(wheelWrapper,i){var _this6=this;if(!this.wheels[i]){var wheel=this.wheels[i]=new BScrollModule(wheelWrapper.children[i],{wheel:{selectedIndex:this._indexes[i]||0,wheelWrapperClass:"act-picker-wheel-scroll",wheelItemClass:"act-picker-wheel-item"},swipeTime:this.swipeTime,observeDOM:false,useTransition:utils_BScroll_constants.USE_TRANSITION});wheel.on("scrollStart",function(){wheel.inScroll=true});wheel.on("scrollEnd",function(){_this6.$emit(EVENT_CHANGE,i,_this6._getSelectIndex(wheel));wheel.inScroll=false})}else{this.wheels[i].refresh()}return this.wheels[i]},_destroyExtraWheels:function _destroyExtraWheels(){var dataLength=this.finalData.length;if(this.wheels.length>dataLength){var _context4;var extraWheels=_spliceInstanceProperty(_context4=this.wheels).call(_context4,dataLength);_forEachInstanceProperty(extraWheels).call(extraWheels,function(wheel){wheel.destroy()})}},_canConfirm:function _canConfirm(){var _context5;return!this.pending&&_everyInstanceProperty(_context5=this.wheels).call(_context5,function(wheel){if(utils_BScroll_constants.USE_TRANSITION){return!wheel.isInTransition}return!(wheel.inScroll||wheel.isInTransition)})},_getFlexOrder:function _getFlexOrder(data2){if(data2[0]){return data2[0][this.orderKey]}return 0},_getSelectIndex:function _getSelectIndex(wheel){var y=wheel.y;var selectedIndex;if(utils_BScroll_constants.USE_TRANSITION){selectedIndex=wheel.getSelectedIndex()}else{if(y>wheel.minScrollY){selectedIndex=0}else if(y<wheel.maxScrollY){selectedIndex=wheel.items.length-1}else{selectedIndex=Math.round(Math.abs(y/wheel.itemHeight))}}return selectedIndex}},beforeDestroy:function beforeDestroy(){var _context6;this.wheels&&_forEachInstanceProperty(_context6=this.wheels).call(_context6,function(wheel){wheel.destroy()});this.wheels=null},components:{ActPopup:common_popup.ActPopup}};var _sfc_render=function render(){var _vm=this,_c=_vm._self._c;return _c("transition",{attrs:{"name":"act-picker-fade"}},[_c("act-popup",{directives:[{name:"show",rawName:"v-show",value:_vm.isVisible,expression:"isVisible"}],attrs:{"type":"picker","mask":true,"center":false,"topBorderRadius":true,"zIndex":_vm.zIndex},on:{"touchmove":function touchmove($event){$event.preventDefault()},"mask-click":_vm.maskClick}},[_c("transition",{attrs:{"name":"act-picker-move"}},[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.isVisible,expression:"isVisible"}],staticClass:"act-picker-panel",on:{"click":function click($event){$event.stopPropagation()}}},[_c("div",{staticClass:"act-picker-choose"},[_c("span",{staticClass:"act-picker-cancel",style:{color:_vm.cancelColor},on:{"click":_vm.cancel}},[_vm._v(_vm._s(_vm._cancelTxt))]),_c("span",{staticClass:"act-picker-confirm",style:{color:_vm.confirmColor},on:{"click":_vm.confirm}},[_vm._v(_vm._s(_vm._confirmTxt))]),_c("div",{staticClass:"act-picker-title-group"},[_c("h1",{staticClass:"act-picker-title",domProps:{"innerHTML":_vm._s(_vm.title)}}),_vm.subtitle?_c("h2",{staticClass:"act-picker-subtitle",domProps:{"innerHTML":_vm._s(_vm.subtitle)}}):_vm._e()])]),_c("div",{staticClass:"act-picker-content"},[_c("i",{staticClass:"border-bottom-1px"}),_c("i",{staticClass:"border-top-1px"}),_c("div",{ref:"wheelWrapper",staticClass:"act-picker-wheel-wrapper"},_vm._l(_vm.finalData,function(data2,index){return _c("div",{key:index,style:{order:_vm._getFlexOrder(data2)}},[_c("ul",{staticClass:"act-picker-wheel-scroll"},_vm._l(data2,function(item,id2){return _c("li",{key:id2,staticClass:"act-picker-wheel-item",domProps:{"innerHTML":_vm._s(item[_vm.textKey])}})}),0)])}),0)]),_c("div",{staticClass:"act-picker-footer"})])])],1)],1)};var _sfc_staticRenderFns=[];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"aa70d6e1");var Picker=__component__.exports;Picker.install=function(Vue){Vue.component(Picker.name,Picker);Vue.prototype["$createPicker"]=utils_create.create(Picker,Vue)};exports.Picker=Picker;
@@ -4,7 +4,7 @@ import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js/instance/fo
4
4
  import _spliceInstanceProperty from "@babel/runtime-corejs3/core-js/instance/splice";
5
5
  import _everyInstanceProperty from "@babel/runtime-corejs3/core-js/instance/every";
6
6
  import { c as create } from "../utils/create/index.mjs";
7
- import { b as bScroll } from "../BScroll/index.mjs";
7
+ import BScrollModule__default from "better-scroll";
8
8
  import { A as ActPopup } from "../common/popup/index.mjs";
9
9
  import { p as popupMixin } from "../mixins/popup/index.mjs";
10
10
  import { n as noscrollMixin } from "../mixins/noscroll/index.mjs";
@@ -183,7 +183,7 @@ var _sfc_main = {
183
183
  _createWheel: function _createWheel(wheelWrapper, i) {
184
184
  var _this6 = this;
185
185
  if (!this.wheels[i]) {
186
- var wheel = this.wheels[i] = new bScroll(wheelWrapper.children[i], {
186
+ var wheel = this.wheels[i] = new BScrollModule__default(wheelWrapper.children[i], {
187
187
  wheel: {
188
188
  selectedIndex: this._indexes[i] || 0,
189
189
  wheelWrapperClass: "act-picker-wheel-scroll",
@@ -1 +1 @@
1
- "use strict";require('./style.css');var _toConsumableArray=require("@babel/runtime-corejs3/helpers/toConsumableArray");var _sliceInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/slice");var _findInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/find");var _includesInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/includes");var _JSON$stringify=require("@babel/runtime-corejs3/core-js/json/stringify");var _indexOfInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/index-of");var utils_create=require("../utils/create/index.js");var BScroll=require("../BScroll/index.js");var common_popup=require("../common/popup/index.js");var mixins_popup=require("../mixins/popup/index.js");var mixins_noscroll=require("../mixins/noscroll/index.js");var mixins_basicPicker=require("../mixins/basic-picker/index.js");var mixins_picker=require("../mixins/picker/index.js");var mixins_visible=require("../mixins/visible/index.js");var utils_BScroll_constants=require("../utils/BScroll/constants/index.js");var common=require("../common/index.js");var EVENT_SELECT="select";var EVENT_VALUE_CHANGE="value-change";var EVENT_CANCEL="cancel";var _sfc_main={name:"ActPickerLongText",mixins:[mixins_popup.popupMixin,mixins_visible.visibleMixin,mixins_basicPicker.basicPickerMixin,mixins_picker.pickerMixin,mixins_noscroll.noscrollMixin],props:{pending:{type:Boolean,default:false}},data:function data(){var _context;return{finalData:_sliceInstanceProperty(_context=this.data).call(_context),indexes:[],selectedIndexes:[],initialIndexes:[]}},watch:{data:{handler:function handler(){var _this=this;this.initData();this.$nextTick(function(){_this._initScroll()})},deep:true}},created:function created(){this.initData()},mounted:function mounted(){this._initScroll()},methods:{initData:function initData(){var _context2,_this2=this;if(!Array.isArray(this.selectedIndex)||!Array.isArray(this.data))return;var data2=this.data&&_sliceInstanceProperty(_context2=this.data).call(_context2);var valItem=data2&&_findInstanceProperty(data2).call(data2,function(item,index){var _context3;return _includesInstanceProperty(_context3=_this2.selectedIndex).call(_context3,index)});valItem&&(this._values=valItem[this.valueKey]?[valItem[this.valueKey]]:[]);this.indexes=this.selectedIndex||[];this.initialIndexes=_toConsumableArray(this.selectedIndex||[]);this.selectedIndexes=_toConsumableArray(this.selectedIndex||[])},confirm:function confirm(){if(!this._canConfirm()){return}this.hide();var changed=false;if(_JSON$stringify(this.indexes)!==_JSON$stringify(this.selectedIndexes)){changed=true;this.indexes=_toConsumableArray(this.selectedIndexes)}this.initialIndexes=_toConsumableArray(this.indexes);var emitIndex=_toConsumableArray(this.indexes);this.$emit(EVENT_SELECT,this._values,emitIndex,this.pickerSelectedText);if(changed){this.$emit(EVENT_VALUE_CHANGE,this._values,emitIndex,this.pickerSelectedText)}},maskClick:function maskClick(){this.maskClosable&&this.cancel()},cancel:function cancel(){this.hide();this.selectedIndexes=_toConsumableArray(this.initialIndexes);if(this.initialIndexes.length>0){var index=this.initialIndexes[0];var data2=this.data&&this.data[0];if(data2&&data2[index]){this._values=[data2[index][this.valueKey]];this.pickerSelectedText=[data2[index][this.textKey]]}}else{this._values=[];this.pickerSelectedText=[]}this.$emit(EVENT_CANCEL)},show:function show(){var _this3=this;if(this.isVisible){return}this.isVisible=true;this.selectedIndexes=_toConsumableArray(this.indexes);this.initialIndexes=_toConsumableArray(this.indexes);this.$nextTick(function(){_this3.refresh()})},hide:function hide(){if(!this.isVisible){return}this.isVisible=false},setData:function setData(data2){var selectedIndex=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];this.indexes=Array.isArray(selectedIndex)?_toConsumableArray(selectedIndex):[];data2&&(this.finalData=_sliceInstanceProperty(data2).call(data2));this.refresh()},refresh:function refresh(){var _this4=this;this.$nextTick(function(){if(_this4.scrollIns){_this4.scrollIns.refresh()}})},_initScroll:function _initScroll(){var _this5=this;if(this.scrollIns){this.scrollIns.destroy()}this.$nextTick(function(){if(!_this5.$refs.scrollWrapper){return}_this5.scrollIns=new BScroll.bScroll(_this5.$refs.scrollWrapper,{probeType:3,click:true,scrollY:true,scrollX:false,mouseWheel:{speed:20,invert:false},observeDOM:true,useTransition:utils_BScroll_constants.USE_TRANSITION,bounce:{top:true,bottom:true},momentum:true,deceleration:.001,swipeBounceTime:500,bounceTime:800});clearTimeout(_this5.refreshTimer);_this5.refreshTimer=setTimeout(function(){_this5.scrollIns&&_this5.scrollIns.refresh();_this5.refreshTimer=null},20)})},_destroyScroll:function _destroyScroll(){if(this.scrollIns){this.scrollIns.destroy();this.scrollIns=null}},_canConfirm:function _canConfirm(){return true},selectItem:function selectItem(itemIndex,item){var key=itemIndex;if(this.selectedIndexes.length===1&&this.selectedIndexes[0]===key){return}this.selectedIndexes=[key];this._values=[item[this.valueKey]];this.pickerSelectedText=[item[this.textKey]]},isSelected:function isSelected(itemIndex){var _context4;var key=itemIndex;return _indexOfInstanceProperty(_context4=this.selectedIndexes).call(_context4,key)>-1}},beforeDestroy:function beforeDestroy(){if(this.scrollIns){this.scrollIns.destroy();this.scrollIns=null}},components:{ActPopup:common_popup.ActPopup}};var _sfc_render=function render(){var _vm=this,_c=_vm._self._c;return _c("transition",{attrs:{"name":"act-picker-fade"}},[_c("act-popup",{directives:[{name:"show",rawName:"v-show",value:_vm.isVisible,expression:"isVisible"}],attrs:{"type":"picker","mask":true,"center":false,"topBorderRadius":true,"zIndex":_vm.zIndex},on:{"touchmove":function touchmove($event){$event.preventDefault()},"mask-click":_vm.maskClick}},[_c("transition",{attrs:{"name":"act-picker-move"}},[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.isVisible,expression:"isVisible"}],staticClass:"act-picker-panel",on:{"click":function click($event){$event.stopPropagation()}}},[_c("div",{staticClass:"act-picker-choose"},[_c("span",{staticClass:"act-picker-cancel",style:{color:_vm.cancelColor},on:{"click":_vm.cancel}},[_vm._v(_vm._s(_vm._cancelTxt))]),_c("span",{staticClass:"act-picker-confirm",style:{color:_vm.confirmColor},on:{"click":_vm.confirm}},[_vm._v(_vm._s(_vm._confirmTxt))]),_c("div",{staticClass:"act-picker-title-group"},[_c("h1",{staticClass:"act-picker-title",domProps:{"innerHTML":_vm._s(_vm.title)}}),_vm.subtitle?_c("h2",{staticClass:"act-picker-subtitle",domProps:{"innerHTML":_vm._s(_vm.subtitle)}}):_vm._e()])]),_c("div",{staticClass:"act-picker-content"},[_c("i",{staticClass:"border-bottom-1px"}),_c("i",{staticClass:"border-top-1px"}),_c("div",{ref:"scrollWrapper",staticClass:"act-picker-long-text-wrapper"},[_c("div",{staticClass:"act-picker-long-text-scroll"},_vm._l(_vm.finalData,function(data2,index){return _c("div",{key:index},[_c("ul",_vm._l(data2,function(item,id2){return _c("li",{key:id2,staticClass:"act-picker-long-text-item",class:{on:_vm.isSelected(id2)},on:{"click":function click($event){return _vm.selectItem(id2,item)}}},[_c("span",{staticClass:"act-picker-long-text-item-radio"}),_c("span",{staticClass:"act-picker-long-text-item-desc",domProps:{"textContent":_vm._s(item[_vm.textKey])}})])}),0)])}),0)])])])])],1)],1)};var _sfc_staticRenderFns=[];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"ccd8bf0f");var PickerLongText=__component__.exports;PickerLongText.install=function(Vue){Vue.component(PickerLongText.name,PickerLongText);Vue.prototype["$createPickerLongText"]=utils_create.create(PickerLongText,Vue)};exports.PickerLongText=PickerLongText;
1
+ "use strict";require('./style.css');var _toConsumableArray=require("@babel/runtime-corejs3/helpers/toConsumableArray");var _sliceInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/slice");var _findInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/find");var _includesInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/includes");var _JSON$stringify=require("@babel/runtime-corejs3/core-js/json/stringify");var _indexOfInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/index-of");var utils_create=require("../utils/create/index.js");var BScrollModule=require("better-scroll");var common_popup=require("../common/popup/index.js");var mixins_popup=require("../mixins/popup/index.js");var mixins_noscroll=require("../mixins/noscroll/index.js");var mixins_basicPicker=require("../mixins/basic-picker/index.js");var mixins_picker=require("../mixins/picker/index.js");var mixins_visible=require("../mixins/visible/index.js");var utils_BScroll_constants=require("../utils/BScroll/constants/index.js");var common=require("../common/index.js");var EVENT_SELECT="select";var EVENT_VALUE_CHANGE="value-change";var EVENT_CANCEL="cancel";var _sfc_main={name:"ActPickerLongText",mixins:[mixins_popup.popupMixin,mixins_visible.visibleMixin,mixins_basicPicker.basicPickerMixin,mixins_picker.pickerMixin,mixins_noscroll.noscrollMixin],props:{pending:{type:Boolean,default:false}},data:function data(){var _context;return{finalData:_sliceInstanceProperty(_context=this.data).call(_context),indexes:[],selectedIndexes:[],initialIndexes:[]}},watch:{data:{handler:function handler(){var _this=this;this.initData();this.$nextTick(function(){_this._initScroll()})},deep:true}},created:function created(){this.initData()},mounted:function mounted(){this._initScroll()},methods:{initData:function initData(){var _context2,_this2=this;if(!Array.isArray(this.selectedIndex)||!Array.isArray(this.data))return;var data2=this.data&&_sliceInstanceProperty(_context2=this.data).call(_context2);var valItem=data2&&_findInstanceProperty(data2).call(data2,function(item,index){var _context3;return _includesInstanceProperty(_context3=_this2.selectedIndex).call(_context3,index)});valItem&&(this._values=valItem[this.valueKey]?[valItem[this.valueKey]]:[]);this.indexes=this.selectedIndex||[];this.initialIndexes=_toConsumableArray(this.selectedIndex||[]);this.selectedIndexes=_toConsumableArray(this.selectedIndex||[])},confirm:function confirm(){if(!this._canConfirm()){return}this.hide();var changed=false;if(_JSON$stringify(this.indexes)!==_JSON$stringify(this.selectedIndexes)){changed=true;this.indexes=_toConsumableArray(this.selectedIndexes)}this.initialIndexes=_toConsumableArray(this.indexes);var emitIndex=_toConsumableArray(this.indexes);this.$emit(EVENT_SELECT,this._values,emitIndex,this.pickerSelectedText);if(changed){this.$emit(EVENT_VALUE_CHANGE,this._values,emitIndex,this.pickerSelectedText)}},maskClick:function maskClick(){this.maskClosable&&this.cancel()},cancel:function cancel(){this.hide();this.selectedIndexes=_toConsumableArray(this.initialIndexes);if(this.initialIndexes.length>0){var index=this.initialIndexes[0];var data2=this.data&&this.data[0];if(data2&&data2[index]){this._values=[data2[index][this.valueKey]];this.pickerSelectedText=[data2[index][this.textKey]]}}else{this._values=[];this.pickerSelectedText=[]}this.$emit(EVENT_CANCEL)},show:function show(){var _this3=this;if(this.isVisible){return}this.isVisible=true;this.selectedIndexes=_toConsumableArray(this.indexes);this.initialIndexes=_toConsumableArray(this.indexes);this.$nextTick(function(){_this3.refresh()})},hide:function hide(){if(!this.isVisible){return}this.isVisible=false},setData:function setData(data2){var selectedIndex=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];this.indexes=Array.isArray(selectedIndex)?_toConsumableArray(selectedIndex):[];data2&&(this.finalData=_sliceInstanceProperty(data2).call(data2));this.refresh()},refresh:function refresh(){var _this4=this;this.$nextTick(function(){if(_this4.scrollIns){_this4.scrollIns.refresh()}})},_initScroll:function _initScroll(){var _this5=this;if(this.scrollIns){this.scrollIns.destroy()}this.$nextTick(function(){if(!_this5.$refs.scrollWrapper){return}_this5.scrollIns=new BScrollModule(_this5.$refs.scrollWrapper,{probeType:3,click:true,scrollY:true,scrollX:false,mouseWheel:{speed:20,invert:false},observeDOM:true,useTransition:utils_BScroll_constants.USE_TRANSITION,bounce:{top:true,bottom:true},momentum:true,deceleration:.001,swipeBounceTime:500,bounceTime:800});clearTimeout(_this5.refreshTimer);_this5.refreshTimer=setTimeout(function(){_this5.scrollIns&&_this5.scrollIns.refresh();_this5.refreshTimer=null},20)})},_destroyScroll:function _destroyScroll(){if(this.scrollIns){this.scrollIns.destroy();this.scrollIns=null}},_canConfirm:function _canConfirm(){return true},selectItem:function selectItem(itemIndex,item){var key=itemIndex;if(this.selectedIndexes.length===1&&this.selectedIndexes[0]===key){return}this.selectedIndexes=[key];this._values=[item[this.valueKey]];this.pickerSelectedText=[item[this.textKey]]},isSelected:function isSelected(itemIndex){var _context4;var key=itemIndex;return _indexOfInstanceProperty(_context4=this.selectedIndexes).call(_context4,key)>-1}},beforeDestroy:function beforeDestroy(){if(this.scrollIns){this.scrollIns.destroy();this.scrollIns=null}},components:{ActPopup:common_popup.ActPopup}};var _sfc_render=function render(){var _vm=this,_c=_vm._self._c;return _c("transition",{attrs:{"name":"act-picker-fade"}},[_c("act-popup",{directives:[{name:"show",rawName:"v-show",value:_vm.isVisible,expression:"isVisible"}],attrs:{"type":"picker","mask":true,"center":false,"topBorderRadius":true,"zIndex":_vm.zIndex},on:{"touchmove":function touchmove($event){$event.preventDefault()},"mask-click":_vm.maskClick}},[_c("transition",{attrs:{"name":"act-picker-move"}},[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.isVisible,expression:"isVisible"}],staticClass:"act-picker-panel",on:{"click":function click($event){$event.stopPropagation()}}},[_c("div",{staticClass:"act-picker-choose"},[_c("span",{staticClass:"act-picker-cancel",style:{color:_vm.cancelColor},on:{"click":_vm.cancel}},[_vm._v(_vm._s(_vm._cancelTxt))]),_c("span",{staticClass:"act-picker-confirm",style:{color:_vm.confirmColor},on:{"click":_vm.confirm}},[_vm._v(_vm._s(_vm._confirmTxt))]),_c("div",{staticClass:"act-picker-title-group"},[_c("h1",{staticClass:"act-picker-title",domProps:{"innerHTML":_vm._s(_vm.title)}}),_vm.subtitle?_c("h2",{staticClass:"act-picker-subtitle",domProps:{"innerHTML":_vm._s(_vm.subtitle)}}):_vm._e()])]),_c("div",{staticClass:"act-picker-content"},[_c("i",{staticClass:"border-bottom-1px"}),_c("i",{staticClass:"border-top-1px"}),_c("div",{ref:"scrollWrapper",staticClass:"act-picker-long-text-wrapper"},[_c("div",{staticClass:"act-picker-long-text-scroll"},_vm._l(_vm.finalData,function(data2,index){return _c("div",{key:index},[_c("ul",_vm._l(data2,function(item,id2){return _c("li",{key:id2,staticClass:"act-picker-long-text-item",class:{on:_vm.isSelected(id2)},on:{"click":function click($event){return _vm.selectItem(id2,item)}}},[_c("span",{staticClass:"act-picker-long-text-item-radio"}),_c("span",{staticClass:"act-picker-long-text-item-desc",domProps:{"textContent":_vm._s(item[_vm.textKey])}})])}),0)])}),0)])])])])],1)],1)};var _sfc_staticRenderFns=[];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"ccd8bf0f");var PickerLongText=__component__.exports;PickerLongText.install=function(Vue){Vue.component(PickerLongText.name,PickerLongText);Vue.prototype["$createPickerLongText"]=utils_create.create(PickerLongText,Vue)};exports.PickerLongText=PickerLongText;
@@ -5,7 +5,7 @@ import _includesInstanceProperty from "@babel/runtime-corejs3/core-js/instance/i
5
5
  import _JSON$stringify from "@babel/runtime-corejs3/core-js/json/stringify";
6
6
  import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js/instance/index-of";
7
7
  import { c as create } from "../utils/create/index.mjs";
8
- import { b as bScroll } from "../BScroll/index.mjs";
8
+ import BScrollModule__default from "better-scroll";
9
9
  import { A as ActPopup } from "../common/popup/index.mjs";
10
10
  import { p as popupMixin } from "../mixins/popup/index.mjs";
11
11
  import { n as noscrollMixin } from "../mixins/noscroll/index.mjs";
@@ -146,7 +146,7 @@ var _sfc_main = {
146
146
  if (!_this5.$refs.scrollWrapper) {
147
147
  return;
148
148
  }
149
- _this5.scrollIns = new bScroll(_this5.$refs.scrollWrapper, {
149
+ _this5.scrollIns = new BScrollModule__default(_this5.$refs.scrollWrapper, {
150
150
  probeType: 3,
151
151
  click: true,
152
152
  scrollY: true,
@@ -1 +1 @@
1
- "use strict";require('./style.css');var _Object$getOwnPropertySymbols=require("@babel/runtime-corejs3/core-js/object/get-own-property-symbols");var _Object$getOwnPropertyDescriptor=require("@babel/runtime-corejs3/core-js/object/get-own-property-descriptor");var _Object$getOwnPropertyDescriptors=require("@babel/runtime-corejs3/core-js/object/get-own-property-descriptors");var _Object$defineProperties=require("@babel/runtime-corejs3/core-js/object/define-properties");var _Object$defineProperty=require("@babel/runtime-corejs3/core-js/object/define-property");var _objectWithoutProperties=require("@babel/runtime-corejs3/helpers/objectWithoutProperties");var _defineProperty=require("@babel/runtime-corejs3/helpers/defineProperty");var _toConsumableArray=require("@babel/runtime-corejs3/helpers/toConsumableArray");var _Map=require("@babel/runtime-corejs3/core-js/map");var _forEachInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/for-each");var _someInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/some");var _findIndexInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/find-index");var _includesInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/includes");var _Object$assign=require("@babel/runtime-corejs3/core-js/object/assign");var _parseInt=require("@babel/runtime-corejs3/core-js/parse-int");var _Object$keys=require("@babel/runtime-corejs3/core-js/object/keys");var _mapInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/map");var _filterInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/filter");var _Promise=require("@babel/runtime-corejs3/core-js/promise");var _findInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/find");var _sortInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/sort");var _Number$MAX_SAFE_INTEGER=require("@babel/runtime-corejs3/core-js/number/max-safe-integer");var _indexOfInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/index-of");var _concatInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/concat");var _sliceInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/slice");var _excluded=["order"];function ownKeys(e,r){var t=_Object$keys(e);if(_Object$getOwnPropertySymbols){var o=_Object$getOwnPropertySymbols(e);r&&(o=_filterInstanceProperty(o).call(o,function(r2){return _Object$getOwnPropertyDescriptor(e,r2).enumerable})),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var _context23,_context24;var t=null!=arguments[r]?arguments[r]:{};r%2?_forEachInstanceProperty(_context23=ownKeys(Object(t),true)).call(_context23,function(r2){_defineProperty(e,r2,t[r2])}):_Object$getOwnPropertyDescriptors?_Object$defineProperties(e,_Object$getOwnPropertyDescriptors(t)):_forEachInstanceProperty(_context24=ownKeys(Object(t))).call(_context24,function(r2){_Object$defineProperty(e,r2,_Object$getOwnPropertyDescriptor(t,r2))})}return e}var utils_create=require("../utils/create/index.js");var draggable=require("vuedraggable");var lodashEs=require("lodash-es");var PlanSubPlan=require("../PlanSubPlan/index.js");var common=require("../common/index.js");var RATE_TIP="假定分红实现率并非保险公司提供,仅用于保险专业人员个人对分红型产品未来的分红收益预估,并不能等于未来分红实际收益";var costTypeOrder=[14,5,6,34,35,45,46,20,47,48,21,22,42,27,3,23,28,37,38,39,4,40,41,15,16,36];var _sfc_main={name:"ActPlanSetting",props:{isMain:{type:Boolean,default:false},options:{type:Object,default:function _default(){return{}}},propData:{type:Object,default:function _default2(){return{}}}},components:{draggable,ActPlanSubPlan:PlanSubPlan.PlanSubPlan},data:function data(){return{quickList:[50,80,100],localOptions:lodashEs.cloneDeep(this.options),isRateShow:true,isShowSubPlan:false,tipDialog:null,errorMsg:"",selectedIndex:0,settingMap:{},productList:[],disableOptions:[14,5,6],curSetting:{dividendRate:"",modules:[],type:"table",subPlanList:[]}}},watch:{propData:{immediate:true,deep:true,handler:function handler(){this.initData()}},curSetting:{deep:true,handler:function handler2(val){if(this.curProduct&&this.curProduct.productId){this.updateSettingMap(val)}}}},computed:{curProduct:function curProduct(){return this.productList[this.selectedIndex]||{}},productOrder:function productOrder(){var _context;var order=new _Map;_forEachInstanceProperty(_context=this.productList).call(_context,function(item,index){order.set(item.gid,index)});return order},isShowSubPlanContent:function isShowSubPlanContent(){var costTable=this.propData.costTableMap[this.curProduct.productId];if(!costTable)return false;var _costTable$colsType=costTable.colsType,colsType=_costTable$colsType===void 0?[]:_costTable$colsType;var filerKeys=[34,35];var hasFilterKeys=_someInstanceProperty(filerKeys).call(filerKeys,function(item){return _findIndexInstanceProperty(colsType).call(colsType,function(col){return String(col)===String(item)})>-1});return this.isShouXian(this.curProduct)&&!hasFilterKeys&&!(this.isPersonIns(this.curProduct)||this.isTaxHealthIns(this.curProduct))}},methods:{isPersonIns:function isPersonIns(){var product=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var cate=product.common&&product.common.cate;if(!cate){return false}return Number(cate.isPersonIns)===1},isTaxHealthIns:function isTaxHealthIns(){var product=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var cate=product.common&&product.common.cate;if(!cate){return false}return Number(cate.isTaxHealthIns)===1},isShouXian:function isShouXian(){var _context2;var product=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var cate=product.common&&product.common.cate;if(!cate){return false}var firstLevelId=cate.firstLevelId,secondLevelId=cate.secondLevelId;var shouxian={35:["37","60"],42:["44","45","63"],49:["64","65"]};firstLevelId=String(firstLevelId);secondLevelId=String(secondLevelId);return shouxian[firstLevelId]&&_includesInstanceProperty(_context2=shouxian[firstLevelId]).call(_context2,secondLevelId)},initData:function initData(){this.localOptions=lodashEs.cloneDeep(this.options);var _this$propData=this.propData,selectIndex=_this$propData.selectIndex,costTableMap=_this$propData.costTableMap,productList=_this$propData.productList,subPlan=_this$propData.subPlan;if(!costTableMap)return;this.selectedIndex=selectIndex;this.productList=productList;if(!lodashEs.isEmpty(this.localOptions)){this.settingMap=lodashEs.cloneDeep(this.localOptions)}this.handleMap(costTableMap,subPlan);this.curSetting=_Object$assign({dividendRate:"",modules:[],type:"table",subPlanList:[]},this.settingMap[this.curProduct.productId]||{})},quickInput:function quickInput(item){this.updateCurrentSetting("dividendRate",item);this.errorMsg=""},changeType:function changeType(type){this.updateCurrentSetting("type",type)},changeCurProduct:function changeCurProduct(index){this.selectedIndex=index;this.curSetting=this.settingMap[this.curProduct.productId]||{dividendRate:"",modules:[],type:"table"}},showRateTip:function showRateTip(){if(!this.tipDialog){this.tipDialog=this.$createGoldDialog({closable:false,title:"提示",content:RATE_TIP,zIndex:2222,buttonType:"sticky",confirmButtonText:"知道了",confirmButtonColor:this.isMain?"#8c7fee":"#F05A4B"})}this.tipDialog.show()},validateRate:function validateRate(e){var value=e.target.value.replace(/[^\d]/g,"");value=value===""?"":_parseInt(value);if(value>100){value="100"}else if(value<0){value="0"}else{this.errorMsg=""}this.updateCurrentSetting("dividendRate",value)},getData:function getData(){var _context3;var data2=this.settingMap;_forEachInstanceProperty(_context3=_Object$keys(data2)).call(_context3,function(productId){var _context4,_context5;var displayOptions=data2[productId].displayOptions;var modules=data2[productId].modules;data2[productId].dividendRate=data2[productId].dividendRate===""?100:Number(data2[productId].dividendRate);data2[productId].modules=_mapInstanceProperty(_context4=_filterInstanceProperty(_context5=_mapInstanceProperty(displayOptions).call(displayOptions,function(item){item.checked=_includesInstanceProperty(modules).call(modules,item.value)?1:0;return item})).call(_context5,function(item){return item.checked})).call(_context4,function(item){return item.value})});return{data:data2,selectedIndex:this.selectedIndex}},confirm:function confirm(){var _this=this;return new _Promise(function(resolve,reject){var settingData=_this.getData();var data2=settingData.data;var keys=_Object$keys(data2);for(var i=0;i<keys.length;i++){var item=data2[keys[i]];var selectedModules=item.modules;if(selectedModules.length<2){reject("请至少选择两项");return}}resolve(settingData)})},isFenHong:function isFenHong(productId){var _context6;var target=_findInstanceProperty(_context6=this.productList).call(_context6,function(item){return item.productId===productId});return target&&target.common&&target.common.cate&&+target.common.cate.isParticipating===1},isIncrease:function isIncrease(productId){var _context7;var target=_findInstanceProperty(_context7=this.productList).call(_context7,function(item){return item.productId===productId});return target&&target.common&&String(target.common.categoryid)==="1013"},isAnnuity:function isAnnuity(productId){var _context8;var target=_findInstanceProperty(_context8=this.productList).call(_context8,function(item){return item.productId===productId});return target&&!!target.annuityResultPageInfo},isYanglao:function isYanglao(productId){var _context9,_context0;var target=_findInstanceProperty(_context9=this.productList).call(_context9,function(item){return item.productId===productId});return target&&target.common&&target.common.cate&&_includesInstanceProperty(_context0=[46,48]).call(_context0,+target.common.cate.secondLevelId)},updateDisplayOptions:function updateDisplayOptions(displayOptions,prevOptions){var _context1,_context10,_context11;if(!prevOptions||!prevOptions.length)return displayOptions;var prevMap=new _Map(_mapInstanceProperty(prevOptions).call(prevOptions,function(item,index){return[String(item.value),{order:index,checked:item.checked}]}));var result=_mapInstanceProperty(_context1=_sortInstanceProperty(_context10=_mapInstanceProperty(_context11=_toConsumableArray(displayOptions)).call(_context11,function(item){var data2=prevMap.get(String(item.value));return _objectSpread(_objectSpread({},item),{},{order:data2?data2.order:_Number$MAX_SAFE_INTEGER,checked:data2?Number(data2.checked):0})})).call(_context10,function(a,b){return a.order-b.order})).call(_context1,function(_ref){var order=_ref.order,item=_objectWithoutProperties(_ref,_excluded);return item});return result},sortCols:function sortCols(){var ths=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];var colsType=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];var pairs=_mapInstanceProperty(colsType).call(colsType,function(type,index){return{type,index}});_sortInstanceProperty(pairs).call(pairs,function(a,b){var indexA=_indexOfInstanceProperty(costTypeOrder).call(costTypeOrder,a.type);var indexB=_indexOfInstanceProperty(costTypeOrder).call(costTypeOrder,b.type);if(indexA===-1&&indexB===-1){return 0}if(indexA===-1){return 1}if(indexB===-1){return-1}return indexA-indexB});var sortedThs=_mapInstanceProperty(pairs).call(pairs,function(pair){return ths[pair.index]});var sortedColsType=_mapInstanceProperty(pairs).call(pairs,function(pair){return colsType[pair.index]});return{ths:sortedThs,colsType:sortedColsType}},handleMap:function handleMap(costTableMap){var _this2=this,_context19;var subPlan=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};var getRenderTable=function getRenderTable2(productId,costDataItem){var _context12,_context16,_context17,_context18;var isFenHong2=_this2.isFenHong(productId);var costData=lodashEs.cloneDeep(costDataItem);var ths=costData&&costData.cols||[];var colsType=costData&&costData.colsType||[];var product=_findInstanceProperty(_context12=_this2.productList).call(_context12,function(item){return item.productId===productId});var subPlanList=subPlan[product.gid];var hasSubPlan=subPlanList&&subPlanList.length>0;var deathKeys=[37,4,39,41,38,40];if(costData){var _context13,_context14,_context15;var displayIdxs=[];displayIdxs=costData.display&&_filterInstanceProperty(_context13=_mapInstanceProperty(_context14=costData.display).call(_context14,function(item,index){return String(item)==="1"?index:""})).call(_context13,function(item,index){if(!hasSubPlan){return Number(colsType[index])}else{return Number(colsType[index])&&_indexOfInstanceProperty(deathKeys).call(deathKeys,Number(colsType[index]))===-1}})||[];ths=costData.cols&&_filterInstanceProperty(_context15=costData.cols).call(_context15,function(item,index){return _includesInstanceProperty(displayIdxs).call(displayIdxs,index)});colsType=_filterInstanceProperty(colsType).call(colsType,function(item,index){return _includesInstanceProperty(displayIdxs).call(displayIdxs,index)})}var _this2$sortCols=_this2.sortCols(ths,colsType),sortedThs=_this2$sortCols.ths,sortedColsType=_this2$sortCols.colsType;ths=sortedThs;colsType=sortedColsType;var irrName=isFenHong2?"保证IRR":"IRR";var simpleName=isFenHong2?"保证单利":"单利";var redIrrName="红利IRR";var redSimpleName="红利单利";if(hasSubPlan){irrName="减保后-".concat(irrName);simpleName="减保后-".concat(simpleName);redIrrName="减保后-".concat(redIrrName);redSimpleName="减保后-".concat(redSimpleName)}if(isFenHong2||_this2.isAnnuity(productId)||_this2.isIncrease(productId)){ths.push(irrName);colsType.push("irr");ths.push(simpleName);colsType.push("simple")}if(isFenHong2){ths.push(redIrrName);colsType.push("redIrr");ths.push(redSimpleName);colsType.push("redSimple")}var fixedType=_filterInstanceProperty(_context16=_this2.disableOptions).call(_context16,function(item){return _includesInstanceProperty(colsType).call(colsType,String(item))});var displayOptions=_mapInstanceProperty(colsType).call(colsType,function(item,index){return{label:ths[index],value:item,checked:1,originalIndex:index}});var disabledOptions=_mapInstanceProperty(fixedType).call(fixedType,function(item){return _findInstanceProperty(displayOptions).call(displayOptions,function(option){return option.value===String(item)})});displayOptions=_filterInstanceProperty(displayOptions).call(displayOptions,function(item){return!_includesInstanceProperty(fixedType).call(fixedType,Number(item.value))});return _concatInstanceProperty(_context18=disabledOptions||[]).call(_context18,displayOptions)};_forEachInstanceProperty(_context19=_Object$keys(costTableMap)).call(_context19,function(productId){var _context20,_context21;var displayOptions=getRenderTable(productId,costTableMap[productId]);var type="table";var dividendRate=100;if(_this2.settingMap[productId]){var prevOptions=_this2.settingMap[productId]&&_this2.settingMap[productId].displayOptions;displayOptions=_this2.updateDisplayOptions(displayOptions,prevOptions);type=_this2.settingMap[productId].type;dividendRate=_this2.settingMap[productId].dividendRate}var modules=_mapInstanceProperty(_context20=_filterInstanceProperty(displayOptions).call(displayOptions,function(item){return Number(item.checked)===1})).call(_context20,function(item){return item.value});var product=_findInstanceProperty(_context21=_this2.productList).call(_context21,function(item){return item.productId===productId});_this2.settingMap[productId]={dividendRate,modules,displayOptions,type,subPlanList:subPlan[product.gid]||[]}})},onMove:function onMove(e){var element=e.relatedContext.element;if(element&&Number(element.value)===14)return false;return true},updateCurrentSetting:function updateCurrentSetting(key,value){if(!this.curProduct||!this.curProduct.productId)return;this.curSetting=_objectSpread(_objectSpread({},this.curSetting),{},_defineProperty({},key,value))},updateSettingMap:function updateSettingMap(setting){this.$set(this.settingMap,this.curProduct.productId,setting)},updateCurSetting:function updateCurSetting(){if(this.curProduct&&this.curProduct.productId){var defaultSetting={dividendRate:"",modules:[],type:"table",subPlanList:[]};this.curSetting=_Object$assign(defaultSetting,this.settingMap[this.curProduct.productId]||{})}},addSubPlan:function addSubPlan(){this.$emit("addSubPlan")}}};var _sfc_render=function render(){var _vm=this,_c=_vm._self._c;return _c("div",{class:["act-PlanSetting"]},[_c("div",{class:["plan-setting-layer-content",{"main":_vm.isMain}]},[_c("div",{staticClass:"product-wrapper"},[_c("div",{staticClass:"product-list"},_vm._l(_vm.productList,function(product,index){return _c("div",{key:index,class:["product-item",{active:_vm.selectedIndex===index}],on:{"click":function click($event){return _vm.changeCurProduct(index)}}},[_c("div",{staticClass:"ellipsis-3"},[_vm._v(" "+_vm._s(product.text)+" ")])])}),0)]),_vm.curProduct&&_vm.isFenHong(_vm.curProduct.productId)?_c("div",{staticClass:"plan-setting-layer-content-item"},[_c("div",{staticClass:"plan-setting-layer-content-item-title",on:{"click":function click($event){_vm.isRateShow=!_vm.isRateShow}}},[_c("h2",[_vm._v("假定分红实现率"),_c("i",{staticClass:"icon-question",on:{"click":_vm.showRateTip}})]),_c("i",{class:["icon-toggle",_vm.isRateShow?"active":""]})]),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.isRateShow,expression:"isRateShow"}]},[_c("div",{staticClass:"plan-setting-layer-content-item-input rate-input-wrap"},[_c("div",{staticClass:"input-label"},[_vm._v("假定分红实现率")]),_c("div",{staticClass:"input-area"},[_c("input",{directives:[{name:"model",rawName:"v-model",value:_vm.curSetting.dividendRate,expression:"curSetting.dividendRate"}],class:{"error":_vm.errorMsg},attrs:{"type":"tel","pattern":"[0-9]*"},domProps:{"value":_vm.curSetting.dividendRate},on:{"input":[function($event){if($event.target.composing)return;_vm.$set(_vm.curSetting,"dividendRate",$event.target.value)},_vm.validateRate]}}),_c("span",[_vm._v("%")]),_vm.errorMsg?_c("div",{staticClass:"error-msg"},[_vm._v(_vm._s(_vm.errorMsg))]):_vm._e()])]),_c("div",{staticClass:"quick-input-wrap"},_vm._l(_vm.quickList,function(item,index){return _c("div",{key:index,staticClass:"quick-input-item",on:{"click":function click($event){return _vm.quickInput(item)}}},[_vm._v(_vm._s(item)+"%")])}),0)])]):_vm._e(),_c("div",{staticClass:"plan-setting-layer-content-item"},[_c("div",{staticClass:"plan-setting-layer-content-item-title"},[_c("h2",[_vm._v("展示模式")]),_c("div",{staticClass:"tabs-wrap"},[_c("div",{class:["tab-item",{active:_vm.curSetting.type==="table"}],on:{"click":function click($event){return _vm.changeType("table")}}},[_vm._v("列表展示")]),_c("div",{class:["tab-item",{active:_vm.curSetting.type==="chart"}],on:{"click":function click($event){return _vm.changeType("chart")}}},[_vm._v("图表展示")])])]),_c("div",{staticClass:"item-main"},[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.curSetting.type==="table",expression:"curSetting.type === 'table'"}],staticClass:"item-main-content"},[_vm._m(0),_c("div",[_c("draggable",{staticClass:"item-main-content-list",attrs:{"chosenClass":"chosen","forceFallback":"true","animation":"500","handle":".icon-move","ghostClass":"ghost","filter":".forbid","move":_vm.onMove},model:{value:_vm.curSetting.displayOptions,callback:function callback($$v){_vm.$set(_vm.curSetting,"displayOptions",$$v)},expression:"curSetting.displayOptions"}},_vm._l(_vm.curSetting.displayOptions,function(option,index){return _c("label",{key:index,staticClass:"checkbox-item",class:{forbid:Number(option.value)===14}},[_c("input",{directives:[{name:"model",rawName:"v-model",value:_vm.curSetting.modules,expression:"curSetting.modules"}],attrs:{"disabled":Number(option.value)===14,"type":"checkbox"},domProps:{"value":option.value,"checked":Array.isArray(_vm.curSetting.modules)?_vm._i(_vm.curSetting.modules,option.value)>-1:_vm.curSetting.modules},on:{"click":function click($event){$event.stopPropagation()},"change":function change($event){var $$a=_vm.curSetting.modules,$$el=$event.target,$$c=$$el.checked?true:false;if(Array.isArray($$a)){var $$v=option.value,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&_vm.$set(_vm.curSetting,"modules",_concatInstanceProperty($$a).call($$a,[$$v]))}else{var _context22;$$i>-1&&_vm.$set(_vm.curSetting,"modules",_concatInstanceProperty(_context22=_sliceInstanceProperty($$a).call($$a,0,$$i)).call(_context22,_sliceInstanceProperty($$a).call($$a,$$i+1)))}}else{_vm.$set(_vm.curSetting,"modules",$$c)}}}}),_c("span",{staticClass:"checkbox-label"},[_vm._v(_vm._s(option.label))]),_c("i",{staticClass:"icon-move"})])}),0)],1)]),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.curSetting.type==="chart",expression:"curSetting.type === 'chart'"}],staticClass:"item-main-chart"},[_c("div",{staticClass:"icon-empty"}),_c("p",[_vm._v("更多功能敬请期待~")])])])]),_vm.isShowSubPlanContent?_c("div",{staticClass:"plan-setting-layer-content-item"},[_c("div",{staticClass:"plan-setting-layer-content-item-title",on:{"click":function click($event){_vm.isShowSubPlan=!_vm.isShowSubPlan}}},[_c("h2",[_vm._v("减保方案")]),_c("i",{class:["icon-toggle",_vm.isShowSubPlan?"active":""]})]),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.isShowSubPlan,expression:"isShowSubPlan"}],staticClass:"container subplan-container"},[_c("act-plan-sub-plan",{attrs:{"costTable":_vm.propData.costTableMap&&_vm.propData.costTableMap[_vm.curProduct.productId],"product":_vm.curProduct},on:{"add":_vm.addSubPlan},model:{value:_vm.curSetting.subPlanList,callback:function callback($$v){_vm.$set(_vm.curSetting,"subPlanList",$$v)},expression:"curSetting.subPlanList"}})],1)]):_vm._e(),_vm._t("extend",null,{"curProduct":_vm.curProduct})],2)])};var _sfc_staticRenderFns=[function(){var _vm=this,_c=_vm._self._c;return _c("p",{staticClass:"main-hint"},[_vm._v("展示数据"),_c("span",{staticClass:"tip"},[_vm._v("(至少选择2项)")])])}];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"1231cd73");var PlanSetting=__component__.exports;PlanSetting.install=function(Vue){Vue.component(PlanSetting.name,PlanSetting);Vue.prototype["$createPlanSetting"]=utils_create.create(PlanSetting,Vue)};exports.PlanSetting=PlanSetting;
1
+ "use strict";require('./style.css');var _Object$getOwnPropertySymbols=require("@babel/runtime-corejs3/core-js/object/get-own-property-symbols");var _Object$getOwnPropertyDescriptor=require("@babel/runtime-corejs3/core-js/object/get-own-property-descriptor");var _Object$getOwnPropertyDescriptors=require("@babel/runtime-corejs3/core-js/object/get-own-property-descriptors");var _Object$defineProperties=require("@babel/runtime-corejs3/core-js/object/define-properties");var _Object$defineProperty=require("@babel/runtime-corejs3/core-js/object/define-property");var _objectWithoutProperties=require("@babel/runtime-corejs3/helpers/objectWithoutProperties");var _defineProperty=require("@babel/runtime-corejs3/helpers/defineProperty");var _toConsumableArray=require("@babel/runtime-corejs3/helpers/toConsumableArray");var _Map=require("@babel/runtime-corejs3/core-js/map");var _forEachInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/for-each");var _someInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/some");var _findIndexInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/find-index");var _includesInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/includes");var _Object$assign=require("@babel/runtime-corejs3/core-js/object/assign");var _parseInt=require("@babel/runtime-corejs3/core-js/parse-int");var _Object$keys=require("@babel/runtime-corejs3/core-js/object/keys");var _mapInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/map");var _filterInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/filter");var _Promise=require("@babel/runtime-corejs3/core-js/promise");var _findInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/find");var _sortInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/sort");var _Number$MAX_SAFE_INTEGER=require("@babel/runtime-corejs3/core-js/number/max-safe-integer");var _indexOfInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/index-of");var _concatInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/concat");var _sliceInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/slice");var _excluded=["order"];function ownKeys(e,r){var t=_Object$keys(e);if(_Object$getOwnPropertySymbols){var o=_Object$getOwnPropertySymbols(e);r&&(o=_filterInstanceProperty(o).call(o,function(r2){return _Object$getOwnPropertyDescriptor(e,r2).enumerable})),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var _context23,_context24;var t=null!=arguments[r]?arguments[r]:{};r%2?_forEachInstanceProperty(_context23=ownKeys(Object(t),true)).call(_context23,function(r2){_defineProperty(e,r2,t[r2])}):_Object$getOwnPropertyDescriptors?_Object$defineProperties(e,_Object$getOwnPropertyDescriptors(t)):_forEachInstanceProperty(_context24=ownKeys(Object(t))).call(_context24,function(r2){_Object$defineProperty(e,r2,_Object$getOwnPropertyDescriptor(t,r2))})}return e}var utils_create=require("../utils/create/index.js");var draggable=require("vuedraggable");var lodashEs=require("lodash-es");var PlanSubPlan=require("../PlanSubPlan/index.js");var common=require("../common/index.js");var RATE_TIP="假定分红实现率并非保险公司提供,仅用于保险专业人员个人对分红型产品未来的分红收益预估,并不能等于未来分红实际收益";var costTypeOrder=[14,5,6,34,35,45,46,20,47,48,21,22,42,27,3,23,28,37,38,39,4,40,41,15,16,36];var _sfc_main={name:"ActPlanSetting",props:{isMain:{type:Boolean,default:false},options:{type:Object,default:function _default(){return{}}},propData:{type:Object,default:function _default2(){return{}}}},components:{draggable,ActPlanSubPlan:PlanSubPlan.PlanSubPlan},data:function data(){return{quickList:[50,80,100],localOptions:lodashEs.cloneDeep(this.options),isRateShow:true,isShowSubPlan:false,tipDialog:null,errorMsg:"",selectedIndex:0,settingMap:{},productList:[],disableOptions:[14,5,6],curSetting:{dividendRate:"",modules:[],type:"table",subPlanList:[]}}},watch:{propData:{immediate:true,deep:true,handler:function handler(){this.initData()}},curSetting:{deep:true,handler:function handler2(val){if(this.curProduct&&this.curProduct.productId){this.updateSettingMap(val)}}}},computed:{curProduct:function curProduct(){return this.productList[this.selectedIndex]||{}},productOrder:function productOrder(){var _context;var order=new _Map;_forEachInstanceProperty(_context=this.productList).call(_context,function(item,index){order.set(item.gid,index)});return order},isShowSubPlanContent:function isShowSubPlanContent(){var costTable=this.propData.costTableMap[this.curProduct.productId];if(!costTable)return false;var _costTable$colsType=costTable.colsType,colsType=_costTable$colsType===void 0?[]:_costTable$colsType;var filerKeys=[34,35];var hasFilterKeys=_someInstanceProperty(filerKeys).call(filerKeys,function(item){return _findIndexInstanceProperty(colsType).call(colsType,function(col){return String(col)===String(item)})>-1});return this.isShouXian(this.curProduct)&&!hasFilterKeys&&!(this.isPersonIns(this.curProduct)||this.isTaxHealthIns(this.curProduct))}},methods:{isPersonIns:function isPersonIns(){var product=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var cate=product.common&&product.common.cate;if(!cate){return false}return Number(cate.isPersonIns)===1},isTaxHealthIns:function isTaxHealthIns(){var product=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var cate=product.common&&product.common.cate;if(!cate){return false}return Number(cate.isTaxHealthIns)===1},isShouXian:function isShouXian(){var _context2;var product=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var cate=product.common&&product.common.cate;if(!cate){return false}var firstLevelId=cate.firstLevelId,secondLevelId=cate.secondLevelId;var shouxian={35:["37","60"],42:["44","45","63"],49:["64","65"]};firstLevelId=String(firstLevelId);secondLevelId=String(secondLevelId);return shouxian[firstLevelId]&&_includesInstanceProperty(_context2=shouxian[firstLevelId]).call(_context2,secondLevelId)},initData:function initData(){this.localOptions=lodashEs.cloneDeep(this.options);var _this$propData=this.propData,selectIndex=_this$propData.selectIndex,costTableMap=_this$propData.costTableMap,productList=_this$propData.productList,subPlan=_this$propData.subPlan;if(!costTableMap)return;this.selectedIndex=selectIndex;this.productList=productList;if(!lodashEs.isEmpty(this.localOptions)){this.settingMap=lodashEs.cloneDeep(this.localOptions)}this.handleMap(costTableMap,subPlan);this.curSetting=_Object$assign({dividendRate:"",modules:[],type:"table",subPlanList:[]},this.settingMap[this.curProduct.productId]||{})},quickInput:function quickInput(item){this.updateCurrentSetting("dividendRate",item);this.errorMsg=""},changeType:function changeType(type){this.updateCurrentSetting("type",type)},changeCurProduct:function changeCurProduct(index){this.selectedIndex=index;this.curSetting=this.settingMap[this.curProduct.productId]||{dividendRate:"",modules:[],type:"table"}},showRateTip:function showRateTip(){if(!this.tipDialog){this.tipDialog=this.$createGoldDialog({closable:false,title:"提示",content:RATE_TIP,zIndex:2222,buttonType:"sticky",confirmButtonText:"知道了",confirmButtonColor:this.isMain?"#8c7fee":"#F05A4B"})}this.tipDialog.show()},validateRate:function validateRate(e){var value=e.target.value.replace(/[^\d]/g,"");value=value===""?"":_parseInt(value);if(value>100){value="100"}else if(value<0){value="0"}else{this.errorMsg=""}this.updateCurrentSetting("dividendRate",value)},getData:function getData(){var _context3;var data2=this.settingMap;_forEachInstanceProperty(_context3=_Object$keys(data2)).call(_context3,function(productId){var _context4,_context5;var displayOptions=data2[productId].displayOptions;var modules=data2[productId].modules;data2[productId].dividendRate=data2[productId].dividendRate===""?100:Number(data2[productId].dividendRate);data2[productId].modules=_mapInstanceProperty(_context4=_filterInstanceProperty(_context5=_mapInstanceProperty(displayOptions).call(displayOptions,function(item){item.checked=_includesInstanceProperty(modules).call(modules,item.value)?1:0;return item})).call(_context5,function(item){return item.checked})).call(_context4,function(item){return item.value})});return{data:data2,selectedIndex:this.selectedIndex}},confirm:function confirm(){var _this=this;return new _Promise(function(resolve,reject){var settingData=_this.getData();var data2=settingData.data;var keys=_Object$keys(data2);for(var i=0;i<keys.length;i++){var item=data2[keys[i]];var selectedModules=item.modules;if(selectedModules.length<2){reject("请至少选择两项");return}}resolve(settingData)})},isFenHong:function isFenHong(productId){var _context6;var target=_findInstanceProperty(_context6=this.productList).call(_context6,function(item){return item.productId===productId});return target&&target.common&&target.common.cate&&+target.common.cate.isParticipating===1},isIncrease:function isIncrease(productId){var _context7;var target=_findInstanceProperty(_context7=this.productList).call(_context7,function(item){return item.productId===productId});return target&&target.common&&String(target.common.categoryid)==="1013"},isAnnuity:function isAnnuity(productId){var _context8;var target=_findInstanceProperty(_context8=this.productList).call(_context8,function(item){return item.productId===productId});return target&&!!target.annuityResultPageInfo},isYanglao:function isYanglao(productId){var _context9,_context0;var target=_findInstanceProperty(_context9=this.productList).call(_context9,function(item){return item.productId===productId});return target&&target.common&&target.common.cate&&_includesInstanceProperty(_context0=[46,48]).call(_context0,+target.common.cate.secondLevelId)},updateDisplayOptions:function updateDisplayOptions(displayOptions,prevOptions){var _context1,_context10,_context11;if(!prevOptions||!prevOptions.length)return displayOptions;var prevMap=new _Map(_mapInstanceProperty(prevOptions).call(prevOptions,function(item,index){return[String(item.value),{order:index,checked:item.checked}]}));var result=_mapInstanceProperty(_context1=_sortInstanceProperty(_context10=_mapInstanceProperty(_context11=_toConsumableArray(displayOptions)).call(_context11,function(item){var data2=prevMap.get(String(item.value));return _objectSpread(_objectSpread({},item),{},{order:data2?data2.order:_Number$MAX_SAFE_INTEGER,checked:data2?Number(data2.checked):0})})).call(_context10,function(a,b){return a.order-b.order})).call(_context1,function(_ref){var order=_ref.order,item=_objectWithoutProperties(_ref,_excluded);return item});return result},sortCols:function sortCols(){var ths=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];var colsType=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];var pairs=_mapInstanceProperty(colsType).call(colsType,function(type,index){return{type,index}});_sortInstanceProperty(pairs).call(pairs,function(a,b){var indexA=_indexOfInstanceProperty(costTypeOrder).call(costTypeOrder,a.type);var indexB=_indexOfInstanceProperty(costTypeOrder).call(costTypeOrder,b.type);if(indexA===-1&&indexB===-1){return 0}if(indexA===-1){return 1}if(indexB===-1){return-1}return indexA-indexB});var sortedThs=_mapInstanceProperty(pairs).call(pairs,function(pair){return ths[pair.index]});var sortedColsType=_mapInstanceProperty(pairs).call(pairs,function(pair){return colsType[pair.index]});return{ths:sortedThs,colsType:sortedColsType}},handleMap:function handleMap(costTableMap){var _this2=this,_context19;var subPlan=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};var getRenderTable=function getRenderTable2(productId,costDataItem){var _context12,_context16,_context17,_context18;var isFenHong2=_this2.isFenHong(productId);var costData=lodashEs.cloneDeep(costDataItem);var ths=costData&&costData.cols||[];var colsType=costData&&costData.colsType||[];var product=_findInstanceProperty(_context12=_this2.productList).call(_context12,function(item){return item.productId===productId});var subPlanList=subPlan[product.gid];var hasSubPlan=subPlanList&&subPlanList.length>0;var deathKeys=[37,4,39,41,38,40];if(costData){var _context13,_context14,_context15;var displayIdxs=[];displayIdxs=costData.display&&_filterInstanceProperty(_context13=_mapInstanceProperty(_context14=costData.display).call(_context14,function(item,index){return String(item)==="1"?index:""})).call(_context13,function(item,index){if(!hasSubPlan){return Number(colsType[index])}else{return Number(colsType[index])&&_indexOfInstanceProperty(deathKeys).call(deathKeys,Number(colsType[index]))===-1}})||[];ths=costData.cols&&_filterInstanceProperty(_context15=costData.cols).call(_context15,function(item,index){return _includesInstanceProperty(displayIdxs).call(displayIdxs,index)});colsType=_filterInstanceProperty(colsType).call(colsType,function(item,index){return _includesInstanceProperty(displayIdxs).call(displayIdxs,index)})}var _this2$sortCols=_this2.sortCols(ths,colsType),sortedThs=_this2$sortCols.ths,sortedColsType=_this2$sortCols.colsType;ths=sortedThs;colsType=sortedColsType;var irrName=isFenHong2?"保证IRR":"IRR";var simpleName=isFenHong2?"保证单利":"单利";var redIrrName="红利IRR";var redSimpleName="红利单利";if(hasSubPlan){irrName="减保后-".concat(irrName);simpleName="减保后-".concat(simpleName);redIrrName="减保后-".concat(redIrrName);redSimpleName="减保后-".concat(redSimpleName)}if(isFenHong2||_this2.isAnnuity(productId)||_this2.isIncrease(productId)){ths.push(irrName);colsType.push("irr");ths.push(simpleName);colsType.push("simple")}if(isFenHong2){ths.push(redIrrName);colsType.push("redIrr");ths.push(redSimpleName);colsType.push("redSimple")}var fixedType=_filterInstanceProperty(_context16=_this2.disableOptions).call(_context16,function(item){return _includesInstanceProperty(colsType).call(colsType,String(item))});var displayOptions=_mapInstanceProperty(colsType).call(colsType,function(item,index){return{label:ths[index],value:item,checked:1,originalIndex:index}});var disabledOptions=_mapInstanceProperty(fixedType).call(fixedType,function(item){return _findInstanceProperty(displayOptions).call(displayOptions,function(option){return option.value===String(item)})});displayOptions=_filterInstanceProperty(displayOptions).call(displayOptions,function(item){return!_includesInstanceProperty(fixedType).call(fixedType,Number(item.value))});return _concatInstanceProperty(_context18=disabledOptions||[]).call(_context18,displayOptions)};_forEachInstanceProperty(_context19=_Object$keys(costTableMap)).call(_context19,function(productId){var _context20,_context21;var displayOptions=getRenderTable(productId,costTableMap[productId]);var type="table";var dividendRate=100;if(_this2.settingMap[productId]){var prevOptions=_this2.settingMap[productId]&&_this2.settingMap[productId].displayOptions;displayOptions=_this2.updateDisplayOptions(displayOptions,prevOptions);type=_this2.settingMap[productId].type;dividendRate=_this2.settingMap[productId].dividendRate}var modules=_mapInstanceProperty(_context20=_filterInstanceProperty(displayOptions).call(displayOptions,function(item){return Number(item.checked)===1})).call(_context20,function(item){return item.value});var product=_findInstanceProperty(_context21=_this2.productList).call(_context21,function(item){return item.productId===productId});_this2.settingMap[productId]={dividendRate,modules,displayOptions,type,subPlanList:subPlan[product.gid]||[]}})},onMove:function onMove(e){var element=e.relatedContext.element;if(element&&Number(element.value)===14)return false;return true},updateCurrentSetting:function updateCurrentSetting(key,value){if(!this.curProduct||!this.curProduct.productId)return;this.curSetting=_objectSpread(_objectSpread({},this.curSetting),{},_defineProperty({},key,value))},updateSettingMap:function updateSettingMap(setting){this.$set(this.settingMap,this.curProduct.productId,setting)},updateCurSetting:function updateCurSetting(){if(this.curProduct&&this.curProduct.productId){var defaultSetting={dividendRate:"",modules:[],type:"table",subPlanList:[]};this.curSetting=_Object$assign(defaultSetting,this.settingMap[this.curProduct.productId]||{})}},addSubPlan:function addSubPlan(){this.$emit("addSubPlan")}}};var _sfc_render=function render(){var _vm=this,_c=_vm._self._c;return _c("div",{class:["act-PlanSetting"]},[_c("div",{class:["plan-setting-layer-content",{"main":_vm.isMain}]},[_c("div",{staticClass:"product-wrapper"},[_c("div",{staticClass:"product-list"},_vm._l(_vm.productList,function(product,index){return _c("div",{key:index,class:["product-item",{active:_vm.selectedIndex===index}],on:{"click":function click($event){return _vm.changeCurProduct(index)}}},[_c("div",{staticClass:"ellipsis-3"},[_vm._v(" "+_vm._s(product.text)+" ")])])}),0)]),_vm.curProduct&&_vm.isFenHong(_vm.curProduct.productId)?_c("div",{staticClass:"plan-setting-layer-content-item"},[_c("div",{staticClass:"plan-setting-layer-content-item-title",on:{"click":function click($event){_vm.isRateShow=!_vm.isRateShow}}},[_c("h2",[_vm._v("假定分红实现率"),_c("i",{staticClass:"icon-question",on:{"click":_vm.showRateTip}})]),_c("i",{class:["icon-toggle",_vm.isRateShow?"active":""]})]),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.isRateShow,expression:"isRateShow"}]},[_c("div",{staticClass:"plan-setting-layer-content-item-input rate-input-wrap"},[_c("div",{staticClass:"input-label"},[_vm._v("假定分红实现率")]),_c("div",{staticClass:"input-area"},[_c("input",{directives:[{name:"model",rawName:"v-model",value:_vm.curSetting.dividendRate,expression:"curSetting.dividendRate"}],class:{"error":_vm.errorMsg},attrs:{"type":"tel","pattern":"[0-9]*"},domProps:{"value":_vm.curSetting.dividendRate},on:{"input":[function($event){if($event.target.composing)return;_vm.$set(_vm.curSetting,"dividendRate",$event.target.value)},_vm.validateRate]}}),_c("span",[_vm._v("%")]),_vm.errorMsg?_c("div",{staticClass:"error-msg"},[_vm._v(_vm._s(_vm.errorMsg))]):_vm._e()])]),_c("div",{staticClass:"quick-input-wrap"},_vm._l(_vm.quickList,function(item,index){return _c("div",{key:index,staticClass:"quick-input-item",on:{"click":function click($event){return _vm.quickInput(item)}}},[_vm._v(_vm._s(item)+"%")])}),0)])]):_vm._e(),_c("div",{staticClass:"plan-setting-layer-content-item"},[_c("div",{staticClass:"plan-setting-layer-content-item-title"},[_c("h2",[_vm._v("展示模式")]),_c("div",{staticClass:"tabs-wrap"},[_c("div",{class:["tab-item",{active:_vm.curSetting.type==="table"}],on:{"click":function click($event){return _vm.changeType("table")}}},[_vm._v("列表展示")]),_c("div",{class:["tab-item",{active:_vm.curSetting.type==="chart"}],on:{"click":function click($event){return _vm.changeType("chart")}}},[_vm._v("图表展示")])])]),_c("div",{staticClass:"item-main"},[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.curSetting.type==="table",expression:"curSetting.type === 'table'"}],staticClass:"item-main-content"},[_vm._m(0),_c("div",[_c("draggable",{staticClass:"item-main-content-list",attrs:{"chosenClass":"chosen","forceFallback":"true","animation":"500","handle":".icon-move","ghostClass":"ghost","filter":".forbid","move":_vm.onMove},model:{value:_vm.curSetting.displayOptions,callback:function callback($$v){_vm.$set(_vm.curSetting,"displayOptions",$$v)},expression:"curSetting.displayOptions"}},_vm._l(_vm.curSetting.displayOptions,function(option,index){return _c("label",{key:index,staticClass:"checkbox-item",class:{forbid:Number(option.value)===14}},[_c("input",{directives:[{name:"model",rawName:"v-model",value:_vm.curSetting.modules,expression:"curSetting.modules"}],attrs:{"disabled":Number(option.value)===14,"type":"checkbox"},domProps:{"value":option.value,"checked":Array.isArray(_vm.curSetting.modules)?_vm._i(_vm.curSetting.modules,option.value)>-1:_vm.curSetting.modules},on:{"click":function click($event){$event.stopPropagation()},"change":function change($event){var $$a=_vm.curSetting.modules,$$el=$event.target,$$c=$$el.checked?true:false;if(Array.isArray($$a)){var $$v=option.value,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&_vm.$set(_vm.curSetting,"modules",_concatInstanceProperty($$a).call($$a,[$$v]))}else{var _context22;$$i>-1&&_vm.$set(_vm.curSetting,"modules",_concatInstanceProperty(_context22=_sliceInstanceProperty($$a).call($$a,0,$$i)).call(_context22,_sliceInstanceProperty($$a).call($$a,$$i+1)))}}else{_vm.$set(_vm.curSetting,"modules",$$c)}}}}),_c("span",{staticClass:"checkbox-label"},[_vm._v(_vm._s(option.label))]),_c("i",{staticClass:"icon-move"})])}),0)],1)]),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.curSetting.type==="chart",expression:"curSetting.type === 'chart'"}],staticClass:"item-main-chart"},[_c("div",{staticClass:"icon-empty"}),_c("p",[_vm._v("更多功能敬请期待~")])])])]),_vm.isShowSubPlanContent?_c("div",{staticClass:"plan-setting-layer-content-item"},[_c("div",{staticClass:"plan-setting-layer-content-item-title",on:{"click":function click($event){_vm.isShowSubPlan=!_vm.isShowSubPlan}}},[_c("h2",[_vm._v("减保方案")]),_c("i",{class:["icon-toggle",_vm.isShowSubPlan?"active":""]})]),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.isShowSubPlan,expression:"isShowSubPlan"}],staticClass:"container subplan-container"},[_c("act-plan-sub-plan",{attrs:{"costTable":_vm.propData.costTableMap&&_vm.propData.costTableMap[_vm.curProduct.productId],"product":_vm.curProduct},on:{"add":_vm.addSubPlan},model:{value:_vm.curSetting.subPlanList,callback:function callback($$v){_vm.$set(_vm.curSetting,"subPlanList",$$v)},expression:"curSetting.subPlanList"}})],1)]):_vm._e(),_vm._t("extend",null,{"curProduct":_vm.curProduct})],2)])};var _sfc_staticRenderFns=[function(){var _vm=this,_c=_vm._self._c;return _c("p",{staticClass:"main-hint"},[_vm._v("展示数据"),_c("span",{staticClass:"tip"},[_vm._v("(至少选择2项)")])])}];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"90d41f3c");var PlanSetting=__component__.exports;PlanSetting.install=function(Vue){Vue.component(PlanSetting.name,PlanSetting);Vue.prototype["$createPlanSetting"]=utils_create.create(PlanSetting,Vue)};exports.PlanSetting=PlanSetting;
@@ -739,7 +739,7 @@ var _sfc_staticRenderFns = [function() {
739
739
  staticClass: "tip"
740
740
  }, [_vm._v("(至少选择2项)")])]);
741
741
  }];
742
- var __component__ = /* @__PURE__ */ normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, "1231cd73");
742
+ var __component__ = /* @__PURE__ */ normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, "90d41f3c");
743
743
  var PlanSetting = __component__.exports;
744
744
  PlanSetting.install = function(Vue) {
745
745
  Vue.component(PlanSetting.name, PlanSetting);