You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
5.1 KiB
1 line
5.1 KiB
2 years ago
|
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["oilDistribution/newSeleCompany/newSeleCompany"],{"15d1":function(t,e,a){"use strict";var n=a("814e"),i=a.n(n);i.a},"2f88":function(t,e,a){"use strict";a.r(e);var n=a("6d02"),i=a.n(n);for(var s in n)"default"!==s&&function(t){a.d(e,t,(function(){return n[t]}))}(s);e["default"]=i.a},"6d02":function(t,e,a){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=s(a("a34a")),i=s(a("f9bd"));function s(t){return t&&t.__esModule?t:{default:t}}function r(t,e,a,n,i,s,r){try{var o=t[s](r),l=o.value}catch(c){return void a(c)}o.done?e(l):Promise.resolve(l).then(n,i)}function o(t){return function(){var e=this,a=arguments;return new Promise((function(n,i){var s=t.apply(e,a);function o(t){r(s,n,i,o,l,"next",t)}function l(t){r(s,n,i,o,l,"throw",t)}o(void 0)}))}}var l=function(){a.e("components/scroll").then(function(){return resolve(a("6757"))}.bind(null,a)).catch(a.oe)},c={components:{scroll:l},data:function(){return{typeData:"",scrollY:!1,timer:null,barIndex:0,seachValue:"",seleBarData:[{lable:"柴油",value:0},{lable:"天然气",value:1},{lable:"尿素",value:2}],lately:[],list:[],selecompany:null,page:{currentPage:1,pageSize:10,index:"0",params:{companyType:"",nameOrCid:"",parentId:"",parentMark:""}}}},onLoad:function(t){t.jsData&&(this.typeData=JSON.parse(t.jsData),"send"!==this.typeData.type&&(console.log(this.typeData.data.companyType,"****************"),this.barIndex=0==Number(this.typeData.data.companyType)?Number(this.typeData.data.companyType):2==Number(this.typeData.data.companyType)?1:2)),this.initFn()},filters:{companyType:function(t){switch(Number(t)){case 0:return"FUEL";case 1:return"OIL";case 2:return"LNG";case 3:return"SCR"}}},methods:{initFn:function(){var e=this;return o(n.default.mark((function a(){var s;return n.default.wrap((function(a){while(1)switch(a.prev=a.next){case 0:s=t.getStorageSync(e.typeData.type),"send"==e.typeData.type?i.default.findThreeDataByIds(s||[]).then((function(t){2e4===t.code&&(e.list=t.data?t.data:[])})):e.getzlist();case 2:case"end":return a.stop()}}),a)})))()},setLately:function(e){var a=t.getStorageSync(this.typeData.type)?t.getStorageSync(this.typeData.type):[];if(console.log(" %c look ↓","color:red;font-size:50px"),console.log(a),0!==a.length){var n=!1;a.forEach((function(t){t.id==e.id&&(console.log(t.id==e.id),n=!0)})),n||(3==a.length&&a.splice(2,1),a.unshift(e.id),t.setStorageSync(this.typeData.type,a))}else a.unshift(e.id),t.setStorageSync(this.typeData.type,a)},seleFn:function(e){clearTimeout(this.timer),this.selecompany=e,this.selecompany.type=this.typeData.type,this.setLately(e),t.$emit("company",this.selecompany),this.timer=setTimeout((function(){t.navigateBack()}),200)},getflist:function(){var e=this;this.scrollY=!0;var a={companyType:0==this.barIndex?this.barIndex:1==this.barIndex?2:3,nameOrCid:this.seachValue,parentId:null,parentMark:null};this.page.params=Object.assign(this.page.params,a),i.default.findAllByField(this.page).then((function(a){2e4==a.code&&(0==a.data.list.length&&t.showToast({title:"没有数据了哦",icon:"none"}),1===e.page.currentPage?e.list=a.data.list:e.list=e.list.concat(a.data.list))}))},getzlist:function(){var e=this;this.scrollY=!0;var a={companyType:0==this.barIndex?this.barIndex:1==this.barIndex?2:3,nameOrCid:this.seachValue,parentId:0==this.typeData.data.parentMark?this.typeData.data.id:this.typeData.data.parentId,parentMark:1};this.page.params=Object.assign(this.page.params,a),i.default.findAllByField(this.page).then((function(a){2e4==a.code&&(0==a.data.list.length&&t.showToast({title:"没有数据了哦",icon:"none"}),1===e.page.currentPage?e.list=a.data.list:e.list=e.list.concat(a.data.list))}))},scrolltolower:function(){this.page.currentPage+=1,"send"==this.typeData.type?this.getflist():this.getzlist()},seachFn:function(){this.scrollY=!0,this.page.currentPage=1,"send"==this.typeData.type?this.getflist():this.getzlist()},seleBarFn:function(t){this.page.currentPage=1,"send"==this.typeData.type?(this.barIndex=t,this.getflist()):this.getzlist()}
|