Просмотр исходного кода

feat: 6个管理端表单页增加保存成功确认对话框(继续添加/关闭)

Xiaogang Liao 2 месяцев назад
Родитель
Сommit
247d1ca250

+ 22 - 0
cfc-web/src/views/admin/BloodTypeConfigs.vue

@@ -64,6 +64,17 @@
         <el-button type="primary" @click="handleSubmit">保存</el-button>
       </div>
     </el-dialog>
+
+    <el-dialog title="操作成功" :visible.sync="successDialogVisible" width="400px" :close-on-click-modal="false">
+      <div style="text-align:center;padding:10px 0">
+        <i class="el-icon-success" style="color:#67C23A;font-size:32px"></i>
+        <p style="margin:12px 0 0;font-size:16px;color:#303133">保存成功</p>
+      </div>
+      <div slot="footer">
+        <el-button type="primary" @click="handleContinue">继续添加</el-button>
+        <el-button @click="handleClose">关闭</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -156,6 +167,17 @@ export default {
           this.handleDelete(row)
           break
       }
+    },
+    handleContinue() {
+      this.successDialogVisible = false
+      this.isEdit = false
+      this.form = this.getEmptyForm()
+      this.dialogVisible = true
+    },
+    handleClose() {
+      this.successDialogVisible = false
+      this.dialogVisible = false
+      this.loadData()
     }
   }
 }

+ 22 - 0
cfc-web/src/views/admin/EducationSystems.vue

@@ -57,6 +57,17 @@
         <el-button type="primary" @click="handleSubmit">保存</el-button>
       </div>
     </el-dialog>
+
+    <el-dialog title="操作成功" :visible.sync="successDialogVisible" width="400px" :close-on-click-modal="false">
+      <div style="text-align:center;padding:10px 0">
+        <i class="el-icon-success" style="color:#67C23A;font-size:32px"></i>
+        <p style="margin:12px 0 0;font-size:16px;color:#303133">保存成功</p>
+      </div>
+      <div slot="footer">
+        <el-button type="primary" @click="handleContinue">继续添加</el-button>
+        <el-button @click="handleClose">关闭</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -148,6 +159,17 @@ export default {
           this.toggleStatus(row)
           break
       }
+    },
+    handleContinue() {
+      this.successDialogVisible = false
+      this.isEdit = false
+      this.form = { id: null, name: '', label: '', description: '', sortOrder: 0, status: 'ACTIVE' }
+      this.dialogVisible = true
+    },
+    handleClose() {
+      this.successDialogVisible = false
+      this.dialogVisible = false
+      this.loadData()
     }
   }
 }

+ 23 - 0
cfc-web/src/views/admin/ServiceContents.vue

@@ -111,6 +111,17 @@
     <el-dialog :visible.sync="previewVisible" title="服务内容预览" width="600px">
       <div class="preview-content" v-html="previewContent"></div>
     </el-dialog>
+
+    <el-dialog title="操作成功" :visible.sync="successDialogVisible" width="400px" :close-on-click-modal="false">
+      <div style="text-align:center;padding:10px 0">
+        <i class="el-icon-success" style="color:#67C23A;font-size:32px"></i>
+        <p style="margin:12px 0 0;font-size:16px;color:#303133">保存成功</p>
+      </div>
+      <div slot="footer">
+        <el-button type="primary" @click="handleContinue">继续添加</el-button>
+        <el-button @click="handleClose">关闭</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -130,6 +141,7 @@ export default {
         status: null
       },
       dialogVisible: false,
+      successDialogVisible: false,
       previewVisible: false,
       previewContent: '',
       isEdit: false,
@@ -271,6 +283,17 @@ export default {
           this.toggleStatus(row)
           break
       }
