|
|
|
|
@ -1,25 +1,42 @@
|
|
|
|
|
<template>
|
|
|
|
|
|
|
|
|
|
<el-dialog title="安全生产任务上报内容查看" :visible.sync="dialogFormVisible" width="90%">
|
|
|
|
|
<div class="dialogConcent" :style="{height:clientHeight+'px'}">
|
|
|
|
|
|
|
|
|
|
<el-drawer title="安全生产任务上报内容查看" :visible.sync="dialogFormVisible" direction="rtl">
|
|
|
|
|
<div class="dialogConcent" :style="{height:clientHeight+'px'}" style="padding: 20px;" >
|
|
|
|
|
<el-scrollbar style="flex: 1">
|
|
|
|
|
<el-form :model="form" ref="form" label-position="right" label-width="120">
|
|
|
|
|
<el-form-item label="内容">
|
|
|
|
|
<div style="width: 99.9%;" v-html="form.content">
|
|
|
|
|
</div>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="附件">
|
|
|
|
|
<el-link v-for="item in form.files" target="_blank" :href="item.url" type="primary">
|
|
|
|
|
{{item.original_name}}
|
|
|
|
|
</el-link>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item label="附件" prop="file_list">
|
|
|
|
|
<div style="display: flex;flex-direction: column;">
|
|
|
|
|
|
|
|
|
|
<div v-for="item in form.files" style="display: flex;justify-content: space-between;">
|
|
|
|
|
<el-link target="_blank" :href="item.url" type="primary">
|
|
|
|
|
{{item.original_name}}
|
|
|
|
|
</el-link>
|
|
|
|
|
<div style="display: flex;">
|
|
|
|
|
<el-link target="_blank" style="margin-right: 10px;" @click="toshowFile(item.url)"
|
|
|
|
|
type="primary">
|
|
|
|
|
预览
|
|
|
|
|
</el-link>
|
|
|
|
|
<el-link target="_blank" :href="item.url" type="primary">
|
|
|
|
|
下载
|
|
|
|
|
</el-link>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
</el-scrollbar>
|
|
|
|
|
</div>
|
|
|
|
|
<viewFile :is-show.sync="isShowViewFile" :url="fileUrl"></viewFile>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="dialogFormVisible=false">关 闭</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div> </el-drawer>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
@ -27,20 +44,30 @@
|
|
|
|
|
get
|
|
|
|
|
} from "../../../api/daily/deptindex.js";
|
|
|
|
|
|
|
|
|
|
import viewFile from '@/components/viewFile/viewFile.vue'
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
viewFile
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
dialogFormVisible: false,
|
|
|
|
|
form: {},
|
|
|
|
|
fileList: [],
|
|
|
|
|
clientHeight: 0
|
|
|
|
|
clientHeight: 0
|
|
|
|
|
,isShowViewFile: false,
|
|
|
|
|
fileUrl: ""
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.clientHeight = document.documentElement.clientHeight * .6;
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
toshowFile(url) {
|
|
|
|
|
this.fileUrl = url;
|
|
|
|
|
this.isShowViewFile = true;
|
|
|
|
|
},
|
|
|
|
|
async getinfo(id) {
|
|
|
|
|
var that = this;
|
|
|
|
|
await get(id).then(res => {
|
|
|
|
|
|