hengmei-two/unpackage/dist/build/mp-baidu/pagesA/nodifyData/nodifyData.js

1 line
7.0 KiB
JavaScript
Raw Normal View History

2021-08-19 06:40:59 +00:00
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesA/nodifyData/nodifyData"],{"224f":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i("bf0a"),s={props:["lotusAddressData"],data:function(){return{visible:!1,province:[],city:[],town:[],provinceName:"",cityName:"",townName:"",type:0,pChoseIndex:-1,cChoseIndex:-1,tChoseIndex:-1}},methods:{cancelPicker:function(){var t=this.getTarId(this.provinceName),e=this.getTarId(this.cityName),i=this.getTarId(this.townName);this.visible=!1,this.$emit("choseVal",{province:this.provinceName,provinceCode:t,city:this.cityName,cityCode:e,town:this.townName,townCode:i,isChose:0,visible:!1})},chosedVal:function(){this.type=1;var t=this.getTarId(this.provinceName),e=this.getTarId(this.cityName),i=this.getTarId(this.townName);this.visible=!1;var n=0;(this.provinceName&&this.cityName||this.provinceName&&this.cityName&&this.townName)&&(n=1),this.$emit("choseVal",{province:this.provinceName,provinceCode:t,city:this.cityName,cityCode:e,town:this.townName,townCode:i,isChose:n,visible:!1})},getTarId:function(t,e){var i=0;return n.lotusAddressJson.map((function(e,n){e.name===t&&(i=e.value)})),i},getCityArr:function(t){var e=[];return n.lotusAddressJson.map((function(i,n){i.parent===t&&e.push(i.name)})),e},getTownArr:function(t){var e=[];return n.lotusAddressJson.map((function(i,n){n>34&&i.parent===t&&e.push(i.name)})),e},initFn:function(){var t=this;this.province.length||n.lotusAddressJson.map((function(e,i){i<=34&&t.province.push(e.name)}));var e=this._props.lotusAddressData.provinceName,i=this._props.lotusAddressData.cityName,s=this._props.lotusAddressData.townName;if(e&&(this.pChoseIndex=this.getTarIndex(this.province,e)),e&&i){var a=this.getTarId(e);this.city=this.getCityArr(a),this.cChoseIndex=this.getTarIndex(this.city,i)}if(e&&i&&s){var r=this.getTarId(i);this.town=this.getTownArr(r),this.tChoseIndex=this.getTarIndex(this.town,s)}e||i||s||(this.pChoseIndex=-1,this.cChoseIndex=-1,this.tChoseIndex=-1,this.city=[],this.town=[])},getChosedData:function(){var t=this.getTarId(this.provinceName,"province");this.city=this.getCityArr(t);var e=this.getTarId(this.cityName,"city");this.town=this.getTownArr(e),this.provinceName&&(this.pChoseIndex=this.getTarIndex(this.province,this.provinceName)),this.cityName&&(this.cChoseIndex=this.getTarIndex(this.city,this.cityName)),this.townName&&(this.tChoseIndex=this.getTarIndex(this.town,this.townName))},clickPicker:function(t,e,i){0===t&&(this.pChoseIndex=e,this.provinceName=i,this.cChoseIndex=-1,this.tChoseIndex=-1,this.cityName="",this.townName=""),1===t&&(this.cChoseIndex=e,this.cityName=i,this.tChoseIndex=-1,this.townName=""),2===t&&(this.tChoseIndex=e,this.townName=i),this.getChosedData()},getTarIndex:function(t,e){var i=0;return t.map((function(t,n){t===e&&(i=n)})),i}},computed:{checkStatus:function(){var t=null,e=this;return e.visible||(e.visible=e._props.lotusAddressData.visible,e.provinceName=e._props.lotusAddressData.provinceName,e.cityName=e._props.lotusAddressData.cityName,e.townName=e._props.lotusAddressData.townName,e.initFn(),t=e.visible),t}}};e.default=s},2992:function(t,e,i){"use strict";i.r(e);var n=i("d0dd"),s=i.n(n);for(var a in n)"default"!==a&&function(t){i.d(e,t,(function(){return n[t]}))}(a);e["default"]=s.a},3151:function(t,e,i){"use strict";var n=i("bd8b"),s=i.n(n);s.a},"99fa":function(t,e,i){"use strict";i.r(e);var n=i("a269"),s=i("aac0");for(var a in s)"default"!==a&&function(t){i.d(e,t,(function(){return s[t]}))}(a);i("3151");var r,o=i("f0c5"),c=Object(o["a"])(s["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],r);e["default"]=c.exports},"9f44":function(t,e,i){"use strict";i.d(e,"b",(function(){return s})),i.d(e,"c",(function(){return a})),i.d(e,"a",(function(){return n}));var n={simpleAddress:function(){return Promise.all([i.e("common/vendor"),i.e("components/simple-address/simple-address")]).then(i.bind(null,"1448"))}},s=function(){var t=this,e=t.$createElement,i=(t._self._c,t.__map(t.dataList,(function(e,i){var n=t.__get_orig(e),s=2==i?e.title.charAt(0):null,a=2==