|
@@ -3,14 +3,19 @@
|
|
|
<div class="c-title flex-center">
|
|
|
<span>积分排行榜</span>
|
|
|
<div>
|
|
|
- <el-select style="width: 110px" v-model="tabType" size="mini">
|
|
|
+ <el-select
|
|
|
+ style="width: 110px"
|
|
|
+ v-model="tabType"
|
|
|
+ size="mini"
|
|
|
+ @change="getList"
|
|
|
+ >
|
|
|
<el-option label="班组" :value="1"></el-option>
|
|
|
<el-option label="工作负责人" :value="2"></el-option>
|
|
|
<el-option label="作业人员" :value="3"></el-option>
|
|
|
</el-select>
|
|
|
<el-select
|
|
|
class="ml10"
|
|
|
- style="width: 80px"
|
|
|
+ style="width: 90px"
|
|
|
v-if="tabType == 1"
|
|
|
v-model="queryParams.teamType"
|
|
|
size="mini"
|
|
@@ -19,23 +24,46 @@
|
|
|
<el-option label="内部" :value="1"></el-option>
|
|
|
<el-option label="外部" :value="2"></el-option>
|
|
|
</el-select>
|
|
|
- <el-radio-group
|
|
|
+ <el-select
|
|
|
+ class="ml10"
|
|
|
size="mini"
|
|
|
+ style="width: 90px"
|
|
|
v-model="current"
|
|
|
@change="getList"
|
|
|
- class="ml10"
|
|
|
>
|
|
|
- <el-radio-button label="红榜"></el-radio-button>
|
|
|
- <el-radio-button label="黑榜"></el-radio-button>
|
|
|
- </el-radio-group>
|
|
|
+ <el-option label="红榜" value=""></el-option>
|
|
|
+ <el-option label="黑榜" value="1"></el-option>
|
|
|
+ </el-select>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<el-table
|
|
|
:v-loading="loading"
|
|
|
:data="tableData"
|
|
|
- style="width: 100%; margin-top: 8px"
|
|
|
height="100%"
|
|
|
+ v-if="tabType == 1"
|
|
|
+ >
|
|
|
+ <el-table-column prop="rankNum" label="排名" width="80" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <img
|
|
|
+ class="icon-box"
|
|
|
+ v-if="scope.$index < 3"
|
|
|
+ :src="iconMap[`no${scope.$index + 1}`]"
|
|
|
+ />
|
|
|
+ <span v-else> {{ scope.$index + 1 }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="teamName" label="队伍名称" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="address" label="得分" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+ <el-table
|
|
|
+ :v-loading="loading"
|
|
|
+ :data="tableData"
|
|
|
+ height="100%"
|
|
|
+ v-if="tabType == 2"
|
|
|
>
|
|
|
<el-table-column prop="rankNum" label="排名" width="80" align="center">
|
|
|
<template slot-scope="scope">
|
|
@@ -47,33 +75,33 @@
|
|
|
<span v-else> {{ scope.$index + 1 }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="companyName"
|
|
|
- label="单位"
|
|
|
- align="center"
|
|
|
- v-if="tabType != 1"
|
|
|
- >
|
|
|
+ <el-table-column prop="companyName" label="单位" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="managerName" label="负责人名称" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="address" label="得分" align="center">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- v-if="tabType == 1"
|
|
|
- prop="teamName"
|
|
|
- label="队伍名称"
|
|
|
- align="center"
|
|
|
- >
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+ <el-table
|
|
|
+ :v-loading="loading"
|
|
|
+ :data="tableData"
|
|
|
+ height="100%"
|
|
|
+ v-if="tabType == 3"
|
|
|
+ >
|
|
|
+ <el-table-column prop="rankNum" label="排名" width="80" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <img
|
|
|
+ class="icon-box"
|
|
|
+ v-if="scope.$index < 3"
|
|
|
+ :src="iconMap[`no${scope.$index + 1}`]"
|
|
|
+ />
|
|
|
+ <span v-else> {{ scope.$index + 1 }}</span>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- v-if="tabType == 2"
|
|
|
- prop="managerName"
|
|
|
- label="负责人名称"
|
|
|
- align="center"
|
|
|
- >
|
|
|
+ <el-table-column prop="companyName" label="单位" align="center">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- v-if="tabType == 3"
|
|
|
- prop="workUserName"
|
|
|
- label="作业人员"
|
|
|
- align="center"
|
|
|
- >
|
|
|
+ <el-table-column prop="workUserName" label="作业人员" align="center">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="address" label="得分" align="center">
|
|
|
</el-table-column>
|
|
@@ -85,6 +113,7 @@
|
|
|
import no1 from "@/assets/images/名次-第1名.png";
|
|
|
import no2 from "@/assets/images/名次-第2名.png";
|
|
|
import no3 from "@/assets/images/名次-第3名.png";
|
|
|
+import { teamRankList } from "@/api/secure/pdm-score-rank";
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -99,29 +128,20 @@ export default {
|
|
|
queryParams: {
|
|
|
teamType: 1,
|
|
|
},
|
|
|
- tableData: [
|
|
|
- {
|
|
|
- date: "1",
|
|
|
- name: "王小虎",
|
|
|
- address: "1212",
|
|
|
- },
|
|
|
- {
|
|
|
- date: "2",
|
|
|
- name: "王小虎",
|
|
|
- address: "12",
|
|
|
- },
|
|
|
- {
|
|
|
- date: "3",
|
|
|
- name: "王小虎",
|
|
|
- address: "12",
|
|
|
- },
|
|
|
- ],
|
|
|
+ tableData: [],
|
|
|
};
|
|
|
},
|
|
|
+ created() {
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
methods: {
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
- this.loading = false;
|
|
|
+ teamRankList(this.queryParams).then((response) => {
|
|
|
+ this.tableData = response.rows;
|
|
|
+ this.total = response.total;
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
},
|
|
|
},
|
|
|
};
|
|
@@ -135,6 +155,7 @@ export default {
|
|
|
}
|
|
|
.ranking-c {
|
|
|
height: 100%;
|
|
|
+ width: 100%;
|
|
|
}
|
|
|
::v-deep {
|
|
|
.el-table tr {
|