cus-index.053d3cba.js 16 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["cus-index"],{"0afa":function(t,e,a){"use strict";var s=a("1cb7"),n=a.n(s);n.a},"1cb7":function(t,e,a){},"23d6":function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"views",attrs:{id:"custom_index"}},[a("div",{staticClass:"chartSetting",class:{active:t.isChart}},[a("div",[a("i",{staticClass:"el-icon-close crm-cursor",on:{click:function(e){t.isChart=!1}}})]),a("div",{staticClass:"tit"},[a("span",{directives:[{name:"t",rawName:"v-t",value:"Custom.Index.ChartSet",expression:"'Custom.Index.ChartSet'"}]})]),a("el-form",{ref:"form",staticClass:"form",attrs:{model:t.ChartSet,"label-width":"0","label-position":"top"}},[a("el-form-item",{attrs:{label:t.$t("Label.ChartType")}},[a("el-select",{staticClass:"crm_select_icon_w",attrs:{filterable:"",placeholder:t.$t("placeholder.choose")},model:{value:t.ChartSet.type,callback:function(e){t.$set(t.ChartSet,"type",e)},expression:"ChartSet.type"}},[a("el-option",{attrs:{label:t.$t("Custom.Index.TradingVolumeStatistics"),value:4}}),a("el-option",{attrs:{label:t.$t("Custom.Index.DepositStatistical"),value:2}}),a("el-option",{attrs:{label:t.$t("Custom.Index.WithdrawalsStatistical"),value:3}}),a("el-option",{attrs:{label:t.$t("Custom.Index.ProfitLoss"),value:6}})],1)],1),a("el-form-item",{attrs:{label:t.$t("Label.PlatformType")}},[a("el-select",{staticClass:"crm_select_icon_w",attrs:{filterable:"",placeholder:t.$t("placeholder.choose")},model:{value:t.ChartSet.platform,callback:function(e){t.$set(t.ChartSet,"platform",e)},expression:"ChartSet.platform"}},[a("el-option",{attrs:{label:"MT4",value:"MT4"}})],1)],1),a("el-form-item",{attrs:{label:t.$t("Label.TradingAccount")}},[a("el-select",{staticClass:"crm_select_icon_w",attrs:{filterable:"",placeholder:t.$t("placeholder.choose")},model:{value:t.ChartSet.login,callback:function(e){t.$set(t.ChartSet,"login",e)},expression:"ChartSet.login"}},t._l(t.dropDown,(function(t){return a("el-option",{key:t.login,attrs:{label:t.login,value:t.login}})})),1)],1),a("el-form-item",[a("el-button",{directives:[{name:"t",rawName:"v-t",value:"Btn.Confirm",expression:"'Btn.Confirm'"}],staticClass:"s-btn",attrs:{type:"primary"},on:{click:t.getChart}})],1)],1)],1),a("div",{staticClass:"chart-box crm-border-radius"},[a("div",{staticClass:"chart-title"},[a("div",{staticClass:"time",on:{click:t.toReload}},[a("i",{staticClass:"el-icon-refresh crm-cursor"}),a("span",{staticClass:"crm-cursor"},[t._v(" GMT+8 "+t._s(t.time))])]),a("div",{staticClass:"title"},[a("div",{staticClass:"name"},[4==t.ChartSet.type?a("span",{directives:[{name:"t",rawName:"v-t",value:"Custom.Index.TradingVolumeStatistics",expression:"'Custom.Index.TradingVolumeStatistics'"}]}):t._e(),2==t.ChartSet.type?a("span",{directives:[{name:"t",rawName:"v-t",value:"Custom.Index.DepositStatistical",expression:"'Custom.Index.DepositStatistical'"}]}):t._e(),3==t.ChartSet.type?a("span",{directives:[{name:"t",rawName:"v-t",value:"Custom.Index.WithdrawalsStatistical",expression:"'Custom.Index.WithdrawalsStatistical'"}]}):t._e(),6==t.ChartSet.type?a("span",{directives:[{name:"t",rawName:"v-t",value:"Custom.Index.ProfitLoss",expression:"'Custom.Index.ProfitLoss'"}]}):t._e()]),t.ChartSet.login?a("div",{staticClass:"account"},[a("span",{directives:[{name:"t",rawName:"v-t",value:"Custom.Index.TradingAccount",expression:"'Custom.Index.TradingAccount'"}]}),a("span",[t._v(" — ")]),a("span",[t._v(t._s(t.ChartSet.login))])]):t._e(),a("div",{staticClass:"date"},[a("el-date-picker",{attrs:{type:"daterange",size:"small","unlink-panels":"","value-format":"yyyy-MM-dd","range-separator":"—","start-placeholder":t.$t("placeholder.Start"),"end-placeholder":t.$t("placeholder.End")},on:{change:t.getSearchDate},model:{value:t.isDate,callback:function(e){t.isDate=e},expression:"isDate"}})],1)]),a("div",{staticClass:"operation"},[a("span",{directives:[{name:"t",rawName:"v-t",value:"Custom.Index.Parameter",expression:"'Custom.Index.Parameter'"}],staticStyle:{"font-size":"14px"}}),a("i",{staticClass:"iconfont iconcanshu crm-cursor",on:{click:function(e){t.isChart=!0}}})])]),a("div",{attrs:{id:"myChart"}})]),a("div",{staticClass:"accounts"},[a("div",{staticClass:"account-top crm-title-box"},[a("span",{staticClass:"tit"},[a("span",{directives:[{name:"t",rawName:"v-t",value:"Custom.Index.AccountList",expression:"'Custom.Index.AccountList'"}]})]),a("span",{staticClass:"btn crm-cursor",on:{click:t.toNewAccount}},[a("i",{staticClass:"el-icon-plus"}),a("span",{directives:[{name:"t",rawName:"v-t",value:"Custom.Index.AddAccount",expression:"'Custom.Index.AddAccount'"}]})])]),a("div",{staticClass:"search"},[a("span",{staticClass:"crm-cursor",class:{active:"MT4"==t.platform},on:{click:function(e){return t.tableSearch("MT4")}}},[t._v("MT4")]),t._e()]),a("div",{staticClass:"tab"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.pictLoading,expression:"pictLoading"}],staticClass:"crm_tab_header",staticStyle:{width:"100%"},attrs:{data:t.tableData,"element-loading-background":"rgba(43, 48, 67, 0.05)","element-loading-spinner":"el-icon-loading"}},[a("el-table-column",{attrs:{align:"center","header-align":"center",label:t.$t("Label.TradingAccount")},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.login||"-"))]}}])}),a("el-table-column",{attrs:{align:"center",label:t.$t("Label.AccountType")},scopedSlots:t._u([{key:"default",fn:function(e){return[1==e.row.type?a("span",{directives:[{name:"t",rawName:"v-t",value:"AccountType.ClassicAccount",expression:"'AccountType.ClassicAccount'"}]}):t._e(),2==e.row.type?a("span",{directives:[{name:"t",rawName:"v-t",value:"AccountType.SeniorAccount",expression:"'AccountType.SeniorAccount'"}]}):t._e(),3==e.row.type?a("span",{directives:[{name:"t",rawName:"v-t",value:"AccountType.AgencyAccount",expression:"'AccountType.AgencyAccount'"}]}):t._e(),5==e.row.type?a("span",{directives:[{name:"t",rawName:"v-t",value:"AccountType.SpeedAccount",expression:"'AccountType.SpeedAccount'"}]}):t._e()]}}])}),a("el-table-column",{attrs:{align:"center",width:t.lang?"100":"",label:t.$t("Label.Leverage")},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.leverage?a("span",[t._v("1:")]):t._e(),t._v(t._s(e.row.leverage||"-"))]}}])}),a("el-table-column",{attrs:{align:"center",label:t.$t("Label.Equity")},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("$"+t._s(e.row.equity||"0"))]}}])}),a("el-table-column",{attrs:{align:"center",label:t.$t("Label.Credit")},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.credit||"0"))]}}])}),a("el-table-column",{attrs:{align:"center",label:t.$t("Label.Balance")},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("$"+t._s(e.row.balance||"0"))]}}])}),a("el-table-column",{attrs:{align:"center",label:t.$t("Label.Action"),width:"220"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"tab-act-btn"},["-1"==e.row.closeFunctions.indexOf("1")?a("span",{staticClass:"crm-font-btn",on:{click:function(a){return t.toDeposit(e.row)}}},[a("i",{staticClass:"el-icon-arrow-right"}),a("span",{directives:[{name:"t",rawName:"v-t",value:"Custom.Index.Deposit",expression:"'Custom.Index.Deposit'"}]})]):a("span",{staticClass:"crm-font-btn",on:{click:t.tips}},[a("i",{staticClass:"el-icon-arrow-right"}),a("span",{directives:[{name:"t",rawName:"v-t",value:"Custom.Index.Deposit",expression:"'Custom.Index.Deposit'"}],staticStyle:{color:"#000000",opacity:"1!important"}})]),"-1"==e.row.closeFunctions.indexOf("2")?a("span",{staticClass:"crm-font-btn",on:{click:function(a){return t.toWithdraw(e.row)}}},[a("i",{staticClass:"el-icon-arrow-left"}),a("span",{directives:[{name:"t",rawName:"v-t",value:"Custom.Index.Withdrawals",expression:"'Custom.Index.Withdrawals'"}]})]):a("span",{staticClass:"crm-font-btn",on:{click:t.tips}},[a("i",{staticClass:"el-icon-arrow-left"}),a("span",{directives:[{name:"t",rawName:"v-t",value:"Custom.Index.Withdrawals",expression:"'Custom.Index.Withdrawals'"}],staticStyle:{color:"#000000",opacity:"1!important"}})])]),a("div",{staticClass:"tab-act-btn"},["-1"==e.row.closeFunctions.indexOf("3")?a("span",{staticClass:"crm-font-btn",on:{click:function(a){return t.toTransfer(e.row)}}},[a("i",{staticClass:"el-icon-sort"}),a("span",{directives:[{name:"t",rawName:"v-t",value:"Custom.Index.Transfer",expression:"'Custom.Index.Transfer'"}]})]):a("span",{staticClass:"crm-font-btn",on:{click:t.tips}},[a("i",{staticClass:"el-icon-sort"}),a("span",{directives:[{name:"t",rawName:"v-t",value:"Custom.Index.Transfer",expression:"'Custom.Index.Transfer'"}],staticStyle:{color:"#000000",opacity:"1!important"}})]),a("span",{staticClass:"crm-font-btn",on:{click:function(a){return t.toSettings(e.row)}}},[a("i",{staticClass:"el-icon-setting"}),a("span",{directives:[{name:"t",rawName:"v-t",value:"Custom.Index.Settings",expression:"'Custom.Index.Settings'"}]})])])]}}])})],1),t.pagerInfo.rowTotal?a("div",{staticClass:"crm_pagination"},[a("el-pagination",{staticClass:"page",attrs:{background:"",layout:"prev, pager, next","page-size":t.pagerInfo.row,total:t.pagerInfo.rowTotal},on:{"current-change":t.handleCurrentChange}})],1):t._e()],1)]),a("el-dialog",{attrs:{visible:t.dialogCheck,center:"","show-close":!1,"custom-class":"dialog_header_w"},on:{"update:visible":function(e){t.dialogCheck=e}}},[a("div",{staticClass:"dia-content"},[a("div",{directives:[{name:"t",rawName:"v-t",value:"Home.msg.content1",expression:"'Home.msg.content1'"}],staticClass:"des1"}),a("div",{staticClass:"icon"},[a("i",{staticClass:"iconfont iconziliaobuchong",staticStyle:{"font-size":"60px"}})]),a("div",{directives:[{name:"t",rawName:"v-t",value:"Home.msg.content2",expression:"'Home.msg.content2'"}],staticClass:"des2"}),a("div",{directives:[{name:"t",rawName:"v-t",value:"Home.msg.content3",expression:"'Home.msg.content3'"}],staticClass:"des2"}),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{directives:[{name:"t",rawName:"v-t",value:"Btn.Cancel",expression:"'Btn.Cancel'"}],on:{click:function(e){t.dialogCheck=!1}}}),a("el-button",{directives:[{name:"t",rawName:"v-t",value:"Home.msg.btnImmediately",expression:"'Home.msg.btnImmediately'"}],attrs:{type:"primary"},on:{click:t.immediately}})],1)])])],1)},n=[],i=(a("4160"),a("ac1f"),a("1276"),a("159b"),a("5530")),r=(a("96cf"),a("1da1")),o=a("eec4"),c=a.n(o),l=a("6df7"),u=a("f121"),m=a.n(u),d=m.a.Code,p={name:"Customer",components:{},inject:["reload"],data:function(){return{flag:!1,flag1:!1,pictLoading:!1,platform:"MT4",ChartSet:{type:4,platform:"MT4",login:"",startDate:"",endDate:""},isChart:!1,isDate:[],dropDown:[],time:"",value:"",input:"",tableData:[],form:{},chartDates:[],chartTimes:[],dialogCheck:!1,pagerInfo:{row:10,current:1,pageTotal:0,rowTotal:10}}},computed:{lang:function(){return"en"==this.Session.Get("lang")&&document.body.clientWidth<1300}},methods:{tableSearch:function(t){this.platform=t,this.getDateList()},getSearchDate:function(t){this.ChartSet.startDate=t[0],this.ChartSet.endDate=t[1],this.getChart()},getDateList:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.pictLoading=!0,t.next=3,l["a"].AccountList({platform:this.platform,page:{current:this.pagerInfo.current,row:this.pagerInfo.row}});case 3:e=t.sent,e.code==d.StatusOK?null!=e.data?(this.tableData=e.data,this.pagerInfo.rowTotal=e.page.rowTotal,this.pagerInfo.pageTotal=e.page.pageTotal,this.pictLoading=!1):(this.tableData=e.data,this.pictLoading=!1):(this.$pigeon.MessageError(e.msg),this.pictLoading=!1);case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),getAccountList:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,l["a"].CustomDropdown({platform:this.ChartSet.platform});case 2:e=t.sent,e.code==d.StatusOK?this.dropDown=e.data:this.$pigeon.MessageError(e.msg);case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),getChart:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e,a=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!this.flag){t.next=4;break}return t.abrupt("return");case 4:this.flag=!0;case 5:return this.chartDates=[],this.chartTimes=[],t.next=9,l["a"].getChartInfo(Object(i["a"])({},this.ChartSet));case 9:e=t.sent,e.code==d.StatusOK?(e.data.forEach((function(t){a.chartDates.push(t.amount),a.chartTimes.push(t.date.split(" ")[0])})),this.drawLine(),this.$pigeon.MessageOK(this.$i18n.t("Msg.SearchSuccess")),this.flag=!1):(this.$pigeon.MessageError(e.msg),this.flag=!1);case 11:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),getLoginInfo:function(){var t=this;return Object(r["a"])(regeneratorRuntime.mark((function e(){var a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,l["a"].CustomLoginInfo();case 2:a=e.sent,a.code==d.StatusOK?(t.$store.commit("InitInfo",a.data),2==a.data.customInfo.status&&2==a.data.customInfo.applyRealStatus?(t.$router.push({path:"/customer/new"}).catch((function(t){return t})),t.$store.commit("isActiveTab","0")):t.dialogCheck=!0):t.$pigeon.MessageError(t.$i18n.t("Msg.SystemError"));case 4:case"end":return e.stop()}}),e)})))()},immediately:function(){this.$router.push({path:"/improve/immediately"}).catch((function(t){return t})),this.dialogCheck=!1},tips:function(){this.$pigeon.MessageWarning(this.$i18n.t("news_add_field.Des.item1"))},toNewAccount:function(){this.getLoginInfo()},toSettings:function(t){this.$router.push({path:"/customer/settings",query:{login:t.login,platform:t.platform,type:t.type,currency:t.currency,leverage:t.leverage}}).catch((function(t){return t})),this.$store.commit("isActiveTab","0")},toDeposit:function(t){this.$router.push({path:"/customer/deposit",query:{login:t.login}}).catch((function(t){return t})),this.$store.commit("isActiveTab","2")},toWithdraw:function(t){this.$router.push({path:"/customer/withdraw",query:{login:t.login}}).catch((function(t){return t})),this.$store.commit("isActiveTab","3")},toTransfer:function(t){this.$router.push({path:"/customer/transfer",query:{login:t.login}}).catch((function(t){return t})),this.$store.commit("isActiveTab","5")},getDate:function(){var t,e=8,a=(new Date).getTimezoneOffset(),s=(new Date).getTime(),n=new Date(s+60*a*1e3+60*e*60*1e3),i=n.getMonth()+1,r=n.getDate(),o=n.getHours(),c=n.getMinutes();i<10&&(i="0"+i),r<10&&(r="0"+r),o<10&&(o="0"+o),c<10&&(c="0"+c),t=" "+o+":"+c+" "+i+"/"+r,this.time=t},goTime:function(){this.getDate();var t=8,e=(new Date).getTimezoneOffset(),a=(new Date).getTime(),s=new Date(a+60*e*1e3+60*t*60*1e3),n=s.setDate(1),i=s.setMonth(s.getMonth()+1),r=new Date(n).getFullYear(),o=new Date(n).getMonth()+1,c=new Date(n).getDate(),l=new Date(i).getFullYear(),u=new Date(i).getMonth()+1,m=1;this.ChartSet.startDate=r+"-"+(o<10?"0"+o:o)+"-"+(c<10?"0"+c:c),this.ChartSet.endDate=l+"-"+(u<10?"0"+u:u)+"-"+(m<10?"0"+m:m),this.isDate=[this.ChartSet.startDate,this.ChartSet.endDate],this.getChart()},toReload:function(){var t=this;this.flag1||(this.flag1=!0,this.goTime(),this.getDateList(),this.getAccountList(),this.divInit(),setTimeout((function(){t.flag1=!1}),2e3))},drawLine:function(){var t=this.$echarts.init(document.getElementById("myChart")),e=this.chartTimes,a=this.chartDates,s={title:{text:"",subtext:"",left:"center"},tooltip:{trigger:"axis",axisPointer:{animation:!1}},axisPointer:{link:{xAxisIndex:"all"}},grid:[{left:50,right:50,bottom:50,height:"75%"}],xAxis:[{type:"category",boundaryGap:!1,axisLine:{onZero:!0},data:e}],yAxis:[{name:"",type:"value"}],series:[{name:"",type:"line",symbolSize:8,hoverAnimation:!1,data:a}]};t.setOption(s)},divInit:function(){var t=this,e=c()({strategy:"scroll"});e.listenTo(document.getElementById("custom_index"),(function(){t.$nextTick((function(){t.chart=t.$echarts.init(document.getElementById("myChart")),t.chart.resize()}))}))},handleSizeChange:function(t){this.pagerInfo.row=t,this.getDateList()},handleCurrentChange:function(t){this.pagerInfo.current=t,this.getDateList()}},mounted:function(){this.goTime(),this.getDateList(),this.getAccountList(),this.divInit()},beforeDestroy:function(){this.getDate&&clearInterval(this.getDate)},watch:{"ChartSet.platform":function(){this.ChartSet.login="",this.getAccountList()}}},h=p,g=(a("0afa"),a("cc4f"),a("2877")),f=Object(g["a"])(h,s,n,!1,null,"5524572c",null);e["default"]=f.exports},"8f9b":function(t,e,a){},cc4f:function(t,e,a){"use strict";var s=a("8f9b"),n=a.n(s);n.a}}]);