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