更新工作汇报相关代码
This commit is contained in:
parent
5b7dd337df
commit
159c4f49e8
@ -8,18 +8,18 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="汇报时间" prop="reportTime">
|
||||
<el-date-picker
|
||||
v-model="formData.reportTime"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间">
|
||||
v-model="formData.reportTime"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="汇报给" prop="reportTos">
|
||||
<el-select v-model="formData.reportTos" multiple placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in reportTo"
|
||||
:key="item.id"
|
||||
:label="item.nickname"
|
||||
:value="item.id">
|
||||
v-for="item in reportTo"
|
||||
:key="item.id"
|
||||
:label="item.nickname"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -28,9 +28,9 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="汇报附件" prop="reportFiles">
|
||||
<insp-file-upload
|
||||
:fileSize="30"
|
||||
:fileType="['doc', 'xls', 'ppt', 'txt', 'pdf','png','jpg','jpeg','gif','docx','xlsx','pptx','wps']"
|
||||
v-model="formData.filePath"/>
|
||||
:fileSize="30"
|
||||
:fileType="['doc', 'xls', 'ppt', 'txt', 'pdf','png','jpg','jpeg','gif','docx','xlsx','pptx','wps']"
|
||||
v-model="formData.filePath"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@ -96,13 +96,13 @@ export default {
|
||||
this.formData = res.data;
|
||||
this.dialogTitle = "修改工作汇报";
|
||||
//将字符串转为数组
|
||||
this.formData.filePath = this.formData.filePath.split(",");
|
||||
console.log(this.formData)
|
||||
console.log(this.formData.filePath)
|
||||
if (this.formData.filePath !== undefined && this.formData.filePath !== null && this.formData.filePath !== "") {
|
||||
this.formData.filePath = this.formData.filePath.split(",");
|
||||
}
|
||||
} finally {
|
||||
this.formLoading = false;
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
this.setDefaultData();
|
||||
this.dialogTitle = "新增工作汇报";
|
||||
}
|
||||
|
@ -51,6 +51,13 @@ export function getReportPage(params) {
|
||||
params
|
||||
})
|
||||
}
|
||||
// 获得工作汇报分页
|
||||
export function workReportView(id) {
|
||||
return request({
|
||||
url: '/work/report/workReportView?id=' + id,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
// 导出工作汇报 Excel
|
||||
export function exportReportExcel(params) {
|
||||
return request({
|
||||
|
@ -48,6 +48,9 @@
|
||||
<el-table-column label="汇报人" align="center" prop="userName"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template v-slot="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="workReportView(scope.row.id)"
|
||||
v-hasPermi="['work:report:update']">打印
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"
|
||||
v-hasPermi="['work:report:update']">修改
|
||||
</el-button>
|
||||
@ -57,6 +60,12 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-dialog :visible.sync="showView" width="50%" center>
|
||||
<div v-html="htmText" id="printMe"></div>
|
||||
<el-button type="primary" style="margin-left: 90%;margin-top:20px " v-print="'#printMe'" size="small">打印
|
||||
</el-button>
|
||||
</el-dialog>
|
||||
<!-- 分页组件 -->
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"/>
|
||||
@ -68,9 +77,14 @@
|
||||
<script>
|
||||
import * as ReportApi from '@/views/inspection/workReport/api/index';
|
||||
import ReportForm from './ReportForm.vue';
|
||||
import print from 'vue-print-nb'
|
||||
import {workReportView} from "@/views/inspection/workReport/api/index";
|
||||
|
||||
export default {
|
||||
name: "Report",
|
||||
directives: {
|
||||
print
|
||||
},
|
||||
components: {
|
||||
ReportForm,
|
||||
},
|
||||
@ -78,10 +92,12 @@ export default {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
showView:false,
|
||||
// 导出遮罩层
|
||||
exportLoading: false,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
htmText:'',
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 工作汇报列表
|
||||
@ -135,6 +151,12 @@ export default {
|
||||
openForm(id) {
|
||||
this.$refs["formRef"].open(id);
|
||||
},
|
||||
workReportView(id){
|
||||
this.showView = true
|
||||
ReportApi.workReportView(id).then(res => {
|
||||
this.htmText = res.data
|
||||
})
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
async handleDelete(row) {
|
||||
const id = row.id;
|
||||
|
Loading…
Reference in New Issue
Block a user