| | |
| | | dataTable: [], |
| | | option: {}, |
| | | keywords: "", |
| | | submitData: { |
| | | name: "", |
| | | alias: "", |
| | | nativePlace: "", |
| | | tagId: "", |
| | | official: "", |
| | | genderType: "", |
| | | }, |
| | | }; |
| | | }, |
| | | onLoad(options) { |
| | | this.onSearch({ text: options.name }); |
| | | this.keywords = options.name; |
| | | console.log(options.keyword); |
| | | this.onSearch({ text: options.keyword }); |
| | | }, |
| | | mounted() { |
| | | // 修改两次的高度保持一致 |
| | |
| | | box1Height + box1Height / 18 + "px"; |
| | | console.log(box1Height, "box1Height"); |
| | | this.getStatistics(); |
| | | // 默认先调用搜索一次 |
| | | this.onSearch(""); |
| | | }, |
| | | methods: { |
| | | // ExportJsonExcel实例 |
| | |
| | | // 下载按钮 |
| | | async exportClick() { |
| | | const dataList = this.tableData; |
| | | console.log(this.keywords, "keywords"); |
| | | let Obj = { |
| | | keywords: "", //搜索框检索 |
| | | name: "", //姓名 |
| | | alias: "", //别名 |
| | | nativePlace: "", //机关 |
| | | tagId: null, //职业id |
| | | official: null, //职官 |
| | | genderType: null, //性别 |
| | | dynasty: null, //朝代id |
| | | dynastyId: null, //朝代id |
| | | institution: null, //机构 |
| | | keywords: '楊', //搜索框检索 |
| | | // keywords: this.keywords, //搜索框检索 |
| | | name: this.submitData.name, //姓名 |
| | | alias: this.submitData.alias, //别名 |
| | | nativePlace: this.submitData.nativePlace, //机关 |
| | | tagId: this.profession.id !== 0 ? Number(this.profession.id) : null, //职业id |
| | | official: this.submitData.official, //职官 |
| | | genderType: |
| | | this.submitData.genderType !== "" ? this.submitData.genderType : null, //性别 |
| | | dynasty: this.dynasty.id !== "" ? Number(this.dynasty.id) : null, //朝代id |
| | | institution: "", //机构 |
| | | bookId: null, //来源id |
| | | page: 1, |
| | | pageSize: 9999, |
| | | pageSize: 1, |
| | | }; |
| | | console.log(Obj, "Obj"); |
| | | // // 搜索 |
| | | await getPersonList(Obj).then((res) => { |
| | | console.log(res); |
| | | await getPDownload(Obj).then((res) => { |
| | | console.log(res, "exportClick"); |
| | | // if (res.success) { |
| | | // console.log(res, "搜索接口"); |
| | | // this.tableData = res.list; |
| | |
| | | this.dynasty.index = currentDynasty.dynastyId; |
| | | this.dynasty.id = currentDynasty.dynastyId; |
| | | } |
| | | |
| | | this.submitData = val; |
| | | this.CurrentPage = 1; |
| | | let Obj = { |
| | | keywords: "", //搜索框检索 |
| | |
| | | }, |
| | | // 基础搜索 |
| | | async onSearch(val) { |
| | | this.keywords = val.text; |
| | | let Obj = { |
| | | keywords: val.text, //搜索框检索 |
| | | name: "", //姓名 |
| | |
| | | page: this.CurrentPage, |
| | | pageSize: this.pageSize, |
| | | }; |
| | | console.log(Obj,"ObjObjObj"); |
| | | // // 搜索 |
| | | await getPersonList(Obj).then((res) => { |
| | | if (res.success) { |