| | |
| | | </el-col> |
| | | <el-col :span="11" :offset="2"> |
| | | <el-form-item label="完成期限" size="default" prop="completeDate"> |
| | | <el-date-picker v-model="form.completeDate" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" type="datetime" placeholder="请选择" style="width: 100%" /> |
| | | <el-date-picker |
| | | v-model="form.completeDate" |
| | | format="YYYY-MM-DD HH:mm:ss" |
| | | value-format="YYYY-MM-DD HH:mm:ss" |
| | | type="datetime" |
| | | placeholder="请选择" |
| | | style="width: 100%" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </template> |
| | | <script lang="ts"> |
| | | import { ref, toRefs, reactive, onMounted, watch, defineComponent } from 'vue'; |
| | | // import { timeDate } from '/@/assets/index.ts'; |
| | | import screenfull from 'screenfull'; |
| | | import { ElMessageBox, ElMessage, ElButton, ElInput, TabsPaneContext } from 'element-plus'; |
| | | import type { FormInstance, FormRules } from 'element-plus'; |
| | |
| | | .then((res) => { |
| | | if (res.data.code == 200) { |
| | | form.value = res.data.data; |
| | | form.value.completeDate = timeC(form.value.completeDate); |
| | | } 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 full = ref(false); |
| | |
| | | trigger: 'change', |
| | | }, |
| | | ], |
| | | level:[], |
| | | completeDate:[], |
| | | memo:[] |
| | | |
| | | level: [], |
| | | completeDate: [], |
| | | memo: [], |
| | | }); |
| | | // 提交 |
| | | const submitForm = async (formEl: FormInstance | undefined) => { |
| | |
| | | formEl.resetFields(); |
| | | } |
| | | }); |
| | | formEl.resetFields(); |
| | | formEl.resetFields(); |
| | | } else { |
| | | console.log('error submit!', fields); |
| | | } |
| | |
| | | formEl.resetFields(); |
| | | }; |
| | | return { |
| | | timeC, |
| | | openDialog, |
| | | handleClose, |
| | | titles, |
| | | // timeDate, |
| | | Shows, |
| | | form, |
| | | full, |
| | |
| | | .el-row { |
| | | padding: 0 0 20px 0; |
| | | } |
| | | </style> |
| | | </style> |