| | |
| | | <template> |
| | | <view> |
| | | <view |
| | | style="width: 100%; height: 100%; display: flex; flex-direction: column" |
| | | > |
| | | <headNav idIndex="1" text="中医人物数据库" /> |
| | | <!-- 高级搜索 --> |
| | | <view style="margin: 0.35rem 0 0.16rem 0"> |
| | |
| | | </li> |
| | | </ul> |
| | | </view> |
| | | <view class="" style="margin-left: 0.2rem">书中最常提到的100位人物</view> |
| | | <view style="margin-left: 0.2rem">书中最常提到的100位人物</view> |
| | | <!-- 关系表地图 --> |
| | | <view id="relation" style="margin-top: 0.2rem; height: 70vh; width: 100%;position: relative;" |
| | | ><div v-if="!loading && relationships.length == 0" style="position: absolute;top: 30%;left: 0;right: 0;text-align: center;font-size: 0.20rem;color: #666;">暂无相关数据</div></view |
| | | <view |
| | | id="relation" |
| | | style="margin-top: 0.2rem; flex: 1; width: 100%; position: relative" |
| | | ><div |
| | | v-if="!loading && relationships.length == 0" |
| | | style=" |
| | | position: absolute; |
| | | top: 30%; |
| | | left: 0; |
| | | right: 0; |
| | | text-align: center; |
| | | font-size: 0.2rem; |
| | | color: #666; |
| | | " |
| | | > |
| | | 暂无相关数据 |
| | | </div></view |
| | | > |
| | | |
| | | <!-- 朝代 --> |
| | | <view |
| | | <!-- <view |
| | | class="flex flex-center" |
| | | style="width: 100%; position: fixed; bottom: 0.33rem; left: 0" |
| | | > |
| | |
| | | </view> |
| | | </li> |
| | | </ul> |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | this.searchKey = options.keyword; |
| | | }, |
| | | methods: { |
| | | getData() { |
| | | getData(key) { |
| | | getFuzzySearch({ |
| | | keyword: this.searchKey ? this.searchKey : "" |
| | | keyword: key ? key : this.searchKey ? this.searchKey : "" |
| | | }).then((res) => { |
| | | this.nodes = []; |
| | | this.relationships = []; |
| | |
| | | // 设置点击事件监听 |
| | | myChart.off("click"); |
| | | myChart.on("click", (params) => { |
| | | console.log(params); |
| | | if (params.dataType === "node") { |
| | | this.spaceTimeArr(params.data.id); |
| | | } |
| | |
| | | }, |
| | | // 基础搜索 |
| | | onSearch(val) { |
| | | this.searchKey = val.text; |
| | | this.getData(); |
| | | // this.searchKey = val.text; |
| | | this.getData(val.text); |
| | | }, |
| | | // 高级搜索 |
| | | onSubmit(val) { |