+    },
+    handleContinue() {
+      this.successDialogVisible = false
+      this.isEdit = false
+      this.form = { id: null, typeId: null, title: '', content: '', duration: 0, ageRange: '', price: null, status: 'ACTIVE' }
+      this.dialogVisible = true
+    },
+    handleClose() {
+      this.successDialogVisible = false
+      this.dialogVisible = false
+      this.loadData()
     }
   }
 }

+ 22 - 0
cfc-web/src/views/admin/ServiceTypes.vue

@@ -62,6 +62,17 @@
         <el-button type="primary" @click="handleSubmit">保存</el-button>
       </div>
     </el-dialog>
+
+    <el-dialog title="操作成功" :visible.sync="successDialogVisible" width="400px" :close-on-click-modal="false">
+      <div style="text-align:center;padding:10px 0">
+        <i class="el-icon-success" style="color:#67C23A;font-size:32px"></i>
+        <p style="margin:12px 0 0;font-size:16px;color:#303133">保存成功</p>
+      </div>
+      <div slot="footer">
+        <el-button type="primary" @click="handleContinue">继续添加</el-button>
+        <el-button @click="handleClose">关闭</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -155,6 +166,17 @@ export default {
           this.toggleStatus(row)
           break
       }
+    },
+    handleContinue() {
+      this.successDialogVisible = false
+      this.isEdit = false
+      this.form = { id: null, name: '', icon: '', description: '', sortOrder: 0, status: 'ACTIVE' }
+      this.dialogVisible = true
+    },
+    handleClose() {
+      this.successDialogVisible = false
+      this.dialogVisible = false
+      this.loadData()
     }
   }
 }

+ 19 - 0
cfc-web/src/views/admin/supply-manage/Form.vue

@@ -41,6 +41,17 @@
         </el-form-item>
       </el-form>
     </el-card>
+
+    <el-dialog title="操作成功" :visible.sync="successDialogVisible" width="400px" :close-on-click-modal="false">
+      <div style="text-align:center;padding:10px 0">
+        <i class="el-icon-success" style="color:#67C23A;font-size:32px"></i>
+        <p style="margin:12px 0 0;font-size:16px;color:#303133">{{ isEdit ? '保存成功' : '创建成功' }}</p>
+      </div>
+      <div slot="footer">
+        <el-button v-if="!isEdit" type="primary" @click="handleContinue">继续添加</el-button>
+        <el-button @click="handleClose">返回列表</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -118,6 +129,14 @@ export default {
           this.saving = false
         }
       })
+    },
+    handleContinue() {
+      this.successDialogVisible = false
+      this.form = { id: null, phone: '', nickname: '', realName: '', vendorType: 'product_supplier', vendorStatus: 'approved' }
+    },
+    handleClose() {
+      this.successDialogVisible = false
+      this.$router.push('/supply-manage')
     }
   }
 }

+ 19 - 0
cfc-web/src/views/admin/supply-system/Form.vue

@@ -49,6 +49,17 @@
         </el-form-item>
       </el-form>
     </el-card>
+
+    <el-dialog title="操作成功" :visible.sync="successDialogVisible" width="400px" :close-on-click-modal="false">
+      <div style="text-align:center;padding:10px 0">
+        <i class="el-icon-success" style="color:#67C23A;font-size:32px"></i>
+        <p style="margin:12px 0 0;font-size:16px;color:#303133">{{ isEdit ? '保存成功' : '创建成功' }}</p>
+      </div>
+      <div slot="footer">
+        <el-button v-if="!isEdit" type="primary" @click="handleContinue">继续添加</el-button>
+        <el-button @click="handleClose">返回列表</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -140,6 +151,14 @@ export default {
           this.saving = false
         }
       })
+    },
+    handleContinue() {
+      this.successDialogVisible = false
+      this.form = { id: null, name: '', adminId: null, settlementPeriodDays: 30, platformProfitRate: 0, description: '', status: 'active' }
+    },
+    handleClose() {
+      this.successDialogVisible = false
+      this.$router.push('/supply-system')
     }
   }
 }