From baa03e2f9b1388a673e39cc3f2c1b055b16e513e Mon Sep 17 00:00:00 2001
From: zhangzeli <123456>
Date: 星期一, 01 十一月 2021 09:34:35 +0800
Subject: [PATCH] 设备

---
 src/views/your/car-manage/carManage.vue |  178 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 177 insertions(+), 1 deletions(-)

diff --git a/src/views/your/car-manage/carManage.vue b/src/views/your/car-manage/carManage.vue
index 3730dd1..0f94c6a 100644
--- a/src/views/your/car-manage/carManage.vue
+++ b/src/views/your/car-manage/carManage.vue
@@ -78,7 +78,8 @@
         <Form-item label="璐疆骞翠唤">
           <Row>
             <Col span="11">
-              <Date-picker @on-change="change1" type="date" value="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" v-model="carForm.buyYear"></Date-picker>
+              <Date-picker @on-change="change1" type="date"
+                           value="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" v-model="carForm.buyYear"></Date-picker>
             </Col>
           </Row>
         </Form-item>
@@ -93,6 +94,13 @@
           >鎻愪氦</Button
         >
       </div>
+    </Modal>
+    <Modal :title="modalTitle" v-model="equipmentVisible" :mask-closable="false" :width="1200">
+      <Table :loading="loading" border :columns="columns2" :data="data2" ref="table"
+             sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect">
+
+
+      </Table>
     </Modal>
     <!-- 鑿滃崟鏉冮檺 -->
     <Drawer
@@ -191,6 +199,7 @@
   getCarList,
   editCar,
   deleteCar,
+  getEquipment,
 } from "@/api/open";
 import util from "@/libs/util.js";
 export default {
@@ -210,6 +219,7 @@
       sortType: "desc",
       modalType: 0,
       roleModalVisible: false,
+      equipmentVisible: false,
       carModalVisible: false,
       permModalVisible: false,
       depModalVisible: false,
@@ -320,6 +330,22 @@
                 {
                   on: {
                     click: () => {
+                      this.equipment(params.row);
+                    },
+                  },
+                },
+                "璁惧"
+              ),
+              h("Divider", {
+                props: {
+                  type: "vertical",
+                },
+              }),
+              h(
+                "a",
+                {
+                  on: {
+                    click: () => {
                       this.removeCar(params.row);
                     },
                   },
@@ -362,7 +388,139 @@
           },
         },
       ],
+      columns2: [
+        {
+          type: "selection",
+          width: 60,
+          align: "center",
+        },
+        {
+          type: "index",
+          width: 60,
+          align: "center",
+        },
+        {
+          title: "璁惧绫诲瀷",
+          key: "type",
+          width: 100,
+          sortable: true,
+        },
+        {
+          title: "缂栧彿",
+          key: "code",
+          width: 100,
+        },
+        {
+          title: "鐘舵��",
+          key: "status",
+          width: 100,
+          sortable: true,
+          render: (h, params) => {
+            let re = "";
+            if (params.row.status == 0) {
+              return h("div", [
+                h("Badge", {
+                  props: {
+                    status: "success",
+                    text: "姝e父",
+                  },
+                }),
+              ]);
+            } else if (params.row.status == 1) {
+              return h("div", [
+                h("Badge", {
+                  props: {
+                    status: "error",
+                    text: "绉婚櫎",
+                  },
+                }),
+              ]);
+            }
+          },
+        },
+        {
+          title: "ip鍦板潃",
+          key: "ip",
+          width: 100,
+        },
+        {
+          title: "绔彛鍙�",
+          key: "port",
+          width: 100,
+          sortable: true,
+        },
+        {
+          title: "鎿嶄綔",
+          key: "action",
+          align: "center",
+          width: 280,
+          render: (h, params) => {
+            return h("div", [
+              h(
+                      "a",
+                      {
+                        on: {
+                          click: () => {
+                            this.equipment(params.row);
+                          },
+                        },
+                      },
+                      "璁惧"
+              ),
+              h("Divider", {
+                props: {
+                  type: "vertical",
+                },
+              }),
+              h(
+                      "a",
+                      {
+                        on: {
+                          click: () => {
+                            this.removeCar(params.row);
+                          },
+                        },
+                      },
+                      "绉婚櫎杞﹁締"
+              ),
+              h("Divider", {
+                props: {
+                  type: "vertical",
+                },
+              }),
+              h(
+                      "a",
+                      {
+                        on: {
+                          click: () => {
+                            this.edit(params.row);
+                          },
+                        },
+                      },
+                      "缂栬緫"
+              ),
+              h("Divider", {
+                props: {
+                  type: "vertical",
+                },
+              }),
+              h(
+                      "a",
+                      {
+                        on: {
+                          click: () => {
+                            this.remove(params.row);
+                          },
+                        },
+                      },
+                      "鍒犻櫎"
+              ),
+            ]);
+          },
+        },
+      ],
       data: [],
+      data2: [],
       total: 0,
       permData: [],
       editRolePermId: "",
@@ -455,6 +613,16 @@
         }
       });
     },
+    getEquipmentList() {
+      this.loading = true;
+      getEquipment(this.searchForm).then((res) => {
+        this.loading = false;
+        if (res.success) {
+          this.data2 = res.result.records;
+          this.total = res.result.total;
+        }
+      });
+    },
     getPermList() {
       this.treeLoading = true;
       getAllPermissionList().then((res) => {
@@ -526,6 +694,14 @@
         }
       });
     },
+    equipment() {
+      this.getEquipmentList();
+      this.modalType = 0;
+      this.modalTitle = "璁惧淇℃伅";
+      this.$refs.carForm.resetFields();
+      delete this.carForm.id;
+      this.equipmentVisible = true;
+    },
     addCar() {
       this.modalType = 0;
       this.modalTitle = "娣诲姞杞﹁締";

--
Gitblit v1.9.1