From e1aa0ecffbabd618c71e4ad94370fb8dffe6ee1c Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期日, 21 一月 2024 20:54:49 +0800
Subject: [PATCH] 优化

---
 src/components/detail/index.vue |  470 +++++++++++++++++++++++++++-------------------------------
 1 files changed, 216 insertions(+), 254 deletions(-)

diff --git a/src/components/detail/index.vue b/src/components/detail/index.vue
index 65dac44..d7d4b3e 100644
--- a/src/components/detail/index.vue
+++ b/src/components/detail/index.vue
@@ -1,151 +1,112 @@
 <template>
-  <div class="view">
-    <div class="view-data">
-      <div class="data-item">
-        <div class="data-item__left">
-          <label class="data-title"> 闂绫诲瀷锛�</label>
-          <span class="data-detail">{{
-            getCategoryLabel(baseCase.category)
-          }}</span>
+    <div class="view">
+        <div class="view-data">
+            <el-descriptions class="margin-top" :column="2"  border>
+                <el-descriptions-item label="闂绫诲瀷">{{
+                    getCategoryLabel(baseCase.category)
+                }}</el-descriptions-item>
+
+                <el-descriptions-item label="浜嬪彂鍦扮偣">{{
+                    baseCase.site
+                }}</el-descriptions-item>
+
+                <el-descriptions-item label="澶х被鍚嶇О"
+                    ><span class="data-detail">{{
+                        baseCase.violationsVO.categoryText
+                    }}</span></el-descriptions-item
+                >
+                <el-descriptions-item label="鍟嗛摵鍚嶇О"
+                    ><span class="data-detail">{{
+                        baseCase.violationsVO.shopName
+                    }}</span></el-descriptions-item
+                >
+                <el-descriptions-item label="灏忕被鍚嶇О"
+                    ><span class="data-detail">{{
+                        baseCase.violationsVO.typeText
+                    }}</span></el-descriptions-item
+                >
+
+                <el-descriptions-item label="鍙嶆槧浜�"
+                    ><span class="data-detail">{{
+                        baseCase.violationsVO.informant
+                    }}</span></el-descriptions-item
+                >
+                <el-descriptions-item label="浜嬩欢绛夌骇"
+                    ><span class="data-detail">{{
+                        baseCase.violationsVO.gradeText
+                    }}</span></el-descriptions-item
+                >
+                <el-descriptions-item label="鑱旂郴鏂瑰紡"
+                    ><span class="data-detail">{{
+                        baseCase.violationsVO.informantPhoneCode
+                    }}</span></el-descriptions-item
+                >
+
+                <el-descriptions-item label="妗堢敱"
+                    ><span class="data-detail">{{
+                        baseCase.violationsVO.actionCause
+                    }}</span></el-descriptions-item
+                >
+
+                <el-descriptions-item label="韬唤璇佸彿"
+                    ><span class="data-detail">{{
+                        baseCase.violationsVO.informantIdCard
+                    }}</span></el-descriptions-item
+                >
+                <el-descriptions-item label="鎵�灞炶閬�"
+                    ><span class="data-detail">{{
+                        baseCase.streetText
+                    }}</span></el-descriptions-item
+                >
+                <el-descriptions-item label="鎵�灞炵ぞ鍖�"
+                    ><span class="data-detail">{{
+                        baseCase.communityText
+                    }}</span></el-descriptions-item
+                >
+                <el-descriptions-item label="闂鎻忚堪"
+                    ><span class="data-detail">{{
+                        baseCase.violationsVO.description
+                    }}</span></el-descriptions-item
+                >
+            </el-descriptions>
         </div>
-      </div>
-      <div class="data-item">
-        <div class="data-item__left">
-          <label class="data-title"> 澶х被鍚嶇О锛�</label>
-          <span class="data-detail">{{
-            baseCase.violationsVO.categoryText
-          }}</span>
+        <div class="view-process">
+            <div class="process-header">
+                <el-button
+                    :type="activeIndex === item.index ? 'primary' : ''"
+                    v-for="item in titleList"
+                    :key="item.title"
+                    @click="changeComponent(item.index)"
+                >
+                    {{ item.title }}</el-button
+                >
+            </div>
+            <div class="show-item">
+                <div class="show-wrap">
+                    <MyProcess
+                        v-if="activeIndex === 1"
+                        :handlePassVo="handlePassVo"
+                        :baseCase="baseCase"
+                    ></MyProcess>
+                    <MyFilePicture
+                        v-else-if="activeIndex === 2"
+                        :filesPictureVo="filesPictureVo"
+                        :mycode="mycode"
+                    ></MyFilePicture>
+                    <MySovleProblem
+                        v-else-if="activeIndex === 3"
+                        :baseCase="baseCase"
+                        :handlePassVo="handlePassVo"
+                    ></MySovleProblem>
+                    <MyScene
+                        v-else
+                        :currentSitVo="currentSitVo"
+                        :baseCase="baseCase"
+                    ></MyScene>
+                </div>
+            </div>
         </div>
