| | |
| | | <el-table-column align="center" property="dutyDepartmentName" label="责任部门" width="180" /> |
| | | <el-table-column align="center" property="value" label="考核指标" width="180" /> |
| | | <el-table-column align="center" property="makerDepartmentName" label="制定人部门" /> |
| | | <el-table-column align="center" property="makeDate" label="制定日期" /> |
| | | <el-table-column align="center" property="makeDate" :formatter="timeDate" label="制定日期" /> |
| | | <el-table-column align="center" property="commitPersonName" label="上报人" /> |
| | | <el-table-column align="center" property="操作"> |
| | | <template #default="scope"> |
| | |
| | | if (res.data.code == 200) { |
| | | form.value = res.data.data; |
| | | formUp.targetDivideDetailList = form.value.targetDivideDetailList; |
| | | for(let i=0;i<formUp.targetDivideDetailList.length;i++){ |
| | | formUp.targetDivideDetailList[i].makeDate=timeC(formUp.targetDivideDetailList[i].makeDate) |
| | | } |
| | | } else { |
| | | ElMessage.error(res.data.msg); |
| | | } |
| | | }); |
| | | } |
| | | }; |
| | | const timeC = (timestamp: any) => { |
| | | let a = new Date(timestamp).getTime(); |
| | | const date = new Date(a); |
| | | const Y = date.getFullYear() + '-'; |
| | | const M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; |
| | | const D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' '; |
| | | const h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':'; |
| | | const m = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes(); |
| | | const s = date.getSeconds(); // 秒 |
| | | const dateString = Y + M + D + h + m +`:${s}`; |
| | | // console.log('dateString', dateString); // > dateString 2021-07-06 14:23 |
| | | return dateString; |
| | | }; |
| | | const onNumber = (val: object) => { |
| | | form.value = val; |
| | |
| | | // return result; |
| | | // }; |
| | | return { |
| | | timeC, |
| | | index, |
| | | timeDate, |
| | | arr, |