| | |
| | | width: 2.33rem; |
| | | margin-right: 0.3rem; |
| | | justify-content: flex-end; |
| | | position: relative; |
| | | " |
| | | > |
| | | <input |
| | |
| | | flex: 1; |
| | | background-color: #fff; |
| | | font-size: 0.13rem; |
| | | padding-right: 30px; |
| | | box-sizing: border-box; |
| | | " |
| | | @blur="InputBlur" |
| | | @confirm="toggleSearch" |
| | |
| | | v-model="searchInput" |
| | | placeholder="请输入搜索内容" |
| | | /> |
| | | <span |
| | | class="cleanupBtn" |
| | | v-if="searchInput" |
| | | @click="searchInput = ''" |
| | | style=" |
| | | position: absolute; |
| | | top: 50%; |
| | | margin-top: -10px; |
| | | right: 42px; |
| | | color: #fff; |
| | | z-index: 2; |
| | | display: inline-block; |
| | | width: 20px; |
| | | height: 20px; |
| | | text-align: center; |
| | | line-height: 20px; |
| | | background-color: #a5a5a5; |
| | | font-weight: bold; |
| | | border-radius: 50%; |
| | | font-size: 12px; |
| | | cursor: pointer; |
| | | " |
| | | >✖</span |
| | | > |
| | | <view |
| | | title="搜索" |
| | | class="search-logo" |
| | | @click="toggleSearch" |
| | | :style="{ |
| | | backgroundColor: searchBg == true ? '#244A7B' : '#DA7A2B' |
| | | backgroundColor: searchBg == true ? '#244A7B' : '#DA7A2B', |
| | | }" |
| | | style=" |
| | | background-color: #000; |
| | | border-radius: 50%; |
| | | margin-top: -4rpx; |
| | | " |
| | | style="background-color: #000; border-radius: 50%" |
| | | ></view> |
| | | </view> |
| | | <el-dropdown trigger="click" @command="handleCommand"> |
| | |
| | | <span slot="title">首页</span> |
| | | </el-menu-item> |
| | | <el-menu-item index="1"> |
| | | <span slot="title">中医人物数据库</span> |
| | | <span slot="title">历代人物</span> |
| | | </el-menu-item> |
| | | <el-menu-item index="2" class="oActive"> |
| | | <span slot="title">世医医家数据库</span> |
| | | <span slot="title">家学传承</span> |
| | | </el-menu-item> |
| | | <el-menu-item index="6"> |
| | | <span slot="title">学术流派</span> |
| | | </el-menu-item> |
| | | <el-menu-item index="3"> |
| | | <span slot="title">中医学术流派</span> |
| | | <span slot="title">学术图谱</span> |
| | | </el-menu-item> |
| | | <el-menu-item index="4"> |
| | | <span slot="title">中医地域图谱</span> |
| | | <span slot="title">地域图谱</span> |
| | | </el-menu-item> |
| | | <el-menu-item index="5"> |
| | | <!-- <el-menu-item index="5"> |
| | | <span slot="title">中医医事制度</span> |
| | | </el-menu-item> |
| | | </el-menu-item> --> |
| | | </el-menu> |
| | | </view> |
| | | </el-dialog> |
| | |
| | | type: String, |
| | | default() { |
| | | return "标题"; |
| | | } |
| | | }, |
| | | }, |
| | | searchBg: { |
| | | type: Boolean, |
| | | default() { |
| | | return true; |
| | | } |
| | | }, |
| | | }, |
| | | bg: { |
| | | type: String, |
| | | default() { |
| | | return "/static/image/topBg.png"; |
| | | } |
| | | }, |
| | | }, |
| | | bg1: { |
| | | type: String, |
| | | default() { |
| | | return "/static/image/line.png"; |
| | | } |
| | | }, |
| | | }, |
| | | idIndex: { |
| | | type: String, |
| | | default() { |
| | | return "1"; |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | searchInput: "", // 搜索框输入的内容 |
| | | menuNav: false, |
| | | dialogVisible: false, |
| | | isCommand: true |
| | | isCommand: true, |
| | | }; |
| | | }, |
| | | methods: { |
| | |
| | | if (res.confirm) { |
| | | setTimeout(() => { |
| | | uni.reLaunch({ |
| | | url: "/pages/Login/Login" |
| | | url: "/pages/Login/Login", |
| | | }); |
| | | }, 1500); |
| | | } else if (res.cancel) { |
| | | // console.log('用户点击取消'); |
| | | } |
| | | } |
| | | }, |
| | | }); |
| | | } |
| | | // uni.navigateTo({ |
| | |
| | | handleCommand(int) { |
| | | if (int == 1) { |
| | | uni.navigateTo({ |
| | | url: "/pages/changePassword/changePassword" |
| | | url: "/pages/changePassword/changePassword", |
| | | }); |
| | | } else if (int == 2) { |
| | | uni.showModal({ |
| | |
| | | //退出成功!并跳转到其他页面 |
| | | this.$message.success("退出成功"); |
| | | uni.reLaunch({ |
| | | url: "/pages/Login/Login" |
| | | url: "/pages/Login/Login", |
| | | }); |
| | | }); |
| | | } else if (res.cancel) { |
| | | // console.log('用户点击取消'); |
| | | } |
| | | } |
| | | }, |
| | | }); |
| | | } |
| | | }, |
| | | handleSelect(index) { |
| | | if (index === "0") { |
| | | uni.navigateTo({ |
| | | url: "/pages/index/index?id=" + 0 |
| | | url: "/pages/index/index?id=" + 0, |
| | | }); |
| | | } else if (index === "1") { |
| | | uni.navigateTo({ |
| | | url: "/pages/character/index?id=" + 1 |
| | | url: "/pages/character/index?id=" + 1, |
| | | }); |
| | | } else if (index === "2") { |
| | | uni.navigateTo({ |
| | | url: "/pages/inherit/index?id=" + 2 |
| | | url: "/pages/inherit/index?id=" + 2, |
| | | }); |
| | | } else if (index === "3") { |
| | | uni.navigateTo({ |
| | | url: "/pages/academicGenres/index?id=" + 3 |
| | | url: "/pages/academicGenres/index?id=" + 3, |
| | | }); |
| | | } else if (index === "4") { |
| | | uni.navigateTo({ |
| | | url: "/pages/territory/territory?id=" + 4 |
| | | url: "/pages/territory/territory?id=" + 4, |
| | | }); |
| | | } else if (index === "5") { |
| | | uni.navigateTo({ |
| | | url: "/pages/TcmSystem/TcmSystem?id=" + 5 |
| | | url: "/pages/TcmSystem/TcmSystem?id=" + 5, |
| | | }); |
| | | } else if (index === "6") { |
| | | uni.navigateTo({ |
| | | url: "/pages/academicSchools/index", |
| | | }); |
| | | } |
| | | }, |
| | |
| | | if (this.searchInput.trim() !== "") { |
| | | uni.navigateTo({ |
| | | url: |
| | | "/pages/knowledgeBase/knowledgeBase?keyword=" + this.searchInput |
| | | "/pages/knowledgeBase/knowledgeBase?keyword=" + this.searchInput, |
| | | }); |
| | | } |
| | | this.searchInput = ""; |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |