diff --git a/src/components/RichTextOne.vue b/src/components/RichTextOne.vue index f374d69..2c49225 100644 --- a/src/components/RichTextOne.vue +++ b/src/components/RichTextOne.vue @@ -33,7 +33,7 @@ export default { computed: {}, watch: { initialText (val) { - console.log(val) + // console.log(val) phoneEditor.$txt.html(_this.initialText) } } diff --git a/src/views/InformationQuery.vue b/src/views/InformationQuery.vue index f165ff9..7c094af 100644 --- a/src/views/InformationQuery.vue +++ b/src/views/InformationQuery.vue @@ -8,9 +8,9 @@ type="text" placeholder="请输入组织名称" v-model.trim="searchVal" - @keyup.enter="getSearch()" + @keyup.enter="globalSearch()" /> - +
@@ -35,14 +35,14 @@
-
+
@@ -150,11 +150,12 @@ export default { pageSize: 1, currentPage: 1, totalCount: 1, + status: '' }; }, computed: {}, watch: { - record(newVal, oldVal) { } + // record(newVal, oldVal) { } }, methods: { /** 筛选函数 */ @@ -177,14 +178,13 @@ export default { } }, /** 删除单条数据 */ - del(index) { - let delArr = this.record.splice(index, 1) - }, + // del(index) { + // let delArr = this.record.splice(index, 1) + // }, /** 调用搜索函数 */ - searchRecord(str) { - this.getSearch(str) - }, - + // searchRecord(str) { + // this.getSearch(str) + // }, /** 名单切换 */ btn(index) { let s = this.sub; @@ -193,17 +193,17 @@ export default { this.currentPage = 1; switch (this.sub) { case 0: - this.getData(this.type_value, this.years[this.year_value], this.year_status); + this.getData(this.type_value, this.years[this.year_value], this.year_status,this.status = ''); break; - case 1: this.getData(this.type_value, this.years[this.year_value], this.year_status, 0); + case 1: this.getData(this.type_value, this.years[this.year_value], this.year_status, this.status = 0); break; case 2: - this.getData(this.type_value, this.years[this.year_value], this.year_status, 1); + this.getData(this.type_value, this.years[this.year_value], this.year_status, this.status = 1); break; } }, /** 获取后台数据 */ - getData(type = this.type_value, year = this.years[this.year_value], yearStatus = this.year_status, status = '', page = this.currentPage) { + getData(type = this.type_value, year = this.years[this.year_value], yearStatus = this.year_status, status = this.status, page = this.currentPage) { if (type == "组织类型") { type = '' // this.type_value = '' @@ -219,7 +219,6 @@ export default { // this.year_status = '' } let _this = this - console.log(type); this.$http({ method: 'post', @@ -284,33 +283,73 @@ export default { console.log(err) }) }, - /** 搜索函数 */ - getSearch(str) { + /** 本页搜索函数 */ + getSearchThisPage() { this.searchValue = []; - if (this.searchVal === "" && str !== "" && str !== undefined && str !== null && str !== 'null') { - this.searchVal = str - } else if (this.searchVal === "") { + // if (this.searchVal === "" && str !== "" && str !== undefined && str !== null && str !== 'null') { + // this.searchVal = str + // } else if (this.searchVal === "") { + // this.$message.warning("请输入搜索内容"); + // return; + // } + + if (this.searchVal == "") { this.$message.warning("请输入搜索内容"); return; } let searchData = this.$tool.setSearch(this.bgData, this.searchVal) + console.log(searchData, this.bgData, this.searchVal); + return false; - if (searchData != undefined && searchData != '') { + + if (searchData) { this.searchValue = searchData this.searchVal = ""; } else { this.$message('您搜索的内容暂无~') } }, + /** 全局搜索 */ + globalSearch(name = this.searchVal, page = this.currentPage) { + this.$http({ + method: 'post', + url: 'v1/society/society', + data: { + name: name, + page: page + } + }).then(res => { + if (res.data.data.code !== 200) { + return; + } + if (res.data.data.data.info.length == 0) { + alert('您所查询的数据暂时没有!') + return; + } else { + this.searchValue = res.data.data.data.info + this.totalCount = res.data.data.data.allPage + // console.log(res); + } + this.page++ + }) + // eslint-disable-next-line handle-callback-err + .catch(err => { + console.log(err) + }) + }, handleSizeChange(val) { this.pageSize = val; this.getPackData(); }, handleCurrentChange(val) { this.currentPage = val; - this.getData() + if (this.searchValue.length > 0) { + this.globalSearch() + } else { + this.getData() + } this.getPackData(); }, getPackData() { } diff --git a/src/views/personal/Declare.vue b/src/views/personal/Declare.vue index 37713a9..46ce900 100644 --- a/src/views/personal/Declare.vue +++ b/src/views/personal/Declare.vue @@ -6,12 +6,20 @@
- {{bgValue.announcement.name + bgValue.announcement.pro_content}} - + {{ + bgValue.announcement.name + bgValue.announcement.pro_content + }} +
暂无项目申报内容 - +
@@ -21,25 +29,25 @@
初筛通过 - {{bgValue.overview_one}} + {{ bgValue.overview_one }}
立项通过 - {{bgValue.overview_two}} + {{ bgValue.overview_two }}
执行中 - {{bgValue.overview_three}} + {{ bgValue.overview_three }}
已完结 - {{bgValue.overview_four}} + {{ bgValue.overview_four }}
@@ -58,22 +66,37 @@ @change="bolting()" >
-