diff --git a/src/views/InformationQuery.vue b/src/views/InformationQuery.vue index 5c751f5..31c390f 100644 --- a/src/views/InformationQuery.vue +++ b/src/views/InformationQuery.vue @@ -14,23 +14,22 @@
- @@ -108,6 +107,7 @@ import HeaderNav from "../components/HeaderNav"; /* eslint-disable */ import FooterNav from "../components/FooterNav"; + export default { components: { HeaderNav, @@ -128,8 +128,8 @@ export default { types: [], years: '', year_status: '全部', - type_value:'全部', - year_value:'全部', + type_value: '全部', + year_value: '全部', bgData: [], arr1: [], arr0: [], @@ -141,6 +141,24 @@ export default { record(newVal, oldVal) { } }, methods: { + /** 筛选函数 */ + scree() { + if (this.sub == 0) { + this.sub = '' + } else if (this.sub == 1) { + this.sub = 0 + } else { + this.sub = 1 + } + this.getData(this.type_value, this.years[this.year_value], this.year_status, this.sub); + if (this.sub == '') { + this.sub = 0 + } else if (this.sub == 0) { + this.sub = 1 + } else { + this.sub = 2 + } + }, /** 删除单条数据 */ del(index) { let delArr = this.record.splice(index, 1) @@ -150,26 +168,6 @@ export default { this.getSearch(str) }, - /** 搜索函数 */ - getSearch(str) { - this.searchValue = []; - - if (this.searchVal === "" && str !== "" && str !== undefined && str !== null && str !== 'null') { - this.searchVal = str - } else if (this.searchVal === "") { - this.$message.warning("请输入搜索内容"); - return; - } - - let searchData = this.$tool.setSearch(this.bgData, this.searchVal) - - if (searchData != undefined && searchData != '') { - this.searchValue = searchData - this.searchVal = ""; - } else { - this.$message('您搜索的内容暂无~') - } - }, /** 名单切换 */ btn(index) { let s = this.sub; @@ -178,22 +176,38 @@ export default { switch (this.sub) { case 0: - this.getData; + this.getData(this.type_value, this.years[this.year_value], this.year_status); break; - case 1: this.getDataZ; + case 1: this.getData(this.type_value, this.years[this.year_value], this.year_status, 0); break; case 2: - this.getDataO; + this.getData(this.type_value, this.years[this.year_value], this.year_status, 1); break; } }, /** 获取后台数据 */ - getData() { + getData(type = '', year = '', yearStatus = '', status = '') { + if (type == "全部") { + type = '' + } + + if (year == '全部') { + year = '' + } + + if (yearStatus == '全部') { + yearStatus = '' + } let _this = this this.$http({ method: 'post', url: 'v1/society/society', - data: {} + data: { + type: type, + year: year, + yearStatus: yearStatus, + status: status + } }).then(res => { if (res.data.data.code !== 200) { return; @@ -206,6 +220,18 @@ export default { .catch(err => { console.log(err) }) + + if (this.type_value === '') { + this.type_value = '全部' + } + + if (this.years[this.year_value] === '') { + this.year_value = '全部' + } + + if (this.year_status === '') { + this.year_status = '全部' + } }, /** 获取类型 */ getDataG() { @@ -226,52 +252,26 @@ export default { console.log(err) }) }, - /** 获取异常名单 */ - getDataZ() { - let _this = this - this.$http({ - method: 'post', - url: 'v1/society/society', - data: { - status: 0 - } - }).then(res => { - if (res.data.data.code !== 200) { - alert('数据请求失败!') - return - } - _this.bgData = res.data.data.data.info - _this.conversion = _this.bgData - }) - // eslint-disable-next-line handle-callback-err - .catch(err => { - console.log(err) - }) + /** 搜索函数 */ + getSearch(str) { + this.searchValue = []; + + if (this.searchVal === "" && str !== "" && str !== undefined && str !== null && str !== 'null') { + this.searchVal = str + } else if (this.searchVal === "") { + this.$message.warning("请输入搜索内容"); + return; + } + + let searchData = this.$tool.setSearch(this.bgData, this.searchVal) + + if (searchData != undefined && searchData != '') { + this.searchValue = searchData + this.searchVal = ""; + } else { + this.$message('您搜索的内容暂无~') + } }, - /** 获取正常名单 */ - getDataO() { - let _this = this - this.$http({ - method: 'post', - url: 'v1/society/society', - data: { - status: 1 - } - }).then(res => { - if (res.data.data.code !== 200) { - return; - } - _this.bgData = res.data.data.data.info - _this.conversion = _this.bgData - }) - // eslint-disable-next-line handle-callback-err - .catch(err => { - console.log(err) - }) - }, - scree() { - console.log(this.type_value,this.year_value,this.year_status) - } }, created() { this.getData() diff --git a/src/views/home/NewsList.vue b/src/views/home/NewsList.vue index 1519e9e..c0decc4 100644 --- a/src/views/home/NewsList.vue +++ b/src/views/home/NewsList.vue @@ -31,7 +31,6 @@ :total="totalCount" >
- @@ -102,6 +101,7 @@ export default { this.handleCurrentChange(this.currentPage); }, + mounted() { }, beforeUpdate() { localStorage.setItem('pagination', this.currentPage) localStorage.setItem('getType', this.getType) @@ -111,7 +111,6 @@ export default { localStorage.setItem('pagination', this.currentPage) localStorage.setItem('getType', this.getType) }, - mounted() { }, destroyed() { localStorage.setItem('pagination', this.currentPage) localStorage.setItem('getType', this.getType) @@ -242,7 +241,6 @@ export default { color: #666; } } - } } diff --git a/src/views/personal/Apply.vue b/src/views/personal/Apply.vue index 21a55b4..556bd46 100644 --- a/src/views/personal/Apply.vue +++ b/src/views/personal/Apply.vue @@ -17,7 +17,7 @@
-
@@ -29,7 +29,7 @@ class="input0" type="text" :disabled="bgData.examine === 0" - :value="bgData.flow_party_person" + v-model="bgData.flow_party_person" /> @@ -40,7 +40,7 @@ class="input0" type="text" :disabled="bgData.examine === 0" - :value="bgData.party_person" + v-model="bgData.party_person" /> @@ -51,7 +51,7 @@ class="input0" type="text" :disabled="bgData.examine === 0" - :value="bgData.work_person" + v-model="bgData.work_person" /> @@ -62,7 +62,7 @@ class="input0" type="text" :disabled="bgData.examine === 0" - :value="bgData.party_name" + v-model="bgData.party_name" /> @@ -70,23 +70,20 @@
@@ -94,23 +91,21 @@
@@ -121,7 +116,7 @@ class="input2" type="text" :disabled="bgData.examine === 0" - :value="bgData.reg_manage" + v-model="bgData.reg_manage" /> @@ -132,7 +127,7 @@ class="input2" type="text" :disabled="bgData.examine === 0" - :value="bgData.supervisor" + v-model="bgData.supervisor" /> @@ -143,7 +138,7 @@ class="input2" type="text" :disabled="bgData.examine === 0" - :value="bgData.party_pname" + v-model="bgData.party_pname" /> @@ -159,7 +154,7 @@ class="input0" type="text" :disabled="bgData.examine === 0" - :value="bgData.sec_name" + v-model="bgData.sec_name" /> @@ -167,23 +162,21 @@
@@ -194,7 +187,7 @@ class="input0" type="text" :disabled="bgData.examine === 0" - :value="bgData.sec_age" + v-model="bgData.sec_age" /> @@ -205,7 +198,7 @@ class="input0" type="text" :disabled="bgData.examine === 0" - :value="bgData.sec_job" + v-model="bgData.sec_job" /> @@ -216,7 +209,7 @@ class="input0" type="text" :disabled="bgData.examine === 0" - :value="bgData.sec_study" + v-model="bgData.sec_study" /> @@ -230,7 +223,7 @@ class="input0" type="text" :disabled="bgData.examine === 0" - :value="bgData.near_party_person" + v-model="bgData.near_party_person" /> @@ -238,23 +231,21 @@
@@ -265,7 +256,7 @@ class="input0" type="text" :disabled="bgData.examine === 0" - :value="bgData.major_party_person" + v-model="bgData.major_party_person" /> @@ -273,28 +264,21 @@
@@ -305,7 +289,7 @@ class="input0" type="text" :disabled="bgData.examine === 0" - :value="bgData.year_money" + v-model="bgData.year_money" /> @@ -316,12 +300,13 @@ class="input0" type="text" :disabled="bgData.examine === 0" - :value="bgData.active_year" + v-model="bgData.active_year" /> -
+
+
@@ -357,7 +342,8 @@ export default { num: 1050, bgData: [], is_value: Boolean, - name: '' + name: '', + typeVal: [] } }, computed: {}, @@ -368,7 +354,38 @@ export default { }, methods: { submit () { + for (var key of Object.keys(this.bgData)) { + if (this.bgData[key] === '') { + alert('以上所有内容都不可为空呦!') + return + } + } + let _this = this + for (var list in _this.typeVal) { + if (_this.typeVal[list] === _this.bgData.type) { + _this.bgData.type = list + } + } + + this.$http({ + method: 'post', + url: 'v1/user/resubmit', + data: { + object: _this.bgData + } + }).then(res => { + if (res.data.code === 200) { + alert(res.data.message) + _this.$router.go(1) + } else { + alert(res.data.message) + } + }) + // eslint-disable-next-line handle-callback-err + .catch(err => { + console.log(err) + }) }, getData () { let sid = sessionStorage.id @@ -397,10 +414,28 @@ export default { console.log(err) }) }, - + getType () { + let _this = this + this.$http({ + method: 'post', + url: 'v1/user/get-society-type', + data: {} + }).then(res => { + _this.typeVal = res.data.data + }) + // eslint-disable-next-line handle-callback-err + .catch(err => { + console.log(err) + }) + }, anNui () { - this.zhuangtai = !this.zhuangtai - this.num = 1200 + if (this.zhuangtai) { + this.num = 1050 + this.zhuangtai = !this.zhuangtai + } else { + this.num = 1200 + this.zhuangtai = !this.zhuangtai + } }, sendMsgToParent () { this.$emit('listenToChildExen', this.num) @@ -409,6 +444,7 @@ export default { created () { this.name = sessionStorage.name this.getData() + this.getType() }, mounted () { this.sendMsgToParent() @@ -605,20 +641,44 @@ export default { } } - button[type="submit"] { - width: 230px; - height: 63px; - background-color: #e60012; - border-radius: 5px; - outline: none; - border: 0; - font-family: "MicrosoftYaHei"; - font-size: 26px; - font-weight: normal; - font-stretch: normal; - line-height: 63px; - letter-spacing: 0px; - color: #ffffff; + #btn { + margin: 60px auto 0px; + display: flex; + justify-content: space-between; + align-items: center; + width: 500px; + + button[type="submit"] { + width: 230px; + height: 63px; + background-color: #e60012; + border-radius: 5px; + outline: none; + border: 0; + font-family: "MicrosoftYaHei"; + font-size: 26px; + font-weight: normal; + font-stretch: normal; + line-height: 63px; + letter-spacing: 0px; + color: #ffffff; + } + + button[type="button"] { + width: 230px; + height: 63px; + background-color: #ff9800; + border-radius: 5px; + outline: none; + border: 0; + font-family: "MicrosoftYaHei"; + font-size: 26px; + font-weight: normal; + font-stretch: normal; + line-height: 63px; + letter-spacing: 0px; + color: #ffffff; + } } .it { diff --git a/src/views/personal/Declare.vue b/src/views/personal/Declare.vue index 8c07bf0..299c3a2 100644 --- a/src/views/personal/Declare.vue +++ b/src/views/personal/Declare.vue @@ -5,10 +5,14 @@
-
+
{{bgValue.announcement.name + bgValue.announcement.pro_content}}
+
+ 暂无项目申报内容 + +
@@ -42,21 +46,32 @@
- - + - + - + @@ -150,37 +165,52 @@ export default { text: ['全部'], sub: 0, bgData: [], - bgValue: [] + bgValue: [], + type_value: '全部', + status_value: '全部', + area_value: '全部', + value_date: '', + start_time: '', + end_time: '' } }, computed: {}, watch: {}, methods: { - getDataOne () { - let _this = this - this.$http({ - method: 'get', - url: 'v1/project/get-info', - data: {} - }).then(res => { - if (res.data.code === 200) { - _this.bgValue = res.data.data - console.log(_this.bgValue) - } else { - _this.$message.error('请求数据有问题!') - } - }) - // eslint-disable-next-line handle-callback-err - .catch(err => { - console.log(err) - }) + /** 筛选函数 */ + bolting () { + // eslint-disable-next-line camelcase + this.start_time = this.value_date[0] + // eslint-disable-next-line camelcase + this.end_time = this.value_date[1] + this.getDataTwo(this.start_time, this.end_time, this.type_value, this.status_value, this.area_value) }, - getDataTwo () { + + /** 获取项目列表 */ + getDataTwo (start_time = this.start_time, end_time = this.end_time, type = this.type_value, status = this.status_value, area = this.area_value) { + if (type === '全部') { + this.type_value = '' + type = '' + } + if (status === '全部') { + this.status_value = '' + status = '' + } + if (area === '全部') { + this.area_value = '' + area = '' + } + let _this = this this.$http({ method: 'get', url: 'v1/project/list', params: { + start_time: start_time, + end_time: end_time, + type: type, + area: area, + status: status, page: _this.currentPage, num: 4 } @@ -196,22 +226,28 @@ export default { .catch(err => { console.log(err) }) + + if (this.type_value === '') { + this.type_value = '全部' + } + if (this.status_value === '') { + this.status_value = '全部' + } + if (this.area_value === '') { + this.area_value = '全部' + } }, - /* - getDataThree() { + /** 获取下拉框数据 */ + getDataOne () { let _this = this this.$http({ method: 'get', - url: 'v1/project/list', - params: { - prolink: 1, - page: _this.currentPage - } + url: 'v1/project/get-info', + data: {} }).then(res => { if (res.data.code === 200) { - _this.bgData = res.data.data.data - _this.totalCount = _this.bgData.allNum - _this.pageSize = _this.bgData.info.length + _this.bgValue = res.data.data + // console.log(_this.bgValue) } else { _this.$message.error('请求数据有问题!') } @@ -221,47 +257,10 @@ export default { console.log(err) }) }, - getDataFour() { - let _this = this - this.$http({ - method: 'get', - url: 'v1/project/list', - params: { - prolink: 2, - page: _this.currentPage - } - }).then(res => { - if (res.data.code === 200) { - _this.bgData = res.data.data.data - _this.totalCount = _this.bgData.allNum - _this.pageSize = _this.bgData.info.length - } else { - _this.$message.error('请求数据有问题!') - } - }) - // eslint-disable-next-line handle-callback-err - .catch(err => { - console.log(err) - }) - }, - */ btn (index) { let s = this.sub s = index this.sub = s - /* - switch (this.sub) { - case 0: - this.getDataTwo() - break - case 1: - this.getDataThree() - break - case 2: - this.getDataFour() - break - } - */ }, sendMsgToParent () { this.$emit('listenToChildExen', this.num) @@ -272,31 +271,27 @@ export default { }, handleCurrentChange (val) { this.currentPage = val - /* - switch (this.sub) { - case 0: - this.getDataTwo() - break - case 1: - this.getDataThree() - break - case 2: - this.getDataFour() - break - } - */ this.getDataTwo() this.getPackData() }, getPackData () { } }, created () { - this.currentPage = Number(localStorage.getItem('pagination')) || 1 + this.currentPage = Number(localStorage.getItem('page')) || 1 this.handleCurrentChange(this.currentPage) this.getDataOne() }, mounted () { this.sendMsgToParent() + }, + beforeUpdate () { + localStorage.setItem('page', this.currentPage) + }, + beforeDestroy () { + localStorage.setItem('page', 1) + }, + destroyed () { + localStorage.removeItem('page') } } diff --git a/src/views/project/Application.vue b/src/views/project/Application.vue index 7a86f0c..8f4e14f 100644 --- a/src/views/project/Application.vue +++ b/src/views/project/Application.vue @@ -113,7 +113,7 @@
- +
@@ -200,7 +200,7 @@
- +
@@ -449,7 +449,7 @@ export default { watch: {}, methods: { /** 获取富文本内容 */ - getContent(data){ + getContent(data) { this.funds = data }, /** 申报单位承诺 */ @@ -467,22 +467,22 @@ export default { this.sub = s - // if (s == 1) { - // if (this.name == '' || this.company == '' || this.tid == '' || - // this.rid == '' || this.first_level == '' || this.secondary == '' || - // this.fieldeara == '' || this.attribute == '' || this.aterm == '' || - // this.fterm == '' || this.postaladdress == '' || this.postalcode == '' || - // this.pmail == '' || this.plegal == '' || this.plcode == '' || - // this.pname == '' || this.poster == '' || this.poffice_tel == '' || - // this.aphone == '' || this.cname == '' || this.cpost == '' || this.coffice_tel == '' || - // this.cphone == '' - // ) { - // alert('以上内容不可为空!') - // return - // } else { - // this.sub = s - // } - // } + if (s == 1) { + if (this.name == '' || this.company == '' || this.tid == '' || + this.rid == '' || this.first_level == '' || this.secondary == '' || + this.fieldeara == '' || this.attribute == '' || this.aterm == '' || + this.fterm == '' || this.postaladdress == '' || this.postalcode == '' || + this.pmail == '' || this.plegal == '' || this.plcode == '' || + this.pname == '' || this.poster == '' || this.poffice_tel == '' || + this.aphone == '' || this.cname == '' || this.cpost == '' || this.coffice_tel == '' || + this.cphone == '' + ) { + alert('以上内容不可为空!') + return + } else { + this.sub = s + } + } }, /** 上传文件 */ getFile(event) { @@ -498,7 +498,6 @@ export default { let url = response.data.data.url this.file = url }) - console.log(this.file); }, /** 保存和提交 */ submit(index) { @@ -530,6 +529,10 @@ export default { s = index; this.subStatus = s this.proimages = this.file + if(this.proimages === ''){ + alert('文件未上传!') + return + } let _this = this this.$http({ method: 'post', @@ -659,8 +662,8 @@ export default {