| | |
| | | addUserdialog = true |
| | | currentDetails = '' |
| | | " |
| | | >添加杠杆</a-button |
| | | >添加杠杆</a-button |
| | | > |
| | | </div> |
| | | </a-card> |
| | |
| | | import moment from 'moment' |
| | | export default { |
| | | name: 'Leversetting', |
| | | data() { |
| | | data () { |
| | | return { |
| | | columns: [ |
| | | { |
| | | title: '杠杆(倍数)', |
| | | dataIndex: 'lever', |
| | | align: 'center', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: '管理费率(%)', |
| | | dataIndex: 'manageRate', |
| | | align: 'center', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: '单股持仓比例(%)', |
| | | dataIndex: 'singleHoldingRatio', |
| | | align: 'center', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: '周期类型', |
| | | dataIndex: 'cycle_type', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'cycle_type' }, |
| | | scopedSlots: { customRender: 'cycle_type' } |
| | | }, |
| | | { |
| | | title: '配资状态', |
| | | dataIndex: 'status', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'status' }, |
| | | scopedSlots: { customRender: 'status' } |
| | | }, |
| | | { |
| | | title: '添加时间', |
| | |
| | | align: 'center', |
| | | customRender: (text, row, index) => { |
| | | return text ? moment(text).format('YYYY-MM-DD HH:mm:ss') : '' |
| | | }, |
| | | } |
| | | }, |
| | | { |
| | | title: '操作', |
| | | key: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' }, |
| | | }, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | // 表头 |
| | | pagination: { |
| | |
| | | pageSizeOptions: ['10', '20', '50', '100'], // 每页中显示的数据 |
| | | onShowSizeChange: (current, pageSize) => this.onSizeChange(current, pageSize), // 改变每页数量时更新显示 |
| | | onChange: (page, pageSize) => this.onPageChange(page, pageSize), // 点击页码事件 |
| | | showTotal: (total) => `共有 ${total} 条数据`, // 分页中显示总的数据 |
| | | showTotal: (total) => `共有 ${total} 条数据` // 分页中显示总的数据 |
| | | }, |
| | | loading: false, |
| | | queryParam: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | pageSize: 10 |
| | | }, |
| | | datalist: [], |
| | | addUserdialog: false, |
| | |
| | | addUserform: this.$form.createForm(this), |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 7 }, |
| | | sm: { span: 7 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 13 }, |
| | | sm: { span: 13 } |
| | | }, |
| | | fields: ['cycleType', 'lever', 'manageRate', 'singleHoldingRatio', 'status'], |
| | | currentDetails: '', |
| | | currentDetails: '' |
| | | } |
| | | }, |
| | | created() { |
| | | created () { |
| | | this.getlist() |
| | | }, |
| | | filters: { |
| | | statusFilter(status) { |
| | | statusFilter (status) { |
| | | return status == 2 ? '按周配资' : status == 3 ? '按月配资' : '按天配资' |
| | | }, |
| | | } |
| | | }, |
| | | methods: { |
| | | geteditganggan(val) { |
| | | geteditganggan (val) { |
| | | this.currentDetails = val |
| | | this.addUserdialog = true |
| | | this.fields.forEach((v) => this.addUserform.getFieldDecorator(v)) |
| | | this.addUserform.setFieldsValue(pick(val, this.fields)) |
| | | }, |
| | | CanceladdUserdialog() { |
| | | CanceladdUserdialog () { |
| | | this.addUserdialog = false |
| | | const form = this.$refs.addUserform.form |
| | | form.resetFields() |
| | | }, |
| | | OkaddUserdialog() { |
| | | OkaddUserdialog () { |
| | | const form = this.$refs.addUserform.form |
| | | form.validateFields((errors, values) => { |
| | | if (!errors) { |
| | |
| | | } |
| | | }) |
| | | }, |
| | | getlist() { |
| | | getlist () { |
| | | var that = this |
| | | this.loading = true |
| | | getFundsLeverList(this.queryParam).then((res) => { |
| | |
| | | }, 500) |
| | | }) |
| | | }, |
| | | onPageChange(page, pageSize) { |
| | | onPageChange (page, pageSize) { |
| | | this.queryParam.pageNum = page |
| | | this.getlist() |
| | | }, |
| | | onSizeChange(current, pageSize) { |
| | | onSizeChange (current, pageSize) { |
| | | this.queryParam.pageNum = current |
| | | this.queryParam.pageSize = pageSize |
| | | this.getlist() |
| | | }, |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | </script> |