kun 10/8/21:47

This commit is contained in:
沈学坤
2019-10-08 21:47:14 +08:00
parent 60fa6ac94e
commit 8b2b683ca4
13 changed files with 745 additions and 334 deletions

View File

@@ -18,25 +18,25 @@
<div>
<section>
<span>初筛通过</span>
<span>10</span>
<span>{{bgValue.overview_one}}</span>
</section>
</div>
<div>
<section>
<span>立项通过</span>
<span>10</span>
<span>{{bgValue.overview_two}}</span>
</section>
</div>
<div>
<section>
<span>执行中</span>
<span>10</span>
<span>{{bgValue.overview_three}}</span>
</section>
</div>
<div>
<section>
<span>已完结</span>
<span>10</span>
<span>{{bgValue.overview_four}}</span>
</section>
</div>
</div>
@@ -48,12 +48,12 @@
<option value>2017/10/14 2017/10/15</option>
</select>
<select class="two" name="type">
<template v-for="(type,index) in types">
<template v-for="(type,index) in bgValue.type">
<option :key="index" :value="index">{{type}}</option>
</template>
</select>
<select class="three" name="area">
<template v-for="(area,index) in area">
<template v-for="(area,index) in bgValue.area">
<option :key="index" :value="index">{{area}}</option>
</template>
</select>
@@ -72,8 +72,8 @@
</div>
<!-- 主题内容 -->
<div class="cc">
<template v-for="(item,index) in bgData">
<div class="list" :key="index" v-if="index < 9" @click="$jump('schedule')">
<template v-for="(item,index) in bgData.info">
<div class="list" :key="index" @click="$jump('schedule')">
<div class="div">
<div class="bb">
<h3>{{item.name}}</h3>
@@ -83,10 +83,10 @@
</div>
<dl>
<dt>
<img :src="imgUrl.tg" v-if="item.state == 0" />
<img :src="imgUrl.btg" v-if="item.state == 1" />
<img :src="imgUrl.shz" v-if="item.state == 2" />
<img :src="imgUrl.zxz" v-if="item.state == 3" />
<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.zxz" v-else-if="item.tid == 10" />
<img :src="imgUrl.shz" v-else />
</dt>
<dd>
<span class="iconfont icon-zuzhijiegou"></span>
@@ -112,9 +112,10 @@
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-size="pageSize"
:pager-count="7"
background
layout="prev, pager, next"
:total="10"
:total="totalCount"
></el-pagination>
</div>
</div>
@@ -150,14 +151,13 @@ export default {
text: ["全部", "项目初筛", "项目立项"],
sub: 0,
bgData: [],
types: [],
area: []
bgValue: []
};
},
computed: {},
watch: {},
methods: {
getData() {
getDataOne() {
let _this = this
this.$http({
method: 'get',
@@ -165,8 +165,7 @@ export default {
data: {}
}).then(res => {
if (res.data.code === 200) {
_this.types = res.data.data.type
_this.area = res.data.data.area
_this.bgValue = res.data.data
} else {
_this.$message.error('请求数据有问题!')
}
@@ -176,16 +175,67 @@ export default {
console.log(err)
})
},
getDataTwo() {
let _this = this
this.$http({
method: 'get',
url: 'v1/project/list',
data: {}
params: {
page: _this.currentPage
}
}).then(res => {
if (res.data.code === 200) {
_this.bgData = res.data.data.data.info
console.log(_this.bgData);
_this.bgData = res.data.data.data
_this.totalCount = _this.bgData.allNum
_this.pageSize = _this.bgData.info.length
console.log(_this.bgData)
} else {
_this.$message.error('请求数据有问题!')
}
})
// eslint-disable-next-line handle-callback-err
.catch(err => {
console.log(err)
})
},
getDataThree() {
let _this = this
this.$http({
method: 'get',
url: 'v1/project/list',
params: {
prolink: 1,
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)
})
},
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('请求数据有问题!')
}
@@ -199,6 +249,20 @@ export default {
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;
default:
break;
}
},
handleSizeChange(val) {
this.pageNum = val;
@@ -206,6 +270,21 @@ 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;
default:
break;
}
this.getPackData();
},
getPackData() { }
@@ -213,7 +292,8 @@ export default {
created() {
this.currentPage = Number(localStorage.getItem("pagination")) || 1;
this.handleCurrentChange(this.currentPage);
this.getData()
this.getDataOne()
this.getDataTwo()
},
mounted() { }
};
@@ -336,14 +416,13 @@ export default {
color: #666666;
}
.block{
.block {
width: 288px;
height: 14px;
line-height: 14px;
display: inline-block;
overflow: hidden;
}
}
dt {