优化后台
This commit is contained in:
@@ -19,7 +19,7 @@ const queryParams = ref({
|
||||
page:1,
|
||||
pageSize:10,
|
||||
key:'',
|
||||
status:'',
|
||||
status:20,
|
||||
sort:'',
|
||||
current_page:1,
|
||||
loading_egg:''
|
||||
@@ -30,16 +30,32 @@ const queryParams = ref({
|
||||
// })
|
||||
const state_arr = ref([
|
||||
{
|
||||
name:'报名中',
|
||||
name:'全部',
|
||||
value:20
|
||||
},
|
||||
{
|
||||
name:'已上架',
|
||||
value:1
|
||||
},
|
||||
{
|
||||
name:'取消',
|
||||
name:'未上架',
|
||||
value:0
|
||||
},
|
||||
{
|
||||
name:'已下架',
|
||||
value:2
|
||||
},
|
||||
{
|
||||
name:'结束',
|
||||
name:'已结束',
|
||||
value:3
|
||||
},
|
||||
{
|
||||
name:'未开始',
|
||||
value:4
|
||||
},
|
||||
{
|
||||
name:'报名中',
|
||||
value:5
|
||||
}
|
||||
])
|
||||
const tableData = ref([])
|
||||
@@ -66,7 +82,7 @@ const onReset = () => {
|
||||
page:1,
|
||||
pageSize:10,
|
||||
key:'',
|
||||
status:'',
|
||||
status:20,
|
||||
sort:'',
|
||||
current_page:1
|
||||
}
|
||||
@@ -106,16 +122,20 @@ function getStateName(row) {
|
||||
// 检查是否过期
|
||||
if(row.end_time < (Date.parse(new Date()))) { // 已过期
|
||||
name = '已结束';
|
||||
row.status = 3
|
||||
}
|
||||
else if(row.begin_time < (Date.parse(new Date()))) { // 已开始
|
||||
name = '报名中';
|
||||
}
|
||||
else{
|
||||
name = '报名中';
|
||||
name = '未开始';
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
name = '已取消';
|
||||
name = '已下架';
|
||||
break;
|
||||
case 0:
|
||||
name = '已取消';
|
||||
name = '未上架';
|
||||
break;
|
||||
case 3:
|
||||
name = '已结束';
|
||||
@@ -374,18 +394,19 @@ async function viewAuctionFunc(row) { // 竞拍明细
|
||||
link
|
||||
@click="editDrawFunc(scope.row)"
|
||||
>编辑</el-button>
|
||||
<el-button
|
||||
icon="view"
|
||||
size="small"
|
||||
type="primary"
|
||||
link
|
||||
@click="viewAuctionFunc(scope.row)"
|
||||
>明细</el-button>
|
||||
<!-- <el-button-->
|
||||
<!-- icon="view"-->
|
||||
<!-- size="small"-->
|
||||
<!-- type="primary"-->
|
||||
<!-- link-->
|
||||
<!-- @click="viewAuctionFunc(scope.row)"-->
|
||||
<!-- >明细</el-button>-->
|
||||
<el-button
|
||||
icon="delete"
|
||||
size="small"
|
||||
type="danger"
|
||||
link
|
||||
v-if="scope.row.status===2 || scope.row.status===0"
|
||||
@click="delFunc(scope.row)"
|
||||
>删除</el-button>
|
||||
<el-button
|
||||
@@ -394,7 +415,7 @@ async function viewAuctionFunc(row) { // 竞拍明细
|
||||
type="primary"
|
||||
link
|
||||
@click="drawStateFunc(scope.row,1)"
|
||||
v-if="scope.row.status!=3"
|
||||
v-if="scope.row.status===2 || scope.row.status===0"
|
||||
>上架</el-button>
|
||||
<el-button
|
||||
icon="bottom"
|
||||
@@ -402,7 +423,7 @@ async function viewAuctionFunc(row) { // 竞拍明细
|
||||
type="danger"
|
||||
link
|
||||
@click="drawStateFunc(scope.row,2)"
|
||||
v-if="scope.row.status!=3"
|
||||
v-if="scope.row.status!==2 && scope.row.status!==0"
|
||||
>下架</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
Reference in New Issue
Block a user