kun 19/10/12 18:50

This commit is contained in:
沈学坤
2019-10-12 18:48:39 +08:00
parent 2ece5f446c
commit 110cf5418f
7 changed files with 433 additions and 411 deletions

View File

@@ -14,23 +14,22 @@
</div>
<!-- 分类搜索 -->
<div class="select-box">
<select name="type" v-model="type_value" @change="scree()">
<option selected>全部</option>
<option value="全部">全部</option>
<template v-for="(type,index) in types">
<option :key="index" :value="index">{{type}}</option>
</template>
</select>
<select name="year" v-model="year_value" @change="scree()">
<option selected>全部</option>
<option value="全部">全部</option>
<template v-for="(year,index) in years">
<option :key="index" :value="index">{{year}}</option>
</template>
</select>
<select name="condition" v-model="year_status" @change="scree()">
<option selected>全部</option>
<option value="全部">全部</option>
<option value="0">不合格</option>
<option value="1">合格</option>
</select>
@@ -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()

View File

@@ -31,7 +31,6 @@
:total="totalCount"
></el-pagination>
</div>
</div>
<footer-nav class="footer"></footer-nav>
</div>
@@ -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;
}
}
}
}
</style>

View File

@@ -17,7 +17,7 @@
<!-- start -->
<div class="item">
<label for>社会组织类型:</label>
<select class="input1" name id disabled>
<select class="input1" name="type" disabled>
<option :value="bgData.type">{{bgData.type}}</option>
</select>
</div>
@@ -29,7 +29,7 @@
class="input0"
type="text"
:disabled="bgData.examine === 0"
:value="bgData.flow_party_person"
v-model="bgData.flow_party_person"
/>
</div>
<!-- end -->
@@ -40,7 +40,7 @@
class="input0"
type="text"
:disabled="bgData.examine === 0"
:value="bgData.party_person"
v-model="bgData.party_person"
/>
</div>
<!-- end -->
@@ -51,7 +51,7 @@
class="input0"
type="text"
:disabled="bgData.examine === 0"
:value="bgData.work_person"
v-model="bgData.work_person"
/>
</div>
<!-- end -->
@@ -62,7 +62,7 @@
class="input0"
type="text"
:disabled="bgData.examine === 0"
:value="bgData.party_name"
v-model="bgData.party_name"
/>
</div>
<!-- end -->
@@ -70,23 +70,20 @@
<div class="item">
<label for>是否建立党组织:</label>
<label class="label" for>
<template v-if="bgData.is_reg_party == 1">
<input type="radio" name="is_reg_party" :disabled="bgData.examine === 0" checked />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input
type="radio"
name="is_reg_party"
:disabled="bgData.examine === 0"
/>&nbsp;&nbsp;
</template>
<template v-else>
<input type="radio" name="is_reg_party" :disabled="bgData.examine === 0" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input
type="radio"
name="is_reg_party"
:disabled="bgData.examine === 0"
checked
/>&nbsp;&nbsp;
</template>
<input
type="radio"
name="is_reg_party"
v-model="bgData.is_reg_party"
value="1"
:disabled="bgData.examine === 0"
/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input
type="radio"
name="is_reg_party"
v-model="bgData.is_reg_party"
value="2"
:disabled="bgData.examine === 0"
/>&nbsp;&nbsp;
</label>
</div>
<!-- end -->
@@ -94,23 +91,21 @@
<div class="item">
<label for>是否建立功能型党组织:</label>
<label class="label" for>
<template v-if="bgData.is_reg_fun_party == 1">
<input type="radio" :disabled="bgData.examine === 0" name="is_reg_fun_party" checked />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input
type="radio"
:disabled="bgData.examine === 0"
name="is_reg_fun_party"
/>&nbsp;&nbsp;
</template>
<template v-else>
<input type="radio" :disabled="bgData.examine === 0" name="is_reg_fun_party" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input
type="radio"
name="is_reg_fun_party"
:disabled="bgData.examine === 0"
checked
/>&nbsp;&nbsp;
</template>
<input
type="radio"
:disabled="bgData.examine === 0"
value="1"
name="is_reg_fun_party"
v-model="bgData.is_reg_fun_party"
/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input
type="radio"
:disabled="bgData.examine === 0"
name="is_reg_fun_party"
v-model="bgData.is_reg_fun_party"
value="2"
/>
&nbsp;&nbsp;
</label>
</div>
<!-- end -->
@@ -121,7 +116,7 @@
class="input2"
type="text"
:disabled="bgData.examine === 0"
:value="bgData.reg_manage"
v-model="bgData.reg_manage"
/>
</div>
<!-- end -->
@@ -132,7 +127,7 @@
class="input2"
type="text"
:disabled="bgData.examine === 0"
:value="bgData.supervisor"
v-model="bgData.supervisor"
/>
</div>
<!-- end -->
@@ -143,7 +138,7 @@
class="input2"
type="text"
:disabled="bgData.examine === 0"
:value="bgData.party_pname"
v-model="bgData.party_pname"
/>
</div>
<!-- end -->
@@ -159,7 +154,7 @@
class="input0"
type="text"
:disabled="bgData.examine === 0"
:value="bgData.sec_name"
v-model="bgData.sec_name"
/>
</div>
<!-- end -->
@@ -167,23 +162,21 @@
<div class="it">
<label for>性别:</label>
<label class="label" for>
<template v-if="bgData.sec_sex == 1">
<input type="radio" name="sec_sex" :disabled="bgData.examine === 0" checked />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input
type="radio"
name="sec_sex"
:disabled="bgData.examine === 0"
/>&nbsp;&nbsp;
</template>
<template v-else>
<input type="radio" name="sec_sex" :disabled="bgData.examine === 0" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input
type="radio"
name="sec_sex"
:disabled="bgData.examine === 0"
checked
/>&nbsp;&nbsp;
</template>
<input
type="radio"
name="sec_sex"
v-model="bgData.sec_sex"
value="1"
:disabled="bgData.examine === 0"
/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input
type="radio"
name="sec_sex"
:disabled="bgData.examine === 0"
v-model="bgData.sec_sex"
value="0"
/>
&nbsp;&nbsp;
</label>
</div>
<!-- end -->
@@ -194,7 +187,7 @@
class="input0"
type="text"
:disabled="bgData.examine === 0"
:value="bgData.sec_age"
v-model="bgData.sec_age"
/>
</div>
<!-- end -->
@@ -205,7 +198,7 @@
class="input0"
type="text"
:disabled="bgData.examine === 0"
:value="bgData.sec_job"
v-model="bgData.sec_job"
/>
</div>
<!-- end -->
@@ -216,7 +209,7 @@
class="input0"
type="text"
:disabled="bgData.examine === 0"
:value="bgData.sec_study"
v-model="bgData.sec_study"
/>
</div>
<!-- end -->
@@ -230,7 +223,7 @@
class="input0"
type="text"
:disabled="bgData.examine === 0"
:value="bgData.near_party_person"
v-model="bgData.near_party_person"
/>
</div>
<!-- end -->
@@ -238,23 +231,21 @@
<div class="it">
<label for>是否建立群团组织:</label>
<label class="label" for>
<template v-if="bgData.is_reg_group == 1">
<input type="radio" name="is_reg_group" :disabled="bgData.examine === 0" checked />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input
type="radio"
name="is_reg_group"
:disabled="bgData.examine === 0"
/>&nbsp;&nbsp;
</template>
<template v-else>
<input type="radio" name="is_reg_group" :disabled="bgData.examine === 0" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input
type="radio"
name="is_reg_group"
:disabled="bgData.examine === 0"
checked
/>&nbsp;&nbsp;
</template>
<input
type="radio"
name="is_reg_group"
v-model="bgData.is_reg_group"
:disabled="bgData.examine === 0"
value="1"
/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input
type="radio"
name="is_reg_group"
v-model="bgData.is_reg_group"
:disabled="bgData.examine === 0"
value="2"
/>
&nbsp;&nbsp;
</label>
</div>
<!-- end -->
@@ -265,7 +256,7 @@
class="input0"
type="text"
:disabled="bgData.examine === 0"
:value="bgData.major_party_person"
v-model="bgData.major_party_person"
/>
</div>
<!-- end -->
@@ -273,28 +264,21 @@
<div class="it">
<label for>是否选派党建工作指导员:</label>
<label class="label" for>
<template v-if="bgData.is_choice_instructor == 1">
<input
type="radio"
name="is_choice_instructor"
:disabled="bgData.examine === 0"
checked
/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input
type="radio"
name="is_choice_instructor"
:disabled="bgData.examine === 0"
/>&nbsp;&nbsp;
</template>
<template v-else>
<input type="radio" name="is_choice_instructor" :disabled="bgData.examine === 0" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input
type="radio"
name="is_choice_instructor"
:disabled="bgData.examine === 0"
checked
/>&nbsp;&nbsp;
</template>
<input
type="radio"
name="is_choice_instructor"
:disabled="bgData.examine === 0"
v-model="bgData.is_choice_instructor"
value="1"
/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input
type="radio"
name="is_choice_instructor"
v-model="bgData.is_choice_instructor"
:disabled="bgData.examine === 0"
value="2"
/>
&nbsp;&nbsp;
</label>
</div>
<!-- end -->
@@ -305,7 +289,7 @@
class="input0"
type="text"
:disabled="bgData.examine === 0"
:value="bgData.year_money"
v-model="bgData.year_money"
/>
</div>
<!-- end -->
@@ -316,12 +300,13 @@
class="input0"
type="text"
:disabled="bgData.examine === 0"
:value="bgData.active_year"
v-model="bgData.active_year"
/>
</div>
<!-- end -->
<!-- start -->
<div style="outline:none;display:flex;justify-content:center;margin-top:60px;">
<div id="btn">
<button type="button" v-if="bgData.examine !== 0" @click="anNui()">上一页</button>
<button type="submit" v-if="bgData.examine !== 0" @click="submit()">重新提交</button>
</div>
<!-- end -->
@@ -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 {

View File

@@ -5,10 +5,14 @@
<!-- 公告 -->
<div class="top">
<img :src="imgUrl.xlb" alt />
<div>
<div v-if="bgValue.announcement.name == ''">
<span>{{bgValue.announcement.name + bgValue.announcement.pro_content}}</span>
<time>{{bgValue.announcement.protime}}</time>
</div>
<div v-else>
<span>暂无项目申报内容</span>
<time>{{new Date().getFullYear() + '-' + (new Date().getMonth()+1) + '-' + new Date().getDate()}}</time>
</div>
</div>
<!-- 表格 -->
<div class="table">
@@ -42,21 +46,32 @@
</div>
<!-- 下拉框 -->
<div class="select">
<select class="one" name="date">
<option value>2017/10/14 2017/10/15</option>
<option value>2017/10/14 2017/10/15</option>
</select>
<select class="two" name="type">
<div class="block">
<el-date-picker
v-model="value_date"
type="daterange"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="bolting()"
></el-date-picker>
</div>
<select class="two" name="type" v-model="type_value" @change="bolting()">
<option>全部</option>
<template v-for="(type,index) in bgValue.type">
<option :key="index" :value="index">{{type}}</option>
</template>
</select>
<select class="two" name="type">
<select class="two" name="type" v-model="status_value" @change="bolting()">
<option>全部</option>
<template v-for="(status,index) in bgValue.status">
<option :key="index" :value="index">{{status}}</option>
</template>
</select>
<select class="three" name="area">
<select class="three" name="area" v-model="area_value" @change="bolting()">
<option>全部</option>
<template v-for="(area,index) in bgValue.area">
<option :key="index" :value="index">{{area}}</option>
</template>
@@ -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')
}
}
</script>

