提交 289e0f48 编写于 作者: zhentian.jia's avatar zhentian.jia

文件多项刷新问题

上级 0f208671
...@@ -20,6 +20,7 @@ const itemList = r => require.ensure([], () => r(require('../views/learning/item ...@@ -20,6 +20,7 @@ const itemList = r => require.ensure([], () => r(require('../views/learning/item
const nameList = r => require.ensure([], () => r(require('../views/learning/name-list.vue')), 'name-list') const nameList = r => require.ensure([], () => r(require('../views/learning/name-list.vue')), 'name-list')
const dataAlignment = r => require.ensure([], () => r(require('../views/learning/data-alignment.vue')), 'data-alignment') const dataAlignment = r => require.ensure([], () => r(require('../views/learning/data-alignment.vue')), 'data-alignment')
const courseTraining = r => require.ensure([], () => r(require('../views/learning/course-training.vue')), 'course-training') const courseTraining = r => require.ensure([], () => r(require('../views/learning/course-training.vue')), 'course-training')
const exportDownload = r => require.ensure([], () => r(require('../views/learning/export-download.vue')), 'export-download')
export default [{ export default [{
path: '/', path: '/',
...@@ -76,6 +77,10 @@ export default [{ ...@@ -76,6 +77,10 @@ export default [{
path: '/course-training', path: '/course-training',
component: courseTraining component: courseTraining
}, },
{
path: '/export-download',
component: exportDownload
},
{ {
path: '/msg-push', path: '/msg-push',
component: msgPush, component: msgPush,
......
...@@ -195,8 +195,19 @@ const vueFilter = { ...@@ -195,8 +195,19 @@ const vueFilter = {
recordValue: (value) => { recordValue: (value) => {
if(value == 1) { if(value == 1) {
return '合格' return '合格'
}else { }else if(value == 2) {
return '不通过' return '不通过'
}else if(value == 3) {
return '优秀'
}else if(value == 4) {
return '无成绩'
}
},
exportStatus: (value) => {
if(value == 1) {
return '数据生成中,请稍后---'
}else {
return '文件生成失败请重新操作导出'
} }
}, },
} }
......
...@@ -44,16 +44,26 @@ ...@@ -44,16 +44,26 @@
</el-table-column> </el-table-column>
<el-table-column prop="region" label="地区" align="center"> <el-table-column prop="region" label="地区" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="join" label="参与课程状态" align="center"> <el-table-column v-if="tableType == 1" prop="join" label="参与课程状态" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.join | joinStatus }}</span> <span>{{ scope.row.join | joinStatus }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="date" label="完成培训日期" align="center" min-width="150"> <el-table-column v-if="tableType == 1" prop="date" label="完成培训日期" align="center" min-width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.date | liveDateFilter }}</span> <span>{{ scope.row.date | liveDateFilter }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="tableType == 2" prop="paddTime" label="通过考试日期" min-width="150" align="center">
<template slot-scope="scope">
<span>{{ scope.row.passDate | liveDateFilter }}</span>
</template>
</el-table-column>
<el-table-column v-if="tableType == 2" prop="level" label="考试成绩等级" min-width="80" align="center">
<template slot-scope="scope">
<span>{{ scope.row.rank | recordValue }}</span>
</template>
</el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination <el-pagination
...@@ -99,6 +109,7 @@ export default { ...@@ -99,6 +109,7 @@ export default {
region: '', region: '',
organization: '', organization: '',
tableData: [], tableData: [],
tableType: 1,
totalRows: 0, totalRows: 0,
statusList: [ statusList: [
{ {
...@@ -124,8 +135,8 @@ export default { ...@@ -124,8 +135,8 @@ export default {
created() { created() {
vm = this; vm = this;
// console.log("formInline:", this.formInline); // console.log("formInline:", this.formInline);
this.getUrlData(); vm.getUrlData();
this.search(); vm.search();
}, },
mounted: function() { mounted: function() {
commonUtil.resizeHeight(); commonUtil.resizeHeight();
...@@ -133,6 +144,7 @@ export default { ...@@ -133,6 +144,7 @@ export default {
methods: { methods: {
getUrlData() { getUrlData() {
let url = window.location.href; let url = window.location.href;
this.tableType = vm.getUrlSearch(url,"tableType");
this.region = vm.getUrlSearch(url,"region"); this.region = vm.getUrlSearch(url,"region");
this.organization = vm.getUrlSearch(url,"organization"); this.organization = vm.getUrlSearch(url,"organization");
}, },
...@@ -146,9 +158,11 @@ export default { ...@@ -146,9 +158,11 @@ export default {
post: '医生', post: '医生',
organization: '上海复旦大学附属华山医院', organization: '上海复旦大学附属华山医院',
region: '上海静安区', region: '上海静安区',
join: '1', join: 1,
complete: '1', complete: 1,
date: 1562144416000, date: 1562144416000,
passDate: 1562155416000,
rank: 1,
}]; }];
}, },
resetForm() { resetForm() {
...@@ -161,6 +175,7 @@ export default { ...@@ -161,6 +175,7 @@ export default {
pageSize: 10, pageSize: 10,
} }
); );
vm.search();
}, },
handleSizeChange(val) { handleSizeChange(val) {
console.log(`每页 ${val} 条`); console.log(`每页 ${val} 条`);
......
<template>
<div class="export-download">
<bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond"></bread-crumb>
<div class="component-content screenSet" id="screenSet">
<p>导出文件列表</p>
<el-table :data="tableData" style="width: 100%">
<el-table-column prop="name" label="名称" align="center" min-width="300"></el-table-column>
<el-table-column prop="time" label="时间" align="center" min-width="120">
<template slot-scope="scope">{{ scope.row.time | liveDateFilter }}</template>
</el-table-column>
<el-table-column prop="status" label="状态" align="center" min-width="150">
<template slot-scope="scope">{{ scope.row.status | exportStatus }}</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" min-width="70">
<template slot-scope="scope">
<el-button
type="primary"
:disabled="scope.row.buttonStatus"
size="small"
@click="update(scope.row)"
>{{ scope.row.buttonText }}</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="param.pageNo"
:page-sizes="[15, 30, 50]"
:page-size="param.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows"
></el-pagination>
</div>
</div>
</div>
</template>
<script>
import BreadCrumb from "../../components/breadcrumb.vue";
import * as commonUtil from "../../utils/utils";
let vm = null;
export default {
components: {
BreadCrumb
},
data() {
return {
curmbFirst: "学情报告",
curmbSecond: "导出下载",
tableData: [],
param: {
pageSize: 10,
pageNo: 1
},
totalRows: 0,
totalTime: 3
// buttonText: "刷新",
// buttonStatus: false,
};
},
created() {
vm = this;
this.search();
},
mounted: function() {
commonUtil.resizeHeight();
},
methods: {
setButton() {
for (let i = 0; i < vm.tableData.length; i++) {
vm.tableData[i].index = i;
vm.tableData[i].buttonText = "刷新";
vm.tableData[i].buttonStatus = false;
}
},
search() {
vm.tableData = [
{
id: 123,
name:
"浙江省心脑项目,浙江省杭州市区西湖区,第二人民医院杭州市中医院---",
time: 1562221264000,
status: 1
},
{
id: 233,
name:
"江西省心脑项目,浙江省杭州市区西湖区,第二人民医院杭州市中医院---",
time: 1562221874000,
status: 1
},
{
id: 666,
name:
"上海市心脑项目,浙江省杭州市区西湖区,第二人民医院杭州市中医院---",
time: 1562225864000,
status: 1
}
];
this.setButton();
},
update(row) {
this.$nextTick(function() {
console.log(vm.tableData[row.index]);
let nowTime = vm.totalTime;
vm.tableData[row.index].name = vm.tableData[row.index].name+ ' ';
vm.tableData[row.index].buttonText = nowTime + "s后可以刷新";
vm.tableData[row.index].buttonStatus = true;
let clock = window.setInterval(() => {
nowTime--;
vm.tableData[row.index].name = vm.tableData[row.index].name+ ' ';
vm.tableData[row.index].buttonText = nowTime + "s后可以刷新";
if (nowTime < 0) {
window.clearInterval(clock);
vm.tableData[row.index].name = vm.tableData[row.index].name+ ' ';
vm.tableData[row.index].buttonText = "刷新";
vm.tableData[row.index].buttonStatus = false; //这里重新开启
}
}, 1000);
});
},
// 更改数据显示数量
handleSizeChange(val) {
vm.param.pageSize = val;
vm.search();
},
// 换页
handleCurrentChange(val) {
vm.param.pageNo = value;
vm.search();
}
}
};
</script>
<style lang="scss">
.export-download {
.component-content {
background: #fff;
padding: 10px;
}
}
</style>
\ No newline at end of file
...@@ -119,7 +119,7 @@ export default { ...@@ -119,7 +119,7 @@ export default {
}, },
checkName(data) { checkName(data) {
console.log('dialogData',this.dialogData); console.log('dialogData',this.dialogData);
this.$router.push("course-training?id="+data.id+"&region="+this.dialogData.region+"&organization="+this.dialogData.organization); this.$router.push("course-training?tableType=1&id="+data.id+"&region="+this.dialogData.region+"&organization="+this.dialogData.organization);
}, },
handleSizeChange(val) { handleSizeChange(val) {
console.log(`每页 ${val} 条`); console.log(`每页 ${val} 条`);
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<el-table-column prop="startNum" label="成绩合格人数" min-width="80" align="center"></el-table-column> <el-table-column prop="startNum" label="成绩合格人数" min-width="80" align="center"></el-table-column>
<el-table-column label="操作" fixed="right" align="center" min-width="100"> <el-table-column label="操作" fixed="right" align="center" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="go(scope.row)">查看名单</el-button> <el-button type="text" size="small" @click="goPage(scope.row)">查看名单</el-button>
</template> </template>
</el-table-column> </el-table-column>
<div slot="empty"> <div slot="empty">
...@@ -53,17 +53,20 @@ import { openLoading, closeLoading } from "../../utils/utils"; ...@@ -53,17 +53,20 @@ import { openLoading, closeLoading } from "../../utils/utils";
import * as commonUtil from "../../utils/utils"; import * as commonUtil from "../../utils/utils";
let vm let vm
export default { export default {
props: {
formInline: {
type: Object
},
activeName: {
type: String
},
dialogData: {
type: Object
},
},
data() { data() {
return { return {
tableData: [ tableData: [],
{
name: "asd",
joinNum: 123123,
passNum: 123,
goodNum: 12,
startNum: 111
}
],
cardData: [ cardData: [
{ {
title: "项目所有考试数", title: "项目所有考试数",
...@@ -84,7 +87,8 @@ export default { ...@@ -84,7 +87,8 @@ export default {
}; };
}, },
created() { created() {
vm = this vm = this;
vm.search();
}, },
// 挂载到Dom完成时 // 挂载到Dom完成时
mounted: function() { mounted: function() {
...@@ -92,21 +96,21 @@ export default { ...@@ -92,21 +96,21 @@ export default {
}, },
methods: { methods: {
// 搜索列表 // 搜索列表
search(flag) { search() {
if(flag) vm.searchParam.pageNo = 1 vm.tableData= [
openLoading(vm); {
let params = {}; id: 22,
vm.GET(url, params).then(res => { name: "asd",
closeLoading(vm); joinNum: 123123,
if (res.code == "000000") { passNum: 123,
} else { goodNum: 12,
vm.$message.info(res.message); startNum: 111
} }
}); ];
}, },
// 跳转查看名单页面 // 跳转查看名单页面
go(row) { goPage(data) {
vm.$router.push('/name-list') vm.$router.push("course-training?tableType=2&id="+data.id+"&region="+this.dialogData.region+"&organization="+this.dialogData.organization);
}, },
// 更改数据显示数量 // 更改数据显示数量
handleSizeChange(val) { handleSizeChange(val) {
......
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
<course-analysis ref="childCourse" :formInline="formInline" :activeName="activeName" :dialogData="dialogData"></course-analysis> <course-analysis ref="childCourse" :formInline="formInline" :activeName="activeName" :dialogData="dialogData"></course-analysis>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="考试分析" name="fourth"> <el-tab-pane label="考试分析" name="fourth">
<examination-analysisfrom></examination-analysisfrom> <examination-analysisfrom ref="childCourse" :formInline="formInline" :activeName="activeName" :dialogData="dialogData"></examination-analysisfrom>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="学习效果分析" name="fifth" lazy> <el-tab-pane label="学习效果分析" name="fifth" lazy>
<learning-effect></learning-effect> <learning-effect></learning-effect>
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
<bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond"></bread-crumb> <bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond"></bread-crumb>
<div class="component-content screenSet" id="screenSet"> <div class="component-content screenSet" id="screenSet">
<p class="text">地区: {{params.address}}</p> <p class="text">地区: {{region}}</p>
<p class="text">选择机构: {{params.pregress}}</p> <p class="text">选择机构: {{organization}}</p>
<el-form class="form-update" ref="serchForm" :model="formData" label-width="100px" style="width:40%;"> <el-form class="form-update" ref="serchForm" :model="formData" label-width="100px" style="width:40%;">
<el-form-item label="考试成绩等级:"> <el-form-item label="考试成绩等级:">
<el-select <el-select
...@@ -75,11 +75,9 @@ export default { ...@@ -75,11 +75,9 @@ export default {
data() { data() {
return { return {
curmbFirst: "学情报告", curmbFirst: "学情报告",
curmbSecond: "项目管理", curmbSecond: "项目列表",
params: { region: "",
address: "浙江省/杭州市/西湖区", organization: "",
pregress: "杭州市中医院、杭州市第七人民医院"
},
formData: { formData: {
name: '', name: '',
rank: '', rank: '',
...@@ -114,9 +112,15 @@ export default { ...@@ -114,9 +112,15 @@ export default {
}, },
created() { created() {
vm = this; vm = this;
vm.getUrlData();
vm.search(); vm.search();
}, },
methods: { methods: {
getUrlData() {
let url = window.location.href;
this.region = vm.getUrlSearch(url,"region");
this.organization = vm.getUrlSearch(url,"organization");
},
// 搜索列表 // 搜索列表
search() { search() {
vm.joinData = [ vm.joinData = [
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册