diff --git a/src/api/equipment/index.js b/src/api/equipment/index.js
index a49efea..2da9120 100644
--- a/src/api/equipment/index.js
+++ b/src/api/equipment/index.js
@@ -3,7 +3,7 @@ import request from "@/router/axios";
// 获取表格数据
export const getList = (current, size, params, classCode) => {
return request({
- url: "/api/blade-desk/equip/list",
+ url: "/api/blade-desk/equip/getPage",
method: "get",
params: {
...params,
@@ -182,7 +182,7 @@ export const getElectricHistoryList = (
locationName,
equipName,
funcCat,
- funcType,
+ funcType
) => {
return request({
url: "/api/blade-desk/electric/pageHistoryValue",
@@ -218,12 +218,11 @@ export const getElectricHistoryListByCode = (
start,
end,
current,
- size
+ size,
},
});
};
-
// 获取历史用水量记录数据
export const getWaterHistoryList = (
area,
@@ -231,7 +230,7 @@ export const getWaterHistoryList = (
end,
current,
size,
- equipName,
+ equipName
) => {
return request({
url: "/api/blade-desk/water/pageHistoryValue",
@@ -242,18 +241,12 @@ export const getWaterHistoryList = (
end,
current,
size,
- equipName
+ equipName,
},
});
};
// 获取单个水表历史电量记录数据
-export const getWaterHistoryListByCode = (
- code,
- start,
- end,
- current,
- size
-) => {
+export const getWaterHistoryListByCode = (code, start, end, current, size) => {
return request({
url: "/api/blade-desk/water/historyValuesByCode",
method: "get",
@@ -262,7 +255,7 @@ export const getWaterHistoryListByCode = (
start,
end,
current,
- size
+ size,
},
});
};
@@ -275,7 +268,7 @@ export const getWarmHistoryList = (
current,
size,
build,
- equipName,
+ equipName
) => {
return request({
url: "/api/blade-desk/garden/warm/pageHistoryValue",
@@ -287,18 +280,12 @@ export const getWarmHistoryList = (
current,
size,
build,
- equipName
+ equipName,
},
});
};
// 获取单个暖表历史电量记录数据
-export const getWarmHistoryListByCode = (
- code,
- start,
- end,
- current,
- size
-) => {
+export const getWarmHistoryListByCode = (code, start, end, current, size) => {
return request({
url: "/api/blade-desk/garden/warm/historyValuesByCode",
method: "get",
@@ -307,7 +294,16 @@ export const getWarmHistoryListByCode = (
start,
end,
current,
- size
+ size,
},
});
-};
\ No newline at end of file
+};
+
+// 图片保存接口
+export const saveImg = (data) => {
+ return request({
+ url: "/api/blade-desk/equip/save-images",
+ method: "post",
+ data,
+ });
+};
diff --git a/src/components/monitoring/conditioner.vue b/src/components/monitoring/conditioner.vue
index f786b6a..9101b25 100644
--- a/src/components/monitoring/conditioner.vue
+++ b/src/components/monitoring/conditioner.vue
@@ -94,7 +94,7 @@

-
设备列表
+
设备列表
- 开关列表
+ 开关列表
@@ -427,6 +427,12 @@ export default {
}, 3600000);
},
mounted() {
+ let dom = document.getElementById('light_box');
+ dom.addEventListener('contextmenu', (event)=> {
+ event.preventDefault(); // 阻止默认菜单
+ const routerUrl = this.$router.resolve({ path: '/equipment/index', query: { classCode: '0500' } });
+ window.open(routerUrl.href, "_blank");
+ });
this.getNavigationMap();
this.initSocket();
},
diff --git a/src/components/monitoring/monitoring.vue b/src/components/monitoring/monitoring.vue
index 3da9dcf..b97f175 100644
--- a/src/components/monitoring/monitoring.vue
+++ b/src/components/monitoring/monitoring.vue
@@ -112,7 +112,7 @@

-
设备列表
+
设备列表
{
+ event.preventDefault(); // 阻止默认菜单
+ const routerUrl = this.$router.resolve({ path: '/equipment/index', query: { classCode: '0400' } });
+ window.open(routerUrl.href, "_blank");
+ });
if (this.bimModel == 1) {
this.getNavigationMap();
}
diff --git a/src/components/monitoring/wall.vue b/src/components/monitoring/wall.vue
index b406283..4d2b8a7 100644
--- a/src/components/monitoring/wall.vue
+++ b/src/components/monitoring/wall.vue
@@ -171,7 +171,7 @@

-
设备列表
+
设备列表

@@ -790,6 +790,12 @@ export default {
}
},
mounted() {
+ let dom = document.getElementById('wall_box');
+ dom.addEventListener('contextmenu', (event)=> {
+ event.preventDefault(); // 阻止默认菜单
+ const routerUrl = this.$router.resolve({ path: '/equipment/index', query: { classCode: '1100' } });
+ window.open(routerUrl.href, "_blank");
+ });
this.getWall();
// this.getWallGK();
this.getFenceWarnList(); //告警列表
diff --git a/src/components/monitoring/warm.vue b/src/components/monitoring/warm.vue
index 703e3a2..90985ed 100644
--- a/src/components/monitoring/warm.vue
+++ b/src/components/monitoring/warm.vue
@@ -269,7 +269,7 @@

-
设备列表
+
设备列表
{
+ event.preventDefault(); // 阻止默认菜单
+ const routerUrl = this.$router.resolve({ path: '/equipment/index', query: { classCode: '0300' } });
+ window.open(routerUrl.href, "_blank");
+ });
this.getData();
this.getNavigationMap();
},
diff --git a/src/components/monitoring/water.vue b/src/components/monitoring/water.vue
index e15f4e7..eed08c9 100644
--- a/src/components/monitoring/water.vue
+++ b/src/components/monitoring/water.vue
@@ -259,10 +259,10 @@
-
+

-
设备列表
+
设备列表
{
+ event.preventDefault(); // 阻止默认菜单
+ const routerUrl = this.$router.resolve({ path: '/equipment/index', query: { classCode: '0200' } });
+ window.open(routerUrl.href, "_blank");
+ });
this.getNavigationMap();
},
watch: {
diff --git a/src/views/equipment/index.vue b/src/views/equipment/index.vue
index df11299..c2b6c29 100644
--- a/src/views/equipment/index.vue
+++ b/src/views/equipment/index.vue
@@ -4,7 +4,7 @@
@@ -194,8 +194,8 @@
-
-
+
+
+
+
+
@@ -217,6 +220,19 @@
+
+
+
+
+
@@ -242,7 +258,8 @@
getQy,
getLc,
getQy1,
- getLc1
+ getLc1,
+ saveImg
} from "@/api/equipment/index";
import {
mapGetters
@@ -257,7 +274,7 @@
return {
options: [],
iDisabled: true,
- equipType:"",//操作状态
+ eqiupType:"",//操作状态
build: [], //区域选项
floored: [], //楼层选项
props: {
@@ -495,7 +512,7 @@
currentPage: 1,
total: 0
},
- treeDeptId: '',
+ treeDeptId: this.$route.query.classCode ? this.$route.query.classCode : '',
treeData: [],
treeOption: {
nodeKey: 'id',
@@ -504,6 +521,7 @@
const parentId = (node.level === 0) ? 0 : node.data.id;
getDeptLazyTree(parentId).then(res => {
resolve(res.data.data.map(item => {
+
return {
...item,
leaf: !item.hasChildren
@@ -566,6 +584,10 @@
label: "投入使用时间",
prop: "useStartTime",
},
+ {
+ label: "固定资产编号",
+ prop: "inventarNummer",
+ },
{
label: "更新时间",
prop: "updateTime",
@@ -620,7 +642,9 @@
span: 24,
}
]
- }
+ },
+ imgList:[],
+ fileList:[]
};
},
watch: {},
@@ -641,7 +665,6 @@
}
},
mounted() {
- console.log('kkkk')
getDeptLazyTree2().then(res => {
let data = res.data.data;
for(let i=0;i
item !== file.response.data.link)
+ }else{
+ this.imgList = this.imgList.filter(item => item !== file.url.slice(file.url))
+ }
+ },
// 点击删除
handleDelete() {
if (this.selectionList.length === 0) {
@@ -749,6 +792,7 @@
// 首次加载数据、查询、翻页方法
onLoad(page, params = {}) {
this.loading = true;
+ console.log(this.treeDeptId)
getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId).then(res => {
const data = res.data.data;
this.page.total = data.total;
@@ -762,17 +806,27 @@
this.equipmentBox = true;
this.iDisabled = false;
this.eqiupType = type;
+ console.log(this.eqiupType,type)
+ this.fileList = []
if (type == "add") {
// 新增
this.equipmentTit = "新增设备";
} else if (type == "edit") {
// 编辑
this.equipmentTit = "编辑设备";
+
getDetails(row.id).then((res) => {
this.ruleForm = res.data.data;
+ console.log('data',this.ruleForm)
+ this.ruleForm.images.map(item =>{
+ this.fileList.push({url:item.filePath})
+ this.imgList.push(item.filePath)
+ })
console.log('设备编辑',this.ruleForm);
getQy1(this.ruleForm.area).then(res => {
this.build = res.data.data;
+
+
});
// getLc(this.ruleForm.area).then(res => {
// this.floored = res.data.data;
@@ -784,6 +838,10 @@
this.equipmentTit = "查看设备";
getDetails(row.id).then((res) => {
this.ruleForm = res.data.data;
+ this.ruleForm.images.map(item =>{
+ this.fileList.push({url:item.filePath})
+ this.imgList.push(item.filePath)
+ })
getQy1(this.ruleForm.area).then(res => {
this.build = res.data.data;
});
@@ -811,11 +869,33 @@
if (!this.iDisabled) {
this.$refs[formName].validate((valid) => {
if (valid) {
- add(this.ruleForm).then(res => {
- this.resetForm('ruleForm');
- this.page.currentPage = 1;
- this.onLoad(this.page);
- });
+ let data = []
+ if(this.imgList.length !== 0){
+ this.imgList.map(item =>{
+ data.push({
+ equipCode:this.ruleForm.code,
+ filePath:item
+ })
+ })
+ }
+ saveImg(data).then(res =>{
+ if(res.data.code == 200){
+ add(this.ruleForm).then(res => {
+ this.resetForm('ruleForm');
+ this.page.currentPage = 1;
+ this.onLoad(this.page);
+ });
+ }
+ })
+ // }else{
+ // add(this.ruleForm).then(res => {
+ // this.resetForm('ruleForm');
+ // this.page.currentPage = 1;
+ // this.onLoad(this.page);
+ // });
+ // }
+
+
} else {
return false;
}
@@ -916,4 +996,12 @@
.btn {
margin-top: 50px;
}
+ /deep/.el-input{
+ width: 220px;
+ }
+ .hide{
+ /deep/ .el-upload--picture-card {
+ display: none;
+ }
+ }
diff --git a/src/views/equipment/operationRecord.vue b/src/views/equipment/operationRecord.vue
index 30f4f65..cff4968 100644
--- a/src/views/equipment/operationRecord.vue
+++ b/src/views/equipment/operationRecord.vue
@@ -27,9 +27,16 @@
编辑
-
-
+
+ {{scope.row.category == 1 ? '日常保养' : '故障维修'}}
+
+
-
+
-
-
+
+
@@ -66,8 +73,12 @@
- {{dataForm.category}}
-
+ {{dataForm.category == 1 ? '日常保养' : '故障维修'}}
+
+
+
+
+
{{dataForm.maintainer}}
@@ -240,7 +251,7 @@
total: 0,
},
current:'',
- size:10,
+ size:100,
option: {
lazy: true,
tip: false,
@@ -258,7 +269,7 @@
menuWidth: 200,
column: [{
label: "设备名称",
- prop: "name",
+ prop: "equipName",
search: true,
align: 'center',
},
@@ -272,7 +283,15 @@
label: "检修性质",
prop: "category",
search: true,
- align: 'center'
+ align: 'center',
+ type:'select',
+ dicData: [{
+ label: '日常保养',
+ value: 1
+ }, {
+ label: '故障维修',
+ value: 2
+ }]
},
{
label: "设备负责人",