From 95448b340895b846a0076d4c99a5e27d6be46aab Mon Sep 17 00:00:00 2001
From: lin <sbla5888@163.com>
Date: Mon, 26 Feb 2024 14:18:26 +0800
Subject: [PATCH] 物业bug修复

---
 src/views/property/companyManage.vue |  464 +++++++++++++++++++++++++++++-----------------------------
 1 files changed, 232 insertions(+), 232 deletions(-)

diff --git a/src/views/property/companyManage.vue b/src/views/property/companyManage.vue
index a157fb0..9a3cc75 100644
--- a/src/views/property/companyManage.vue
+++ b/src/views/property/companyManage.vue
@@ -1,288 +1,288 @@
 <!-- 物业公司管理 -->
 <template>
-    <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>
-                <el-tab-pane label="党建信息" name="info4"></el-tab-pane>
-                <el-tab-pane label="企业良好行为" name="info5"></el-tab-pane>
-                <el-tab-pane label="项目良好行为" name="info6"></el-tab-pane>
-                <el-tab-pane label="违法违规行为惩戒" name="info7"></el-tab-pane>
-            </el-tabs>
-            <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 }}
-                    </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>
+        <el-tab-pane label="党建信息" name="info4"></el-tab-pane>
+        <el-tab-pane label="企业良好行为" name="info5"></el-tab-pane>
+        <el-tab-pane label="项目良好行为" name="info6"></el-tab-pane>
+        <el-tab-pane label="违法违规行为惩戒" name="info7"></el-tab-pane>
+      </el-tabs>
+      <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 }}
+          </div>
 
