@@ -3696,6 +3696,42 @@ export const constantRoutes = [ | |||||
}, | }, | ||||
component: (resolve) => require(['@/views/sunVillage_info/list_finance_edit'], resolve) | component: (resolve) => require(['@/views/sunVillage_info/list_finance_edit'], resolve) | ||||
}, | }, | ||||
{ ////阳光村务(新)-- 合同信息 | |||||
path: '/sunVillage_info/list_finance_new', | |||||
name: 'sunVillageInfoListFinanceNew', | |||||
meta: { | |||||
title: '财务公开榜', | |||||
hidden: true, | |||||
}, | |||||
component: (resolve) => require(['@/views/sunVillage_info/list_finance_new'], resolve) | |||||
}, | |||||
{ ////阳光村务(新)-- 合同信息 | |||||
path: '/sunVillage_info/list_finance_new_add', | |||||
name: 'sunVillageInfoListFinanceAddNew', | |||||
meta: { | |||||
title: '新增财务公开', | |||||
hidden: true, | |||||
}, | |||||
component: (resolve) => require(['@/views/sunVillage_info/list_finance_new_add'], resolve) | |||||
}, | |||||
{ ////阳光村务(新)-- 合同信息 | |||||
path: '/sunVillage_info/list_finance_new_detail', | |||||
name: 'sunVillageInfoListFinanceDetailNew', | |||||
meta: { | |||||
title: '查看财务公开', | |||||
hidden: true, | |||||
}, | |||||
component: (resolve) => require(['@/views/sunVillage_info/list_finance_new_detail'], resolve) | |||||
}, | |||||
{ ////阳光村务(新)-- 合同信息 | |||||
path: '/sunVillage_info/list_finance_new_edit', | |||||
name: 'sunVillageInfoListFinanceEditNew', | |||||
meta: { | |||||
title: '修改财务公开', | |||||
hidden: true, | |||||
}, | |||||
component: (resolve) => require(['@/views/sunVillage_info/list_finance_new_edit'], resolve) | |||||
}, | |||||
{ ////阳光村务(新)-- 合同信息 | { ////阳光村务(新)-- 合同信息 | ||||
path: '/sunVillage_info/list_tourists_edit', | path: '/sunVillage_info/list_tourists_edit', | ||||
name: 'sunVillageInfoListTouristsEdit', | name: 'sunVillageInfoListTouristsEdit', | ||||
@@ -0,0 +1,434 @@ | |||||
<template> | |||||
<div class="home_wrapper"> | |||||
<div | |||||
class="header_main" | |||||
:style="`background-image:url(${require(showBtn?'@/assets/images/sunVillage_info/list_head.png':'@/assets/images/sunVillage_info/list_head_red.png')})`" | |||||
> | |||||
财务公开榜 | |||||
<div class="return_btn" @click="onClickLeft"></div> | |||||
<div class="add_btn" v-show="showBtn" @click="goAdd"></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.openName}}</p> | |||||
<p class="tips_mark" v-if="index==0">新</p> | |||||
</div> | |||||
<div class="time"> | |||||
<div class="icon_time"></div> | |||||
{{item.openNy}} | |||||
</div> | |||||
</div> | |||||
<div class="operation"> | |||||
<!-- delete 删除 edit编辑 view查看 --> | |||||
<div class="opera_btn list" @click="goRanking(item.id,item.openNy,item.openName)"> | |||||
<i class="icon "></i> | |||||
</div> | |||||
<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)" v-show="showBtn"> | |||||
<i class="icon"></i> | |||||
</div> | |||||
<div class="opera_btn view" @click="goDetail(item.id)" 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 { financePublicList,openRemove } 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:'openNy', | |||||
isAsc:'desc', | |||||
year:new Date().getFullYear(), | |||||
}, | |||||
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; | |||||
financePublicList(_this.queryParams).then(response => { | |||||
_this.listLength = response.total; | |||||
response.rows.map(res=>{ | |||||
_this.applicationList.push(res); | |||||
}) | |||||
console.log(_this.applicationList.length + "--------------" + response.total); | |||||
if(_this.applicationList.length >= response.total){ | |||||
console.log('aaaaaaaaaaaaaaaaa') | |||||
_this.finished = true; | |||||
return; | |||||
}else{ | |||||
console.log('bbbbbbbbbbbbbbbbbbb') | |||||
_this.loading = false; | |||||
_this.queryParams.pageNum += 1 ; | |||||
} | |||||
}); | |||||
}, | |||||
tabClick(year){ | |||||
this.queryParams.year = year ; | |||||
this.queryParams.pageNum = 1 ; | |||||
this.applicationList = []; | |||||
this.finished = false; | |||||
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_finance_new_add') | |||||
}, | |||||
goDetail(id){ | |||||
this.$router.push({path:'/sunVillage_info/list_finance_new_detail',query: {id:id,type:'finance',showBtn:this.showBtn}}) | |||||
}, | |||||
goRanking(id,time,openName){ | |||||
this.$router.push({path:'/sunVillage_info/list_finance_ranking',query: {id:id,time:time,openName:openName}}) | |||||
}, | |||||
goEdit(id){ | |||||
this.$router.push({path:'/sunVillage_info/list_finance_new_edit',query: {id:id,type:'finance'}}) | |||||
}, | |||||
goRemove(id){ | |||||
this.$dialog.alert({ | |||||
title: '提示', | |||||
message: '确认删除?', | |||||
showCancelButton:true, | |||||
}) | |||||
.then(() => { | |||||
openRemove(id).then(response => { | |||||
this.$notify({ type: 'success', message: '删除成功' }); | |||||
this.getList() | |||||
}); | |||||
}) | |||||
.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; | |||||
.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; | |||||
justify-content: space-between; | |||||
.info{ | |||||
.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; | |||||
flex-shrink: 0; | |||||
} | |||||
.news_title{ | |||||
display: -webkit-box; | |||||
-webkit-box-orient: vertical; | |||||
-webkit-line-clamp: 1; | |||||
word-break: break-all; | |||||
overflow: hidden; | |||||
} | |||||
.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; | |||||
flex-shrink: 0; | |||||
} | |||||
} | |||||
.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{ | |||||
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; | |||||
margin-left: 10PX; | |||||
.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,614 @@ | |||||
<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.openNy" | |||||
@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="year-month" | |||||
title="选择年月日" | |||||
@confirm="onConfirmOpenNy" | |||||
@cancel="showBuildTime = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field required v-model="form.openName" placeholder="请输入名称" :rules="[{ required: true , message:'请输入名称' }]" input-align="right" :border="false" > | |||||
<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-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" multiple :after-read="afterRead" @delete="deleteFile1" style="margin-top: 10PX"> | |||||
<template #preview-cover="file"> | |||||
<DnD class="van-ellipsis" @touchdragstart="drag" @touchdrop="drop" :value="file.index" touchdraggable touchdroppable show-mask="1"> | |||||
<template #mask> | |||||
<div class="preview-cover"> | |||||
<img :src="file.url || file.content" class="van-image__img" style="object-fit: cover;"/> | |||||
</div> | |||||
</template> | |||||
</DnD> | |||||
</template> | |||||
</van-uploader> | |||||
<van-field readonly :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> | |||||
<van-uploader v-model="openPicSzmx" multiple :after-read="afterReadSzmx" @delete="deleteFileSzmx" style="margin-top: 10PX"> | |||||
<template #preview-cover="file"> | |||||
<DnD class="van-ellipsis" @touchdragstart="drag" @touchdrop="drop" :value="file.index" touchdraggable touchdroppable show-mask="1"> | |||||
<template #mask> | |||||
<div class="preview-cover"> | |||||
<img :src="file.url || file.content" class="van-image__img" style="object-fit: cover;"/> | |||||
</div> | |||||
</template> | |||||
</DnD> | |||||
</template> | |||||
</van-uploader> | |||||
<van-field readonly :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> | |||||
<van-uploader v-model="openPicKmye" multiple :after-read="afterReadKmye" @delete="deleteFileKmye" style="margin-top: 10PX"> | |||||
<template #preview-cover="file"> | |||||
<DnD class="van-ellipsis" @touchdragstart="drag" @touchdrop="drop" :value="file.index" touchdraggable touchdroppable show-mask="1"> | |||||
<template #mask> | |||||
<div class="preview-cover"> | |||||
<img :src="file.url || file.content" class="van-image__img" style="object-fit: cover;"/> | |||||
</div> | |||||
</template> | |||||
</DnD> | |||||
</template> | |||||
</van-uploader> | |||||
<van-field readonly :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> | |||||
<van-uploader v-model="openPicZcfz" multiple :after-read="afterReadZcfz" @delete="deleteFileZcfz" style="margin-top: 10PX"> | |||||
<template #preview-cover="file"> | |||||
<DnD class="van-ellipsis" @touchdragstart="drag" @touchdrop="drop" :value="file.index" touchdraggable touchdroppable show-mask="1"> | |||||
<template #mask> | |||||
<div class="preview-cover"> | |||||
<img :src="file.url || file.content" class="van-image__img" style="object-fit: cover;"/> | |||||
</div> | |||||
</template> | |||||
</DnD> | |||||
</template> | |||||
</van-uploader> | |||||
<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> | |||||
<img src="../../assets/images/sunVillage_info/delete.png" width="16" style="margin-left: auto;" @click="deleteWord(index)" /> | |||||
</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 , openAdd } from "@/api/sunVillage_info/fixedAssets"; | |||||
import Cookies from "js-cookie"; | |||||
import request from '@/utils/request' | |||||
import DnD from "@/components/DnD"; | |||||
export default { | |||||
name: "certificateList", | |||||
components: {DnD}, | |||||
data() { | |||||
return { | |||||
showBuildTime:false, | |||||
form:{ | |||||
openNy:this.format(new Date(),'yyyy-MM'), | |||||
openPic:'', | |||||
openFile:'', | |||||
openName:this.format(new Date(),'yyyy')+ '年' + (this.format(new Date(),'MM')-1) + '月财务公开' | |||||
}, | |||||
openPic:[], | |||||
fileList:[], | |||||
fileList1:[], | |||||
openPicSzmx:[], | |||||
openPicKmye:[], | |||||
openPicZcfz:[], | |||||
openPicSzmx2:[], | |||||
openPicKmye2:[], | |||||
openPicZcfz2:[], | |||||
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.type = this.$route.query.type; | |||||
this.queryParams.bookId = Cookies.get('bookId'); | |||||
this.queryParams.deptId = Cookies.get('deptId'); | |||||
}, | |||||
methods: { | |||||
onSubmit(){ | |||||
console.log(this.openFile) | |||||
console.log(this.openPic) | |||||
var that = this; | |||||
// openPicSzmx:[], | |||||
// openPicKmye:[], | |||||
// openPicZcfz:[], | |||||
that.form.openFile = that.openFile2.join(',') | |||||
that.form.openPicSzmx = that.openPicSzmx2.join(',') | |||||
that.form.openPicKmye = that.openPicKmye2.join(',') | |||||
that.form.openPicZcfz = that.openPicZcfz2.join(',') | |||||
//that.form.openPic = that.openPic2.join(',') | |||||
that.form.openPic = that.fileList | |||||
.filter((x) => x.url && x.url.startsWith('/api')) | |||||
.map((x) => x.url.substr(4)) | |||||
.join(','); | |||||
openAdd(that.form).then((r1) => { | |||||
if (r1.code == 200){ | |||||
that.$notify({ type: 'success', message: '新增成功' }); | |||||
setTimeout(function(){ | |||||
history.back(-1); | |||||
},2000) | |||||
} | |||||
}) | |||||
}, | |||||
onConfirmOpenNy(data){ | |||||
this.form.openNy = this.format(data,'yyyy-MM'); | |||||
this.openNy = data; | |||||
this.showBuildTime = false; | |||||
}, | |||||
deleteFile1(detail){ | |||||
this.openPic2.splice(detail.index,1) | |||||
// this.form.openPic.splice(index,1); | |||||
}, | |||||
deleteFileZcfz(detail){ | |||||
this.openPicZcfz2.splice(detail.index,1) | |||||
// this.form.openPic.splice(index,1); | |||||
}, | |||||
deleteFileSzmx(detail){ | |||||
this.openPicSzmx2.splice(detail.index,1) | |||||
// this.form.openPic.splice(index,1); | |||||
}, | |||||
deleteFileKmye(detail){ | |||||
this.openPicKmye2.splice(detail.index,1) | |||||
// this.form.openPic.splice(index,1); | |||||
}, | |||||
deleteWord(index){ | |||||
this.openFileList.splice(index,1); | |||||
this.openFile2.splice(index,1); | |||||
}, | |||||
afterRead(file) { | |||||
this.$toast.loading({ | |||||
message: "上传中...", | |||||
forbidClick: true, | |||||
duration: 0, | |||||
}); | |||||
// 此时可以自行将文件上传至服务器 | |||||
if (file instanceof Array){//判断是否为数组,单张图片为array,多张为数组,数组返回true否则为false | |||||
if(false) // 顺序上传 | |||||
{ | |||||
let SequenceUpload = (list, index) => { | |||||
if(index >= list.length) | |||||
return; | |||||
let res = list[index]; | |||||
this.openPic.push(res.file); | |||||
let params1 = new FormData(); | |||||
params1.append("file", res.file); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openPic2.push(r1.fileName); | |||||
res.url = '/api' + r1.fileName; | |||||
SequenceUpload(list, index + 1); | |||||
}) | |||||
}; | |||||
SequenceUpload(file, 0); | |||||
} | |||||
else | |||||
{ | |||||
file.map(res=>{ | |||||
this.openPic.push(res.file); | |||||
let params1 = new FormData(); | |||||
params1.append("file", res.file); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openPic2.push(r1.fileName); | |||||
res.url = '/api' + r1.fileName; | |||||
}) | |||||
}) | |||||
} | |||||
}else{ | |||||
this.openPic.push(file); | |||||
let params1 = new FormData(); | |||||
params1.append("file", file.file); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openPic2.push(r1.fileName); | |||||
file.url = '/api' + r1.fileName; | |||||
}) | |||||
} | |||||
}, | |||||
afterReadSzmx(file) { | |||||
this.$toast.loading({ | |||||
message: "上传中...", | |||||
forbidClick: true, | |||||
duration: 0, | |||||
}); | |||||
// 此时可以自行将文件上传至服务器 | |||||
if (file instanceof Array){//判断是否为数组,单张图片为array,多张为数组,数组返回true否则为false | |||||
if(false){// 顺序上传 | |||||
let SequenceUpload = (list, index) => { | |||||
if(index >= list.length) | |||||
return; | |||||
let res = list[index]; | |||||
// this.openPicSzmx.push(res.file); | |||||
let params1 = new FormData(); | |||||
params1.append("file", res.file); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openPicSzmx2.push(r1.fileName); | |||||
res.url = '/api' + r1.fileName; | |||||
SequenceUpload(list, index + 1); | |||||
}) | |||||
}; | |||||
SequenceUpload(file, 0); | |||||
}else{ | |||||
file.map(res=>{ | |||||
// this.openPicSzmx.push(res.file); | |||||
let params1 = new FormData(); | |||||
params1.append("file", res.file); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openPicSzmx2.push(r1.fileName); | |||||
res.url = '/api' + r1.fileName; | |||||
}) | |||||
}) | |||||
} | |||||
}else{ | |||||
// this.openPicSzmx.push(file); | |||||
let params1 = new FormData(); | |||||
params1.append("file", file.file); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openPicSzmx2.push(r1.fileName); | |||||
console.log(this.openPicSzmx) | |||||
// file.url = '/api' + r1.fileName; | |||||
}) | |||||
} | |||||
}, | |||||
afterReadKmye(file) { | |||||
this.$toast.loading({ | |||||
message: "上传中...", | |||||
forbidClick: true, | |||||
duration: 0, | |||||
}); | |||||
// 此时可以自行将文件上传至服务器 | |||||
if (file instanceof Array){//判断是否为数组,单张图片为array,多张为数组,数组返回true否则为false | |||||
if(false){// 顺序上传 | |||||
let SequenceUpload = (list, index) => { | |||||
if(index >= list.length) | |||||
return; | |||||
let res = list[index]; | |||||
this.openPicKmye.push(res.file); | |||||
let params1 = new FormData(); | |||||
params1.append("file", res.file); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openPicKmye2.push(r1.fileName); | |||||
res.url = '/api' + r1.fileName; | |||||
SequenceUpload(list, index + 1); | |||||
}) | |||||
}; | |||||
SequenceUpload(file, 0); | |||||
}else{ | |||||
file.map(res=>{ | |||||
this.openPicKmye.push(res.file); | |||||
let params1 = new FormData(); | |||||
params1.append("file", res.file); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openPicKmye2.push(r1.fileName); | |||||
res.url = '/api' + r1.fileName; | |||||
}) | |||||
}) | |||||
} | |||||
}else{ | |||||
// this.openPicKmye.push(file); | |||||
let params1 = new FormData(); | |||||
params1.append("file", file.file); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openPicKmye2.push(r1.fileName); | |||||
file.url = '/api' + r1.fileName; | |||||
}) | |||||
} | |||||
}, | |||||
afterReadZcfz(file) { | |||||
this.$toast.loading({ | |||||
message: "上传中...", | |||||
forbidClick: true, | |||||
duration: 0, | |||||
}); | |||||
// 此时可以自行将文件上传至服务器 | |||||
if (file instanceof Array){//判断是否为数组,单张图片为array,多张为数组,数组返回true否则为false | |||||
if(false){// 顺序上传 | |||||
let SequenceUpload = (list, index) => { | |||||
if(index >= list.length) | |||||
return; | |||||
let res = list[index]; | |||||
this.openPicZcfz.push(res.file); | |||||
let params1 = new FormData(); | |||||
params1.append("file", res.file); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openPicZcfz2.push(r1.fileName); | |||||
res.url = '/api' + r1.fileName; | |||||
SequenceUpload(list, index + 1); | |||||
}) | |||||
}; | |||||
SequenceUpload(file, 0); | |||||
}else{ | |||||
file.map(res=>{ | |||||
this.openPicZcfz.push(res.file); | |||||
let params1 = new FormData(); | |||||
params1.append("file", res.file); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openPicZcfz2.push(r1.fileName); | |||||
res.url = '/api' + r1.fileName; | |||||
}) | |||||
}) | |||||
} | |||||
}else{ | |||||
// this.openPicZcfz.push(file); | |||||
let params1 = new FormData(); | |||||
params1.append("file", file.file); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openPicZcfz2.push(r1.fileName); | |||||
file.url = '/api' + r1.fileName; | |||||
}) | |||||
} | |||||
}, | |||||
afterReadOpenFile(file){ | |||||
console.log(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); | |||||
}, | |||||
drag(src_element) { | |||||
//console.log("drag", event); | |||||
}, | |||||
drop(src_element, dst_element, srcData, dstData) { | |||||
//console.log("drop", event); | |||||
let srcIndex = parseInt(srcData); | |||||
let index = parseInt(dstData); | |||||
//console.log(srcIndex, index,this.fileList); | |||||
if(srcIndex !== index) | |||||
{ | |||||
let src = this.fileList[srcIndex]; | |||||
if(srcIndex > index) | |||||
{ | |||||
this.fileList.splice(srcIndex, 1); | |||||
this.fileList.splice(index, 0, src); | |||||
} | |||||
else | |||||
{ | |||||
this.fileList.splice(srcIndex, 1); | |||||
this.fileList.splice(index, 0, src); | |||||
} | |||||
} | |||||
}, | |||||
}, | |||||
} | |||||
</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; | |||||
} | |||||
.preview-cover { | |||||
position: absolute; | |||||
bottom: 0; | |||||
top: 0; | |||||
left: 0; | |||||
right: 0; | |||||
background: rgba(0, 0, 0, 0); | |||||
} | |||||
/deep/ .van-uploader__preview-image { | |||||
overflow: visible; | |||||
} | |||||
} | |||||
</style> |
@@ -0,0 +1,338 @@ | |||||
<template> | |||||
<div class="home_wrapper"> | |||||
<div | |||||
class="header_main" | |||||
:style="`background-image:url(${require(showBtn?'@/assets/images/sunVillage_info/list_head.png':'@/assets/images/sunVillage_info/list_head_red.png')})`" | |||||
> | |||||
查看财务公开 | |||||
<div class="return_btn" @click="onClickLeft"></div> | |||||
<div class="add_btn"></div> | |||||
</div> | |||||
<div class="list_main"> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
placeholder="请选择" | |||||
v-model="form.openNy" | |||||
input-align="right" | |||||
label-width="auto" | |||||
: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-field readonly v-model="form.openName" :rules="[{ required: true , message:'请输入名称' }]" input-align="right" :border="false" > | |||||
<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-field readonly v-model="form.updateTime === null ? form.createTime : form.updateTime" 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" multiple style="margin-top: 10PX" /> | |||||
<van-empty v-if="openPic.length < 1" description="暂无文件" /> | |||||
<van-field readonly :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="openPicSzmx" :show-upload="false" :deletable="false" multiple style="margin-top: 10PX" /> | |||||
<van-empty v-if="openPicSzmx.length < 1" description="暂无文件" /> | |||||
<van-field readonly :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="openPicKmye" :show-upload="false" :deletable="false" multiple style="margin-top: 10PX" /> | |||||
<van-empty v-if="openPicKmye.length < 1" description="暂无文件" /> | |||||
<van-field readonly :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="openPicZcfz" :show-upload="false" :deletable="false" multiple style="margin-top: 10PX" /> | |||||
<van-empty v-if="openPicZcfz.length < 1" description="暂无文件" /> | |||||
<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'" /> | |||||
<a v-if="item.type == 'word' || item.type == 'excel'" :href="item.url" style="margin-left: 10px;color: #333333">{{item.name}}</a> | |||||
<p v-else @click="goToPage(item.url)" style="margin-left: 10px;color: #333333">{{item.name}}</p> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<van-field readonly v-model="form.remark" 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-dialog v-model:show="fjImgShow" title="附件" :show-confirm-button="false" show-cancel-button cancelButtonText="关闭" > | |||||
<div style="width: 100%;height: 400px;overflow:scroll;"> | |||||
<img :src="fjImg" width="95%"/> | |||||
</div> | |||||
</van-dialog> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import { financePublicDetail , openAdd } from "@/api/sunVillage_info/fixedAssets"; | |||||
import Cookies from "js-cookie"; | |||||
import request from '@/utils/request' | |||||
export default { | |||||
name: "certificateList", | |||||
data() { | |||||
return { | |||||
showBuildTime:false, | |||||
form:{ | |||||
openNy:this.format(new Date(),'yyyy-MM'), | |||||
openPic:'', | |||||
openFile:'', | |||||
}, | |||||
openPic:[], | |||||
openPicSzmx:[], | |||||
openPicKmye:[], | |||||
openPicZcfz:[], | |||||
fileList:[], | |||||
fileList1:[], | |||||
fjImgShow:false, | |||||
fjImg:'', | |||||
openNy:new Date(), | |||||
type:'', | |||||
openFile:[], | |||||
openFileList:[], | |||||
queryParams:{ | |||||
bookId:'', | |||||
deptId:'' | |||||
}, | |||||
showBtn:true, | |||||
}; | |||||
}, | |||||
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.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.showBtn = this.$route.query.showBtn=='false'?false:true; | |||||
this.getDetail(); | |||||
}, | |||||
methods: { | |||||
getDetail(id){ | |||||
financePublicDetail(this.queryParams).then((res) => { | |||||
if (res.data.openFile !='' && res.data.openFile != null && res.data.openFile != undefined){ | |||||
res.data.openFile = res.data.openFile.split(',') | |||||
res.data.openFile.map(rr=>{ | |||||
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.openFileList.push({name:name,type:type,url:'/api'+rr}) | |||||
}) | |||||
} | |||||
if (res.data.openPic !='' && res.data.openPic != null && res.data.openPic != undefined){ | |||||
res.data.openPic = res.data.openPic.split(',') | |||||
res.data.openPic.map((rrr,i)=>{ | |||||
this.openPic.push({url:'/api'+rrr}) | |||||
}) | |||||
} | |||||
if (res.data.openPicSzmx !='' && res.data.openPicSzmx != null && res.data.openPicSzmx != undefined){ | |||||
res.data.openPicSzmx = res.data.openPicSzmx.split(',') | |||||
res.data.openPicSzmx.map((rrr,i)=>{ | |||||
this.openPicSzmx.push({url:'/api'+rrr}) | |||||
}) | |||||
} | |||||
if (res.data.openPicKmye !='' && res.data.openPicKmye != null && res.data.openPicKmye != undefined){ | |||||
res.data.openPicKmye = res.data.openPicKmye.split(',') | |||||
res.data.openPicKmye.map((rrr,i)=>{ | |||||
this.openPicKmye.push({url:'/api'+rrr}) | |||||
}) | |||||
} | |||||
if (res.data.openPicZcfz !='' && res.data.openPicZcfz != null && res.data.openPicZcfz != undefined){ | |||||
res.data.openPicZcfz = res.data.openPicZcfz.split(',') | |||||
res.data.openPicZcfz.map((rrr,i)=>{ | |||||
this.openPicZcfz.push({url:'/api'+rrr}) | |||||
}) | |||||
} | |||||
this.form = res.data; | |||||
}) | |||||
}, | |||||
goToPage(url) { | |||||
const baseImgUrl = this.$store.getters.baseRoutingUrl; | |||||
let subIndex = url.lastIndexOf("."); | |||||
let ext = url.substring(subIndex + 1, url.length); | |||||
//console.log(ext) | |||||
if (ext == "jpg" || ext == "png") { | |||||
url = url.substring(4,url.length); | |||||
this.fjImg = baseImgUrl + url; | |||||
this.fjImgShow = true; | |||||
}else{ | |||||
let allUrl = url; | |||||
const link = document.createElement("a"); | |||||
link.style.display = "none"; | |||||
link.target = "_blank" | |||||
link.href = allUrl; | |||||
document.body.appendChild(link); | |||||
link.click(); | |||||
document.body.removeChild(link); | |||||
} | |||||
}, | |||||
}, | |||||
} | |||||
</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; | |||||
} | |||||
} | |||||
.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; | |||||
} | |||||
} | |||||
</style> |
@@ -0,0 +1,667 @@ | |||||
<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.openNy" | |||||
@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="year-month" | |||||
title="选择年月日" | |||||
@confirm="onConfirmOpenNy" | |||||
@cancel="showBuildTime = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field required v-model="form.openName" placeholder="请输入名称" :rules="[{ required: true , message:'请输入名称' }]" input-align="right" :border="false" > | |||||
<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-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" multiple :after-read="afterRead" @delete="deleteFile1" style="margin-top: 10PX" > | |||||
<template #preview-cover="file"> | |||||
<DnD class="van-ellipsis" @touchdragstart="drag" @touchdrop="drop" :value="file.index" touchdraggable touchdroppable show-mask="1"> | |||||
<template #mask> | |||||
<div class="preview-cover"> | |||||
<img :src="file.url || file.content" class="van-image__img" style="object-fit: cover;"/> | |||||
</div> | |||||
</template> | |||||
</DnD> | |||||
</template> | |||||
</van-uploader> | |||||
<van-field readonly :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> | |||||
<van-uploader v-model="openPicSzmx" multiple :after-read="afterReadSzmx" @delete="deleteFileSzmx" style="margin-top: 10PX"> | |||||
<template #preview-cover="file"> | |||||
<DnD class="van-ellipsis" @touchdragstart="drag" @touchdrop="drop" :value="file.index" touchdraggable touchdroppable show-mask="1"> | |||||
<template #mask> | |||||
<div class="preview-cover"> | |||||
<img :src="file.url || file.content" class="van-image__img" style="object-fit: cover;"/> | |||||
</div> | |||||
</template> | |||||
</DnD> | |||||
</template> | |||||
</van-uploader> | |||||
<van-field readonly :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> | |||||
<van-uploader v-model="openPicKmye" multiple :after-read="afterReadKmye" @delete="deleteFileKmye" style="margin-top: 10PX"> | |||||
<template #preview-cover="file"> | |||||
<DnD class="van-ellipsis" @touchdragstart="drag" @touchdrop="drop" :value="file.index" touchdraggable touchdroppable show-mask="1"> | |||||
<template #mask> | |||||
<div class="preview-cover"> | |||||
<img :src="file.url || file.content" class="van-image__img" style="object-fit: cover;"/> | |||||
</div> | |||||
</template> | |||||
</DnD> | |||||
</template> | |||||
</van-uploader> | |||||
<van-field readonly :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> | |||||
<van-uploader v-model="openPicZcfz" multiple :after-read="afterReadZcfz" @delete="deleteFileZcfz" style="margin-top: 10PX"> | |||||
<template #preview-cover="file"> | |||||
<DnD class="van-ellipsis" @touchdragstart="drag" @touchdrop="drop" :value="file.index" touchdraggable touchdroppable show-mask="1"> | |||||
<template #mask> | |||||
<div class="preview-cover"> | |||||
<img :src="file.url || file.content" class="van-image__img" style="object-fit: cover;"/> | |||||
</div> | |||||
</template> | |||||
</DnD> | |||||
</template> | |||||
</van-uploader> | |||||
<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> | |||||
<img src="../../assets/images/sunVillage_info/delete.png" width="16" style="margin-left: auto;" @click="deleteWord(index)" /> | |||||
</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 , openEdit , financePublicDetail } from "@/api/sunVillage_info/fixedAssets"; | |||||
import Cookies from "js-cookie"; | |||||
import request from '@/utils/request' | |||||
import DnD from "@/components/DnD"; | |||||
export default { | |||||
name: "certificateList", | |||||
components: {DnD}, | |||||
data() { | |||||
return { | |||||
showBuildTime:false, | |||||
form:{ | |||||
openNy:this.format(new Date(),'yyyy-MM'), | |||||
openPic:'', | |||||
openFile:'', | |||||
openPicSzmx:'', | |||||
openPicKmye:'', | |||||
openPicZcfz:'' | |||||
}, | |||||
openPic:[], | |||||
fileList:[], | |||||
fileList1:[], | |||||
openPicSzmx:[], | |||||
openPicKmye:[], | |||||
openPicZcfz:[], | |||||
openPicSzmx2:[], | |||||
openPicKmye2:[], | |||||
openPicZcfz2:[], | |||||
openNy:new Date(), | |||||
type:'', | |||||
openFile:[], | |||||
openFileList:[], | |||||
openPicList:[], | |||||
queryParams:{ | |||||
bookId:'', | |||||
deptId:'' | |||||
}, | |||||
openPic2:[], | |||||
openFile2:[] | |||||
}; | |||||
}, | |||||
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.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){ | |||||
financePublicDetail(this.queryParams).then((res) => { | |||||
var that = this ; | |||||
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,url:rr} | |||||
}) | |||||
} | |||||
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} | |||||
}) | |||||
} | |||||
if (res.data.openPicSzmx !='' && res.data.openPicSzmx != null && res.data.openPicSzmx != undefined){ | |||||
this.openPicSzmx = res.data.openPicSzmx.split(','); | |||||
this.openPicSzmx2 = res.data.openPicSzmx.split(','); | |||||
this.openPicSzmx.map((rrr,i)=>{ | |||||
this.openPicSzmx[i] = {url:'/api'+rrr} | |||||
}) | |||||
} | |||||
if (res.data.openPicKmye !='' && res.data.openPicKmye != null && res.data.openPicKmye != undefined){ | |||||
this.openPicKmye = res.data.openPicKmye.split(','); | |||||
this.openPicKmye2 = res.data.openPicKmye.split(','); | |||||
this.openPicKmye.map((rrr,i)=>{ | |||||
this.openPicKmye[i] = {url:'/api'+rrr} | |||||
}) | |||||
} | |||||
if (res.data.openPicZcfz !='' && res.data.openPicZcfz != null && res.data.openPicZcfz != undefined){ | |||||
this.openPicZcfz = res.data.openPicZcfz.split(','); | |||||
this.openPicZcfz2 = res.data.openPicZcfz.split(','); | |||||
this.openPicZcfz.map((rrr,i)=>{ | |||||
this.openPicZcfz[i] = {url:'/api'+rrr} | |||||
}) | |||||
} | |||||
console.log('openPicSzmx2'+that.openPicSzmx2) | |||||
console.log('openPicKmye2'+that.openPicKmye2) | |||||
console.log('openPicZcfz2'+that.openPicZcfz2) | |||||
that.form = res.data; | |||||
}) | |||||
}, | |||||
onSubmit(){ | |||||
var that = this; | |||||
console.log('openPicSzmx2'+that.openPicSzmx2) | |||||
console.log('openPicKmye2'+that.openPicKmye2) | |||||
console.log('openPicZcfz2'+that.openPicZcfz2) | |||||
console.log('openPic'+that.openPic) | |||||
that.form.openFile = that.openFile2.join(',') | |||||
that.form.openPicSzmx = that.openPicSzmx2.join(',') | |||||
that.form.openPicKmye = that.openPicKmye2.join(',') | |||||
that.form.openPicZcfz = that.openPicZcfz2.join(',') | |||||
//that.form.openPic = that.openPic2.join(',') | |||||
that.form.openPic = that.openPic | |||||
.filter((x) => x.url && x.url.startsWith('/api')) | |||||
.map((x) => x.url.substr(4)) | |||||
.join(','); | |||||
openEdit(that.form).then((r1) => { | |||||
if (r1.code == 200){ | |||||
that.$notify({ type: 'success', message: '修改成功' }); | |||||
setTimeout(function(){ | |||||
history.back(-1); | |||||
},2000) | |||||
} | |||||
}) | |||||
}, | |||||
onConfirmOpenNy(data){ | |||||
this.form.openNy = this.format(data,'yyyy-MM'); | |||||
this.openNy = data; | |||||
this.showBuildTime = false; | |||||
}, | |||||
deleteFile1(file,detail){ | |||||
console.log(detail) | |||||
this.openPic2.splice(detail.index,1) | |||||
}, | |||||
deleteFileZcfz(detail){ | |||||
this.openPicZcfz2.splice(detail.index,1) | |||||
// this.form.openPic.splice(index,1); | |||||
}, | |||||
deleteFileSzmx(detail){ | |||||
this.openPicSzmx2.splice(detail.index,1) | |||||
// this.form.openPic.splice(index,1); | |||||
}, | |||||
deleteFileKmye(detail){ | |||||
this.openPicKmye2.splice(detail.index,1) | |||||
// this.form.openPic.splice(index,1); | |||||
}, | |||||
deleteWord(index){ | |||||
this.openFile.splice(index,1); | |||||
this.openFile2.splice(index,1); | |||||
}, | |||||
afterRead(file) { | |||||
this.$toast.loading({ | |||||
message: "上传中...", | |||||
forbidClick: true, | |||||
duration: 0, | |||||
}); | |||||
if (file instanceof Array){//判断是否为数组,单张图片为array,多张为数组,数组返回true否则为false | |||||
if(false) // 顺序上传 | |||||
{ | |||||
let SequenceUpload = (list, index) => { | |||||
if(index >= list.length) | |||||
return; | |||||
let res = list[index]; | |||||
this.openPic.push(res.file); | |||||
let params1 = new FormData(); | |||||
params1.append("file", res.file); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openPic2.push(r1.fileName); | |||||
res.url = '/api' + r1.fileName; | |||||
SequenceUpload(list, index + 1); | |||||
}) | |||||
}; | |||||
SequenceUpload(file, 0); | |||||
} | |||||
else | |||||
{ | |||||
file.map(res => { | |||||
let params1 = new FormData(); | |||||
params1.append("file", res.file); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openPic2.push(r1.fileName); | |||||
res.url = '/api' + r1.fileName; | |||||
}) | |||||
}) | |||||
} | |||||
}else{ | |||||
let params1 = new FormData(); | |||||
params1.append("file", file.file); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openPic2.push(r1.fileName); | |||||
file.url = '/api' + r1.fileName; | |||||
}) | |||||
} | |||||
}, | |||||
afterReadSzmx(file) { | |||||
this.$toast.loading({ | |||||
message: "上传中...", | |||||
forbidClick: true, | |||||
duration: 0, | |||||
}); | |||||
// 此时可以自行将文件上传至服务器 | |||||
if (file instanceof Array){//判断是否为数组,单张图片为array,多张为数组,数组返回true否则为false | |||||
if(false){// 顺序上传 | |||||
let SequenceUpload = (list, index) => { | |||||
if(index >= list.length) | |||||
return; | |||||
let res = list[index]; | |||||
// this.openPicSzmx.push(res.file); | |||||
let params1 = new FormData(); | |||||
params1.append("file", res.file); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openPicSzmx2.push(r1.fileName); | |||||
res.url = '/api' + r1.fileName; | |||||
SequenceUpload(list, index + 1); | |||||
}) | |||||
}; | |||||
SequenceUpload(file, 0); | |||||
}else{ | |||||
file.map(res=>{ | |||||
// this.openPicSzmx.push(res.file); | |||||
let params1 = new FormData(); | |||||
params1.append("file", res.file); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openPicSzmx2.push(r1.fileName); | |||||
res.url = '/api' + r1.fileName; | |||||
}) | |||||
}) | |||||
} | |||||
}else{ | |||||
// this.openPicSzmx.push(file); | |||||
let params1 = new FormData(); | |||||
params1.append("file", file.file); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openPicSzmx2.push(r1.fileName); | |||||
console.log(this.openPicSzmx) | |||||
// file.url = '/api' + r1.fileName; | |||||
}) | |||||
} | |||||
}, | |||||
afterReadKmye(file) { | |||||
this.$toast.loading({ | |||||
message: "上传中...", | |||||
forbidClick: true, | |||||
duration: 0, | |||||
}); | |||||
// 此时可以自行将文件上传至服务器 | |||||
if (file instanceof Array){//判断是否为数组,单张图片为array,多张为数组,数组返回true否则为false | |||||
if(false){// 顺序上传 | |||||
let SequenceUpload = (list, index) => { | |||||
if(index >= list.length) | |||||
return; | |||||
let res = list[index]; | |||||
this.openPicKmye.push(res.file); | |||||
let params1 = new FormData(); | |||||
params1.append("file", res.file); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openPicKmye2.push(r1.fileName); | |||||
res.url = '/api' + r1.fileName; | |||||
SequenceUpload(list, index + 1); | |||||
}) | |||||
}; | |||||
SequenceUpload(file, 0); | |||||
}else{ | |||||
file.map(res=>{ | |||||
this.openPicKmye.push(res.file); | |||||
let params1 = new FormData(); | |||||
params1.append("file", res.file); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openPicKmye2.push(r1.fileName); | |||||
res.url = '/api' + r1.fileName; | |||||
}) | |||||
}) | |||||
} | |||||
}else{ | |||||
// this.openPicKmye.push(file); | |||||
let params1 = new FormData(); | |||||
params1.append("file", file.file); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openPicKmye2.push(r1.fileName); | |||||
file.url = '/api' + r1.fileName; | |||||
}) | |||||
} | |||||
}, | |||||
afterReadZcfz(file) { | |||||
this.$toast.loading({ | |||||
message: "上传中...", | |||||
forbidClick: true, | |||||
duration: 0, | |||||
}); | |||||
// 此时可以自行将文件上传至服务器 | |||||
if (file instanceof Array){//判断是否为数组,单张图片为array,多张为数组,数组返回true否则为false | |||||
if(false){// 顺序上传 | |||||
let SequenceUpload = (list, index) => { | |||||
if(index >= list.length) | |||||
return; | |||||
let res = list[index]; | |||||
this.openPicZcfz.push(res.file); | |||||
let params1 = new FormData(); | |||||
params1.append("file", res.file); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openPicZcfz2.push(r1.fileName); | |||||
res.url = '/api' + r1.fileName; | |||||
SequenceUpload(list, index + 1); | |||||
}) | |||||
}; | |||||
SequenceUpload(file, 0); | |||||
}else{ | |||||
file.map(res=>{ | |||||
this.openPicZcfz.push(res.file); | |||||
let params1 = new FormData(); | |||||
params1.append("file", res.file); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openPicZcfz2.push(r1.fileName); | |||||
res.url = '/api' + r1.fileName; | |||||
}) | |||||
}) | |||||
} | |||||
}else{ | |||||
// this.openPicZcfz.push(file); | |||||
let params1 = new FormData(); | |||||
params1.append("file", file.file); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openPicZcfz2.push(r1.fileName); | |||||
file.url = '/api' + r1.fileName; | |||||
}) | |||||
} | |||||
}, | |||||
afterReadOpenFile(file){ | |||||
console.log(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.openFile.push({name:file.file.name,type:type}) | |||||
this.openFileList.push(file.file); | |||||
}, | |||||
drag(src_element) { | |||||
//console.log("drag", event); | |||||
}, | |||||
drop(src_element, dst_element, srcData, dstData) { | |||||
//console.log("drop", event); | |||||
let srcIndex = parseInt(srcData); | |||||
let index = parseInt(dstData); | |||||
//console.log(srcIndex, index,this.openPic); | |||||
if(srcIndex !== index) | |||||
{ | |||||
let src = this.openPic[srcIndex]; | |||||
if(srcIndex > index) | |||||
{ | |||||
this.openPic.splice(srcIndex, 1); | |||||
this.openPic.splice(index, 0, src); | |||||
} | |||||
else | |||||
{ | |||||
this.openPic.splice(srcIndex, 1); | |||||
this.openPic.splice(index, 0, src); | |||||
} | |||||
} | |||||
}, | |||||
}, | |||||
} | |||||
</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; | |||||
} | |||||
.preview-cover { | |||||
position: absolute; | |||||
bottom: 0; | |||||
top: 0; | |||||
left: 0; | |||||
right: 0; | |||||
background: rgba(0, 0, 0, 0); | |||||
} | |||||
/deep/ .van-uploader__preview-image { | |||||
overflow: visible; | |||||
} | |||||
} | |||||
</style> |