| | |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <p>指数强平设置 (百分比均采用小数来表示,例:0.8表示80% 强制平仓线计算规则:可用资金 + (冻结保证金 * 强制平仓比例))</p> |
| | | <p> |
| | | 指数强平设置 (百分比均采用小数来表示,例:0.8表示80% 强制平仓线计算规则:可用资金 + (冻结保证金 * |
| | | 强制平仓比例)) |
| | | </p> |
| | | <a-row class="form-row" :gutter="48"> |
| | | <a-col :md="12" :lg="6" :sm="24"> |
| | | <a-form-item label="强平比例(例:0.8)"> |
| | |
| | | </a-form> |
| | | <div class="bottomfixed"> |
| | | <div style="float:right"> |
| | | <a-button type="primary" @click="OkaddUserdialog" :loading="addUserDialogloading"> |
| | | 保存当前设置 |
| | | </a-button> |
| | | <a-button type="primary" @click="OkaddUserdialog" :loading="addUserDialogloading"> 保存当前设置 </a-button> |
| | | </div> |
| | | </div> |
| | | |
| | | </page-header-wrapper> |
| | | </template> |
| | | <script> |
| | |
| | | return { |
| | | addUserform: this.$form.createForm(this), |
| | | loading: false, |
| | | fields: ['buyMaxPercent', 'forceSellPercent', 'transAmBegin', 'transAmEnd', 'transPmBegin', 'transPmEnd', 'transAmBeginUs', 'transAmEndUs', 'transPmBeginUs', 'transPmEndUs', |
| | | 'transAmBeginhk', 'transAmEndhk', 'transPmBeginhk', 'transPmEndhk', 'downLimit', 'riseLimit', 'forceStopRemindRatio'], |
| | | fields: [ |
| | | 'buyMaxPercent', |
| | | 'forceSellPercent', |
| | | 'transAmBegin', |
| | | 'transAmEnd', |
| | | 'transPmBegin', |
| | | 'transPmEnd', |
| | | 'transAmBeginUs', |
| | | 'transAmEndUs', |
| | | 'transPmBeginUs', |
| | | 'transPmEndUs', |
| | | 'transAmBeginhk', |
| | | 'transAmEndhk', |
| | | 'transPmBeginhk', |
| | | 'transPmEndhk', |
| | | 'downLimit', |
| | | 'riseLimit', |
| | | 'forceStopRemindRatio', |
| | | ], |
| | | labelCol: { |
| | | xs: { span: 10 }, |
| | | sm: { span: 10 }, |
| | | md: { span: 10 } |
| | | md: { span: 10 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 14 }, |
| | | sm: { span: 14 }, |
| | | md: { span: 14 } |
| | | md: { span: 14 }, |
| | | }, |
| | | addUserDialogloading: false, |
| | | details: {} |
| | | details: {}, |
| | | } |
| | | }, |
| | | mounted () { |
| | |
| | | this.addUserDialogloading = true |
| | | this.loading = true |
| | | values.id = this.details.id |
| | | siteindexupdate(values).then(res => { |
| | | siteindexupdate(values).then((res) => { |
| | | if (res.status == 0) { |
| | | this.$message.success({ content: res.msg, duration: 2 }) |
| | | this.$message.success(res.msg) |
| | | this.getdetail() |
| | | } else { |
| | | this.$message.error({ content: res.msg }) |
| | | this.$message.error(res.msg) |
| | | } |
| | | this.addUserDialogloading = false |
| | | }) |
| | |
| | | getdetail () { |
| | | var that = this |
| | | this.loading = true |
| | | admingetIndexSetting().then(res => { |
| | | admingetIndexSetting().then((res) => { |
| | | this.details = res.data |
| | | this.fields.forEach(v => this.addUserform.getFieldDecorator(v)) |
| | | this.fields.forEach((v) => this.addUserform.getFieldDecorator(v)) |
| | | this.addUserform.setFieldsValue(pick(res.data, this.fields)) |
| | | setTimeout(() => { |
| | | that.loading = false |
| | | }, 500) |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | <style lang="less" scoped> |
| | |
| | | list-style: none; |
| | | border-bottom: 1px solid #e8e8e8; |
| | | cursor: pointer; |
| | | transition: all .3s; |
| | | transition: all 0.3s; |
| | | |
| | | &:hover { |
| | | background: #e6f7ff; |
| | |
| | | |
| | | .antd-pro-pages-forms-style-errorField { |
| | | margin-top: 2px; |
| | | color: rgba(0, 0, 0, .45); |
| | | color: rgba(0, 0, 0, 0.45); |
| | | font-size: 12px; |
| | | } |
| | | } |