From 1ca46431ab9faea036ec8b2ae54b20b720f7bad6 Mon Sep 17 00:00:00 2001
From: Admin <978517621@qq.com>
Date: Mon, 25 Jul 2022 18:29:48 +0800
Subject: [PATCH] 添加修改页面
---
src/views/specialWorkSystem/approveProcessManagement/approveLinkSettings/reportTypeSetting/index.vue | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/src/views/specialWorkSystem/approveProcessManagement/approveLinkSettings/reportTypeSetting/index.vue b/src/views/specialWorkSystem/approveProcessManagement/approveLinkSettings/reportTypeSetting/index.vue
index 80cf2a8..30844ac 100644
--- a/src/views/specialWorkSystem/approveProcessManagement/approveLinkSettings/reportTypeSetting/index.vue
+++ b/src/views/specialWorkSystem/approveProcessManagement/approveLinkSettings/reportTypeSetting/index.vue
@@ -106,7 +106,10 @@
}
])
const dialogAddForm = ref(false);
+
+ // 判断新增修改参数
const rowIndex = ref(-1)
+
const reportForm = ref({
type: '',
founder: '',
@@ -114,6 +117,8 @@
editor: '',
editeTime: ''
})
+
+ // 时间格式化
const timeForm = {
hour12: false,
year: 'numeric',
@@ -123,15 +128,20 @@
minute: '2-digit',
second: '2-digit'
}
+
+ // 新增记录
const addReport = ()=>{
dialogAddForm.value = true
};
+
const ruleFormRef = ref<FormInstance>()
const addRules = reactive<FormRules>({
type:[{required: true, message: '该内容不能为空',trigger:'blur'}],
founder:[{required: true, message: '该内容不能为空',trigger:'blur'}],
editor:[{required: true, message: '该内容不能为空',trigger:'blur'}]
})
+
+ // 新增修改记录确认
const onSubmitAddForm = async (formEl: FormInstance | undefined) => {
if (!formEl) return
await formEl.validate((valid, fields) => {
@@ -150,14 +160,20 @@
}
})
}
+
+ // 修改记录
const editeRow = (index: number, row: User) =>{
dialogAddForm.value = true
rowIndex.value = index
reportForm.value = JSON.parse(JSON.stringify(row))
}
+
+ // 删除记录
const deleteRow = (index)=>{
tableData.splice( index,1)
}
+
+ // 弹窗关闭数据初始化
const dialogColse = () =>{
reportForm.value = {
type: '',
--
Gitblit v1.9.2