From 86633a46ceb72f3311332ee9dd997281a17e50fd Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Thu, 22 Jul 2021 10:58:42 +0800
Subject: [PATCH] 保安员管理和保安公司页面完善  。全部基本样式调整,数据对接(部分)

---
 src/views/securityCompany/security.vue |   48 ++++++++++++++++++++++++++++++++++++------------
 1 files changed, 36 insertions(+), 12 deletions(-)

diff --git a/src/views/securityCompany/security.vue b/src/views/securityCompany/security.vue
index 1682caa..5a78c11 100644
--- a/src/views/securityCompany/security.vue
+++ b/src/views/securityCompany/security.vue
@@ -72,9 +72,6 @@
     </el-dialog>
   </basic-container>
 </template>
-        </avue-crud>
-    </basic-container>
-</template>
 
 <script>
 import {
@@ -83,6 +80,7 @@
   add,
   update,
   remove,
+  savePunish,
 } from "@/api/securityCompany/security";
 import { mapGetters } from "vuex";
 
@@ -107,7 +105,7 @@
           },
           {
             label: "处罚原因",
-            prop: "sex",
+            prop: "punishreason",
             span: 24,
             labelWidth: 110,
             rules: [
@@ -119,10 +117,27 @@
             ],
           },
           {
-            label: "处罚内容",
-            prop: "sex1",
+            label: "处罚结果",
+            prop: "punishresult",
             span: 24,
-            type: "textarea",
+            // type: "textarea",
+            labelWidth: 110,
+          },
+          {
+            label: "处罚日期",
+            prop: "punishtime",
+            span: 24,
+            type: "date",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd",
+            // type: "textarea",
+            labelWidth: 110,
+          },
+          {
+            label: "处罚批准文号",
+            prop: "punisnum",
+            span: 24,
+            // type: "textarea",
             labelWidth: 110,
           },
           //   {
@@ -216,6 +231,7 @@
             label: "注册地址",
             prop: "address",
             display: false,
+            overHidden: true,
             width: 200,
           },
         ],
@@ -270,12 +286,19 @@
   methods: {
     close(row) {
       this.dialogVisible = false;
+      this.objf = {};
     },
-    submit(form, done) {
-      this.$message.success(JSON.stringify(form));
+    submitf(form, done) {
+      console.log(form);
+      savePunish(form).then((res) => {
+        console.log(res);
+      });
+      // this.$message.success(JSON.stringify(form));
       done();
+      this.dialogVisible = false;
+      this.objf = {};
     },
-    error(err) {
+    errorf(err) {
       this.$message.success("请查看控制台");
       console.log(err);
     },
@@ -287,6 +310,7 @@
       //打开处罚
       // console.log(row);
       this.objf = {
+        deptid: row.departmentid,
         enterprisename: row.enterprisename,
       };
       this.dialogVisible = true;
@@ -379,12 +403,12 @@
       getList(
         page.currentPage,
         page.pageSize,
-        Object.assign(params, this.query),
-        2
+        Object.assign(params, this.query)
       ).then((res) => {
         const data = res.data.data;
         this.page.total = data.total;
         this.data = data.records;
+        console.log(this.data);
         this.loading = false;
         this.selectionClear();
       });

--
Gitblit v1.9.3