| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-36614ca6"],{1148:function(t,e,r){"use strict";var o=r("a691"),i=r("1d80");t.exports="".repeat||function(t){var e=String(i(this)),r="",n=o(t);if(n<0||n==1/0)throw RangeError("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(e+=e))1&n&&(r+=e);return r}},2934:function(t,e,r){"use strict";r.d(e,"c",(function(){return i})),r.d(e,"b",(function(){return n})),r.d(e,"a",(function(){return a}));var o=r("b775");function i(t){return Object(o["b"])({url:"/common/file/images",method:"post",data:t})}function n(t){return Object(o["b"])({url:"/coin/price",method:"get",params:t})}function a(){return Object(o["b"])({url:"/country-code/index",method:"get"})}},"408a":function(t,e,r){var o=r("c6b6");t.exports=function(t){if("number"!=typeof t&&"Number"!=o(t))throw TypeError("Incorrect invocation");return+t}},5641:function(t,e,r){},"7c06":function(t,e,r){"use strict";var o=r("5641"),i=r.n(o);i.a},8080:function(t,e,r){"use strict";r.r(e);var o=function(){var t=this,e=this,r=e.$createElement,o=e._self._c||r;return o("div",{staticClass:"app-container layout-vertical"},[o("YMTableSearch",{attrs:{"search-form":e.searchForm},on:{submit:e.onSubmit}}),o("YMTable",{ref:"table",attrs:{selection:!1,columns:e.columns,"rows-actions":[{key:"editdiy",label:"编辑",method:function(e){t.outerVisible=!0,t.form=Object.assign({},e),t.form.start_time=1e3*t.form.start_time,t.form.end_time=1e3*t.form.end_time,t.getPice(t.form.coin)}},{key:"delete",label:"删除"}],"edit-form":e.editForm,"table-options":e.tableOptions,"detail-format":e.detailFormat,apis:e.apis}}),o("el-dialog",{attrs:{title:e.form.id?"编辑":"新增",visible:e.outerVisible,width:"480px"},on:{"update:visible":function(t){e.outerVisible=t}}},[o("el-form",{ref:"ruleForm",attrs:{model:e.form,rules:e.rules,"label-width":"120px"}},[o("el-form-item",{attrs:{label:"币种",prop:"coin"}},[o("el-select",{staticStyle:{width:"100%"},attrs:{size:"small",placeholder:"请选择币种"},on:{change:function(t){return e.getPice(e.form.coin)}},model:{value:e.form.coin,callback:function(t){e.$set(e.form,"coin",t)},expression:"form.coin"}},e._l(e.coinopt,(function(t){return o("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),o("el-form-item",{attrs:{label:"币种价格"}},[o("div",{staticStyle:{color:"#46b498"}},[e._v(e._s(e.Pice||"--"))])]),o("el-form-item",{attrs:{label:"币种起始价格",prop:"start_price"}},[o("el-input",{attrs:{size:"small",placeholder:"币种起始价格"},model:{value:e.form.start_price,callback:function(t){e.$set(e.form,"start_price",t)},expression:"form.start_price"}})],1),o("el-form-item",{attrs:{label:"目标价格",prop:"price"}},[o("el-input",{attrs:{size:"small",placeholder:"目标价格"},model:{value:e.form.price,callback:function(t){e.$set(e.form,"price",t)},expression:"form.price"}})],1),o("el-form-item",{attrs:{label:"市场",prop:"market"}},[o("el-radio",{attrs:{size:"small",label:"1"},model:{value:e.form.market,callback:function(t){e.$set(e.form,"market",t)},expression:"form.market"}},[e._v("市场")])],1),o("el-form-item",{attrs:{label:"状态",prop:"status"}},[o("el-radio",{attrs:{size:"small",label:"1"},model:{value:e.form.status,callback:function(t){e.$set(e.form,"status",t)},expression:"form.status"}},[e._v("启用")]),o("el-radio",{attrs:{size:"small",label:"0"},model:{value:e.form.status,callback:function(t){e.$set(e.form,"status",t)},expression:"form.status"}},[e._v("禁用")]),o("el-radio",{attrs:{size:"small",label:"-1"},model:{value:e.form.status,callback:function(t){e.$set(e.form,"status",t)},expression:"form.status"}},[e._v("删除")])],1),o("el-form-item",{attrs:{label:"\t起始时间",prop:"start_time"}},[o("el-date-picker",{staticStyle:{width:"100%"},attrs:{size:"small",type:"datetime","value-format":"timestamp",placeholder:"选择日期"},model:{value:e.form.start_time,callback:function(t){e.$set(e.form,"start_time",t)},expression:"form.start_time"}})],1),o("el-form-item",{attrs:{label:"\t截止时间",prop:"end_time"}},[o("el-date-picker",{staticStyle:{width:"100%"},attrs:{size:"small","value-format":"timestamp",type:"datetime",placeholder:"选择日期"},model:{value:e.form.end_time,callback:function(t){e.$set(e.form,"end_time",t)},expression:"form.end_time"}})],1),o("el-form-item",[o("el-button",{on:{click:e.onreturn}},[e._v("返回")]),o("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.submitForm("ruleForm")}}},[e._v("提交")])],1)],1)],1)],1)},i=[],n=(r("4160"),r("a9e3"),r("b680"),r("159b"),r("5530")),a=r("e074"),l=r("c466"),c=r("365c"),s=r("2934"),u={data:function(){var t=this;return{listLoading:!0,outerVisible:!1,formatDate:l["a"],Pice:"",form:{coin:"",start_price:"",price:"",market:"",start_time:"",end_time:"",status:""},coinopt:[],searchForm:[],editForm:[{header:"主要信息",body:[]}],detailFormat:[],columns:[{label:"币种",prop:"coin"},{label:"币种起始价格",prop:"start_price",method:function(t){return Number(null===t||void 0===t?void 0:t.start_price).toFixed(2)}},{label:"目标价格",prop:"price"},{label:"市场",prop:"market",method:function(t){return"1"===t.market?"现货":"--"}},{label:"起始时间",prop:"start_time",method:function(t){return Object(l["a"])(t.start_time)}},{label:"截止时间",prop:"end_time",method:function(t){return Object(l["a"])(t.end_time)}},{label:"状态",prop:"status",method:function(t){return"-1"===t.status?"删除":"0"===t.status?"禁用":"启用"}}],tableOptions:{add:{show:!0,method:function(){for(var e in t.outerVisible=!0,t.Pice="",t.form)t.form.hasOwnProperty(e)&&(t.form[e]=null)}}},apis:{list:{url:"contract1x-control/index",dataParam:"data.list",resultParam:"data",pageSize:"page_size"},edit:{url:"contract1x-control/update",additionParam:["id"],method:"put"},add:{url:"contract1x-control/create"},delete:{url:"contract1x-control/delete",method:"delete",additionParam:["id"]}},rules:{coin:[{required:!0,message:"请选择币种",trigger:"blur"}],start_price:[{required:!0,message:"请输入币种起始价格",trigger:"blur"}],price:[{required:!0,message:"请输入目标价格",trigger:"blur"}],market:[{required:!0,message:"请选择市场",trigger:"blur"}],end_time:[{required:!0,message:"请选择截止时间",trigger:"blur"}],start_time:[{required:!0,message:"请选择起始时间",trigger:"blur"}],status:[{required:!0,message:"请选择状态",trigger:"blur"}]}}},created:function(){var t=this;Object(a["c"])({page_size:100}).then((function(e){t.coinopt=[],e.data.list.forEach((function(e){t.coinopt.push({label:e.currency,value:e.currency})}))}))},methods:{getPice:function(t){var e=this;Object(s["b"])({coin:t,maket:1}).then((function(t){e.Pice=t.data.price,console.log(t.data.price)}))},submitForm:function(){var t=this,e=Object(n["a"])(Object(n["a"])({},this.form),{},{start_time:this.form.start_time/1e3,end_time:this.form.end_time/1e3});this.$refs["ruleForm"].validate((function(r){r&&(t.form.id?Object(c["Nb"])(e).then((function(e){200==e.code?(t.outerVisible=!1,t.onSubmit(),t.$message.success("提交成功!")):t.$message.error(e.message)})):Object(c["Mb"])(e).then((function(e){200==e.code?(t.outerVisible=!1,t.onSubmit(),t.$message.success("提交成功!")):t.$message.error(e.message)})))}))},onreturn:function(){this.$refs["ruleForm"].resetFields(),this.outerVisible=!1},onSubmit:function(t){this.$refs.table.getList(t)}}},m=u,f=(r("7c06"),r("2877")),d=Object(f["a"])(m,o,i,!1,null,"31b45786",null);e["default"]=d.exports},b680:function(t,e,r){"use strict";var o=r("23e7"),i=r("a691"),n=r("408a"),a=r("1148"),l=r("d039"),c=1..toFixed,s=Math.floor,u=function(t,e,r){return 0===e?r:e%2===1?u(t,e-1,r*t):u(t*t,e/2,r)},m=function(t){var e=0,r=t;while(r>=4096)e+=12,r/=4096;while(r>=2)e+=1,r/=2;return e},f=c&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!l((function(){c.call({})}));o({target:"Number",proto:!0,forced:f},{toFixed:function(t){var e,r,o,l,c=n(this),f=i(t),d=[0,0,0,0,0,0],b="",p="0",h=function(t,e){var r=-1,o=e;while(++r<6)o+=t*d[r],d[r]=o%1e7,o=s(o/1e7)},g=function(t){var e=6,r=0;while(--e>=0)r+=d[e],d[e]=s(r/t),r=r%t*1e7},v=function(){var t=6,e="";while(--t>=0)if(""!==e||0===t||0!==d[t]){var r=String(d[t]);e=""===e?r:e+a.call("0",7-r.length)+r}return e};if(f<0||f>20)throw RangeError("Incorrect fraction digits");if(c!=c)return"NaN";if(c<=-1e21||c>=1e21)return String(c);if(c<0&&(b="-",c=-c),c>1e-21)if(e=m(c*u(2,69,1))-69,r=e<0?c*u(2,-e,1):c/u(2,e,1),r*=4503599627370496,e=52-e,e>0){h(0,r),o=f;while(o>=7)h(1e7,0),o-=7;h(u(10,o,1),0),o=e-1;while(o>=23)g(1<<23),o-=23;g(1<<o),h(1,1),g(2),p=v()}else h(0,r),h(1<<-e,0),p=v()+a.call("0",f);return f>0?(l=p.length,p=b+(l<=f?"0."+a.call("0",f-l)+p:p.slice(0,l-f)+"."+p.slice(l-f))):p=b+p,p}})},e074:function(t,e,r){"use strict";r.d(e,"c",(function(){return i})),r.d(e,"f",(function(){return n})),r.d(e,"l",(function(){return a})),r.d(e,"e",(function(){return l})),r.d(e,"a",(function(){return c})),r.d(e,"d",(function(){return s})),r.d(e,"b",(function(){return u})),r.d(e,"g",(function(){return m})),r.d(e,"h",(function(){return f})),r.d(e,"i",(function(){return d})),r.d(e,"j",(function(){return b})),r.d(e,"k",(function(){return p}));var o=r("b775");function i(t,e){return Object(o["b"])({url:"contract1x-control/coin",method:"get",params:t,data:e})}function n(t,e){return Object(o["b"])({url:"/forex/index",method:"get",params:t,data:e})}function a(t){return Object(o["b"])({url:"/forex-control/index",method:"get",params:t})}function l(t,e){return Object(o["b"])({url:"/forex-control/update",method:"put",params:t,data:e})}function c(t){return Object(o["b"])({url:"/forex-control/create",method:"post",data:t})}function s(t,e){return Object(o["b"])({url:"/forex-control/delete",method:"DELETE",params:t,data:e})}function u(t){return Object(o["b"])({url:"/forex-control/coin",method:"get",params:t})}function m(t){return Object(o["b"])({url:"/forex/price",method:"get",params:t})}function f(t){return Object(o["b"])({url:"/forex-user-control/index",method:"get",params:t})}function d(t){return Object(o["b"])({url:"/forex-user-control/create",method:"post",data:t})}function b(t){return Object(o["b"])({url:"/forex-user-control/delete",method:"delete",params:t})}function p(t,e){return Object(o["b"])({url:"/forex-user-control/update",method:"put",params:t,data:e})}}}]);
|