View File

@@ -113,7 +113,7 @@
</div>
<div>
<label>传真电话:</label>
<input type="text" name="fax_tel" v-model="fax_tel" value required />
<input type="text" placeholder="非必填" name="fax_tel" v-model="fax_tel" value required />
</div>
</aside>
<!-- end -->
@@ -200,7 +200,7 @@
</div>
<div>
<label>传真电话:</label>
<input type="text" name="respophone" v-model="respophone" value required />
<input type="text" placeholder="非必填" name="respophone" v-model="respophone" value required />
</div>
</aside>
<!-- end -->
@@ -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 {
</script>
<style lang='scss' scoped>
#rich{
margin: 30px auto 30px;
#rich {
margin: 30px auto 30px;
}
.img-img {
margin-top: 25px;

View File

@@ -5,10 +5,14 @@
<!-- 公告 -->
<div class="top">
<img :src="imgUrl.xlb" alt />
<div v-if="bgValue.announcement">
<div v-if="bgValue.announcement.name == ''">
<span>{{bgValue.announcement.name + bgValue.announcement.pro_content}}</span>
<time>{{bgValue.announcement.protime}}</time>
</div>
<div v-else>
<span>暂无项目申报内容</span>
<time>{{new Date().getFullYear() + '-' + (new Date().getMonth()+1) + '-' + new Date().getDate()}}</time>
</div>
</div>
<div class="bottom">
<!-- 表格 -->
@@ -47,28 +51,27 @@
<el-date-picker
v-model="value_date"
type="daterange"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="bolting()"
></el-date-picker>
</div>
<!-- <select class="one" name="date">
<option value>2017/10/14 2017/10/15</option>
<option value>2017/10/14 2017/10/15</option>
</select>-->
<select class="two" v-model="type_value" name="type">
<select class="two" v-model="type_value" name="type" @change="bolting()">
<option>全部</option>
<template v-for="(type,index) in bgValue.type">
<option :key="index" :value="index">{{type}}</option>
</template>
</select>
<select class="two" v-model="status_value" name="status">
<select class="two" v-model="status_value" name="status" @change="bolting()">
<option>全部</option>
<template v-for="(status,index) in bgValue.status">
<option :key="index" :value="index">{{status}}</option>
</template>
</select>
<select class="three" v-model="area_value" name="area">
<select class="three" v-model="area_value" name="area" @change="bolting()">
<option>全部</option>
<template v-for="(area,index) in bgValue.area">
<option :key="index" :value="index">{{area}}</option>
@@ -173,40 +176,45 @@ export default {
type_value: '全部',
status_value: '全部',
area_value: '全部',
value_date: ''
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() {
this.start_time = this.value_date[0]
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: 6
}
@@ -222,22 +230,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('请求数据有问题!')
}
@@ -246,49 +260,12 @@ export default {
.catch(err => {
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;
}
*/
},
handleSizeChange(val) {
this.pageSize = val;
@@ -296,19 +273,6 @@ 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();
},
@@ -319,14 +283,16 @@ export default {
this.handleCurrentChange(this.currentPage);
this.getDataOne()
},
beforeUpdate() {
mounted() { },
beforeUpdate() {
localStorage.setItem('page', this.currentPage)
},
beforeDestroy() {
// localStorage.clear()
localStorage.setItem('page',1)
localStorage.setItem('page', 1)
},
mounted() { }
destroyed() {
localStorage.removeItem('page')
}
};
</script>

View File

@@ -5,7 +5,7 @@ module.exports = {
indexPath: 'index.html',
devServer: {
open: false,
open: true,
host: 'localhost',
port: '8080',
https: false,