| | |
| | | <a slot="action" href="javascript:;" @click="getLockopen(record.id)" v-else>解锁</a> |
| | | <a-divider type="vertical" /> |
| | | <a slot="action" href="javascript:;" @click="getCompulsoryclosing(record.positionSn)">强制平仓</a> |
| | | <a-divider type="vertical" /> |
| | | <a slot="action" href="javascript:;" @click="deletekopen(record.id)">删除</a> |
| | | </template> |
| | | </a-table> |
| | | <a-modal |
| | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import { positionlist, positionlock, positionsell } from '@/api/position' |
| | | import { positionlist, positionlock, positionsell,positiondel } from '@/api/position' |
| | | import { nextagent } from '@/api/home' |
| | | import moment from 'moment' |
| | | export default { |
| | |
| | | this.getlist() |
| | | }, |
| | | methods: { |
| | | deletekopen(id){ |
| | | var that = this |
| | | this.$confirm({ |
| | | title: '提示', |
| | | content: '确认要删除吗?', |
| | | onOk() { |
| | | var data = { |
| | | positionId: id, |
| | | } |
| | | positiondel(data) |
| | | .then((res) => { |
| | | if (res.status == 0) { |
| | | that.$message.success(res.msg) |
| | | that.getlist() |
| | | } else { |
| | | that.$message.error({ content: '删除失败' }) |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | that.$message.error({ content: '删除失败' }) |
| | | }) |
| | | }, |
| | | onCancel() { |
| | | console.log('Cancel') |
| | | }, |
| | | }) |
| | | }, |
| | | getCompulsoryclosing(val) { |
| | | var that = this |
| | | this.$confirm({ |