|
|
@@ -1,36 +1,63 @@
|
|
|
<template>
|
|
|
<div class="detail">
|
|
|
<nav-bar></nav-bar>
|
|
|
- <div class="info">
|
|
|
+ <div class="page-container">
|
|
|
<van-cell-group>
|
|
|
<van-cell class="item-cell" title="签署类型" :value="getDictLabel(dataInfo.type,'safety_book_type')" >
|
|
|
</van-cell>
|
|
|
- <van-cell class="item-cell" title="签署人" :value="dataInfo.userName" >
|
|
|
+ <van-cell class="item-cell" title="签署人所在机构" :value="dataInfo.userName" >
|
|
|
</van-cell>
|
|
|
- <van-cell class="item-cell" title="签署时间" :value="dataInfo.createTime">
|
|
|
+ <van-cell class="item-cell" title="所属年度" :value="`${dataInfo.year}年`" >
|
|
|
+ </van-cell>
|
|
|
+ <van-cell class="item-cell" title="添加时间" :value="dataInfo.createTime">
|
|
|
</van-cell>
|
|
|
</van-cell-group>
|
|
|
+ <div class="book-list">
|
|
|
+ <div class="card" v-for="(v,i) in bookList" :key="v.id">
|
|
|
+ <van-cell title="签署人" :value="v.userName"></van-cell>
|
|
|
+ <van-cell title="签署时间" :value="v.time"></van-cell>
|
|
|
+ <van-cell v-if="v.files && v.files.length > 0" title="签署文件" >
|
|
|
+ <template #label>
|
|
|
+ <div class="file-list">
|
|
|
+ <div class="file-item" v-for="(file,index) in v.files" :key="index">
|
|
|
+ <span style="color: #1989fa;" @click="preview(file)" :key="file.name">{{file.name}}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </van-cell>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import NavBar from '@/components/NavBar'
|
|
|
import { detail } from './api.js'
|
|
|
-
|
|
|
+import {mapGetters} from 'vuex'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ activeNames: [],
|
|
|
dataInfo: {},
|
|
|
+ bookList:[],
|
|
|
+ dicts:['safety_book_type']
|
|
|
}
|
|
|
},
|
|
|
components: { NavBar },
|
|
|
+ computed:{
|
|
|
+ ...mapGetters(['orgId','dictionary'])
|
|
|
+ },
|
|
|
mounted() {
|
|
|
this.getInfo();
|
|
|
},
|
|
|
methods: {
|
|
|
+ preview(file){
|
|
|
+ this.openFilePreview(file);
|
|
|
+ },
|
|
|
async getInfo() {
|
|
|
let res = await detail(this.$route.query.id);
|
|
|
this.dataInfo = res.data;
|
|
|
+ this.bookList = res.data.bookUsers;
|
|
|
},
|
|
|
}
|
|
|
}
|
|
|
@@ -39,9 +66,29 @@ export default {
|
|
|
.detail {
|
|
|
|
|
|
}
|
|
|
-.info{
|
|
|
-}
|
|
|
-.history {
|
|
|
+.page-container {
|
|
|
|
|
|
}
|
|
|
+.book-list{
|
|
|
+ height: calc(100vh - 446px);
|
|
|
+ overflow: auto;
|
|
|
+ padding: 20px;
|
|
|
+}
|
|
|
+.card {
|
|
|
+ margin-bottom: 20px;
|
|
|
+ box-shadow: 0 10px 10px #eaeaea;
|
|
|
+ &:last-child {
|
|
|
+ margin-bottom: 0;
|
|
|
+ }
|
|
|
+}
|
|
|
+.file-list{
|
|
|
+ width: 100%;
|
|
|
+ min-height: 40px;
|
|
|
+ padding: 20px 0;
|
|
|
+ >div{
|
|
|
+ line-height: 40px;
|
|
|
+ height: 40px;
|
|
|
+ padding-left: 20px;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|