-                    <div class="topic-options" v-if="item.choicesType == 0">
-                        <el-radio-group v-model="item.chooseId">
-                            <el-radio :label="item1.id" v-for="(item1, index1) in item.subjectOptionList" :key="index1">{{
+          <div class="topic-options" v-if="item.choicesType == 0">
+            <el-radio-group v-model="item.chooseId">
+              <el-radio :label="item1.id" v-for="(item1, index1) in item.subjectOptionList" :key="index1">{{
                                 item1.optionName }}</el-radio>
-                        </el-radio-group>
-                    </div>
+            </el-radio-group>
+          </div>
 
-                    <div class="topic-options" v-if="item.choicesType == 3">
-                        <div class="input-num-item" v-for="(item1, index1) in item.subjectOptionList" :key="index1">
-                            <div class="num-name">{{ item1.optionName }}:</div>
-                            <el-input-number v-model="item1.numbers" @change="handleChange" :min="0" :max="25"
-                                :label="item1.optionName"></el-input-number>
-                        </div>
-                    </div>
-                </div>
-
+          <div class="topic-options" v-if="item.choicesType == 3">
+            <div class="input-num-item" v-for="(item1, index1) in item.subjectOptionList" :key="index1">
+              <div class="num-name">{{ item1.optionName }}:</div>
+              <el-input-number v-model="item1.numbers" @change="handleChange" :min="0" :max="25"
+                :label="item1.optionName"></el-input-number>
             </div>
+          </div>
         </div>
-        <div class="submit-btn">
-            <el-button type="primary" @click="handleSubmit">保存</el-button>
-        </div>
-    </basic-container>
+
+      </div>
+    </div>
+    <div class="submit-btn">
+      <el-button type="primary" @click="handleSubmit">保存</el-button>
+    </div>
+  </basic-container>
 </template>
 
 <script>
-import {
+  import {
     getList
-} from "@/api/subjectChoices/subjectChoices"
-import {
+  } from "@/api/subjectChoices/subjectChoices"
+  import {
     getDetailByDeptId
-} from "@/api/property/companyManage.js"
-import {
+  } from "@/api/property/companyManage.js"
+  import {
     update,
-} from "@/api/property/propertyCompany"
-import {
+  } from "@/api/property/propertyCompany"
+  import {
     save
-} from "@/api/answerRecord/answerRecord"
-export default {
-    data () {
-        return {
-            wyOption: {
-                submitBtn: false,
-                emptyBtn: false,
-                column: [{
-                    label: "物业公司名称",
-                    labelWidth: 120,
-                    type: 'input',
-                    prop: "name",
-                    span: 24,
-                    // offset: 2,
-                }, {
-                    labelWidth: 120,
-                    label: '省份',
-                    prop: 'province',
-                    type: 'select',
-                    span: 8,
-                    dicUrl: `/api/blade-system/region/select?code=100000`,
-                    props: {
-                        label: 'name',
-                        value: 'code'
-                    },
-                    cascader: ['city'],
-                }, {
-                    labelWidth: 60,
-                    label: '城市',
-                    prop: 'city',
-                    type: 'select',
-                    span: 8,
-                    dicUrl: `/api/blade-system/region/select?code={{key}}`,
-                    props: {
-                        label: 'name',
-                        value: 'code'
-                    },
-                    cascader: ['area'],
-                }, {
-                    labelWidth: 60,
-                    label: '地区',
-                    prop: 'area',
-                    type: 'select',
-                    span: 8,
-                    dicUrl: `/api/blade-system/region/select?code={{key}}`,
-                    props: {
-                        label: 'name',
-                        value: 'code'
-                    }
-                }, {
-                    label: "地址",
-                    labelWidth: 120,
-                    type: 'input',
-                    prop: "address",
-                    span: 24,
-                    // offset: 2,
-                }, {
-                    label: "社会信用代码",
-                    labelWidth: 120,
-                    type: 'input',
-                    prop: "socialCreditCode",
-                    span: 24,
-                    // offset: 2,
-                }, {
-                    label: "简介",
-                    labelWidth: 120,
-                    component: "AvueUeditor",
-                    prop: "remark",
-                    span: 24,
-                    // offset: 2,
-                }]
+  } from "@/api/answerRecord/answerRecord"
+  export default {
+    data() {
+      return {
+        wyOption: {
+          submitBtn: false,
+          emptyBtn: false,
+          column: [{
+            label: "物业公司名称",
+            labelWidth: 120,
+            type: 'input',
+            prop: "name",
+            span: 24,
+            // offset: 2,
+          }, {
+            labelWidth: 120,
+            label: '省份',
+            prop: 'province',
+            type: 'select',
+            span: 8,
+            dicUrl: `/api/blade-system/region/select?code=100000`,
+            props: {
+              label: 'name',
+              value: 'code'
             },
-            wyForm: {},
-            activeName: 'info0',
-            questionBankData: [],
-            page: {
-                pageSize: 20,
-                currentPage: 1,
+            cascader: ['city'],
+          }, {
+            labelWidth: 60,
+            label: '城市',
+            prop: 'city',
+            type: 'select',
+            span: 8,
+            dicUrl: `/api/blade-system/region/select?code={{key}}`,
+            props: {
+              label: 'name',
+              value: 'code'
             },
-        }
+            cascader: ['area'],
+          }, {
+            labelWidth: 60,
+            label: '地区',
+            prop: 'area',
+            type: 'select',
+            span: 8,
+            dicUrl: `/api/blade-system/region/select?code={{key}}`,
+            props: {
+              label: 'name',
+              value: 'code'
+            }
+          }, {
+            label: "地址",
+            labelWidth: 120,
+            type: 'input',
+            prop: "address",
+            span: 24,
+            // offset: 2,
+          }, {
+            label: "社会信用代码",
+            labelWidth: 120,
+            type: 'input',
+            prop: "socialCreditCode",
+            span: 24,
+            // offset: 2,
+          }, {
+            label: "简介",
+            labelWidth: 120,
+            component: "AvueUeditor",
+            prop: "remark",
+            span: 24,
+            // offset: 2,
+          }]
+        },
+        wyForm: {},
+        activeName: 'info0',
+        questionBankData: [],
+        page: {
+          pageSize: 20,
+          currentPage: 1,
+        },
+      }
     },
     watch: {},
 
-    created () {
-        this.initBasicInfo()
+    created() {
+      this.initBasicInfo()
     },
 
     methods: {
-        // 获取基本信息
-        initBasicInfo () {
-            getDetailByDeptId().then(res => {
-                this.wyForm = res.data.data
-                this.questionBankOnLoad(this.page)
+      // 获取基本信息
+      initBasicInfo() {
+        getDetailByDeptId().then(res => {
+          this.wyForm = res.data.data
+          this.questionBankOnLoad(this.page)
+        })
+      },
+
+      // 保存基本信息
+      saveBasicInfo() {
+        update(this.wyForm).then(
+          () => {
+            this.$message({
+              type: "success",
+              message: "操作成功!",
             })
-        },
+            this.initBasicInfo()
+          },
+          (error) => {
+            window.console.log(error)
+            loading()
+          }
+        )
+      },
 
-        // 保存基本信息
-        saveBasicInfo () {
-            update(this.wyForm).then(
-                () => {
-                    this.$message({
-                        type: "success",
-                        message: "操作成功!",
-                    })
-                    this.initBasicInfo()
-                },
-                (error) => {
-                    window.console.log(error)
-                    loading()
-                }
-            )
-        },
+      // 获取题目
+      questionBankOnLoad(page, params = {
+        subclassName: '基础信息',
+        propertyId: this.wyForm.id
+      }) {
+        getList(
+          page.currentPage,
+          page.pageSize,
+          params
+        ).then(res => {
+          const data = res.data.data
+          this.page.total = data.total
+          this.questionBankData = data.records
+          this.questionBankData.forEach(item => {
+            item.propertyId = this.wyForm.id
+          })
+        })
+      },
 
-        // 获取题目
-        questionBankOnLoad (page, params = {
-            subclassName: '基础信息',
-            propertyId: this.wyForm.id
-        }) {
-            getList(
-                page.currentPage,
-                page.pageSize,
-                params
-            ).then(res => {
-                const data = res.data.data
-                this.page.total = data.total
-                this.questionBankData = data.records
-                this.questionBankData.forEach(item => {
-                    item.propertyId = this.wyForm.id
-                })
-            })
-        },
+      // 保存题目
+      saveQuestionBank() {
+        let isChoose = false
+        this.questionBankData.forEach(item => {
+          if (item.chooseId) {
+            isChoose = true
+          }
+        })
+        if (isChoose == false) return
+        save(this.questionBankData).then(
+          () => {
+            //  取消提示避免重复
+          },
+          (error) => {
+            window.console.log(error)
+          }
+        )
+      },
 
-        // 保存题目
-        saveQuestionBank () {
-            let isChoose = false
-            this.questionBankData.forEach(item => {
-                if (item.chooseId) {
-                    isChoose = true
-                }
-            })
-            if (isChoose == false) return
-            save(this.questionBankData).then(
-                () => {
-                    //  取消提示避免重复
-                },
-                (error) => {
-                    window.console.log(error)
-                }
-            )
-        },
-
-        // 点击tab切换
-        handleClick (tab) {
-            if (tab.label == '公司管理') return
-            let param = {
-                subclassName: tab.label,
-                propertyId: this.wyForm.id
-            }
-            // 保持考试信息
-            this.saveQuestionBank()
-            this.questionBankOnLoad(this.page, param)
-        },
-
-        // 保存按钮
-        handleSubmit () {
-            // 保存基本信息
-            this.saveBasicInfo()
-            // 保持考试信息
-            this.saveQuestionBank()
+      // 点击tab切换
+      handleClick(tab) {
+        if (tab.label == '基本信息') return
+        let param = {
+          subclassName: tab.label,
+          propertyId: this.wyForm.id
         }
+        // 保持考试信息
+        this.saveQuestionBank()
+        this.questionBankOnLoad(this.page, param)
+      },
+
+      // 保存按钮
+      handleSubmit() {
+        // 保存基本信息
+        this.saveBasicInfo()
+        // 保持考试信息
+        this.saveQuestionBank()
+      }
     }
-}
+  }
 </script>
 
 <style lang="scss" scoped>
-.basic-container-box {
+  .basic-container-box {
     height: 100%;
 
     :deep(.basic-container__card),
     :deep(.el-card__body) {
-        height: 98%;
+      height: 98%;
     }
 
     .detail-container {
-        height: calc(100% - 100px);
+      height: calc(100% - 100px);
     }
-}
+  }
 
 
-:deep(.answer) {
+  :deep(.answer) {
     height: calc(100% - 60px);
     overflow-y: scroll;
 
     .topic-item {
-        margin-bottom: 20px;
+      margin-bottom: 20px;
 
-        .topic-title {
-            margin-bottom: 10px;
-            font-size: 14px;
+      .topic-title {
+        margin-bottom: 10px;
+        font-size: 14px;
+      }
+
+      .topic-options {
+        display: flex;
+
+        .el-radio {
+          margin-bottom: 10px;
         }
 
-        .topic-options {
+        .input-num-item {
+          display: flex;
+          margin-right: 20px;
+
+          .num-name {
             display: flex;
-
-            .el-radio {
-                margin-bottom: 10px;
-            }
-
-            .input-num-item {
-                display: flex;
-                margin-right: 20px;
-
-                .num-name {
-                    display: flex;
-                    align-items: center;
-                    margin-right: 6px;
-                    font-size: 14px;
-                }
-            }
+            align-items: center;
+            margin-right: 6px;
+            font-size: 14px;
+          }
         }
+      }
     }
-}
+  }
 
-.submit-btn {
+  .submit-btn {
     display: flex;
     justify-content: center;
     margin: 20px;
-}
+  }
 </style>
\ No newline at end of file

--
Gitblit v1.9.3