kun 19 11 12 14 55

This commit is contained in:
沈学坤
2019-11-12 14:54:22 +08:00
parent 7d57570097
commit d56cee75c2
6 changed files with 936 additions and 621 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -10,12 +10,20 @@
<span>{{list.name + list.pro_content}}</span>
<time>{{list.protime}}</time>
</aside>-->
<span>{{bgValue.announcement[0].name + bgValue.announcement[0].pro_content}}</span>
<time>{{bgValue.announcement[0].protime}}</time>
<span>{{
bgValue.announcement[0].name + bgValue.announcement[0].pro_content
}}</span>
<time>{{ bgValue.announcement[0].protime }}</time>
</div>
<div v-else>
<span>暂无项目申报内容</span>
<time>{{new Date().getFullYear() + '-' + (new Date().getMonth()+1) + '-' + new Date().getDate()}}</time>
<time>{{
new Date().getFullYear() +
"-" +
(new Date().getMonth() + 1) +
"-" +
new Date().getDate()
}}</time>
</div>
</div>
<div class="bottom">
@@ -26,25 +34,25 @@
<div>
<section>
<span>初筛通过</span>
<span>{{bgValue.overview_one}}</span>
<span>{{ bgValue.overview_one }}</span>
</section>
</div>
<div>
<section>
<span>立项通过</span>
<span>{{bgValue.overview_two}}</span>
<span>{{ bgValue.overview_two }}</span>
</section>
</div>
<div>
<section>
<span>执行中</span>
<span>{{bgValue.overview_three}}</span>
<span>{{ bgValue.overview_three }}</span>
</section>
</div>
<div>
<section>
<span>已完结</span>
<span>{{bgValue.overview_four}}</span>
<span>{{ bgValue.overview_four }}</span>
</section>
</div>
</div>
@@ -63,22 +71,37 @@
@change="bolting()"
></el-date-picker>
</div>
<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>
<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" @change="bolting()">
<option>全部</option>
<template v-for="(status,index) in bgValue.status">
<option :key="index" :value="index">{{status}}</option>
<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" @change="bolting()">
<option>全部</option>
<template v-for="(area,index) in bgValue.area">
<option :key="index" :value="index">{{area}}</option>
<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>
</template>
</select>
<span @click="$jump('application')">项目申报</span>
@@ -89,48 +112,57 @@
<div class="top-t">
<h3
@click="btn(index)"
v-for="(item,index) in text"
v-for="(item, index) in text"
:key="index"
:class="sub == index ? 'style' : ''"
>{{item}}</h3>
>
{{ item }}
</h3>
</div>
<!-- 主题内容 -->
<div class="cc">
<template v-if="cd > 0">
<div
class="list"
v-for="(item,index) in bgData.info"
v-for="(item, index) in bgData.info"
:key="index"
@click="item.tid == 1000 ? $jP('application',{id:item.id}) : $jParams('schedule',{id:item.id})"
@click="
item.tid == 1000
? $jP('application', { id: item.id })
: $jParams('schedule', { id: item.id })
"
>
<div class="div">
<div class="bb">
<h3>{{item.name}}</h3>
<h3>{{ item.name }}</h3>
<h5>活动</h5>
</div>
<time>{{item.protime}}</time>
<time>{{ item.protime }}</time>
</div>
<dl>
<dt>
<img :src="imgUrl.tg" v-if="item.tid == 5" />
<img :src="imgUrl.btg" v-else-if="item.tid == 4 || item.tid == 9" />
<img
:src="imgUrl.btg"
v-else-if="item.tid == 4 || item.tid == 9"
/>
<img :src="imgUrl.zxz" v-else-if="item.tid == 10" />
<img :src="imgUrl.wtj" v-else-if="item.tid == 1000" />
<img :src="imgUrl.shz" v-else />
</dt>
<dd>
<span class="iconfont icon-zuzhijiegou"></span>
<span>{{item.party_id}}</span>
<span>{{ item.party_id }}</span>
</dd>
<dd>
<span class="iconfont icon-weizhi"></span>
<span>{{item.postaladdress}}</span>
<span>{{ item.postaladdress }}</span>
</dd>
<dd>
<span class="iconfont icon-shenhetongguo1"></span>
<span class="block-k">
<b>项目状态</b>
{{item.status}}
{{ item.status }}
</span>
</dd>
</dl>
@@ -190,12 +222,12 @@ export default {
sub: 0,
bgData: [],
bgValue: [],
type_value: '全部',
status_value: '全部',
area_value: '全部',
value_date: '',
start_time: '',
end_time: '',
type_value: "项目类型",
status_value: "项目状态",
area_value: "落地区域",
value_date: "",
start_time: "",
end_time: "",
cd: Number
};
},
@@ -204,29 +236,41 @@ export default {
methods: {
/** 筛选函数 */
bolting() {
this.start_time = this.value_date[0]
this.start_time = this.value_date[0];4
this.end_time = this.value_date[1]
this.getDataTwo(this.start_time, this.end_time, this.type_value, this.status_value, this.area_value)
this.getDataTwo(
this.start_time,
this.end_time,
this.type_value,
this.status_value,
this.area_value
);
},
/** 获取项目列表 */
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 = ''
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 (status === "项目状态") {
this.status_value = "";
status = "";
}
if (area === '全部') {
this.area_value = ''
area = ''
if (area === "落地区域") {
this.area_value = "";
area = "";
}
let _this = this
let _this = this;
this.$http({
method: 'get',
url: 'v1/project/list',
method: "get",
url: "v1/project/list",
params: {
start_time: start_time,
end_time: end_time,
@@ -236,50 +280,51 @@ export default {
page: _this.currentPage,
num: 6
}
}).then(res => {
if (res.data.code === 200) {
_this.bgData = res.data.data.data
_this.totalCount = _this.bgData.allPage
_this.cd = _this.bgData.info.length
} else {
_this.$message.error('请求数据有问题!')
}
})
.then(res => {
if (res.data.code === 200) {
_this.bgData = res.data.data.data;
_this.totalCount = _this.bgData.allPage;
_this.cd = _this.bgData.info.length;
} else {
_this.$message.error("请求数据有问题!");
}
})
// eslint-disable-next-line handle-callback-err
.catch(err => {
console.log(err)
})
console.log(err);
});
if (this.type_value === '') {
this.type_value = '全部'
if (this.type_value === "") {
this.type_value = "项目类型";
}
if (this.status_value === '') {
this.status_value = '全部'
if (this.status_value === "") {
this.status_value = "项目状态";
}
if (this.area_value === '') {
this.area_value = '全部'
if (this.area_value === "") {
this.area_value = "落地区域";
}
},
/** 获取下拉框数据 */
getDataOne() {
let _this = this
let _this = this;
this.$http({
method: 'get',
url: 'v1/project/get-info',
method: "get",
url: "v1/project/get-info",
data: {}
}).then(res => {
if (res.data.code === 200) {
_this.bgValue = res.data.data
_this.cd = _this.bgValue.announcement.length
} else {
_this.$message.error('请求数据有问题!')
}
})
.then(res => {
if (res.data.code === 200) {
_this.bgValue = res.data.data;
_this.cd = _this.bgValue.announcement.length;
} else {
_this.$message.error("请求数据有问题!");
}
})
// eslint-disable-next-line handle-callback-err
.catch(err => {
console.log(err)
})
console.log(err);
});
},
btn(index) {
let s = this.sub;
@@ -295,27 +340,27 @@ export default {
this.getDataTwo();
this.getPackData();
},
getPackData() { }
getPackData() {}
},
created() {
this.currentPage = Number(localStorage.getItem("page")) || 1;
this.handleCurrentChange(this.currentPage);
this.getDataOne()
this.getDataOne();
},
mounted() { },
mounted() {},
beforeUpdate() {
localStorage.setItem('page', this.currentPage)
localStorage.setItem("page", this.currentPage);
},
beforeDestroy() {
localStorage.setItem('page', 1)
localStorage.setItem("page", 1);
},
destroyed() {
localStorage.removeItem('page')
localStorage.removeItem("page");
}
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.wrapper {
min-width: 1280px;
box-sizing: border-box;
@@ -355,8 +400,8 @@ export default {
}
/deep/ .el-icon.el-icon-arrow-left::before {
content: '上一页';
font-family: 'MicrosoftYaHei';
content: "上一页";
font-family: "MicrosoftYaHei";
font-size: 12px;
font-weight: normal;
font-stretch: normal;
@@ -373,8 +418,8 @@ export default {
}
/deep/ .el-icon.el-icon-arrow-right::before {
content: '下一页';
font-family: 'MicrosoftYaHei';
content: "下一页";
font-family: "MicrosoftYaHei";
font-size: 12px;
font-weight: normal;
font-stretch: normal;
@@ -388,7 +433,7 @@ export default {
// height: 773px;
.cc::after {
content: '';
content: "";
width: 367px;
display: block;
height: 0px;
@@ -430,7 +475,7 @@ export default {
margin-right: 16px;
}
span {
font-family: 'MicrosoftYaHei';
font-family: "MicrosoftYaHei";
font-size: 14px;
font-weight: normal;
font-stretch: normal;
@@ -468,7 +513,7 @@ export default {
justify-content: space-between;
align-items: center;
time {
font-family: 'MicrosoftYaHei';
font-family: "MicrosoftYaHei";
font-size: 14px;
font-weight: normal;
font-stretch: normal;
@@ -490,7 +535,7 @@ export default {
font-size: 12px;
}
h3 {
font-family: 'MicrosoftYaHei';
font-family: "MicrosoftYaHei";
font-size: 16px;
font-weight: normal;
font-stretch: normal;
@@ -517,7 +562,7 @@ export default {
text-align: center;
margin-right: 78px;
width: 90px;
font-family: 'MicrosoftYaHei';
font-family: "MicrosoftYaHei";
font-size: 20px;
font-weight: normal;
font-stretch: normal;
@@ -529,7 +574,7 @@ export default {
color: #e60012;
position: relative;
&::after {
content: '';
content: "";
width: 91px;
height: 2px;
background-image: linear-gradient(#e60012, #e60012),
@@ -554,13 +599,13 @@ export default {
.block {
/deep/.el-range-editor.el-input__inner {
width: 325px;
background: url('../../../static/img/xa.png') 90% center no-repeat;
background: url("../../../static/img/xa.png") 90% center no-repeat;
background-color: #f9f8f8;
}
/deep/.el-date-editor .el-range-input {
background-color: #f9f8f8;
font-family: 'MicrosoftYaHei';
font-family: "MicrosoftYaHei";
font-size: 18px;
font-weight: normal;
font-stretch: normal;
@@ -574,7 +619,7 @@ export default {
}
/deep/.el-date-editor .el-range-separator {
font-family: 'MicrosoftYaHei';
font-family: "MicrosoftYaHei";
font-size: 18px;
font-weight: normal;
font-stretch: normal;
@@ -596,7 +641,7 @@ export default {
-moz-appearance: none;
-webkit-appearance: none;
/* 右侧添加小箭头的背景图 */
background: url('../../../static/img/xa.png') 90% center no-repeat;
background: url("../../../static/img/xa.png") 90% center no-repeat;
background-size: 14px 8px;
// width: 325px;
padding: 0px 30px;
@@ -618,7 +663,7 @@ export default {
-moz-appearance: none;
-webkit-appearance: none;
/* 右侧添加小箭头的背景图 */
background: url('../../../static/img/xa.png') 90% center no-repeat;
background: url("../../../static/img/xa.png") 90% center no-repeat;
background-size: 14px 8px;
// width: 134px;
padding: 0px 30px;
@@ -633,16 +678,17 @@ export default {
}
.three {
padding-left: 30px;
box-sizing: border-box;
// padding-left: 30px;
/* 清除默认的箭头样式 */
appearance: none;
-moz-appearance: none;
-webkit-appearance: none;
/* 右侧添加小箭头的背景图 */
background: url('../../../static/img/xa.png') 90px center no-repeat;
background: url("../../../static/img/xa.png") 90% center no-repeat;
background-size: 14px 8px;
width: 134px;
// width: 134px;
padding: 0 35px 0 30px;
box-sizing: border-box;
height: 38px;
background-color: #f9f8f8;
border-radius: 4px;
@@ -668,7 +714,7 @@ export default {
linear-gradient(#e60012, #e60012);
background-blend-mode: normal, normal;
border-radius: 4px;
font-family: 'MicrosoftYaHei';
font-family: "MicrosoftYaHei";
font-size: 16px;
font-weight: normal;
font-stretch: normal;
@@ -707,7 +753,7 @@ export default {
align-items: center;
span:first-child {
font-family: 'MicrosoftYaHei';
font-family: "MicrosoftYaHei";
font-size: 18px;
font-weight: normal;
font-stretch: normal;
@@ -716,7 +762,7 @@ export default {
}
span:last-child {
font-family: 'MicrosoftYaHei';
font-family: "MicrosoftYaHei";
font-size: 24px;
font-weight: bold;
font-stretch: normal;
@@ -728,7 +774,7 @@ export default {
}
.top-p {
font-family: 'MicrosoftYaHei';
font-family: "MicrosoftYaHei";
font-size: 18px;
font-weight: normal;
font-stretch: normal;
@@ -790,7 +836,7 @@ export default {
align-items: center;
span {
font-family: 'MicrosoftYaHei';
font-family: "MicrosoftYaHei";
font-size: 20px;
font-weight: normal;
font-stretch: normal;
@@ -799,7 +845,7 @@ export default {
}
time {
font-family: 'MicrosoftYaHei';
font-family: "MicrosoftYaHei";
font-size: 20px;
font-weight: normal;
letter-spacing: 0px;
@@ -819,4 +865,4 @@ export default {
transform: translateY(-150px);
}
}
</style>
</style>

View File

@@ -182,7 +182,7 @@
<div class="one-e">
<p>
<span>
<a :href="zData.proimages" :download="fileName">
<a :href="dataFile[0].url" :download="dataFile[0].name">
<span>下载</span>
</a>
<!-- <a
@@ -199,7 +199,12 @@
<section id="preview" v-if="popupStatus">
<div class="tc" @click="preview()"></div>
<section class="tc-text">
<a :href="zData.proimages" target="_blank">{{zData.proimages}}</a>
<a
v-for="(list,index) in dataFile"
:key="index"
:href="list.url"
target="_blank"
>{{list.url}}</a>
</section>
<!-- <img class="tc-text" :src="zData.proimages" /> -->
</section>
@@ -249,8 +254,9 @@ export default {
],
zData: [],
zDate: [],
dataFile: null,
id: Number,
fileName:null
fileName: null
};
},
computed: {},
@@ -306,8 +312,14 @@ export default {
if (res.data.data.code === 200) {
_this.zData = res.data.data.data.ProjectDetails
_this.zDate = res.data.data.data.ProjectReview
let index = _this.zData.proimages.lastIndexOf("\/")
_this.fileName = _this.zData.proimages.substring(index+1,_this.zData.proimages.length)
let arr = JSON.parse(_this.zData.proimages)
let newArr = arr.map(element => {
return ({ name: element.name, url: element.url })
});
_this.dataFile = newArr
console.log(_this.dataFile);
// let index = _this.zData.proimages.lastIndexOf("\/")
// _this.fileName = _this.zData.proimages.substring(index+1,_this.zData.proimages.length)
} else {
alert('请求失败!')
}
@@ -363,7 +375,7 @@ export default {
.tc-text {
// width: 350px;
// width:100%;
padding: 32px;
padding: 30px;
box-sizing: border-box;
height: auto;
background-color: #fff;
@@ -372,7 +384,9 @@ export default {
top: 50%;
transform: translateX(-50%) translateY(-50%);
a{
a {
display: inline-block;
margin-top: 10px;
cursor: pointer;
}
}