|
|
@@ -3,7 +3,7 @@
|
|
|
<NavBar />
|
|
|
<div class="page-container">
|
|
|
<div class="search-box">
|
|
|
- <org-tree v-model="query.OrgId" placeholder="选择检查机构" @change="refreshData"></org-tree>
|
|
|
+ <org-tree v-model="query.orgId" placeholder="选择检查机构" @change="refreshData"></org-tree>
|
|
|
</div>
|
|
|
<div class="scroll-box">
|
|
|
<Scroll
|
|
|
@@ -12,16 +12,17 @@
|
|
|
:pullupFn="getDataList"
|
|
|
:pullup="pullup">
|
|
|
<van-empty v-if="!dataList.length" description="暂无数据" />
|
|
|
- <div class="list-item" v-else v-for="(v,i) in dataList" :key="i">
|
|
|
- <van-panel :title="v.title" :status="`${i}`" @click="clickItem(v)">
|
|
|
- <van-cell class="item-cell" :title="v.title" :value="v.publishTime">
|
|
|
+ <card class="list-item" v-else v-for="(v,i) in dataList" :key="i">
|
|
|
+ <p class="item-title">{{v.orgName}}</p>
|
|
|
+ <div :title="v.orgName" @click="clickItem(v)">
|
|
|
+ <van-cell class="item-cell" title="签署类型" :value="getDictLabel(v.type,'safety_book_type')" >
|
|
|
</van-cell>
|
|
|
- <van-cell class="item-cell" :title="v.title" :value="v.publishTime" >
|
|
|
+ <van-cell class="item-cell" title="签署人" :value="v.userName" >
|
|
|
</van-cell>
|
|
|
- <van-cell class="item-cell" :title="v.title" :value="v.publishTime" >
|
|
|
+ <van-cell class="item-cell" title="签署时间" :value="v.createTime">
|
|
|
</van-cell>
|
|
|
- </van-panel>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ </card>
|
|
|
</Scroll>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -29,9 +30,11 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import {mapGetters} from "vuex";
|
|
|
import NavBar from '@/components/NavBar'
|
|
|
import OrgTree from '@/components/orgTree'
|
|
|
import Scroll from '@/components/scroll/scroll'
|
|
|
+import Card from '@/components/card'
|
|
|
import {dataList} from './api'
|
|
|
import {formatDate} from "@/filters/filter";
|
|
|
import {msgList} from "@/views/menu/message/api";
|
|
|
@@ -40,24 +43,37 @@ export default {
|
|
|
components: {
|
|
|
NavBar,
|
|
|
OrgTree,
|
|
|
- Scroll
|
|
|
+ Scroll,
|
|
|
+ Card
|
|
|
},
|
|
|
data(){
|
|
|
+ let year = new Date().getFullYear();
|
|
|
return {
|
|
|
pullup:true,
|
|
|
query:{
|
|
|
- OrgId:null,
|
|
|
+ orgId:null,
|
|
|
+ year:year,
|
|
|
pageNum:1,
|
|
|
pageSize:10,
|
|
|
},
|
|
|
total:0,
|
|
|
- dataList:[]
|
|
|
+ dataList:[],
|
|
|
+ dicts:['safety_book_type'],
|
|
|
}
|
|
|
},
|
|
|
+ computed:{
|
|
|
+ ...mapGetters(['orgId','dictionary'])
|
|
|
+ },
|
|
|
mounted(){
|
|
|
+ this.query.orgId = this.orgId;
|
|
|
this.getDataList();
|
|
|
},
|
|
|
methods:{
|
|
|
+ clickItem(item){
|
|
|
+ this.$router.push({
|
|
|
+ path:'/safetyBookDetail',query:{id:item.id}
|
|
|
+ })
|
|
|
+ },
|
|
|
refreshData(){
|
|
|
this.pullup = true;
|
|
|
this.query.pageNum = 1;
|
|
|
@@ -71,7 +87,6 @@ export default {
|
|
|
this.$toast('已加载完毕');
|
|
|
return;
|
|
|
}
|
|
|
- let data = {};
|
|
|
dataList(this.query).then(res=>{
|
|
|
if(res.total === '0'){
|
|
|
this.pullup = false;
|
|
|
@@ -92,13 +107,16 @@ export default {
|
|
|
</script>
|
|
|
<style lang="scss">
|
|
|
.safetyBook{
|
|
|
+ .van-cell-group__title{
|
|
|
+ background-color: #fff;
|
|
|
+ color: #333;
|
|
|
+ }
|
|
|
.list-item{
|
|
|
- .van-cell-group__title{
|
|
|
- background-color: #fff;
|
|
|
- color: #333;
|
|
|
- }
|
|
|
- .van-cell__title{
|
|
|
- color: #969799;
|
|
|
+ .item-cell{
|
|
|
+ -padding: 20px 0;
|
|
|
+ .van-cell__title{
|
|
|
+ color: #969799;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -108,15 +126,17 @@ export default {
|
|
|
|
|
|
}
|
|
|
.scroll-box{
|
|
|
- padding: 20px;
|
|
|
+ padding:0 20px;
|
|
|
width: 100%;
|
|
|
height:calc(100vh - 284px);
|
|
|
overflow: auto;
|
|
|
}
|
|
|
.list-item{
|
|
|
- margin-bottom:20px;
|
|
|
- &:last-child{
|
|
|
- margin-bottom: 0;
|
|
|
+ .item-title{
|
|
|
+ font-size: 28px;
|
|
|
+ color: #333;
|
|
|
+ padding-bottom: 20px ;
|
|
|
+ border-bottom: 1px solid #f4f4f4;
|
|
|
}
|
|
|
}
|
|
|
</style>
|