webpackJsonp([17],{F2mu:function(t,s){},li0x:function(t,s,i){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var l=i("TWFi"),a=i("lGGP"),e=null,o={components:{AoNav:l.a},data:function(){return{lt_btn:this.$t("deal.lt_btn"),lt_txt:this.$t("deal.lt_txt"),lt_td:this.$t("deal.lt_td"),lt_dl:this.$t("deal.lt_dl"),form:{},dialogVisible:!1,list:[],all_profit_loss:"0",hazard_rate:"0",node_data:this.$t("deal.node_data")}},mounted:function(){var t=this;e&&clearInterval(e),this.currency=localStorage.getItem("web-currency"),this.currency||this.$router.back(-1),this.getPositionList(),e=setInterval(function(){t.getPositionList()},5e3)},destroyed:function(){e&&clearInterval(e)},methods:{ffff:function(t){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;return parseFloat(t).toFixed(s)},save:function(){var t=this;Object(a.i)({id:this.form.id,stop_profit:this.form.stop_profit,stop_loss:this.form.stop_loss}).then(function(s){t.dialogVisible=!1})},setpice:function(t){this.dialogVisible=!0,this.form=this.list[t]},getPositionList:function(){var t=this,s={currency:this.currency,is_pl_r:1};Object(a.q)(s).then(function(s){t.all_profit_loss=s.all_profit_loss,t.hazard_rate=s.hazard_rate,t.list=s.list})},position:function(t){var s=this,i={id:-1===t?-1:this.list[t].id};-1===t&&(i.currency=this.currency),Object(a.e)(i).then(function(i){s.list.splice(t,1)})}}},n={render:function(){var t=this,s=t.$createElement,i=t._self._c||s;return i("div",{staticClass:"levertransactions"},[i("ao-nav",{attrs:{"ao-style":{background:"#1b2945"}}}),t._v(" "),i("div",{staticClass:"box"},[i("div",{staticClass:"h"},[i("div",{staticClass:"t"},[t._v(t._s(t.lt_txt[0])+t._s(t.hazard_rate))]),t._v(" "),i("div",{staticClass:"t"},[t._v("\n        "+t._s(t.lt_txt[1])+"\n        "),i("span",{staticClass:"green"},[t._v(t._s(t.all_profit_loss))])]),t._v(" "),i("el-button",{on:{click:function(s){return t.position(-1)}}},[t._v(t._s(t.lt_btn[0]))])],1),t._v(" "),i("div",{staticClass:"table"},[i("div",{staticClass:"th"},t._l(t.lt_td,function(s,l){return i("td",{key:l,staticClass:"td",class:[0===l||l===t.lt_td.length-1?"td-2":""]},[t._v(t._s(s))])}),0),t._v(" "),t._l(t.list,function(s,l){return i("div",{key:l,staticClass:"tr"},[i("td",{staticClass:"td td-2"},[t._v(t._s(s.type_text))]),t._v(" "),i("td",{staticClass:"td"},[t._v(t._s(t.ffff(s.position_price)))]),t._v(" "),i("td",{staticClass:"td"},[t._v(t._s(t.ffff(s.new_price)))]),t._v(" "),i("td",{staticClass:"td"},[t._v(t._s(t.ffff(s.margin)))]),t._v(" "),i("td",{staticClass:"td"},[t._v(t._s(s.stop_profit))]),t._v(" "),i("td",{staticClass:"td"},[t._v(t._s(s.stop_loss))]),t._v(" "),i("td",{staticClass:"td"},[t._v(t._s(s.open_time))]),t._v(" "),i("td",{staticClass:"td"},[t._v(t._s(t.ffff(s.open_fee)))]),t._v(" "),i("td",{staticClass:"td"},[t._v(t._s(t.ffff(s.overnight_fee)))]),t._v(" "),i("td",{staticClass:"td"},[t._v(t._s(t.ffff(s.profit_loss)))]),t._v(" "),i("td",{staticClass:"td td-2"},[i("span",{staticClass:"btn",on:{click:function(s){return t.setpice(l)}}},[t._v(t._s(t.lt_btn[1]))]),t._v(" "),i("span",{staticClass:"btn",on:{click:function(s){return t.position(l)}}},[t._v(t._s(t.lt_btn[2]))])]),t._v(" "),i("td",{staticClass:"td"},[t._v(t._s(s.hazard_rate))])])})],2),t._v(" "),i("div",{staticClass:"no-data"},[t._v(t._s(0===t.list.length?t.node_data:""))])]),t._v(" "),i("el-dialog",{staticClass:"ao-el-dialog",attrs:{width:"40%",top:"10vh",title:t.lt_dl[0],center:!1,visible:t.dialogVisible},on:{"update:visible":function(s){t.dialogVisible=s}}},[i("el-form",{ref:"form",attrs:{model:t.form,"label-width":"100px"}},[i("el-form-item",{attrs:{label:t.lt_dl[1]}},[i("el-input",{model:{value:t.form.stop_profit,callback:function(s){t.$set(t.form,"stop_profit",s)},expression:"form.stop_profit"}})],1),t._v(" "),i("el-form-item",{attrs:{label:t.lt_dl[2]}},[i("el-input",{model:{value:t.form.stop_loss,callback:function(s){t.$set(t.form,"stop_loss",s)},expression:"form.stop_loss"}})],1)],1),t._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{type:"primary"},on:{click:t.save}},[t._v(t._s(t.lt_btn[3]))]),t._v(" "),i("el-button",{on:{click:function(s){t.dialogVisible=!1}}},[t._v(t._s(t.lt_btn[4]))])],1)],1)],1)},staticRenderFns:[]};var _=i("C7Lr")(o,n,!1,function(t){i("F2mu")},null,null);s.default=_.exports}});
//# sourceMappingURL=17.70e06d0ff624087f52ab.js.map