From 7ad7b0575eb70afcd20414d66d7f99e686c87d6a Mon Sep 17 00:00:00 2001
From: DOUDOU <877258667@qq.com>
Date: Fri, 3 Mar 2023 17:39:06 +0800
Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E5=A4=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/eam/eam_object_list.js | 4 +-
src/views/modules/eam/eam_device_list.vue | 437 ++++------------------
2 files changed, 79 insertions(+), 362 deletions(-)
diff --git a/src/api/eam/eam_object_list.js b/src/api/eam/eam_object_list.js
index d9ebd4b..286132f 100644
--- a/src/api/eam/eam_object_list.js
+++ b/src/api/eam/eam_object_list.js
@@ -3,9 +3,9 @@ import { createAPI } from "@/utils/httpRequest.js";
/*查询设备清单*/
export const getEamObjectList = data => createAPI('api/pms/eamObject/getEamObjectList','post',data)
/*查询设备的文件内容*/
-export const getFileContentList = data => createAPI('api/pms/eamObject/getFileContentList','post',data)
+export const getFileContentList = data => createAPI('api/sys/file/getSysFileByOrderRef2','post',data)
/*查询设备的备件清单*/
-export const getDevicePartList = data => createAPI('api/pms/eamObject/getDevicePartList','post',data)
+export const getDevicePartList = data => createAPI('api/pms/resourcespare/getResourceSpareListByResourceId','post',data)
/*查询设备的点检项目列表*/
export const getCheckItemList = data => createAPI('api/pms/eamObject/getCheckItemList','post',data)
/*查询设备的维保项目列表*/
diff --git a/src/views/modules/eam/eam_device_list.vue b/src/views/modules/eam/eam_device_list.vue
index 3f4a4d2..b7361cf 100644
--- a/src/views/modules/eam/eam_device_list.vue
+++ b/src/views/modules/eam/eam_device_list.vue
@@ -84,7 +84,7 @@
@@ -94,7 +94,7 @@
-
+
@@ -106,11 +106,11 @@
+ style="width: 95%; ">
+ :label="item.columnLabel">
{{ scope.row[item.columnProp] }}
+ :label="item.columnLabel">
{{ scope.row[item.columnProp] }}
+ :label="item.columnLabel">
{{ scope.row[item.columnProp] }}
+ :label="item.columnLabel">
{{ scope.row[item.columnProp] }}
+ :label="item.columnLabel">
{{ scope.row[item.columnProp] }}
+ :label="item.columnLabel">
{{ scope.row[item.columnProp] }}
{
+ let currentData = {orderRef2: this.currentRow.objectID};
+ getFileContentList(currentData).then(({data}) => {
//区分请求成功和失败的状况
if (data && data.code == 200) {
this.fileContentList = data.rows;
@@ -2519,12 +2226,12 @@
//刷新派设备设备的备件的列表
getDevicePartData() {
- getDevicePartList(this.searchData).then(({data}) => {
+ getDevicePartList(this.currentRow).then(({data}) => {
//区分请求成功和失败的状况
if (data && data.code == 200) {
- this.fileContentList = data.rows;
+ this.devicePartList = data.rows;
} else {
- this.fileContentList = [];
+ this.devicePartList = [];
}
});
},
@@ -2660,6 +2367,8 @@
this.currentRow = JSON.parse(JSON.stringify(row));
this.eamObjectId = row.objectID;
this.uploadUrl = this.$http.adornUrl(`/api/sys/file/upload?token=${this.$cookie.get('token')}&folder=` + this.folder + `&objectId=` + this.eamObjectId);
+ //刷新当前页表
+ this.refreshCurrentTabTable();
}
},
@@ -2677,37 +2386,45 @@
this.fileList = fileList
this.successNum++
if (response && response.code === 0) {
- if (this.num === this.successNum) {
- // 回写文件的订单属性
- let ossRet = response.ossEntity
- let ossTo = {
- id: ossRet.id,
- fileType: this.fileMappingDto.fileType,
- orderRef1: this.fileMappingDto.orderRef1,
- orderRef2: this.fileMappingDto.orderRef2,
- orderRef3: this.fileMappingDto.orderRef3,
- fileTypeCode: 1,
- fileSuffix: file.name.substring(file.name.indexOf(".")+1),
- }
- updateOssRef(ossTo).then(({data}) => {
- if (data.code == 0) {
- this.$confirm('操作成功, 是否继续操作?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).catch(() => {
- this.visible = false
- })
- }else {
- this.$message.warning('上传失败,请重新上传')
- }
- })
- }
+ // 回写文件的订单属性
+ this.ossRet = response.ossEntity;
} else {
this.$message.error(response.msg)
}
},
+ /*保修当前的数据*/
+ saveUploadFile(){
+ let remark = this.fileRemark;
+ if(null === remark || '' === remark){
+ this.$message.error("请输入文件备注!");
+ return false;
+ }
+ /*判断文件是否上传*/
+ if(null == this.ossRet || {} == this.ossRet){
+ this.$message.error("请先上传文件!");
+ return false;
+ }
+ //设置备注
+ this.ossRet.orderRef1 = this.currentRow.site;
+ this.ossRet.orderRef3 = remark;
+ updateOssRef(this.ossRet).then(({data}) => {
+ if (data.code === 0) {
+ this.$message.success(data.msg);
+ //刷新当前的清单
+ this.getFileContentData();
+ //清空文件上传记录
+ this.$refs.uploadFile.clearFiles();
+ this.ossRet = null;
+ this.fileRemark = '';
+ }else {
+ this.$message.warning(data.msg);
+ }
+ })
+
+
+ }
+
}
}