From 01fc5ec38120750591cce032b20fdf072f69f77c Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Thu, 22 Jul 2021 12:56:30 +0800
Subject: [PATCH] 数据对接

---
 src/api/register/honor.js                          |    6 
 src/api/securityCompany/securityCompany.js         |   14 +++
 src/views/onSiteInspection/company.vue             |   17 ++-
 src/views/management/peopleDetails.vue             |    2 
 src/views/securityCompany/computents/equipment.vue |   31 ++++---
 src/views/management/computents/dispatch.vue       |   97 +++++++++++++-----------
 src/views/securityCompany/companyDetails.vue       |    7 -
 src/styles/element-ui.scss                         |    3 
 src/views/onSiteInspection/securityStaff.vue       |   63 ++++++++-------
 9 files changed, 138 insertions(+), 102 deletions(-)

diff --git a/src/api/register/honor.js b/src/api/register/honor.js
index 8e9032c..0255a34 100644
--- a/src/api/register/honor.js
+++ b/src/api/register/honor.js
@@ -59,15 +59,15 @@
         }
     })
 }
-export const getLisperdispatch = (current, size, params, userId) => {
+export const getLisperdispatch = (current, size, params, userIds) => {
     return request({
-        url: '/api/examScore/page',
+        url: '/api/dispatcher/page',
         method: 'get',
         params: {
             ...params,
             current,
             size,
-            userId
+            userIds
         }
     })
 }
\ No newline at end of file
diff --git a/src/api/securityCompany/securityCompany.js b/src/api/securityCompany/securityCompany.js
new file mode 100644
index 0000000..58ba252
--- /dev/null
+++ b/src/api/securityCompany/securityCompany.js
@@ -0,0 +1,14 @@
+import request from '@/router/axios';
+
+export const getListequipment = (current, size, params, deptId) => {
+    return request({
+        url: '/api/equipage/page',
+        method: 'get',
+        params: {
+            ...params,
+            current,
+            size,
+            deptId
+        }
+    })
+}
\ No newline at end of file
diff --git a/src/styles/element-ui.scss b/src/styles/element-ui.scss
index feaa2a0..5366f17 100644
--- a/src/styles/element-ui.scss
+++ b/src/styles/element-ui.scss
@@ -485,6 +485,9 @@
   width: calc(100% - 800px) !important;
   left: 430px;
 }