-      </div>
-      <div class="data-item">
-        <div class="data-item__left">
-          <label class="data-title"> 灏忕被鍚嶇О锛�</label>
-          <span class="data-detail">{{ baseCase.violationsVO.typeText }}</span>
-        </div>
-      </div>
-      <div class="data-item">
-        <div class="data-item__left">
-          <label class="data-title"> 浜嬩欢绛夌骇锛�</label>
-          <span class="data-detail">{{ baseCase.violationsVO.gradeText }}</span>
-        </div>
-      </div>
-      <div class="data-item">
-        <div class="data-item__left">
-          <label class="data-title"> 妗堢敱锛�</label>
-          <span class="data-detail">{{
-            baseCase.violationsVO.actionCause
-          }}</span>
-        </div>
-      </div>
-      <div class="data-item">
-        <div class="data-item__left">
-          <label class="data-title"> 鎵�灞炶閬擄細</label>
-          <span class="data-detail">{{ baseCase.streetText }}</span>
-        </div>
-      </div>
-      <div class="data-item">
-        <div class="data-item__left">
-          <label class="data-title"> 鎵�灞炵ぞ鍖猴細</label>
-          <span class="data-detail">{{ baseCase.communityText }}</span>
-        </div>
-      </div>
-      <div class="data-item">
-        <div class="data-item__left">
-          <label class="data-title"> 浜嬪彂鍦扮偣锛�</label>
-          <span class="data-detail">{{ baseCase.site }}</span>
-        </div>
-      </div>
-      <div class="data-item">
-        <div class="data-item__left">
-          <label class="data-title"> 鍟嗛摵鍚嶇О锛�</label>
-          <span class="data-detail">{{ baseCase.violationsVO.shopName }}</span>
-        </div>
-      </div>
-      <div class="data-item">
-        <div class="data-item__left">
-          <label class="data-title"> 闂鎻忚堪锛�</label>
-          <span class="data-detail">{{
-            baseCase.violationsVO.description
-          }}</span>
-        </div>
-      </div>
-      <div class="data-user">
-        <div class="data-item">
-          <div class="data-item__left">
-            <label class="data-title"> 鍙嶆槧浜猴細</label>
-            <span class="data-detail">{{
-              baseCase.violationsVO.informant
-            }}</span>
-          </div>
-        </div>
-        <div class="data-item">
-          <div class="data-item__right">
-            <label class="data-title"> 鑱旂郴鏂瑰紡锛�</label>
-            <span class="data-detail">{{
-              baseCase.violationsVO.informantPhoneCode
-            }}</span>
-          </div>
-        </div>
-        <div class="data-item">
-          <div class="data-item__left">
-            <label class="data-title"> 韬唤璇佸彿锛�</label>
-            <span class="data-detail">{{
-              baseCase.violationsVO.informantIdCard
-            }}</span>
-          </div>
-        </div>
-      </div>
     </div>
-    <div class="view-process">
-      <div class="process-header">
-        <div
-          class="process-title-item"
-          v-for="item in titleList"
-          :key="item.title"
-          @click="changeComponent(item.index)"
-        >
-          <div
-            :class="[
-              'process-title',
-              activeIndex === item.index ? 'title-active' : '',
-            ]"
-          >
-            {{ item.title }}
-          </div>
-          <div
-            :class="[
-              'under-line',
-              activeIndex === item.index ? 'line-active' : '',
-            ]"
-          ></div>
-        </div>
-      </div>
-      <div class="show-item">
-        <div class="show-wrap">
-          <MyProcess
-            v-if="activeIndex === 1"
-            :handlePassVo="handlePassVo"
-            :baseCase="baseCase"
-          ></MyProcess>
-          <MyFilePicture
-            v-else-if="activeIndex === 2"
-            :filesPictureVo="filesPictureVo"
-            :mycode="mycode"
-          ></MyFilePicture>
-          <MySovleProblem
-            v-else-if="activeIndex === 3"
-            :baseCase="baseCase"
-            :handlePassVo="handlePassVo"
-          ></MySovleProblem>
-          <MyScene
-            v-else
-            :currentSitVo="currentSitVo"
-            :baseCase="baseCase"
-          ></MyScene>
-        </div>
-      </div>
-    </div>
-  </div>
 </template>
 <script>
 import MyProcess from "@/components/process";
