From 60fa6ac94edcea0372a00a332b415676cc29508c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E5=AD=A6=E5=9D=A4?= <1107410514@qq.com> Date: Sun, 6 Oct 2019 22:48:06 +0800 Subject: [PATCH] kun 10/6/22:48 --- src/views/InformationQuery.vue | 275 ++++++++++++++++----------------- src/views/Login.vue | 16 +- src/views/Registered.vue | 8 +- src/views/home/ApplyFor.vue | 265 +++++++++++++++++++++---------- src/views/home/NewsDetails.vue | 26 +++- src/views/personal/Modify.vue | 43 +++++- src/views/project/Project.vue | 159 ++++++++++++------- static/js/tool.js | 28 ++++ 8 files changed, 515 insertions(+), 305 deletions(-) diff --git a/src/views/InformationQuery.vue b/src/views/InformationQuery.vue index ca342e1..ecf85aa 100644 --- a/src/views/InformationQuery.vue +++ b/src/views/InformationQuery.vue @@ -14,22 +14,22 @@
- - - - @@ -66,34 +66,38 @@ @@ -126,73 +130,15 @@ export default { searchValue: [], record: [], screeOut: { - type: '类型', - date_time: '登记时间', - date_year: '年检年份', - zt: '年检情况' + society_type: '类型', + reg_time0: '登记时间', + reg_time1: '年检年份', + status: '年检情况' }, - sData: [ - { - id: 1, - organization: "劳动经济学会", - credit: "51100000MJ000035X2", - type: "团体", - representative: "王五", - date_time: "09-18", - date_year: '2019', - zt: '正常' - }, - { - id: 2, - organization: "华为", - credit: "51100000MJ000035X2", - type: "社会", - representative: "李四", - date_time: "09-19", - date_year: '2017', - zt: '正常' - }, - { - id: 4, - organization: "华为", - credit: "51100000MJ000035X2", - type: "团体", - representative: "李四", - date_time: "09-19", - date_year: '2019', - zt: '异常' - }, - { - id: 5, - organization: "华为", - credit: "51100000MJ000035X2", - type: "社会", - representative: "李四", - date_time: "09-18", - date_year: '2017', - zt: '异常' - }, - { - id: 6, - organization: "华为", - credit: "51100000MJ000035X2", - type: "社会", - representative: "李四", - date_time: "09-19", - date_year: '2019', - zt: '正常' - }, - { - id: 3, - organization: "小米", - credit: "51100000MJ000035X2", - type: "手机", - representative: "张三", - date_time: "09-18", - date_year: "2017", - zt: '异常' - } - ] + bgData: [], + arr1: [], + arr0: [], + conversion: [] }; }, computed: {}, @@ -209,61 +155,63 @@ export default { this.getSearch(str) }, /** 筛选函数 */ - scree() { - if (this.screeOut.type == "类型") { - this.screeOut.type = '' - } else { - this.record.push({ category: '类型', nameOf: this.screeOut.type }) - } + // scree() { + // if (this.screeOut.society_type == "类型") { + // this.screeOut.society_type = '' + // } else { + // this.record.push({ category: '类型', nameOf: this.screeOut.society_type }) + // } - if (this.screeOut.date_time == "登记时间") { - this.screeOut.date_time = '' - } else { - this.record.push({ category: '登记时间', nameOf: this.screeOut.date_time }) - } + // if (this.screeOut.reg_time == "登记时间") { + // this.screeOut.reg_time = '' + // } else { + // this.record.push({ category: '登记时间', nameOf: this.screeOut.reg_time }) + // } - if (this.screeOut.date_year == "年检年份") { - this.screeOut.date_year = '' - } else { - this.record.push({ category: '年检年份', nameOf: this.screeOut.date_year }) - } + // if (this.screeOut.reg_time == "年检年份") { + // this.screeOut.reg_time = '' + // } else { + // this.record.push({ category: '年检年份', nameOf: this.screeOut.reg_time }) + // } - if (this.screeOut.zt == "年检情况") { - this.screeOut.zt = '' - } else { - this.record.push({ category: '年检情况', nameOf: this.screeOut.zt }) - } + // if (this.screeOut.status == "年检情况") { + // this.screeOut.status = '' + // } else { + // this.record.push({ category: '年检情况', nameOf: this.screeOut.status }) + // } - /** - let hash = {}; - this.record = this.record.reduce((preVal, curVal) => { - hash[curVal.nameOf] ? '' : hash[curVal.nameOf] = true && preVal.push(curVal); - return preVal - }, []) - */ + // /** + // let hash = {}; + // this.record = this.record.reduce((preVal, curVal) => { + // hash[curVal.nameOf] ? '' : hash[curVal.nameOf] = true && preVal.push(curVal); + // return preVal + // }, []) + // */ - this.record = this.$tool.arrayHeavy(this.record, 'nameOf') + // console.log(this.record) - let gData = this.$tool.multiFilter(this.sData, this.screeOut) - if (gData != undefined && gData != '') { - this.searchValue = gData - } else { - this.$message('您搜索的内容暂无~') - } + // this.record = this.$tool.arrayHeavy(this.record, 'nameOf') - if (this.screeOut.type == "") { - this.screeOut.type = '类型' - } - if (this.screeOut.date_time == "") { - this.screeOut.date_time = '登记时间' - } - if (this.screeOut.date_year == "") { - this.screeOut.date_year = '年检年份' - } - if (this.screeOut.zt == "") { - this.screeOut.zt = '年检情况' - } - }, + // let gData = this.$tool.multiFilter(this.bgData, this.screeOut) + // if (gData != undefined && gData != '') { + // this.searchValue = gData + // } else { + // this.$message('您搜索的内容暂无~') + // } + + // if (this.screeOut.society_type == "") { + // this.screeOut.society_type = '类型' + // } + // if (this.screeOut.reg_time == "") { + // this.screeOut.reg_time = '登记时间' + // } + // if (this.screeOut.reg_time == "") { + // this.screeOut.reg_time = '年检年份' + // } + // if (this.screeOut.status == "") { + // this.screeOut.status = '年检情况' + // } + // }, /** 搜索函数 */ getSearch(str) { this.searchValue = []; @@ -275,9 +223,7 @@ export default { return; } - let searchData = this.$tool.setSearch(this.sData, this.searchVal) - // console.log(searchData); - + let searchData = this.$tool.setSearch(this.bgData, this.searchVal) if (searchData != undefined && searchData != '') { this.searchValue = searchData @@ -304,12 +250,60 @@ export default { let s = this.sub; s = index; this.sub = s; + let t0 = this.arr0 + let t1 = this.arr1 + let t2 = this.bgData + + switch (this.sub) { + case 0: + this.conversion = t2; + break; + case 1: + this.conversion = t0; + break; + case 2: + this.conversion = t1; + break; + default: + break; + } }, /** 获取后台数据 */ - getData() { } + getData() { + let _this = this + this.$http({ + method: 'post', + url: 'v1/society/society', + data: {} + }).then(res => { + if (res.data.code !== 200) { + return; + } + _this.bgData = res.data.data.data.info + _this.conversion = _this.bgData + _this.bgData.forEach((item, index) => { + + switch (item.status) { + case '异常': + _this.arr0.push(item); + break; + case '正常': + _this.arr1.push(item); + break; + default: + break; + } + + }) + }) + // eslint-disable-next-line handle-callback-err + .catch(err => { + console.log(err) + }) + } }, created() { - + this.getData() }, mounted() { this.getData(); @@ -382,7 +376,6 @@ export default { &:nth-of-type(3) { width: 240px; border-left: 1px solid #dcebf6; - } &:nth-of-type(4) { width: 160px; @@ -391,7 +384,6 @@ export default { &:nth-of-type(5) { width: 160px; border-left: 1px solid #dcebf6; - } &:nth-of-type(6) { width: 160px; @@ -400,7 +392,6 @@ export default { &:nth-of-type(7) { width: 140px; border-left: 1px solid #dcebf6; - } } diff --git a/src/views/Login.vue b/src/views/Login.vue index e44b691..2b8a174 100644 --- a/src/views/Login.vue +++ b/src/views/Login.vue @@ -25,7 +25,7 @@ export default { components: {}, props: {}, - data() { + data () { return { imgUrl: { login: require('../../static/img/login.png'), @@ -39,7 +39,7 @@ export default { computed: {}, watch: {}, methods: { - login() { + login () { let _this = this this.$http({ method: 'post', @@ -51,10 +51,10 @@ export default { }).then(res => { if (res.data.code === 200) { console.log(res.data) - this.$message.success('登陆成功'); - this.$router.push('/personalZte'); - //全局存储token - window.localStorage["token"] = JSON.stringify(res.data.data.data.id); + this.$message.success('登陆成功') + this.$router.push('/personalZte') + // 全局存储token + window.localStorage['token'] = JSON.stringify(res.data.data.data.id) } else { this.$message.error('请求数据有问题!') } @@ -65,8 +65,8 @@ export default { }) } }, - created() { }, - mounted() { } + created () { }, + mounted () { } } diff --git a/src/views/Registered.vue b/src/views/Registered.vue index 9b9107e..dc6769e 100644 --- a/src/views/Registered.vue +++ b/src/views/Registered.vue @@ -161,7 +161,7 @@ export default { components: {}, props: {}, - data() { + data () { return { imgUrl: { registered: require('../../static/img/registered.png'), @@ -174,7 +174,7 @@ export default { computed: {}, watch: {}, methods: { - getData() { + getData () { let _this = this this.$http({ method: 'get', @@ -194,10 +194,10 @@ export default { }) } }, - created() { + created () { this.getData() }, - mounted() { } + mounted () { } } diff --git a/src/views/home/ApplyFor.vue b/src/views/home/ApplyFor.vue index 8d8e22b..4559214 100644 --- a/src/views/home/ApplyFor.vue +++ b/src/views/home/ApplyFor.vue @@ -5,78 +5,69 @@

党组织申请

-
+
{{item}}
-
+ -
+

基本信息

是否建立党组织:
    
@@ -84,65 +75,67 @@ 是否建立“功能型”党组织:
    
- +
- +
- +
-
下一步
+
下一步
-
+

党组织书记情况

- +
- +
- +
- +
@@ -150,55 +143,62 @@
- +
- +
- +
- +
-
- +
+
-
+
- + 党组织申请已提交成功!
@@ -228,7 +228,29 @@ export default { }, text: ["1 填写基本信息", "2 填写党组织信息", "3 提交审核"], sub: 0, - index_num: 0 + index_num: 0, + types: [], + type: '', + supervisor: '', + reg_manage: '', + work_person: '', + flow_party_person: '', + party_person: '', + is_reg_party: '', + is_reg_fun_party: '', + party_name: '', + party_pname: '', + sec_name: '', + sec_sex: '', + sec_job: '', + sec_age: '', + sec_study: '', + near_party_person: '', + major_party_person: '', + is_reg_group: '', + is_choice_instructor: '', + year_money: '', + active_year: '' }; }, computed: {}, @@ -238,16 +260,89 @@ export default { let s = this.sub; s = n; this.sub = s; + if (this.sub == 2) { + let sid = localStorage.token + let _this = this + // console.log(_this.type, + // _this.reg_manage, _this.supervisor, _this.work_person, _this.flow_party_person, + // _this.party_person, _this.is_reg_party, _this.is_reg_fun_party, + // _this.party_name, _this.party_pname, _this.sec_name, + // _this.sec_sex, _this.sec_job, _this.sec_age, + // _this.sec_study, _this.near_party_person, + // _this.major_party_person, _this.is_reg_group, + // _this.is_choice_instructor, _this.year_money, _this.active_year + // ) + this.$http({ + method: 'post', + url: 'v1/user/apply', + data: { + sid: sid, + type: _this.type, + supervisor: _this.supervisor, + reg_manage: _this.reg_manage, + work_person: _this.work_person, + flow_party_person: _this.flow_party_person, + party_person: _this.party_person, + is_reg_party: _this.is_reg_party, + is_reg_fun_party: _this.is_reg_fun_party, + party_name: _this.party_name, + party_pname: _this.party_pname, + sec_name: _this.sec_name, + sec_sex: _this.sec_sex, + sec_job: _this.sec_job, + sec_age: _this.sec_age, + sec_study: _this.sec_study, + near_party_person: _this.near_party_person, + major_party_person: _this.major_party_person, + is_reg_group: _this.is_reg_group, + is_choice_instructor: _this.is_choice_instructor, + year_money: _this.year_money, + active_year: _this.active_year + } + }).then(res => { + console.log(res); + + // if (res.code === 200) { + // console.log(res.data) + // } else { + // _this.$message.error('请求数据有问题!') + // } + }) + // eslint-disable-next-line handle-callback-err + .catch(err => { + console.log(err) + }) + } + }, + getData() { + let _this = this + this.$http({ + method: 'post', + url: 'v1/user/get-society-type', + data: {} + }).then(res => { + if (res.data.code === 200) { + _this.types = res.data.data + } else { + _this.$message.error('请求数据有问题!') + } + }) + // eslint-disable-next-line handle-callback-err + .catch(err => { + console.log(err) + }) } }, - created() {}, - mounted() {} + created() { + this.getData() + }, + mounted() { } };