Commit 6c8bfe23b583ae5dda7c162ce4c94298cc932878
1 parent
bc4f2fcb
时间过滤器
Showing
2 changed files
with
8 additions
and
3 deletions
src/utils/ncc.js
| ... | ... | @@ -218,6 +218,11 @@ const ncc = { |
| 218 | 218 | if (!cellValue) return '' |
| 219 | 219 | return dayjs(cellValue).format(format) |
| 220 | 220 | }, |
| 221 | + tableDateFormatDay(row, column, cellValue) { | |
| 222 | + let format = 'YYYY-MM-DD' | |
| 223 | + if (!cellValue) return '' | |
| 224 | + return dayjs(cellValue).format(format) | |
| 225 | + }, | |
| 221 | 226 | timeDeadLine(time){ |
| 222 | 227 | let date = (new Date()).getTime(); |
| 223 | 228 | let timeDiff = time - date; | ... | ... |
src/views/basePrincipalResponsibility/index.vue
| ... | ... | @@ -34,14 +34,14 @@ |
| 34 | 34 | <div class="NCC-common-layout-main NCC-flex-main"> |
| 35 | 35 | <NCC-table v-loading="listLoading" :data="list"> |
| 36 | 36 | <!-- <el-table-column prop="id" label="主键" align="left" show-overflow-tooltip/> --> |
| 37 | - <el-table-column prop="fileName" label="文件名" align="left" show-overflow-tooltip/> | |
| 37 | + <el-table-column prop="fileName" label="文件名" align="left" show-overflow-tooltip width="600"/> | |
| 38 | 38 | <el-table-column label="文件类型" prop="fileType" align="left" show-overflow-tooltip> |
| 39 | 39 | <template slot-scope="scope">{{ scope.row.fileType | dynamicText(fileTypeOptions) }}</template> |
| 40 | 40 | </el-table-column> |
| 41 | - <el-table-column prop="timeTakingEffect" label="生效时间" align="left" show-overflow-tooltip :formatter="ncc.tableDateFormat"/> | |
| 41 | + <el-table-column prop="timeTakingEffect" label="生效时间" align="left" show-overflow-tooltip :formatter="ncc.tableDateFormatDay"/> | |
| 42 | 42 | <!-- <el-table-column prop="content" label="具体内容" align="left" show-overflow-tooltip/> --> |
| 43 | 43 | <!-- <el-table-column prop="creatorUserId" label="创建用户" align="left" show-overflow-tooltip/> --> |
| 44 | - <el-table-column prop="creatorTime" label="创建时间" :formatter="ncc.tableDateFormat" align="left" show-overflow-tooltip/> | |
| 44 | + <el-table-column prop="creatorTime" label="创建时间" :formatter="ncc.tableDateFormatDay" align="left" show-overflow-tooltip/> | |
| 45 | 45 | <!-- <el-table-column prop="lastModifyUserId" label="修改用户" show-overflow-tooltip align="left"/> --> |
| 46 | 46 | <!-- <el-table-column prop="lastModifyTime" :formatter="ncc.tableDateFormat" label="修改时间" align="left" show-overflow-tooltip/> --> |
| 47 | 47 | <el-table-column label="操作" fixed="right" width="150"> | ... | ... |