Commit bdbc3952 by caoyanzhi

解决更新频率显示异常的问题

parent 8fa1b0b2
......@@ -67,7 +67,7 @@
</el-table-column>
<el-table-column label="更新频率" show-overflow-tooltip >
<template slot-scope="scope">
{{(scope.row.updateType, scope.row.updateDay, scope.row.isRealTime | formatUpdateFrequency)}}
{{scope.row | formatUpdateFrequency}}
</template>
</el-table-column>
<el-table-column prop="state" label="状态" >
......@@ -242,18 +242,19 @@ export default {
const reg = /\d{1,3}(?=(\d{3})+$)/g;
return (data + '').replace(reg, '$&,');
},
formatUpdateFrequency(type, day, isReal) {
if (isReal === 0) {
formatUpdateFrequency(rowData) {
const { updateType, updateDay, isRealTime } = rowData;
if (isRealTime === 1) {
return '--'
}
switch (type) {
switch (updateType) {
case 1:
return '每天一次';
case 2:
let weekArr = ['一', '二', '三', '四', '五', '六', '日'];
return day ? `每周${weekArr[day - 1]}` : '每周一次';
return updateDay ? `每周${weekArr[updateDay - 1]}` : '每周一次';
case 3:
return day ? `每月${day}号` : '每月一次';
return updateDay ? `每月${updateDay}号` : '每月一次';
default:
return '--';
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment