提交 02b1d7de 编写于 作者: zhentian.jia's avatar zhentian.jia

课程table问题

上级 f5982059
...@@ -343,12 +343,20 @@ const vueFilter = { ...@@ -343,12 +343,20 @@ const vueFilter = {
} }
}, },
finishFlagType: (value) => { finishFlagType: (value) => {
if(value == 0) { if(value[1] == null) {
return '未参与'; if(value[0] == 0) {
} else if(value == 1) { return '未参与';
return '未完成'; } else if(value[0] == 1) {
} else if(value == 2) { return '未完成';
return '已完成'; } else if(value[0] == 2) {
return '已完成';
}
} else {
if(value[0] == 0) {
return '未参与';
} else if(value[0] == 1) {
return '已参与';
}
} }
}, },
toThousands:(value) => { toThousands:(value) => {
......
...@@ -363,8 +363,6 @@ export function educationEffect(xAxisData, seriesBefore, seriesAfter) { ...@@ -363,8 +363,6 @@ export function educationEffect(xAxisData, seriesBefore, seriesAfter) {
}, },
formatter: function (params) { formatter: function (params) {
let relVal = params[0].name + ""; let relVal = params[0].name + "";
let value = 0;
relVal += value + "";
let divList = []; let divList = [];
divList[0] = "<div style='background: #5D7092;height: 12px;width: 20px;margin: 5px 5px 0 2px;float: left;border-radius:2px;'></div>"; divList[0] = "<div style='background: #5D7092;height: 12px;width: 20px;margin: 5px 5px 0 2px;float: left;border-radius:2px;'></div>";
divList[1] = "<div style='background: #FFB01B;height: 12px;width: 20px;margin: 5px 5px 0 2px;float: left;border-radius:2px;'></div>"; divList[1] = "<div style='background: #FFB01B;height: 12px;width: 20px;margin: 5px 5px 0 2px;float: left;border-radius:2px;'></div>";
...@@ -455,8 +453,6 @@ export function knowledgeEffect(xAxisData, seriesBefore, seriesAfter) { ...@@ -455,8 +453,6 @@ export function knowledgeEffect(xAxisData, seriesBefore, seriesAfter) {
}, },
formatter: function (params) { formatter: function (params) {
let relVal = params[0].name + ""; let relVal = params[0].name + "";
let value = 0;
relVal += value + "";
let divList = []; let divList = [];
divList[0] = "<div style='background: #5D7092;height: 12px;width: 20px;margin: 5px 5px 0 2px;float: left;border-radius:2px;'></div>"; divList[0] = "<div style='background: #5D7092;height: 12px;width: 20px;margin: 5px 5px 0 2px;float: left;border-radius:2px;'></div>";
divList[1] = "<div style='background: #FFB01B;height: 12px;width: 20px;margin: 5px 5px 0 2px;float: left;border-radius:2px;'></div>"; divList[1] = "<div style='background: #FFB01B;height: 12px;width: 20px;margin: 5px 5px 0 2px;float: left;border-radius:2px;'></div>";
......
...@@ -422,7 +422,7 @@ export default { ...@@ -422,7 +422,7 @@ export default {
vm.certFlag = res.data.certFlag; vm.certFlag = res.data.certFlag;
vm.maxDate = new Date(res.data.maxDate); vm.maxDate = new Date(res.data.maxDate);
vm.minDate = new Date(res.data.minDate); vm.minDate = new Date(res.data.minDate);
console.log('日期:',vm.maxDate,vm.minDate) // console.log('日期:',vm.maxDate,vm.minDate)
vm.getRegionOption(); vm.getRegionOption();
} }
}); });
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
<el-table-column prop="addressName" label="地区" align="center"></el-table-column> <el-table-column prop="addressName" label="地区" align="center"></el-table-column>
<el-table-column v-if="tableType == 1" prop="finishFlag" label="参与课程状态" align="center"> <el-table-column v-if="tableType == 1" prop="finishFlag" label="参与课程状态" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.finishFlag | finishFlagType }}</span> <span>{{ [scope.row.finishFlag , base] | finishFlagType }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -151,24 +151,7 @@ export default { ...@@ -151,24 +151,7 @@ export default {
tableData: [], tableData: [],
tableType: 1, tableType: 1,
totalRows: 0, totalRows: 0,
statusList: [ statusList: [],
{
value: -1,
label: "全部"
},
{
value: 0,
label: "未参与"
},
{
value: 1,
label: "未完成"
},
{
value: 2,
label: "已完成"
}
],
rankList: [ rankList: [
{ {
value: -1, value: -1,
...@@ -217,11 +200,49 @@ export default { ...@@ -217,11 +200,49 @@ export default {
vm.base = vm.getUrlSearch(window.location.href, "base"); vm.base = vm.getUrlSearch(window.location.href, "base");
vm.getInitData(); vm.getInitData();
vm.search(); vm.search();
vm.initStatusList();
}, },
mounted: function() { mounted: function() {
commonUtil.resizeHeight(); commonUtil.resizeHeight();
}, },
methods: { methods: {
initStatusList() {
if(vm.base == null) {
vm.statusList = [
{
value: -1,
label: "全部"
},
{
value: 0,
label: "未参与"
},
{
value: 1,
label: "未完成"
},
{
value: 2,
label: "已完成"
}
];
} else {
vm.statusList = [
{
value: -1,
label: "全部"
},
{
value: 0,
label: "未参与"
},
{
value: 1,
label: "已经参"
},
]
}
},
getHostital() { getHostital() {
let req = { let req = {
projectId: vm.queryData.projectId, projectId: vm.queryData.projectId,
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册