From fa5fd9d4f9c1ba33f26a343942a7941003cc601c Mon Sep 17 00:00:00 2001
From: luobisheng <727299681@qq.com>
Date: 星期一, 28 十一月 2022 17:40:36 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/operate/fivepack/threepack/components/updateUser/index.vue |   35 ++++
 src/views/systemSetting/device/point/index.vue                       |   11 +
 src/views/operate/fivepack/threepack/components/score/index.vue      |    7 
 src/views/operate/fivepack/threepack/components/content.vue          |   15 +-
 src/views/operate/fivepack/threepack/index.vue                       |  329 +++++++++++++++++-----------------------------
 5 files changed, 174 insertions(+), 223 deletions(-)

diff --git a/src/views/operate/fivepack/threepack/components/content.vue b/src/views/operate/fivepack/threepack/components/content.vue
index 7275754..d95fd4c 100644
--- a/src/views/operate/fivepack/threepack/components/content.vue
+++ b/src/views/operate/fivepack/threepack/components/content.vue
@@ -143,12 +143,12 @@
       <!-- 鏌ョ湅淇敼椤甸潰 -->
       <el-dialog
         :visible.sync="dialogScore"
-        width="45%"
+        width="60%"
         :destroy-on-close="true"
         title="鏌ョ湅绉垎"
-        :before-close="handleClose"
+        :before-close="handleCloseScoreView"
       >
-        <scoreView :storeInfo="storeInfo" @closeDialog="closeDialog" />
+        <scoreView v-if="dialogScore" :storeInfo="storeInfoScoreView" />
       </el-dialog>
       <!-- 鍒嗛〉 -->
       <div class="pagination">
@@ -200,6 +200,7 @@
       userInfo: null,
       dialogType: "",
       storeInfo: null,
+      storeInfoScoreView: {},
     };
   },
 
@@ -227,8 +228,8 @@
       this.dialogType = type;
     },
     handleScoreView(row) {
+      this.storeInfoScoreView = row;
       this.dialogScore = true;
-      this.storeInfo = row;
     },
 
     handleDelete(id) {
@@ -239,15 +240,15 @@
         })
         .catch((err) => this.$message({ type: "error", message: err }));
     },
-
+    handleCloseScoreView() {
+      this.dialogScore = false;
+    },
     handleClose() {
       this.dialogUpdate = false;
-      this.dialogScore = false;
     },
 
     closeDialog() {
       this.dialogUpdate = false;
-      this.dialogScore = false;
       this.search();
     },
 
