From 9d9c62348e3296a597405e6f6416da8efc0fe18b Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 12 六月 2025 10:29:14 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev
---
src/views/basicInformation/mould/coal.vue | 32 ++++++++++++++++----------------
1 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/src/views/basicInformation/mould/coal.vue b/src/views/basicInformation/mould/coal.vue
index 59eafad..ae905ed 100644
--- a/src/views/basicInformation/mould/coal.vue
+++ b/src/views/basicInformation/mould/coal.vue
@@ -32,12 +32,12 @@
/>
</el-form-item>
- <el-form-item>
+ <el-form-item class="dialog-footer">
+ <el-button v-if="addOrEdit === 'edit'" @click="resetForm">閲嶇疆</el-button>
+ <el-button v-if="addOrEdit === 'add'" @click="cancelForm">鍙栨秷</el-button>
<el-button type="primary" @click="submitForm">
纭畾
</el-button>
- <el-button v-if="addOrEdit === 'edit'" @click="resetForm">閲嶇疆</el-button>
- <el-button v-if="addOrEdit === 'add'" @click="cancelForm">鍙栨秷</el-button>
</el-form-item>
</el-form>
</el-dialog>
@@ -69,18 +69,16 @@
default: ''
},
})
-
+const copyForm = defineModel("copyForm", {
+ required: true,
+ type: Object,
+});
// 鍦ㄧ粍浠舵寕杞芥椂鑾峰彇鐢ㄦ埛淇℃伅
onMounted(async () => {
// 濡傛灉store涓病鏈夌敤鎴蜂俊鎭紝鍒欒幏鍙栫敤鎴蜂俊鎭�
if (!userStore.name) {
try {
await userStore.getInfo()
- console.log('鐢ㄦ埛淇℃伅:', {
- id: userStore.id,
- name: userStore.name,
- nickName: userStore.nickName
- })
// 鑷姩濉厖缁存姢浜篒D
if (props.addOrEdit === 'add') {
formData.value.maintainerId = userStore.id
@@ -89,11 +87,6 @@
console.error('鑾峰彇鐢ㄦ埛淇℃伅澶辫触:', error)
}
} else {
- console.log('鐢ㄦ埛淇℃伅:', {
- id: userStore.id,
- name: userStore.name,
- nickName: userStore.nickName
- })
// 鑷姩濉厖缁存姢浜篒D
if (props.addOrEdit === 'add') {
formData.value.maintainerId = userStore.id
@@ -159,7 +152,8 @@
// 閲嶇疆琛ㄥ崟
const resetForm = () => {
if (!formRef.value) return
- formRef.value.resetFields()
+ formData.value = JSON.parse(JSON.stringify(copyForm.value));
+ // formRef.value.resetFields()
}
// 鍏抽棴寮圭獥
const handleClose = () => {
@@ -186,5 +180,11 @@
}
</script>
-<style lang="sass" scoped>
+<style lang="scss" scoped>
+.dialog-footer {
+ display: flex;
+ margin-top: 20px;
+ flex-direction: column;
+ align-items: flex-end;
+}
</style>
\ No newline at end of file
--
Gitblit v1.9.3