|
@@ -1,4 +1,5 @@
|
|
|
<template>
|
|
|
+
|
|
|
<el-dialog :title="$t('一机一档')" :visible.sync="visible" width="1200px" append-to-body>
|
|
|
<el-card>
|
|
|
<div slot="header" class="clearfix">
|
|
@@ -31,17 +32,150 @@
|
|
|
<el-card>
|
|
|
<div slot="header" class="clearfix">
|
|
|
<span>原始资料(厂家,产品编号等)</span>
|
|
|
+
|
|
|
</div>
|
|
|
- <el-table v-loading="loading" :data="list" border>
|
|
|
+ <el-table v-loading="loading" :data="yuanshilist" border>
|
|
|
+ <el-table-column label="设备id" align="center" prop="id" v-if="false" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="设备位号" align="center" prop="devno" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="设备名称" align="center" prop="devname" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="状态" align="center" prop="status" :formatter="statusFormat" />
|
|
|
+ <el-table-column label="原始资料档案查看" align="center" prop="archives" :show-overflow-tooltip="true" >
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
|
+ <el-button icon="el-icon-folder" style="color:#6e96fa;" @click="handleDoc(scope.row)" ></el-button>
|
|
|
+ <el-dialog v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="700px" append-to-body>
|
|
|
+ <el-upload
|
|
|
+ ref="doc"
|
|
|
+ :limit="50"
|
|
|
+ :headers="doc.headers"
|
|
|
+ :action="doc.url + '?pType=' + doc.pType + '&pId=' + doc.pId"
|
|
|
+ :disabled="doc.isUploading"
|
|
|
+ :on-progress="handleFileDocProgress"
|
|
|
+ :on-success="handleFileDocSuccess"
|
|
|
+ :auto-upload="true"
|
|
|
+ drag
|
|
|
+ >
|
|
|
+ <i class="el-icon-upload"></i>
|
|
|
+ <div class="el-upload__text">
|
|
|
+ {{ $t('将文件拖到此处,或') }}
|
|
|
+ <em>{{ $t('点击上传') }}</em>
|
|
|
+ </div>
|
|
|
+ </el-upload>
|
|
|
+ <el-table :data="doc.commonfileList" border>
|
|
|
+ <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <a class="link-type" @click="handleDownload(scope.row)">
|
|
|
+ <span>{{ scope.row.fileName }}</span>
|
|
|
+ </a>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
|
|
|
+ <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
|
|
|
+ <el-table-column :label="$t('操作')" align="center" width="150" class-name="small-padding fixed-width">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ v-if="scope.row.fileName.endsWith('pdf')"
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-view"
|
|
|
+ @click="handleSee(scope.row)"
|
|
|
+ >{{ $t('预览') }}</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-download"
|
|
|
+ @click="handleDownload(scope.row)"
|
|
|
+ >{{ $t('下载') }}</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ @click="handleDeleteDoc(scope.row)"
|
|
|
+ >{{ $t('删除') }}</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <!-- <el-button type="primary" @click="submitFileForm">{{ $t('确 定') }}</el-button>-->
|
|
|
+ <el-button @click="doc.open = false">{{ $t('返 回') }}</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
</el-card>
|
|
|
<el-card>
|
|
|
<div slot="header" class="clearfix">
|
|
|
<span>安装资料、使用说明</span>
|
|
|
</div>
|
|
|
- <el-table v-loading="loading" :data="list" border>
|
|
|
+ <el-table v-loading="loading" :data="anzhuanglist" border>
|
|
|
+ <el-table-column label="设备id" align="center" prop="id" v-if="false" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="设备位号" align="center" prop="devno" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="设备名称" align="center" prop="devname" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="状态" align="center" prop="status" :formatter="statusFormat" />
|
|
|
+ <el-table-column label="安装资料档案查看" align="center" prop="archives" :show-overflow-tooltip="true" >
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
|
+ <el-button icon="el-icon-folder" style="color:#6e96fa;" @click="handleDoc11(scope.row)" ></el-button>
|
|
|
+ <el-dialog v-dialogDrag :title="doc11.title" :visible.sync="doc11.open" width="700px" append-to-body>
|
|
|
+ <el-upload
|
|
|
+ ref="doc11"
|
|
|
+ :limit="50"
|
|
|
+ :headers="doc11.headers"
|
|
|
+ :action="doc11.url + '?pType=' + doc11.pType + '&pId=' + doc11.pId"
|
|
|
+ :disabled="doc11.isUploading"
|
|
|
+ :on-progress="handleFileDocProgress11"
|
|
|
+ :on-success="handleFileDocSuccess11"
|
|
|
+ :auto-upload="true"
|
|
|
+ drag
|
|
|
+ >
|
|
|
+ <i class="el-icon-upload"></i>
|
|
|
+ <div class="el-upload__text">
|
|
|
+ {{ $t('将文件拖到此处,或') }}
|
|
|
+ <em>{{ $t('点击上传') }}</em>
|
|
|
+ </div>
|
|
|
+ </el-upload>
|
|
|
+ <el-table :data="doc11.commonfileList" border>
|
|
|
+ <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <a class="link-type" @click="handleDownload(scope.row)">
|
|
|
+ <span>{{ scope.row.fileName }}</span>
|
|
|
+ </a>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
|
|
|
+ <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
|
|
|
+ <el-table-column :label="$t('操作')" align="center" width="150" class-name="small-padding fixed-width">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ v-if="scope.row.fileName.endsWith('pdf')"
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-view"
|
|
|
+ @click="handleSee(scope.row)"
|
|
|
+ >{{ $t('预览') }}</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-download"
|
|
|
+ @click="handleDownload(scope.row)"
|
|
|
+ >{{ $t('下载') }}</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ @click="handleDeleteDoc(scope.row)"
|
|
|
+ >{{ $t('删除') }}</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <!-- <el-button type="primary" @click="submitFileForm">{{ $t('确 定') }}</el-button>-->
|
|
|
+ <el-button @click="doc11.open = false">{{ $t('返 回') }}</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
</el-card>
|
|
|
<el-card>
|
|
@@ -80,9 +214,9 @@
|
|
|
<el-table-column label="处理情况" align="center" prop="treatment" :show-overflow-tooltip="true"/>
|
|
|
<el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"/>
|
|
|
</el-table>
|
|
|
-<!-- <el-table :data="list" v-loading="planLoading" border>-->
|
|
|
+ <!-- <el-table :data="list" v-loading="planLoading" border>-->
|
|
|
|
|
|
-<!-- </el-table>-->
|
|
|
+ <!-- </el-table>-->
|
|
|
</el-card>
|
|
|
<el-card>
|
|
|
<div slot="header" class="clearfix">
|
|
@@ -128,9 +262,9 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<spec-maintenance v-if="specMaintenanceVisible" ref="specMaintenance"></spec-maintenance>
|
|
|
-<!-- <el-table :data="list" v-loading="planLoading" border>-->
|
|
|
+ <!-- <el-table :data="list" v-loading="planLoading" border>-->
|
|
|
|
|
|
-<!-- </el-table>-->
|
|
|
+ <!-- </el-table>-->
|
|
|
</el-card>
|
|
|
<el-card>
|
|
|
<div slot="header" class="clearfix">
|
|
@@ -157,11 +291,14 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { listGyl, getGyl, delGyl, addGyl, updateGyl, exportGyl, importTemplate} from "@/api/intact/gyl";
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
+import {allFileList, delCommonfile} from "@/api/common/commonfile";
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
import {listPlan} from "@/api/training/spec/plan";
|
|
|
import {listParticipants} from "@/api/training/participants";
|
|
|
import {listDevice} from "@/api/training/device";
|
|
|
+import {getToken} from "@/utils/auth";
|
|
|
import {listRecord} from "@/api/inspection/record";
|
|
|
import {hisApprovelist} from "@/api/intact/maintenance";
|
|
|
import SpecMaintenance from "@/views/approve/approveDetail/specMaintenance-detail";
|
|
@@ -181,6 +318,8 @@ export default {
|
|
|
approveTypeOptions: [{dictValue:1,dictLabel:'维修'}],
|
|
|
statusOptions: [],
|
|
|
list: [],
|
|
|
+ yuanshilist:[],
|
|
|
+ anzhuanglist:[],
|
|
|
// 遮罩层
|
|
|
loading: false,
|
|
|
planLoading: false,
|
|
@@ -237,18 +376,67 @@ export default {
|
|
|
year: this.getNowTime(),
|
|
|
trainingType: null
|
|
|
},
|
|
|
+ doc: {
|
|
|
+ file: "123",
|
|
|
+ // 是否显示弹出层(报告附件)
|
|
|
+ open: false,
|
|
|
+ // 弹出层标题(报告附件)
|
|
|
+ title: "",
|
|
|
+ // 是否禁用上传
|
|
|
+ isUploading: false,
|
|
|
+ // 是否更新已经存在的用户数据
|
|
|
+ updateSupport: 0,
|
|
|
+ // 报告附件上传位置编号
|
|
|
+ ids: 0,
|
|
|
+ // 设置上传的请求头部
|
|
|
+ headers: { Authorization: "Bearer " + getToken() },
|
|
|
+ // 上传的地址
|
|
|
+ url: process.env.VUE_APP_BASE_API + "/common/commonfile/uploadFile",
|
|
|
+ commonfileList: null,
|
|
|
+ queryParams: {
|
|
|
+ pId: null,
|
|
|
+ pType: 'intactRecord'
|
|
|
+ },
|
|
|
+ pType: 'intactRecord',
|
|
|
+ pId: null
|
|
|
+ },
|
|
|
+ doc11: {
|
|
|
+ file: "123",
|
|
|
+ // 是否显示弹出层(报告附件)
|
|
|
+ open: false,
|
|
|
+ // 弹出层标题(报告附件)
|
|
|
+ title: "",
|
|
|
+ // 是否禁用上传
|
|
|
+ isUploading: false,
|
|
|
+ // 是否更新已经存在的用户数据
|
|
|
+ updateSupport: 0,
|
|
|
+ // 报告附件上传位置编号
|
|
|
+ ids: 0,
|
|
|
+ // 设置上传的请求头部
|
|
|
+ headers: { Authorization: "Bearer " + getToken() },
|
|
|
+ // 上传的地址
|
|
|
+ url: process.env.VUE_APP_BASE_API + "/common/commonfile/uploadFile",
|
|
|
+ commonfileList: null,
|
|
|
+ queryParams: {
|
|
|
+ pId: null,
|
|
|
+ pType: 'intactRecord'
|
|
|
+ },
|
|
|
+ pType: 'intactRecord',
|
|
|
+ pId: null
|
|
|
+ },
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
// 表单校验
|
|
|
rules: {}
|
|
|
};
|
|
|
+
|
|
|
},
|
|
|
watch: {},
|
|
|
created() {
|
|
|
this.getDicts("PLANT_DIVIDE").then(response => {
|
|
|
this.plantCodeOptions = response.data;
|
|
|
});
|
|
|
- this.getDicts("spec_approve_res").then(response => {
|
|
|
+ this.getDicts("INTACT_STATUS").then(response => {
|
|
|
this.statusOptions = response.data;
|
|
|
});
|
|
|
},
|
|
@@ -256,6 +444,19 @@ export default {
|
|
|
init(row) {
|
|
|
this.row=row
|
|
|
this.visible = true
|
|
|
+
|
|
|
+ //给原始、安装资料的list数据赋值
|
|
|
+
|
|
|
+ getGyl(row.id).then(response => {
|
|
|
+ const didi=[]
|
|
|
+ didi.push(response.data)
|
|
|
+ this.yuanshilist=didi
|
|
|
+ this.anzhuanglist=didi
|
|
|
+ this.total = response.total;
|
|
|
+ this.loading = false;
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
var data = {
|
|
|
devno:row.devno,
|
|
|
region:row.position
|
|
@@ -264,16 +465,18 @@ export default {
|
|
|
this.recordList = response.rows;
|
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
|
+
|
|
|
});
|
|
|
|
|
|
var data2={
|
|
|
- devId : row.id,
|
|
|
- devType : this.devType
|
|
|
+ devId : row.id,
|
|
|
+ devType : this.devType
|
|
|
}
|
|
|
hisApprovelist(data2).then(response => {
|
|
|
this.approveList = response.data;
|
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
|
+
|
|
|
});
|
|
|
},
|
|
|
staffPlanQuery1(row,year){
|
|
@@ -287,6 +490,9 @@ export default {
|
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
|
});
|
|
|
+ },
|
|
|
+ handleSee(row){
|
|
|
+
|
|
|
},
|
|
|
staffPlanQuery(){
|
|
|
alert("123123qqss")
|
|
@@ -335,7 +541,100 @@ export default {
|
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
|
});
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
+ /** 原始资料档案附件按钮操作 */
|
|
|
+ handleDoc(row) {
|
|
|
+ console.log(row)
|
|
|
+
|
|
|
+ this.doc.id = row.id;
|
|
|
+ this.doc.title = row.filename;
|
|
|
+ this.doc.open = true;
|
|
|
+ this.doc.queryParams.pId = row.id
|
|
|
+ this.doc.pId = row.id
|
|
|
+ this.getFileList()
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.doc.clearFiles()
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+ //安装资料档案操作
|
|
|
+ handleDoc11(row) {
|
|
|
+
|
|
|
+
|
|
|
+ this.doc11.id = row.id;
|
|
|
+ this.doc11.title = row.filename;
|
|
|
+ this.doc11.open = true;
|
|
|
+ this.doc11.queryParams.pId = row.id+row.id
|
|
|
+ this.doc11.pId = row.id+row.id
|
|
|
+ this.getFileList11()
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.doc11.clearFiles()
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+ //原始资料得到文件列表
|
|
|
+ getFileList (){
|
|
|
+ allFileList(this.doc.queryParams).then(response => {
|
|
|
+ this.doc.commonfileList = response;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //安装资料得到文件列表
|
|
|
+ getFileList11 (){
|
|
|
+ allFileList(this.doc11.queryParams).then(response => {
|
|
|
+ this.doc11.commonfileList = response;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //原始附件上传中处理
|
|
|
+ handleFileDocProgress(event, file, fileList) {
|
|
|
+ this.doc.file = file;
|
|
|
+ this.doc.isUploading = true;
|
|
|
+ },
|
|
|
+ //原始附件上传成功处理
|
|
|
+ handleFileDocSuccess(response, file, fileList) {
|
|
|
+ this.doc.isUploading = false;
|
|
|
+ this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
|
|
|
+ this.getFileList()
|
|
|
+ },
|
|
|
+ //安装附件上传中处理
|
|
|
+ handleFileDocProgress11(event, file, fileList) {
|
|
|
+ this.doc11.file = file;
|
|
|
+ this.doc11.isUploading = true;
|
|
|
+ },
|
|
|
+ //安装附件上传成功处理11
|
|
|
+ handleFileDocSuccess11(response, file, fileList) {
|
|
|
+ this.doc11.isUploading = false;
|
|
|
+ this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
|
|
|
+ this.getFileList11()
|
|
|
+ },
|
|
|
+ /** 删除按钮操作 */
|
|
|
+ handleDeleteDoc(row) {
|
|
|
+ const ids = row.id || this.ids;
|
|
|
+ this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
|
|
|
+ confirmButtonText: this.$t('确定'),
|
|
|
+ cancelButtonText: this.$t('取消'),
|
|
|
+ type: "warning"
|
|
|
+ }).then(function() {
|
|
|
+ return delCommonfile(ids);
|
|
|
+ }).then(() => {
|
|
|
+ this.getFileList()
|
|
|
+ this.getFileList11()
|
|
|
+ this.msgSuccess(this.$t('删除成功'));
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 文件下载处理
|
|
|
+ handleDownload(row) {
|
|
|
+ var name = row.fileName;
|
|
|
+ var url = row.fileUrl;
|
|
|
+ var suffix = url.substring(url.lastIndexOf("."), url.length);
|
|
|
+ console.log(url)
|
|
|
+ const a = document.createElement('a')
|
|
|
+ a.setAttribute('download', name)
|
|
|
+ a.setAttribute('target', '_blank')
|
|
|
+ a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
|
|
|
+ a.click()
|
|
|
+ },
|
|
|
+
|
|
|
}
|
|
|
};
|
|
|
</script>
|