<template>
|
<div>
|
<div class="noticecontainer">
|
<div class="jiaoyimain">
|
<div class="tixianliet">
|
<el-table :data="mingxilist" style="width: 100%" border :highlight-current-row="false"
|
:header-cell-style="{ 'padding': '2px 0', 'background': 'rgb(37,38,42)', 'color': '#9d9d9d', 'font-size': '12px' }">
|
<el-table-column width="150px" prop="indexName" :label="$t('zsdm')">
|
<template slot-scope="scope">
|
<span>{{ scope.row.stockName }}</span>
|
<span class="code">{{ scope.row.stockId }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column prop="nowPrice" :label="$t('xj')">
|
</el-table-column>
|
<el-table-column prop="buyNum" :label="$t('mrs')">
|
<template slot-scope="scope">
|
<span>{{
|
scope.row.buyNum / 100
|
}}</span>
|
</template>
|
</el-table-column>
|
<el-table-column prop="lever" :label="$t('ggbs')">
|
</el-table-column>
|
<el-table-column prop="profitTarget" :label="$t('zyj')">
|
</el-table-column>
|
<el-table-column prop="stopTarget" :label="$t('zsz')">
|
</el-table-column>
|
<el-table-column prop="targetPrice" :label="$t('tjj')">
|
</el-table-column>
|
<el-table-column prop="buyType" :label="$t('fx')">
|
<template slot-scope="scope">
|
<span :class="scope.row.buyType == 0 ? 'green' : 'red'">
|
{{ scope.row.buyType == 0 ? $t('hj85') : $t('hj84') }}
|
</span>
|
</template>
|
</el-table-column>
|
<el-table-column prop="addTime" :label="$t('sj')">
|
<template slot-scope="scope">
|
<span>
|
{{ scope.row.addTime }}
|
</span>
|
</template>
|
</el-table-column>
|
<el-table-column prop="isLock" width="100px" :label="$t('hj126')">
|
<template slot-scope="scope">
|
<el-button type="info" v-if="scope.row.status == 0"
|
style="cursor: pointer;z-index: 9999999;" size="small" @click="toSell(scope.row)">{{$t('cd')}}
|
</el-button>
|
<span v-else
|
:class="scope.row.status == 1 ? 'green' : scope.row.status == 2 ? 'red' : ''">
|
{{ scope.row.status == 1 ? $t('hj265') : scope.row.status == 1 ? $t('mccg') : '' }}
|
</span>
|
</template>
|
</el-table-column>
|
</el-table>
|
</div>
|
</div>
|
</div>
|
</div>
|
</template>
|
<script>
|
import * as api from "@/axios/api";
|
export default {
|
data() {
|
return {
|
pageNum: 1,
|
pageSize: 10,
|
mingxilist: [],
|
total: 0,
|
}
|
},
|
created() {
|
this.getinit();
|
},
|
methods: {
|
getinit() {
|
this.getlist();
|
},
|
handleSizeChange(size) {
|
this.pageSize = size
|
this.getlist()
|
},
|
handleCurrentChange(page) {
|
this.pageNum = page
|
this.getlist()
|
},
|
async getlist() {
|
var opt = {
|
pageNum: this.pageNum,
|
pageSize: this.pageSize,
|
state: 0,
|
};
|
let data = await api.guadan(opt);
|
if (data.status == 0) {
|
this.mingxilist = data.data;
|
this.$parent.getcloseLoading();
|
}
|
},
|
toSell(val) {
|
this.$confirm(this.$t('cdtips'), this.$t('hj165'), {
|
confirmButtonText: this.$t('hj161'),
|
cancelButtonText: this.$t('qx'),
|
type: 'warning'
|
}).then(async () => {
|
let opt = {
|
id: val.id
|
}
|
let data = await api.chedan(opt)
|
if (data.status == 1) {
|
this.getlist()
|
this.$message.success(this.$t('hj137'))
|
} else {
|
this.$message.error(data.msg)
|
}
|
}).catch(() => {
|
})
|
},
|
}
|
}
|
</script>
|
<style lang="less" scoped>
|
.greens {
|
color: #168740 !important;
|
}
|
|
.reds {
|
color: #ed3a3b !important;
|
}
|
|
.greenbg {
|
background: #168740 !important;
|
}
|
|
.redbg {
|
background: #ed3a3b !important;
|
}
|
|
/deep/ .el-form-item {
|
margin-bottom: 0 !important;
|
}
|
|
/deep/ .el-table {
|
background: #25262a !important;
|
}
|
|
.el-table::before {
|
background-color: unset !important;
|
}
|
|
/deep/ .selected {
|
float: unset !important;
|
text-align: unset !important;
|
}
|
|
.noticecontainer {
|
display: flex;
|
|
.jiaoyimain {
|
display: flex;
|
justify-content: space-between;
|
width: 100%;
|
|
.tixianliet {
|
color: #fff;
|
width: 100%;
|
overflow-y: scroll;
|
height: 208px;
|
position: relative;
|
|
&::-webkit-scrollbar {
|
width: 8px;
|
height: 8px;
|
background-color: rgb(37, 38, 42);
|
}
|
|
&::-webkit-scrollbar-track {
|
background-color: rgb(37, 38, 42);
|
}
|
|
&::-webkit-scrollbar-thumb {
|
background-color: rgb(37, 38, 42);
|
}
|
|
&::-webkit-scrollbar-corner {
|
width: 8px;
|
height: 8px;
|
display: none;
|
}
|
|
.paginationmain {
|
display: flex;
|
justify-content: center;
|
margin: 20px 0;
|
}
|
|
/deep/ .btn-next {
|
color: #000 !important;
|
}
|
|
/deep/ .btn-prev {
|
color: #000 !important;
|
}
|
}
|
}
|
}
|
</style>
|