|
@@ -5,14 +5,21 @@
|
|
|
<div style="width: 100%;">
|
|
|
<!-- 统计 -->
|
|
|
<div class="statisticsBox">
|
|
|
- <div class="statisticsBox-item" :class="{'act': index === active}" v-for="(item, index) in statisticsList" :key="item.name" @click="statisticsClick(item, index)">
|
|
|
- <div style="font-size: 18px; color: var(--color-333); font-weight: bold;">{{ statistics[item.name] || '0' }}</div>
|
|
|
+ <div class="statisticsBox-item" :class="{'act': index === active}" v-for="(item, index) in statisticsList" :key="item.value" @click="handleStatisticsItem(item, index)">
|
|
|
+ <div style="font-size: 18px; color: var(--color-333); font-weight: bold;">{{ item.count }}</div>
|
|
|
<div style="font-size: 13px; color: var(--color-666);">{{ item.label }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="topTip">推荐好友入职得赏金</div>
|
|
|
<!-- 数据 -->
|
|
|
- <TablePage :items="dataList"></TablePage>
|
|
|
+ <TablePage :items="items"></TablePage>
|
|
|
+ <CtPagination
|
|
|
+ v-if="total > 0"
|
|
|
+ :total="total"
|
|
|
+ :page="query.pageNo"
|
|
|
+ :limit="query.pageSize"
|
|
|
+ @handleChange="handleChangePage"
|
|
|
+ ></CtPagination>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 滚动区域 -->
|
|
@@ -23,49 +30,70 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
+defineOptions({name: 'defineOptions-name'})
|
|
|
+import { ref } from 'vue'
|
|
|
+import { getDict } from '@/hooks/web/useDictionaries'
|
|
|
+import { getHireJobCvRelCount, getHireJobCvRelPage } from '@/api/publicRecruitment'
|
|
|
import TablePage from './components/table.vue'
|
|
|
import bountyDisplay from './components/bountyDisplay.vue'
|
|
|
-import { ref } from 'vue'
|
|
|
-defineOptions({name: 'defineOptions-name'})
|
|
|
+
|
|
|
+const active = ref(0)
|
|
|
+
|
|
|
// 数据统计
|
|
|
-const statistics = ref({ statisticsA: '3', statisticsB: '7', statisticsC: '5', statisticsD: '2', statisticsE: '1' })
|
|
|
-const statisticsList = ref([
|
|
|
- { count: '', label: '已报名', name: 'statisticsA' },
|
|
|
- { count: '', label: '已过筛', name: 'statisticsB' },
|
|
|
- { count: '', label: '已过面', name: 'statisticsC' },
|
|
|
- { count: '', label: '已入职', name: 'statisticsD' },
|
|
|
- { count: '', label: '已结算', name: 'statisticsE' }
|
|
|
-])
|
|
|
+const statisticsList = ref([])
|
|
|
+const getData = async () => {
|
|
|
+ const data = await getHireJobCvRelCount()
|
|
|
+ if (!data || !data.length) return
|
|
|
+ statisticsList.value.forEach(e => {
|
|
|
+ const obj = data.find(k => k.key === e.value)
|
|
|
+ if (!obj) return
|
|
|
+ e.count = obj.value
|
|
|
+ })
|
|
|
+}
|
|
|
|
|
|
-const avatarList = [
|
|
|
- 'https://img0.baidu.com/it/u=230622178,1565949306&fm=253&fmt=auto&app=138&f=JPEG?w=449&h=300',
|
|
|
- 'https://img0.baidu.com/it/u=1401084042,2724457850&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=726',
|
|
|
- 'https://q7.itc.cn/q_70/images03/20240423/6d236fae5c8f44ed9b60d977f32debb7.jpeg',
|
|
|
- 'https://q1.itc.cn/q_70/images03/20240609/1c1be14298be4dbe978e55bde6e958b0.jpeg',
|
|
|
- 'https://q4.itc.cn/q_70/images03/20240528/298d4abda5e4469d98fa77e7cde46525.jpeg',
|
|
|
- 'https://q5.itc.cn/q_70/images03/20240520/ceb0d77d1be24eea8cd3826994eac1c1.jpeg',
|
|
|
- 'https://img1.baidu.com/it/u=3995643348,1848098846&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=800',
|
|
|
-]
|
|
|
-const dataList = ref([])
|
|
|
-const dataItem = {
|
|
|
- name: '用户',
|
|
|
- 应聘公司: '门墩儿科技',
|
|
|
- 应聘职位: '酒店前台',
|
|
|
- 岗位薪资: '8000-10000/月',
|
|
|
- 推荐进度: '已报名',
|
|
|
- 赏金: '100积分',
|
|
|
+// 列表
|
|
|
+const items = ref([])
|
|
|
+const total = ref(0)
|
|
|
+const query = ref({
|
|
|
+ pageSize: 10,
|
|
|
+ pageNo: 1,
|
|
|
+ status: null
|
|
|
+})
|
|
|
+const getTableList = async () => {
|
|
|
+ const res = await getHireJobCvRelPage(query.value)
|
|
|
+ items.value = res.list
|
|
|
+ total.value = res.total
|
|
|
}
|
|
|
-const active = ref(0)
|
|
|
-const statisticsClick = (item, index) => {
|
|
|
+
|
|
|
+// 状态
|
|
|
+const getStatusData = () => {
|
|
|
+ getDict('menduner_hire_job_cv_status').then(({ data }) => {
|
|
|
+ data = data?.length && data || []
|
|
|
+ statisticsList.value = data.map(e => {
|
|
|
+ return { ...e, count: 0 }
|
|
|
+ })
|
|
|
+ query.value.status = data[0].value
|
|
|
+ getData()
|
|
|
+ getTableList()
|
|
|
+ })
|
|
|
+}
|
|
|
+getStatusData()
|
|
|
+
|
|
|
+// 分页
|
|
|
+const handleChangePage = (e) => {
|
|
|
+ query.value.pageNo = e
|
|
|
+ getTableList()
|
|
|
+}
|
|
|
+
|
|
|
+// 钻取
|
|
|
+const handleStatisticsItem = (item, index) => {
|
|
|
active.value = index
|
|
|
- const count = statistics.value[item.name] ? statistics.value[item.name] - 0 : 0
|
|
|
- dataList.value = []
|
|
|
- for (let i = 0; i < count; i++) {
|
|
|
- dataList.value.push({ ...dataItem, avatar: avatarList[i], name: dataItem.name+(i+1) })
|
|
|
- }
|
|
|
+ query.value.pageNo = 1
|
|
|
+ query.value.status = item.value
|
|
|
+ getTableList()
|
|
|
}
|
|
|
-statisticsClick(statisticsList.value[0], 0)
|
|
|
</script>
|
|
|
+
|
|
|
<style lang="scss" scoped>
|
|
|
.topTip {
|
|
|
color: var(--color-999);
|