|
|
|
|
<template>
|
|
|
|
|
<el-dialog title="查看" :visible.sync="dialogFormVisible" width="90%">
|
|
|
|
|
<div class="dialogConcent" :style="{height:clientHeight+'px'}">
|
|
|
|
|
<el-scrollbar style="flex: 1">
|
|
|
|
|
<el-form :model="form" ref="form" label-position="top" label-width="120">
|
|
|
|
|
<el-form-item label="任务名称">
|
|
|
|
|
{{form.title}}
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="任务日期">
|
|
|
|
|
|
|
|
|
|
{{form.start_date}}至{{form.end_date}}
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item label="内容" prop="content">
|
|
|
|
|
<div style="width: 99.9%;" v-html="form.content">
|
|
|
|
|
</div>
|
|
|
|
|
</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>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="dialogFormVisible=false">关闭</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
<viewFile :is-show.sync="isShowViewFile" :url="fileUrl"></viewFile>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {
|
|
|
|
|
listtask,
|
|
|
|
|
getdaily
|
|
|
|
|
} from "../../../api/daily/index.js";
|
|
|
|
|
|
|
|
|
|
import viewFile from '@/components/viewFile/viewFile.vue'
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
viewFile
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
dialogFormVisible: false,
|
|
|
|
|
form: {},
|
|
|
|
|
fileList: [],
|
|
|
|
|
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 getdaily(id).then(res => {
|
|
|
|
|
// this.$set(that.form,res);
|
|
|
|
|
that.form = res;
|
|
|
|
|
let _files = [];
|
|
|
|
|
for (var mod of result.files) {
|
|
|
|
|
let m = Object.assign({}, mod);
|
|
|
|
|
m.name = mod.original_name;
|
|
|
|
|
_files.push(m);
|
|
|
|
|
}
|
|
|
|
|
that.fileList = _files;
|
|
|
|
|
}).catch(error => {
|
|
|
|
|
//reject(error)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
.dialogConcent {
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
}
|
|
|
|
|
</style>
|