kun 19/10/9/21:58

This commit is contained in:
沈学坤
2019-10-09 21:57:13 +08:00
parent 8b2b683ca4
commit 47b35b28a2
19 changed files with 703 additions and 517 deletions

View File

@@ -24,7 +24,7 @@
<div class="o">
<label>
<span>社会组织名称:</span>
<input class="input" type="text" name="name" />
<input class="input" type="text" name="name" v-model="name" disabled />
</label>
<label>
<span>社会组织类型:</span>
@@ -41,19 +41,26 @@
<input
class="input"
type="number"
min="0"
name="flow_party_person"
v-model="flow_party_person"
/>
</label>
<label>
<span>已有党员数量:</span>
<input class="input" type="number" name="party_person" v-model="party_person" />
<input
class="input"
type="number"
min="0"
name="party_person"
v-model="party_person"
/>
</label>
</div>
<div class="o">
<label>
<span>从业人员总数:</span>
<input class="input" type="number" name="work_person" v-model="work_person" />
<input class="input" type="number" min="0" name="work_person" v-model="work_person" />
</label>
<label>
<span>党组织名称:</span>
@@ -75,13 +82,7 @@
<span>是否建立功能型党组织:</span>
<div>
<label for>
<input
type="radio"
name="is_reg_fun_party"
v-model="is_reg_fun_party"
value="1"
checked
/>&nbsp;&nbsp;
<input type="radio" name="is_reg_fun_party" v-model="is_reg_fun_party" value="1" />&nbsp;&nbsp;
</label>&nbsp;&nbsp;&nbsp;&nbsp;
<label for>
<input type="radio" name="is_reg_fun_party" v-model="is_reg_fun_party" value="2" />&nbsp;&nbsp;
@@ -90,7 +91,7 @@
</div>
<div class="o-o">
<label>登记管理机关:</label>
<input type="text" name="reg_manage" :v-model="reg_manage" />
<input type="text" name="reg_manage" v-model="reg_manage" />
</div>
<div class="o-o">
<label>业务主管单位:</label>
@@ -189,7 +190,10 @@
<input type="text" name="active_year" v-model="active_year" />
</div>
</div>
<div @click="btn(2)" style="display:flex;justify-content:center;margin-top:35px;">
<div
@click="btn(2)"
style="outline:none;display:flex;justify-content:center;margin-top:35px;"
>
<input type="submit" value="立即提交" />
</div>
</div>
@@ -259,59 +263,75 @@ export default {
btn(n) {
let s = this.sub;
s = n;
this.sub = s;
if (this.sub == 2) {
let sid = sessionStorage.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
if (s == 1) {
if (this.type == '' || this.flow_party_person == '' || this.party_person == '' || this.work_person == '' ||
this.party_name == '' || this.is_reg_party == '' || this.is_reg_fun_party == '' ||
this.reg_manage == '' || this.supervisor == '' || this.party_pname == ''
) {
alert('以上内容不可为空!')
} else {
if(this.flow_party_person < 0 || this.party_person < 0 || this.work_person < 0){
alert('不能出现负数呦!')
}else{
this.sub = s;
}
}).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)
}
}
if (s == 2) {
if (this.sec_name == '' || this.sec_sex == '' || this.sec_age == '' || this.sec_job == '' ||
this.sec_study == '' || this.near_party_person == '' || this.is_reg_group == '' ||
this.major_party_person == '' || this.is_choice_instructor == '' || this.year_money == '' ||
this.active_year == ''
) {
alert('以上内容不可为空!')
} else {
let sid = sessionStorage.token
let _this = this
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 => {
if (res.data.code === 200) {
if (res.data.data.code !== 200) {
alert(res.data.data.msg)
return
}
_this.sub = s
} else {
_this.$message.error('请求数据有问题!')
}
})
// eslint-disable-next-line handle-callback-err
.catch(err => {
console.log(err)
})
}
}
},
getData() {
@@ -334,6 +354,7 @@ export default {
}
},
created() {
this.name = sessionStorage.name
this.getData()
},
mounted() { }
@@ -400,6 +421,10 @@ export default {
margin-bottom: 58px;
}
input[type="submit"] {
outline: none;
}
label input[type="radio"] {
width: 17px;
height: 17px;

View File

@@ -9,7 +9,7 @@
<div class="swiper-container swiper-one">
<div class="swiper-wrapper">
<template v-for="(banner,index) in bgData.banner">
<div class="swiper-slide" :key="index">
<div class="swiper-slide" :key="index" @click="$jParams('newsDetails',{id:banner.id})">
<img :src="banner.cover" alt />
<div class="box">{{banner.title}}</div>
</div>
@@ -26,7 +26,7 @@
<div class="top">
<div class="b">
<span>通知公告</span>
<span @click="$jParams('newsList',{type:3})">更多>></span>
<span class="more" @click="$jParams('newsList',{type:3})">更多>></span>
</div>
</div>
<!-- 列表显示 -->
@@ -53,7 +53,7 @@
<img class="o" :src="imgUrl.dh" alt />
<span>区域化党建</span>
</div>
<span @click="$jParams('newsList',{type:4})">更多>></span>
<span class="more" @click="$jParams('newsList',{type:4})">更多>></span>
</div>
<ul class="ult">
<template v-for="(build,index) in bgData.build">
@@ -67,13 +67,14 @@
<img class="o" :src="imgUrl.gq" alt />
<span>党组织信息</span>
</div>
<span @click="$jump('informationQuery')">更多>></span>
<span class="more" @click="$jump('informationQuery')">更多>></span>
</div>
<div class="p">
<ul class="ult">
<template v-for="(party,index) in bgData.party">
<li :key="index" v-if="index < 3" @click="$jump('informationQuery')">
<a href="javascript:void(0);">{{party.party_name}}</a>
<li :key="index" v-if="index < 3">
<!-- <a href="javascript:void(0);">{{party.party_name}}</a> -->
{{party.party_name}}
</li>
</template>
</ul>
@@ -92,7 +93,7 @@
<img class="n" :src="imgUrl.ws" alt />
<span>统一战线</span>
</div>
<span @click="$jParams('newsList',{type:1})">更多>></span>
<span class="more" @click="$jParams('newsList',{type:1})">更多>></span>
</div>
<ul class="ulo">
<template v-for="(battle,index) in bgData.battle">
@@ -109,7 +110,7 @@
<img class="e" :src="imgUrl.zz" alt />
<span>组织生活</span>
</div>
<span @click="$jParams('newsList',{type:2})">更多>></span>
<span class="more" @click="$jParams('newsList',{type:2})">更多>></span>
</div>
<ul class="ult">
<template v-for="(organization,index) in bgData.organization">
@@ -146,7 +147,7 @@
<div class="swiper-box-list">
<div id="img-box" class="f-row">
<template v-for="(links,index) in bgData.links">
<div class="img-box" :key="index" v-if="index < 8">
<div class="img-box" :key="index" v-if="index < 8" @click="link(links.link)">
<img :src="links.url" alt />
<p>{{links.name}}</p>
</div>
@@ -161,18 +162,6 @@
<img @click="scrollFeeds('right')" class="mv-btn right-side" :src="imgUrl.right" alt />
</div>
</div>
<!-- <div class="swiper-container swiper-two">
<div class="swiper-wrapper">
<template v-for="(item,index) in list">
<div class="swiper-slide" :key="index" v-if="index < 8">
<img :src="imgUrl.img3" alt />
<span>中国政府网站{{index+1}}</span>
</div>
</template>
</div>
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>
</div>-->
</div>
</div>
<footer-nav class="footer"></footer-nav>
@@ -184,7 +173,7 @@
import HeaderNav from '../../components/HeaderNav';
/* eslint-disable */
import FooterNav from "../../components/FooterNav";
import Swiper from "swiper";
import Swiper from 'swiper';
export default {
components: {
@@ -207,24 +196,26 @@ export default {
right: require("../../../static/img/right.png"),
left: require("../../../static/img/left.png")
},
bgData: []
bgData: [],
};
},
computed: {},
watch: {},
methods: {
link(href){
window.location.href = href
},
initSwiper() {
var mySwiper = new Swiper(".swiper-one", {
new Swiper(".swiper-one", {
loop: true,
autoplay: {
delay: 3000
},
/** 如果需要前进后退按钮 */
navigation: {
nextEl: ".swiper-button-next",
prevEl: ".swiper-button-prev"
}
});
},
scrollFeeds: function (btn) {
@@ -261,6 +252,9 @@ export default {
}).then(res => {
if (res.data.code === 200) {
_this.bgData = res.data.data
_this.$nextTick(() => { //修改数据之后立即使用这个方法,获取更新后的 DOM
_this.initSwiper()
})
} else {
_this.$message.error('请求数据有问题!')
}
@@ -270,30 +264,12 @@ export default {
console.log(err)
})
}
/*
initialSwiper() {
var swiper = new Swiper(".swiper-two", {
spaceBetween: 20,
slidesPerView: 18 / 4,
slidesPerGroup: 7 / 4,
loopFillGroupWithBlank: true,
// 如果需要前进后退按钮
navigation: {
nextEl: ".swiper-button-next",
prevEl: ".swiper-button-prev"
},
});
}
*/
},
created() {
this.getData()
},
mounted() {
this.initSwiper();
/*this.initialSwiper();*/
}
};
</script>
@@ -303,9 +279,21 @@ export default {
height: auto !important;
}
.more{
cursor: pointer!important;
}
li{
a:hover{
color:cornflowerblue !important;
}
span:hover{
color:cornflowerblue !important;
}
}
.wrapper {
min-width: 1280px;
// width: 100%;
box-sizing: border-box;
position: relative;
@@ -387,80 +375,6 @@ export default {
}
}
}
/*
.swiper-button-prev.swiper-button-disabled {
opacity: 0;
cursor: auto;
pointer-events: none;
}
.swiper-button-next.swiper-button-disabled {
opacity: 1;
cursor: auto;
pointer-events: none;
}
.swiper-button-prev {
outline: none;
position: absolute;
top: 50%;
left: 0%;
width: 60px;
height: 60px;
margin-top: -22px;
z-index: 10;
cursor: pointer;
background-image: url("../../../static//img/left.png");
background-size: 60px 60px;
background-position: center;
background-repeat: no-repeat;
}
.swiper-button-next {
outline: none;
position: absolute;
top: 50%;
right: 0%;
width: 60px;
height: 60px;
margin-top: -22px;
z-index: 10;
cursor: pointer;
background-image: url("../../../static//img/right.png");
background-size: 60px 60px;
background-position: center;
background-repeat: no-repeat;
}
.swiper-slide {
width: 239px !important;
background-color: #ffffff;
box-shadow: 0px 10px 9px 1px rgba(206, 204, 204, 0.12);
border-radius: 5px;
text-align: center;
margin-right: 20px;
display: flex;
flex-direction: column;
img {
width: 239px;
height: 130px;
background-color: #ffffff;
border-radius: 5px 5px 0px 0px;
}
span {
font-family: "MicrosoftYaHei";
font-size: 18px;
font-weight: bold;
font-stretch: normal;
line-height: 60px;
letter-spacing: 0px;
color: #333333;
}
}
*/
}
.title {
@@ -477,14 +391,12 @@ export default {
/** THREE */
.container-three {
width: 100%;
// height: 848px;
padding: 0 40px;
box-sizing: border-box;
margin-top: 59px;
.box-list {
width: 100%;
// height: 794px;
background-color: #ffffff;
box-sizing: border-box;
padding: 0 60px 0 8px;
@@ -572,10 +484,6 @@ export default {
.ult {
margin-top: 29px;
/*
width: 303px;
height: 297px;
*/
li {
a {
@@ -678,24 +586,6 @@ export default {
white-space: nowrap;
}
}
// .text {
// width: 309px;
// height: 127px;
// p {
// width: 309px;
// height: 92px;
// overflow: hidden;
// font-family: "MicrosoftYaHei";
// font-size: 16px;
// font-weight: normal;
// font-stretch: normal;
// line-height: 33px;
// letter-spacing: 0px;
// color: #333333;
// }
// }
}
.top-p {

View File

@@ -30,16 +30,16 @@
<div class="right">
<h3>热点新闻</h3>
<div>
<template v-for="(item,index) in list">
<dl :key="index" v-if="index < 4" @click="$jump('newsDetails')">
<template v-for="(hotArticle,index) in bgDataZ">
<dl :key="index" v-if="index < 4" @click="news(hotArticle.id)">
<dt>
<img :src="imgUrl.img4" alt />
<img :src="hotArticle.cover" alt />
</dt>
<dd>
<span class="dd">活动策划是提高市场占有率的有效行为</span>
<span class="dd">{{hotArticle.title}}</span>
</dd>
<dd>
<time>2019-10-14</time>
<time>{{hotArticle.created_at}}</time>
</dd>
</dl>
</template>
@@ -64,26 +64,47 @@ export default {
data() {
return {
index_num: 0,
coll: false,
coll: Number,
imgUrl: {
img4: require("../../../static/img/img4.png"),
img5: require("../../../static/img/img5.png"),
wjx: require("../../../static/img/wjx.png")
},
list: [1, 2, 3, 4, 5, 6, 7, 8, 9],
bgData: [],
bgDataZ: [],
id: Number
};
},
computed: {},
watch: {},
methods: {
news(new_id) {
let _this = this
this.$http({
method: 'post',
url: 'v1/article/details',
data: {
id: new_id
}
}).then(res => {
if (res.data.data.code === 200) {
_this.bgData = res.data.data.data
_this.bgDataZ = res.data.data.hotArticle
_this.coll = res.data.data.is_collection
} else {
_this.$message.error('请求数据有问题!')
}
})
// eslint-disable-next-line handle-callback-err
.catch(err => {
console.log(err)
})
},
collection(article_id) {
if (!sessionStorage.token) {
alert('请先登录~')
return;
}
let _this = this
this.$http({
method: 'post',
@@ -94,7 +115,7 @@ export default {
}
}).then(res => {
if (res.data.data.code === 200) {
_this.coll = !_this.coll;
_this.coll = _this.coll == 1 ? 0 : 1
} else {
_this.$message.error('请求数据有问题!')
}
@@ -115,6 +136,8 @@ export default {
}).then(res => {
if (res.data.data.code === 200) {
_this.bgData = res.data.data.data
_this.bgDataZ = res.data.data.hotArticle
_this.coll = res.data.data.is_collection
} else {
_this.$message.error('请求数据有问题!')
}
@@ -162,6 +185,7 @@ export default {
box-sizing: border-box;
dd {
width: 95%;
.d-o {
display: inline-block;
margin: 28px 0 23px;
@@ -171,6 +195,13 @@ export default {
font-stretch: normal;
letter-spacing: 0px;
color: #333333;
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
word-wrap: break-word;
white-space: normal;
}
.d-b {
@@ -222,6 +253,7 @@ export default {
p {
text-indent: 1em;
line-height: 0px !important;
}
}
}

View File

@@ -1,11 +1,11 @@
<template>
<div class="wrapper" v-if="bgData">
<div class="wrapper">
<header-nav :index_num="index_num"></header-nav>
<div id="box">
<template v-for="(info,index) in bgData.info">
<div id="news" :key="index" @click="$jParams('newsDetails',{id:info.id,type:getType})">
<div class="news-box">
<img :src="info.cover" />
<img :src="info.cover ? info.cover : moren" />
<section>
<h3>{{info.title}}</h3>
<aside>
@@ -25,7 +25,6 @@
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-size="pageSize"
:pager-count="7"
background
layout="prev, pager, next"
:total="totalCount"
@@ -49,18 +48,17 @@ export default {
props: {},
data() {
return {
moren: require('../../../static/img/default.jpg'),
index_num: 0,
pageSize: 1,
currentPage: 1,
currentPage: 0,
totalCount: 1,
bgData: [],
getType: null
};
},
computed: {},
watch: {
},
watch: {},
methods: {
getData() {
let _this = this
@@ -102,7 +100,6 @@ export default {
this.getType = this.getType || Number(localStorage.getItem("getType"));
this.handleCurrentChange(this.currentPage);
this.getData()
},
beforeUpdate() {
localStorage.setItem('pagination', this.currentPage)
@@ -113,7 +110,10 @@ export default {
localStorage.setItem('pagination', this.currentPage)
localStorage.setItem('getType', this.getType)
},
mounted() { }
mounted() { },
destroyed() {
localStorage.clear()
}
};
</script>