kun 19/10/11 17
This commit is contained in:
@@ -179,18 +179,12 @@
|
||||
<input class="i-i" type="text" name="prespo" v-model="prespo" value required />
|
||||
</div>
|
||||
</aside>
|
||||
<aside>
|
||||
<div>
|
||||
<label>通讯地址:</label>
|
||||
<input class="i-i" type="text" name="respoadd" v-model="respoadd" value required />
|
||||
</div>
|
||||
</aside>
|
||||
<!-- end -->
|
||||
<!-- start -->
|
||||
<aside>
|
||||
<div>
|
||||
<label>项目名称:</label>
|
||||
<input type="text" name="name" v-model="name" value required />
|
||||
<label>通讯地址:</label>
|
||||
<input type="text" name="respoadd" v-model="respoadd" value required />
|
||||
</div>
|
||||
<div>
|
||||
<label>邮政编码:</label>
|
||||
@@ -343,12 +337,15 @@
|
||||
</div>
|
||||
<div class="xxx">
|
||||
<h5>七、项目主责单位意见</h5>
|
||||
<div class="btnn">
|
||||
<!-- @change="getFile($event)" -->
|
||||
<label>
|
||||
上传文件
|
||||
<input type="file" @change="getFile($event)" v-show="false" name="file" />
|
||||
</label>
|
||||
<div class="xxxx">
|
||||
<div class="btnn">
|
||||
<!-- @change="getFile($event)" -->
|
||||
<label>
|
||||
上传文件
|
||||
<input type="file" @change="getFile($event)" v-show="false" name="file" />
|
||||
</label>
|
||||
</div>
|
||||
<span for>只能上传一张图片</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -356,6 +353,7 @@
|
||||
<img class="img-img" :src="file" alt />
|
||||
</template>
|
||||
<div class="ll">
|
||||
<button type="button" @click="btn(0)">上一页</button>
|
||||
<button type="button" @click="submit(0)">保存</button>
|
||||
<button type="submit" @click="submit(1)">提交</button>
|
||||
</div>
|
||||
@@ -445,14 +443,39 @@ export default {
|
||||
computed: {},
|
||||
watch: {},
|
||||
methods: {
|
||||
/** 申报单位承诺 */
|
||||
thf() {
|
||||
this.thff = !this.thff;
|
||||
},
|
||||
/** 下一步 */
|
||||
btn(index) {
|
||||
let s = this.sub;
|
||||
s = index;
|
||||
this.sub = s;
|
||||
|
||||
if (s == 0) {
|
||||
this.sub = s
|
||||
}
|
||||
|
||||
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) {
|
||||
let file = event.target.files[0];
|
||||
let param = new FormData(); //创建form对象
|
||||
@@ -466,8 +489,34 @@ export default {
|
||||
let url = response.data.data.url
|
||||
this.file = url
|
||||
})
|
||||
console.log(this.file);
|
||||
},
|
||||
/** 保存和提交 */
|
||||
submit(index) {
|
||||
if (this.sub == 1) {
|
||||
if (this.prespo == '' || this.respoadd == '' || this.respopcode == '' ||
|
||||
this.respomail == '' || this.respopname == '' ||
|
||||
this.respopost == '' || this.respoophone == '' || this.respoptel == '' ||
|
||||
this.respocname == '' || this.respocpost == '' || this.respocophone == '' ||
|
||||
this.respoctel == '' || this.decldes == '' || this.prodes == '' ||
|
||||
this.prodemo == '' || this.prodemojc == '' || this.prodemotj == '' ||
|
||||
this.prodemojd == '' || this.prodemoxg == '' || this.prodemofg == '' ||
|
||||
this.prodemotwo == '' || this.funds == ''
|
||||
) {
|
||||
alert('以上内容不可为空!')
|
||||
return
|
||||
} else if (this.thff == false) {
|
||||
alert('请同意:申报单位承诺')
|
||||
return
|
||||
} else if (this.file == '') {
|
||||
alert('未上传文件!')
|
||||
return
|
||||
}
|
||||
} else {
|
||||
alert('数据出错!')
|
||||
return
|
||||
}
|
||||
|
||||
let s = this.subStatus;
|
||||
s = index;
|
||||
this.subStatus = s
|
||||
@@ -528,12 +577,11 @@ export default {
|
||||
proimages: _this.proimages
|
||||
}
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.data.code === 200) {
|
||||
alert(res.data.message)
|
||||
alert(res.data.data.msg)
|
||||
_this.file = ''
|
||||
} else {
|
||||
_this.$message.error('请求数据有问题!')
|
||||
alert(res.data.message)
|
||||
}
|
||||
})
|
||||
// eslint-disable-next-line handle-callback-err
|
||||
@@ -541,6 +589,7 @@ export default {
|
||||
console.log(err)
|
||||
})
|
||||
},
|
||||
/** 获取下拉框的数据 */
|
||||
getData() {
|
||||
let _this = this
|
||||
this.$http({
|
||||
@@ -559,17 +608,49 @@ export default {
|
||||
.catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
},
|
||||
/** 判断是否有权限进行项目申报 */
|
||||
status() {
|
||||
let id = sessionStorage.id
|
||||
let _this = this
|
||||
this.$http({
|
||||
method: 'post',
|
||||
url: 'v1/society/get-status',
|
||||
data: { id: id }
|
||||
}).then(res => {
|
||||
if (res.data.code === 200) {
|
||||
if (res.data.data.status === 0) {
|
||||
alert('您当前的社会状态为:黑名单!')
|
||||
_this.$router.push({
|
||||
name: 'project'
|
||||
})
|
||||
} else if (res.data.data.status === 3) {
|
||||
alert('您当前的社会状态为:待审核!')
|
||||
_this.$router.push({
|
||||
name: 'project'
|
||||
})
|
||||
} else {
|
||||
_this.getData()
|
||||
}
|
||||
} else {
|
||||
_this.$message.error('请求数据有问题!')
|
||||
}
|
||||
})
|
||||
// eslint-disable-next-line handle-callback-err
|
||||
.catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getData()
|
||||
},
|
||||
mounted() { }
|
||||
created() { },
|
||||
mounted() {
|
||||
this.status()
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
.img-img{
|
||||
.img-img {
|
||||
margin-top: 25px;
|
||||
width: 150px;
|
||||
height: 250px;
|
||||
@@ -661,6 +742,25 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.xxxx {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
span {
|
||||
display: inline-block;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
text-align: center;
|
||||
margin-left: 25px;
|
||||
font-family: "MicrosoftYaHei";
|
||||
font-size: 16px;
|
||||
font-weight: normal;
|
||||
font-stretch: normal;
|
||||
letter-spacing: 0px;
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
|
||||
.btnn {
|
||||
cursor: pointer;
|
||||
width: 96px;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<!-- 公告 -->
|
||||
<div class="top">
|
||||
<img :src="imgUrl.xlb" alt />
|
||||
<div>
|
||||
<div v-if="bgValue.announcement">
|
||||
<span>{{bgValue.announcement.name + bgValue.announcement.pro_content}}</span>
|
||||
<time>{{bgValue.announcement.protime}}</time>
|
||||
</div>
|
||||
@@ -43,21 +43,33 @@
|
||||
</div>
|
||||
<!-- 下拉框 -->
|
||||
<div class="select">
|
||||
<select class="one" name="date">
|
||||
<div class="block">
|
||||
<el-date-picker
|
||||
v-model="value_date"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></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" name="type">
|
||||
</select>-->
|
||||
<select class="two" v-model="type_value" name="type">
|
||||
<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" v-model="status_value" name="status">
|
||||
<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" v-model="area_value" name="area">
|
||||
<option>全部</option>
|
||||
<template v-for="(area,index) in bgValue.area">
|
||||
<option :key="index" :value="index">{{area}}</option>
|
||||
</template>
|
||||
@@ -117,7 +129,7 @@
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="currentPage"
|
||||
:page-size="pageSize"
|
||||
:pager-count="7"
|
||||
:pager-count="5"
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
:total="totalCount"
|
||||
@@ -157,12 +169,17 @@ export default {
|
||||
text: ["全部"],
|
||||
sub: 0,
|
||||
bgData: [],
|
||||
bgValue: []
|
||||
bgValue: [],
|
||||
type_value: '全部',
|
||||
status_value: '全部',
|
||||
area_value: '全部',
|
||||
value_date: ''
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
methods: {
|
||||
/** 获取下拉框数据 */
|
||||
getDataOne() {
|
||||
let _this = this
|
||||
this.$http({
|
||||
@@ -183,20 +200,20 @@ export default {
|
||||
})
|
||||
|
||||
},
|
||||
/** 获取项目列表 */
|
||||
getDataTwo() {
|
||||
let _this = this
|
||||
this.$http({
|
||||
method: 'get',
|
||||
url: 'v1/project/list',
|
||||
params: {
|
||||
page: _this.currentPage
|
||||
page: _this.currentPage,
|
||||
num: 6
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.data.code === 200) {
|
||||
_this.bgData = res.data.data.data
|
||||
_this.totalCount = _this.bgData.allNum
|
||||
_this.pageSize = _this.bgData.info.length
|
||||
console.log(_this.bgData)
|
||||
_this.totalCount = _this.bgData.allPage
|
||||
} else {
|
||||
_this.$message.error('请求数据有问题!')
|
||||
}
|
||||
@@ -274,7 +291,7 @@ export default {
|
||||
*/
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageNum = val;
|
||||
this.pageSize = val;
|
||||
this.getPackData();
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
@@ -298,10 +315,16 @@ export default {
|
||||
getPackData() { }
|
||||
},
|
||||
created() {
|
||||
this.currentPage = Number(localStorage.getItem("pagination")) || 1;
|
||||
this.currentPage = Number(localStorage.getItem("page")) || 1;
|
||||
this.handleCurrentChange(this.currentPage);
|
||||
this.getDataOne()
|
||||
this.getDataTwo()
|
||||
},
|
||||
beforeUpdate() {
|
||||
localStorage.setItem('page', this.currentPage)
|
||||
},
|
||||
beforeDestroy() {
|
||||
// localStorage.clear()
|
||||
localStorage.setItem('page',1)
|
||||
},
|
||||
mounted() { }
|
||||
};
|
||||
@@ -533,6 +556,43 @@ export default {
|
||||
margin-top: 50px;
|
||||
margin-bottom: 50px;
|
||||
|
||||
.block {
|
||||
/deep/.el-range-editor.el-input__inner {
|
||||
width: 325px;
|
||||
background: url("../../../static/img/xa.png") 280px center no-repeat;
|
||||
background-color: #f9f8f8;
|
||||
}
|
||||
|
||||
/deep/.el-date-editor .el-range-input {
|
||||
background-color: #f9f8f8;
|
||||
font-family: "MicrosoftYaHei";
|
||||
font-size: 18px;
|
||||
font-weight: normal;
|
||||
font-stretch: normal;
|
||||
line-height: 33px;
|
||||
letter-spacing: 0px;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
/deep/.el-input__inner {
|
||||
border: 1px solid #c7c7c7;
|
||||
}
|
||||
|
||||
/deep/.el-date-editor .el-range-separator {
|
||||
font-family: "MicrosoftYaHei";
|
||||
font-size: 18px;
|
||||
font-weight: normal;
|
||||
font-stretch: normal;
|
||||
line-height: 33px;
|
||||
letter-spacing: 0px;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
/deep/ .el-input__icon {
|
||||
width: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.one {
|
||||
padding-left: 30px;
|
||||
box-sizing: border-box;
|
||||
|
||||
Reference in New Issue
Block a user