|
@@ -1,18 +1,12 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="teacher-packages admin-page">
|
|
<div class="teacher-packages admin-page">
|
|
|
<!-- 页面标题区 -->
|
|
<!-- 页面标题区 -->
|
|
|
- <div class="page-header">
|
|
|
|
|
- <div class="header-left">
|
|
|
|
|
- <h2 class="page-title">我的任务模板</h2>
|
|
|
|
|
- <span class="page-desc">管理您的服务任务模板</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="header-actions">
|
|
|
|
|
- <el-input v-model="keyword" placeholder="搜索任务模板..." prefix-icon="el-icon-search" style="width:200px; margin-right:12px" clearable @keyup.enter.native="handleSearch" @clear="handleSearch" />
|
|
|
|
|
- <el-button type="primary" class="primary-btn" @click="handleCreate">
|
|
|
|
|
- <i class="el-icon-plus"></i> 创建任务模板
|
|
|
|
|
- </el-button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <PageHeader title="我的任务模板" subtitle="管理您的服务任务模板">
|
|
|
|
|
+ <el-input v-model="keyword" placeholder="搜索任务模板..." prefix-icon="el-icon-search" size="small" style="width:200px" clearable @keyup.enter.native="handleSearch" @clear="handleSearch" />
|
|
|
|
|
+ <el-button type="primary" size="small" @click="handleCreate">
|
|
|
|
|
+ <i class="el-icon-plus"></i> 创建任务模板
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </PageHeader>
|
|
|
|
|
|
|
|
<!-- 统计卡片 -->
|
|
<!-- 统计卡片 -->
|
|
|
<el-row :gutter="24" class="stats-row">
|
|
<el-row :gutter="24" class="stats-row">
|
|
@@ -55,9 +49,7 @@
|
|
|
<span class="sort-header" @click.stop="onSortClick('level', $event)">等级<span v-if="sortIndex('level') !== null" class="sort-index" :class="sortClass('level') === 'sort-asc' ? 'sort-asc-badge' : 'sort-desc-badge'">{{ sortIndex('level') }}</span>{{ sortIcon('level') }}</span>
|
|
<span class="sort-header" @click.stop="onSortClick('level', $event)">等级<span v-if="sortIndex('level') !== null" class="sort-index" :class="sortClass('level') === 'sort-asc' ? 'sort-asc-badge' : 'sort-desc-badge'">{{ sortIndex('level') }}</span>{{ sortIcon('level') }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-tag :type="getLevelType(scope.row.level)" effect="dark" size="small">
|
|
|
|
|
- {{ scope.row.level || '初级' }}
|
|
|
|
|
- </el-tag>
|
|
|
|
|
|
|
+ <StatusTag :type="getLevelType(scope.row.level)" :text="scope.row.level || '初级'" effect="dark" size="small" />
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="price" label="价格" width="120">
|
|
<el-table-column prop="price" label="价格" width="120">
|
|
@@ -125,7 +117,7 @@
|
|
|
<el-option v-for="t in templates" :key="t.id" :label="t.name" :value="t.id">
|
|
<el-option v-for="t in templates" :key="t.id" :label="t.name" :value="t.id">
|
|
|
<span style="display: flex; justify-content: space-between">
|
|
<span style="display: flex; justify-content: space-between">
|
|
|
<span>{{ t.name }}</span>
|
|
<span>{{ t.name }}</span>
|
|
|
- <span style="color: #F59E0B">{{ formatPriceWithSymbol(t.referencePrice) }}</span>
|
|
|
|
|
|
|
+ <span style="color: var(--adm-warning-text)">{{ formatPriceWithSymbol(t.referencePrice) }}</span>
|
|
|
</span>
|
|
</span>
|
|
|
</el-option>
|
|
</el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
@@ -349,11 +341,11 @@ export default {
|
|
|
},
|
|
},
|
|
|
getLevelType(level) {
|
|
getLevelType(level) {
|
|
|
const map = {
|
|
const map = {
|
|
|
- 'junior': '',
|
|
|
|
|
|
|
+ 'junior': 'primary',
|
|
|
'intermediate': 'success',
|
|
'intermediate': 'success',
|
|
|
'senior': 'warning'
|
|
'senior': 'warning'
|
|
|
}
|
|
}
|
|
|
- return map[level] || ''
|
|
|
|
|
|
|
+ return map[level] || 'primary'
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -366,37 +358,6 @@ export default {
|
|
|
min-height: calc(100vh - 120px);
|
|
min-height: calc(100vh - 120px);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-/* 页面标题 */
|
|
|
|
|
-.page-header {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- justify-content: space-between;
|
|
|
|
|
- align-items: flex-start;
|
|
|
|
|
- margin-bottom: 24px;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.page-title {
|
|
|
|
|
- font-size: 24px;
|
|
|
|
|
- font-weight: 700;
|
|
|
|
|
- color: #1E293B;
|
|
|
|
|
- margin: 0 0 4px 0;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.page-desc {
|
|
|
|
|
- font-size: 14px;
|
|
|
|
|
- color: #64748B;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.primary-btn {
|
|
|
|
|
- background: #1677FF;
|
|
|
|
|
- border: none;
|
|
|
|
|
- padding: 12px 24px;
|
|
|
|
|
- border-radius: 10px;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.primary-btn:hover {
|
|
|
|
|
- background: #0958D9;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
/* 统计卡片 */
|
|
/* 统计卡片 */
|
|
|
.stats-row {
|
|
.stats-row {
|
|
|
margin-bottom: 24px;
|
|
margin-bottom: 24px;
|
|
@@ -418,12 +379,12 @@ export default {
|
|
|
.package-icon {
|
|
.package-icon {
|
|
|
width: 40px;
|
|
width: 40px;
|
|
|
height: 40px;
|
|
height: 40px;
|
|
|
- background: #1677FF;
|
|
|
|
|
|
|
+ background: var(--adm-primary);
|
|
|
border-radius: 10px;
|
|
border-radius: 10px;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
|
- color: #FFFFFF;
|
|
|
|
|
|
|
+ color: var(--adm-bg-container);
|
|
|
margin-right: 12px;
|
|
margin-right: 12px;
|
|
|
font-size: 16px;
|
|
font-size: 16px;
|
|
|
}
|
|
}
|
|
@@ -431,28 +392,28 @@ export default {
|
|
|
.package-name {
|
|
.package-name {
|
|
|
font-weight: 600;
|
|
font-weight: 600;
|
|
|
font-size: 15px;
|
|
font-size: 15px;
|
|
|
- color: #1E293B;
|
|
|
|
|
|
|
+ color: var(--adm-text-88);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.package-id {
|
|
.package-id {
|
|
|
font-size: 12px;
|
|
font-size: 12px;
|
|
|
- color: #94A3B8;
|
|
|
|
|
|
|
+ color: var(--adm-text-45);
|
|
|
margin-top: 2px;
|
|
margin-top: 2px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.price {
|
|
.price {
|
|
|
font-weight: 700;
|
|
font-weight: 700;
|
|
|
- color: #1E293B;
|
|
|
|
|
|
|
+ color: var(--adm-text-88);
|
|
|
font-size: 15px;
|
|
font-size: 15px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.min-price {
|
|
.min-price {
|
|
|
- color: #94A3B8;
|
|
|
|
|
|
|
+ color: var(--adm-text-45);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.sales-count {
|
|
.sales-count {
|
|
|
font-weight: 600;
|
|
font-weight: 600;
|
|
|
- color: #3B82F6;
|
|
|
|
|
|
|
+ color: var(--adm-primary);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/* 弹窗 */
|
|
/* 弹窗 */
|
|
@@ -466,7 +427,7 @@ export default {
|
|
|
|
|
|
|
|
.price-tip {
|
|
.price-tip {
|
|
|
font-size: 12px;
|
|
font-size: 12px;
|
|
|
- color: #64748B;
|
|
|
|
|
|
|
+ color: var(--adm-text-65);
|
|
|
margin-top: 4px;
|
|
margin-top: 4px;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
@@ -475,7 +436,7 @@ export default {
|
|
|
|
|
|
|
|
.form-tip {
|
|
.form-tip {
|
|
|
font-size: 12px;
|
|
font-size: 12px;
|
|
|
- color: #94A3B8;
|
|
|
|
|
|
|
+ color: var(--adm-text-45);
|
|
|
margin-left: 8px;
|
|
margin-left: 8px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -484,14 +445,4 @@ export default {
|
|
|
justify-content: flex-end;
|
|
justify-content: flex-end;
|
|
|
gap: 12px;
|
|
gap: 12px;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-.sort-header {
|
|
|
|
|
- cursor: pointer;
|
|
|
|
|
- user-select: none;
|
|
|
|
|
- font-weight: 500;
|
|
|
|
|
- font-size: 12px;
|
|
|
|
|
-}
|
|
|
|
|
-.sort-header:hover {
|
|
|
|
|
- color: #409eff;
|
|
|
|
|
-}
|
|
|
|
|
</style>
|
|
</style>
|