@@ -155,130 +116,131 @@
 import { CATEGOTY } from "@/utils/helper";
 
 export default {
-  components: {
-    MyProcess,
-    MyFilePicture,
-    MySovleProblem,
-    MyScene,
-  },
-  data() {
-    return {
-      myInfo: {},
-      activeIndex: 1,
-      titleList: [
-        {
-          title: "鍔炵悊缁忚繃",
-          index: 1,
-        },
-        {
-          title: "妗堝嵎鍥剧墖",
-          index: 2,
-        },
-        {
-          title: "闂澶勭悊",
-          index: 3,
-        },
-        {
-          title: "鐜板満鎯呭喌",
-          index: 4,
-        },
-      ],
-      baseCase: {},
-      handlePassVo: {},
-      currentSitVo: {},
-      filesPictureVo: {},
-    };
-  },
-  created() {
-    this.baseCase = this.info.baseCase;
-    this.handlePassVo = this.info.handlePassVo;
-    this.currentSitVo = this.info.currentSitVo;
-    this.filesPictureVo = this.info.filesPictureVo;
-  },
-  methods: {
-    changeComponent(index) {
-      this.activeIndex = index;
+    components: {
+        MyProcess,
+        MyFilePicture,
+        MySovleProblem,
+        MyScene,
     },
-    getCategoryLabel(category) {
-      return CATEGOTY.find((item) => item.value === category).label;
+    data() {
+        return {
+            myInfo: {},
+            activeIndex: 1,
+            titleList: [
+                {
+                    title: "鍔炵悊缁忚繃",
+                    index: 1,
+                },
+                {
+                    title: "妗堝嵎鍥剧墖",
+                    index: 2,
+                },
+                {
+                    title: "闂澶勭悊",
+                    index: 3,
+                },
+                {
+                    title: "鐜板満鎯呭喌",
+                    index: 4,
+                },
+            ],
+            baseCase: {},
+            handlePassVo: {},
+            currentSitVo: {},
+            filesPictureVo: {},
+        };
     },
-  },
-  props: ["info", "mycode"],
+    created() {
+        this.baseCase = this.info.baseCase;
+        this.handlePassVo = this.info.handlePassVo;
+        this.currentSitVo = this.info.currentSitVo;
+        this.filesPictureVo = this.info.filesPictureVo;
+    },
+    methods: {
+        changeComponent(index) {
+            this.activeIndex = index;
+        },
+        getCategoryLabel(category) {
+            return CATEGOTY.find((item) => item.value === category).label;
+        },
+    },
+    props: ["info", "mycode"],
 };
 </script>
 <style lang="scss" scoped>
 .view {
-  display: flex;
-  padding: 20px;
+    // display: flex;
+    padding: 20px;
 
-  .view-data {
-    color: #4b9bb7;
-    // flex: 4;
-    padding: 0 30px 0 20px;
-    width: 480px;
-    .data-item {
-      display: flex;
-      justify-content: space-between;
-      line-height: 40px;
-    }
-
-    border: 1px solid #17324c;
-    .data-title {
-      line-height: 1.8;
-      width: 70px;
-      text-align: right;
-      display: inline-grid;
-    }
-    .data-detail {
-      line-height: 1.8;
-      max-width: 240px;
-      display: inline-grid;
-      color: #333;
-
-      width: calc(100% - 70px) !important;
-      overflow: hidden !important;
-      text-overflow: ellipsis !important;
-      white-space: normal !important;
-    }
-  }
-
-  .view-process {
-    flex: 6;
-    margin-left: 20px;
-
-    .process-header {
-      display: flex;
-      line-height: 40px;
-
-      .process-title-item {
-        width: 120px;
-        text-align: center;
-
-        .under-line {
-          height: 2px;
-          width: 100%;
+    .view-data {
+        color: #4b9bb7;
+        // flex: 4;
+        padding: 0 30px 0 20px;
+        // width: 480px;
+        .data-item {
+            display: flex;
+            justify-content: space-between;
+            line-height: 40px;
         }
 
-        .title-active {
-          color: #4b9bb7;
+        // border: 2px solid #ccc;
+        border-radius: 5px;
+        .data-title {
+            line-height: 1.8;
+            width: 70px;
+            text-align: right;
+            display: inline-grid;
         }
+        .data-detail {
+            line-height: 1.8;
+            max-width: 240px;
+            display: inline-grid;
+            color: #333;
 
-        .line-active {
-          background-color: #4b9bb7;
-          border-radius: 20px;
+            width: calc(100% - 70px) !important;
+            overflow: hidden !important;
+            text-overflow: ellipsis !important;
+            white-space: normal !important;
         }
-      }
     }
 
-    .show-item {
-      overflow: hidden;
-      height: 600px;
-      position: relative;
-      .show-wrap {
-        overflow: auto;
-        height: 600px;
-      }
+    .view-process {
+        flex: 6;
+        margin: 20px 0px 0px 20px;
+
+        .process-header {
+            display: flex;
+            line-height: 40px;
+
+            .process-title-item {
+                width: 120px;
+                text-align: center;
+
+                .under-line {
+                    height: 2px;
+                    width: 100%;
+                }
+
+                .title-active {
+                    color: #4b9bb7;
+                }
+
+                .line-active {
+                    background-color: #4b9bb7;
+                    border-radius: 20px;
+                }
+            }
+        }
+
+        .show-item {
+            overflow: hidden;
+            height: 600px;
+            position: relative;
+            .show-wrap {
+                overflow: auto;
+                height: 600px;
+            }
+        }
     }
-  }
 }
 </style>
\ No newline at end of file

--
Gitblit v1.8.0