+.company-box .el-card.is-never-shadow.avue-crud__search {
+  width: calc(100% - 100px) !important;
+}
 
 .avue-form {
   position: relative;
diff --git a/src/views/management/computents/dispatch.vue b/src/views/management/computents/dispatch.vue
index 59688d1..6e0085f 100644
--- a/src/views/management/computents/dispatch.vue
+++ b/src/views/management/computents/dispatch.vue
@@ -18,7 +18,9 @@
 </template>
 
 <script>
+import { getLisperdispatch } from "@/api/register/honor";
 export default {
+  props: ["form"],
   data() {
     return {
       equipmentOption: {
@@ -34,7 +36,7 @@
         calcHeight: 250,
         searchShowBtn: false,
         tip: false,
-        searchShow: false,
+        // searchShow: false,
         searchMenuSpan: 3,
         index: false,
         viewBtn: true,
@@ -54,7 +56,7 @@
           {
             label: "姓名",
             prop: "name",
-            search: true,
+            // search: true,
             searchSpan: 3,
             rules: [
               {
@@ -64,21 +66,22 @@
               },
             ],
           },
-          {
-            label: "身份证号",
-            prop: "cardid",
-            // rules: [
-            //   {
-            //     required: true,
-            //     message: "请输入编号",
-            //     trigger: "blur",
-            //   },
-            // ],
-            // search: true,
-          }, //上面不显示
+          // {
+          //   label: "身份证号",
+          //   prop: "cardid",
+          //   // rules: [
+          //   //   {
+          //   //     required: true,
+          //   //     message: "请输入编号",
+          //   //     trigger: "blur",
+          //   //   },
+          //   // ],
+          //   // search: true,
+          // }, //上面不显示
           {
             label: "派遣单位",
-            prop: "dispatcher",
+            prop: "dispatcherCompany",
+            search: true,
             // rules: [
             //   {
             //     required: true,
@@ -88,18 +91,18 @@
             // ],
             // search: true,
           },
-          {
-            label: "保安公司",
-            prop: "deptName",
-            // rules: [
-            //   {
-            //     required: true,
-            //     message: "请输入规格",
-            //     trigger: "blur",
-            //   },
-            // ],
-            // search: true,
-          },
+          // {
+          //   label: "保安公司",
+          //   prop: "deptName",
+          //   // rules: [
+          //   //   {
+          //   //     required: true,
+          //   //     message: "请输入规格",
+          //   //     trigger: "blur",
+          //   //   },
+          //   // ],
+          //   // search: true,
+          // },
           // {
           //   label: "派遣人",
           //   prop: "dispatcher",
@@ -120,7 +123,7 @@
             valueFormat: "yyyy-MM-dd",
             labelWidth: 120,
             searchSpan: 4,
-            search: true,
+            // search: true,
             overHidden: true,
             rules: [
               {
@@ -141,13 +144,13 @@
           },
           {
             label: "结束时间",
-            prop: "enddispatchertime",
+            prop: "endTime",
             type: "date",
             format: "yyyy-MM-dd",
             valueFormat: "yyyy-MM-dd",
             labelWidth: 120,
             searchSpan: 4,
-            search: true,
+            // search: true,
             overHidden: true,
             rules: [
               {
@@ -168,7 +171,7 @@
           },
           {
             label: "派遣地址",
-            prop: "tenantName",
+            prop: "dispatcheraddress",
             // rules: [
             //   {
             //     required: true,
@@ -212,21 +215,25 @@
   methods: {
     equipmentOnLoad(page, params = {}) {
       this.equipmentLoading = true;
-      //   getequipmentList(
-      //     page.currentPage,
-      //     page.pageSize,
-      //     Object.assign(params, this.equipmentQuery),
-      //     this.form.creditcode
-      //   ).then((res) => {
-      //     const data = res.data.data;
+      getLisperdispatch(
+        page.currentPage,
+        page.pageSize,
+        Object.assign(params, this.equipmentQuery),
+        this.form.id
+      ).then((res) => {
+        const data = res.data.data;
 
-      //     this.equipmentPage.total = data.total;
-      //     this.equipmentData = data.records;
-      this.equipmentLoading = false;
-      //     this.$refs.equipmentCrud.refreshTable();
-      //     this.$refs.equipmentCrud.doLayout();
-      //     this.equipmentSelectionClear();
-      //   });
+        this.equipmentPage.total = data.total;
+        this.equipmentData = data.records;
+        for (var k in this.equipmentData) {
+          this.equipmentData[k]["name"] = this.form.realName;
+        }
+        console.log(this.equipmentData, " this.equipmentData");
+        this.equipmentLoading = false;
+        this.$refs.equipmentCrud.refreshTable();
+        this.$refs.equipmentCrud.doLayout();
+        this.equipmentSelectionClear();
+      });
     },
     equipmentSelectionClear() {
       this.equipmentSelectionList = [];
diff --git a/src/views/management/peopleDetails.vue b/src/views/management/peopleDetails.vue
index 1b6ceb9..df3781e 100644
--- a/src/views/management/peopleDetails.vue
+++ b/src/views/management/peopleDetails.vue
@@ -208,7 +208,7 @@
               </el-table> -->
             </el-tab-pane>
             <el-tab-pane label="派遣记录" name="third">
-              <dispatch></dispatch>
+              <dispatch :form="form"></dispatch>
               <!-- <el-table :data="dispatchData" style="width: 100%">
                 <el-table-column prop="name" label="姓名" align="center">
                 </el-table-column>
diff --git a/src/views/onSiteInspection/company.vue b/src/views/onSiteInspection/company.vue
index 7204116..83f1a73 100644
--- a/src/views/onSiteInspection/company.vue
+++ b/src/views/onSiteInspection/company.vue
@@ -71,7 +71,7 @@
 
         column: [
           {
-            label: "被检查单位名称",
+            label: "检查人姓名",
             prop: "name",
             // labelWidth: 120,
             // searchLabelWidth: 120,
@@ -109,15 +109,17 @@
           //     // width: 120,
           //   },
           {
-            label: "检查人姓名",
-            prop: "deptName",
+            label: "被检查单位名称",
+            prop: "sName",
+            overHidden: true,
             // display: false,
             // labelWidth: 120,
             // width: 200,
           },
           {
             label: "检查人单位",
-            prop: "userId",
+            prop: "deptName",
+            overHidden: true,
             // // display: false,
             // width: 200,
             // labelWidth: 120,
@@ -142,7 +144,7 @@
 
           {
             label: "检查日期",
-            prop: "examTime",
+            prop: "reviewTime",
             type: "date",
             format: "yyyy-MM-dd",
             valueFormat: "yyyy-MM-dd",
@@ -158,7 +160,7 @@
           },
           {
             label: "检查内容",
-            prop: "applyTime",
+            prop: "insid",
             // type: "date",
             // format: "yyyy-MM-dd",
             // valueFormat: "yyyy-MM-dd",
@@ -361,8 +363,11 @@
           //   d[k]["reviewTime"] = "2021-02-21";
           d[k]["results"] = "通过";
           d[k]["certificate"] = "拥有";
+          d[k]["sName"] = "安徽振升保安服务集团有限公司";
           d[k]["certificatetype"] = "保安员证";
           //   d[k]["onjob"] = "是";
+          d[k]["reviewTime"] = "2021-02-21";
+          d[k]["insid"] = "临检";
         }
         this.data = d;
         this.loading = false;
diff --git a/src/views/onSiteInspection/securityStaff.vue b/src/views/onSiteInspection/securityStaff.vue
index ac2c2d4..34c85a6 100644
--- a/src/views/onSiteInspection/securityStaff.vue
+++ b/src/views/onSiteInspection/securityStaff.vue
@@ -72,30 +72,30 @@
         dialogClickModal: false,
 
         column: [
-          {
-            label: "保安员姓名",
-            prop: "deptName",
-            overHidden: true,
-            // labelWidth: 120,
-            // searchLabelWidth: 120,
-            // searchSpan: 5,
-            // dicUrl:
-            //   "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
-            // props: {
-            //   label: "title",
-            //   value: "id",
-            // },
-            // search: true,
-            // overHidden: true,
-            // type: "select",
-            // rules: [
-            //   {
-            //     required: true,
-            //     message: "请输入保安公司",
-            //     trigger: "blur",
-            //   },
-            // ],
-          },
+          // {
+          //   label: "保安员姓名",
+          //   prop: "deptName",
+          //   overHidden: true,
+          //   // labelWidth: 120,
+          //   // searchLabelWidth: 120,
+          //   // searchSpan: 5,
+          //   // dicUrl:
+          //   //   "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
+          //   // props: {
+          //   //   label: "title",
+          //   //   value: "id",
+          //   // },
+          //   // search: true,
+          //   // overHidden: true,
+          //   // type: "select",
+          //   // rules: [
+          //   //   {
+          //   //     required: true,
+          //   //     message: "请输入保安公司",
+          //   //     trigger: "blur",
+          //   //   },
+          //   // ],
+          // },
           {
             label: "保安员姓名",
             prop: "realName",
@@ -121,7 +121,8 @@
 
           {
             label: "保安员单位",
-            prop: "sexName",
+            prop: "sName",
+            overHidden: true,
             // type: "select",
             // labelWidth: 120,
             // // display: false,
@@ -159,7 +160,8 @@
           // },
           {
             label: "检查人单位",
-            prop: "examination_type",
+            overHidden: true,
+            prop: "deptName",
             // overHidden: true,
             // type: "date",
             // format: "yyyy-MM-dd",
@@ -177,7 +179,7 @@
 
           {
             label: "检查日期",
-            prop: "examination_mx",
+            prop: "reviewTime",
             type: "date",
             format: "yyyy-MM-dd",
             valueFormat: "yyyy-MM-dd",
@@ -199,13 +201,14 @@
           // },
           {
             label: "检查内容",
-            prop: "reviewTime",
+            overHidden: true,
+            prop: "insid",
             // labelWidth: 120,
             // display: false,
           },
           {
             label: "检查结果",
-            prop: "onjob",
+            prop: "examination_type",
             // labelWidth: 120,
             // display: false,
           },
@@ -394,6 +397,8 @@
           d[k]["reviewTime"] = "2021-02-21";
           d[k]["results"] = "通过";
           d[k]["onjob"] = "是";
+          d[k]["sName"] = "安徽振升保安服务集团有限公司";
+          d[k]["insid"] = "临检";
         }
         this.data = d;
         this.loading = false;
diff --git a/src/views/securityCompany/companyDetails.vue b/src/views/securityCompany/companyDetails.vue
index 172cc63..4f122a2 100644
--- a/src/views/securityCompany/companyDetails.vue
+++ b/src/views/securityCompany/companyDetails.vue
@@ -198,19 +198,18 @@
               </avue-crud>
             </el-tab-pane>
             <el-tab-pane label="装备信息" name="fourth">
-              <equipment></equipment>
+              <equipment :form="form"></equipment>
             </el-tab-pane>
             <el-tab-pane label="保安员信息" name="fifth">
-              <staff></staff>
+              <staff :form="form"></staff>
             </el-tab-pane>
             <el-tab-pane label="处罚信息" name="sixth">
               <punish :form="form"></punish>
             </el-tab-pane>
             <el-tab-pane label="服务对象" name="seventh">
-              <service></service>
+              <service :form="form"></service>
             </el-tab-pane>
             <el-tab-pane label="其他附件" name="eighth">
-              其他附件
               <!-- <equipment></equipment> -->
             </el-tab-pane>
           </el-tabs>
diff --git a/src/views/securityCompany/computents/equipment.vue b/src/views/securityCompany/computents/equipment.vue
index ef15a45..4af735b 100644
--- a/src/views/securityCompany/computents/equipment.vue
+++ b/src/views/securityCompany/computents/equipment.vue
@@ -18,7 +18,9 @@
 </template>
 
 <script>
+import { getListequipment } from "@/api/securityCompany/securityCompany";
 export default {
+  props: ["form"],
   data() {
     return {
       equipmentOption: {
@@ -233,21 +235,22 @@
   methods: {
     equipmentOnLoad(page, params = {}) {
       this.equipmentLoading = true;
-      //   getequipmentList(
-      //     page.currentPage,
-      //     page.pageSize,
-      //     Object.assign(params, this.equipmentQuery),
-      //     this.form.creditcode
-      //   ).then((res) => {
-      //     const data = res.data.data;
+      getListequipment(
+        page.currentPage,
+        page.pageSize,
+        Object.assign(params, this.equipmentQuery),
+        this.form.departmentid
+      ).then((res) => {
+        const data = res.data.data;
 
-      //     this.equipmentPage.total = data.total;
-      //     this.equipmentData = data.records;
-      this.equipmentLoading = false;
-      //     this.$refs.equipmentCrud.refreshTable();
-      //     this.$refs.equipmentCrud.doLayout();
-      //     this.equipmentSelectionClear();
-      //   });
+        this.equipmentPage.total = data.total;
+        this.equipmentData = data.records;
+        console.log(this.equipmentData, "this.equipmentData");
+        this.equipmentLoading = false;
+        this.$refs.equipmentCrud.refreshTable();
+        this.$refs.equipmentCrud.doLayout();
+        this.equipmentSelectionClear();
+      });
     },
     equipmentSelectionClear() {
       this.equipmentSelectionList = [];

--
Gitblit v1.9.3