Commit ed5dabeb by xiaohai

分组列表更新频率字段调整显示

parent 1a92ed6f
......@@ -58,7 +58,12 @@
show-overflow-tooltip>
<template slot-scope="scope">
<!-- {{ scope.row.updateType == 1 ? '每天一次' : scope.row.updateType == 2 ? (scope.row.updateDay ? '每周'+ weekArr[scope.row.updateDay - 1] : '每周一次') : (scope.row.updateDay ? '每月' + scope.row.updateDay + '号' : '每月一次')}} -->
{{scope.row.updateType, scope.row.updateDay | formatUpdateFrequency}}
<template v-if="scope.row.isRealTime == 1">
{{scope.row.updateType, scope.row.updateDay | formatUpdateFrequency}}
</template>
<template v-else>
--
</template>
</template>
</el-table-column>
<el-table-column
......@@ -161,7 +166,6 @@
return {
tableData: [],
pageSize: 20,
weekArr: ['一', '二', '三', '四', '五', '六', '日'],
currentPage: 1,
dataSearch: "",
baseUrl: "",
......@@ -353,16 +357,17 @@
const that = this;
switch(type) {
case 1:
return '每天一次';
break;
return '每天一次';
break;
case 2:
return day ? `每周${that.weekArr[day - 1]}` : '每周一次';
let weekArr = ['一', '二', '三', '四', '五', '六', '日'];
return day ? `每周${weekArr[day - 1]}` : '每周一次';
break;
case 3:
return day ? `每月${that.weekArr[day - 1]}号` : '每月一次';
break;
return day ? `每月${day}号` : '每月一次';
break;
default:
return '--';
return '--';
}
}
},
......
......@@ -58,7 +58,12 @@
show-overflow-tooltip>
<template slot-scope="scope">
<!-- {{ scope.row.updateType == 1 ? '每天一次' : scope.row.updateType == 2 ? (scope.row.updateDay ? '每周'+ weekArr[scope.row.updateDay - 1] : '每周一次') : (scope.row.updateDay ? '每月' + scope.row.updateDay + '号' : '每月一次')}} -->
{{scope.row.updateType, scope.row.updateDay | formatUpdateFrequency}}
<template v-if="scope.row.isRealTime == 1">
{{scope.row.updateType, scope.row.updateDay | formatUpdateFrequency}}
</template>
<template v-else>
--
</template>
</template>
</el-table-column>
<el-table-column
......@@ -171,8 +176,7 @@
currentPage: 1,
pageSize: 20,
total: 0,
groupSetShow: false,
weekArr: ['一', '二', '三', '四', '五', '六', '日']
groupSetShow: false
}
},
filters: {
......@@ -187,16 +191,17 @@
return (data + '').replace(reg, '$&,');
},
formatUpdateFrequency(type, day) {
const that = this;
let that = this;
switch(type) {
case 1:
return '每天一次';
break;
case 2:
return day ? `每周${that.weekArr[day - 1]}` : '每周一次';
let weekArr = ['一', '二', '三', '四', '五', '六', '日'];
return day ? `每周${weekArr[day - 1]}` : '每周一次';
break;
case 3:
return day ? `每月${that.weekArr[day - 1]}号` : '每月一次';
return day ? `每月${day}号` : '每月一次';
break;
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