|
|
@@ -1,10 +1,9 @@
|
|
|
<template>
|
|
|
<div class="gates-page">
|
|
|
<el-card>
|
|
|
- <div slot="header">
|
|
|
- <span>关卡配置</span>
|
|
|
- <el-button type="primary" size="small" style="float:right" @click="handleAdd">新增关卡</el-button>
|
|
|
- </div>
|
|
|
+ <PageHeader slot="header" title="关卡配置">
|
|
|
+ <el-button type="primary" size="small" @click="handleAdd">新增关卡</el-button>
|
|
|
+ </PageHeader>
|
|
|
|
|
|
<div class="adm-table-wrap">
|
|
|
<el-table :data="gateList" border v-loading="loading" style="width:100%" height="100%">
|
|
|
@@ -33,9 +32,7 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="归属" width="80">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-tag :type="scope.row.isRequired === 1 ? 'primary' : 'warning'" size="small">
|
|
|
- {{ scope.row.isRequired === 1 ? '主线' : '增值' }}
|
|
|
- </el-tag>
|
|
|
+ <StatusTag :type="scope.row.isRequired === 1 ? 'primary' : 'warning'" :text="scope.row.isRequired === 1 ? '主线' : '增值'" />
|
|
|
</template>
|
|
|
<template slot="header">
|
|
|
<span class="sort-header" @click.stop="onSortClick('isRequired', $event)">归属<span v-if="sortIndex('isRequired') !== null" class="sort-index" :class="sortClass('isRequired') === 'sort-asc' ? 'sort-asc-badge' : 'sort-desc-badge'">{{ sortIndex('isRequired') }}</span>{{ sortIcon('isRequired') }}</span>
|
|
|
@@ -43,9 +40,7 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="形态" width="80">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-tag :type="scope.row.isSoft === 1 ? 'info' : 'danger'" size="small">
|
|
|
- {{ scope.row.isSoft === 1 ? '软引导' : '硬门禁' }}
|
|
|
- </el-tag>
|
|
|
+ <StatusTag :type="scope.row.isSoft === 1 ? 'info' : 'danger'" :text="scope.row.isSoft === 1 ? '软引导' : '硬门禁'" />
|
|
|
</template>
|
|
|
<template slot="header">
|
|
|
<span class="sort-header" @click.stop="onSortClick('isSoft', $event)">形态<span v-if="sortIndex('isSoft') !== null" class="sort-index" :class="sortClass('isSoft') === 'sort-asc' ? 'sort-asc-badge' : 'sort-desc-badge'">{{ sortIndex('isSoft') }}</span>{{ sortIcon('isSoft') }}</span>
|
|
|
@@ -65,8 +60,8 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="奖励" width="140">
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.rewardPoints > 0" style="color:#B8860B">+{{ scope.row.rewardPoints }} CF值</span>
|
|
|
- <span v-if="scope.row.rewardEnergy > 0" style="color:#3A7CC2;margin-left:6px">+{{ scope.row.rewardEnergy }}能量</span>
|
|
|
+ <span v-if="scope.row.rewardPoints > 0" style="color: var(--adm-warning-text)">+{{ scope.row.rewardPoints }} CF值</span>
|
|
|
+ <span v-if="scope.row.rewardEnergy > 0" style="color: var(--adm-primary);margin-left:6px">+{{ scope.row.rewardEnergy }}能量</span>
|
|
|
<span v-if="!scope.row.rewardPoints && !scope.row.rewardEnergy">—</span>
|
|
|
</template>
|
|
|
<template slot="header">
|
|
|
@@ -103,7 +98,7 @@
|
|
|
<!-- 家庭进度管理 -->
|
|
|
<el-card style="margin-top:20px">
|
|
|
<div slot="header">
|
|
|
- <span>家庭进度管理</span>
|
|
|
+ <SectionTitle title="家庭进度管理" />
|
|
|
</div>
|
|
|
<el-form :inline="true">
|
|
|
<el-form-item label="家庭ID">
|
|
|
@@ -119,9 +114,7 @@
|
|
|
<el-table-column prop="gateId" label="关卡ID" width="80"></el-table-column>
|
|
|
<el-table-column prop="status" label="状态" width="100">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-tag :type="scope.row.status === 'UNLOCKED' ? 'success' : 'info'" size="small">
|
|
|
- {{ scope.row.status === 'UNLOCKED' ? '已解锁' : '锁定' }}
|
|
|
- </el-tag>
|
|
|
+ <StatusTag :type="scope.row.status === 'UNLOCKED' ? 'success' : 'info'" :text="scope.row.status === 'UNLOCKED' ? '已解锁' : '锁定'" />
|
|
|
</template>
|
|
|
<template slot="header">
|
|
|
<span class="sort-header" @click.stop="onSortClick('status', $event)">状态<span v-if="sortIndex('status') !== null" class="sort-index" :class="sortClass('status') === 'sort-asc' ? 'sort-asc-badge' : 'sort-desc-badge'">{{ sortIndex('status') }}</span>{{ sortIcon('status') }}</span>
|
|
|
@@ -194,7 +187,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="条件参数">
|
|
|
<el-input v-model="form.conditionParams" placeholder='如:{"count":1} 或 {"days":3}'></el-input>
|
|
|
- <div style="font-size:12px;color:#999;margin-top:4px">
|
|
|
+ <div style="font-size:12px;color: var(--adm-text-45);margin-top:4px">
|
|
|
SELF_CHECK: {"minCount":1} | MICRO_ACTION: {"count":1} | STREAK_DAYS: {"days":3}
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
@@ -486,13 +479,7 @@ export default {
|
|
|
.gates-page {
|
|
|
padding: 20px;
|
|
|
}
|
|
|
-.sort-header {
|
|
|
- cursor: pointer;
|
|
|
- user-select: none;
|
|
|
- font-weight: 500;
|
|
|
- font-size: 12px;
|
|
|
-}
|
|
|
.sort-header:hover {
|
|
|
- color: #409eff;
|
|
|
+ color: var(--adm-primary);
|
|
|
}
|
|
|
</style>
|