提交 9a1746cb 编写于 作者: zhentian.jia's avatar zhentian.jia

时间段导出查看

上级 3a13d02c
...@@ -46,7 +46,6 @@ export function recordOption(legendData, xAxisData, seriesData) { ...@@ -46,7 +46,6 @@ export function recordOption(legendData, xAxisData, seriesData) {
tooltip: { tooltip: {
trigger: "axis", trigger: "axis",
axisPointer: { axisPointer: {
// 坐标轴指示器,坐标轴触发有效
type: "shadow", // 默认为直线,可选为:'line' | 'shadow' type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
shadowStyle: { shadowStyle: {
shadowColor: '#E3EFED', shadowColor: '#E3EFED',
...@@ -123,11 +122,18 @@ export function certificateOption(xAxisData, seriesJoin, seriesCert, seriesRate) ...@@ -123,11 +122,18 @@ export function certificateOption(xAxisData, seriesJoin, seriesCert, seriesRate)
}, },
tooltip: { tooltip: {
trigger: "axis", trigger: "axis",
// axisPointer: {
// type: "cross",
// crossStyle: {
// color: "#999"
// }
// },
axisPointer: { axisPointer: {
type: "cross", type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
crossStyle: { shadowStyle: {
color: "#999" shadowColor: '#E3EFED',
} width: 36,
},
}, },
backgroundColor: 'rgba(0,0,0,0.7)', backgroundColor: 'rgba(0,0,0,0.7)',
formatter: function (params) { formatter: function (params) {
...@@ -285,13 +291,25 @@ export function durationOption(xAxisData, seriesData) { ...@@ -285,13 +291,25 @@ export function durationOption(xAxisData, seriesData) {
data: xAxisData, data: xAxisData,
axisTick: { axisTick: {
alignWithLabel: true alignWithLabel: true
} },
axisLine: { //隐藏轴线
show: false
},
axisTick: { // 隐藏刻度
show: false
},
} }
], ],
yAxis: [ yAxis: [
{ {
type: "value", type: "value",
name: "完成时长 (天)" name: "完成时长 (天)",
axisLine: { //隐藏轴线
show: false
},
axisTick: { // 隐藏刻度
show: false
},
} }
], ],
series: [ series: [
...@@ -532,9 +550,6 @@ export function examTimes(xAxisData, seriesData) { ...@@ -532,9 +550,6 @@ export function examTimes(xAxisData, seriesData) {
}, },
xAxis: [ xAxis: [
{ {
// splitLine: {
// show: false
// },
axisLabel: { axisLabel: {
interval: 0, interval: 0,
}, },
...@@ -542,7 +557,13 @@ export function examTimes(xAxisData, seriesData) { ...@@ -542,7 +557,13 @@ export function examTimes(xAxisData, seriesData) {
data: xAxisData, data: xAxisData,
axisTick: { axisTick: {
alignWithLabel: true alignWithLabel: true
} },
axisLine: { //隐藏轴线
show: false
},
axisTick: { // 隐藏刻度
show: false
},
} }
], ],
yAxis: [ yAxis: [
...@@ -551,7 +572,13 @@ export function examTimes(xAxisData, seriesData) { ...@@ -551,7 +572,13 @@ export function examTimes(xAxisData, seriesData) {
show: true show: true
}, },
type: "value", type: "value",
name: "人数 (名)" name: "人数 (名)",
axisLine: { //隐藏轴线
show: false
},
axisTick: { // 隐藏刻度
show: false
},
} }
], ],
series: [ series: [
...@@ -599,9 +626,6 @@ export function examScore(xAxisData, seriesData) { ...@@ -599,9 +626,6 @@ export function examScore(xAxisData, seriesData) {
}, },
xAxis: [ xAxis: [
{ {
// splitLine: {
// show: false
// },
axisLabel: { axisLabel: {
interval: 0, interval: 0,
}, },
...@@ -609,7 +633,13 @@ export function examScore(xAxisData, seriesData) { ...@@ -609,7 +633,13 @@ export function examScore(xAxisData, seriesData) {
data: xAxisData, data: xAxisData,
axisTick: { axisTick: {
alignWithLabel: true alignWithLabel: true
} },
axisLine: { //隐藏轴线
show: false
},
axisTick: { // 隐藏刻度
show: false
},
} }
], ],
yAxis: [ yAxis: [
...@@ -618,7 +648,13 @@ export function examScore(xAxisData, seriesData) { ...@@ -618,7 +648,13 @@ export function examScore(xAxisData, seriesData) {
show: true show: true
}, },
type: "value", type: "value",
name: "人数 (名)" name: "人数 (名)",
axisLine: { //隐藏轴线
show: false
},
axisTick: { // 隐藏刻度
show: false
},
} }
], ],
series: [ series: [
...@@ -639,10 +675,10 @@ export function examScore(xAxisData, seriesData) { ...@@ -639,10 +675,10 @@ export function examScore(xAxisData, seriesData) {
}; };
return option; return option;
} }
export function ringOption(num , color) { export function ringOption(num, color) {
let option = { let option = {
title: { title: {
text: num+'%', text: num + '%',
x: 'center', x: 'center',
y: 'center', y: 'center',
textStyle: { textStyle: {
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
<div class="component-content screenSet" id="screenSet"> <div class="component-content screenSet" id="screenSet">
<div class="p-title">任务列表</div> <div class="p-title">任务列表</div>
<el-tabs v-model="listType" type="card" @tab-click="handleClick"> <el-tabs v-model="listType" type="card" @tab-click="handleClick">
<el-tab-pane label="查看报告" name="1"></el-tab-pane> <el-tab-pane label="查看报告" name="2"></el-tab-pane>
<el-tab-pane label="导出列表" name="2"></el-tab-pane> <el-tab-pane label="导出列表" name="1"></el-tab-pane>
</el-tabs> </el-tabs>
<el-table :data="tableData" class="table-export" style="width: 100%"> <el-table :data="tableData" class="table-export" style="width: 100%">
<el-table-column <el-table-column
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="status" label="状态" align="left" min-width="30"> <el-table-column prop="status" label="状态" align="left" min-width="30">
<template slot-scope="scope"> <template slot-scope="scope">
<span class="logo"></span> <span class="logo" v-bind:class="{ 'logo_0': scope.row.status == 0, 'logo_1': scope.row.status == 1, 'logo_2': scope.row.status == 2 }"></span>
<span class="text">{{ scope.row.status | exportStatus }}</span> <span class="text">{{ scope.row.status | exportStatus }}</span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -30,8 +30,10 @@ ...@@ -30,8 +30,10 @@
:disabled="scope.row.buttonStatus" :disabled="scope.row.buttonStatus"
size="small" size="small"
type="text" type="text"
v-if="scope.row.status != 2"
@click="update(scope.row)" @click="update(scope.row)"
>{{ scope.row.buttonText }}</el-button> >{{ scope.row.buttonText }}</el-button>
<div v-if="scope.row.status == 2">-</div>
</template> </template>
</el-table-column> </el-table-column>
<div slot="empty"> <div slot="empty">
...@@ -69,7 +71,7 @@ export default { ...@@ -69,7 +71,7 @@ export default {
data() { data() {
return { return {
curmbFirst: "学情报告", curmbFirst: "学情报告",
curmbSecond: "导出下载", curmbSecond: "任务列表",
projectId: "", projectId: "",
tableData: [], tableData: [],
param: { param: {
...@@ -79,7 +81,7 @@ export default { ...@@ -79,7 +81,7 @@ export default {
totalRows: 0, totalRows: 0,
totalTime: 3, totalTime: 3,
queryData: {}, queryData: {},
listType: "1" listType: "2"
// buttonText: "刷新", // buttonText: "刷新",
// buttonStatus: false, // buttonStatus: false,
}; };
...@@ -89,7 +91,7 @@ export default { ...@@ -89,7 +91,7 @@ export default {
this.projectId = vm.getUrlSearch(window.location.href, "projectId"); this.projectId = vm.getUrlSearch(window.location.href, "projectId");
let listType = vm.getUrlSearch(window.location.href, "listType"); let listType = vm.getUrlSearch(window.location.href, "listType");
if(listType == null) { if(listType == null) {
vm.listType = '1'; vm.listType = '2';
} else { } else {
vm.listType = listType; vm.listType = listType;
} }
...@@ -107,7 +109,11 @@ export default { ...@@ -107,7 +109,11 @@ export default {
for (let i = 0; i < vm.tableData.length; i++) { for (let i = 0; i < vm.tableData.length; i++) {
vm.tableData[i].index = i; vm.tableData[i].index = i;
if (vm.tableData[i].status == 1) { if (vm.tableData[i].status == 1) {
vm.tableData[i].buttonText = "下载"; if(vm.listType == '2') {
vm.tableData[i].buttonText = "查看报告";
} else if(vm.listType == '1') {
vm.tableData[i].buttonText = "下载";
}
vm.tableData[i].buttonStatus = false; vm.tableData[i].buttonStatus = false;
} else if (vm.tableData[i].status == 0) { } else if (vm.tableData[i].status == 0) {
vm.tableData[i].buttonText = "刷新"; vm.tableData[i].buttonText = "刷新";
...@@ -138,11 +144,6 @@ export default { ...@@ -138,11 +144,6 @@ export default {
} }
}); });
}, },
downLoad(row) {
setTimeout(() => {
window.open(row.fileUrl);
}, 500);
},
getDownLoadStatus(row) { getDownLoadStatus(row) {
// let req = { // let req = {
// id: row.id // id: row.id
...@@ -165,7 +166,12 @@ export default { ...@@ -165,7 +166,12 @@ export default {
// console.log('res.data.data',res.data.data); // console.log('res.data.data',res.data.data);
if (updateStatus == 1) { if (updateStatus == 1) {
vm.tableData[row.index].title = vm.tableData[row.index].title + " "; vm.tableData[row.index].title = vm.tableData[row.index].title + " ";
vm.tableData[row.index].buttonText = "下载"; // vm.tableData[row.index].buttonText = "下载";
if(vm.listType == '2') {
vm.tableData[row.index].buttonText = "查看报告";
} else if(vm.listType == '1') {
vm.tableData[row.index].buttonText = "下载";
}
vm.tableData[row.index].fileUrl = res.data.list[0].url; vm.tableData[row.index].fileUrl = res.data.list[0].url;
} else if (updateStatus == 0) { } else if (updateStatus == 0) {
vm.tableData[row.index].title = vm.tableData[row.index].title + " "; vm.tableData[row.index].title = vm.tableData[row.index].title + " ";
...@@ -182,9 +188,22 @@ export default { ...@@ -182,9 +188,22 @@ export default {
} }
}); });
}, },
downLoad(row) {
setTimeout(() => {
window.open(row.fileUrl);
}, 500);
},
exportTime(row) {
vm.$router.push("item-list?downloadId="+row.id);
},
update(row) { update(row) {
if (vm.tableData[row.index].status == 1) { if (vm.tableData[row.index].status == 1) {
vm.downLoad(row); // vm.downLoad(row);
if(vm.listType == '2') {
vm.exportTime(row);
} else if(vm.listType == '1') {
vm.downLoad(row);
}
} else { } else {
this.$nextTick(function() { this.$nextTick(function() {
console.log(vm.tableData[row.index]); console.log(vm.tableData[row.index]);
...@@ -217,7 +236,7 @@ export default { ...@@ -217,7 +236,7 @@ export default {
}, },
// 换页 // 换页
handleCurrentChange(val) { handleCurrentChange(val) {
vm.param.pageNo = value; vm.param.pageNo = val;
vm.search(); vm.search();
} }
} }
...@@ -247,8 +266,16 @@ export default { ...@@ -247,8 +266,16 @@ export default {
width: 6px; width: 6px;
height: 6px; height: 6px;
border-radius: 50%; border-radius: 50%;
}
.logo_0 {
background: #1890ff; background: #1890ff;
} }
.logo_1 {
background: #52C41A;
}
.logo_2 {
background: #F5222D;
}
.text { .text {
float: left; float: left;
} }
......
...@@ -333,7 +333,7 @@ export default { ...@@ -333,7 +333,7 @@ export default {
vm.dataType = 0; vm.dataType = 0;
} }
} }
console.log('vm.hospitalCnt',vm.hospitalCnt); // console.log('vm.hospitalCnt',vm.hospitalCnt);
if(vm.dataType == 0) { if(vm.dataType == 0) {
vm.checkRange = "1"; vm.checkRange = "1";
vm.checkTime = "1", vm.checkTime = "1",
......
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册