From 6416b40cf242340eaa163c498bd49d8103e73610 Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Mon, 29 Jul 2024 17:01:52 +0800
Subject: [PATCH] 代码优化

---
 src/views/propertySupervision/components/auditBase.vue |  112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 112 insertions(+), 0 deletions(-)

diff --git a/src/views/propertySupervision/components/auditBase.vue b/src/views/propertySupervision/components/auditBase.vue
new file mode 100644
index 0000000..c70f425
--- /dev/null
+++ b/src/views/propertySupervision/components/auditBase.vue
@@ -0,0 +1,112 @@
+<template>
+  <div class="cur-container-box">
+    <avue-form ref="replyForm" :option="option" v-model="form" :close-on-click-modal="false">
+
+      <template slot-scope="{size}" slot="menuForm">
+        <el-button type="primary" :size="size" @click="handleSubmit">通 过</el-button>
+        <el-button :size="size" @click="handleReset">驳 回</el-button>
+      </template>
+
+    </avue-form>
+  </div>
+</template>
+
+<script>
+  import {
+    setCheckPlaceExt
+  } from "@/api/place/place"
+
+  export default {
+    inject: ["placeElement"],
+
+    data() {
+      return {
+        form: {},
+        option: {
+          submitBtn: false,
+          emptyBtn: false,
+          column: [{
+            span: 23,
+            row: true,
+            label: "审批意见",
+            prop: "confirmNotion",
+            type: 'textarea',
+            minRows: 3,
+            maxRows: 5,
+            rules: [],
+          }]
+        },
+      }
+    },
+
+    methods: {
+      handleSubmit() {
+        setCheckPlaceExt({
+          confirmFlag: 2,
+          id: this.placeElement.curAuditRow.placeExtId,
+          confirmNotion: this.form.confirmNotion
+        }).then(() => {
+          this.$message({
+            type: "success",
+            message: "操作成功!",
+          })
+          this.$refs.replyForm && this.$refs.replyForm.resetForm()
+          this.placeElement.auditBasePopup = false
+
+          this.placeElement.onLoad(this.placeElement.page)
+        })
+      },
+
+      handleReset() {
+        if ('confirmNotion' in this.form && this.form.confirmNotion.trim() == '' || !this.form.confirmNotion) {
+          this.$message({
+            type: 'warning',
+            message: "请输入审批意见!",
+          })
+
+          return
+        }
+
+        setCheckPlaceExt({
+          confirmFlag: 3,
+          id: this.placeElement.curAuditRow.placeExtId,
+          confirmNotion: this.form.confirmNotion
+        }).then(() => {
+          this.$message({
+            type: "success",
+            message: "操作成功!",
+          })
+          this.$refs.replyForm && this.$refs.replyForm.resetForm()
+          this.placeElement.auditBasePopup = false
+
+          this.placeElement.onLoad(this.placeElement.page)
+        })
+      },
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  .cur-container-box {
+    display: flex;
+    flex-direction: column;
+    width: 100%;
+    height: 100%;
+    overflow: hidden;
+
+    .content-box {
+      margin: 0 4px;
+      padding: 0 16px;
+      height: 0;
+      flex: 1;
+      overflow: hidden;
+      overflow-y: auto;
+    }
+
+    .footer-btn-box {
+      margin-top: 10px;
+      display: flex;
+      justify-content: center;
+    }
+  }
+</style>
\ No newline at end of file

--
Gitblit v1.9.3