From d27da0d7b2f5cc3cc97622158b7f14a7faabb05b Mon Sep 17 00:00:00 2001 From: 杨磊 <505174330@qq.com> Date: 星期三, 12 六月 2024 18:42:33 +0800 Subject: [PATCH] 世医图谱 --- src/pages/TcmSystem/TcmSystem.vue | 183 ++++++++++++++++++++++++++++++++------------- 1 files changed, 131 insertions(+), 52 deletions(-) diff --git a/src/pages/TcmSystem/TcmSystem.vue b/src/pages/TcmSystem/TcmSystem.vue index e2cce49..3175d81 100644 --- a/src/pages/TcmSystem/TcmSystem.vue +++ b/src/pages/TcmSystem/TcmSystem.vue @@ -15,9 +15,10 @@ 鐑棬鎼滅储锛� <ul class="flex" style="margin-right: 10rpx"> <li - v-for="item in hot" + v-for="(item, index) in hot" :key="item.id" - @tap="HotClick(item.name)" + @tap="HotClick(item.name, index)" + :class="{ cursor: true, active: hotAciveIndex === index }" style="margin: 0 0.05rem; color: #244a7b; cursor: pointer" > {{ item.name }} @@ -50,8 +51,8 @@ style="padding: 0 20rpx; color: #2c2c2c; cursor: pointer" @click="handInstitCLick(item, 'a')" > - <view class="">{{ item.dynastyName }}</view> - <view class="">{{ item.count }}</view> + <view>{{ item.dynastyName }}</view> + <view>{{ item.count }}</view> </li> </ul> <view v-if="institution.list.length - 1 > 3" class="flex flex-center"> @@ -85,8 +86,8 @@ style="padding: 0 20rpx; cursor: pointer" @click="handInstitCLick(item, 'b')" > - <view class="">{{ item.dynastyName }}</view> - <view class="">{{ item.count }}</view> + <view>{{ item.dynastyName }}</view> + <view>{{ item.count }}</view> </li> </ul> <view v-if="officials.list.length - 1 > 3" class="flex flex-center"> @@ -125,9 +126,7 @@ v-loading="pageLoading" > <view class="flex" style="width: 100%; margin-bottom: 0.3rem"> - <view - class="" - style="font-size: 0.14rem; color: #2c2c2c; font-weight: 400" + <view style="font-size: 0.14rem; color: #2c2c2c; font-weight: 400" >鍏眥{ total }}鏉�</view > <view class="paixu"> @@ -145,8 +144,8 @@ <view class="flex CommodityList"> <view class="rightList" - @click="ListClick(item)" - v-for="item in CommodityList" + @click="ListClick(item, index)" + v-for="(item, index) in CommodityList" :key="item" > <el-card class="box-card" style="height: 100%"> @@ -247,7 +246,6 @@ <el-dialog class="dialog" :visible.sync="dialogVisible" width="40%"> <!-- 鍙栨秷閿� --> <view - class="" style=" padding: 0.16rem; position: absolute; @@ -292,21 +290,20 @@ </ul> </view> </view> - <view class="" style="width: 80%; height: 100%; position: relative"> + <view style="width: 80%; height: 100%; position: relative"> <view class="pinji flex"> - <view class="" + <view >鍝佺骇锛�<span> {{ ListDetails.grade || "-" }}</span> </view> - <view class="" + <view >鍒悕锛�<span> {{ ListDetails.alias || "-" }}</span> </view> - <view class="" + <view >鏉ユ簮锛�<span> {{ ListDetails.source || "-" }}</span> </view> </view> - <view class=""> + <view> <view - class="" style=" font-size: 0.14rem; color: #2c2c2c; @@ -320,7 +317,6 @@ 鐩稿叧鎻忚堪 </view> <view - class="" style=" font-size: 0.14rem; color: #2c2c2c; @@ -330,9 +326,8 @@ > {{ ListDetails.desc || "-" }} </view> - <view class=""> + <view> <view - class="" style=" font-size: 0.14rem; color: #2c2c2c; @@ -346,7 +341,6 @@ 澶囨敞 </view> <span - class="" v-for="item in ListDetails.notesList" style=" font-size: 0.14rem; @@ -360,21 +354,60 @@ </view> </view> </view> - <!-- <view class="flex detailsBtn"> - <el-button class="flex btn-prev"> + <view class="flex detailsBtn"> + <el-button + class="flex btn-prev" + :disabled="!ListDetails.prev" + @click="ListClick(ListDetails.prev, ListDetails.prev.index)" + > <view class="flex"> - <view class="" style="margin-right: 40rpx">涓婁竴鏉�</view> - <view class="btn-prev-L">鏈烘瀯: 澶尰闄� </view> + <view style="width: 0.6rem">涓婁竴鏉�</view> + <view + class="btn-prev-L" + style=" + flex: 1; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + " + :title="ListDetails.prev ? ListDetails.prev.name : '-'" + > + {{ + ListDetails.prev + ? ListDetails.prev.typeName + "锛�" + ListDetails.prev.name + : "-" + }} + </view> </view> </el-button> - <view class=""> 102/329 </view> - <el-button class="flex btn-next"> + <view class="pageInfo"> + {{ ListDetails.index + 1 }}/{{ total }} + </view> + <el-button + class="flex btn-next" + :disabled="!ListDetails.next" + @click="ListClick(ListDetails.next, ListDetails.next.index)" + > <view class="flex"> - <view class="" style="margin-right: 40rpx">鏈烘瀯: 澶尰闄� </view> - <view class="btn-prev-R">涓嬩竴鏉�</view> + <view + style=" + flex: 1; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + " + :title="ListDetails.next ? ListDetails.next.name : '-'" + > + {{ + ListDetails.next + ? ListDetails.next.typeName + "锛�" + ListDetails.next.name + : "-" + }} + </view> + <view class="btn-prev-R" style="width: 0.6rem">涓嬩竴鏉�</view> </view> </el-button> - </view> --> + </view> </view> </el-dialog> @@ -397,6 +430,7 @@ }, data() { return { + hotAciveIndex: "", // 鏈烘瀯缁熻 institution: { title: "鏈烘瀯缁熻", @@ -406,6 +440,7 @@ // 鏄剧ず澶氬皯鏉¤亴瀹樻暟鎹� institutionIndex: 4, // 鏈烘瀯鍜岃亴瀹樼殑绫诲瀷 鍙栧�硷細OFFICIAL->鑱屽畼 INSTITUTION->鏈烘瀯 ALL->鑱屽畼銆佹満鏋� + searchType: "ALL", classifyType: "ALL", // 鏈烘瀯鍜岃亴瀹樼殑id classifyId: "", @@ -513,12 +548,18 @@ }); }, // 鍙充晶鐨刲ist鏁版嵁 - getMList(obj) { + getMList(key, index) { + if (index !== undefined) { + this.SearchValue = ""; + this.hotAciveIndex = index; + } else { + this.hotAciveIndex = ""; + } this.pageLoading = true; let Obj = { - medicalSearchType: "ALL", + medicalSearchType: this.searchType, type: this.classifyType, //鏌ヨ绫诲瀷 鍙栧�硷細OFFICIAL->鑱屽畼 INSTITUTION->鏈烘瀯 ALL->鑱屽畼銆佹満鏋� - name: this.SearchValue, //鎼滅储妗嗘绱� + name: key ? key : this.SearchValue, //鎼滅储妗嗘绱� dynastyId: this.classifyId, //鐐瑰嚮鏈濅唬鏌ヨ鏁版嵁鏃讹紝甯︿笂姝ゅ弬鏁� sort: this.rankVal, //鎺掑簭鏂瑰紡 鍙栧�硷細CREATE鍒涘缓鏃堕棿锛孨AME鍚嶇О page: this.CurrentPage, //绗嚑椤� @@ -527,7 +568,7 @@ getMedicalList(Obj).then((res) => { this.CommodityList = res.list.map((item) => { return { - id: item.id, + requestId: this.searchType == "ALL" ? item.id : item.rowId, post: item.type === "OFFICIAL" ? "鑱屽畼" @@ -543,18 +584,43 @@ }); }, // list鏁扮粍 鑾峰彇list閲岄潰鐨勮鎯卻huju - ListClick(item) { + ListClick(item, index) { let Obj = { - id: item.dataId, - type: item.type + rowId: item.requestId, + medicalSearchType: this.searchType, + type: this.classifyType, //鏌ヨ绫诲瀷 鍙栧�硷細OFFICIAL->鑱屽畼 INSTITUTION->鏈烘瀯 ALL->鑱屽畼銆佹満鏋� + name: this.SearchValue, //鎼滅储妗嗘绱� + dynastyId: this.classifyId, //鐐瑰嚮鏈濅唬鏌ヨ鏁版嵁鏃讹紝甯︿笂姝ゅ弬鏁� + sort: this.rankVal //鎺掑簭鏂瑰紡 鍙栧�硷細CREATE鍒涘缓鏃堕棿锛孨AME鍚嶇О }; getMedicalDetails(Obj).then((res) => { this.ListDetails = { + index, ...item, - ...res.object + ...res.object.curr, + next: + res.object.next && res.object.next.name + ? { + ...res.object.next, + requestId: res.object.next.rowId, + index: index + 1, + typeName: + res.object.next.type === "OFFICIAL" ? "鑱屽畼" : "鏈烘瀯" + } + : null, + prev: + res.object.prev && res.object.prev.name + ? { + ...res.object.prev, + requestId: res.object.prev.rowId, + index: index - 1, + typeName: + res.object.prev.type === "OFFICIAL" ? "鑱屽畼" : "鏈烘瀯" + } + : null }; + this.dialogVisible = true; }); - this.dialogVisible = !this.dialogVisible; }, // 宸︿晶鐨勬満鏋勭粺璁$瓑绛夋寜閽� handInstitCLick(item, name) { @@ -629,9 +695,9 @@ this.getMList(); }, // 鐑棬鎼滅储 - HotClick(val) { - this.SearchValue = val; - this.getMList(); + HotClick(val, index) { + // this.SearchValue = val; + this.getMList(val, index); }, // 鎸夌収浠�涔堟帓搴� selectChange(e) { @@ -690,8 +756,6 @@ } .creatureXinxi2 { - /* width: .24rem; */ - height: 0.17rem; line-height: 1; font-size: 0.12rem; font-weight: 600; @@ -704,7 +768,6 @@ } .creatureXinxi3 li { - height: 0.16rem; line-height: 0.16rem; background-color: #fff; padding: 0 0.08rem; @@ -719,7 +782,8 @@ /* --------- */ /* 鍝佺骇 */ .pinji { - box-shadow: 2px 0px 3px #888; + box-shadow: 0 0 3px #888; + border-radius: 6px; background-color: #fff; width: 100%; /* height: .6rem; @@ -730,6 +794,10 @@ position: relative; top: -0.25rem; color: #2c2c2c; + font-weight: bold; + span { + font-weight: initial; + } } /* 涓汉淇℃伅鐨勬寜閽� */ @@ -749,12 +817,19 @@ border-radius: 5px; /* height: .32rem; */ line-height: 0.32rem; + flex: 1; + overflow: hidden; +} + +.detailsBtn .pageInfo { + width: 1rem; + text-align: center; } .detailsBtn .btn-prev-L, .detailsBtn .btn-prev-R { border-left: 1px solid #9e9e9e; - padding-left: 0.1rem; + text-align: center; } .detailsBtn > :nth-child(2) { @@ -889,14 +964,13 @@ position: fixed; right: 0; top: 0; - z-index: 9999999999999999999999999999999999999999999 !important; - + z-index: 99999 !important; > div { height: 100%; margin: 0 !important; position: fixed; right: 0; - top: 0; + top: 86px; > :nth-child(1) { display: none; @@ -999,7 +1073,7 @@ .search1 ::v-deep .uni-select__selector-item { position: relative; - z-index: 999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 !important; + z-index: 99999 !important; display: flex; justify-content: center; @@ -1179,4 +1253,9 @@ .nullBox { width: 100%; } + +.cursor.active { + color: #027edc !important; + font-weight: bold; +} </style> -- Gitblit v1.9.1