From 75271baf2b4dba13087674f020afbc7b08a83482 Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: Wed, 31 Jul 2024 16:26:20 +0800
Subject: [PATCH] 修改
---
src/views/onlineEducation/count/index.vue | 98 +++++++++++++++++++++++++++++++++---------------
1 files changed, 67 insertions(+), 31 deletions(-)
diff --git a/src/views/onlineEducation/count/index.vue b/src/views/onlineEducation/count/index.vue
index a8affba..03fb279 100644
--- a/src/views/onlineEducation/count/index.vue
+++ b/src/views/onlineEducation/count/index.vue
@@ -7,14 +7,24 @@
type="daterange"
range-separator="至"
start-placeholder="开始日期"
- end-placeholder="结束日期">
+ end-placeholder="结束日期"
+ format="yyyy-MM-dd"
+ >
</el-date-picker>
- <el-select v-model="queryParams.object" size="small" style="margin-left: 40px" placeholder="请选择科目">
+ <el-select v-model="queryParams.qualificationType" size="small" style="margin-left: 40px;" clearable placeholder="请选择资格类型">
<el-option
- v-for="item in objectList"
- :key="item.value"
- :label="item.label"
- :value="item.value">
+ v-for="item in qualificationList"
+ :key="item.id"
+ :label="item.name"
+ :value="item.id">
+ </el-option>
+ </el-select>
+ <el-select v-model="queryParams.trainOrgId" size="small" style="margin-left: 40px;" clearable filterable placeholder="请选择所属机构">
+ <el-option
+ v-for="item in trainOrgList"
+ :key="item.id"
+ :label="item.name"
+ :value="item.id">
</el-option>
</el-select>
<el-button
@@ -32,10 +42,8 @@
</div>
<el-table v-loading="loading" :data="expertList">
<el-table-column label="平台" align="center" prop="name" />
- <el-table-column label="机构" align="center" prop="organization" />
- <el-table-column label="培训总人数" align="center" prop="pTotal" />
- <el-table-column label="总时长" align="center" prop="tTotal" />
- <el-table-column label="培训学时达标人数" align="center" prop="timeQualifyNum" />
+ <el-table-column label="培训总人数" align="center" prop="tTotal" />
+ <el-table-column label="培训学时达标人数" align="center" prop="pTotal" />
<el-table-column label="考试合格人数" align="center" prop="examQualifyNum" />
<el-table-column label="考试合格率" align="center" prop="passRate" />
</el-table>
@@ -50,6 +58,8 @@
</template>
<script>
+import moment from 'moment'
+
export default {
name: "count",
components: {},
@@ -72,38 +82,63 @@
},
],
expertList: [],
- queryParams: {},
- time: []
+ queryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ startTime: '',
+ endTime: '',
+ qualificationType: null,
+ trainOrgId: null
+ },
+ time: [],
+ qualificationList: [
+ {
+ id: 1,
+ name: '主要负责人'
+ },
+ {
+ id: 2,
+ name: '安全生产管理人员'
+ },
+ {
+ id: 3,
+ name: '特种作业人员'
+ }
+
+ ],
+ trainOrgList: []
};
},
created() {
+ this.setDate()
this.getList()
},
methods: {
+ setDate(){
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+ console.log('11',start,end)
+ const s = moment(start).format('YYYY-MM-DD')
+ const e = moment(end).format('YYYY-MM-DD')
+ this.time = [s,e]
+ },
getList(){
+
+ this.queryParams.startTime = moment(this.time[0]).format('YYYY-MM-DD')
+ this.queryParams.endTime = moment(this.time[1]).format('YYYY-MM-DD')
+ console.log('1111',this.queryParams)
this.loading = true;
this.expertList = [
{
id: 1,
- name: '测试数据1',
+ name: '链工宝',
organization: '测试机构1',
- pTotal: 40,
- tTotal: 80,
- timeQualifyNum: 38,
- examQualifyNum: 35,
- passRate: '87.5%'
+ pTotal: '--',
+ tTotal: '--',
+ examQualifyNum: '--',
+ passRate: '--'
},
- {
- id: 2,
- name: '测试数据2',
- organization: '测试机构3',
- pTotal: 30,
- tTotal: 50,
- timeQualifyNum: 30,
- examQualifyNum: 30,
- passRate: '100%'
-
- }
]
this.total = 2;
this.loading = false;
@@ -120,9 +155,10 @@
this.queryParams = {
pageNum: 1,
pageSize: 10,
- object: '',
startTime: '',
- endTime: ''
+ endTime: '',
+ qualificationType: null,
+ trainOrgId: null
}
this.time = []
this.getList()
--
Gitblit v1.9.2