文件名从 src/views/specialWorkSystem/approveProcessManagement/reportTypeSetting/index.vue 修改 |
| | |
| | | editor: '', |
| | | editeTime: '' |
| | | }) |
| | | const timeForm = { |
| | | hour12: false, |
| | | year: 'numeric', |
| | | month: '2-digit', |
| | | day: '2-digit', |
| | | hour: '2-digit', |
| | | minute: '2-digit', |
| | | second: '2-digit' |
| | | } |
| | | const addReport = ()=>{ |
| | | dialogAddForm.value = true |
| | | }; |
| | |
| | | await formEl.validate((valid, fields) => { |
| | | if (valid) { |
| | | if(rowIndex.value == -1){ |
| | | reportForm.value.createTime = new Date().toLocaleString() |
| | | reportForm.value.editeTime = new Date().toLocaleString() |
| | | reportForm.value.createTime = new Date().toLocaleString('zh', timeForm).replace(/\//g,'-') |
| | | reportForm.value.editeTime = new Date().toLocaleString('zh', timeForm).replace(/\//g,'-') |
| | | tableData.push(reportForm.value) |
| | | }else{ |
| | | tableData[rowIndex.value] = reportForm.value |
| | |
| | | dialogAddForm.value = true |
| | | rowIndex.value = index |
| | | reportForm.value = JSON.parse(JSON.stringify(row)) |
| | | reportForm.value.editeTime = new Date().toLocaleString() |
| | | reportForm.value.editeTime = new Date().toLocaleString('zh', timeForm).replace(/\//g,'-') |
| | | } |
| | | const deleteRow = (index)=>{ |
| | | tableData.splice( index,1) |
| | |
| | | reportForm, |
| | | ruleFormRef, |
| | | addRules, |
| | | timeForm, |
| | | dialogColse, |
| | | editeRow, |
| | | deleteRow, |