|
|
@ -34,17 +34,10 @@
|
|
|
|
size="mini"
|
|
|
|
size="mini"
|
|
|
|
@click="handleAdd"
|
|
|
|
@click="handleAdd"
|
|
|
|
v-hasPermi="['ehs:ehsDocument:add']"
|
|
|
|
v-hasPermi="['ehs:ehsDocument:add']"
|
|
|
|
>公文登记</el-button>
|
|
|
|
>公文登记
|
|
|
|
</el-col>
|
|
|
|
</el-button>
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
|
|
plain
|
|
|
|
|
|
|
|
icon="el-icon-document"
|
|
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
|
|
@click=""
|
|
|
|
|
|
|
|
>公文流转</el-button>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
|
type="success"
|
|
|
|
type="success"
|
|
|
@ -54,7 +47,8 @@
|
|
|
|
:disabled="single"
|
|
|
|
:disabled="single"
|
|
|
|
@click="handleUpdate"
|
|
|
|
@click="handleUpdate"
|
|
|
|
v-hasPermi="['ehs:ehsDocument:edit']"
|
|
|
|
v-hasPermi="['ehs:ehsDocument:edit']"
|
|
|
|
>修改</el-button>
|
|
|
|
>修改
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
@ -65,7 +59,8 @@
|
|
|
|
:disabled="multiple"
|
|
|
|
:disabled="multiple"
|
|
|
|
@click="handleDelete"
|
|
|
|
@click="handleDelete"
|
|
|
|
v-hasPermi="['ehs:ehsDocument:remove']"
|
|
|
|
v-hasPermi="['ehs:ehsDocument:remove']"
|
|
|
|
>删除</el-button>
|
|
|
|
>删除
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
@ -75,7 +70,8 @@
|
|
|
|
size="mini"
|
|
|
|
size="mini"
|
|
|
|
@click="handleExport"
|
|
|
|
@click="handleExport"
|
|
|
|
v-hasPermi="['ehs:ehsDocument:export']"
|
|
|
|
v-hasPermi="['ehs:ehsDocument:export']"
|
|
|
|
>导出</el-button>
|
|
|
|
>导出
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
@ -112,18 +108,27 @@
|
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
|
v-hasPermi="['ehs:ehsDocument:edit']"
|
|
|
|
v-hasPermi="['ehs:ehsDocument:edit']"
|
|
|
|
>修改</el-button>-->
|
|
|
|
>修改</el-button>-->
|
|
|
|
|
|
|
|
<el-button v-show="scope.row.status==1"
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
|
|
plain
|
|
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
|
|
@click="handleLend(scope.row)"
|
|
|
|
|
|
|
|
>借出
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
<el-button v-show="scope.row.status==0"
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
|
|
plain
|
|
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
|
|
@click="returnDoc(scope.row)"
|
|
|
|
|
|
|
|
>归还
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
|
size="middle"
|
|
|
|
size="mini"
|
|
|
|
type="primary"
|
|
|
|
type="primary"
|
|
|
|
@click="transferRecord(scope.row)"
|
|
|
|
@click="transferRecord(scope.row)"
|
|
|
|
>流转记录</el-button>
|
|
|
|
>流转记录
|
|
|
|
<!--<el-button
|
|
|
|
</el-button>
|
|
|
|
size="mini"
|
|
|
|
|
|
|
|
type="text"
|
|
|
|
|
|
|
|
icon="el-icon-delete"
|
|
|
|
|
|
|
|
@click="handleDelete(scope.row)"
|
|
|
|
|
|
|
|
v-hasPermi="['ehs:ehsDocument:remove']"
|
|
|
|
|
|
|
|
>删除</el-button>-->
|
|
|
|
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table>
|
|
|
|
</el-table>
|
|
|
@ -181,7 +186,8 @@
|
|
|
|
v-model="form.receiveTime"
|
|
|
|
v-model="form.receiveTime"
|
|
|
|
type="date"
|
|
|
|
type="date"
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
placeholder="请选择收文日期">
|
|
|
|
placeholder="请选择收文日期"
|
|
|
|
|
|
|
|
>
|
|
|
|
</el-date-picker>
|
|
|
|
</el-date-picker>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
@ -193,7 +199,7 @@
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
<!--流转记录会话框-->
|
|
|
|
<el-dialog :title="title1" :visible.sync="open1" width="600px" append-to-body>
|
|
|
|
<el-dialog :title="title1" :visible.sync="open1" width="600px" append-to-body>
|
|
|
|
<el-table v-loading="loading" :data="ehsDocTransferList">
|
|
|
|
<el-table v-loading="loading" :data="ehsDocTransferList">
|
|
|
|
<el-table-column label="序号" align="center">
|
|
|
|
<el-table-column label="序号" align="center">
|
|
|
@ -205,31 +211,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
<el-table-column label="流转时间" align="center" prop="transferTime" width="180">
|
|
|
|
<el-table-column label="流转时间" align="center" prop="transferTime" width="180">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<span>{{ parseTime(scope.row.transferTime, '{y}-{m}-{d}') }}</span>
|
|
|
|
<span>{{ parseTime(scope.row.transferTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <el-table-column label="流转状态" align="center" prop="docTransferStatus">
|
|
|
|
|
|
|
|
<!– <template slot-scope="scope">
|
|
|
|
|
|
|
|
<dict-tag :options="dict.type.doc_status" :value="scope.row.docTransferStatus"/>
|
|
|
|
|
|
|
|
</template>–>
|
|
|
|
|
|
|
|
<!– <el-select v-model="docTransferStatus" placeholder="请选择流转状态" clearable>
|
|
|
|
|
|
|
|
<el-option label="未处理" value="0"> </el-option>
|
|
|
|
|
|
|
|
<el-option label="已处理" value="1"> </el-option>
|
|
|
|
|
|
|
|
</el-select>–>
|
|
|
|
|
|
|
|
</el-table-column>-->
|
|
|
|
<el-table-column label="流转状态" align="center" prop="docTransferStatus">
|
|
|
|
<el-table-column label="流转状态" align="center" prop="docTransferStatus">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<dict-tag :options="dict.type.doc_transfer_status" :value="scope.row.docTransferStatus"/>
|
|
|
|
<span v-if="scope.row.docTransferStatus == '0'">借出</span>
|
|
|
|
|
|
|
|
<span v-else>归还</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--公文借出会话框-->
|
|
|
|
|
|
|
|
<el-dialog :title="title2" :visible.sync="open2" width="600px" append-to-body>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
|
|
|
|
|
<el-form-item label="公文名称" prop="documentName">
|
|
|
|
|
|
|
|
<el-input v-model="form.documentName" placeholder="请输入公文名称"/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="流转人" prop="transferName">
|
|
|
|
|
|
|
|
<el-input v-model="form.transferName" placeholder="请输入流转人"/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<!--<el-form-item label="拟稿部门" prop="draftDept">
|
|
|
|
|
|
|
|
<el-input v-model="form.draftDept" placeholder="请输入拟稿部门" />
|
|
|
|
|
|
|
|
</el-form-item>-->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="流转时间" prop="transferTime">
|
|
|
|
|
|
|
|
<el-date-picker clearable
|
|
|
|
|
|
|
|
v-model="form.transferTime"
|
|
|
|
|
|
|
|
type="date"
|
|
|
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
|
|
|
|
placeholder="请选择流转时间"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
|
|
|
<el-button type="primary" @click="submitLendForm">确 定</el-button>
|
|
|
|
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { listEhsDocument, getEhsDocument, delEhsDocument, addEhsDocument, updateEhsDocument, getAllDraftDept, getDocTransferById} from "@/api/ehs/ehsDocument";
|
|
|
|
import {
|
|
|
|
import { listEhsDocTransfer } from '@/api/ehs/ehsDocTransfer'
|
|
|
|
listEhsDocument,
|
|
|
|
|
|
|
|
getEhsDocument,
|
|
|
|
|
|
|
|
delEhsDocument,
|
|
|
|
|
|
|
|
addEhsDocument,
|
|
|
|
|
|
|
|
updateEhsDocument,
|
|
|
|
|
|
|
|
getAllDraftDept,
|
|
|
|
|
|
|
|
getDocTransferById,
|
|
|
|
|
|
|
|
getEhsDocumentById
|
|
|
|
|
|
|
|
} from '@/api/ehs/ehsDocument'
|
|
|
|
|
|
|
|
import { addEhsDocTransfer, listEhsDocTransfer, lendEhsDoc, returnEhsDoc } from '@/api/ehs/ehsDocTransfer'
|
|
|
|
import { parseTime } from '../../../utils/ruoyi'
|
|
|
|
import { parseTime } from '../../../utils/ruoyi'
|
|
|
|
import dict from '@/utils/dict'
|
|
|
|
import dict from '@/utils/dict'
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "EhsDocument",
|
|
|
|
name: 'EhsDocument',
|
|
|
|
dicts: ['doc_type', 'doc_transfer_status'],
|
|
|
|
dicts: ['doc_type', 'doc_transfer_status'],
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
@ -252,55 +309,57 @@ export default {
|
|
|
|
// 公文流转记录数据
|
|
|
|
// 公文流转记录数据
|
|
|
|
ehsDocTransferList: [],
|
|
|
|
ehsDocTransferList: [],
|
|
|
|
// 弹出层标题
|
|
|
|
// 弹出层标题
|
|
|
|
title: "",
|
|
|
|
title: '',
|
|
|
|
title1: "",
|
|
|
|
title1: '',
|
|
|
|
|
|
|
|
title2: '',
|
|
|
|
// 是否显示弹出层
|
|
|
|
// 是否显示弹出层
|
|
|
|
open: false,
|
|
|
|
open: false,
|
|
|
|
open1: false,
|
|
|
|
open1: false,
|
|
|
|
|
|
|
|
open2: false,
|
|
|
|
// 查询参数
|
|
|
|
// 查询参数
|
|
|
|
queryParams: {
|
|
|
|
queryParams: {
|
|
|
|
pageNum: 1,
|
|
|
|
pageNum: 1,
|
|
|
|
pageSize: 10,
|
|
|
|
pageSize: 10,
|
|
|
|
docName: null,
|
|
|
|
docName: null,
|
|
|
|
docType: null,
|
|
|
|
docType: null
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 表单参数
|
|
|
|
// 表单参数
|
|
|
|
form: {},
|
|
|
|
form: {},
|
|
|
|
// 表单校验
|
|
|
|
// 表单校验
|
|
|
|
rules: {
|
|
|
|
rules: {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
|
this.getList();
|
|
|
|
this.getList()
|
|
|
|
// 获取拟稿部门下拉列表
|
|
|
|
// 获取拟稿部门下拉列表
|
|
|
|
this.getAllDraftDept();
|
|
|
|
this.getAllDraftDept()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
dict,
|
|
|
|
dict,
|
|
|
|
parseTime,
|
|
|
|
parseTime,
|
|
|
|
/** 查询公文管理列表 */
|
|
|
|
/** 查询公文管理列表 */
|
|
|
|
getList() {
|
|
|
|
getList() {
|
|
|
|
this.loading = true;
|
|
|
|
this.loading = true
|
|
|
|
listEhsDocument(this.queryParams).then(response => {
|
|
|
|
listEhsDocument(this.queryParams).then(response => {
|
|
|
|
this.ehsDocumentList = response.rows;
|
|
|
|
this.ehsDocumentList = response.rows
|
|
|
|
this.total = response.total;
|
|
|
|
this.total = response.total
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false
|
|
|
|
});
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
/** 获取拟稿部门下拉列表 */
|
|
|
|
/** 获取拟稿部门下拉列表 */
|
|
|
|
getAllDraftDept() {
|
|
|
|
getAllDraftDept() {
|
|
|
|
getAllDraftDept().then((res) => {
|
|
|
|
getAllDraftDept().then((res) => {
|
|
|
|
console.log(res);
|
|
|
|
console.log(res)
|
|
|
|
this.ngbmInfo = res.data;
|
|
|
|
this.ngbmInfo = res.data
|
|
|
|
});
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 取消按钮
|
|
|
|
// 取消按钮
|
|
|
|
cancel() {
|
|
|
|
cancel() {
|
|
|
|
this.open = false;
|
|
|
|
this.open = false
|
|
|
|
this.open1 = false;
|
|
|
|
this.open1 = false
|
|
|
|
this.reset();
|
|
|
|
this.open2 = false
|
|
|
|
|
|
|
|
this.reset()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 表单重置
|
|
|
|
// 表单重置
|
|
|
|
reset() {
|
|
|
|
reset() {
|
|
|
@ -320,18 +379,18 @@ export default {
|
|
|
|
deptId: null,
|
|
|
|
deptId: null,
|
|
|
|
createUserId: null,
|
|
|
|
createUserId: null,
|
|
|
|
updateUserId: null
|
|
|
|
updateUserId: null
|
|
|
|
};
|
|
|
|
}
|
|
|
|
this.resetForm("form");
|
|
|
|
this.resetForm('form')
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
handleQuery() {
|
|
|
|
handleQuery() {
|
|
|
|
this.queryParams.pageNum = 1;
|
|
|
|
this.queryParams.pageNum = 1
|
|
|
|
this.getList();
|
|
|
|
this.getList()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 重置按钮操作 */
|
|
|
|
/** 重置按钮操作 */
|
|
|
|
resetQuery() {
|
|
|
|
resetQuery() {
|
|
|
|
this.resetForm("queryForm");
|
|
|
|
this.resetForm('queryForm')
|
|
|
|
this.handleQuery();
|
|
|
|
this.handleQuery()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 多选框选中数据
|
|
|
|
// 多选框选中数据
|
|
|
|
handleSelectionChange(selection) {
|
|
|
|
handleSelectionChange(selection) {
|
|
|
@ -341,63 +400,100 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
handleAdd() {
|
|
|
|
handleAdd() {
|
|
|
|
this.reset();
|
|
|
|
this.reset()
|
|
|
|
this.open = true;
|
|
|
|
this.open = true
|
|
|
|
this.title = "公文登记";
|
|
|
|
this.title = '公文登记'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
handleUpdate(row) {
|
|
|
|
handleUpdate(row) {
|
|
|
|
this.reset();
|
|
|
|
this.reset()
|
|
|
|
const id = row.id || this.ids
|
|
|
|
const id = row.id || this.ids
|
|
|
|
getEhsDocument(id).then(response => {
|
|
|
|
getEhsDocument(id).then(response => {
|
|
|
|
this.form = response.data;
|
|
|
|
this.form = response.data
|
|
|
|
this.open = true;
|
|
|
|
this.open = true
|
|
|
|
this.title = "修改公文";
|
|
|
|
this.title = '修改公文'
|
|
|
|
});
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/** 借出按钮操作 */
|
|
|
|
|
|
|
|
handleLend(row) {
|
|
|
|
|
|
|
|
this.reset()
|
|
|
|
|
|
|
|
const id = row.id || this.ids
|
|
|
|
|
|
|
|
getEhsDocumentById(id).then(response => {
|
|
|
|
|
|
|
|
this.form = response.data
|
|
|
|
|
|
|
|
this.open2 = true
|
|
|
|
|
|
|
|
this.title2 = '借出信息'
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/** 归还操作 */
|
|
|
|
|
|
|
|
returnDoc(row) {
|
|
|
|
|
|
|
|
const id = row.id || this.ids;
|
|
|
|
|
|
|
|
returnEhsDoc(id).then(response => {
|
|
|
|
|
|
|
|
this.$modal.msgSuccess('归还成功')
|
|
|
|
|
|
|
|
this.getList()
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
/* lendEhsDoc(this.form).then(response => {
|
|
|
|
|
|
|
|
this.$modal.msgSuccess('借出成功')
|
|
|
|
|
|
|
|
this.open2 = false
|
|
|
|
|
|
|
|
this.getList()
|
|
|
|
|
|
|
|
}) */
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 流转记录按钮操作 */
|
|
|
|
/** 流转记录按钮操作 */
|
|
|
|
transferRecord(row) {
|
|
|
|
transferRecord(row) {
|
|
|
|
this.reset();
|
|
|
|
this.reset()
|
|
|
|
const id = row.id || this.ids;
|
|
|
|
const id = row.id || this.ids
|
|
|
|
/** 查询公文流转记录 */
|
|
|
|
/** 查询公文流转记录 */
|
|
|
|
getDocTransferById(id).then(response => {
|
|
|
|
getDocTransferById(id).then(response => {
|
|
|
|
this.open1 = true;
|
|
|
|
this.open1 = true
|
|
|
|
this.loading = true;
|
|
|
|
this.loading = true
|
|
|
|
this.title1 = "流转记录";
|
|
|
|
this.title1 = '流转记录'
|
|
|
|
this.ehsDocTransferList = response.rows;
|
|
|
|
this.ehsDocTransferList = response.rows
|
|
|
|
//this.total1 = response.total;
|
|
|
|
//this.total1 = response.total;
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false
|
|
|
|
});
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 提交按钮 */
|
|
|
|
/** 提交按钮 */
|
|
|
|
submitForm() {
|
|
|
|
submitForm() {
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
this.$refs['form'].validate(valid => {
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
|
if (this.form.id != null) {
|
|
|
|
if (this.form.id != null) {
|
|
|
|
updateEhsDocument(this.form).then(response => {
|
|
|
|
updateEhsDocument(this.form).then(response => {
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
this.$modal.msgSuccess('修改成功')
|
|
|
|
this.open = false;
|
|
|
|
this.open = false
|
|
|
|
this.getList();
|
|
|
|
this.getList()
|
|
|
|
});
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
addEhsDocument(this.form).then(response => {
|
|
|
|
addEhsDocument(this.form).then(response => {
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
this.$modal.msgSuccess('新增成功')
|
|
|
|
this.open = false;
|
|
|
|
this.open = false
|
|
|
|
this.getList();
|
|
|
|
this.getList()
|
|
|
|
});
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/** 提交借出信息 */
|
|
|
|
|
|
|
|
submitLendForm() {
|
|
|
|
|
|
|
|
this.$refs['form'].validate(valid => {
|
|
|
|
|
|
|
|
if (valid) {
|
|
|
|
|
|
|
|
lendEhsDoc(this.form).then(response => {
|
|
|
|
|
|
|
|
this.$modal.msgSuccess('借出成功')
|
|
|
|
|
|
|
|
this.open2 = false
|
|
|
|
|
|
|
|
this.getList()
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
handleDelete(row) {
|
|
|
|
handleDelete(row) {
|
|
|
|
const ids = row.id || this.ids;
|
|
|
|
const ids = row.id || this.ids
|
|
|
|
this.$modal.confirm('是否确认删除公文管理编号为"' + ids + '"的数据项?').then(function() {
|
|
|
|
this.$modal.confirm('是否确认删除公文管理编号为"' + ids + '"的数据项?').then(function() {
|
|
|
|
return delEhsDocument(ids);
|
|
|
|
return delEhsDocument(ids)
|
|
|
|
}).then(() => {
|
|
|
|
}).then(() => {
|
|
|
|
this.getList();
|
|
|
|
this.getList()
|
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
|
this.$modal.msgSuccess('删除成功')
|
|
|
|
}).catch(() => {});
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
handleExport() {
|
|
|
|
handleExport() {
|
|
|
@ -406,5 +502,5 @@ export default {
|
|
|
|
}, `ehsDocument_${new Date().getTime()}.xlsx`)
|
|
|
|
}, `ehsDocument_${new Date().getTime()}.xlsx`)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|