| | |
| | | <!-- <luanqing-search class="search_bar" @onSearch="onSearch"></luanqing-search> --> |
| | | <advancedSearch |
| | | @onSearch="onSearch" |
| | | placehold="输入姓名/别名/时期/传主职业搜索" |
| | | placehold="输入姓名/别名/朝代/传主职业搜索" |
| | | :isAvancedTrue="false" |
| | | :keyword="keywords" |
| | | /> |
| | |
| | | class="advancedSea" |
| | | @click="isAvancedClick" |
| | | style="color: #244a7b; cursor: pointer" |
| | | >高级搜索 ∨</view |
| | | >高级搜索 {{isAdvancedSearch ? "∧" : "∨"}}</view |
| | | > |
| | | </view> |
| | | <!-- 热门搜索 --> |
| | |
| | | style="padding: 0 20rpx; line-height: 0.3rem; height: 0.3rem" |
| | | @click="handInstitCLick(item, 'a')" |
| | | > |
| | | <view class="">{{ item.tagName }}</view> |
| | | <view class="">{{ item.count }}</view> |
| | | <view >{{ item.tagName }}</view> |
| | | <view >{{ item.count }}</view> |
| | | </li> |
| | | </ul> |
| | | <view v-if="profession.list.length - 1 > 3" class="flex flex-center"> |
| | |
| | | style="padding: 0 20rpx" |
| | | @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="dynasty.list.length - 1 > 3" class="flex flex-center"> |
| | |
| | | style="padding: 0 20rpx; color: #244a7b" |
| | | @click="handInstitCLick(item, 'c')" |
| | | > |
| | | <view class="">{{ index + 1 + ". " + item.source }}</view> |
| | | <view >{{ index + 1 + ". " + item.source }}</view> |
| | | </li> |
| | | </ul> |
| | | <!-- <view class="flex flex-center"> |
| | |
| | | " |
| | | > |
| | | <view class="flex lightTop" style="width: 100%; margin: 0.1rem 0"> |
| | | <view class="" style="color: #2c2c2c">共{{ total }}条</view> |
| | | <view style="color: #2c2c2c">共{{ total }}条</view> |
| | | <el-button size="small" @click="exportClick">下载</el-button> |
| | | </view> |
| | | <el-table :data="tableData" class="lightBo" style="width: 100%"> |
| | | <el-table :data="tableData" class="lightBo" style="width: 100%" empty-text="暂无搜索信息"> |
| | | <el-table-column prop="id" label="序号" width="110"></el-table-column> |
| | | <el-table-column prop="personName" label="姓名"></el-table-column> |
| | | <el-table-column prop="personAlias" label="别名"></el-table-column> |
| | |
| | | label="性别" |
| | | width="70" |
| | | ></el-table-column> |
| | | <el-table-column prop="period" label="时期"></el-table-column> |
| | | <el-table-column prop="period" label="时代"></el-table-column> |
| | | <el-table-column |
| | | prop="birthYear" |
| | | label="生年" |
| | |
| | | }, |
| | | { |
| | | type: "input", |
| | | label: "时期", |
| | | label: "时间", |
| | | name: "dynasty", |
| | | value: "", |
| | | }, |
| | |
| | | activeBox: null, |
| | | // 时期 |
| | | dynasty: { |
| | | title: "时期", |
| | | title: "时代", |
| | | id: "", |
| | | index: "", |
| | | list: [], |
| | |
| | | }; |
| | | }, |
| | | onLoad(options) { |
| | | console.log(options.keyword); |
| | | this.onSearch({ text: options.keyword }); |
| | | }, |
| | | mounted() { |
| | |
| | | // 下载按钮 |
| | | async exportClick() { |
| | | const dataList = this.tableData; |
| | | console.log(this.keywords, "keywords"); |
| | | let Obj = { |
| | | keywords: "", //搜索框检索 |
| | | // keywords: this.keywords, //搜索框检索 |
| | |
| | | page: 1, |
| | | pageSize: 1, |
| | | }; |
| | | console.log(Obj, "Obj"); |
| | | // // 搜索 |
| | | await getPDownload(Obj).then((res) => { |
| | | console.log(res, "exportClick"); |
| | | // if (res.success) { |
| | | // console.log(res, "搜索接口"); |
| | | // this.tableData = res.list; |
| | | // // 总数量 |
| | | // this.total = res.npage.totalCount; |
| | |
| | | async getStatistics() { |
| | | // 热门搜索 |
| | | await getHotSearch().then((res) => { |
| | | console.log(res, "热门搜索"); |
| | | this.hot = Object.keys(res.object).map((key) => { |
| | | return { |
| | | id: parseInt(key), |
| | |
| | | }); |
| | | // 右侧职业、时期、来源的数据 |
| | | await getPDataStatistics().then((res) => { |
| | | console.log(res, "接口成功sdsdfsdsfs"); |
| | | let totalCount1 = res.object.occupationStatistic.details.reduce( |
| | | (total, item) => total + item.count, |
| | | 0 |
| | |
| | | // 热门搜索 |
| | | hotSearchClick(item) { |
| | | this.onSearch({ text: item.name }); |
| | | console.log(item, "热门搜索"); |
| | | }, |
| | | // 左侧的机构统计等等按钮 |
| | | handInstitCLick(item, name) { |
| | |
| | | this.dynasty.index = item.dynastyId; |
| | | this.dynasty.id = item.dynastyId; |
| | | this.CurrentPage = 1; |
| | | console.log(item); |
| | | } else if (name == "c") { |
| | | this.source.index = item.bookId; |
| | | this.source.id = item.bookId; |
| | | this.CurrentPage = 1; |
| | | console.log("来源"); |
| | | } |
| | | this.onSearch(""); |
| | | |
| | | console.log(item, name); |
| | | }, |
| | | isAvancedClick() { |
| | | this.isAdvancedSearch = !this.isAdvancedSearch; |
| | |
| | | }, |
| | | // 高级搜索 |
| | | async onSubmit(val) { |
| | | console.log(val); |
| | | this.profession.index = Number(val.tagId); |
| | | this.profession.id = Number(val.tagId); |
| | | const currentDynasty = this.dynasty.list.find( |
| | |
| | | }; |
| | | // // 搜索 |
| | | await getPersonList(Obj).then((res) => { |
| | | console.log(res); |
| | | if (res.success) { |
| | | console.log(res, "搜索接口"); |
| | | this.tableData = res.list; |
| | | // 总数量 |
| | | this.total = res.npage.totalCount; |
| | | } |
| | | }); |
| | | console.log(val); |
| | | }, |
| | | // 基础搜索 |
| | | async onSearch(val) { |
| | |
| | | page: this.CurrentPage, |
| | | pageSize: this.pageSize, |
| | | }; |
| | | console.log(Obj, "ObjObjObj"); |
| | | // // 搜索 |
| | | await getPersonList(Obj).then((res) => { |
| | | if (res.success) { |
| | | console.log(res, "搜索接口"); |
| | | this.tableData = res.list; |
| | | // 总数量 |
| | | this.total = res.npage.totalCount; |
| | | } |
| | | }); |
| | | // console.log(val, '士大夫但是'); |
| | | }, |
| | | // 热门搜索 |
| | | HotClick(id) { |
| | | this.hot.forEach((item) => { |
| | | if (item.id === id) { |
| | | console.log(item.id === id); |
| | | item.bgColor = true; |
| | | } else { |
| | | console.log(item.id === id); |
| | | item.bgColor = false; |
| | | } |
| | | }); |
| | | }, |
| | | // 展开收缩 |
| | | shrinkClick(box, name) { |
| | | console.log(box); |
| | | console.log(this.dynasty.list); |
| | | |
| | | // this.activeBox = this.activeBox === 'a' ? null : 'a'; |
| | | if (name == "职业") { |
| | | console.log("职业"); |
| | | this.professionIndex = |
| | | this.professionIndex < this.profession.list.length |
| | | ? this.profession.list.length |
| | |
| | | this.dynastyIndex = 4; |
| | | this.activeBox = this.activeBox === "a" ? null : "a"; |
| | | } else { |
| | | console.log("时期"); |
| | | this.dynastyIndex = |
| | | this.dynastyIndex < this.dynasty.list.length |
| | | ? this.dynasty.list.length |
| | |
| | | CurrentChange(val) { |
| | | if (this.CurrentPage != val) { |
| | | this.CurrentPage = val; |
| | | console.log("当前页", val); |
| | | this.onSearch(""); |
| | | } |
| | | }, |
| | |
| | | PrevClick(val) { |
| | | if (this.CurrentPage != val) { |
| | | this.CurrentPage = val; |
| | | // console.log('上一页', val); |
| | | // console.log(this.CurrentPage); |
| | | this.onSearch(""); |
| | | } |
| | | }, |
| | | // 下一页 |
| | | NextClick(val) { |
| | | if (this.CurrentPage != val) { |
| | | // console.log('下一页',val); |
| | | this.CurrentPage = val; |
| | | // console.log(this.CurrentPage); |
| | | this.onSearch(""); |
| | | } |
| | | }, |