@@ -8,6 +8,47 @@ export function permanentList(query) { | |||
params: query | |||
}) | |||
} | |||
// 查询一张图 | |||
export function pictureList(query) { | |||
return request({ | |||
url: '/subcontract/picture/list', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 新增一张图 | |||
export function pictureAdd(data) { | |||
return request({ | |||
url: '/subcontract/picture/add', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 修改一张图 | |||
export function pictureEdit(data) { | |||
return request({ | |||
url: '/subcontract/picture/edit', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 删除一张图 | |||
export function pictureRemove(id) { | |||
return request({ | |||
url: '/subcontract/picture/remove/' + id, | |||
method: 'get' | |||
}) | |||
} | |||
// 一张图详情 | |||
export function pictureGet(id) { | |||
return request({ | |||
url: '/subcontract/picture/get/' + id, | |||
method: 'get' | |||
}) | |||
} | |||
// 查询合同信息列表 | |||
export function contractionList(query) { | |||
return request({ | |||
@@ -479,7 +520,7 @@ export function delStatisticsRemove(id) { | |||
url: '/entity/statistics/remove/' + id, | |||
method: 'get' | |||
}) | |||
} | |||
} | |||
//统计填报 - 模板 | |||
export const entityStatisticsTemplate = (data) => { | |||
@@ -505,4 +546,4 @@ export const entityStatisticsDetail = (id) => { | |||
url: '/entity/statistics/detail/'+id, | |||
method: 'get' | |||
}) | |||
} | |||
} |
@@ -118,9 +118,11 @@ const whiteList = [ | |||
'/sunVillage_info/index_code', //详情页 | |||
'/sunVillage_info/list_finance', //详情页 | |||
'/sunVillage_info/list_issues', //详情页 | |||
'/sunVillage_info/list_photo', //详情页 | |||
'/sunVillage_info/list_tourists_detail', //详情页 | |||
'/sunVillage_info/list_issues_detail', //详情页 | |||
'/sunVillage_info/list_finance_detail', //详情页 | |||
'/sunVillage_info/list_photo_detail', //详情页 | |||
'/sunVillage_info/list_finance_ranking', //详情页 | |||
'/sunVillage_info/list_tourists_ranking', //详情页 | |||
'/sunVillage_info/login_code', //详情页 | |||
@@ -3316,6 +3316,42 @@ export const constantRoutes = [ | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/list_tourists'], resolve) | |||
}, | |||
{ ////阳光村务(新)-- 一张图公开 | |||
path: '/sunVillage_info/list_photo', | |||
name: 'sunVillageInfoListPhoto', | |||
meta: { | |||
title: '一张图公开', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/list_photo'], resolve) | |||
}, | |||
{ ////阳光村务(新)-- 一张图公开 | |||
path: '/sunVillage_info/list_photo_add', | |||
name: 'sunVillageInfoListPhotoAdd', | |||
meta: { | |||
title: '新增一张图公开', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/list_photo_add'], resolve) | |||
}, | |||
{ ////阳光村务(新)-- 一张图公开 | |||
path: '/sunVillage_info/list_photo_edit', | |||
name: 'sunVillageInfoListPhotoEdit', | |||
meta: { | |||
title: '修改一张图公开', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/list_photo_edit'], resolve) | |||
}, | |||
{ ////阳光村务(新)-- 一张图公开 | |||
path: '/sunVillage_info/list_photo_detail', | |||
name: 'sunVillageInfoListPhotoDetail1', | |||
meta: { | |||
title: '一张图公开查看', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/list_photo_detail'], resolve) | |||
}, | |||
{ ////阳光村务(新)-- 固定资产 | |||
path: '/sunVillage_info/fixedAssets', | |||
name: 'sunVillageInfoFixedAssets', | |||
@@ -59,6 +59,7 @@ | |||
<router-link :to="{name:'sunVillageInfoStatisticalReport'}" class="nav_item n_9">统计填报</router-link> | |||
<router-link :to="{name:'sunVillageInfoListIssues'}" class="nav_item n_3">重大事项</router-link> | |||
<router-link :to="{name:'sunVillageInfoListVote'}" class="nav_item n_5">发布投票</router-link> | |||
<router-link :to="{name:'sunVillageInfoListPhoto'}" class="nav_item n_11">一张图公开</router-link> | |||
</div> | |||
</div> | |||
@@ -385,6 +386,11 @@ | |||
background-size: 50%; | |||
margin-bottom: 20PX; | |||
} | |||
&.n_11 { | |||
background: url('../../assets/images/sunVillage_info/index_block_11.png') no-repeat center top; | |||
background-size: 50%; | |||
margin-bottom: 20PX; | |||
} | |||
&.n_01 { | |||
@@ -24,6 +24,9 @@ | |||
<router-link :to="{name:'sunVillageInfoListIssues',query:{type:'code'}}" class="nav_item n3"> | |||
<img src="../../assets/images/sunVillage_info/index_code_btn_3.png"> | |||
</router-link> | |||
<router-link :to="{name:'sunVillageInfoListPhoto',query:{type:'code'}}" class="nav_item n4"> | |||
<img src="../../assets/images/sunVillage_info/index_code_btn_4.png"> | |||
</router-link> | |||
</div> | |||
</div> | |||
<div class="footer"> | |||
@@ -195,6 +198,9 @@ | |||
margin-left: 20px; | |||
margin-bottom: 20px; | |||
} | |||
&.n4{ | |||
margin-left: 20px; | |||
} | |||
&.n_1{ | |||
background: url('../../assets/images/sunVillage_info/index_block_01.png') no-repeat center top; | |||
background-size: 50%; | |||
@@ -12,11 +12,7 @@ | |||
</div> | |||
<div class="record_list" v-if="showTab"> | |||
<div :class="{'flex_block':true , 'current':queryParams.year == ''}" @click="tabClick('')">全部</div> | |||
<div :class="{'flex_block':true , 'current':queryParams.year == '2022'}" @click="tabClick('2022')">2022</div> | |||
<div :class="{'flex_block':true , 'current':queryParams.year == '2021'}" @click="tabClick('2021')">2021</div> | |||
<div :class="{'flex_block':true , 'current':queryParams.year == '2020'}" @click="tabClick('2020')">2020</div> | |||
<div :class="{'flex_block':true , 'current':queryParams.year == '2019'}" @click="tabClick('2019')">2019</div> | |||
<div :class="{'flex_block':true , 'current':queryParams.year == '2018'}" @click="tabClick('2018')">2018</div> | |||
<div v-for="(item,index) in yearList" :key="index" :class="{'flex_block':true , 'current':queryParams.year == item}" @click="tabClick(item)">{{item}}</div> | |||
</div> | |||
</div> | |||
<div class="list_main"> | |||
@@ -87,12 +83,14 @@ | |||
pageSize:10, | |||
orderByColumn:'createTime', | |||
isAsc:'desc', | |||
year:'2022', | |||
year:new Date().getFullYear(), | |||
}, | |||
uploadFiles1:[], | |||
projectId:'', | |||
projectIndex:'', | |||
showBtn:true, | |||
nowYear:new Date().getFullYear(), | |||
yearList:[] | |||
}; | |||
}, | |||
created() { | |||
@@ -101,6 +99,9 @@ | |||
if (this.$route.query.type == 'code'){ | |||
this.showBtn = false; | |||
} | |||
for (let i = 0 ; i < 5 ; i++){ | |||
this.yearList.push(this.nowYear-i); | |||
} | |||
}, | |||
methods: { | |||
getList(){ | |||
@@ -181,9 +181,9 @@ | |||
this.openNy = data; | |||
this.showBuildTime = false; | |||
}, | |||
deleteFile1(file){ | |||
console.log(file) | |||
// this.form.openPic.splice(index,1); | |||
deleteFile1(file,detail){ | |||
console.log(detail) | |||
this.openPic2.splice(detail.index,1) | |||
}, | |||
afterRead(file) { | |||
// 此时可以自行将文件上传至服务器 | |||
@@ -12,11 +12,7 @@ | |||
</div> | |||
<div class="record_list" v-if="showTab"> | |||
<div :class="{'flex_block':true , 'current':queryParams.year == ''}" @click="tabClick('')">全部</div> | |||
<div :class="{'flex_block':true , 'current':queryParams.year == '2022'}" @click="tabClick('2022')">2022</div> | |||
<div :class="{'flex_block':true , 'current':queryParams.year == '2021'}" @click="tabClick('2021')">2021</div> | |||
<div :class="{'flex_block':true , 'current':queryParams.year == '2020'}" @click="tabClick('2020')">2020</div> | |||
<div :class="{'flex_block':true , 'current':queryParams.year == '2019'}" @click="tabClick('2019')">2019</div> | |||
<div :class="{'flex_block':true , 'current':queryParams.year == '2018'}" @click="tabClick('2018')">2018</div> | |||
<div v-for="(item,index) in yearList" :key="index" :class="{'flex_block':true , 'current':queryParams.year == item}" @click="tabClick(item)">{{item}}</div> | |||
</div> | |||
</div> | |||
<div class="list_main"> | |||
@@ -84,12 +80,14 @@ | |||
pageSize:10, | |||
orderByColumn:'createTime', | |||
isAsc:'desc', | |||
year:'2022', | |||
year:new Date().getFullYear(), | |||
}, | |||
uploadFiles1:[], | |||
projectId:'', | |||
projectIndex:'', | |||
showBtn:true, | |||
nowYear:new Date().getFullYear(), | |||
yearList:[] | |||
}; | |||
}, | |||
created() { | |||
@@ -98,6 +96,9 @@ | |||
if (this.$route.query.type == 'code'){ | |||
this.showBtn = false; | |||
} | |||
for (let i = 0 ; i < 5 ; i++){ | |||
this.yearList.push(this.nowYear-i); | |||
} | |||
}, | |||
methods: { | |||
getList(){ | |||
@@ -0,0 +1,427 @@ | |||
<template> | |||
<div class="home_wrapper"> | |||
<div class="header_main"> | |||
一张图公开 | |||
<div class="return_btn" @click="onClickLeft"></div> | |||
<div class="add_btn" @click="goAdd" v-show="showBtn"></div> | |||
</div> | |||
<!-- <div class="record_main">--> | |||
<!-- <div class="record_det">--> | |||
<!-- <div class="year_l" @click="tabShow"><i :class="{'icon':true , 'zk':!showTab , 'ss':showTab } "></i>{{queryParams.year == '' ? '全部': queryParams.year}}<span class="unit">{{queryParams.year == '' ? '': '年'}}</span></div>--> | |||
<!-- <div class="total_r">共{{listLength}}条公告</div>--> | |||
<!-- </div>--> | |||
<!-- <div class="record_list" v-if="showTab">--> | |||
<!-- <div :class="{'flex_block':true , 'current':queryParams.year == ''}" @click="tabClick('')">全部</div>--> | |||
<!-- <div v-for="(item,index) in yearList" :key="index" :class="{'flex_block':true , 'current':queryParams.year == item}" @click="tabClick(item)">{{item}}</div>--> | |||
<!-- </div>--> | |||
<!-- </div>--> | |||
<div class="list_main"> | |||
<van-list | |||
v-model="loading" | |||
:finished="finished" | |||
finished-text="没有更多了" | |||
@load="getList" | |||
> | |||
<!----1--> | |||
<div class="item" v-for="(item,index) in applicationList" :key="index" > | |||
<div class="info" @click="goDetail(item.id)"> | |||
<div class="title"> | |||
<i class="icon_box"></i> | |||
<p class="news_title">{{item.deptName}}{{item.pictureType}}</p> | |||
<p class="tips_mark" v-if="index==0">新</p> | |||
</div> | |||
<div class="time"> | |||
<div class="icon_time"></div> | |||
{{item.openAt}} | |||
</div> | |||
</div> | |||
<div class="operation"> | |||
<!-- delete 删除 edit编辑 view查看 list榜单 --> | |||
<div class="opera_btn edit" @click="goEdit(item.id)" v-show="showBtn"> | |||
<i class="icon "></i> | |||
</div> | |||
<div class="opera_btn delete" @click="goRemove(item.id,index)" v-show="showBtn"> | |||
<i class="icon"></i> | |||
</div> | |||
</div> | |||
</div> | |||
</van-list> | |||
</div> | |||
<!-- <div class="bottom_tips">--> | |||
<!-- <span class="xs">已经到底啦</span>--> | |||
<!-- </div>--> | |||
</div> | |||
</template> | |||
<script> | |||
import { pictureList , pictureRemove } from "@/api/sunVillage_info/fixedAssets"; | |||
import Cookies from "js-cookie"; | |||
import request from '@/utils/request' | |||
export default { | |||
name: "certificateList", | |||
data() { | |||
return { | |||
applicationList:[], | |||
applicationListSecond:[], | |||
assetStatusOptions:[], | |||
auditStatus:[], | |||
loading: false, | |||
finished: false, | |||
show: false, | |||
showTab: false, | |||
fileList:[], | |||
listLength:'0', | |||
searchInput:'', | |||
queryParams:{ | |||
pageNum:1, | |||
pageSize:10, | |||
orderByColumn:'createTime', | |||
isAsc:'desc', | |||
}, | |||
uploadFiles1:[], | |||
projectId:'', | |||
projectIndex:'', | |||
showBtn:true, | |||
nowYear:new Date().getFullYear(), | |||
yearList:[] | |||
}; | |||
}, | |||
created() { | |||
this.houseGetDicts("picture_type").then((response) => { | |||
this.pictureTypeOptions = response.data; | |||
}); | |||
this.queryParams.bookId = Cookies.get('bookId'); | |||
this.queryParams.deptId = Cookies.get('deptId'); | |||
if (this.$route.query.type == 'code'){ | |||
this.showBtn = false; | |||
} | |||
for (let i = 0 ; i < 5 ; i++){ | |||
this.yearList.push(this.nowYear-i); | |||
} | |||
}, | |||
methods: { | |||
getList(){ | |||
var _this = this; | |||
console.log(_this.queryParams) | |||
pictureList(_this.queryParams).then(response => { | |||
_this.listLength = response.total; | |||
response.rows.map(res=>{ | |||
res.pictureType = this.selectDictLabel(this.pictureTypeOptions, res.pictureType); | |||
_this.applicationList.push(res); | |||
}) | |||
if(_this.applicationList.length >= response.total){ | |||
_this.finished = true; | |||
return; | |||
}else{ | |||
_this.loading = false; | |||
_this.queryParams.pageNum += 1 ; | |||
} | |||
}); | |||
}, | |||
tabClick(year){ | |||
this.queryParams.year = year ; | |||
this.applicationList = []; | |||
this.getList(); | |||
}, | |||
tabShow(){ | |||
this.showTab = !this.showTab; | |||
}, | |||
/** 删除按钮操作 */ | |||
handleDelete(row,index) { | |||
let assetStatus = row.assetStatus ? row.assetStatus : data[0].assetStatus; | |||
if (assetStatus === '2' || assetStatus === '3') { | |||
this.$notify({ | |||
message: "不允许删除已出售或已报废的资产", | |||
type: "warning", | |||
}); | |||
return; | |||
} | |||
let useType = row.useType; | |||
if(useType == 3) { | |||
this.$notify({ | |||
message: "出租或出借的资产不允许删除", | |||
type: "warning", | |||
}); | |||
return ; | |||
} | |||
const ids = row.id || this.ids; | |||
this.$dialog.alert( | |||
{ | |||
message:'是否确认删除固定资产?', | |||
title:"警告", | |||
confirmButtonText: "确定", | |||
cancelButtonText: "取消", | |||
} | |||
) | |||
.then(function () { | |||
return delPermanent(ids); | |||
}) | |||
.then(() => { | |||
this.applicationList.splice(index, 1); | |||
this.$notify({ type: 'success', message: '删除成功' }); | |||
}); | |||
}, | |||
goAdd(){ | |||
this.$router.push('/sunVillage_info/list_photo_add') | |||
}, | |||
goDetail(id){ | |||
this.$router.push({path:'/sunVillage_info/list_photo_detail',query: {id:id,type:'tourists'}}) | |||
}, | |||
goEdit(id){ | |||
this.$router.push({path:'/sunVillage_info/list_photo_edit',query: {id:id,type:'finance'}}) | |||
}, | |||
goRanking(id,time){ | |||
this.$router.push({path:'/sunVillage_info/list_tourists_ranking',query: {id:id,time:time}}) | |||
}, | |||
goRemove(id,index){ | |||
this.$dialog.alert({ | |||
title: '提示', | |||
message: '确认删除?', | |||
showCancelButton:true, | |||
}) | |||
.then(() => { | |||
pictureRemove(id).then(response => { | |||
this.$notify({ type: 'success', message: '删除成功' }); | |||
this.applicationList.splice(index,1); | |||
}); | |||
}) | |||
.catch(() => { | |||
// on cancel | |||
}); | |||
} | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.home_wrapper{ | |||
background: #e9e9e9; | |||
min-height: 100vh; | |||
width: 100vw; | |||
.header_main{ | |||
height: 116px; | |||
background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat; | |||
background-size: 100% 100%; | |||
position: fixed; | |||
top: 0; | |||
left: 0; | |||
width: 100%; | |||
font-size: 36px; | |||
line-height: 116px; | |||
text-align: center; | |||
color: #fff; | |||
position: relative; | |||
.return_btn{ | |||
width: 24px; | |||
height: 43.2px; | |||
background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat; | |||
background-size: 20px 36px; | |||
position: absolute; | |||
left: 38px; | |||
top: 36px; | |||
} | |||
.add_btn{ | |||
width: 56.4px; | |||
height: 40.8px; | |||
background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat; | |||
background-size: 47px 34px; | |||
position: absolute; | |||
right: 38px; | |||
top: 36px; | |||
} | |||
} | |||
.record_main{ | |||
padding:30px 22px; | |||
.record_det{ | |||
height: 38px; | |||
line-height: 38px; | |||
display: flex; | |||
justify-content:space-between; | |||
.year_l{ | |||
font-size: 30px; | |||
display: flex; | |||
align-items: center; | |||
color: #858585; | |||
.unit{ | |||
padding-left: 5px; | |||
} | |||
.icon{ | |||
width: 23px; | |||
height: 12px; | |||
display: block; | |||
background: url('../../assets/images/sunVillage_info/list_icon_1.png') no-repeat; | |||
background-size: 100% 100%; | |||
margin-bottom: 4px; | |||
margin-right: 8px; | |||
&.zk { | |||
transform: rotate(0deg) | |||
} | |||
&.ss{ | |||
transform: rotate(180deg) | |||
} | |||
} | |||
} | |||
.total_r{ | |||
font-size: 26px; | |||
letter-spacing: 2px; | |||
} | |||
} | |||
.record_list{ | |||
display: flex; | |||
flex-flow: wrap; | |||
margin-top: 12PX; | |||
.flex_block{ | |||
font-size: 30px; | |||
color: #878787; | |||
padding-right: 30px; | |||
&.current{ | |||
color: #4199fe; | |||
font-weight: bold; | |||
} | |||
} | |||
} | |||
} | |||
.list_main{ | |||
padding:0 22px; | |||
margin-top: 15PX; | |||
.item{ | |||
height: 140px; | |||
border-radius: 30px; | |||
background: #fff; | |||
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||
padding:25px 32px; | |||
display: flex; | |||
margin-bottom: 20px; | |||
.info{ | |||
flex:0 0 450px; | |||
.title{ | |||
display: flex; | |||
font-size: 32px; | |||
align-items: center; | |||
height: 58px; | |||
.icon_box{ | |||
width: 34px; | |||
display: block; | |||
height: 30px; | |||
background: url('../../assets/images/sunVillage_info/list_icon_2.png') no-repeat; | |||
background-size: 100% 100%; | |||
margin-right: 10px; | |||
} | |||
.news_title{ | |||
max-width:330px; | |||
overflow: hidden; | |||
white-space: nowrap; | |||
text-overflow: ellipsis; | |||
-o-text-overflow: ellipsis; | |||
} | |||
.tips_mark{ | |||
width: 34px; | |||
height: 34px; | |||
background: #fa0c0c; | |||
border-radius: 8px; | |||
font-size: 24px; | |||
color: #fff; | |||
text-align: center; | |||
line-height: 34px; | |||
margin-left: 10px; | |||
} | |||
} | |||
.time{ | |||
font-size: 24px; | |||
color: #858585; | |||
display: flex; | |||
align-items: center; | |||
height: 30px; | |||
margin-top: 6px; | |||
.icon_time{ | |||
width: 25px; | |||
height: 25px; | |||
background: url('../../assets/images/sunVillage_info/list_icon_4.png') no-repeat; | |||
background-size: 100% 100%; | |||
margin-right: 10px; | |||
} | |||
} | |||
} | |||
.operation{ | |||
flex: 1; | |||
display: flex; | |||
align-items: center; | |||
justify-content: right; | |||
text-align: right; | |||
.opera_btn{ | |||
width: 52px; | |||
height: 52px; | |||
border-radius: 50%; | |||
display: flex; | |||
align-items: center; | |||
justify-content:center; | |||
&.delete{ | |||
background:#df0707; | |||
margin-left: 10PX; | |||
.icon{ | |||
width: 22px; | |||
height: 29px; | |||
background: url('../../assets/images/sunVillage_info/list_icon_7.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
} | |||
} | |||
&.edit{ | |||
background: #79cf13; | |||
margin-left: 10PX; | |||
.icon { | |||
width: 26px; | |||
height: 25px; | |||
background: url('../../assets/images/sunVillage_info/list_icon_6.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
} | |||
} | |||
&.view{ | |||
background: #3494ff; | |||
margin-left: 10PX; | |||
.icon { | |||
width: 29px; | |||
height: 21px; | |||
background: url('../../assets/images/sunVillage_info/list_icon_3.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
} | |||
} | |||
&.list{ | |||
background: #79cf13; | |||
.icon { | |||
width: 29px; | |||
height: 21px; | |||
background: url('../../assets/images/sunVillage_info/list_icon_10.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
} | |||
} | |||
} | |||
} | |||
} | |||
} | |||
.bottom_tips{ | |||
font-size: 24px; | |||
color: #a7a6a6; | |||
text-align: center; | |||
margin-top: 32px; | |||
background: url('../../assets/images/sunVillage_info/list_icon_8.png') center center no-repeat; | |||
background-size: 260px 2px; | |||
.xs{ | |||
padding:0 8px; | |||
background: #e9e9e9; | |||
} | |||
} | |||
} | |||
</style> |
@@ -0,0 +1,335 @@ | |||
<template> | |||
<div class="home_wrapper"> | |||
<div class="header_main"> | |||
新增一张图公开 | |||
<div class="return_btn" @click="onClickLeft"></div> | |||
<div class="add_btn"></div> | |||
</div> | |||
<van-form @submit="onSubmit"> | |||
<div class="list_main"> | |||
<van-field | |||
readonly | |||
clickable | |||
placeholder="请选择" | |||
v-model="form.openAt" | |||
@click="showBuildTime = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:border="false" | |||
:rules="[{ required: true , message:'请选择购建时间' }]" | |||
> | |||
<template #label> | |||
<img src="../../assets/images/sunVillage_info/add_tit_icon_01.png" width="18"> | |||
<p style="margin-left: 5px;">公开日期</p> | |||
</template> | |||
</van-field> | |||
<van-popup v-model="showBuildTime" position="bottom"> | |||
<van-datetime-picker | |||
v-model="openNy" | |||
type="date" | |||
title="选择年月日" | |||
@confirm="onConfirmOpenNy" | |||
@cancel="showBuildTime = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
readonly | |||
clickable | |||
placeholder="请选择" | |||
v-model="form.pictureTypeText" | |||
@click="showPictureType = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:border="false" | |||
:rules="[{ required: true , message:'请选择一张图类型' }]" | |||
> | |||
<template #label> | |||
<img src="../../assets/images/sunVillage_info/add_tit_icon_02.png" width="18"> | |||
<p style="margin-left: 5px;">类型</p> | |||
</template> | |||
</van-field> | |||
<van-popup v-model="showPictureType" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="pictureTypeOptions" | |||
value-key="dictLabel" | |||
@confirm="onConfirmPictureType" | |||
@cancel="showBodyType = false" | |||
/> | |||
</van-popup> | |||
<van-field readonly input-align="right" :border="false" > | |||
<template #label> | |||
<img src="../../assets/images/sunVillage_info/add_tit_icon_03.png" width="18"> | |||
<p style="margin-left: 5px;">公开图片</p> | |||
</template> | |||
</van-field> | |||
<!-- @delete="deleteFile1"--> | |||
<van-uploader v-model="fileList" :after-read="afterRead" @delete="deleteFile1" style="margin-top: 10PX" /> | |||
<div style="border-top: 1px solid #ededed;margin-top: 10PX;"> | |||
<van-field readonly input-align="right" :border="false" > | |||
<template #label> | |||
<img src="../../assets/images/sunVillage_info/add_tit_icon_04.png" width="18"> | |||
<p style="margin-left: 5px;">附件</p> | |||
</template> | |||
</van-field> | |||
<div> | |||
<div v-for="(item,index) in openFileList" :key="index" style="display: flex;align-items: center;margin-top: 10px;"> | |||
<img src="../../assets/images/sunVillage_info/WORD.png" width="30" v-if="item.type == 'word'"/> | |||
<img src="../../assets/images/sunVillage_info/ECEL.png" width="30" v-if="item.type == 'excel'" /> | |||
<p style="margin-left: 10px;">{{item.name}}</p> | |||
</div> | |||
</div> | |||
<van-uploader accept="*" :after-read="afterReadOpenFile" style="margin-top: 10PX"> | |||
<img src="../../assets/images/sunVillage_info/addFile.png" width="120" /> | |||
</van-uploader> | |||
</div> | |||
<van-field v-model="form.remark" placeholder="请输入备注" input-align="right" :border="false" > | |||
<template #label> | |||
<img src="../../assets/images/sunVillage_info/add_tit_icon_05.png" width="18"> | |||
<p style="margin-left: 5px;">备注</p> | |||
</template> | |||
</van-field> | |||
</div> | |||
<div style="margin: 16px auto;width: 50%;"> | |||
<van-button round block type="primary" native-type="submit"> | |||
保存 | |||
</van-button> | |||
</div> | |||
</van-form> | |||
</div> | |||
</template> | |||
<script> | |||
import { commonUpload , pictureAdd } from "@/api/sunVillage_info/fixedAssets"; | |||
import Cookies from "js-cookie"; | |||
import request from '@/utils/request' | |||
export default { | |||
name: "certificateList", | |||
data() { | |||
return { | |||
showBuildTime:false, | |||
showPictureType:false, | |||
form:{ | |||
openAt:this.format(new Date(),'yyyy-MM-dd'), | |||
openPic:'', | |||
openFile:'', | |||
}, | |||
openPic:[], | |||
pictureTypeOptions:[], | |||
fileList:[], | |||
fileList1:[], | |||
openNy:new Date(), | |||
type:'', | |||
openFile:[], | |||
openFileList:[], | |||
queryParams:{ | |||
bookId:'', | |||
deptId:'' | |||
}, | |||
openFile2:[], | |||
openPic2:[], | |||
}; | |||
}, | |||
created() { | |||
this.houseGetDicts("asset_status").then((response) => { | |||
this.assetStatusOptions = response.data; | |||
}); | |||
this.houseGetDicts("asset_type").then((response) => { | |||
this.assetTypeOptions = response.data; | |||
}); | |||
this.houseGetDicts("use_type").then((response) => { | |||
this.useTypeOptions = response.data; | |||
}); | |||
this.houseGetDicts("picture_type").then((response) => { | |||
this.pictureTypeOptions = response.data; | |||
}); | |||
this.type = this.$route.query.type; | |||
this.queryParams.bookId = Cookies.get('bookId'); | |||
this.queryParams.deptId = Cookies.get('deptId'); | |||
}, | |||
methods: { | |||
onSubmit(){ | |||
var that = this; | |||
that.form.openFile = that.openFile2.join(',') | |||
that.form.openPic = that.openPic2.join(',') | |||
this.form.deptName = Cookies.get('deptName'); | |||
pictureAdd(that.form).then((r1) => { | |||
if (r1.code == 200){ | |||
that.$notify({ type: 'success', message: '新增成功' }); | |||
setTimeout(function(){ | |||
history.back(-1); | |||
},2000) | |||
} | |||
}) | |||
}, | |||
onConfirmOpenNy(data){ | |||
this.form.openAt = this.format(data,'yyyy-MM-dd'); | |||
this.openNy = data; | |||
this.showBuildTime = false; | |||
}, | |||
deleteFile1(file){ | |||
console.log(file) | |||
// this.form.openPic.splice(index,1); | |||
}, | |||
afterRead(file) { | |||
// 此时可以自行将文件上传至服务器 | |||
this.openPic.push(file.file); | |||
let params1 = new FormData(); | |||
params1.append("file", file.file); | |||
commonUpload(params1).then((r1) => { | |||
this.openPic2.push(r1.fileName); | |||
}) | |||
}, | |||
afterReadOpenFile(file){ | |||
let params1 = new FormData(); | |||
params1.append("file", file.file); | |||
commonUpload(params1).then((r1) => { | |||
this.openFile2.push(r1.fileName); | |||
}) | |||
let name = file.file.name; | |||
let type = ''; | |||
if (name.indexOf('.doc') > -1){ | |||
type = 'word'; | |||
}else if(name.indexOf('.xls') > -1){ | |||
type = 'excel'; | |||
} | |||
this.openFileList.push({name:file.file.name,type:type}) | |||
this.openFile.push(file.file); | |||
}, | |||
onConfirmPictureType(data){ | |||
this.form.pictureTypeText = data.dictLabel; | |||
this.form.pictureType = data.dictValue; | |||
this.showPictureType = false; | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
/deep/ .van-button--primary{ | |||
background: url("../../assets/images/sunVillage_info/btn_bg.png") no-repeat; | |||
background-size: 100% 100%; | |||
border: none; | |||
} | |||
.home_wrapper{ | |||
background: #e9e9e9; | |||
min-height: 100vh; | |||
width: 100vw; | |||
.header_main { | |||
height: 116px; | |||
background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat; | |||
background-size: 100% 100%; | |||
position: fixed; | |||
top: 0; | |||
left: 0; | |||
width: 100%; | |||
font-size: 36px; | |||
line-height: 116px; | |||
text-align: center; | |||
color: #fff; | |||
position: relative; | |||
.return_btn { | |||
width: 24px; | |||
height: 43.2px; | |||
background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat; | |||
background-size: 20px 36px; | |||
position: absolute; | |||
left: 38px; | |||
top: 36px; | |||
} | |||
} | |||
.release_head{ | |||
height: 90px; | |||
padding:0 23px; | |||
display: flex; | |||
align-items: center; | |||
font-size: 26px; | |||
color: #929292; | |||
.people{ | |||
flex: 1; | |||
display: flex; | |||
align-items: center; | |||
.icon{ | |||
width: 24px; | |||
height: 21px; | |||
background: url('../../assets/images/sunVillage_info/details_icon_1.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
margin-right: 8px; | |||
} | |||
} | |||
.time{ | |||
flex: 1; | |||
display: flex; | |||
align-items: center; | |||
justify-content:flex-end; | |||
.icon{ | |||
width: 25px; | |||
height: 25px; | |||
background: url('../../assets/images/sunVillage_info/details_icon_2.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
margin-right: 8px; | |||
} | |||
} | |||
} | |||
.release_conetnt{ | |||
padding:0 22px; | |||
font-size: 32px; | |||
color: #252525; | |||
line-height: 44px; | |||
img{ | |||
max-width: 100%; | |||
margin-bottom: 16px; | |||
} | |||
p{ | |||
margin-bottom: 16px; | |||
} | |||
} | |||
.list_main{ | |||
padding:25px; | |||
background: #ffffff; | |||
width: 94%; | |||
margin: 25px auto 0; | |||
border-radius: 15PX; | |||
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||
} | |||
.titBox{ | |||
display: flex; | |||
align-items: center; | |||
} | |||
.tit{ | |||
font-size: 36px; | |||
font-weight: bold; | |||
} | |||
/deep/ .van-cell{ | |||
padding-left: 0!important; | |||
padding-right: 0!important; | |||
padding-bottom: 0!important; | |||
} | |||
/deep/ .van-field__label{ | |||
/*padding-left: 10PX;*/ | |||
width: auto; | |||
display: flex; | |||
align-items: center; | |||
} | |||
/deep/ .van-cell--required::before{ | |||
left: 85PX; | |||
} | |||
/deep/ .van-field__error-message{ | |||
display: none; | |||
} | |||
} | |||
</style> |
@@ -0,0 +1,358 @@ | |||
<template> | |||
<div class="home_wrapper"> | |||
<div class="header_main"> | |||
一张图公开查看 | |||
<div class="return_btn" @click="onClickLeft"></div> | |||
<div class="add_btn"></div> | |||
</div> | |||
<van-form @submit="onSubmit"> | |||
<div class="list_main"> | |||
<van-field | |||
readonly | |||
clickable | |||
placeholder="请选择" | |||
v-model="form.openAt" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:border="false" | |||
:rules="[{ required: true , message:'请选择公开年月' }]" | |||
> | |||
<template #label> | |||
<img src="../../assets/images/sunVillage_info/add_tit_icon_01.png" width="18"> | |||
<p style="margin-left: 5px;">公开年月</p> | |||
</template> | |||
</van-field> | |||
<van-popup v-model="showBuildTime" position="bottom"> | |||
<van-datetime-picker | |||
v-model="openNy" | |||
type="date" | |||
title="选择年月日" | |||
@confirm="onConfirmOpenNy" | |||
@cancel="showBuildTime = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
readonly | |||
clickable | |||
placeholder="请选择" | |||
v-model="form.pictureTypeText" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:border="false" | |||
:rules="[{ required: true , message:'请选择一张图类型' }]" | |||
> | |||
<template #label> | |||
<img src="../../assets/images/sunVillage_info/add_tit_icon_02.png" width="18"> | |||
<p style="margin-left: 5px;">类型</p> | |||
</template> | |||
</van-field> | |||
<van-popup v-model="showPictureType" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="pictureTypeOptions" | |||
value-key="dictLabel" | |||
@confirm="onConfirmPictureType" | |||
@cancel="showBodyType = false" | |||
/> | |||
</van-popup> | |||
<van-field readonly input-align="right" :border="false" > | |||
<template #label> | |||
<img src="../../assets/images/sunVillage_info/add_tit_icon_03.png" width="18"> | |||
<p style="margin-left: 5px;">公开图片</p> | |||
</template> | |||
</van-field> | |||
<!-- @delete="deleteFile1"--> | |||
<van-uploader v-model="openPic" :show-upload="false" :deletable="false" style="margin-top: 10PX" /> | |||
<div style="border-top: 1px solid #ededed;margin-top: 10PX;"> | |||
<van-field readonly input-align="right" :border="false" > | |||
<template #label> | |||
<img src="../../assets/images/sunVillage_info/add_tit_icon_04.png" width="18"> | |||
<p style="margin-left: 5px;">附件</p> | |||
</template> | |||
</van-field> | |||
<div> | |||
<div v-for="(item,index) in openFile" :key="index" style="display: flex;align-items: center;margin-top: 10px;"> | |||
<img src="../../assets/images/sunVillage_info/WORD.png" width="30" v-if="item.type == 'word'"/> | |||
<img src="../../assets/images/sunVillage_info/ECEL.png" width="30" v-if="item.type == 'excel'" /> | |||
<a :href="item.url" style="margin-left: 10px;color: #333333">{{item.name}}</a> | |||
</div> | |||
</div> | |||
<!-- <van-uploader accept="*" :after-read="afterReadOpenFile" style="margin-top: 10PX">--> | |||
<!-- <img src="../../assets/images/sunVillage_info/addFile.png" width="120" />--> | |||
<!-- </van-uploader>--> | |||
</div> | |||
<van-field readonly v-model="form.remark" placeholder="备注" input-align="right" :border="false" > | |||
<template #label> | |||
<img src="../../assets/images/sunVillage_info/add_tit_icon_05.png" width="18"> | |||
<p style="margin-left: 5px;">备注</p> | |||
</template> | |||
</van-field> | |||
</div> | |||
</van-form> | |||
</div> | |||
</template> | |||
<script> | |||
import {commonUpload, pictureGet, pictureEdit} from "@/api/sunVillage_info/fixedAssets"; | |||
import Cookies from "js-cookie"; | |||
import request from '@/utils/request' | |||
export default { | |||
name: "certificateList", | |||
data() { | |||
return { | |||
showBuildTime:false, | |||
showPictureType:false, | |||
form:{ | |||
openAt:this.format(new Date(),'yyyy-MM-dd'), | |||
openPic:'', | |||
openFile:'', | |||
}, | |||
openPic:[], | |||
pictureTypeOptions:[], | |||
fileList:[], | |||
fileList1:[], | |||
openNy:new Date(), | |||
type:'', | |||
openFile:[], | |||
openFileList:[], | |||
queryParams:{ | |||
bookId:'', | |||
deptId:'' | |||
}, | |||
openFile2:[], | |||
openPic2:[], | |||
}; | |||
}, | |||
created() { | |||
this.houseGetDicts("asset_status").then((response) => { | |||
this.assetStatusOptions = response.data; | |||
}); | |||
this.houseGetDicts("asset_type").then((response) => { | |||
this.assetTypeOptions = response.data; | |||
}); | |||
this.houseGetDicts("use_type").then((response) => { | |||
this.useTypeOptions = response.data; | |||
}); | |||
this.houseGetDicts("picture_type").then((response) => { | |||
this.pictureTypeOptions = response.data; | |||
}); | |||
this.type = this.$route.query.type; | |||
this.queryParams.bookId = Cookies.get('bookId'); | |||
this.queryParams.deptId = Cookies.get('deptId'); | |||
this.queryParams.id = this.$route.query.id; | |||
this.getDetail(); | |||
}, | |||
methods: { | |||
getDetail(id){ | |||
pictureGet(this.$route.query.id).then((res) => { | |||
var that = this ; | |||
res.data.pictureTypeText = this.selectDictLabel(this.pictureTypeOptions, res.data.pictureType); | |||
if (res.data.openFile!='' && res.data.openFile != null && res.data.openFile != undefined){ | |||
this.openFile = res.data.openFile.split(',') | |||
this.openFile2 = res.data.openFile.split(',') | |||
this.openFile.map((rr,i)=>{ | |||
let name = rr.substr(27,rr.length); | |||
let type = ''; | |||
if (name.indexOf('.doc') > -1){ | |||
type = 'word'; | |||
}else if(name.indexOf('.xls') > -1){ | |||
type = 'excel'; | |||
} | |||
this.openFile[i] = {name:name,type:type} | |||
}) | |||
} | |||
if (res.data.openPic!='' && res.data.openPic != null && res.data.openPic != undefined){ | |||
this.openPic = res.data.openPic.split(',') | |||
this.openPic2 = res.data.openPic.split(',') | |||
this.openPic.map((rrr,i)=>{ | |||
this.openPic[i] = {url:'/api'+rrr} | |||
}) | |||
} | |||
that.form = res.data; | |||
}) | |||
}, | |||
onSubmit(){ | |||
var that = this; | |||
that.form.openFile = that.openFile2.join(',') | |||
that.form.openPic = that.openPic2.join(',') | |||
this.form.deptName = Cookies.get('deptName'); | |||
pictureEdit(that.form).then((r1) => { | |||
if (r1.code == 200){ | |||
that.$notify({ type: 'success', message: '修改成功' }); | |||
setTimeout(function(){ | |||
history.back(-1); | |||
},2000) | |||
} | |||
}) | |||
}, | |||
onConfirmOpenNy(data){ | |||
this.form.openAt = this.format(data,'yyyy-MM-dd'); | |||
this.openNy = data; | |||
this.showBuildTime = false; | |||
}, | |||
deleteFile1(file){ | |||
console.log(file) | |||
// this.form.openPic.splice(index,1); | |||
}, | |||
afterRead(file) { | |||
// 此时可以自行将文件上传至服务器 | |||
// this.openPic.push(file.file); | |||
let params1 = new FormData(); | |||
params1.append("file", file.file); | |||
commonUpload(params1).then((r1) => { | |||
this.openPic2.push(r1.fileName); | |||
}) | |||
}, | |||
afterReadOpenFile(file){ | |||
let params1 = new FormData(); | |||
params1.append("file", file.file); | |||
commonUpload(params1).then((r1) => { | |||
this.openFile2.push(r1.fileName); | |||
}) | |||
let name = file.file.name; | |||
let type = ''; | |||
if (name.indexOf('.doc') > -1){ | |||
type = 'word'; | |||
}else if(name.indexOf('.xls') > -1){ | |||
type = 'excel'; | |||
} | |||
this.openFileList.push({name:file.file.name,type:type}) | |||
this.openFile.push(file.file); | |||
}, | |||
onConfirmPictureType(data){ | |||
this.form.pictureTypeText = data.dictLabel; | |||
this.form.pictureType = data.dictValue; | |||
this.showPictureType = false; | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
/deep/ .van-button--primary{ | |||
background: url("../../assets/images/sunVillage_info/btn_bg.png") no-repeat; | |||
background-size: 100% 100%; | |||
border: none; | |||
} | |||
.home_wrapper{ | |||
background: #e9e9e9; | |||
min-height: 100vh; | |||
width: 100vw; | |||
.header_main { | |||
height: 116px; | |||
background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat; | |||
background-size: 100% 100%; | |||
position: fixed; | |||
top: 0; | |||
left: 0; | |||
width: 100%; | |||
font-size: 36px; | |||
line-height: 116px; | |||
text-align: center; | |||
color: #fff; | |||
position: relative; | |||
.return_btn { | |||
width: 24px; | |||
height: 43.2px; | |||
background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat; | |||
background-size: 20px 36px; | |||
position: absolute; | |||
left: 38px; | |||
top: 36px; | |||
} | |||
} | |||
.release_head{ | |||
height: 90px; | |||
padding:0 23px; | |||
display: flex; | |||
align-items: center; | |||
font-size: 26px; | |||
color: #929292; | |||
.people{ | |||
flex: 1; | |||
display: flex; | |||
align-items: center; | |||
.icon{ | |||
width: 24px; | |||
height: 21px; | |||
background: url('../../assets/images/sunVillage_info/details_icon_1.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
margin-right: 8px; | |||
} | |||
} | |||
.time{ | |||
flex: 1; | |||
display: flex; | |||
align-items: center; | |||
justify-content:flex-end; | |||
.icon{ | |||
width: 25px; | |||
height: 25px; | |||
background: url('../../assets/images/sunVillage_info/details_icon_2.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
margin-right: 8px; | |||
} | |||
} | |||
} | |||
.release_conetnt{ | |||
padding:0 22px; | |||
font-size: 32px; | |||
color: #252525; | |||
line-height: 44px; | |||
img{ | |||
max-width: 100%; | |||
margin-bottom: 16px; | |||
} | |||
p{ | |||
margin-bottom: 16px; | |||
} | |||
} | |||
.list_main{ | |||
padding:25px; | |||
background: #ffffff; | |||
width: 94%; | |||
margin: 25px auto 0; | |||
border-radius: 15PX; | |||
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||
} | |||
.titBox{ | |||
display: flex; | |||
align-items: center; | |||
} | |||
.tit{ | |||
font-size: 36px; | |||
font-weight: bold; | |||
} | |||
/deep/ .van-cell{ | |||
padding-left: 0!important; | |||
padding-right: 0!important; | |||
padding-bottom: 0!important; | |||
} | |||
/deep/ .van-field__label{ | |||
/*padding-left: 10PX;*/ | |||
width: auto; | |||
display: flex; | |||
align-items: center; | |||
} | |||
/deep/ .van-cell--required::before{ | |||
left: 85PX; | |||
} | |||
/deep/ .van-field__error-message{ | |||
display: none; | |||
} | |||
} | |||
</style> |
@@ -0,0 +1,366 @@ | |||
<template> | |||
<div class="home_wrapper"> | |||
<div class="header_main"> | |||
修改一张图公开 | |||
<div class="return_btn" @click="onClickLeft"></div> | |||
<div class="add_btn"></div> | |||
</div> | |||
<van-form @submit="onSubmit"> | |||
<div class="list_main"> | |||
<van-field | |||
readonly | |||
clickable | |||
placeholder="请选择" | |||
v-model="form.openAt" | |||
@click="showBuildTime = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:border="false" | |||
:rules="[{ required: true , message:'请选择公开年月' }]" | |||
> | |||
<template #label> | |||
<img src="../../assets/images/sunVillage_info/add_tit_icon_01.png" width="18"> | |||
<p style="margin-left: 5px;">公开年月</p> | |||
</template> | |||
</van-field> | |||
<van-popup v-model="showBuildTime" position="bottom"> | |||
<van-datetime-picker | |||
v-model="openNy" | |||
type="date" | |||
title="选择年月日" | |||
@confirm="onConfirmOpenNy" | |||
@cancel="showBuildTime = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
readonly | |||
clickable | |||
placeholder="请选择" | |||
v-model="form.pictureTypeText" | |||
@click="showPictureType = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:border="false" | |||
:rules="[{ required: true , message:'请选择一张图类型' }]" | |||
> | |||
<template #label> | |||
<img src="../../assets/images/sunVillage_info/add_tit_icon_02.png" width="18"> | |||
<p style="margin-left: 5px;">类型</p> | |||
</template> | |||
</van-field> | |||
<van-popup v-model="showPictureType" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="pictureTypeOptions" | |||
value-key="dictLabel" | |||
@confirm="onConfirmPictureType" | |||
@cancel="showBodyType = false" | |||
/> | |||
</van-popup> | |||
<van-field readonly input-align="right" :border="false" > | |||
<template #label> | |||
<img src="../../assets/images/sunVillage_info/add_tit_icon_03.png" width="18"> | |||
<p style="margin-left: 5px;">公开图片</p> | |||
</template> | |||
</van-field> | |||
<!-- @delete="deleteFile1"--> | |||
<van-uploader v-model="openPic" :after-read="afterRead" @delete="deleteFile1" style="margin-top: 10PX" /> | |||
<div style="border-top: 1px solid #ededed;margin-top: 10PX;"> | |||
<van-field readonly input-align="right" :border="false" > | |||
<template #label> | |||
<img src="../../assets/images/sunVillage_info/add_tit_icon_04.png" width="18"> | |||
<p style="margin-left: 5px;">附件</p> | |||
</template> | |||
</van-field> | |||
<div> | |||
<div v-for="(item,index) in openFile" :key="index" style="display: flex;align-items: center;margin-top: 10px;"> | |||
<img src="../../assets/images/sunVillage_info/WORD.png" width="30" v-if="item.type == 'word'"/> | |||
<img src="../../assets/images/sunVillage_info/ECEL.png" width="30" v-if="item.type == 'excel'" /> | |||
<p style="margin-left: 10px;">{{item.name}}</p> | |||
</div> | |||
</div> | |||
<van-uploader accept="*" :after-read="afterReadOpenFile" style="margin-top: 10PX"> | |||
<img src="../../assets/images/sunVillage_info/addFile.png" width="120" /> | |||
</van-uploader> | |||
</div> | |||
<van-field v-model="form.remark" placeholder="请输入备注" input-align="right" :border="false" > | |||
<template #label> | |||
<img src="../../assets/images/sunVillage_info/add_tit_icon_05.png" width="18"> | |||
<p style="margin-left: 5px;">备注</p> | |||
</template> | |||
</van-field> | |||
</div> | |||
<div style="margin: 16px auto;width: 50%;"> | |||
<van-button round block type="primary" native-type="submit"> | |||
保存 | |||
</van-button> | |||
</div> | |||
</van-form> | |||
</div> | |||
</template> | |||
<script> | |||
import {commonUpload, pictureGet, pictureEdit} from "@/api/sunVillage_info/fixedAssets"; | |||
import Cookies from "js-cookie"; | |||
import request from '@/utils/request' | |||
export default { | |||
name: "certificateList", | |||
data() { | |||
return { | |||
showBuildTime:false, | |||
showPictureType:false, | |||
form:{ | |||
openAt:this.format(new Date(),'yyyy-MM-dd'), | |||
openPic:'', | |||
openFile:'', | |||
}, | |||
openPic:[], | |||
pictureTypeOptions:[], | |||
fileList:[], | |||
fileList1:[], | |||
openNy:new Date(), | |||
type:'', | |||
openFile:[], | |||
openFileList:[], | |||
queryParams:{ | |||
bookId:'', | |||
deptId:'' | |||
}, | |||
openFile2:[], | |||
openPic2:[], | |||
}; | |||
}, | |||
created() { | |||
this.houseGetDicts("asset_status").then((response) => { | |||
this.assetStatusOptions = response.data; | |||
}); | |||
this.houseGetDicts("asset_type").then((response) => { | |||
this.assetTypeOptions = response.data; | |||
}); | |||
this.houseGetDicts("use_type").then((response) => { | |||
this.useTypeOptions = response.data; | |||
}); | |||
this.houseGetDicts("picture_type").then((response) => { | |||
this.pictureTypeOptions = response.data; | |||
}); | |||
this.type = this.$route.query.type; | |||
this.queryParams.bookId = Cookies.get('bookId'); | |||
this.queryParams.deptId = Cookies.get('deptId'); | |||
this.queryParams.id = this.$route.query.id; | |||
this.getDetail(); | |||
}, | |||
methods: { | |||
getDetail(id){ | |||
pictureGet(this.$route.query.id).then((res) => { | |||
var that = this ; | |||
res.data.pictureTypeText = this.selectDictLabel(this.pictureTypeOptions, res.data.pictureType); | |||
if (res.data.openFile!='' && res.data.openFile != null && res.data.openFile != undefined){ | |||
this.openFile = res.data.openFile.split(',') | |||
this.openFile2 = res.data.openFile.split(',') | |||
this.openFile.map((rr,i)=>{ | |||
let name = rr.substr(27,rr.length); | |||
let type = ''; | |||
if (name.indexOf('.doc') > -1){ | |||
type = 'word'; | |||
}else if(name.indexOf('.xls') > -1){ | |||
type = 'excel'; | |||
} | |||
this.openFile[i] = {name:name,type:type} | |||
}) | |||
} | |||
if (res.data.openPic!='' && res.data.openPic != null && res.data.openPic != undefined){ | |||
this.openPic = res.data.openPic.split(',') | |||
this.openPic2 = res.data.openPic.split(',') | |||
this.openPic.map((rrr,i)=>{ | |||
this.openPic[i] = {url:'/api'+rrr} | |||
}) | |||
} | |||
that.form = res.data; | |||
}) | |||
}, | |||
onSubmit(){ | |||
var that = this; | |||
that.form.openFile = that.openFile2.join(',') | |||
that.form.openPic = that.openPic2.join(',') | |||
this.form.deptName = Cookies.get('deptName'); | |||
pictureEdit(that.form).then((r1) => { | |||
if (r1.code == 200){ | |||
that.$notify({ type: 'success', message: '修改成功' }); | |||
setTimeout(function(){ | |||
history.back(-1); | |||
},2000) | |||
} | |||
}) | |||
}, | |||
onConfirmOpenNy(data){ | |||
this.form.openAt = this.format(data,'yyyy-MM-dd'); | |||
this.openNy = data; | |||
this.showBuildTime = false; | |||
}, | |||
deleteFile1(file){ | |||
console.log(file) | |||
// this.form.openPic.splice(index,1); | |||
}, | |||
afterRead(file) { | |||
// 此时可以自行将文件上传至服务器 | |||
// this.openPic.push(file.file); | |||
let params1 = new FormData(); | |||
params1.append("file", file.file); | |||
commonUpload(params1).then((r1) => { | |||
this.openPic2.push(r1.fileName); | |||
}) | |||
}, | |||
afterReadOpenFile(file){ | |||
let params1 = new FormData(); | |||
params1.append("file", file.file); | |||
commonUpload(params1).then((r1) => { | |||
this.openFile2.push(r1.fileName); | |||
}) | |||
let name = file.file.name; | |||
let type = ''; | |||
if (name.indexOf('.doc') > -1){ | |||
type = 'word'; | |||
}else if(name.indexOf('.xls') > -1){ | |||
type = 'excel'; | |||
} | |||
this.openFileList.push({name:file.file.name,type:type}) | |||
this.openFile.push(file.file); | |||
}, | |||
onConfirmPictureType(data){ | |||
this.form.pictureTypeText = data.dictLabel; | |||
this.form.pictureType = data.dictValue; | |||
this.showPictureType = false; | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
/deep/ .van-button--primary{ | |||
background: url("../../assets/images/sunVillage_info/btn_bg.png") no-repeat; | |||
background-size: 100% 100%; | |||
border: none; | |||
} | |||
.home_wrapper{ | |||
background: #e9e9e9; | |||
min-height: 100vh; | |||
width: 100vw; | |||
.header_main { | |||
height: 116px; | |||
background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat; | |||
background-size: 100% 100%; | |||
position: fixed; | |||
top: 0; | |||
left: 0; | |||
width: 100%; | |||
font-size: 36px; | |||
line-height: 116px; | |||
text-align: center; | |||
color: #fff; | |||
position: relative; | |||
.return_btn { | |||
width: 24px; | |||
height: 43.2px; | |||
background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat; | |||
background-size: 20px 36px; | |||
position: absolute; | |||
left: 38px; | |||
top: 36px; | |||
} | |||
} | |||
.release_head{ | |||
height: 90px; | |||
padding:0 23px; | |||
display: flex; | |||
align-items: center; | |||
font-size: 26px; | |||
color: #929292; | |||
.people{ | |||
flex: 1; | |||
display: flex; | |||
align-items: center; | |||
.icon{ | |||
width: 24px; | |||
height: 21px; | |||
background: url('../../assets/images/sunVillage_info/details_icon_1.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
margin-right: 8px; | |||
} | |||
} | |||
.time{ | |||
flex: 1; | |||
display: flex; | |||
align-items: center; | |||
justify-content:flex-end; | |||
.icon{ | |||
width: 25px; | |||
height: 25px; | |||
background: url('../../assets/images/sunVillage_info/details_icon_2.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
margin-right: 8px; | |||
} | |||
} | |||
} | |||
.release_conetnt{ | |||
padding:0 22px; | |||
font-size: 32px; | |||
color: #252525; | |||
line-height: 44px; | |||
img{ | |||
max-width: 100%; | |||
margin-bottom: 16px; | |||
} | |||
p{ | |||
margin-bottom: 16px; | |||
} | |||
} | |||
.list_main{ | |||
padding:25px; | |||
background: #ffffff; | |||
width: 94%; | |||
margin: 25px auto 0; | |||
border-radius: 15PX; | |||
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||
} | |||
.titBox{ | |||
display: flex; | |||
align-items: center; | |||
} | |||
.tit{ | |||
font-size: 36px; | |||
font-weight: bold; | |||
} | |||
/deep/ .van-cell{ | |||
padding-left: 0!important; | |||
padding-right: 0!important; | |||
padding-bottom: 0!important; | |||
} | |||
/deep/ .van-field__label{ | |||
/*padding-left: 10PX;*/ | |||
width: auto; | |||
display: flex; | |||
align-items: center; | |||
} | |||
/deep/ .van-cell--required::before{ | |||
left: 85PX; | |||
} | |||
/deep/ .van-field__error-message{ | |||
display: none; | |||
} | |||
} | |||
</style> |
@@ -0,0 +1,424 @@ | |||
<template> | |||
<div class="home_wrapper"> | |||
<div class="header_main"> | |||
一张图公开 | |||
<div class="return_btn" @click="onClickLeft"></div> | |||
<div class="add_btn" @click="goAdd" v-show="showBtn"></div> | |||
</div> | |||
<!-- <div class="record_main">--> | |||
<!-- <div class="record_det">--> | |||
<!-- <div class="year_l" @click="tabShow"><i :class="{'icon':true , 'zk':!showTab , 'ss':showTab } "></i>{{queryParams.year == '' ? '全部': queryParams.year}}<span class="unit">{{queryParams.year == '' ? '': '年'}}</span></div>--> | |||
<!-- <div class="total_r">共{{listLength}}条公告</div>--> | |||
<!-- </div>--> | |||
<!-- <div class="record_list" v-if="showTab">--> | |||
<!-- <div :class="{'flex_block':true , 'current':queryParams.year == ''}" @click="tabClick('')">全部</div>--> | |||
<!-- <div v-for="(item,index) in yearList" :key="index" :class="{'flex_block':true , 'current':queryParams.year == item}" @click="tabClick(item)">{{item}}</div>--> | |||
<!-- </div>--> | |||
<!-- </div>--> | |||
<div class="list_main"> | |||
<van-list | |||
v-model="loading" | |||
:finished="finished" | |||
finished-text="没有更多了" | |||
@load="getList" | |||
> | |||
<!----1--> | |||
<div style="display: flex;flex-wrap: wrap;justify-content: space-between;"> | |||
<div class="item" v-for="(item,index) in applicationList" :key="index" > | |||
<div class="info"> | |||
<div class="title"> | |||
<van-uploader v-model="item.openPic2" max-count="1" :show-upload="false" :deletable="false" multiple /> | |||
</div> | |||
<!-- <div class="time">--> | |||
<!-- <div class="icon_time"></div>--> | |||
<!-- {{item.openNy}}--> | |||
<!-- </div>--> | |||
</div> | |||
<div class="operation"> | |||
<!-- delete 删除 edit编辑 view查看 list榜单 --> | |||
<div class="opera_btn edit" @click="goEdit(item.id)" v-show="showBtn"> | |||
<i class="icon "></i> | |||
</div> | |||
<div class="opera_btn delete" @click="goRemove(item.id,index)" v-show="showBtn"> | |||
<i class="icon"></i> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</van-list> | |||
</div> | |||
<!-- <div class="bottom_tips">--> | |||
<!-- <span class="xs">已经到底啦</span>--> | |||
<!-- </div>--> | |||
</div> | |||
</template> | |||
<script> | |||
import { pictureList , pictureRemove } from "@/api/sunVillage_info/fixedAssets"; | |||
import Cookies from "js-cookie"; | |||
import request from '@/utils/request' | |||
export default { | |||
name: "certificateList", | |||
data() { | |||
return { | |||
applicationList:[], | |||
applicationListSecond:[], | |||
assetStatusOptions:[], | |||
auditStatus:[], | |||
loading: false, | |||
finished: false, | |||
show: false, | |||
showTab: false, | |||
fileList:[], | |||
listLength:'0', | |||
searchInput:'', | |||
queryParams:{ | |||
pageNum:1, | |||
pageSize:10, | |||
orderByColumn:'createTime', | |||
isAsc:'desc', | |||
}, | |||
uploadFiles1:[], | |||
projectId:'', | |||
projectIndex:'', | |||
showBtn:true, | |||
nowYear:new Date().getFullYear(), | |||
yearList:[] | |||
}; | |||
}, | |||
created() { | |||
this.queryParams.bookId = Cookies.get('bookId'); | |||
this.queryParams.deptId = Cookies.get('deptId'); | |||
if (this.$route.query.type == 'code'){ | |||
this.showBtn = false; | |||
} | |||
for (let i = 0 ; i < 5 ; i++){ | |||
this.yearList.push(this.nowYear-i); | |||
} | |||
}, | |||
methods: { | |||
getList(){ | |||
var _this = this; | |||
console.log(_this.queryParams) | |||
pictureList(_this.queryParams).then(response => { | |||
_this.listLength = response.total; | |||
response.rows.map(res=>{ | |||
if (res.openPic !='' && res.openPic != null && res.openPic != undefined){ | |||
res.openPic = res.openPic.split(',') | |||
res.openPic2 = []; | |||
res.openPic.map((rrr,i)=>{ | |||
res.openPic2.push({url:'/api'+rrr}) | |||
}) | |||
} | |||
_this.applicationList.push(res); | |||
}) | |||
if(_this.applicationList.length >= response.total){ | |||
_this.finished = true; | |||
return; | |||
}else{ | |||
_this.loading = false; | |||
_this.queryParams.pageNum += 1 ; | |||
} | |||
}); | |||
}, | |||
tabClick(year){ | |||
this.queryParams.year = year ; | |||
this.applicationList = []; | |||
this.getList(); | |||
}, | |||
tabShow(){ | |||
this.showTab = !this.showTab; | |||
}, | |||
/** 删除按钮操作 */ | |||
handleDelete(row,index) { | |||
let assetStatus = row.assetStatus ? row.assetStatus : data[0].assetStatus; | |||
if (assetStatus === '2' || assetStatus === '3') { | |||
this.$notify({ | |||
message: "不允许删除已出售或已报废的资产", | |||
type: "warning", | |||
}); | |||
return; | |||
} | |||
let useType = row.useType; | |||
if(useType == 3) { | |||
this.$notify({ | |||
message: "出租或出借的资产不允许删除", | |||
type: "warning", | |||
}); | |||
return ; | |||
} | |||
const ids = row.id || this.ids; | |||
this.$dialog.alert( | |||
{ | |||
message:'是否确认删除固定资产?', | |||
title:"警告", | |||
confirmButtonText: "确定", | |||
cancelButtonText: "取消", | |||
} | |||
) | |||
.then(function () { | |||
return delPermanent(ids); | |||
}) | |||
.then(() => { | |||
this.applicationList.splice(index, 1); | |||
this.$notify({ type: 'success', message: '删除成功' }); | |||
}); | |||
}, | |||
goAdd(){ | |||
this.$router.push('/sunVillage_info/list_photo_add') | |||
}, | |||
goDetail(id){ | |||
this.$router.push({path:'/sunVillage_info/list_tourists_detail',query: {id:id,type:'tourists'}}) | |||
}, | |||
goEdit(id){ | |||
this.$router.push({path:'/sunVillage_info/list_tourists_edit',query: {id:id,type:'finance'}}) | |||
}, | |||
goRanking(id,time){ | |||
this.$router.push({path:'/sunVillage_info/list_tourists_ranking',query: {id:id,time:time}}) | |||
}, | |||
goRemove(id,index){ | |||
this.$dialog.alert({ | |||
title: '提示', | |||
message: '确认删除?', | |||
showCancelButton:true, | |||
}) | |||
.then(() => { | |||
pictureRemove(id).then(response => { | |||
this.$notify({ type: 'success', message: '删除成功' }); | |||
this.applicationList.splice(index,1); | |||
}); | |||
}) | |||
.catch(() => { | |||
// on cancel | |||
}); | |||
} | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
/deep/ .van-uploader__preview{ | |||
margin: 0; | |||
} | |||
.home_wrapper{ | |||
background: #e9e9e9; | |||
min-height: 100vh; | |||
width: 100vw; | |||
.header_main{ | |||
height: 116px; | |||
background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat; | |||
background-size: 100% 100%; | |||
position: fixed; | |||
top: 0; | |||
left: 0; | |||
width: 100%; | |||
font-size: 36px; | |||
line-height: 116px; | |||
text-align: center; | |||
color: #fff; | |||
position: relative; | |||
.return_btn{ | |||
width: 24px; | |||
height: 43.2px; | |||
background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat; | |||
background-size: 20px 36px; | |||
position: absolute; | |||
left: 38px; | |||
top: 36px; | |||
} | |||
.add_btn{ | |||
width: 56.4px; | |||
height: 40.8px; | |||
background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat; | |||
background-size: 47px 34px; | |||
position: absolute; | |||
right: 38px; | |||
top: 36px; | |||
} | |||
} | |||
.record_main{ | |||
padding:30px 22px; | |||
.record_det{ | |||
height: 38px; | |||
line-height: 38px; | |||
display: flex; | |||
justify-content:space-between; | |||
.year_l{ | |||
font-size: 30px; | |||
display: flex; | |||
align-items: center; | |||
color: #858585; | |||
.unit{ | |||
padding-left: 5px; | |||
} | |||
.icon{ | |||
width: 23px; | |||
height: 12px; | |||
display: block; | |||
background: url('../../assets/images/sunVillage_info/list_icon_1.png') no-repeat; | |||
background-size: 100% 100%; | |||
margin-bottom: 4px; | |||
margin-right: 8px; | |||
&.zk { | |||
transform: rotate(0deg) | |||
} | |||
&.ss{ | |||
transform: rotate(180deg) | |||
} | |||
} | |||
} | |||
.total_r{ | |||
font-size: 26px; | |||
letter-spacing: 2px; | |||
} | |||
} | |||
.record_list{ | |||
display: flex; | |||
flex-flow: wrap; | |||
margin-top: 12PX; | |||
.flex_block{ | |||
font-size: 30px; | |||
color: #878787; | |||
padding-right: 30px; | |||
&.current{ | |||
color: #4199fe; | |||
font-weight: bold; | |||
} | |||
} | |||
} | |||
} | |||
.list_main{ | |||
padding:0 22px; | |||
margin-top: 15PX; | |||
.item{ | |||
border-radius: 30px; | |||
background: #fff; | |||
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||
padding:4%; | |||
margin-bottom: 20px; | |||
.info{ | |||
flex:0 0 450px; | |||
.title{ | |||
font-size: 32px; | |||
.icon_box{ | |||
width: 34px; | |||
display: block; | |||
height: 30px; | |||
background: url('../../assets/images/sunVillage_info/list_icon_2.png') no-repeat; | |||
background-size: 100% 100%; | |||
margin-right: 10px; | |||
} | |||
.news_title{ | |||
max-width:330px; | |||
overflow: hidden; | |||
white-space: nowrap; | |||
text-overflow: ellipsis; | |||
-o-text-overflow: ellipsis; | |||
} | |||
.tips_mark{ | |||
width: 34px; | |||
height: 34px; | |||
background: #fa0c0c; | |||
border-radius: 8px; | |||
font-size: 24px; | |||
color: #fff; | |||
text-align: center; | |||
line-height: 34px; | |||
margin-left: 10px; | |||
} | |||
} | |||
.time{ | |||
font-size: 24px; | |||
color: #858585; | |||
display: flex; | |||
align-items: center; | |||
height: 30px; | |||
margin-top: 6px; | |||
.icon_time{ | |||
width: 25px; | |||
height: 25px; | |||
background: url('../../assets/images/sunVillage_info/list_icon_4.png') no-repeat; | |||
background-size: 100% 100%; | |||
margin-right: 10px; | |||
} | |||
} | |||
} | |||
.operation{ | |||
flex: 1; | |||
display: flex; | |||
align-items: center; | |||
justify-content: space-around; | |||
text-align: right; | |||
margin-top: 5PX; | |||
.opera_btn{ | |||
width: 52px; | |||
height: 52px; | |||
border-radius: 50%; | |||
display: flex; | |||
align-items: center; | |||
justify-content:center; | |||
&.delete{ | |||
background:#df0707; | |||
.icon{ | |||
width: 22px; | |||
height: 29px; | |||
background: url('../../assets/images/sunVillage_info/list_icon_7.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
} | |||
} | |||
&.edit{ | |||
background: #79cf13; | |||
.icon { | |||
width: 26px; | |||
height: 25px; | |||
background: url('../../assets/images/sunVillage_info/list_icon_6.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
} | |||
} | |||
&.view{ | |||
background: #3494ff; | |||
.icon { | |||
width: 29px; | |||
height: 21px; | |||
background: url('../../assets/images/sunVillage_info/list_icon_3.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
} | |||
} | |||
&.list{ | |||
background: #79cf13; | |||
.icon { | |||
width: 29px; | |||
height: 21px; | |||
background: url('../../assets/images/sunVillage_info/list_icon_10.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
} | |||
} | |||
} | |||
} | |||
} | |||
} | |||
.bottom_tips{ | |||
font-size: 24px; | |||
color: #a7a6a6; | |||
text-align: center; | |||
margin-top: 32px; | |||
background: url('../../assets/images/sunVillage_info/list_icon_8.png') center center no-repeat; | |||
background-size: 260px 2px; | |||
.xs{ | |||
padding:0 8px; | |||
background: #e9e9e9; | |||
} | |||
} | |||
} | |||
</style> |
@@ -14,11 +14,7 @@ | |||
<div class="date_box" v-if="showTab"> | |||
<div class="record_list"> | |||
<div :class="{'flex_block':true , 'current':year == ''}" @click="tabClick('')">全部</div> | |||
<div :class="{'flex_block':true , 'current':year == '2022'}" @click="tabClick('2022')">2022</div> | |||
<div :class="{'flex_block':true , 'current':year == '2021'}" @click="tabClick('2021')">2021</div> | |||
<div :class="{'flex_block':true , 'current':year == '2020'}" @click="tabClick('2020')">2020</div> | |||
<div :class="{'flex_block':true , 'current':year == '2019'}" @click="tabClick('2019')">2019</div> | |||
<div :class="{'flex_block':true , 'current':year == '2018'}" @click="tabClick('2018')">2018</div> | |||
<div v-for="(item,index) in yearList" :key="index" :class="{'flex_block':true , 'current':year == item}" @click="tabClick(item)">{{item}}</div> | |||
</div> | |||
<div class="record_list month_list"> | |||
<div v-for="(item,index) in 12" :key="index" :class="{'flex_block':true , 'current':month == item}" @click="tabClickMonth(item)"> | |||
@@ -102,6 +98,8 @@ | |||
showBtn:true, | |||
year:'', | |||
month:'', | |||
nowYear:new Date().getFullYear(), | |||
yearList:[] | |||
}; | |||
}, | |||
created() { | |||
@@ -110,6 +108,9 @@ | |||
if (this.$route.query.type == 'code'){ | |||
this.showBtn = false; | |||
} | |||
for (let i = 0 ; i < 5 ; i++){ | |||
this.yearList.push(this.nowYear-i); | |||
} | |||
}, | |||
methods: { | |||
getList(){ | |||
@@ -12,11 +12,7 @@ | |||
</div> | |||
<div class="record_list" v-if="showTab"> | |||
<div :class="{'flex_block':true , 'current':queryParams.year == ''}" @click="tabClick('')">全部</div> | |||
<div :class="{'flex_block':true , 'current':queryParams.year == '2022'}" @click="tabClick('2022')">2022</div> | |||
<div :class="{'flex_block':true , 'current':queryParams.year == '2021'}" @click="tabClick('2021')">2021</div> | |||
<div :class="{'flex_block':true , 'current':queryParams.year == '2020'}" @click="tabClick('2020')">2020</div> | |||
<div :class="{'flex_block':true , 'current':queryParams.year == '2019'}" @click="tabClick('2019')">2019</div> | |||
<div :class="{'flex_block':true , 'current':queryParams.year == '2018'}" @click="tabClick('2018')">2018</div> | |||
<div v-for="(item,index) in yearList" :key="index" :class="{'flex_block':true , 'current':queryParams.year == item}" @click="tabClick(item)">{{item}}</div> | |||
</div> | |||
</div> | |||
<div class="list_main"> | |||
@@ -87,12 +83,14 @@ | |||
pageSize:10, | |||
orderByColumn:'createTime', | |||
isAsc:'desc', | |||
year:'2022', | |||
year:'', | |||
}, | |||
uploadFiles1:[], | |||
projectId:'', | |||
projectIndex:'', | |||
showBtn:true, | |||
nowYear:new Date().getFullYear(), | |||
yearList:[] | |||
}; | |||
}, | |||
created() { | |||
@@ -101,6 +99,9 @@ | |||
if (this.$route.query.type == 'code'){ | |||
this.showBtn = false; | |||
} | |||
for (let i = 0 ; i < 5 ; i++){ | |||
this.yearList.push(this.nowYear-i); | |||
} | |||
}, | |||
methods: { | |||
getList(){ | |||
@@ -7,38 +7,38 @@ | |||
<div style="margin-top:0.5rem;padding:0 10px;"> | |||
<van-tabs v-model="active" :swipeable="true" style="margin-top:0.5rem;padding:0 10px;"> | |||
<van-tab title="登录" name="1"> | |||
<van-form style="margin:50px 0;" > | |||
<van-field | |||
v-model="formData.username" | |||
placeholder="请输入手机号/账号" | |||
:rules="[{ required: true, message:'' }]" | |||
/> | |||
<van-field | |||
v-model="formData.password" | |||
type="password" | |||
style="margin-top: 20px" | |||
placeholder="请输入密码" | |||
:rules="[{ required: true, message:'' }]" | |||
/> | |||
<van-field | |||
v-model="formData.code" | |||
center | |||
clearable | |||
label="验证码" | |||
:rules="[{ required: true, }]" | |||
placeholder="图形验证码" | |||
> | |||
<template #button> | |||
<img style="width: 100px;margin-left: 20px" :src="codeUrl" @click="getCode" /> | |||
</template> | |||
</van-field> | |||
<van-checkbox style="float: left;margin-top:10px;margin-left:20px;" v-model="formData.rememberMe" shape="square">{{showMessage ? "记住手机号" : "记住密码"}}</van-checkbox> | |||
<p style="float: right;margin-top:10px;margin-right:20px;color:#1D6FE9 ">忘记密码</p> | |||
<div class="clear"></div> | |||
<div style="margin: 50px 16px 16px;"> | |||
<van-button block type="info" native-type="submit" @click="handleLogin">登录</van-button> | |||
</div> | |||
</van-form> | |||
<van-form style="margin:50px 0;" > | |||
<van-field | |||
v-model="formData.username" | |||
placeholder="请输入手机号/账号" | |||
:rules="[{ required: true, message:'' }]" | |||
/> | |||
<van-field | |||
v-model="formData.password" | |||
type="password" | |||
style="margin-top: 20px" | |||
placeholder="请输入密码" | |||
:rules="[{ required: true, message:'' }]" | |||
/> | |||
<van-field | |||
v-model="formData.code" | |||
center | |||
clearable | |||
label="验证码" | |||
:rules="[{ required: true, }]" | |||
placeholder="图形验证码" | |||
> | |||
<template #button> | |||
<img style="width: 100px;margin-left: 20px" :src="codeUrl" @click="getCode" /> | |||
</template> | |||
</van-field> | |||
<van-checkbox style="float: left;margin-top:10px;margin-left:20px;" v-model="formData.rememberMe" shape="square">{{showMessage ? "记住手机号" : "记住密码"}}</van-checkbox> | |||
<p style="float: right;margin-top:10px;margin-right:20px;color:#1D6FE9 ">忘记密码</p> | |||
<div class="clear"></div> | |||
<div style="margin: 50px 16px 16px;"> | |||
<van-button block type="info" native-type="submit" @click="handleLogin">登录</van-button> | |||
</div> | |||
</van-form> | |||
</van-tab> | |||
<van-tab title="注册" name="2"> | |||
<van-form style="margin:50px 0;"> | |||