From 821672dbbd1a7f2be98d5e87a5f39c648ae721a7 Mon Sep 17 00:00:00 2001
From: Lou <luzhiping@qqyjz.com>
Date: Thu, 22 Feb 2024 18:23:57 +0800
Subject: [PATCH] 更新

---
 src/views/property/companyManage.vue |   55 ++++++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 38 insertions(+), 17 deletions(-)

diff --git a/src/views/property/companyManage.vue b/src/views/property/companyManage.vue
index a5f339b..a157fb0 100644
--- a/src/views/property/companyManage.vue
+++ b/src/views/property/companyManage.vue
@@ -1,11 +1,9 @@
 <!-- 物业公司管理 -->
 <template>
-    <basic-container>
-        <div class="basic-info">
-            <avue-form :option="wyOption" v-model="wyForm"></avue-form>
-        </div>
+    <basic-container class="basic-container-box">
         <div class="detail-container">
             <el-tabs v-model="activeName" @tab-click="handleClick">
+                <el-tab-pane label="公司管理" name="info0"></el-tab-pane>
                 <el-tab-pane label="基础信息" name="info1"></el-tab-pane>
                 <el-tab-pane label="经营信息" name="info2"></el-tab-pane>
                 <el-tab-pane label="纳税信息" name="info3"></el-tab-pane>
@@ -14,7 +12,10 @@
                 <el-tab-pane label="项目良好行为" name="info6"></el-tab-pane>
                 <el-tab-pane label="违法违规行为惩戒" name="info7"></el-tab-pane>
             </el-tabs>
-            <div class="answer">
+            <div class="basic-info" v-show="activeName == 'info0'">
+                <avue-form :option="wyOption" v-model="wyForm"></avue-form>
+            </div>
+            <div class="answer" v-show="activeName != 'info0'">
                 <div class="topic-item" v-for="(item, index) in questionBankData" :key="index">
                     <div class="topic-title">
                         {{ index + 1 }} .{{ item.subjectName }}
@@ -129,7 +130,7 @@
                 }]
             },
             wyForm: {},
-            activeName: 'info1',
+            activeName: 'info0',
             questionBankData: [],
             page: {
                 pageSize: 20,
@@ -188,18 +189,18 @@
             })
         },
 
-        // 保持题目
+        // 保存题目
         saveQuestionBank () {
+            let isChoose = false
+            this.questionBankData.forEach(item => {
+                if (item.chooseId) {
+                    isChoose = true
+                }
+            })
+            if (isChoose == false) return
             save(this.questionBankData).then(
                 () => {
-                    // this.$message({
-                    //   type: "success",
-                    //   message: "操作成功!",
-                    // })
-                    // this.questionBankOnLoad(this.page, param = {
-                    //   subclassName: this.activeName,
-                    //   propertyId: this.wyForm.id
-                    // })
+                    //  取消提示避免重复
                 },
                 (error) => {
                     window.console.log(error)
@@ -209,6 +210,7 @@
 
         // 点击tab切换
         handleClick (tab) {
+            if (tab.label == '公司管理') return
             let param = {
                 subclassName: tab.label,
                 propertyId: this.wyForm.id
@@ -224,18 +226,36 @@
             this.saveBasicInfo()
             // 保持考试信息
             this.saveQuestionBank()
-        },
+        }
     }
 }
 </script>
 
 <style lang="scss" scoped>
+.basic-container-box {
+    height: 100%;
+
+    :deep(.basic-container__card),
+    :deep(.el-card__body) {
+        height: 98%;
+    }
+
+    .detail-container {
+        height: calc(100% - 100px);
+    }
+}
+
+
 :deep(.answer) {
+    height: calc(100% - 60px);
+    overflow-y: scroll;
+
     .topic-item {
         margin-bottom: 20px;
 
         .topic-title {
             margin-bottom: 10px;
+            font-size: 14px;
         }
 
         .topic-options {
@@ -253,6 +273,7 @@
                     display: flex;
                     align-items: center;
                     margin-right: 6px;
+                    font-size: 14px;
                 }
             }
         }
@@ -262,6 +283,6 @@
 .submit-btn {
     display: flex;
     justify-content: center;
-    margin-bottom: 30px;
+    margin: 20px;
 }
 </style>
\ No newline at end of file

--
Gitblit v1.9.3