chunk-3fd6b9e0.d27adabe0e4d37fb8b27.js 19 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3fd6b9e0"],{2934:function(t,e,n){"use strict";n.d(e,"c",(function(){return a})),n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return o}));var r=n("b775");function a(t){return Object(r["b"])({url:"/common/file/images",method:"post",data:t})}function i(t){return Object(r["b"])({url:"/coin/price",method:"get",params:t})}function o(){return Object(r["b"])({url:"/country-code/index",method:"get"})}},"3bf6":function(t,e,n){},"64dd":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"presentForm"},[n("div",{staticClass:"leftFrom"},[n("el-form",{ref:"params",staticClass:"formList",attrs:{model:t.params,"label-width":"100px"}},[n("el-form-item",{attrs:{label:"币种"}},[n("el-select",{attrs:{clearable:"",placeholder:"请选择币种"},model:{value:t.params.coin,callback:function(e){t.$set(t.params,"coin",e)},expression:"params.coin"}},t._l(t.coinList,(function(t){return n("el-option",{key:t.id,attrs:{label:t.currency,value:t.currency}})})),1)],1),n("el-form-item",{attrs:{label:"请选择时间"}},[n("el-date-picker",{attrs:{type:"datetimerange","value-format":"timestamp","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期","default-time":["00:00:00","23:59:59"]},on:{change:t.changeTime},model:{value:t.timeData,callback:function(e){t.timeData=e},expression:"timeData"}})],1)],1)],1),n("div",{staticClass:"inquire"},[n("el-button",{staticClass:"demand",attrs:{type:"primary"},on:{click:t.inquire}},[t._v("查询")])],1)]),n("div",{staticClass:"tabs"},[n("div"),n("div",{staticClass:"tabs_btn"},[n("el-button",{staticClass:"greenbg",on:{click:function(e){return t.editClick(1)}}},[t._v("新增")]),n("el-button",{staticClass:"greenbg",on:{click:function(e){return t.refresh()}}},[t._v("刷新")])],1)]),n("div",[n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData,border:"","cell-style":{textAlign:"center"},"header-cell-style":{textAlign:"center"}}},[n("el-table-column",{attrs:{prop:"coin",label:"币种"}}),n("el-table-column",{attrs:{label:"价格"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("div",[n("p",[t._v("起始价格:")]),n("p",[t._v(t._s(e.row.start_price?e.row.start_price:"-"))]),n("p",[t._v("目标价格:")]),n("p",[t._v(t._s(e.row.price))])])]}}])}),n("el-table-column",{attrs:{prop:"market",label:"市场"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("div",[t._v(" "+t._s("1"==e.row.market?"现货":"合约")+" ")])]}}])}),n("el-table-column",{attrs:{prop:"status",label:"是否启用"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("div",[t._v(" "+t._s("-1"==e.row.status?"删除":"0"==e.row.status?"禁用":"1"==e.row.status?"启用":"2"==e.row.status?"执行中":"执行完成")+" ")])]}}])}),n("el-table-column",{attrs:{prop:"closing_at",label:"时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("div",[n("p",[t._v("开始时间:"+t._s(t.timestampToDatetime(e.row.start_time)))]),n("p",[t._v("结束时间:"+t._s(t.timestampToDatetime(e.row.end_time)))]),n("p",[t._v("创建时间:"+t._s(t.timestampToDatetime(e.row.created_at)))]),n("p",[t._v("更新时间:"+t._s(t.timestampToDatetime(e.row.updated_at)))])])]}}])}),n("el-table-column",{attrs:{prop:"username",label:"操作员"}}),n("el-table-column",{attrs:{prop:"closing_at",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.status<3?n("el-button",{staticClass:"greenbg",on:{click:function(n){return t.editClick(2,e.row)}}},[t._v("编辑")]):n("span",[t._v("-")])]}}])})],1),n("Paginate",{attrs:{page:t.params.page,total:t.total},on:{currentChange:t.handleCurrentChange,sizeChange:t.handleSizeChange}})],1),n("el-dialog",{attrs:{title:"新增/编辑",visible:t.addPopup,width:"50%","before-close":t.addClose},on:{"update:visible":function(e){t.addPopup=e}}},[n("div",{staticClass:"addList"},[n("el-form",{ref:"addList",staticClass:"addList",attrs:{model:t.addList,"label-width":"120px"}},[t.editshow?n("el-form-item",{attrs:{label:"币种"}},[t._v(" "+t._s(t.addList.coin)+" ")]):n("el-form-item",{attrs:{label:"选择币种"}},[n("el-select",{attrs:{clearable:"",placeholder:"请选择币种"},model:{value:t.addList.coin,callback:function(e){t.$set(t.addList,"coin","string"===typeof e?e.trim():e)},expression:"addList.coin"}},t._l(t.coinList,(function(t,e){return n("el-option",{key:e,attrs:{label:t.currency,value:t.currency}})})),1)],1),n("el-form-item",{attrs:{label:"币种价格"}},[n("span",{staticStyle:{color:"#46B498"}},[t._v(t._s(t.coinAmount))])]),n("el-form-item",{attrs:{label:"目标价格"}},[n("el-input",{attrs:{placeholder:"请输入目标价格"},model:{value:t.addList.price,callback:function(e){t.$set(t.addList,"price",e)},expression:"addList.price"}})],1),n("el-form-item",{attrs:{label:"市场"}},[n("el-select",{attrs:{clearable:"",placeholder:"市场"},model:{value:t.addList.market,callback:function(e){t.$set(t.addList,"market","string"===typeof e?e.trim():e)},expression:"addList.market"}},t._l(t.marketList,(function(t,e){return n("el-option",{key:e,attrs:{label:t.title,value:t.id}})})),1)],1),n("el-form-item",{attrs:{label:"选择执行时间",prop:"act_time"}},[n("el-date-picker",{attrs:{type:"datetimerange","value-format":"timestamp","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期","picker-options":t.pickerOptions,"default-time":["00:00:00","23:59:59"]},on:{change:t.addChangeTime},model:{value:t.addTimeData,callback:function(e){t.addTimeData=e},expression:"addTimeData"}})],1),n("el-form-item",{attrs:{label:"状态"}},[n("el-select",{attrs:{placeholder:"请选择"},model:{value:t.addList.status,callback:function(e){t.$set(t.addList,"status",e)},expression:"addList.status"}},t._l(t.options,(function(t){return n("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1)],1)],1),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(e){return t.addClose()}}},[t._v("取 消")]),t.editshow?n("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.addSubmit(2)}}},[t._v("确定修改")]):n("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.addSubmit(1)}}},[t._v("确定新增")])],1)])],1)},a=[],i=n("5530"),o=(n("365c"),n("f201")),u=n("2934"),c=n("0238"),d=n("c466"),s={name:"contractIndex",components:{Paginate:c["a"]},data:function(){return{pickerOptions:{disabledDate:function(t){return t.getTime()<Date.now()-864e5}},params:{page:1,page_size:this.$store.state.attr.pageSize,coin:"",created_at_start:"",created_at_end:""},timeData:[],coinList:[],tableData:[],loading:!1,total:0,btnLoading:!1,addList:{coin:"",price:"",status:"",market:2,start_time:"",end_time:""},coinAmount:0,addTimeData:[],marketList:[{id:2,title:"合约"}],options:[{value:"1",label:"启用"},{value:"0",label:"禁用"}],addPopup:!1,editshow:!1}},computed:{},watch:{"addList.coin":function(t){t&&this.coinPrice(t,this.addList.market)}},mounted:function(){this.finstall(),this.install()},methods:{finstall:function(){var t=this;Object(o["d"])().then((function(e){t.coinList=e.data.list}))},install:function(){var t=this;Object(o["eb"])(Object(i["a"])(Object(i["a"])({},this.params),{},{page:this.params.page-1})).then((function(e){200===e.code?(t.tableData=e.data.list,t.total=parseInt(e.data.listTotalCount)):t.$message.error(e.message),t.loading=!1}))},coinPrice:function(t,e){var n=this,r={market:e,coin:t};Object(u["b"])(r).then((function(t){200===t.code?n.coinAmount=t.data.price:n.$message.error(t.message),n.loading=!1}))},refresh:function(){this.tableData=[],this.install()},inquire:function(){this.install()},handleCurrentChange:function(t){this.params.page=t,this.install()},handleSizeChange:function(t,e){this.params.page_size=t,this.install()},changeTime:function(t){t?(this.params.created_at_start=t[0]/1e3,this.params.created_at_end=t[1]/1e3):(this.params.created_at_start="",this.params.created_at_end="")},timestampToDatetime:function(t){return Object(d["a"])(t,!0)},editClick:function(t,e){this.addPopup=!0,2==t&&(this.addList.start_time=1e3*e.start_time,this.addList.end_time=1e3*e.end_time,this.addTimeData.push(this.addList.start_time),this.addTimeData.push(this.addList.end_time),this.addList.id=e.id,this.addList.coin=e.coin,this.addList.price=e.price,2==e.status||3==e.status?this.addList.status="1":this.addList.status=e.status,this.editshow=!0)},addChangeTime:function(t){t?(this.addList.start_time=t[0]/1e3,this.addList.end_time=t[1]/1e3):(this.addList.start_time="",this.addList.end_time="")},addSubmit:function(t){var e=this;1==t?Object(o["a"])(this.addList).then((function(t){200===t.code?(e.$message({type:"success",message:"添加成功!"}),e.addClose(),e.refresh()):e.$message.error(t.message),e.loading=!1})):Object(o["n"])(this.addList,this.addList).then((function(t){200===t.code?(e.$message({type:"success",message:"编辑成功!"}),e.addClose(),e.refresh()):e.$message.error(t.message),e.loading=!1}))},delClick:function(t){var e=this,n={id:t.id};this.$confirm("确定删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(o["l"])(n,n).then((function(t){200===t.code?(e.$message({type:"success",message:"删除成功!"}),e.refresh()):e.$message.error(t.message),e.loading=!1}))})).catch((function(){e.$message({type:"info",message:"已取消"})}))},addClose:function(){this.addPopup=!1,this.editshow=!1,this.addTimeData=[],this.coinAmount=0,this.addList={coin:"",price:"",status:"",market:2,start_time:"",end_time:""}}},beforeCreate:function(){},created:function(){},beforeMount:function(){},beforeUpdate:function(){},updated:function(){},beforeDestroy:function(){},destroyed:function(){},activated:function(){}},l=s,m=(n("b348"),n("2877")),f=Object(m["a"])(l,r,a,!1,null,"7cfd337b",null);e["default"]=f.exports},b348:function(t,e,n){"use strict";var r=n("3bf6"),a=n.n(r);a.a},f201:function(t,e,n){"use strict";n.d(e,"U",(function(){return a})),n.d(e,"j",(function(){return i})),n.d(e,"zb",(function(){return o})),n.d(e,"B",(function(){return u})),n.d(e,"k",(function(){return c})),n.d(e,"vb",(function(){return d})),n.d(e,"c",(function(){return s})),n.d(e,"i",(function(){return l})),n.d(e,"f",(function(){return m})),n.d(e,"g",(function(){return f})),n.d(e,"e",(function(){return b})),n.d(e,"h",(function(){return p})),n.d(e,"b",(function(){return h})),n.d(e,"v",(function(){return g})),n.d(e,"u",(function(){return O})),n.d(e,"x",(function(){return j})),n.d(e,"w",(function(){return v})),n.d(e,"y",(function(){return _})),n.d(e,"sb",(function(){return w})),n.d(e,"fb",(function(){return k})),n.d(e,"ob",(function(){return y})),n.d(e,"o",(function(){return L})),n.d(e,"xb",(function(){return x})),n.d(e,"wb",(function(){return T})),n.d(e,"yb",(function(){return C})),n.d(e,"rb",(function(){return S})),n.d(e,"qb",(function(){return D})),n.d(e,"pb",(function(){return P})),n.d(e,"T",(function(){return $})),n.d(e,"tb",(function(){return z})),n.d(e,"R",(function(){return A})),n.d(e,"Q",(function(){return q})),n.d(e,"S",(function(){return E})),n.d(e,"A",(function(){return B})),n.d(e,"z",(function(){return F})),n.d(e,"t",(function(){return I})),n.d(e,"N",(function(){return J})),n.d(e,"P",(function(){return H})),n.d(e,"eb",(function(){return M})),n.d(e,"n",(function(){return N})),n.d(e,"a",(function(){return U})),n.d(e,"l",(function(){return G})),n.d(e,"d",(function(){return K})),n.d(e,"m",(function(){return Q})),n.d(e,"O",(function(){return R})),n.d(e,"ib",(function(){return V})),n.d(e,"nb",(function(){return W})),n.d(e,"jb",(function(){return X})),n.d(e,"lb",(function(){return Y})),n.d(e,"kb",(function(){return Z})),n.d(e,"gb",(function(){return tt})),n.d(e,"mb",(function(){return et})),n.d(e,"hb",(function(){return nt})),n.d(e,"db",(function(){return rt})),n.d(e,"cb",(function(){return at})),n.d(e,"Z",(function(){return it})),n.d(e,"ab",(function(){return ot})),n.d(e,"bb",(function(){return ut})),n.d(e,"H",(function(){return ct})),n.d(e,"D",(function(){return dt})),n.d(e,"C",(function(){return st})),n.d(e,"G",(function(){return lt})),n.d(e,"F",(function(){return mt})),n.d(e,"E",(function(){return ft})),n.d(e,"I",(function(){return bt})),n.d(e,"L",(function(){return pt})),n.d(e,"K",(function(){return ht})),n.d(e,"J",(function(){return gt})),n.d(e,"M",(function(){return Ot})),n.d(e,"r",(function(){return jt})),n.d(e,"p",(function(){return vt})),n.d(e,"s",(function(){return _t})),n.d(e,"q",(function(){return wt})),n.d(e,"V",(function(){return kt})),n.d(e,"Y",(function(){return yt})),n.d(e,"X",(function(){return Lt})),n.d(e,"W",(function(){return xt})),n.d(e,"ub",(function(){return Tt}));var r=n("b775");function a(t){return Object(r["b"])({url:"/common-dic/update2",method:"POST",data:t})}function i(t){return Object(r["b"])({url:"/withdrawal-net/index",method:"get",params:t})}function o(t){return Object(r["b"])({url:"/withdrawal-net/create",method:"POST",data:t})}function u(t,e){return Object(r["b"])({url:"/withdrawal-net/update",method:"put",params:t,data:e})}function c(t){return Object(r["b"])({url:"/common-dic/index2",method:"get",params:t})}function d(t){return Object(r["b"])({url:"/withdrawal-net/delete",method:"delete",params:t})}function s(t){return Object(r["b"])({url:"/coin/index",method:"get",params:t})}function l(t,e){return Object(r["b"])({url:"/coin/update",method:"put",params:t,data:e})}function m(t){return Object(r["b"])({url:"/coin-recharge-net",method:"get",params:t})}function f(t){return Object(r["b"])({url:"/coin-recharge-net/delete",method:"delete",params:t})}function b(t){return Object(r["b"])({url:"/coin/net",method:"get",params:t})}function p(t){return Object(r["b"])({url:"/coin-recharge-net/create",method:"POST",data:t})}function h(t){return Object(r["b"])({url:"/invite-level/index",method:"get",params:t})}function g(t,e){return Object(r["b"])({url:"/invite-level/update",method:"put",params:t,data:e})}function O(t){return Object(r["b"])({url:"/invite-level/create",method:"POST",data:t})}function j(t){return Object(r["b"])({url:"/invite-profit-static/index",method:"get",params:t})}function v(t){return Object(r["b"])({url:"/invite-profit-static/detail",method:"get",params:t})}function _(t){return Object(r["b"])({url:"/invite-profit-static/profit",method:"get",params:t})}function w(t){return Object(r["b"])({url:"/wallet/transfer-log",method:"get",params:t})}function k(t){return Object(r["b"])({url:"/wallet/transfer-export",method:"get",responseType:"blob",params:t})}function y(t){return Object(r["b"])({url:"/wallet/flash-exchange-log",method:"get",params:t})}function L(t){return Object(r["b"])({url:"/wallet/flash-exchange-export",method:"get",responseType:"blob",params:t})}function x(t){return Object(r["b"])({url:"/withdraw/index",method:"get",params:t})}function T(t){return Object(r["b"])({url:"/withdraw/export",method:"get",responseType:"blob",params:t})}function C(t,e){return Object(r["b"])({url:"/withdraw/update",method:"put",params:t,data:e})}function S(t){return Object(r["b"])({url:"/wallet/operate-log",method:"get",params:t})}function D(t){return Object(r["b"])({url:"/wallet/operate",method:"POST",data:t})}function P(t){return Object(r["b"])({url:"/wallet/modify-wallet-operate-remark",method:"PATCH",data:t})}function $(t){return Object(r["b"])({url:"/wallet/operate-export",method:"get",responseType:"blob",params:t})}function z(t){return Object(r["b"])({url:"/withdraw/abandon",method:"POST",data:t})}function A(t){return Object(r["b"])({url:"/recharge/confirm",method:"POST",data:t})}function q(t){return Object(r["b"])({url:"/recharge/abandon",method:"POST",data:t})}function E(t){return Object(r["b"])({url:"/recharge/export",method:"get",responseType:"blob",params:t})}function B(t){return Object(r["b"])({url:"/invite-profit-static/log",method:"get",params:t})}function F(t){return Object(r["b"])({url:"/invite-profit-static/change-type",method:"get",params:t})}function I(t){return Object(r["b"])({url:"/futures-order/index",method:"get",params:t})}function J(t){return Object(r["b"])({url:"/futures-order/close",method:"POST",data:t})}function H(t){return Object(r["b"])({url:"/futures-order/cancel-close",method:"POST",data:t})}function M(t){return Object(r["b"])({url:"/coin-control/index",method:"get",params:t})}function N(t,e){return Object(r["b"])({url:"/coin-control/update",method:"put",params:t,data:e})}function U(t){return Object(r["b"])({url:"/coin-control/create",method:"post",data:t})}function G(t,e){return Object(r["b"])({url:"/coin-control/delete",method:"DELETE",params:t,data:e})}function K(t){return Object(r["b"])({url:"/coin-control/coin",method:"get",params:t})}function Q(t){return Object(r["b"])({url:"/futures-order/close-fee",method:"get",params:t})}function R(t){return Object(r["b"])({url:"/futures-order/close-all",method:"POST",params:t})}function V(t){return Object(r["b"])({url:"/tutorial/index",method:"get",params:t})}function W(t){return Object(r["b"])({url:"/tutorial-type/index",method:"get",params:t})}function X(t){return Object(r["b"])({url:"/tutorial-type/create",method:"POST",data:t})}function Y(t,e){return Object(r["b"])({url:"/tutorial-type/update",method:"put",params:t,data:e})}function Z(t){return Object(r["b"])({url:"/tutorial-type/delete",method:"delete",params:t})}function tt(t){return Object(r["b"])({url:"/tutorial/create",method:"POST",data:t})}function et(t,e){return Object(r["b"])({url:"/tutorial/update",method:"put",params:t,data:e})}function nt(t){return Object(r["b"])({url:"/tutorial/delete",method:"delete",params:t})}function rt(t){return Object(r["b"])({url:"/task/index",method:"get",params:t})}function at(t,e){return Object(r["b"])({url:"/task/update",method:"put",params:t,data:e})}function it(t){return Object(r["b"])({url:"/task/create",method:"POST",data:t})}function ot(t){return Object(r["b"])({url:"/task/delete",method:"delete",params:t})}function ut(t){return Object(r["b"])({url:"/task-member/index",method:"get",params:t})}function ct(t){return Object(r["b"])({url:"/option-order/index",method:"get",params:t})}function dt(t){return Object(r["b"])({url:"/option-coin/index",method:"get",params:t})}function st(t){return Object(r["b"])({url:"/option-coin/coin",method:"get",params:t})}function lt(t,e){return Object(r["b"])({url:"/option-coin/update",method:"put",params:t,data:e})}function mt(t){return Object(r["b"])({url:"/option-coin/delete",method:"delete",params:t})}function ft(t){return Object(r["b"])({url:"/option-coin/create",method:"post",data:t})}function bt(t){return Object(r["b"])({url:"/option-rule/index",method:"get",params:t})}function pt(t,e){return Object(r["b"])({url:"/option-rule/update",method:"put",params:t,data:e})}function ht(t){return Object(r["b"])({url:"/option-rule/delete",method:"delete",params:t})}function gt(t){return Object(r["b"])({url:"/option-rule/create",method:"post",data:t})}function Ot(t){return Object(r["b"])({url:"/option-order/statistics",method:"get"})}function jt(t){return Object(r["b"])({url:"/footer/index",method:"get",params:t})}function vt(t){return Object(r["b"])({url:"/footer/create",method:"post",data:t})}function _t(t,e){return Object(r["b"])({url:"/footer/update",method:"put",params:t,data:e})}function wt(t){return Object(r["b"])({url:"/footer/delete",method:"delete",params:t})}function kt(t){return Object(r["b"])({url:"/spread-level/index",method:"get",params:t})}function yt(t,e){return Object(r["b"])({url:"/spread-level/update",method:"put",params:t,data:e})}function Lt(t){return Object(r["b"])({url:"/spread-level/delete",method:"delete",params:t})}function xt(t){return Object(r["b"])({url:"/spread-level/create",method:"post",data:t})}function Tt(t){return Object(r["b"])({url:"/withdraw-account/index",method:"get",params:t})}}}]);