@xysfe/actui2 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/BScroll/index.js +1 -1
- package/lib/BScroll/index.mjs +5 -1
- package/lib/ClaimsContact/style.css +1 -1
- package/lib/Contact/style.css +1 -1
- package/lib/ContactBook/style.css +1 -1
- package/lib/CouponLayer/index.js +1 -1
- package/lib/CouponLayer/index.mjs +3 -3
- package/lib/DiseaseListLayer/index.js +1 -1
- package/lib/DiseaseListLayer/index.mjs +2 -2
- package/lib/FileUpload/choose/index.mjs +1 -1
- package/lib/FileUpload/upload/index.mjs +1 -1
- package/lib/GoldBenefitDemo/benefit/slider/index.js +1 -1
- package/lib/GoldBenefitDemo/benefit/slider/index.mjs +2 -2
- package/lib/GoldBenefitDemo/costTable/index.js +1 -1
- package/lib/GoldBenefitDemo/costTable/index.mjs +2 -2
- package/lib/GoldCost/costTable/index.js +1 -1
- package/lib/GoldCost/costTable/index.mjs +4 -4
- package/lib/GoldFinance/benefit/slider/index.js +1 -1
- package/lib/GoldFinance/benefit/slider/index.mjs +2 -2
- package/lib/GoldFinance/costTable/index.js +1 -1
- package/lib/GoldFinance/costTable/index.mjs +2 -2
- package/lib/GoldFinanceChart/costTable/index.js +1 -1
- package/lib/GoldFinanceChart/costTable/index.mjs +2 -2
- package/lib/GoldFinanceChart/index.mjs +1 -1
- package/lib/GoldFinanceChartV3/costTable/index.js +1 -1
- package/lib/GoldFinanceChartV3/costTable/index.mjs +4 -4
- package/lib/GoldFinanceV2/benefit/slider/index.js +1 -1
- package/lib/GoldFinanceV2/benefit/slider/index.mjs +2 -2
- package/lib/GoldFinanceV2/costTable/index.js +1 -1
- package/lib/GoldFinanceV2/costTable/index.mjs +2 -2
- package/lib/GoldMulSelect/mulSelect/index.js +1 -1
- package/lib/GoldMulSelect/mulSelect/index.mjs +2 -2
- package/lib/GoldPayLimitLayer/index.js +1 -1
- package/lib/GoldPayLimitLayer/index.mjs +2 -2
- package/lib/GoldPayLimitLayer/signIntroduct/index.js +1 -1
- package/lib/GoldPayLimitLayer/signIntroduct/index.mjs +2 -2
- package/lib/GoldPayLimitLayer/table/index.js +1 -1
- package/lib/GoldPayLimitLayer/table/index.mjs +2 -2
- package/lib/GoldProtocol/style.css +1 -1
- package/lib/Jigsaw/index.mjs +1 -1
- package/lib/Marketing/popper/index.js +1 -1
- package/lib/Marketing/popper/index.mjs +1 -1
- package/lib/MedicalListLayer/index.js +1 -1
- package/lib/MedicalListLayer/index.mjs +2 -2
- package/lib/Picker/index.js +1 -1
- package/lib/Picker/index.mjs +2 -2
- package/lib/PickerLongText/index.js +1 -1
- package/lib/PickerLongText/index.mjs +2 -2
- package/lib/ProPosterLayer/index.js +1 -1
- package/lib/ProPosterLayer/index.mjs +1 -1
- package/lib/ProPosterLayer/poster/index.js +1 -1
- package/lib/ProPosterLayer/poster/index.mjs +4 -3
- package/lib/ProPosterLayer/poster/style.css +1 -1
- package/lib/ProductLayer/productDetailLayer/index.js +1 -1
- package/lib/ProductLayer/productDetailLayer/index.mjs +4 -3
- package/lib/ProductLayer/productDetailLayer/style.css +1 -1
- package/lib/ProductLayer/saleAreaLayer/index.js +1 -1
- package/lib/ProductLayer/saleAreaLayer/index.mjs +2 -2
- package/lib/ProductLayer/saleAreaLayer/style.css +1 -1
- package/lib/QRCode/qrcode/index.js +1 -1
- package/lib/QRCode/qrcode/index.mjs +1 -2
- package/lib/RecordRuleLayer/index.js +1 -1
- package/lib/RecordRuleLayer/index.mjs +4 -4
- package/lib/Rule/index.js +1 -1
- package/lib/Rule/index.mjs +2 -2
- package/lib/SlidePoster/index.js +1 -1
- package/lib/SlidePoster/index.mjs +1 -1
- package/lib/SlidePoster/qrcode/index.js +1 -1
- package/lib/SlidePoster/qrcode/index.mjs +1 -2
- package/lib/common/scroll/index.js +1 -1
- package/lib/common/scroll/index.mjs +2 -2
- package/lib/common/scrollZoom/scroll/index.js +1 -1
- package/lib/common/scrollZoom/scroll/index.mjs +2 -2
- package/lib/index.js +1 -1
- package/lib/index.mjs +5 -6
- package/lib/utils/clickOutside/index.js +1 -0
- package/lib/utils/clickOutside/index.mjs +68 -0
- package/lib/utils/vueAwesomeSwiper/index.js +1 -1
- package/lib/utils/vueAwesomeSwiper/index.mjs +1 -7
- package/package.json +102 -99
- package/types/components/BScroll/index.d.ts +1 -1
- package/types/utils/clickOutside.d.ts +10 -0
- package/types/utils/vueAwesomeSwiper.d.ts +1 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require('./style.css');var _includesInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/includes");var _sliceInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/slice");var _forEachInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/for-each");var _parseFloat=require("@babel/runtime-corejs3/core-js/parse-float");var BScroll=require("better-scroll");var utils_helpers=require("../../utils/helpers/index.js");var common=require("../../common/index.js");var _sfc_main={name:"CostTable",props:{visible:{type:Boolean,default:false},tables:{type:Object,default:function _default(){return{}}},theme:{type:Object,default:function _default2(){return{}}},productId:{type:String||Number,default:""},groupId:{type:String||Number,default:""}},data:function data(){return{rightTitleScroller:null,newTable:{},tableScroller:null,rightTableScroller:null,id:1,buttons:[{id:1,name:"全部展示"},{id:2,name:"5周岁倍数"},{id:3,name:"10周岁倍数"}]}},computed:{title:function title(){return this.tables.title||""},mainActive:function mainActive(){var hashColor=this.theme.brandColor;if(hashColor){var rgb=utils_helpers.hexToRgb(hashColor,.1);return{backgroundColor:rgb}}return{}},imgActive:function imgActive(){if(this.theme.brandColor){return{backgroundColor:this.theme.brandColor}}return{}},textActive:function textActive(){var hashColor=this.theme.brandColor;if(hashColor){var rgb=utils_helpers.hexToRgb(hashColor,1);return{color:rgb}}return{}},isSpecialGroup:function isSpecialGroup(){var _context,_context2;return _includesInstanceProperty(_context=["173934"]).call(_context,String(this.groupId))||_includesInstanceProperty(_context2=["342750","342817","342862","343407"]).call(_context2,String(this.productId))},styleOption:function styleOption(){if(this.theme.brandColor){return{backgroundColor:this.theme.brandColor}}return{}},tableHeadDesc:function tableHeadDesc(){var _context3;if(~~this.productId===330247){return"基于您所选择的投保信息,保单利益详情如下:"}if(~~this.productId===343026){return"特殊说明:<br/> 1、本利益供参考,具体以保险合同为准 <br/>2、养老年金的展示金额为保单年度末金额"}if(_includesInstanceProperty(_context3=[343142,343049]).call(_context3,~~this.productId)){return"基于您所选择的投保信息,保单利益详情如下:<br/>演示表仅演示年金主险,不包含附加险(投保人豁免、万能)"}if(~~this.productId===343145){return"基于您所选择的投保信息,保单利益详情如下:<br/>演示表仅演示终身寿主险,不包含附加险(投保人豁免、万能)"}return"基于您所选择的投入信息,保单利益详情如下:"},tableHeadTips:function tableHeadTips(){var _context4,_context5,_context6;if(_includesInstanceProperty(_context4=[342862,342817]).call(_context4,~~this.productId)){return"特别说明:演示不包含万能险;月领金额为保单年度末金额"}if(_includesInstanceProperty(_context5=[342750]).call(_context5,~~this.productId)){return"特别说明:月领展示金额为保单年度末金额"}if(_includesInstanceProperty(_context6=[343388]).call(_context6,~~this.productId)){return"特别说明:利益演示为按年领取金额,仅演示至104周岁"}return""},leftTitleArr:function leftTitleArr(){if(this.newTable){if(this.newTable.cols&&this.newTable.cols.length){var _context7;return _sliceInstanceProperty(_context7=this.newTable.cols).call(_context7,0,2)}}return[]},rightTitleArr:function rightTitleArr(){if(this.newTable){if(this.newTable.cols&&this.newTable.cols.length){var _context8;var length=this.newTable.cols.length;return _sliceInstanceProperty(_context8=this.newTable.cols).call(_context8,2,length)}}return[]},leftDisplayArr:function leftDisplayArr(){if(this.newTable){if(this.newTable.display&&this.newTable.display.length){var _context9;return _sliceInstanceProperty(_context9=this.newTable.display).call(_context9,0,2)}}return[]},rightDisplayArr:function rightDisplayArr(){if(this.newTable){if(this.newTable.display&&this.newTable.display.length){var _context0;var length=this.newTable.display.length;return _sliceInstanceProperty(_context0=this.newTable.display).call(_context0,2,length)}}return[]},leftTable:function leftTable(){if(this.newTable){var arr=[];if(this.newTable.rows){var _context1;_forEachInstanceProperty(_context1=this.newTable.rows).call(_context1,function(el){var useArar=[];_forEachInstanceProperty(el).call(el,function(item,index){if(index<2){useArar.push(item)}});arr.push(useArar)})}return arr}return[]},rightTable:function rightTable(){if(this.newTable){var arr=[];if(this.newTable.rows){var _context10;_forEachInstanceProperty(_context10=this.newTable.rows).call(_context10,function(el){var useArar=[];_forEachInstanceProperty(el).call(el,function(item,index){if(index>1){useArar.push(item)}});arr.push(useArar)})}return arr}return[[]]}},methods:{getTdValue:function getTdValue(td){if(!this.isSpecialGroup){return _parseFloat((Math.round(td*100)/100).toString()).toFixed(2)}return _parseFloat((Math.round(td*100)/100).toString())},showResCol:function showResCol(index,side){var displayArr=side==="left"?this.leftDisplayArr:this.rightDisplayArr;if(displayArr&&displayArr.length){if(displayArr[index]!==void 0&&~~displayArr[index]===1){return true}return false}},initScroll:function initScroll(){this.rightTitleScroller&&this.rightTitleScroller.refresh();this.tableScroller&&this.tableScroller.refresh();this.rightTableScroller&&this.rightTableScroller.refresh();this.tableScroller.scrollTo(0,0,0)},showTable:function showTable(id){this.id=id;if(id===1){this.showAllTable()}else if(id===2){this.showFiveTimes()}else{this.showTenTimes()}},showAllTable:function showAllTable(){this.newTable=utils_helpers.deepCopy(this.tables);this.initScroll()},showFiveTimes:function showFiveTimes(){var rows=this.tables.rows;var arr=[];_forEachInstanceProperty(rows).call(rows,function(el){_forEachInstanceProperty(el).call(el,function(item,index){if(index===1&&item%5===0){arr.push(el)}})});this.newTable.rows=arr;this.initScroll()},showTenTimes:function showTenTimes(){var rows=this.tables.rows;var arr=[];_forEachInstanceProperty(rows).call(rows,function(el){_forEachInstanceProperty(el).call(el,function(item,index){if(index===1&&item%10===0){arr.push(el)}})});this.newTable.rows=arr;this.initScroll()},cancel:function cancel(){this.$emit("cancelCost")},preventMove:function preventMove(e){e._prevent=true}},watch:{visible:function visible(newVal,oldVal){var _this=this;if(newVal){var rightTitle=this.$refs.rightTitle;var tableWrapper=this.$refs.tableWrapper;var rightTable2=this.$refs.rightTable;if(rightTitle){this.$nextTick(function(){if(!_this.rightTitleScroller){_this.rightTitleScroller=new BScroll(rightTitle,{scrollX:true,bounce:false,probeType:3,momentum:false});_this.rightTitleScroller.on("scroll",function(_ref){var x=_ref.x,y=_ref.y;utils_helpers.throttle(_this.rightTableScroller.scrollTo(x,y,0))})}else{_this.rightTitleScroller.refresh()}})}if(tableWrapper){this.$nextTick(function(){if(!_this.tableScroller){_this.tableScroller=new BScroll(tableWrapper,{scrollY:true,scrollX:false})}else{_this.tableScroller.refresh()}})}if(rightTable2){this.$nextTick(function(){if(!_this.rightTableScroller){_this.rightTableScroller=new BScroll(rightTable2,{scrollY:true,scrollX:true,bounce:false,probeType:2,momentum:false});_this.rightTableScroller.on("scroll",function(_ref2){var x=_ref2.x,y=_ref2.y;_this.rightTitleScroller.scrollTo(x,y,0)})}else{_this.rightTableScroller.refresh()}})}}},tables:function tables(newVal,oldVal){if(newVal){this.newTable=utils_helpers.deepCopy(newVal)}}}};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:"layer insured_layer",on:{"touchmove":_vm.preventMove,"click":function click($event){$event.stopPropagation();return _vm.cancel.apply(null,arguments)}}},[_c("div",{staticClass:"layer_box insured_box layer_animate iphonex_padding cost"},[_vm._m(0),_c("div",{staticClass:"description"},[_vm.title?[_c("p",{staticClass:"cost-title"},[_vm._v(" "+_vm._s(_vm.title)+" ")])]:[_c("p",{staticClass:"cost-table-head",domProps:{"innerHTML":_vm._s(_vm.tableHeadDesc)}}),_vm.tableHeadTips?_c("p",{staticClass:"cost-table-tips"},[_vm._v(" "+_vm._s(_vm.tableHeadTips)+" ")]):_vm._e()]],2),_vm.tables.cols&&_vm.tables.rows&&_vm.tables.rows.length?[_c("div",{staticClass:"wrapper"},[_c("div",{staticClass:"title-wrapper"},[_c("div",{staticClass:"left-title"},[_vm._l(_vm.leftTitleArr,function(thead,theadIndex){return[_vm.showResCol(theadIndex,"left")?_c("span",{key:"head-"+theadIndex,staticClass:"table-item",style:_vm.styleOption},[_vm._v(" "+_vm._s(thead)+" ")]):_vm._e()]})],2),_c("div",{ref:"rightTitle",staticClass:"right-title"},[_c("div",{ref:"rightTitleWrapper",staticClass:"right-title-wrapper"},[_vm._l(_vm.rightTitleArr,function(thead,theadIndex){return[_vm.showResCol(theadIndex,"right")?_c("span",{key:"head-"+theadIndex,staticClass:"table-item",style:_vm.styleOption},[_vm._v(" "+_vm._s(thead)+" ")]):_vm._e()]})],2)])]),_c("div",{ref:"tableWrapper",staticClass:"table-wrapper"},[_c("div",{staticClass:"table"},[_c("div",{staticClass:"left-table"},[_c("table",{staticClass:"table-body",attrs:{"border":"0"}},[_vm.leftTable&&_vm.leftTable.length?_c("tbody",_vm._l(_vm.leftTable,function(tr,trIndex){return _c("tr",{key:"tr-"+trIndex,staticClass:"table-tr"},[_vm._l(tr,function(td,tdIndex){return[_vm.showResCol(tdIndex,"left")?_c("td",{key:"td-"+trIndex+"-"+tdIndex,staticClass:"table-item"},[_vm._v(" "+_vm._s(td)+" ")]):_vm._e()]})],2)}),0):_vm._e()])]),_c("div",{ref:"rightTable",staticClass:"right-table"},[_c("table",{staticClass:"table-body",attrs:{"border":"0"}},[_vm.rightTable&&_vm.rightTable.length?_c("tbody",_vm._l(_vm.rightTable,function(tr,trIndex){return _c("tr",{key:"tr-"+trIndex,staticClass:"table-tr"},[_vm._l(tr,function(td,tdIndex){return[_vm.showResCol(tdIndex,"right")?_c("td",{key:"td-"+trIndex+"-"+tdIndex,staticClass:"table-item"},[_vm._v(" "+_vm._s(_vm.getTdValue(td))+" ")]):_vm._e()]})],2)}),0):_vm._e()])])])])])]:[_c("div",{staticClass:"no-data"},[_vm._v(" 暂时无法展示 ")])],_vm.tables.cols&&_vm.tables.rows&&_vm.tables.rows.length?_c("div",{staticClass:"costButton"},_vm._l(_vm.buttons,function(item){return _c("div",{key:item.id,staticClass:"button",style:_vm.id===item.id?_vm.mainActive:{},on:{"click":function click($event){$event.stopPropagation();return _vm.showTable(item.id)}}},[_c("span",{staticClass:"check-img",style:_vm.id===item.id?_vm.imgActive:{}}),_c("span",{staticClass:"button-text",style:_vm.id===item.id?_vm.textActive:{}},[_vm._v(" "+_vm._s(item.name)+" ")])])}),0):_vm._e()],2)])};var _sfc_staticRenderFns=[function(){var _vm=this,_c=_vm._self._c;return _c("div",{staticClass:"head-title"},[_c("span",{staticClass:"layer-close"}),_c("p",{staticClass:"main-title"},[_vm._v(" 保单利益演示表 ")])])}];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"f438bfc8");var GoldCostTable=__component__.exports;exports.GoldCostTable=GoldCostTable;
|
|
1
|
+
"use strict";require('./style.css');var _includesInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/includes");var _sliceInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/slice");var _forEachInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/for-each");var _parseFloat=require("@babel/runtime-corejs3/core-js/parse-float");var BScroll=require("../../BScroll/index.js");var utils_helpers=require("../../utils/helpers/index.js");var common=require("../../common/index.js");var _sfc_main={name:"CostTable",props:{visible:{type:Boolean,default:false},tables:{type:Object,default:function _default(){return{}}},theme:{type:Object,default:function _default2(){return{}}},productId:{type:String||Number,default:""},groupId:{type:String||Number,default:""}},data:function data(){return{rightTitleScroller:null,newTable:{},tableScroller:null,rightTableScroller:null,id:1,buttons:[{id:1,name:"全部展示"},{id:2,name:"5周岁倍数"},{id:3,name:"10周岁倍数"}]}},computed:{title:function title(){return this.tables.title||""},mainActive:function mainActive(){var hashColor=this.theme.brandColor;if(hashColor){var rgb=utils_helpers.hexToRgb(hashColor,.1);return{backgroundColor:rgb}}return{}},imgActive:function imgActive(){if(this.theme.brandColor){return{backgroundColor:this.theme.brandColor}}return{}},textActive:function textActive(){var hashColor=this.theme.brandColor;if(hashColor){var rgb=utils_helpers.hexToRgb(hashColor,1);return{color:rgb}}return{}},isSpecialGroup:function isSpecialGroup(){var _context,_context2;return _includesInstanceProperty(_context=["173934"]).call(_context,String(this.groupId))||_includesInstanceProperty(_context2=["342750","342817","342862","343407"]).call(_context2,String(this.productId))},styleOption:function styleOption(){if(this.theme.brandColor){return{backgroundColor:this.theme.brandColor}}return{}},tableHeadDesc:function tableHeadDesc(){var _context3;if(~~this.productId===330247){return"基于您所选择的投保信息,保单利益详情如下:"}if(~~this.productId===343026){return"特殊说明:<br/> 1、本利益供参考,具体以保险合同为准 <br/>2、养老年金的展示金额为保单年度末金额"}if(_includesInstanceProperty(_context3=[343142,343049]).call(_context3,~~this.productId)){return"基于您所选择的投保信息,保单利益详情如下:<br/>演示表仅演示年金主险,不包含附加险(投保人豁免、万能)"}if(~~this.productId===343145){return"基于您所选择的投保信息,保单利益详情如下:<br/>演示表仅演示终身寿主险,不包含附加险(投保人豁免、万能)"}return"基于您所选择的投入信息,保单利益详情如下:"},tableHeadTips:function tableHeadTips(){var _context4,_context5,_context6;if(_includesInstanceProperty(_context4=[342862,342817]).call(_context4,~~this.productId)){return"特别说明:演示不包含万能险;月领金额为保单年度末金额"}if(_includesInstanceProperty(_context5=[342750]).call(_context5,~~this.productId)){return"特别说明:月领展示金额为保单年度末金额"}if(_includesInstanceProperty(_context6=[343388]).call(_context6,~~this.productId)){return"特别说明:利益演示为按年领取金额,仅演示至104周岁"}return""},leftTitleArr:function leftTitleArr(){if(this.newTable){if(this.newTable.cols&&this.newTable.cols.length){var _context7;return _sliceInstanceProperty(_context7=this.newTable.cols).call(_context7,0,2)}}return[]},rightTitleArr:function rightTitleArr(){if(this.newTable){if(this.newTable.cols&&this.newTable.cols.length){var _context8;var length=this.newTable.cols.length;return _sliceInstanceProperty(_context8=this.newTable.cols).call(_context8,2,length)}}return[]},leftDisplayArr:function leftDisplayArr(){if(this.newTable){if(this.newTable.display&&this.newTable.display.length){var _context9;return _sliceInstanceProperty(_context9=this.newTable.display).call(_context9,0,2)}}return[]},rightDisplayArr:function rightDisplayArr(){if(this.newTable){if(this.newTable.display&&this.newTable.display.length){var _context0;var length=this.newTable.display.length;return _sliceInstanceProperty(_context0=this.newTable.display).call(_context0,2,length)}}return[]},leftTable:function leftTable(){if(this.newTable){var arr=[];if(this.newTable.rows){var _context1;_forEachInstanceProperty(_context1=this.newTable.rows).call(_context1,function(el){var useArar=[];_forEachInstanceProperty(el).call(el,function(item,index){if(index<2){useArar.push(item)}});arr.push(useArar)})}return arr}return[]},rightTable:function rightTable(){if(this.newTable){var arr=[];if(this.newTable.rows){var _context10;_forEachInstanceProperty(_context10=this.newTable.rows).call(_context10,function(el){var useArar=[];_forEachInstanceProperty(el).call(el,function(item,index){if(index>1){useArar.push(item)}});arr.push(useArar)})}return arr}return[[]]}},methods:{getTdValue:function getTdValue(td){if(!this.isSpecialGroup){return _parseFloat((Math.round(td*100)/100).toString()).toFixed(2)}return _parseFloat((Math.round(td*100)/100).toString())},showResCol:function showResCol(index,side){var displayArr=side==="left"?this.leftDisplayArr:this.rightDisplayArr;if(displayArr&&displayArr.length){if(displayArr[index]!==void 0&&~~displayArr[index]===1){return true}return false}},initScroll:function initScroll(){this.rightTitleScroller&&this.rightTitleScroller.refresh();this.tableScroller&&this.tableScroller.refresh();this.rightTableScroller&&this.rightTableScroller.refresh();this.tableScroller.scrollTo(0,0,0)},showTable:function showTable(id){this.id=id;if(id===1){this.showAllTable()}else if(id===2){this.showFiveTimes()}else{this.showTenTimes()}},showAllTable:function showAllTable(){this.newTable=utils_helpers.deepCopy(this.tables);this.initScroll()},showFiveTimes:function showFiveTimes(){var rows=this.tables.rows;var arr=[];_forEachInstanceProperty(rows).call(rows,function(el){_forEachInstanceProperty(el).call(el,function(item,index){if(index===1&&item%5===0){arr.push(el)}})});this.newTable.rows=arr;this.initScroll()},showTenTimes:function showTenTimes(){var rows=this.tables.rows;var arr=[];_forEachInstanceProperty(rows).call(rows,function(el){_forEachInstanceProperty(el).call(el,function(item,index){if(index===1&&item%10===0){arr.push(el)}})});this.newTable.rows=arr;this.initScroll()},cancel:function cancel(){this.$emit("cancelCost")},preventMove:function preventMove(e){e._prevent=true}},watch:{visible:function visible(newVal,oldVal){var _this=this;if(newVal){var rightTitle=this.$refs.rightTitle;var tableWrapper=this.$refs.tableWrapper;var rightTable2=this.$refs.rightTable;if(rightTitle){this.$nextTick(function(){if(!_this.rightTitleScroller){_this.rightTitleScroller=new BScroll.bScroll(rightTitle,{scrollX:true,bounce:false,probeType:3,momentum:false});_this.rightTitleScroller.on("scroll",function(_ref){var x=_ref.x,y=_ref.y;utils_helpers.throttle(_this.rightTableScroller.scrollTo(x,y,0))})}else{_this.rightTitleScroller.refresh()}})}if(tableWrapper){this.$nextTick(function(){if(!_this.tableScroller){_this.tableScroller=new BScroll.bScroll(tableWrapper,{scrollY:true,scrollX:false})}else{_this.tableScroller.refresh()}})}if(rightTable2){this.$nextTick(function(){if(!_this.rightTableScroller){_this.rightTableScroller=new BScroll.bScroll(rightTable2,{scrollY:true,scrollX:true,bounce:false,probeType:2,momentum:false});_this.rightTableScroller.on("scroll",function(_ref2){var x=_ref2.x,y=_ref2.y;_this.rightTitleScroller.scrollTo(x,y,0)})}else{_this.rightTableScroller.refresh()}})}}},tables:function tables(newVal,oldVal){if(newVal){this.newTable=utils_helpers.deepCopy(newVal)}}}};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:"layer insured_layer",on:{"touchmove":_vm.preventMove,"click":function click($event){$event.stopPropagation();return _vm.cancel.apply(null,arguments)}}},[_c("div",{staticClass:"layer_box insured_box layer_animate iphonex_padding cost"},[_vm._m(0),_c("div",{staticClass:"description"},[_vm.title?[_c("p",{staticClass:"cost-title"},[_vm._v(" "+_vm._s(_vm.title)+" ")])]:[_c("p",{staticClass:"cost-table-head",domProps:{"innerHTML":_vm._s(_vm.tableHeadDesc)}}),_vm.tableHeadTips?_c("p",{staticClass:"cost-table-tips"},[_vm._v(" "+_vm._s(_vm.tableHeadTips)+" ")]):_vm._e()]],2),_vm.tables.cols&&_vm.tables.rows&&_vm.tables.rows.length?[_c("div",{staticClass:"wrapper"},[_c("div",{staticClass:"title-wrapper"},[_c("div",{staticClass:"left-title"},[_vm._l(_vm.leftTitleArr,function(thead,theadIndex){return[_vm.showResCol(theadIndex,"left")?_c("span",{key:"head-"+theadIndex,staticClass:"table-item",style:_vm.styleOption},[_vm._v(" "+_vm._s(thead)+" ")]):_vm._e()]})],2),_c("div",{ref:"rightTitle",staticClass:"right-title"},[_c("div",{ref:"rightTitleWrapper",staticClass:"right-title-wrapper"},[_vm._l(_vm.rightTitleArr,function(thead,theadIndex){return[_vm.showResCol(theadIndex,"right")?_c("span",{key:"head-"+theadIndex,staticClass:"table-item",style:_vm.styleOption},[_vm._v(" "+_vm._s(thead)+" ")]):_vm._e()]})],2)])]),_c("div",{ref:"tableWrapper",staticClass:"table-wrapper"},[_c("div",{staticClass:"table"},[_c("div",{staticClass:"left-table"},[_c("table",{staticClass:"table-body",attrs:{"border":"0"}},[_vm.leftTable&&_vm.leftTable.length?_c("tbody",_vm._l(_vm.leftTable,function(tr,trIndex){return _c("tr",{key:"tr-"+trIndex,staticClass:"table-tr"},[_vm._l(tr,function(td,tdIndex){return[_vm.showResCol(tdIndex,"left")?_c("td",{key:"td-"+trIndex+"-"+tdIndex,staticClass:"table-item"},[_vm._v(" "+_vm._s(td)+" ")]):_vm._e()]})],2)}),0):_vm._e()])]),_c("div",{ref:"rightTable",staticClass:"right-table"},[_c("table",{staticClass:"table-body",attrs:{"border":"0"}},[_vm.rightTable&&_vm.rightTable.length?_c("tbody",_vm._l(_vm.rightTable,function(tr,trIndex){return _c("tr",{key:"tr-"+trIndex,staticClass:"table-tr"},[_vm._l(tr,function(td,tdIndex){return[_vm.showResCol(tdIndex,"right")?_c("td",{key:"td-"+trIndex+"-"+tdIndex,staticClass:"table-item"},[_vm._v(" "+_vm._s(_vm.getTdValue(td))+" ")]):_vm._e()]})],2)}),0):_vm._e()])])])])])]:[_c("div",{staticClass:"no-data"},[_vm._v(" 暂时无法展示 ")])],_vm.tables.cols&&_vm.tables.rows&&_vm.tables.rows.length?_c("div",{staticClass:"costButton"},_vm._l(_vm.buttons,function(item){return _c("div",{key:item.id,staticClass:"button",style:_vm.id===item.id?_vm.mainActive:{},on:{"click":function click($event){$event.stopPropagation();return _vm.showTable(item.id)}}},[_c("span",{staticClass:"check-img",style:_vm.id===item.id?_vm.imgActive:{}}),_c("span",{staticClass:"button-text",style:_vm.id===item.id?_vm.textActive:{}},[_vm._v(" "+_vm._s(item.name)+" ")])])}),0):_vm._e()],2)])};var _sfc_staticRenderFns=[function(){var _vm=this,_c=_vm._self._c;return _c("div",{staticClass:"head-title"},[_c("span",{staticClass:"layer-close"}),_c("p",{staticClass:"main-title"},[_vm._v(" 保单利益演示表 ")])])}];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"f438bfc8");var GoldCostTable=__component__.exports;exports.GoldCostTable=GoldCostTable;
|
|
@@ -2,7 +2,7 @@ import _includesInstanceProperty from "@babel/runtime-corejs3/core-js/instance/i
|
|
|
2
2
|
import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js/instance/slice";
|
|
3
3
|
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js/instance/for-each";
|
|
4
4
|
import _parseFloat from "@babel/runtime-corejs3/core-js/parse-float";
|
|
5
|
-
import
|
|
5
|
+
import { b as bScroll } from "../../BScroll/index.mjs";
|
|
6
6
|
import { m as deepCopy, t as throttle, h as hexToRgb } from "../../utils/helpers/index.mjs";
|
|
7
7
|
import { n as normalizeComponent } from "../../common/index.mjs";
|
|
8
8
|
import './style.css';var _sfc_main = {
|
|
@@ -281,7 +281,7 @@ import './style.css';var _sfc_main = {
|
|
|
281
281
|
if (rightTitle) {
|
|
282
282
|
this.$nextTick(function() {
|
|
283
283
|
if (!_this.rightTitleScroller) {
|
|
284
|
-
_this.rightTitleScroller = new
|
|
284
|
+
_this.rightTitleScroller = new bScroll(rightTitle, {
|
|
285
285
|
scrollX: true,
|
|
286
286
|
bounce: false,
|
|
287
287
|
probeType: 3,
|
|
@@ -299,7 +299,7 @@ import './style.css';var _sfc_main = {
|
|
|
299
299
|
if (tableWrapper) {
|
|
300
300
|
this.$nextTick(function() {
|
|
301
301
|
if (!_this.tableScroller) {
|
|
302
|
-
_this.tableScroller = new
|
|
302
|
+
_this.tableScroller = new bScroll(tableWrapper, {
|
|
303
303
|
scrollY: true,
|
|
304
304
|
scrollX: false
|
|
305
305
|
});
|
|
@@ -311,7 +311,7 @@ import './style.css';var _sfc_main = {
|
|
|
311
311
|
if (rightTable2) {
|
|
312
312
|
this.$nextTick(function() {
|
|
313
313
|
if (!_this.rightTableScroller) {
|
|
314
|
-
_this.rightTableScroller = new
|
|
314
|
+
_this.rightTableScroller = new bScroll(rightTable2, {
|
|
315
315
|
scrollY: true,
|
|
316
316
|
scrollX: true,
|
|
317
317
|
bounce: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require('./style.css');var BScroll=require("
|
|
1
|
+
"use strict";require('./style.css');var BScroll=require("../../../BScroll/index.js");var common=require("../../../common/index.js");var _sfc_main={name:"ActGoldBenefitSlider",data:function data(){return{windowX:0,listScroll:null,forbidScrollEnd:false}},props:{element:{type:Object,default:function _default(){return{}}}},computed:{unit:function unit(){return~~this.element.range[0].unit||""},step:function step(){return~~(this.element.attr&&this.element.attr.step)||5},min:function min(){return~~this.element.range[0].min||~~(this.element.attr&&this.element.attr.min)||0},max:function max(){return~~this.element.range[0].max||~~(this.element.attr&&this.element.attr.max)||100},chooseAge:function chooseAge(){var realValue=~~this.element.value||80;if(realValue<this.min){return this.min}else if(realValue>this.max){return this.max}return realValue},during:function during(){return this.max-this.min+1},width:function width(){return 12*(this.max-this.min)+1}},methods:{initScroll:function initScroll(){var _this=this;var wrapper=document.querySelector(".wrapper");var startX=(this.min-this.chooseAge)*12;this.$refs.wrappercontent.style.width=~~this.windowX+this.width+"px";this.$nextTick(function(){var that=_this;if(!_this.listScroll){_this.listScroll=new BScroll.bScroll(wrapper,{probeType:3,startX,scrollX:true,scrollY:false});that.listScroll.on("scrollEnd",function(pos){if(that.forbidScrollEnd){that.forbidScrollEnd=false;return}var chooseAge2;if(pos.x>=0){chooseAge2=that.min}else if(Math.abs(pos.x)>=that.width){chooseAge2=that.max}else{chooseAge2=Math.floor(Math.abs(pos.x)/12+1+that.min);var scrollX=-(Math.floor(Math.abs(pos.x)/12+1)*12);that.forbidScrollEnd=true;that.listScroll.scrollTo(scrollX,0,0)}that.$emit("updateAge",chooseAge2)})}else{if(startX>=0){_this.$emit("updateAge",_this.min);startX=0}_this.listScroll.refresh();_this.forbidScrollEnd=true;_this.listScroll.scrollTo(startX,0,0)}})}},mounted:function mounted(){var containerWidth=this.$refs.chooseContainer&&this.$refs.chooseContainer.offsetWidth;this.windowX=containerWidth||window.innerWidth||document.body&&document.body.clientWidth;this.windowX=this.windowX>750?750:this.windowX;this.initScroll()},watch:{min:function min2(){this.initScroll()}}};var _sfc_render=function render(){var _vm=this,_c=_vm._self._c;return _c("div",[_c("div",{ref:"chooseContainer",staticClass:"choose"},[_c("div",{staticClass:"choose-container wrapper"},[_c("div",{ref:"wrappercontent",staticClass:"choose-content"},_vm._l(_vm.during,function(number){return _c("div",{key:number,staticClass:"choose-item"},[_c("span",{staticClass:"number-item",class:{"number-part":(number+_vm.min-1)%_vm.step==0}}),(number+_vm.min-1)%_vm.step==0?_c("span",{staticClass:"number-text"},[_vm._v(_vm._s(number+_vm.min-1)+_vm._s(_vm.unit))]):_vm._e()])}),0)]),_c("div",{staticClass:"choose-value skin-bg"})])])};var _sfc_staticRenderFns=[];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"183f8ac6");var benefitSlider=__component__.exports;exports.benefitSlider=benefitSlider;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { b as bScroll } from "../../../BScroll/index.mjs";
|
|
2
2
|
import { n as normalizeComponent } from "../../../common/index.mjs";
|
|
3
3
|
import './style.css';var _sfc_main = {
|
|
4
4
|
name: "ActGoldBenefitSlider",
|
|
@@ -55,7 +55,7 @@ import './style.css';var _sfc_main = {
|
|
|
55
55
|
this.$nextTick(function() {
|
|
56
56
|
var that = _this;
|
|
57
57
|
if (!_this.listScroll) {
|
|
58
|
-
_this.listScroll = new
|
|
58
|
+
_this.listScroll = new bScroll(wrapper, {
|
|
59
59
|
probeType: 3,
|
|
60
60
|
startX,
|
|
61
61
|
scrollX: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require('./style.css');var BScroll=require("
|
|
1
|
+
"use strict";require('./style.css');var BScroll=require("../../BScroll/index.js");var common=require("../../common/index.js");var _sfc_main={name:"ActGoldCostTable",data:function data(){return{scroller:null}},props:{visible:{type:Boolean,default:false},tables:{type:Object,default:function _default(){return{}}},theme:{type:Object,default:function _default2(){return{}}}},computed:{title:function title(){return this.tables.title||"现金价值表"},styleOption:function styleOption(){if(this.theme&&this.theme.brandColor){return{backgroundColor:this.theme.brandColor}}return{}}},methods:{showCol:function showCol(index){var displayArr=this.tables.display||[];if(displayArr[index]!==void 0&&~~displayArr[index]===1){return true}return false},cancel:function cancel(){this.$emit("cancelCost")},preventMove:function preventMove(e){e._prevent=true}},watch:{visible:function visible(value){var _this=this;if(value){var tables=document.querySelector(".cost-scroll");if(tables){this.$nextTick(function(){if(!_this.scroller){_this.scroller=new BScroll.bScroll(tables,{})}else{_this.scroller.refresh()}})}}}}};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:"layer-finance",on:{"touchmove":_vm.preventMove}},[_c("div",{staticClass:"layer-finance-mask",on:{"click":function click($event){$event.stopPropagation();return _vm.cancel.apply(null,arguments)}}}),_c("div",{staticClass:"layer-finance-box layer_animate cost iphonex_padding"},[_c("span",{staticClass:"layer-close",on:{"click":function click($event){$event.stopPropagation();return _vm.cancel.apply(null,arguments)}}}),_c("p",{staticClass:"main-title"},[_vm._v(" 保单利益演示表 ")]),_c("p",{staticClass:"cost-title"},[_vm._v(" "+_vm._s(_vm.title)+" ")]),_c("p",{staticClass:"cost-table-head"},[_vm._v(" 基于用户所选信息的保单利益演示如下: ")]),_vm.tables.cols&&_vm.tables.rows&&_vm.tables.rows.length?[_c("div",[_c("div",{staticClass:"table-tr thead"},[_vm._l(_vm.tables.cols,function(thead,theadIndex){return[_vm.showCol(theadIndex)?_c("span",{key:"head-"+theadIndex,staticClass:"table-item",style:_vm.styleOption},[_vm._v(" "+_vm._s(thead)+" ")]):_vm._e()]})],2),_c("div",{staticClass:"cost-scroll"},[_c("table",{staticClass:"table-body"},[_vm.tables.rows&&_vm.tables.rows.length?_c("tbody",_vm._l(_vm.tables.rows,function(tr,trIndex){return _c("tr",{key:"tr-"+trIndex,staticClass:"table-tr"},[_vm._l(tr,function(td,tdIndex){return[_vm.showCol(tdIndex)?_c("td",{key:"td-"+trIndex+"-"+tdIndex,staticClass:"table-item"},[_vm._v(" "+_vm._s(Math.round(td*100)/100)+" ")]):_vm._e()]})],2)}),0):_vm._e()])])])]:[_c("div",{staticClass:"no-data"},[_vm._v(" 暂时无法展示 ")])]],2)])};var _sfc_staticRenderFns=[];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"29d28c6e");var GoldCostTable=__component__.exports;exports.GoldCostTable=GoldCostTable;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { b as bScroll } from "../../BScroll/index.mjs";
|
|
2
2
|
import { n as normalizeComponent } from "../../common/index.mjs";
|
|
3
3
|
import './style.css';var _sfc_main = {
|
|
4
4
|
name: "ActGoldCostTable",
|
|
@@ -61,7 +61,7 @@ import './style.css';var _sfc_main = {
|
|
|
61
61
|
if (tables) {
|
|
62
62
|
this.$nextTick(function() {
|
|
63
63
|
if (!_this.scroller) {
|
|
64
|
-
_this.scroller = new
|
|
64
|
+
_this.scroller = new bScroll(tables, {});
|
|
65
65
|
} else {
|
|
66
66
|
_this.scroller.refresh();
|
|
67
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require('./style.css');var _toConsumableArray=require("@babel/runtime-corejs3/helpers/toConsumableArray");var _includesInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/includes");var _indexOfInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/index-of");var _spliceInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/splice");var _concatInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/concat");var common_popup=require("../../common/popup/index.js");var BScroll=require("
|
|
1
|
+
"use strict";require('./style.css');var _toConsumableArray=require("@babel/runtime-corejs3/helpers/toConsumableArray");var _includesInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/includes");var _indexOfInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/index-of");var _spliceInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/splice");var _concatInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/concat");var common_popup=require("../../common/popup/index.js");var BScroll=require("../../BScroll/index.js");var utils_helpers=require("../../utils/helpers/index.js");var common=require("../../common/index.js");var _sfc_main={data:function data(){return{selectValue:[],isVisible:false,preOverflowValue:null}},components:{ActPopup:common_popup.ActPopup},props:{options:{type:Array,default:function _default(){return[]}},title:{type:String,default:""},value:{type:[Array,String],default:function _default2(){return[]}},brandColor:{type:String,default:"#8c7fee"}},methods:{isDisabled:function isDisabled(option){return Number(option.state)!==1},maskClick:function maskClick(){this.isVisible=false},cancel:function cancel(){this.isVisible=false},confirm:function confirm(){this.$emit("confirm",this.selectValue);this.isVisible=false},show:function show(){var _this=this;this.isVisible=true;this.$nextTick(function(){if(!_this.scroll){_this.scroll=new BScroll.bScroll(_this.$refs.content,{click:true})}else{_this.scroll.refresh()}})},handleItem:function handleItem(item){var _context;if(~~item.state===0){return}if(_includesInstanceProperty(_context=this.selectValue).call(_context,item.value)){var _context2,_context3;var index=_indexOfInstanceProperty(_context2=this.selectValue).call(_context2,item.value);_spliceInstanceProperty(_context3=this.selectValue).call(_context3,index,1)}else{this.selectValue.push(item.value)}},color:function color(value){var _context4,_context5;var color2=_includesInstanceProperty(_context4=this.selectValue).call(_context4,value)?this.brandColor:"";return{backgroundColor:_includesInstanceProperty(_context5=this.selectValue).call(_context5,value)?this.backgroundColor:"",borderColor:color2}}},watch:{isVisible:function isVisible(newVal){if(newVal){this.selectValue=this.value?_toConsumableArray(this.value):[];this.preOverflowValue=document&&document.body&&document.body.style&&document.body.style.overflow;document.documentElement.style.overflow="hidden"}else{document.body.style.overflow=this.preOverflowValue||""}}},computed:{backgroundColor:function backgroundColor(){return utils_helpers.hexToRgb(this.brandColor||"#8c7fee",.08)}}};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":"999"},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:"#999999"},on:{"click":_vm.cancel}},[_vm._v(" 取消 ")]),_c("span",{staticClass:"act-picker-confirm",style:{color:_vm.brandColor?_vm.brandColor:"#FC7468"},on:{"click":_vm.confirm}},[_vm._v("确定")]),_c("div",{staticClass:"act-picker-title-group"},[_c("h1",{staticClass:"act-picker-title"},[_vm._v(" "+_vm._s(_vm.title)+" ")])])]),_c("div",{ref:"content",staticClass:"act-picker-content"},[_vm.options&&_vm.options.length?_c("div",{staticClass:"element-mulselect"},_vm._l(_vm.options,function(item,i){return _c("div",{key:i,staticClass:"element-item"},[_c("h5",[_vm._v(" "+_vm._s(item.text)+" ")]),_c("ul",{staticClass:"element-subitem"},_vm._l(item.subList,function(subItem,j){var _context6,_context7,_context8,_context9;return _c("li",{key:_concatInstanceProperty(_context6=_concatInstanceProperty(_context7="".concat(subItem.value,"_")).call(_context7,i,"_")).call(_context6,j),class:{isSelect:_includesInstanceProperty(_context8=_vm.selectValue).call(_context8,subItem.value)},style:_vm.color(subItem.value),on:{"click":function click($event){$event.stopPropagation();return _vm.handleItem(subItem)}}},[_c("label",{staticClass:"text",class:{disabled:_vm.isDisabled(subItem)},style:{color:_includesInstanceProperty(_context9=_vm.selectValue).call(_context9,subItem.value)?_vm.brandColor:""}},[_vm._v(" "+_vm._s(subItem.text)+" ")])])}),0)])}),0):_vm._e()])])])],1)],1)};var _sfc_staticRenderFns=[];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"d722fe02");var MulSelect=__component__.exports;exports.MulSelect=MulSelect;
|
|
@@ -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
|
|
7
|
+
import { b as bScroll } from "../../BScroll/index.mjs";
|
|
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
|
|
62
|
+
_this.scroll = new bScroll(_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("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 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 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;
|
|
@@ -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
|
|
10
|
+
import { b as bScroll } from "../BScroll/index.mjs";
|
|
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
|
|
362
|
+
_this5.scroller = new bScroll(limitIntroduct, {
|
|
363
363
|
bounce: false,
|
|
364
364
|
click: true,
|
|
365
365
|
probeType: 3
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require('./style.css');var BScroll=require("
|
|
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,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { b as bScroll } from "../../BScroll/index.mjs";
|
|
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
|
|
33
|
+
_this.scroller = new bScroll(signWrapper, {
|
|
34
34
|
bounce: false
|
|
35
35
|
});
|
|
36
36
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require('./style.css');var BScroll=require("
|
|
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,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { b as bScroll } from "../../BScroll/index.mjs";
|
|
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
|
|
67
|
+
_this.scroller = new bScroll(tables, {
|
|
68
68
|
scrollX: true,
|
|
69
69
|
scrollY: false,
|
|
70
70
|
click: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.act-gold-protocol[data-v-d7465672]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;line-height:1.4}.act-gold-protocol .act-gold-protocol-check[data-v-d7465672]{padding:2px 5px 0 0}.act-gold-protocol .act-gold-protocol-check .act-gold-protocol-icon[data-v-d7465672]{display:inline-block;width:14px;height:14px;border-radius:14px;background-repeat:no-repeat;background-position:50%;background-size:14px 14px;background-image:url(../assets/
|
|
1
|
+
.act-gold-protocol[data-v-d7465672]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;line-height:1.4}.act-gold-protocol .act-gold-protocol-check[data-v-d7465672]{padding:2px 5px 0 0}.act-gold-protocol .act-gold-protocol-check .act-gold-protocol-icon[data-v-d7465672]{display:inline-block;width:14px;height:14px;border-radius:14px;background-repeat:no-repeat;background-position:50%;background-size:14px 14px;background-image:url(../assets/check.442b.png);background-color:#e2e5e7}.act-gold-protocol .act-gold-protocol-check .act-gold-protocol-icon.checked[data-v-d7465672]{background-color:#8c7fee}.act-gold-protocol .act-gold-protocol-item[data-v-d7465672]{color:#8c7fee}.act-gold-protocol .act-gold-protocol-text[data-v-d7465672]{display:inline-block}.act-gold-protocol .act-gold-protocol-text a[data-v-d7465672]{text-decoration:none}
|
package/lib/Jigsaw/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import _JSON$stringify from "@babel/runtime-corejs3/core-js/json/stringify";
|
|
|
4
4
|
import { c as create } from "../utils/create/index.mjs";
|
|
5
5
|
import { f as fetch } from "../utils/post/index.mjs";
|
|
6
6
|
import { t as throttle, r as randomString } from "../utils/helpers/index.mjs";
|
|
7
|
-
import {
|
|
7
|
+
import { e as encrypt, C as CryptoJS, d as decrypt } from "../utils/encrypt/index.mjs";
|
|
8
8
|
import { L as Loading } from "../Loading/index.mjs";
|
|
9
9
|
import { v as visibleMixin } from "../mixins/gold-visible/index.mjs";
|
|
10
10
|
import { n as normalizeComponent } from "../common/index.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require('./style.css');var _Object$assign=require("@babel/runtime-corejs3/core-js/object/assign");var _includesInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/includes");var _concatInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/concat");var Vue=require("vue");var vue=require("@floating-ui/vue");var
|
|
1
|
+
"use strict";require('./style.css');var _Object$assign=require("@babel/runtime-corejs3/core-js/object/assign");var _includesInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/includes");var _concatInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/concat");var Vue=require("vue");var vue=require("@floating-ui/vue");var utils_clickOutside=require("../../utils/clickOutside/index.js");var Marketing_teleport=require("../teleport/index.js");var common=require("../../common/index.js");var __default__=Vue.defineComponent({name:"MarketingPopper"});var _sfc_main=_Object$assign(__default__,{props:{visible:{type:Boolean,default:void 0},disabled:{type:Boolean,default:false},trigger:{type:String,default:"hover",validator:function validator(value){var _context;return _includesInstanceProperty(_context=["click","hover"]).call(_context,value)}},to:{type:[String,Object,Element],default:null},fullScreen:{type:Boolean,default:false}},emits:["change","update:visible"],setup:function setup(__props,_ref){var emit=_ref.emit;var props=__props;function isDef(val){return val!==void 0&&val!==null}var showPopper=Vue.ref(false);var containerRef=Vue.ref(null);var reference=Vue.ref(null);var floating=Vue.ref(null);var isFullScreenMode=Vue.computed(function(){return props.fullScreen});Vue.watch(function(){return props.visible},function(val){showPopper.value=val},{immediate:true});utils_clickOutside.onClickOutside(floating,function(){changeVisible(false)});var toEl=Vue.computed(function(){return props.to||containerRef.value||void 0});function changeVisible(val){emit("update:visible",val);if(!isDef(props.visible)){showPopper.value=val}}function handleTrigger(){changeVisible(true)}function initFloat(){return vue.useFloating(reference,floating,{middleware:[vue.offset(!isFullScreenMode.value?{mainAxis:5}:{})],placement:isFullScreenMode.value?"right-start":"bottom-start",strategy:"fixed",whileElementsMounted:function whileElementsMounted(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}return vue.autoUpdate.apply(vue,_concatInstanceProperty(args).call(args,[{animationFrame:true}]))}})}var floatingData=initFloat();Vue.watchEffect(function(){floatingData=initFloat()});var floatingStrategy=Vue.computed(function(){var _floatingData;return((_floatingData=floatingData)===null||_floatingData===void 0||(_floatingData=_floatingData.strategy)===null||_floatingData===void 0?void 0:_floatingData.value)||"absolute"});var floatingStyles=Vue.computed(function(){var _floatingData2=floatingData,x=_floatingData2.x,y=_floatingData2.y;var containerEl=resolveEl(toEl.value);var left=x.value;var top=y.value;var needLandscapeTransform=isFullScreenMode.value&&containerEl;var transforms=needLandscapeTransform?["rotate(90deg) translate(0, 36px)"]:[];return{transform:transforms.join(" "),transformOrigin:"0 0",position:floatingStrategy.value,left:"".concat(left,"px"),top:"".concat(top,"px")}});function resolveEl(target){if(!isDef(target))return null;var unwrapped=Vue.unref(target);if(typeof unwrapped==="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,unwrapped)}return unwrapped}return{__sfc:true,isDef,props,emit,showPopper,containerRef,reference,floating,isFullScreenMode,toEl,changeVisible,handleTrigger,initFloat,floatingData,floatingStrategy,floatingStyles,resolveEl,xTeleport:Marketing_teleport.xTeleport}}});var _sfc_render=function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c("div",{ref:"containerRef",staticClass:"container"},[_c("span",{ref:"reference",on:{"click":function click($event){$event.stopPropagation();return _setup.handleTrigger.apply(null,arguments)}}},[_vm._t("reference")],2),_c(_setup.xTeleport,{attrs:{"to":_setup.toEl}},[!_vm.disabled&&_setup.showPopper?_c("div",{ref:"floating",staticClass:"marketing-popper",style:_setup.floatingStyles},[_vm._t("default")],2):_vm._e()])],1)};var _sfc_staticRenderFns=[];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,null);var popper=__component__.exports;exports.popper=popper;
|
|
@@ -3,7 +3,7 @@ import _includesInstanceProperty from "@babel/runtime-corejs3/core-js/instance/i
|
|
|
3
3
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
|
|
4
4
|
import { defineComponent, ref, computed, watch, watchEffect, unref } from "vue";
|
|
5
5
|
import { useFloating, offset, autoUpdate } from "@floating-ui/vue";
|
|
6
|
-
import { onClickOutside } from "
|
|
6
|
+
import { o as onClickOutside } from "../../utils/clickOutside/index.mjs";
|
|
7
7
|
import { x as xTeleport } from "../teleport/index.mjs";
|
|
8
8
|
import { n as normalizeComponent } from "../../common/index.mjs";
|
|
9
9
|
import './style.css';var __default__ = defineComponent({
|
|
@@ -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("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 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 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;
|
|
@@ -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
|
|
19
|
+
import { b as bScroll } from "../BScroll/index.mjs";
|
|
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
|
|
341
|
+
_this6.scroll = new bScroll(_this6.$refs.medicalList, {
|
|
342
342
|
click: true,
|
|
343
343
|
damping: 0.6
|
|
344
344
|
});
|
package/lib/Picker/index.js
CHANGED
|
@@ -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("
|
|
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;
|