|
@@ -93,16 +93,16 @@
|
|
>删除
|
|
>删除
|
|
</el-button>
|
|
</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :span="1.5">
|
|
|
|
- <el-button
|
|
|
|
- type="info"
|
|
|
|
- icon="el-icon-upload2"
|
|
|
|
- size="mini"
|
|
|
|
- @click="handleImport"
|
|
|
|
- v-hasPermi="['production:record:edit']"
|
|
|
|
- >导入
|
|
|
|
- </el-button>
|
|
|
|
- </el-col>
|
|
|
|
|
|
+ <!-- <el-col :span="1.5">
|
|
|
|
+ <el-button
|
|
|
|
+ type="info"
|
|
|
|
+ icon="el-icon-upload2"
|
|
|
|
+ size="mini"
|
|
|
|
+ @click="handleImport"
|
|
|
|
+ v-hasPermi="['production:record:edit']"
|
|
|
|
+ >导入
|
|
|
|
+ </el-button>
|
|
|
|
+ </el-col>-->
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
<el-button
|
|
<el-button
|
|
type="warning"
|
|
type="warning"
|
|
@@ -129,14 +129,36 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="检查人" align="center" prop="checkerName" :show-overflow-tooltip="true"/>
|
|
<el-table-column label="检查人" align="center" prop="checkerName" :show-overflow-tooltip="true"/>
|
|
<el-table-column label="检查问题描述" align="center" prop="checkProblem" :show-overflow-tooltip="true"/>
|
|
<el-table-column label="检查问题描述" align="center" prop="checkProblem" :show-overflow-tooltip="true"/>
|
|
- <el-table-column label="检查附件" align="center" prop="checkFile" :show-overflow-tooltip="true"/>
|
|
|
|
|
|
+ <el-table-column label="检查附件" align="center" prop="checkFile" :show-overflow-tooltip="true">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div v-if="scope.row.checkFile">
|
|
|
|
+ <el-button type="text" @click="openFile(scope.row.checkFile,'检查附件')"><i
|
|
|
|
+ class="el-icon-picture-outline"/>查看
|
|
|
|
+ </el-button>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-else>
|
|
|
|
+ NA
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
<el-table-column label="整改日期" align="center" prop="changeDate" width="100">
|
|
<el-table-column label="整改日期" align="center" prop="changeDate" width="100">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<span>{{ parseTime(scope.row.changeDate, '{y}-{m}-{d}') }}</span>
|
|
<span>{{ parseTime(scope.row.changeDate, '{y}-{m}-{d}') }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="整改内容" align="center" prop="changeContent" :show-overflow-tooltip="true"/>
|
|
<el-table-column label="整改内容" align="center" prop="changeContent" :show-overflow-tooltip="true"/>
|
|
- <el-table-column label="整改后照片" align="center" prop="chengeFile" :show-overflow-tooltip="true"/>
|
|
|
|
|
|
+ <el-table-column label="整改后照片" align="center" prop="changeFile" :show-overflow-tooltip="true">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div v-if="scope.row.changeFile">
|
|
|
|
+ <el-button type="text" @click="openFile(scope.row.changeFile,'整改后照片')"><i
|
|
|
|
+ class="el-icon-picture-outline"/>查看
|
|
|
|
+ </el-button>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-else>
|
|
|
|
+ NA
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
<el-table-column label="整改结果" align="center" prop="changeResult" :show-overflow-tooltip="true"/>
|
|
<el-table-column label="整改结果" align="center" prop="changeResult" :show-overflow-tooltip="true"/>
|
|
<el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"/>
|
|
<el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"/>
|
|
<el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
|
|
<el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
|
|
@@ -144,26 +166,10 @@
|
|
<el-button
|
|
<el-button
|
|
size="mini"
|
|
size="mini"
|
|
type="text"
|
|
type="text"
|
|
- icon="el-icon-edit"
|
|
|
|
- @click="handleChange(scope.row)"
|
|
|
|
- v-hasPermi="['production:record:edit']"
|
|
|
|
- >整改
|
|
|
|
- </el-button>
|
|
|
|
- <el-button
|
|
|
|
- size="mini"
|
|
|
|
- type="text"
|
|
|
|
- icon="el-icon-edit"
|
|
|
|
- @click="handleUpdate(scope.row)"
|
|
|
|
|
|
+ icon="el-icon-tickets"
|
|
|
|
+ @click="openDetail(scope.row.id)"
|
|
v-hasPermi="['production:record:edit']"
|
|
v-hasPermi="['production:record:edit']"
|
|
- >修改
|
|
|
|
- </el-button>
|
|
|
|
- <el-button
|
|
|
|
- size="mini"
|
|
|
|
- type="text"
|
|
|
|
- icon="el-icon-delete"
|
|
|
|
- @click="handleDelete(scope.row)"
|
|
|
|
- v-hasPermi="['production:record:remove']"
|
|
|
|
- >删除
|
|
|
|
|
|
+ >整改记录
|
|
</el-button>
|
|
</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -177,6 +183,17 @@
|
|
@pagination="getList"
|
|
@pagination="getList"
|
|
/>
|
|
/>
|
|
|
|
|
|
|
|
+ <el-dialog :title="file.title" :visible.sync="file.open">
|
|
|
|
+ <div>
|
|
|
|
+ <el-image
|
|
|
|
+ style="width: 30%; height: 30%;margin:10px;border-radius: 5%;vertical-align: middle;'"
|
|
|
|
+ v-for="url in srcList"
|
|
|
|
+ :src="url"
|
|
|
|
+ :preview-src-list="srcList">
|
|
|
|
+ </el-image>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
|
|
+
|
|
<!-- 添加或修改区域检查整改记录对话框 -->
|
|
<!-- 添加或修改区域检查整改记录对话框 -->
|
|
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
|
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
|
@@ -204,22 +221,22 @@
|
|
<el-input v-model="form.checkProblem" placeholder="请输入检查问题描述"/>
|
|
<el-input v-model="form.checkProblem" placeholder="请输入检查问题描述"/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="检查附件" prop="fileId">
|
|
<el-form-item label="检查附件" prop="fileId">
|
|
- <el-upload
|
|
|
|
- ref="file"
|
|
|
|
- :headers="file.headers"
|
|
|
|
- :action="file.url"
|
|
|
|
- :disabled="file.isUploading"
|
|
|
|
- :on-progress="handleFileDocProgress"
|
|
|
|
- :on-success="handleFileDocSuccess"
|
|
|
|
- :auto-upload="true"
|
|
|
|
- accept=".jpg,.png"
|
|
|
|
- :multiple="true"
|
|
|
|
- :file-list="fileList"
|
|
|
|
- list-type="picture-card"
|
|
|
|
- >
|
|
|
|
- <i class="el-icon-plus"></i>
|
|
|
|
- </el-upload>
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
+ <el-upload
|
|
|
|
+ ref="file"
|
|
|
|
+ :headers="file.headers"
|
|
|
|
+ :action="file.url"
|
|
|
|
+ :disabled="file.isUploading"
|
|
|
|
+ :on-progress="handleFileDocProgress"
|
|
|
|
+ :on-success="handleFileDocSuccess"
|
|
|
|
+ :auto-upload="true"
|
|
|
|
+ accept=".jpg,.png"
|
|
|
|
+ :multiple="true"
|
|
|
|
+ :file-list="fileList"
|
|
|
|
+ list-type="picture-card"
|
|
|
|
+ >
|
|
|
|
+ <i class="el-icon-plus"></i>
|
|
|
|
+ </el-upload>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item label="备注" prop="remarks">
|
|
<el-form-item label="备注" prop="remarks">
|
|
<el-input v-model="form.remarks" placeholder="请输入备注"/>
|
|
<el-input v-model="form.remarks" placeholder="请输入备注"/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -243,6 +260,23 @@
|
|
<el-form-item label="整改内容">
|
|
<el-form-item label="整改内容">
|
|
<el-input type="textarea" v-model="form.changeContent" placeholder="请输入整改内容"/>
|
|
<el-input type="textarea" v-model="form.changeContent" placeholder="请输入整改内容"/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item label="整改后照片" prop="fileId">
|
|
|
|
+ <el-upload
|
|
|
|
+ ref="file"
|
|
|
|
+ :headers="file.headers"
|
|
|
|
+ :action="file.url"
|
|
|
|
+ :disabled="file.isUploading"
|
|
|
|
+ :on-progress="handleFileDocProgress"
|
|
|
|
+ :on-success="handleFileDocSuccess2"
|
|
|
|
+ :auto-upload="true"
|
|
|
|
+ accept=".jpg,.png"
|
|
|
|
+ :multiple="true"
|
|
|
|
+ :file-list="fileList"
|
|
|
|
+ list-type="picture-card"
|
|
|
|
+ >
|
|
|
|
+ <i class="el-icon-plus"></i>
|
|
|
|
+ </el-upload>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item label="整改结果" prop="changeResult">
|
|
<el-form-item label="整改结果" prop="changeResult">
|
|
<el-input v-model="form.changeResult" placeholder="请输入整改结果"/>
|
|
<el-input v-model="form.changeResult" placeholder="请输入整改结果"/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -253,6 +287,42 @@
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
+ <el-dialog title="整改记录" :visible.sync="detail.open" width="60%" append-to-body>
|
|
|
|
+ <el-row :gutter="10" class="mb8">
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ icon="el-icon-plus"
|
|
|
|
+ size="mini"
|
|
|
|
+ @click="handleChange"
|
|
|
|
+ v-hasPermi="['production:details:add']"
|
|
|
|
+ >添加整改记录
|
|
|
|
+ </el-button>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-table v-loading="loading" :data="detailsList" border>
|
|
|
|
+ <el-table-column label="整改后照片" align="center" prop="fileId" :show-overflow-tooltip="true">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div v-if="scope.row.fileId">
|
|
|
|
+ <el-button type="text" @click="openFile(scope.row.fileId,'整改后照片')"><i
|
|
|
|
+ class="el-icon-picture-outline"/>查看
|
|
|
|
+ </el-button>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-else>
|
|
|
|
+ NA
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="整改日期" align="center" prop="changeDate" width="100">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span>{{ parseTime(scope.row.changeDate, '{y}-{m}-{d}') }}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="整改内容" align="center" prop="changeContent" :show-overflow-tooltip="true"/>
|
|
|
|
+ <el-table-column label="整改结果" align="center" prop="changeResult" :show-overflow-tooltip="true"/>
|
|
|
|
+ </el-table>
|
|
|
|
+ </el-dialog>
|
|
|
|
+
|
|
<!-- 用户导入对话框 -->
|
|
<!-- 用户导入对话框 -->
|
|
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
|
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
|
<el-upload
|
|
<el-upload
|
|
@@ -303,6 +373,7 @@ import Treeselect from "@riophae/vue-treeselect";
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
import Editor from '@/components/Editor';
|
|
import Editor from '@/components/Editor';
|
|
import {getFile} from "@/api/production/file";
|
|
import {getFile} from "@/api/production/file";
|
|
|
|
+import {listDetails} from "@/api/production/details";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "Record",
|
|
name: "Record",
|
|
@@ -310,7 +381,12 @@ export default {
|
|
// components: { Editor },
|
|
// components: { Editor },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ detail: {
|
|
|
|
+ open: false,
|
|
|
|
+ recordId: null,
|
|
|
|
+ },
|
|
file: {
|
|
file: {
|
|
|
|
+ title: "",
|
|
file: "",
|
|
file: "",
|
|
open: false,
|
|
open: false,
|
|
// 是否禁用上传
|
|
// 是否禁用上传
|
|
@@ -326,6 +402,9 @@ export default {
|
|
ids: [],
|
|
ids: [],
|
|
fileList: [],
|
|
fileList: [],
|
|
fileIds: [],
|
|
fileIds: [],
|
|
|
|
+ changeFileIds: [],
|
|
|
|
+ detailsList: [],
|
|
|
|
+ srcList: [],
|
|
// 非单个禁用
|
|
// 非单个禁用
|
|
single: true,
|
|
single: true,
|
|
// 非多个禁用
|
|
// 非多个禁用
|
|
@@ -373,7 +452,7 @@ export default {
|
|
checkFile: null,
|
|
checkFile: null,
|
|
changeDate: null,
|
|
changeDate: null,
|
|
changeContent: null,
|
|
changeContent: null,
|
|
- chengeFile: null,
|
|
|
|
|
|
+ changeFile: null,
|
|
changeResult: null,
|
|
changeResult: null,
|
|
createrCode: null,
|
|
createrCode: null,
|
|
createdate: null,
|
|
createdate: null,
|
|
@@ -407,8 +486,19 @@ export default {
|
|
this.getTreeselect();
|
|
this.getTreeselect();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- openFile(fileIds) {
|
|
|
|
- console.log(fileIds)
|
|
|
|
|
|
+ openDetail(id) {
|
|
|
|
+ this.detail.recordId = id;
|
|
|
|
+ this.detail.open = true;
|
|
|
|
+ this.getDetailList(id);
|
|
|
|
+ },
|
|
|
|
+ getDetailList(id){
|
|
|
|
+ listDetails({recordId: id}).then(response => {
|
|
|
|
+ this.detailsList = response.rows;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ openFile(fileIds, title) {
|
|
|
|
+ this.file.title = title;
|
|
|
|
+ this.file.file=null;
|
|
this.file.open = true;
|
|
this.file.open = true;
|
|
this.srcList = [];
|
|
this.srcList = [];
|
|
let ids = fileIds.split(',');
|
|
let ids = fileIds.split(',');
|
|
@@ -428,6 +518,10 @@ export default {
|
|
handleFileDocSuccess(response, file, fileList) {
|
|
handleFileDocSuccess(response, file, fileList) {
|
|
this.fileIds.push(response.data);
|
|
this.fileIds.push(response.data);
|
|
},
|
|
},
|
|
|
|
+ //附件上传成功处理
|
|
|
|
+ handleFileDocSuccess2(response, file, fileList) {
|
|
|
|
+ this.changeFileIds.push(response.data);
|
|
|
|
+ },
|
|
/** 查询区域检查整改记录列表 */
|
|
/** 查询区域检查整改记录列表 */
|
|
getList() {
|
|
getList() {
|
|
this.loading = true;
|
|
this.loading = true;
|
|
@@ -463,7 +557,7 @@ export default {
|
|
checkFile: null,
|
|
checkFile: null,
|
|
changeDate: null,
|
|
changeDate: null,
|
|
changeContent: null,
|
|
changeContent: null,
|
|
- chengeFile: null,
|
|
|
|
|
|
+ changeFile: null,
|
|
changeResult: null,
|
|
changeResult: null,
|
|
delFlag: null,
|
|
delFlag: null,
|
|
createrCode: null,
|
|
createrCode: null,
|
|
@@ -493,12 +587,18 @@ export default {
|
|
},
|
|
},
|
|
/** 新增按钮操作 */
|
|
/** 新增按钮操作 */
|
|
handleAdd() {
|
|
handleAdd() {
|
|
|
|
+ this.fileIds = [];
|
|
|
|
+ this.changeFileIds = [];
|
|
|
|
+ this.fileList = [];
|
|
this.reset();
|
|
this.reset();
|
|
this.open = true;
|
|
this.open = true;
|
|
this.title = "添加区域检查整改记录";
|
|
this.title = "添加区域检查整改记录";
|
|
},
|
|
},
|
|
/** 修改按钮操作 */
|
|
/** 修改按钮操作 */
|
|
handleUpdate(row) {
|
|
handleUpdate(row) {
|
|
|
|
+ this.fileIds = [];
|
|
|
|
+ this.changeFileIds = [];
|
|
|
|
+ this.fileList = [];
|
|
this.reset();
|
|
this.reset();
|
|
const id = row.id || this.ids
|
|
const id = row.id || this.ids
|
|
getRecord(id).then(response => {
|
|
getRecord(id).then(response => {
|
|
@@ -507,10 +607,12 @@ export default {
|
|
this.title = "修改区域检查整改记录";
|
|
this.title = "修改区域检查整改记录";
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- handleChange(row) {
|
|
|
|
|
|
+ handleChange() {
|
|
|
|
+ this.fileIds = [];
|
|
|
|
+ this.fileList = [];
|
|
|
|
+ this.changeFileIds = [];
|
|
this.reset();
|
|
this.reset();
|
|
- const id = row.id || this.ids
|
|
|
|
- getRecord(id).then(response => {
|
|
|
|
|
|
+ getRecord(this.detail.recordId).then(response => {
|
|
this.form = response.data;
|
|
this.form = response.data;
|
|
this.changeOpen = true;
|
|
this.changeOpen = true;
|
|
this.title = "添加区域检查整改记录";
|
|
this.title = "添加区域检查整改记录";
|
|
@@ -520,12 +622,19 @@ export default {
|
|
submitForm() {
|
|
submitForm() {
|
|
this.$refs["form"].validate(valid => {
|
|
this.$refs["form"].validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
|
|
+ if (this.fileIds != []) {
|
|
|
|
+ this.form.checkFile = this.fileIds.join(',');
|
|
|
|
+ }
|
|
|
|
+ if (this.changeFileIds != []) {
|
|
|
|
+ this.form.changeFile = this.changeFileIds.join(',');
|
|
|
|
+ }
|
|
if (this.form.id != null) {
|
|
if (this.form.id != null) {
|
|
updateRecord(this.form).then(response => {
|
|
updateRecord(this.form).then(response => {
|
|
this.msgSuccess("修改成功");
|
|
this.msgSuccess("修改成功");
|
|
this.open = false;
|
|
this.open = false;
|
|
this.changeOpen = false;
|
|
this.changeOpen = false;
|
|
this.getList();
|
|
this.getList();
|
|
|
|
+ this.getDetailList(this.form.id);
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
addRecord(this.form).then(response => {
|
|
addRecord(this.form).then(response => {
|