From 330375a684720f1801424028d4f592477b6d73d9 Mon Sep 17 00:00:00 2001
From: qushaowei <qushaowei@163.com>
Date: 星期二, 07 十一月 2023 10:11:33 +0800
Subject: [PATCH] 提交 workshop

---
 src/views/eam/depart/modules/DepartModel.vue |   60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 60 insertions(+), 0 deletions(-)

diff --git a/src/views/eam/depart/modules/DepartModel.vue b/src/views/eam/depart/modules/DepartModel.vue
new file mode 100644
index 0000000..a954cb4
--- /dev/null
+++ b/src/views/eam/depart/modules/DepartModel.vue
@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    >
+    <depart-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></depart-form>
+  </j-modal>
+</template>
+
+<script>
+  import DepartForm from './DepartForm'
+  export default {
+    name: "DepartModal",
+    components: {
+        DepartForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add(record);
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('reloadTree');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      },
+    
+    }
+  }
+</script>
\ No newline at end of file

--
Gitblit v1.9.3