Merge branch 'master' of http://182.92.203.7:2001/r/TCM_CharacterLibrary
| | |
| | | }); |
| | | }; |
| | | |
| | | export const getInstitutionList = () => { |
| | | return req1({ |
| | | url: "/medical/institutionList", |
| | | method: "post" |
| | | }); |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | 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" |
| | |
| | | 热门搜索: |
| | | <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 }} |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | hotAciveIndex: "", |
| | | // 机构统计 |
| | | institution: { |
| | | title: "机构统计", |
| | |
| | | }); |
| | | }, |
| | | // 右侧的list数据 |
| | | getMList(key) { |
| | | getMList(key, index) { |
| | | if (index !== undefined) { |
| | | this.SearchValue = ""; |
| | | this.hotAciveIndex = index; |
| | | } else { |
| | | this.hotAciveIndex = ""; |
| | | } |
| | | this.pageLoading = true; |
| | | let Obj = { |
| | | medicalSearchType: this.searchType, |
| | |
| | | this.getMList(); |
| | | }, |
| | | // 热门搜索 |
| | | HotClick(val) { |
| | | HotClick(val, index) { |
| | | // this.SearchValue = val; |
| | | this.getMList(val); |
| | | this.getMList(val, index); |
| | | }, |
| | | // 按照什么排序 |
| | | selectChange(e) { |
| | |
| | | top: -0.25rem; |
| | | color: #2c2c2c; |
| | | font-weight: bold; |
| | | span{ |
| | | span { |
| | | font-weight: initial; |
| | | } |
| | | } |
| | |
| | | .nullBox { |
| | | width: 100%; |
| | | } |
| | | |
| | | .cursor.active { |
| | | color: #027edc !important; |
| | | font-weight: bold; |
| | | } |
| | | </style> |
| | |
| | | { |
| | | name: "所处时期", |
| | | value: obj.dynastyDesc || "-", |
| | | valueClick: () => { |
| | | uni.navigateTo({ |
| | | url: "/pages/knowledgeBase/knowledgeBase?dynasty=" + obj.dynastyId |
| | | }); |
| | | } |
| | | }, |
| | | { |
| | | name: "民族", |
| | |
| | | { |
| | | name: "职官", |
| | | value: obj.official || "-", |
| | | valueClick: () => { |
| | | uni.navigateTo({ |
| | | url: "/pages/knowledgeBase/knowledgeBase?isAdvancedSearch=1&official=" + obj.official |
| | | }); |
| | | } |
| | | }, |
| | | { |
| | | name: "流派", |
| | |
| | | <li |
| | | @click="onSearch({ text: item }, index)" |
| | | :class="{ cursor: true, active: hotAciveIndex === index }" |
| | | hotAciveIndex |
| | | v-for="(item, index) in hotKeyList" |
| | | :key="item" |
| | | > |
| | |
| | | } |
| | | } |
| | | |
| | | /* .Bbottom { |
| | | display: flex; |
| | | justify-content: center; |
| | | |
| | | } */ |
| | | ::v-deep .cleanupBtn{ |
| | | right: 52px !important; |
| | | } |
| | | </style> |
| | |
| | | |
| | | <div class="filterBox font-family"> |
| | | <div class="searchBox"> |
| | | <input type="text" v-model="keyword" placeholder="请输入关键字" /> |
| | | <input |
| | | type="text" |
| | | v-model="keyword" |
| | | @confirm="search" |
| | | placeholder="请输入关键字" |
| | | style="padding-right: 54px; box-sizing: border-box" |
| | | /> |
| | | <span |
| | | class="cleanupBtn" |
| | | v-if="keyword" |
| | | @click="keyword = ''" |
| | | style=" |
| | | position: absolute; |
| | | top: 50%; |
| | | margin-top: -10px; |
| | | right: 84px; |
| | | 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 |
| | | > |
| | | <button @click="search">搜索</button> |
| | | </div> |
| | | <div class="dynasty"> |
| | |
| | | align-items: center; |
| | | margin: 0 auto; |
| | | margin-top: 0.2rem; |
| | | position: relative; |
| | | } |
| | | |
| | | .searchBox > input { |
| | |
| | | identifier: this.idIndex, |
| | | socialFlag: true |
| | | }).then((res) => { |
| | | let data = res.object; |
| | | this.dataList = res.object; |
| | | // 处理节点颜色 |
| | | this.links = []; |
| | | for (let i = 0; i < data.edgeList.length; i++) { |
| | | const linkItem = data.edgeList[i]; |
| | | const index = data.nodeList.findIndex( |
| | | (item) => |
| | | item.identifier == |
| | | (linkItem.endId == this.idIndex |
| | | ? linkItem.startId |
| | | : linkItem.endId) |
| | | ); |
| | | if (linkItem.relationType == "亲属关系") { |
| | | data.nodeList[index].linkType = 1; |
| | | data.nodeList[index].color = "#F8E2D7"; |
| | | data.nodeList[index].borderColor = "#F3AA78"; |
| | | } |
| | | if (linkItem.relationType == "社会关系") { |
| | | data.nodeList[index].linkType = 2; |
| | | data.nodeList[index].color = "#ecf4fe"; |
| | | data.nodeList[index].borderColor = "#597aa5"; |
| | | } |
| | | this.links.push({ |
| | | source: data.nodeList.find( |
| | | (item) => item.identifier == linkItem.startId |
| | | ).name, |
| | | target: data.nodeList.find( |
| | | (item) => item.identifier == linkItem.endId |
| | | ).name, |
| | | relationType: linkItem.relationType, |
| | | label: { |
| | | show: true, |
| | | formatter: function (params) { |
| | | // 使用函数动态生成标签内容 |
| | | // return relationships.find(rel => rel.source === nodes[params.data |
| | | // .source] && rel.target === nodes[params.data.target]) |
| | | // .relation; |
| | | return linkItem.relation; |
| | | }, // 设置关系标签内容为"Child-Parent" |
| | | color: "#2C2C2C", |
| | | fontSize: 16, |
| | | backgroundColor: "rgba(255, 255, 255, 1)", |
| | | padding: [3, 8], |
| | | borderRadius: 30, |
| | | position: "middle", // 设置标签文本在线的中间位置上居中显示 |
| | | // z: -1, // 设置标签的z轴高度,使其比连接线更高 |
| | | distance: -10 // 将标签放置在连接线上 |
| | | } |
| | | }); |
| | | } |
| | | this.dataList = []; |
| | | this.dataList = data.nodeList.map((item) => { |
| | | return { |
| | | ...item, |
| | | itemStyle: { |
| | | color: item.identifier == this.idIndex ? "#F8E2D7" : item.color, |
| | | borderColor: |
| | | item.identifier == this.idIndex ? "#F3AA78" : item.borderColor, |
| | | borderWidth: "3" |
| | | } |
| | | }; |
| | | }); |
| | | this.initBarChart(this.dataList, this.links); |
| | | // this.links = []; |
| | | // for (let i = 0; i < data.edgeList.length; i++) { |
| | | // const linkItem = data.edgeList[i]; |
| | | // const index = data.nodeList.findIndex( |
| | | // (item) => |
| | | // item.identifier == |
| | | // (linkItem.endId == this.idIndex |
| | | // ? linkItem.startId |
| | | // : linkItem.endId) |
| | | // ); |
| | | // if (linkItem.relationType == "亲属关系") { |
| | | // data.nodeList[index].linkType = 1; |
| | | // data.nodeList[index].color = "#F8E2D7"; |
| | | // data.nodeList[index].borderColor = "#F3AA78"; |
| | | // } |
| | | // if (linkItem.relationType == "社会关系") { |
| | | // data.nodeList[index].linkType = 2; |
| | | // data.nodeList[index].color = "#ecf4fe"; |
| | | // data.nodeList[index].borderColor = "#597aa5"; |
| | | // } |
| | | // this.links.push({ |
| | | // source: data.nodeList.find( |
| | | // (item) => item.identifier == linkItem.startId |
| | | // ).name, |
| | | // target: data.nodeList.find( |
| | | // (item) => item.identifier == linkItem.endId |
| | | // ).name, |
| | | // relationType: linkItem.relationType, |
| | | // label: { |
| | | // show: true, |
| | | // formatter: function (params) { |
| | | // // 使用函数动态生成标签内容 |
| | | // // return relationships.find(rel => rel.source === nodes[params.data |
| | | // // .source] && rel.target === nodes[params.data.target]) |
| | | // // .relation; |
| | | // return linkItem.relation; |
| | | // }, // 设置关系标签内容为"Child-Parent" |
| | | // color: "#2C2C2C", |
| | | // fontSize: 16, |
| | | // backgroundColor: "rgba(255, 255, 255, 1)", |
| | | // padding: [3, 8], |
| | | // borderRadius: 30, |
| | | // position: "middle", // 设置标签文本在线的中间位置上居中显示 |
| | | // // z: -1, // 设置标签的z轴高度,使其比连接线更高 |
| | | // distance: -10 // 将标签放置在连接线上 |
| | | // } |
| | | // }); |
| | | // } |
| | | // this.dataList = data.nodeList.map((item) => { |
| | | // return { |
| | | // ...item, |
| | | // itemStyle: { |
| | | // color: item.identifier == this.idIndex ? "#F8E2D7" : item.color, |
| | | // borderColor: |
| | | // item.identifier == this.idIndex ? "#F3AA78" : item.borderColor, |
| | | // borderWidth: "3" |
| | | // } |
| | | // }; |
| | | // }); |
| | | setTimeout(() => { |
| | | this.initBarChart(); |
| | | }, 50); |
| | | |
| | | }); |
| | | |
| | | // 世医文化 |
| | |
| | | }, 50); |
| | | } |
| | | }, |
| | | initBarChart(dataList, links) { |
| | | initBarChart() { |
| | | // WMBg |
| | | //通过 $ref 进行挂载 |
| | | var barChart = document.getElementById("barChart"); |
| | |
| | | animationEasingUpdate: "quinticInOut", |
| | | series: [ |
| | | { |
| | | type: "graph", |
| | | layout: "force", |
| | | type: "tree", |
| | | symbolSize: SymbolSize + 20, |
| | | //是否允许用户拖动图片 |
| | | roam: true, |
| | |
| | | }, |
| | | edgeSymbol: ["circle", "arrow"], |
| | | edgeSymbolSize: [4, 10], |
| | | data: dataList, |
| | | links: links, |
| | | data: [this.dataList], |
| | | lineStyle: { |
| | | opacity: 0.9, |
| | | width: 2, |
| | | curveness: 0.3 |
| | | }, |
| | | emphasis: { |
| | | focus: "adjacency", |
| | | lineStyle: { |
| | | width: 10 |
| | | } |
| | | }, |
| | | force: { |
| | | initLayout: null, |
| | | // gravity: 0 |
| | | repulsion: 600, |
| | | edgeLength: 400 |
| | | } |
| | | }, |
| | | expandAndCollapse: false, |
| | | } |
| | | ] |
| | | }; |
| | |
| | | 热门搜索: |
| | | <ul class="flex" style="margin-right: 10rpx"> |
| | | <li |
| | | v-for="item in hot" |
| | | @click="hotSearchClick(item)" |
| | | v-for="(item, index) in hot" |
| | | @click="hotSearchClick(item, index)" |
| | | :key="item.id" |
| | | class="cursor" |
| | | style="color: #5879a4" |
| | | :class="{ cursor: true, active: hotAciveIndex === index }" |
| | | style="color: #244a7b" |
| | | > |
| | | {{ item.name }} |
| | | </li> |
| | |
| | | <el-table-column prop="id" label="序号" width="110"></el-table-column> |
| | | <el-table-column prop="personName" label="姓名"> |
| | | <template slot-scope="scope"> |
| | | <a style="cursor: pointer;color: #027EDC;" @click="gotoDetail(scope.row.id)">{{ scope.row.personName }}</a> |
| | | <a |
| | | style="cursor: pointer; color: #027edc" |
| | | @click="gotoDetail(scope.row.id)" |
| | | >{{ scope.row.personName }}</a |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="personAlias" label="别名"></el-table-column> |
| | |
| | | getPDownload, |
| | | getPList, |
| | | getHotSearch, |
| | | getPersonList |
| | | getPersonList, |
| | | getInstitutionList |
| | | } from "@/api/index.js"; |
| | | export default { |
| | | components: { |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | hotAciveIndex: "", |
| | | // 高级搜索显示 |
| | | isAdvancedSearch: false, |
| | | // 高级搜索 |
| | |
| | | value: "" |
| | | }, |
| | | { |
| | | type: "input", |
| | | type: "select", |
| | | label: "机构", |
| | | name: "institution", |
| | | value: "" |
| | | options: [] |
| | | } |
| | | ] |
| | | }, |
| | |
| | | }; |
| | | }, |
| | | onLoad(options) { |
| | | this.onSearch({ text: options.keyword }); |
| | | if (options.isAdvancedSearch && options.isAdvancedSearch == "1") { |
| | | this.isAdvancedSearch = true; |
| | | } |
| | | if (options.official) { |
| | | if (options.official) { |
| | | this.from.from[ |
| | | this.from.from.findIndex((item) => item.name == "official") |
| | | ].value = options.official; |
| | | } |
| | | |
| | | const result = this.from.from.reduce((obj, item) => { |
| | | obj[item.name] = item.value; |
| | | return obj; |
| | | }, {}); |
| | | // 提交逻辑 |
| | | this.onSubmit(result); |
| | | } else { |
| | | if (options.dynasty) { |
| | | this.dynasty.index = Number(options.dynasty); |
| | | this.dynasty.id = Number(options.dynasty); |
| | | } |
| | | this.onSearch({ text: options.keyword }); |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getStatistics(); |
| | | this.institutionList(); |
| | | }, |
| | | methods: { |
| | | institutionList() { |
| | | getInstitutionList().then((res) => { |
| | | this.$set( |
| | | this.from.from[ |
| | | this.from.from.findIndex((item) => item.name == "institution") |
| | | ], |
| | | "options", |
| | | res.list.map((item) => { |
| | | return { |
| | | label: item.name, |
| | | value: item.id |
| | | }; |
| | | }) |
| | | ); |
| | | |
| | | console.log(this.from.from); |
| | | }); |
| | | }, |
| | | //重置搜索结果 |
| | | resetForm() { |
| | | this.onSearch(""); |
| | |
| | | }); |
| | | }, |
| | | // 热门搜索 |
| | | hotSearchClick(item) { |
| | | this.onSearch({ text: item.name }); |
| | | hotSearchClick(item, index) { |
| | | this.onSearch({ text: item.name }, index); |
| | | }, |
| | | // 左侧的机构统计等等按钮 |
| | | handInstitCLick(item, name) { |
| | |
| | | }); |
| | | }, |
| | | // 基础搜索 |
| | | async onSearch(val) { |
| | | async onSearch(val, index) { |
| | | this.keywords = val.text; |
| | | if (index !== undefined) { |
| | | this.keywords = ""; |
| | | this.hotAciveIndex = index; |
| | | } else { |
| | | this.hotAciveIndex = ""; |
| | | } |
| | | let Obj = { |
| | | keywords: val.text, //搜索框检索 |
| | | name: "", //姓名 |
| | |
| | | li { |
| | | font-size: 0.12rem; |
| | | margin: 0 0.1rem; |
| | | &.active { |
| | | color: #027edc !important; |
| | | font-weight: bold; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | opacity: 0; |
| | | } |
| | | } */ |
| | | |
| | | ::v-deep .cleanupBtn{ |
| | | right: 60px !important; |
| | | } |
| | | |
| | | ::v-deep .widget_input{ |
| | | min-width: 240px !important; |
| | | } |
| | | </style> |
| | |
| | | <view v-for="(subItem, subIndex) in item.list" :key="subIndex"> |
| | | <view class="param-item"> |
| | | <label>{{ subItem.name }}</label> |
| | | <text class="font-family" :title="subItem.value">{{ subItem.value }}</text> |
| | | <text v-if="subItem.valueClick" class="font-family" style="color: #027edc;cursor: pointer;" :title="subItem.value" @click="subItem.valueClick">{{ subItem.value }}</text> |
| | | <text v-else class="font-family" :title="subItem.value">{{ subItem.value }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <template> |
| | | <view class="widget_style"> |
| | | <view class="ffff" style="display: flex; height: 100%"> |
| | | <view class="ffff" style="display: flex; height: 100%; position: relative"> |
| | | <input |
| | | placeholder-class="widget_input_placehold" |
| | | @confirm="onClickSearch" |
| | | v-model="content" |
| | | class="widget_input" |
| | | :style="style1" |
| | | style="min-width: 4rem; padding-right: 54px;box-sizing: border-box;" |
| | | :placeholder="placehold" |
| | | /> |
| | | <span |
| | | class="cleanupBtn" |
| | | v-if="content" |
| | | @click="content = ''" |
| | | style=" |
| | | position: absolute; |
| | | top: 50%; |
| | | margin-top: -10px; |
| | | right: 84px; |
| | | 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 class="widget_button" v-if="isSearchTrue" @click="onClickSearch">{{ |
| | | buttonText |
| | | }}</view> |
| | |
| | | data() { |
| | | return { |
| | | content: "", |
| | | style1: "", |
| | | style2: "" |
| | | }; |
| | | }, |
| | |
| | | }, |
| | | created() { |
| | | // 编织设置动态宽度 |
| | | // this.style1 = 'min-width:calc('+this.width+'vw);'; |
| | | // this.style2 = 'min-width:calc('+(this.width / 5)+'vw);'; |
| | | this.style1 = "width:4.5rem"; |
| | | this.style2 = "width:.5rem"; |
| | | this.content = this.keyword || ""; |
| | | }, |
| | |
| | | this.$emit("onSearch", { text: this.content }); |
| | | } |
| | | }, |
| | | watch: { |
| | | keyword(value) { |
| | | this.content = value |
| | | } |
| | | } |
| | | watch: { |
| | | keyword(value) { |
| | | this.content = value; |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | |
| | | @focus="focus" |
| | | @blur="blur" |
| | | /> |
| | | <text v-if="isDelShow" class="icon icon-del" @click="clear" |
| | | ></text |
| | | <span |
| | | class="cleanupBtn" |
| | | v-if="inputVal" |
| | | @click="inputVal = ''" |
| | | style=" |
| | | position: absolute; |
| | | top: 50%; |
| | | margin-top: -10px; |
| | | right: 10px; |
| | | 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> |
| | | <view |
| | |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | |
| | | &.center { |
| | | justify-content: center; |