diff --git a/src/views/operate/fivepack/threepack/components/score/index.vue b/src/views/operate/fivepack/threepack/components/score/index.vue
index bdaf7e5..8ce1495 100644
--- a/src/views/operate/fivepack/threepack/components/score/index.vue
+++ b/src/views/operate/fivepack/threepack/components/score/index.vue
@@ -44,11 +44,10 @@
 
 export default {
   created() {
-    this.search();
+    this.loadData();
   },
 
   props: ["storeInfo"],
-
   data() {
     return {
       tableData: [],
@@ -59,7 +58,7 @@
   },
 
   methods: {
-    search() {
+    loadData() {
       getStoreScore(this.storeInfo.id)
         .then((res) => {
           this.tableData = res.records;
@@ -71,7 +70,7 @@
 
     changeCurrentPage(currentPage) {
       this.currentPage = currentPage;
-      this.search();
+      this.loadData();
     },
 
     tableRowClassName({ row, rowIndex }) {
diff --git a/src/views/operate/fivepack/threepack/components/updateUser/index.vue b/src/views/operate/fivepack/threepack/components/updateUser/index.vue
index e74c56b..bb5fb3b 100644
--- a/src/views/operate/fivepack/threepack/components/updateUser/index.vue
+++ b/src/views/operate/fivepack/threepack/components/updateUser/index.vue
@@ -82,6 +82,27 @@
               ></el-option>
             </el-select>
           </el-form-item>
+
+          <!-- 搴楅摵鐘舵�� -->
+          <el-form-item
+            v-if="isStorePage"
+            class="optionItem"
+            label="搴楅摵鐘舵��:"
+            prop="status"
+          >
+            <el-select
+              v-model="store.status"
+              placeholder="璇烽�夋嫨搴楅摵鐘舵��"
+              :disabled="isView()"
+            >
+              <el-option
+                v-for="item in statusList"
+                :key="item.id"
+                :value="item.id"
+                :label="item.name"
+              ></el-option>
+            </el-select>
+          </el-form-item>
           <el-form-item
             v-if="!isStorePage"
             class="optionItem"
@@ -147,6 +168,7 @@
         relationVideo: "",
         type: null,
         storeScore: null,
+        status: null,
       },
       rules: {
         type: [{ required: true, validator: validateStoreType }],
@@ -168,9 +190,16 @@
         relationVideo: [
           { required: true, trigger: "blur", message: "璇疯緭鍏ュ叧鑱旀憚鍍忔満" },
         ],
+        status: [
+          { required: true, trigger: "blur", message: "璇烽�夋嫨搴楅摵鐘舵��" },
+        ],
       },
       shopTypeList: [],
       relationVideoList: [],
+      statusList: [
+        { id: 1, name: "缁忚惀" },
+        { id: 2, name: "鍊掗棴" },
+      ],
     };
   },
   async created() {
@@ -183,7 +212,7 @@
         this.store.relationVideo = this.store.videoPoint.name;
       }
     }
-    
+
     if (!this.isView()) {
       await this.getShopTypeList();
     }
@@ -193,7 +222,7 @@
     onSubmit() {
       this.$refs.store.validate((valid) => {
         if (valid) {
-          debugger
+          debugger;
           this.store.type = this.store.type[1];
           if (this.isCreated()) {
             addStoreInfo(this.store)
@@ -242,7 +271,7 @@
     async getShopTypeList() {
       let arr = await getCodeList("16");
       this.shopTypeList = this.createShopTypeTree(arr);
-      
+
       if (this.dialogType === "update") {
         const selectedStoreType = arr.find(
           (item) => item.name === this.store.typeName
diff --git a/src/views/operate/fivepack/threepack/index.vue b/src/views/operate/fivepack/threepack/index.vue
index dd31146..2861591 100644
--- a/src/views/operate/fivepack/threepack/index.vue
+++ b/src/views/operate/fivepack/threepack/index.vue
@@ -1,230 +1,149 @@
 <template>
-    <div class="userList">
+  <el-container style="height: 100%">
+    <el-aside heigth="100%" width="200px ">
       <myAside @selectedDepartment="selectedDepartment" />
+    </el-aside>
+
+    <el-container>
       <store-content :model="'three-pack'" />
-    </div>
+    </el-container>
+  </el-container>
 </template>
 <script>
 import myAside from "./components/aside";
 import updateUser from "@/views/operate/fivepack/threepack/components/updateUser";
 import storeContent from "@/views/operate/fivepack/threepack/components/content";
-import { getStoreInfoList, deleteStoreInfo } from "@/api/operate/storeManagement";
+import {
+  getStoreInfoList,
+  deleteStoreInfo,
+} from "@/api/operate/storeManagement";
 
 export default {
-    components: { myAside, storeContent, updateUser },
+  components: { myAside, storeContent, updateUser },
 
-    created() {
+  created() {
+    this.search();
+  },
+
+  data() {
+    return {
+      storeCode: null,
+      storeStatus: null,
+      options: [
+        { label: "鍏ㄩ儴", value: 0 },
+        { label: "缁忚惀", value: 1 },
+        { label: "鍊掗棴", value: 2 },
+      ],
+      tableData: [],
+      dialogUpdate: false,
+      currentPage: 1,
+      totalNum: 0,
+      pageSize: 10,
+      userInfo: null,
+      updateFlag: false,
+      storeInfo: null,
+    };
+  },
+
+  methods: {
+    search(data) {
+      let communityId, streetId;
+      if (data) {
+        communityId = data.id;
+        streetId = data.parentId;
+      }
+      getStoreInfoList({ keyword: this.storeCode, communityId, streetId })
+        .then(({ list, pageSize, totalPage }) => {
+          this.tableData = list;
+          this.pageSize = pageSize;
+          this.totalNum = totalPage;
+        })
+        .catch((err) => this.$message({ type: "error", message: err }));
+    },
+
+    handleReset() {
+      this.storeCode = "";
+      this.storeStatus = null;
+      this.currentPage = 1;
       this.search();
     },
 
-    data() {
-          return {
-            storeCode: null,
-            storeStatus: null,
-            options: [{ label: '鍏ㄩ儴', value: 0 }, { label: '缁忚惀', value: 1 }, { label: '鍊掗棴', value: 2 }],
-            tableData: [],
-            dialogUpdate: false,
-            currentPage: 1,
-            totalNum: 0,
-            pageSize: 10,
-            userInfo: null,
-            updateFlag: false,
-            storeInfo: null
-          }
-      },
+    handleView(row, type) {
+      this.dialogUpdate = true;
+      this.storeInfo = row;
+      this.updateFlag = type === "update";
+    },
 
-    methods: {
-      search(data) {
-        let communityId, streetId;
-        if (data) {
-          communityId = data.parentId;
-          streetId = data.id;
-        }
-        getStoreInfoList({ keyword: this.storeCode, communityId, streetId })
-            .then(({ list, pageSize, totalPage }) => {
-              this.tableData = list;
-              this.pageSize = pageSize;
-              this.totalNum = totalPage;
-            })
-            .catch(err => this.$message({ type: 'error', message: err }));
-      },
-
-      handleReset() {
-        this.storeCode = '';
-        this.storeStatus = null;
-        this.search();
-      },
-
-      handleView(row, type) {
-        this.dialogUpdate = true;
-        this.storeInfo = row;
-        this.updateFlag = type === 'update';
-      },
-
-      handleDelete(id) {
-        deleteStoreInfo(id)
-            .then(() => {
-              this.$message({ type: 'success', message });
-              this.search();
-            })
-            .catch(err => this.$message({ type: 'error', message: err }));
-      },
-
-      handleClose() {
-        this.dialogUpdate = false;
-      },
-
-      closeDialog() {
-        this.dialogUpdate = false;
-        this.search();
-      },
-
-      changeCurrentPage(currentPage) {
-        this.currentPage = currentPage;
-        this.search();
-      },
-
-      tableRowClassName({ row, rowIndex }) {
-        if ((rowIndex + 1) % 2 === 0) {
-          return "warning-row";
-        } else {
-          return "success-row";
-        }
-      },
-      selectedDepartment(data) {
-        if (!data.children) {
+    handleDelete(id) {
+      deleteStoreInfo(id)
+        .then(() => {
+          this.$message({ type: "success", message });
+          this.currentPage = 1;
           this.search();
-        }
+        })
+        .catch((err) => this.$message({ type: "error", message: err }));
+    },
+
+    handleClose() {
+      this.dialogUpdate = false;
+    },
+
+    closeDialog() {
+      this.dialogUpdate = false;
+      this.currentPage = 1;
+      this.search();
+    },
+
+    changeCurrentPage(currentPage) {
+      this.currentPage = currentPage;
+      this.search();
+    },
+
+    tableRowClassName({ row, rowIndex }) {
+      if ((rowIndex + 1) % 2 === 0) {
+        return "warning-row";
+      } else {
+        return "success-row";
       }
-    }
-}
+    },
+    selectedDepartment(data) {
+      if (!data.children) {
+        this.searchData = data;
+        this.search(data);
+      } else {
+        data.parentId = data.id;
+        data.id = null;
+        this.searchData = data;
+        this.search(data);
+      }
+      this.currentPage = 1;
+    },
+  },
+};
 </script>
 <style lang="scss" scoped>
-.userList {
-    text-align: left;
-    margin: 10px 20px;
-    color: #4b9bb7;
-    display: flex;
-    height: 100%;
+::v-deep .el-header {
+  background-color: #09152f;
+  color: #000;
+  line-height: 60px;
+}
 
-    .right{
-        flex: 1;
-        height: 100%;
-        padding-left: 20px;
+::v-deep .el-aside {
+  background-color: #09152f;
+}
 
-      .headerContent {
-        display: flex;
-        line-height: 100px;
-        justify-content: space-between;
-        align-items: center;
+::v-deep .el-menu {
+  background-color: #09152f;
+}
 
-        .find {
-          display: flex;
-        }
+::v-deep .el-main,
+::v-deep .el-footer {
+  background-color: #09152f;
+}
 
-        .search-item {
-          display: flex;
-          padding: 10px;
-        }
-
-        .findBtn {
-          line-height: 100px;
-          margin-left: 15px;
-          display: flex;
-          align-items: center;
-
-          .el-button {
-            padding: 12px 25px;
-          }
-        }
-
-        .addBtn {
-          padding: 12px 30px;
-          margin-left: 20%;
-        }
-      }
-
-      main {
-        background-color: #09152f;
-        margin-top: 20px;
-        padding-bottom: 50px;
-
-        .mainTitle {
-          line-height: 60px;
-        }
-
-        .el-link {
-          color: #4b9bb7;
-        }
-
-        .leftPx {
-          margin-left: 10px;
-        }
-
-        .pagination {
-          margin-top: 50px;
-          display: flex;
-          line-height: 50px;
-          justify-content: center;
-
-          .el-pagination {
-            &::v-deep li,
-            &::v-deep .btn-prev,
-            &::v-deep .btn-next {
-              background-color: #071f39;
-              color: #4b9bb7;
-            }
-          }
-        }
-
-        .el-table {
-          color: #4b9bb7;
-          font-size: 10px;
-
-          &::v-deep .el-table__empty-block {
-            background-color: #09152f;
-            color: #4b9bb7;
-          }
-
-          .operation {
-            display: flex;
-
-            .el-button {
-              border: none;
-            }
-
-            span:hover {
-              cursor: pointer;
-            }
-          }
-        }
-      }
-    }
-    &::v-deep .el-dialog__header,
-    &::v-deep .el-dialog__body {
-        background-color: #06122c;
-    }
-
-    &::v-deep .el-dialog__header {
-        display: flex;
-        align-items: center;
-        background-color: #fff;
-        padding: 20px;
-        line-height: 60px;
-    }
-
-    &::v-deep .el-dialog__title {
-        color: #4b9bb7;
-    }
-
-    &::v-deep .el-dialog__close {
-        width: 20px;
-        height: 20px;
-        // color: #fff;
-    }
-
-    &::v-deep .el-dialog__body {
-        padding: 0;
-    }
+::v-deep .el-tree-node__label {
+  line-height: 30px;
+  font-size: 14px;
+  // color: rgb(75, 155, 183);
 }
 </style>
\ No newline at end of file
diff --git a/src/views/systemSetting/device/point/index.vue b/src/views/systemSetting/device/point/index.vue
index 09180d7..0faebc1 100644
--- a/src/views/systemSetting/device/point/index.vue
+++ b/src/views/systemSetting/device/point/index.vue
@@ -171,7 +171,7 @@
 ::v-deep .el-tree-node__label {
   line-height: 30px;
   font-size: 14px;
-  color: rgb(75, 155, 183);
+  // color: rgb(75, 155, 183);
 }
 </style>
 <script>
@@ -190,6 +190,7 @@
       pageSize: 10,
       videoData: [],
       value: "",
+      searchData: null,
     };
   },
   methods: {
@@ -213,19 +214,21 @@
         .catch((err) => this.$message.error(err));
     },
     selectedDepartment(data) {
-      this.currentPage = 1;
+   
       if (!data.children) {
+        this.searchData = data;
         this.getVideoPointList(data);
       } else {
         data.parentId = data.id;
         data.id = null;
+        this.searchData = data;
         this.getVideoPointList(data);
       }
+      this.currentPage = 1;
     },
     current_change(e) {
       this.currentPage = e;
-
-      this.getVideoPointList();
+      this.getVideoPointList(this.searchData);
     },
   },
 };

--
Gitblit v1.8.0