From 10686c5e51ef98ca459ab000462c0701e0bb17ea Mon Sep 17 00:00:00 2001
From: 李旭东 <woaiguo66@sina.com>
Date: 星期五, 03 十一月 2023 17:18:52 +0800
Subject: [PATCH] 环境监测 设备管理
---
sz_app/api/module/system.js | 2
sz_app/pages/spotCheck/deviceSpot.vue | 41
web/src/style/element-ui.scss | 4
sz_app/pages/homeIndex/index.vue | 1
web/src/router/index.js | 2
web/src/views/GreenBuild/WeldSmoke.vue | 74 +
sz_app/api/http.js | 10
web/src/api/modules/device.js | 212 +----
web/src/assets/sign_bg.png | 0
web/src/views/EquipmentManage/EquipSpot.vue | 7
sz_app/pages/loginIndex/index.vue | 6
web/src/views/EquipmentManage/EquipInfo/components/GeneralEquipment.vue | 758 ++++++++++++++++++++++
web/src/views/EquipmentManage/EquipInfo/index.vue | 37 +
sz_app/pages/spotCheck/index.vue | 43
web/src/views/LayoutIndex/components/LayoutAside.vue | 14
web/src/views/ScanInfo/ScanDetail.vue | 24
sz_app/pages/spotCheck/spotDetail.vue | 1
sz_app/api/module/spot.js | 22
web/src/views/EquipmentManage/EquipInfo/components/SpecialEquipment.vue | 759 ++++++++++++++++++++++
19 files changed, 1,786 insertions(+), 231 deletions(-)
diff --git a/sz_app/api/http.js b/sz_app/api/http.js
index 6ffb703..69f9a09 100644
--- a/sz_app/api/http.js
+++ b/sz_app/api/http.js
@@ -1,13 +1,13 @@
function Request() {}
-// export const basrUrl = 'https://pipe.thhy-tj.com/api';
-// export const basrUrl = 'http://192.168.0.170:8880';
-export const basrUrl = 'http://111.30.93.212:8089/suapi';
+// export const baseUrl = 'https://pipe.thhy-tj.com/api';
+// export const baseUrl = 'http://192.168.0.170:8880';
+export const baseUrl = 'http://111.30.93.212:8089/suapi';
Request.prototype = {
post: function(url, params) {
return new Promise(function(resolve, reject) {
const userToken = uni.getStorageSync('userToken') || "";
uni.request({
- url: `${basrUrl}${url}`,
+ url: `${baseUrl}${url}`,
data: params,
method: 'POST',
header: {
@@ -37,7 +37,7 @@
const userToken = uni.getStorageSync('userToken') || "";
uni.request({
method: 'GET',
- url: `${basrUrl}${url}`,
+ url: `${baseUrl}${url}`,
data: params,
header: {
usertoken: userToken,
diff --git a/sz_app/api/module/spot.js b/sz_app/api/module/spot.js
index 2aa2063..8f64ee1 100644
--- a/sz_app/api/module/spot.js
+++ b/sz_app/api/module/spot.js
@@ -6,22 +6,17 @@
*/
// 查询字典信息
- searchDictionary: params => {
- return axios({
- url: '/engineering/dict/dictList',
- method: 'post',
+ searchDictionary: params =>
+ axios.post('/engineering/dict/dictList',{
...params,
header: {
pageNum: params.pageNum,
pageSize: params.pageSize
}
- })
- },
+ }),
// 查询设备点检列表信息
searchSpotCheckList: (params) =>
- axios({
- method: 'post',
- url: '/m/checkDevice/findList',
+ axios.post('/m/checkDevice/findList',{
...params,
header: {
pageNum: params.pageNum,
@@ -30,17 +25,20 @@
}),
// 添加设备点检信息
insertSpotCheckInfo: (params) =>
- axios.post('m/checkDevice/addCheckDevice', params),
+ axios.post('/m/checkDevice/addCheckDevice', params),
// 修改设备点检信息
updateSpotCheckInfo: (params) =>
- axios.post('m/checkDevice/addCheckDevice', params),
+ axios.post('/m/checkDevice/addCheckDevice', params),
//删除设备点检信息
deleteSpotCheckInfo: (params) =>
axios.post('/m/checkDevice/delete', params),
// 获取点检详情
getSpotCheckDetail: (params) =>
- axios.post('m/checkDevice/checkDeviceInfo', params),
+ axios.post('/m/checkDevice/checkDeviceInfo', params),
// 获取全部设备信息
getAllDeviceData: () =>
axios.post('/m/checkDevice/deviceList'),
+ // 获取设备信息详情
+ getDeviceDetails: (params) =>
+ axios.get('/engineering/bigDevice/bigDeviceInfo', params ),
}
\ No newline at end of file
diff --git a/sz_app/api/module/system.js b/sz_app/api/module/system.js
index 87e2009..6d2dcef 100644
--- a/sz_app/api/module/system.js
+++ b/sz_app/api/module/system.js
@@ -6,7 +6,7 @@
*/
// 登录
userLogin: params =>
- axios.post(`/usercore/login`, params),
+ axios.post(`/m/login`, params),
// 退出登录
logingOut: params =>
axios.post('/usercore/login/logout', params),
diff --git a/sz_app/pages/homeIndex/index.vue b/sz_app/pages/homeIndex/index.vue
index d9a0698..bd7de73 100644
--- a/sz_app/pages/homeIndex/index.vue
+++ b/sz_app/pages/homeIndex/index.vue
@@ -43,6 +43,7 @@
this.height = (deviceInfo.windowWidth / 3) - 32;
const menuData = JSON.parse(uni.getStorageSync('menuData')) || [];
this.homeTabList = menuData.map(item => {
+ console.log(item.menuIcon);
item.menuIcon = `http://filemanage.thhy-tj.com:8888/${item.menuIcon}`
return item;
})
diff --git a/sz_app/pages/loginIndex/index.vue b/sz_app/pages/loginIndex/index.vue
index 34d58ca..86b9da2 100644
--- a/sz_app/pages/loginIndex/index.vue
+++ b/sz_app/pages/loginIndex/index.vue
@@ -64,8 +64,8 @@
data() {
return {
formLogin: {
- username: '',
- password: ''
+ username: '15010128058',
+ password: '123456'
},
rulesLogin: {
username: [{
@@ -107,7 +107,7 @@
if(valid) {
const params = Object.assign({}, this.formLogin);
this.$api.system.userLogin(params).then((res) => {
- console.log(res.data, '----');
+ console.log(res, '----');
if(res.success) {
uni.$u.toast('登录成功!');
uni.setStorageSync('realName', res.data.realName);
diff --git a/sz_app/pages/spotCheck/deviceSpot.vue b/sz_app/pages/spotCheck/deviceSpot.vue
index 917dcff..1676e43 100644
--- a/sz_app/pages/spotCheck/deviceSpot.vue
+++ b/sz_app/pages/spotCheck/deviceSpot.vue
@@ -8,15 +8,15 @@
</view>
<view class="device_item_value">
<span class="label">设备名称:</span>
- <span>混凝土搅拌机</span>
+ <span>{{deviceData.bigDeviceName}}</span>
</view>
<view class="device_item_value">
<span class="label">型号规格:</span>
- <span>混凝土搅拌机</span>
+ <span>{{deviceData.bigDeviceModel}}</span>
</view>
<view class="device_item_value">
<span class="label">设备类型:</span>
- <span>混凝土搅拌机</span>
+ <span>{{deviceData.bigType === 1 ? '特种设备' : '一般设备'}}</span>
</view>
</view>
<view class="device_form">
@@ -106,16 +106,16 @@
:columns="checkTypeData"
keyName="dictName"
closeOnClickOverlay
- @cancel="cancelCheckType()"
- @confirm="confirmCheckType()"
+ @cancel="cancelCheckType"
+ @confirm="confirmCheckType"
@close="showCheckType = false"
></u-picker>
</view>
</template>
<script>
- import baseUrl from '../../api/http.js';
-import { changeTime, throttle } from '../../plugins/public.js';
+ import { baseUrl } from '../../api/http.js';
+ import { changeTime, throttle } from '../../plugins/public.js';
export default {
data() {
return {
@@ -144,7 +144,10 @@
colorStyle: 'linear-gradient(to right, rgb(79, 142, 244), rgb(85, 109, 254))',
showTime: false,
defaultTime: Number(new Date()),
- deviceId: ''
+ deviceId: '',
+ deviceData: {},
+ showCheckType: false,
+ checkTypeData: [],
}
},
onReady() {
@@ -152,7 +155,13 @@
},
onLoad(option) {
this.deviceId = option.deviceId;
+ console.log(option,'option')
this.getChackAllTypes();
+ this.$api.spot.getDeviceDetails({
+ bigDeviceId: option.deviceId
+ }).then((res) => {
+ this.deviceData = res.data;
+ })
},
methods: {
// 获取点检类型
@@ -162,11 +171,11 @@
pageSize: 100000000,
dictType: 'check_type'
});
- this.checkTypeData = data.list;
+ this.checkTypeData.push(data.list);
},
// 读取图片后
afterRead(event) {
- console.log(event);
+ console.log(event,'event', `${baseUrl}/file/file/upload`);
this.fileList.push({
status: 'loading',
message: '上传中',
@@ -178,15 +187,17 @@
name: 'file',
success: (res) => {
const data = JSON.parse(res.data);
+ console.log(data,'?????');
this.$set(this.fileList, this.fileList.length - 1, {
id: this.fileList.length + 1,
status: 'success',
message: '',
data: data.data,
- url: `http://filemanage.thhy-tj.com:8888/${data.data}`
+ url: `http://filemanage.thhy-tj.com:8888/suapi/${data.data}`
})
},
fail: (error) => {
+ console.log(error,'error');
uni.$u.toast('上传失败!');
}
})
@@ -224,14 +235,15 @@
},
// 点击选择点检类型
confirmCheckType({ value }) {
+ this.$set(this.formSpot, 'checkTypeName', value[0].dictName);
+ this.$set(this.formSpot, 'checkType', value[0].dictId);
this.showCheckType = false;
- this.$set(this.formSpot, 'checkTypeName', value[0].checkTypeName);
- this.$set(this.formSpot, 'checkType', value[0].checkType);
},
// 提交点检信息
submitForm: throttle(function() {
this.$refs.form.validate().then((valid) => {
if(valid) {
+ console.log(valid,'valid');
const params = Object.assign({}, this.formSpot);
delete params.checkTypeName;
params.deviceId = this.deviceId;
@@ -241,7 +253,10 @@
file: item.data
}
})
+ } else {
+ params.fileList = [];
}
+ console.log(params,'params');
this.$api.spot.insertSpotCheckInfo(params).then(res => {
if(res.success) {
uni.$u.toast('添加成功!');
diff --git a/sz_app/pages/spotCheck/index.vue b/sz_app/pages/spotCheck/index.vue
index bc8c683..9cfaaa2 100644
--- a/sz_app/pages/spotCheck/index.vue
+++ b/sz_app/pages/spotCheck/index.vue
@@ -19,11 +19,10 @@
<view
class="spot_item"
v-for="item in spotList"
- :key="item.id"
- @click="navgetToDetail(item)">
+ :key="item.id">
<view class="spot_item_title">
<span>设备编号:{{item.bigNumber}}</span>
- <span>详情</span>
+ <span @click="navgetToDetail(item)">详情</span>
</view>
<view class="spot_item_content">
<view class="">
@@ -36,7 +35,7 @@
</view>
<view class="">
<span class="label">设备类型:</span>
- <span>{{item.bigTypeStr}}</span>
+ <span>{{item.bigType == 1 ? '特殊设备' : '一般设备'}}</span>
</view>
<view class="">
<span class="label">点检时间:</span>
@@ -84,11 +83,15 @@
pageNum: 1,
pageSize: 10,
loadPage: '',
- spotList: [{id: 1}, {id: 2}, {id: 3}],
+ spotList: [],
}
},
onShow() {
this.searchData();
+ },
+ onUnload() {
+ // 移除监听事件
+ uni.$off('scancodedate');
},
methods: {
// 查询模具质检列表
@@ -97,6 +100,7 @@
pageNum: this.pageNum,
pageSize: this.pageSize
})
+ console.log(data);
return data;
},
// 查询信息
@@ -146,21 +150,22 @@
uni.$on('scancodedate', function(data) {
console.log(data.code);
if(data.code) {
- uni.navigateTo({
- url: './deviceSpot'
+ const list = data.code ? data.code.split('bigDeviceId=') : [];
+ const codeStr = list.length > 0 ? list[list.length - 1] : '';
+ that.$api.spot.getDeviceDetails({
+ bigDeviceId: codeStr
+ }).then((res) => {
+ if(res.success) {
+ uni.$u.toast('扫描完成!');
+ uni.navigateTo({
+ url: './deviceSpot?deviceId=' + codeStr
+ })
+ } else {
+ uni.$u.toast(res.statusMsg);
+ }
})
+ uni.$off('scancodedate');
}
- // that.$api.spot.scanCheckMould({
- // mouldNum: data.code
- // }).then((res) => {
- // if(res.success) {
- // uni.$u.toast('扫描完成!');
- // console.log(res,'===');
- // } else {
- // uni.$u.toast(res.statusMsg);
- // }
- // })
- uni.$off('scancodedate');
})
},
// 跳转详情
@@ -169,7 +174,7 @@
url: './spotDetail?id=' + item.id
})
}
- }
+ },
}
</script>
diff --git a/sz_app/pages/spotCheck/spotDetail.vue b/sz_app/pages/spotCheck/spotDetail.vue
index 3aeae43..ebc4210 100644
--- a/sz_app/pages/spotCheck/spotDetail.vue
+++ b/sz_app/pages/spotCheck/spotDetail.vue
@@ -118,6 +118,7 @@
id: option.id
}).then((res) => {
this.formData = res.success ? res.data : {};
+ res.data.bigTypeStr = res.data.bigType == 1 ? '特殊设备' : '一般设备';
})
},
methods: {
diff --git a/web/src/api/modules/device.js b/web/src/api/modules/device.js
index 135e460..1363084 100644
--- a/web/src/api/modules/device.js
+++ b/web/src/api/modules/device.js
@@ -1,8 +1,69 @@
/**
* 设备管理
*/
- import axios from '../request';
- export default{
+import axios from '../request';
+export default {
+ /**
+ * 设备信息管理
+ */
+ // 查询设备列表信息
+ searchDeviceInfoList: (params) =>
+ axios.post('/engineering/bigDevice/bigDeviceList', params),
+ // 添加设备信息
+ insertDeviceInfo: (params) =>
+ axios.post('/engineering/bigDevice/bigDeviceInsert', params),
+ // 修改设备信息
+ updateDeviceInfo: (params) =>
+ axios.post('/engineering/bigDevice/bigDeviceUpdate', params),
+ // 删除设备信息
+ deleteDeviceInfo: (params) =>
+ axios.get('/engineering/bigDevice/bigDeviceDel', { params }),
+ // 获取设备信息详情
+ getDeviceDetails: (params) =>
+ axios.get('/engineering/bigDevice/bigDeviceInfo', { params }),
+ // 导出设备excel
+ exportDeviceExcel: (params) =>
+ axios({
+ method: 'post',
+ url: '/engineering/bigDevice/bigDeviceExcel',
+ responseType: 'blob',
+ data: params
+ }),
+
+ /**
+ * 设备点检
+ */
+ // 查询设备点检列表信息
+ searchSpotCheckList: (params) =>
+ axios({
+ method: 'post',
+ url: '/m/checkDevice/findList',
+ headers: {
+ pageNum: params.pageNum,
+ pageSize: params.pageSize
+ },
+ data: {
+ startTime: params.startTime,
+ endTime: params.endTime,
+ bigNumber: params.bigNumber
+ }
+ }),
+ // 添加设备点检信息
+ insertSpotCheckInfo: (params) =>
+ axios.post('m/checkDevice/addCheckDevice', params),
+ // 修改设备点检信息
+ updateSpotCheckInfo: (params) =>
+ axios.post('m/checkDevice/addCheckDevice', params),
+ //删除设备点检信息
+ deleteSpotCheckInfo: (params) =>
+ axios.post('/m/checkDevice/delete', params),
+ // 获取点检详情
+ getSpotCheckDetail: (params) =>
+ axios.post('m/checkDevice/checkDeviceInfo', params),
+ // 获取全部设备信息
+ getAllDeviceData: () =>
+ axios.post('/m/checkDevice/deviceList'),
+
/**
* 生产采集设备
*
@@ -22,149 +83,4 @@
// 删除设备信息
deleteProductDevice: params =>
axios.get('/engineering/device/deviceDel', {params}),
-
- /**
- * 视频监控
- */
- // 查询视频列表信息
- searchDeviceInfo: params =>
- axios.post('/materials/video/webVideoList', params),
- // 添加视频信息
- insertDeviceInfo: params =>
- axios.post('/engineering/video/videoInsert', params),
- // 修改视频信息
- updateDeviceInfo: params =>
- axios.post('/engineering/video/videoUpdate', params),
- // 视频信息详情
- detailsDeviceInfo: params =>
- axios.get('/engineering/video/videoInfo', {params}),
- // 删除视频信息
- deleteDeviceInfo: params =>
- axios.get('/engineering/video/videoDel', {params}),
- //返回视频播放地址
- backVideosUrlList: params =>
- axios.post('/materials/video/videoListPath', params),
-
- /**
- * 大型生产设备
- */
- // 查询大型生产设备列表信息
- searchBigDevice: params =>
- axios.post('/engineering/bigDevice/bigDeviceList', params),
- // 添加大型生产设备信息
- insertBigDevice: params =>
- axios.post('/engineering/bigDevice/bigDeviceInsert', params),
- // 修改大型生产设备信息
- updateBigDevice: params =>
- axios.post('/engineering/bigDevice/bigDeviceUpdate', params),
- // 大型生产设备信息详情
- detailsBigDevice: params =>
- axios.get('/engineering/bigDevice/bigDeviceInfo', {params}),
- // 删除大型生产设备信息
- deleteBigDevice: params =>
- axios.get('/engineering/bigDevice/bigDeviceDel', {params}),
- //大型生产设备下拉
- getAllBigDevice: params =>
- axios.get('/engineering/bigDevice/bigDevicePull', {params}),
- //导出数据
- exportBigDatas:params=>
- axios({
- method: 'post',
- url: '/engineering/bigDevice/bigDeviceExcel',
- responseType: 'blob',
- data: params
- }),
-
- /**
- * 设备检查
- */
-
- // 设备检查列表信息
- searchCheckDevice: params =>
- axios.post('/engineering/bigInspect/bigInspectList', params),
- // 添加设备检查信息
- insertCheckDevice: params =>
- axios.post('/engineering/bigInspect/bigInspectInsert', params),
- // 修改设备检查信息
- updateCheckDevice: params =>
- axios.post('/engineering/bigInspect/bigInspectUpdate', params),
- // 设备检查信息详情
- detailsCheckDevice: params =>
- axios.get('/engineering/bigInspect/bigInspectInfo', {params}),
- // 删除设备检查信息
- deleteCheckDevice: params =>
- axios.get('/engineering/bigInspect/bigInspectDel', {params}),
-
- /**
- * 设备保养
- */
-
- // 设备保养列表信息
- searchKeepDevice: params =>
- axios.post('/engineering/maintenance/maintenanceList', params),
- // 添加设备保养信息
- insertKeepDevice: params =>
- axios.post('/engineering/maintenance/maintenanceInsert', params),
- // 修改设备保养信息
- updateKeepDevice: params =>
- axios.post('/engineering/maintenance/maintenanceUpdate', params),
- // 设备保养详情
- detailsKeepDevice: params =>
- axios.get('/engineering/maintenance/maintenanceInfo', {params}),
- // 删除设备保养信息
- deleteKeepDevice: params =>
- axios.get('/engineering/maintenance/maintenanceDel', {params}),
-
- /**
- * 设备维修
- */
- // 设备维修列表信息
- searchServiceDevice: params =>
- axios.post('/engineering/overhaul/overhaulList', params),
- // 添加设备维修信息
- insertServiceDevice: params =>
- axios.post('/engineering/overhaul/overhaulInsert', params),
- // 修改设备维修信息
- updateServiceDevice: params =>
- axios.post('/engineering/overhaul/overhaulUpdate', params),
- // 设备维修详情
- detailsServiceDevice: params =>
- axios.get('/engineering/overhaul/overhaulInfo', {params}),
- // 删除设备维修信息
- deleteServiceDevice: params =>
- axios.get('/engineering/overhaul/overhaulDel', {params}),
-
- /**
- * 设备点检
- */
- // 查询设备点检列表信息
- searchSpotCheckList: (params) =>
- axios({
- method: 'post',
- url: '/m/checkDevice/findList',
- headers: {
- pageNum: params.pageNum,
- pageSize: params.pageSize
- },
- data: {
- startTime: params.startTime,
- endTime: params.endTime,
- bigNumber: params.bigNumber
- }
- }),
- // 添加设备点检信息
- insertSpotCheckInfo: (params) =>
- axios.post('m/checkDevice/addCheckDevice', params),
- // 修改设备点检信息
- updateSpotCheckInfo: (params) =>
- axios.post('m/checkDevice/addCheckDevice', params),
- //删除设备点检信息
- deleteSpotCheckInfo: (params) =>
- axios.post('/m/checkDevice/delete', params),
- // 获取点检详情
- getSpotCheckDetail: (params) =>
- axios.post('m/checkDevice/checkDeviceInfo', params),
- // 获取全部设备信息
- getAllDeviceData: () =>
- axios.post('/m/checkDevice/deviceList'),
- }
\ No newline at end of file
+}
diff --git a/web/src/assets/sign_bg.png b/web/src/assets/sign_bg.png
new file mode 100644
index 0000000..4fb6cca
--- /dev/null
+++ b/web/src/assets/sign_bg.png
Binary files differ
diff --git a/web/src/router/index.js b/web/src/router/index.js
index 5e82559..040a817 100644
--- a/web/src/router/index.js
+++ b/web/src/router/index.js
@@ -26,7 +26,7 @@
path: '/scanDetail',
name: 'scanDetail',
meta: {
- title: '大型生产设备信息'
+ title: '设备信息'
},
component: () => import('../views/ScanInfo/ScanDetail.vue'),
},
diff --git a/web/src/style/element-ui.scss b/web/src/style/element-ui.scss
index fca0c63..185fb79 100644
--- a/web/src/style/element-ui.scss
+++ b/web/src/style/element-ui.scss
@@ -335,4 +335,8 @@
}
.el-checkbox {
color: #fff;
+}
+
+.el-month-table td .cell{
+ color: #FFFFFF;
}
\ No newline at end of file
diff --git a/web/src/views/EquipmentManage/EquipInfo/components/GeneralEquipment.vue b/web/src/views/EquipmentManage/EquipInfo/components/GeneralEquipment.vue
new file mode 100644
index 0000000..f49b7d3
--- /dev/null
+++ b/web/src/views/EquipmentManage/EquipInfo/components/GeneralEquipment.vue
@@ -0,0 +1,758 @@
+<template>
+ <div class="main tabs_main">
+ <div class="main_header">
+ <div class="header_item">
+ <span class="header_label">设备名称:</span>
+ <el-input v-model="bigDeviceName" clearable placeholder="请输入设备名称"></el-input>
+ </div>
+ <div class="header_item">
+ <span class="header_label">设备编号:</span>
+ <el-input v-model="bigNumber" clearable placeholder="请输入设备编号"></el-input>
+ </div>
+ <div class="header_item">
+ <el-button icon="el-icon-search" @click="searchDeviceInfoList(true)">查询</el-button>
+ <el-button class="search_btn" icon="el-icon-plus" @click="propInsert()">新增</el-button>
+ <el-button icon="el-icon-upload2" @click="exportExcel()">导出Excel</el-button>
+ </div>
+ </div>
+ <div class="main_content">
+ <el-table
+ v-loading="loading"
+ :data="generalList"
+ height="100%">
+ <el-table-column label="序号" width="55" align="center">
+ <template #default="scope">
+ <span>{{(pageNum - 1) * pageSize + scope.$index + 1}}</span>
+ </template>
+ </el-table-column>
+ <el-table-column prop="bigDeviceName" label="设备名称" align="center" width="200"></el-table-column>
+ <el-table-column prop="bigDeviceModel" label="规格型号" align="center" width="200"></el-table-column>
+ <el-table-column prop="bigNumber" label="设备编号" align="center" width="200"></el-table-column>
+ <el-table-column prop="manufacturer" label="生产厂家" align="center" width="200"></el-table-column>
+ <el-table-column prop="dateOfProduction" label="出厂年月" align="center"></el-table-column>
+ <el-table-column prop="useYearMonth" label="使用年月" align="center"></el-table-column>
+ <el-table-column prop="useLife" label="使用年限" align="center"></el-table-column>
+ <el-table-column prop="shapeSize" label="外形尺寸mm(长*宽*高)" align="center" width="200"></el-table-column>
+ <el-table-column prop="totalPower" label="总功率(KW)" align="center" width="200"></el-table-column>
+ <el-table-column prop="totalWeight" label="总重量(KG)" align="center" width="200"></el-table-column>
+ <el-table-column prop="originalValue" label="原值(元)" align="center"></el-table-column>
+ <el-table-column prop="yearDepreciationRate" label="年折旧率" align="center"></el-table-column>
+ <el-table-column prop="accumulatedDepreciation" label="已提折旧" align="center"></el-table-column>
+ <el-table-column prop="netWorth" label="净值(元)" align="center"></el-table-column>
+ <el-table-column label="使用状况" align="center">
+ <template #default="{ row }">
+ <div>
+ {{ row.useStatus ? row.useStatus === 1 ? '良好' : '老化' : '' }}
+ </div>
+ </template>
+ </el-table-column>
+ <el-table-column label="是否满足需要" align="center" width="120">
+ <template #default="{ row }">
+ <div>
+ {{ row.isNeed ? row.isNeed === 1 ? '是' : '否' : '' }}
+ </div>
+ </template>
+ </el-table-column>
+ <el-table-column prop="deviceSource" label="设备来源" align="center"></el-table-column>
+ <el-table-column prop="deviceNexus" label="设备配属关系" align="center" width="150"></el-table-column>
+ <el-table-column prop="fixedPerson" label="定机人" align="center"></el-table-column>
+ <el-table-column label="操作" align="center" width="400">
+ <template #default="{ row }">
+ <el-button class="table_btn" size="mini" @click="propUpdate(row)">查看</el-button>
+ <el-button class="table_btn" size="mini" @click="propUpdate(row)">修改</el-button>
+ <el-button class="table_btn" size="mini" @click="propPlate(row)">设备标识牌</el-button>
+ <el-button class="table_btn" size="mini" @click="propPlate(row)">打印</el-button>
+ <el-button class="delete_btn" size="mini" @click="deleteInfo(row)">删除</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
+ <div class="main_footer">
+ <el-pagination
+ background
+ @current-change="changePageNum"
+ @size-change="changePageSize"
+ :current-page="pageNum"
+ :page-sizes="[10, 20, 50, 100]"
+ :page-size="pageSize"
+ layout="total, sizes, prev, pager, next, jumper"
+ :total="total">
+ </el-pagination>
+ </div>
+ <!-- 新增 修改 -->
+ <el-dialog
+ class="prop_dialog"
+ :title="asyncTitle ? '新增特种设备' : '修改特种设备信息'"
+ :visible.sync="asyncDevice"
+ width="35%">
+ <el-form ref="form" :model="formDevice" :rules="rulesDevice" label-width="auto" class="rule_form">
+ <el-form-item label="设备名称:" prop="bigDeviceName">
+ <el-input v-model="formDevice.bigDeviceName" clearable placeholder="请输入设备名称"></el-input>
+ </el-form-item>
+ <el-form-item label="规格型号:" prop="bigDeviceModel">
+ <el-input v-model="formDevice.bigDeviceModel" clearable placeholder="请输入规格型号"></el-input>
+ </el-form-item>
+ <el-form-item label="设备编号:" prop="bigNumber">
+ <el-input v-model="formDevice.bigNumber" clearable placeholder="请输入设备编号"></el-input>
+ </el-form-item>
+ <el-form-item label="生产厂家:" prop="manufacturer">
+ <el-input v-model="formDevice.manufacturer" clearable placeholder="请输入生产厂家"></el-input>
+ </el-form-item>
+ <el-form-item label="出厂年月:" prop="dateOfProduction">
+ <el-date-picker
+ v-model="formDevice.dateOfProduction"
+ type="month"
+ placeholder="请选择出厂年月"
+ value-format="yyyy-MM">
+ </el-date-picker>
+ </el-form-item>
+ <el-form-item label="使用年月:" prop="useYearMonth">
+ <el-date-picker
+ v-model="formDevice.useYearMonth"
+ type="month"
+ placeholder="请选择使用年月"
+ value-format="yyyy-MM">
+ </el-date-picker>
+ </el-form-item>
+ <el-form-item label="使用年限:" prop="useLife">
+ <el-input-number
+ v-model="formDevice.useLife"
+ :controls="false"
+ :min="0"
+ placeholder="请输入使用年限">
+ </el-input-number>
+ </el-form-item>
+ <el-form-item label="外形尺寸:" prop="shapeSize">
+ <div class="form_flex">
+ <el-input-number
+ v-model="formDevice.shapeSize"
+ :controls="false"
+ :min="0"
+ placeholder="请输入外形尺寸">
+ </el-input-number>
+ <span class="form_flex_slot" style="min-width: 120px">mm(长*宽*高)</span>
+ </div>
+ </el-form-item>
+ <el-form-item label="总功率:" prop="totalPower">
+ <div class="form_flex">
+ <el-input-number
+ v-model="formDevice.totalPower"
+ :controls="false"
+ :min="0"
+ placeholder="请输入总功率">
+ </el-input-number>
+ <span class="form_flex_slot">KW</span>
+ </div>
+ </el-form-item>
+ <el-form-item label="总重量:" prop="totalWeight">
+ <div class="form_flex">
+ <el-input-number
+ v-model="formDevice.totalWeight"
+ :controls="false"
+ :min="0"
+ placeholder="请输入总重量">
+ </el-input-number>
+ <span class="form_flex_slot">KG</span>
+ </div>
+ </el-form-item>
+ <el-form-item label="原值:" prop="originalValue">
+ <div class="form_flex">
+ <el-input-number
+ v-model="formDevice.originalValue"
+ :controls="false"
+ :min="0"
+ placeholder="请输入原值">
+ </el-input-number>
+ <span class="form_flex_slot">元</span>
+ </div>
+ </el-form-item>
+ <el-form-item label="年折旧率:" prop="yearDepreciationRate">
+ <el-input-number
+ v-model="formDevice.yearDepreciationRate"
+ :controls="false"
+ :min="0"
+ placeholder="请输入年折旧率">
+ </el-input-number>
+ </el-form-item>
+ <el-form-item label="已提折旧:" prop="accumulatedDepreciation">
+ <el-input v-model="formDevice.accumulatedDepreciation" clearable placeholder="请输入已提折旧"></el-input>
+ </el-form-item>
+ <el-form-item label="净值:" prop="netWorth">
+ <div class="form_flex">
+ <el-input-number
+ v-model="formDevice.netWorth"
+ :controls="false"
+ :min="0"
+ placeholder="请输入净值">
+ </el-input-number>
+ <span class="form_flex_slot">元</span>
+ </div>
+ </el-form-item>
+ <el-form-item label="使用状况:" prop="useStatus">
+ <el-radio-group v-model="formDevice.useStatus">
+ <el-radio :label="1">良好</el-radio>
+ <el-radio :label="2">老化</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ <el-form-item label="是否满足需要:" prop="isNeed">
+ <el-radio-group v-model="formDevice.isNeed">
+ <el-radio :label="1">是</el-radio>
+ <el-radio :label="2">否</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ <el-form-item label="设备来源:" prop="deviceSource">
+ <el-input v-model="formDevice.deviceSource" clearable placeholder="请输入设备来源"></el-input>
+ </el-form-item>
+ <el-form-item label="设备配属关系:" prop="deviceNexus">
+ <el-input v-model="formDevice.deviceNexus" clearable placeholder="请输入设备配属关系"></el-input>
+ </el-form-item>
+ <el-form-item label="定机人:" prop="fixedPerson">
+ <el-select v-model="formDevice.fixedPerson" clearable placeholder="请选择定机人">
+ <el-option
+ v-for="item in plateUserData"
+ :key="item.userId"
+ :label="item.realName"
+ :value="item.realName">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="责任人:" prop="userId">
+ <el-select v-model="formDevice.userId" clearable placeholder="请选择责任人" @change="changePerson">
+ <el-option
+ v-for="item in plateUserData"
+ :key="item.userId"
+ :label="item.realName"
+ :value="item.userId">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="责任人联系电话:" prop="zrrPhone">
+ <el-input v-model="formDevice.zrrPhone" disabled placeholder="请输入责任人联系电话"></el-input>
+ </el-form-item>
+ <el-form-item label="管理员联系电话:" prop="adminPhone">
+ <el-input v-model="formDevice.adminPhone" clearable placeholder="请输入管理员联系电话:"></el-input>
+ </el-form-item>
+ <el-form-item label="备注:">
+ <el-input
+ v-model="formDevice.bigNotes"
+ clearable
+ placeholder="请输入备注"
+ type="textarea">
+ </el-input>
+ </el-form-item>
+ </el-form>
+ <div slot="footer">
+ <el-button @click="asyncDevice = false">取 消</el-button>
+ <el-button class="submit_btn" @click="asyncTitle ? submitInsertForm() : submitUpdateForm()">提 交</el-button>
+ </div>
+ </el-dialog>
+ <!-- 设备标识牌 -->
+ <el-dialog
+ class="prop_dialog"
+ title="设备标识牌"
+ :visible.sync="asyncPlate"
+ width="50%">
+ <div class="prop_plate">
+ <div class="prop_plate_header">
+ <img :src="`${baseUrl}/materials/steelPrint/test?bigDeviceId=${bigDeviceId}&type=1`" width="100px" height="100px">
+ <span>设备标识牌</span>
+ </div>
+ <div class="prop_plate_content">
+ <div
+ v-for="item in plateList"
+ :key="item.id"
+ class="plate_item">
+ <span>{{item.label}}</span>
+ <span>{{plateData[item.value]}}</span>
+ </div>
+ </div>
+ <div class="prop_plate_footer">
+ <img src="../../../../assets/logos.png" width="44px" height="35px">
+ <span>中铁十四局集团房桥有限公司胶东分公司</span>
+ </div>
+ </div>
+ <div slot="footer">
+ <el-button @click="asyncPlate = false">取 消</el-button>
+ <el-button class="submit_btn" @click="asyncPlate = false">打 印</el-button>
+ </div>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+import { buttonPinia } from '../../../../pinia/index';
+import { downFiles, throttle } from '../../../../plugins/public';
+ export default {
+ name: 'SpecialEquipment',
+ data() {
+ return {
+ bigDeviceName: '',
+ bigNumber: '',
+ pageNum: 1,
+ pageSize: 10,
+ total: 0,
+ loading: false,
+ generalList: [],
+ asyncTitle: true, // true 新增 false 修改
+ asyncDevice: false,
+ formDevice: {},
+ rulesDevice: {
+ bigDeviceName: [{
+ required: true,
+ message: '请输入设备名称',
+ trigger: 'blur'
+ }],
+ bigDeviceModel: [{
+ required: true,
+ message: '请输入规格型号',
+ trigger: 'blur'
+ }],
+ bigNumber: [{
+ required: true,
+ message: '请输入设备编号',
+ trigger: 'blur'
+ }],
+ manufacturer: [{
+ required: true,
+ message: '请输入生产厂家',
+ trigger: 'blur'
+ }],
+ dateOfProduction: [{
+ required: true,
+ message: '请选择出厂年月',
+ trigger: ['blur', 'change']
+ }],
+ useYearMonth: [{
+ required: true,
+ message: '请选择使用年月',
+ trigger: ['blur', 'change']
+ }],
+ useLife: [{
+ required: true,
+ message: '请输入使用年限',
+ trigger: 'blur'
+ }],
+ shapeSize: [{
+ required: true,
+ message: '请输入外形尺寸',
+ trigger: 'blur'
+ }],
+ totalPower: [{
+ required: true,
+ message: '请输入总功率',
+ trigger: 'blur'
+ }],
+ totalWeight: [{
+ required: true,
+ message: '请输入总重量',
+ trigger: 'blur'
+ }],
+ originalValue: [{
+ required: true,
+ message: '请输入原值',
+ trigger: 'blur'
+ }],
+ yearDepreciationRate: [{
+ required: true,
+ message: '请输入年折旧率',
+ trigger: 'blur'
+ }],
+ accumulatedDepreciation: [{
+ required: true,
+ message: '请输入已提折旧',
+ trigger: 'blur'
+ }],
+ netWorth: [{
+ required: true,
+ message: '请输入净值',
+ trigger: 'blur'
+ }],
+ useStatus: [{
+ required: true,
+ message: '请选择使用状况',
+ trigger: ['blur', 'change']
+ }],
+ isNeed: [{
+ required: true,
+ message: '请选择是否满足需要',
+ trigger: ['blur', 'change']
+ }],
+ deviceSource: [{
+ required: true,
+ message: '请输入设备来源',
+ trigger: 'blur'
+ }],
+ deviceNexus: [{
+ required: true,
+ message: '请输入设备配属关系',
+ trigger: 'blur'
+ }],
+ fixedPerson: [{
+ required: true,
+ message: '请选择定机人',
+ trigger: ['blur', 'change']
+ }],
+ adminPhone: [{
+ required: true,
+ message: '请输入管理员联系电话',
+ trigger: 'blur'
+ }],
+ userId: [{
+ required: true,
+ message: '请选择责任人',
+ trigger: ['blur', 'change']
+ }],
+ zrrPhone: [{
+ required: true,
+ message: '请输入责任人联系电话',
+ trigger: 'blur'
+ }, {
+ validator: (rule, value, callback) => {
+ const reg = /^1[3456789]\d{9}$/
+ if(reg.test(value)) {
+ callback()
+ } else {
+ callback(new Error('请输入正确的电话格式'))
+ }
+ },
+ trigger: 'blur'
+ }]
+ },
+ baseUrl: process.env.VUE_APP_BASE_URL,
+ asyncPlate: false,
+ bigDeviceId: '',
+ plateList: [{
+ id: 1,
+ label: '设备名称',
+ value: 'bigDeviceName'
+ },{
+ id: 2,
+ label: '编号',
+ value: 'bigNumber'
+ },{
+ id: 3,
+ label: '规格型号',
+ value: 'bigDeviceModel'
+ },{
+ id: 4,
+ label: '生产厂家',
+ value: 'manufacturer'
+ },{
+ id: 5,
+ label: '设备状态',
+ value: 'useStatusName'
+ },{
+ id: 6,
+ label: '责任人',
+ value: 'realName'
+ },{
+ id: 7,
+ label: '设备管理员联系方式',
+ value: 'adminPhone'
+ },{
+ id: 8,
+ label: '责任人联系方式',
+ value: 'zrrPhone'
+ }],
+ plateData: {},
+ plateUserData: []
+ }
+ },
+ mounted() {
+ this.searchDeviceInfoList(true);
+ },
+ methods: {
+ // 获取全部人员
+ async getAllPlatUserpulldown() {
+ const { data } = await this.$api.Personnerl.GETSTAFFALLDATA();
+ this.plateUserData = data;
+ },
+ // 查询特种设备信息
+ searchDeviceInfoList(bol) {
+ if(bol) {
+ this.pageNum = 1;
+ }
+ this.loading = true;
+ this.generalList = [];
+ this.$api.Device.searchDeviceInfoList({
+ pageNum: this.pageNum,
+ pageSize: this.pageSize,
+ bigType: 2,
+ bigDeviceName: this.bigDeviceName,
+ bigNumber: this.bigNumber
+ }).then((result) => {
+ if(result.success) {
+ this.total = result.data.total;
+ this.generalList = result.data.list;
+ }
+ this.loading = false;
+ }).catch(() => {
+ this.loading = false;
+ });
+ },
+ // 打开添加信息
+ propInsert() {
+ this.asyncTitle = true;
+ this.asyncDevice = true;
+ },
+ // 打开修改信息
+ propUpdate(row) {
+ this.asyncTitle = false;
+ this.asyncDevice = true;
+ this.$api.Device.getDeviceDetails({
+ bigDeviceId : row.bigDeviceId
+ }).then((res) => {
+ this.$set(this.formDevice, 'bigDeviceId', res.data.bigDeviceId);
+ this.$set(this.formDevice, 'bigDeviceName', res.data.bigDeviceName);
+ this.$set(this.formDevice, 'bigDeviceModel', res.data.bigDeviceModel);
+ this.$set(this.formDevice, 'bigNumber', res.data.bigNumber);
+ this.$set(this.formDevice, 'manufacturer', res.data.manufacturer);
+ this.$set(this.formDevice, 'dateOfProduction', res.data.dateOfProduction);
+ this.$set(this.formDevice, 'useYearMonth', res.data.useYearMonth);
+ this.$set(this.formDevice, 'useLife', res.data.useLife);
+ this.$set(this.formDevice, 'shapeSize', res.data.shapeSize);
+ this.$set(this.formDevice, 'totalPower', res.data.totalPower);
+ this.$set(this.formDevice, 'totalWeight', res.data.totalWeight);
+ this.$set(this.formDevice, 'originalValue', res.data.originalValue);
+ this.$set(this.formDevice, 'yearDepreciationRate', res.data.yearDepreciationRate);
+ this.$set(this.formDevice, 'accumulatedDepreciation', res.data.accumulatedDepreciation);
+ this.$set(this.formDevice, 'netWorth', res.data.netWorth);
+ this.$set(this.formDevice, 'useStatus', res.data.useStatus);
+ this.$set(this.formDevice, 'isNeed', res.data.isNeed);
+ this.$set(this.formDevice, 'deviceSource', res.data.deviceSource);
+ this.$set(this.formDevice, 'deviceNexus', res.data.deviceNexus);
+ this.$set(this.formDevice, 'fixedPerson', res.data.fixedPerson);
+ this.$set(this.formDevice, 'userId', res.data.userId);
+ this.$set(this.formDevice, 'zrrPhone', res.data.zrrPhone);
+ this.$set(this.formDevice, 'adminPhone', res.data.adminPhone);
+ this.$set(this.formDevice, 'bigNotes', res.data.bigNotes);
+ })
+ },
+ // 查看设备标识牌
+ propPlate(row) {
+ this.bigDeviceId = row.bigDeviceId;
+ this.asyncPlate = true;
+ this.$api.Device.getDeviceDetails({
+ bigDeviceId : row.bigDeviceId
+ }).then(res => {
+ this.plateData = res.data;
+ })
+ },
+ // 删除设备信息
+ deleteInfo(row) {
+ this.$confirm("该操作将删除该设备信息,是否继续删除?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
+ .then(() => {
+ this.$api.Device.deleteDeviceInfo({
+ bigDeviceId: row.bigDeviceId
+ })
+ .then(res => {
+ if(res.statusMsg === 'ok') {
+ this.searchDeviceInfoList(true);
+ this.$message.success("删除成功!");
+ } else {
+ this.$message.warning(res.statusMsg);
+ }
+ })
+ })
+ .catch(() => {
+ this.$message.warning("您已取消");
+ })
+ },
+ // 导出
+ exportExcel() {
+ this.$api.Device.exportDeviceExcel({
+ bigType: 2,
+ bigDeviceName: this.bigDeviceName,
+ bigNumber: this.bigNumber
+ }).then(res => {
+ downFiles(res, '一般设备信息', 'xls')
+ })
+ },
+ // 提交添加信息
+ submitInsertForm: throttle(function() {
+ this.$refs.form.validate((valid) => {
+ if(valid) {
+ const params = Object.assign({}, this.formDevice);
+ params.bigType = 2;
+ this.$api.Device.insertDeviceInfo(params).then((res) => {
+ if(res.success) {
+ this.asyncDevice = false;
+ this.$message.success('添加成功!');
+ this.searchDeviceInfoList(true);
+ } else {
+ this.$message.warning(res.statusMsg);
+ }
+ })
+ }
+ })
+ }, 3000),
+ // 提交修改信息
+ submitUpdateForm: throttle(function() {
+ this.$refs.form.validate((valid) => {
+ if(valid) {
+ const params = Object.assign({}, this.formDevice);
+ params.bigType = 2;
+ this.$api.Device.updateDeviceInfo(params).then((res) => {
+ if(res.success) {
+ this.asyncDevice = false;
+ this.$message.success('修改成功!');
+ this.searchDeviceInfoList(true);
+ } else {
+ this.$message.warning(res.statusMsg);
+ }
+ })
+ }
+ })
+ }, 3000),
+ //
+ changePerson(data) {
+ if(data) {
+ const dataInfo = this.plateUserData.find(item => item.userId == data);
+ this.$set(this.formDevice, 'zrrPhone', dataInfo.phone);
+ } else {
+ this.$set(this.formDevice, 'zrrPhone', '');
+ }
+
+ },
+ // 切换页数
+ changePageNum(page) {
+ this.pageNum = page;
+ this.searchDeviceInfoList();
+ },
+ // 切换每页条数
+ changePageSize(size) {
+ this.pageSize = size;
+ this.searchDeviceInfoList();
+ },
+ // 判断按钮权限信息
+ showButton(str) {
+ const pinia = buttonPinia();
+ return pinia.$state.buttonInfo.includes(str);
+ },
+ },
+ watch: {
+ asyncDevice(bol) {
+ if(!bol) {
+ this.formDevice = {};
+ this.$refs.form.resetFields();
+ } else {
+ this.getAllPlatUserpulldown();
+ }
+ },
+ asyncPlate(bol) {
+ if(!bol) {
+ this.plateData = {};
+ }
+ }
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+@import'@/style/layout-main.scss';
+
+.form_flex {
+ display: flex;
+ align-items: center;
+ width: 100%;
+
+ .form_flex_slot {
+ padding: 0 10px;;
+ min-width: 60px;
+ white-space: nowrap;
+ text-align: center;
+ color: #EAEAEA;
+ background: #0B5274;
+ border: 1px solid #1B428F;
+ border-radius: 0 2px 2px 0;
+ }
+}
+
+.prop_plate {
+ padding: 0 15px 10px 0;
+ height: 500px;
+
+ .prop_plate_header {
+ position: relative;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ height: 120px;
+ background: #153876;
+
+ img {
+ position: absolute;
+ top: 50%;
+ left: 35px;
+ transform: translateY(-50%);
+ }
+
+ span {
+ color: #FFFFFF;
+ font-size: 70px;
+ font-weight: 600;
+ letter-spacing: 32px;
+ }
+ }
+
+ .prop_plate_content {
+ position: relative;
+ display: flex;
+ flex-wrap: wrap;
+ padding: 40px 0;
+ height: 320px;
+ background: #FFFFFF;
+
+ &::before {
+ content: '';
+ position: absolute;
+ top: 2px;
+ width: 100%;
+ height: 100%;
+ background: url('../../../../assets/sign_bg.png') no-repeat;
+ background-size: 100% 100%;
+ }
+
+ .plate_item {
+ display: flex;
+ align-items: center;
+ padding: 5px 0 8px;
+ margin: 5px 20px 10px;
+ width: calc(50% - 40px);
+ color: #050402;
+ font-size: 22px;
+ letter-spacing: 2px;
+ border-bottom: 1px solid #E4E4E4;
+
+ & > span:last-child {
+ padding-left: 20px;
+ color: #555;
+ letter-spacing: 0;
+ }
+ }
+ }
+
+ .prop_plate_footer {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ height: 50px;
+ color: #000;
+ font-size: 16px;
+ letter-spacing: 2px;
+ background: #FFFFFF;
+
+ span {
+ margin-left: 10px;
+ }
+ }
+}
+
+/deep/ .el-radio {
+ padding: 10px 0;
+}
+</style>
\ No newline at end of file
diff --git a/web/src/views/EquipmentManage/EquipInfo/components/SpecialEquipment.vue b/web/src/views/EquipmentManage/EquipInfo/components/SpecialEquipment.vue
new file mode 100644
index 0000000..9d29a66
--- /dev/null
+++ b/web/src/views/EquipmentManage/EquipInfo/components/SpecialEquipment.vue
@@ -0,0 +1,759 @@
+<template>
+ <div class="main tabs_main">
+ <div class="main_header">
+ <div class="header_item">
+ <span class="header_label">设备名称:</span>
+ <el-input v-model="bigDeviceName" clearable placeholder="请输入设备名称"></el-input>
+ </div>
+ <div class="header_item">
+ <span class="header_label">设备编号:</span>
+ <el-input v-model="bigNumber" clearable placeholder="请输入设备编号"></el-input>
+ </div>
+ <div class="header_item">
+ <el-button icon="el-icon-search" @click="searchDeviceInfoList(true)">查询</el-button>
+ <el-button class="search_btn" icon="el-icon-plus" @click="propInsert()">新增</el-button>
+ <el-button icon="el-icon-upload2" @click="exportExcel()">导出Excel</el-button>
+ </div>
+ </div>
+ <div class="main_content">
+ <el-table
+ v-loading="loading"
+ :data="specialList"
+ height="100%">
+ <el-table-column label="序号" width="55" align="center">
+ <template #default="scope">
+ <span>{{(pageNum - 1) * pageSize + scope.$index + 1}}</span>
+ </template>
+ </el-table-column>
+ <el-table-column prop="bigDeviceName" label="设备名称" align="center" width="200"></el-table-column>
+ <el-table-column prop="bigDeviceModel" label="规格型号" align="center" width="200"></el-table-column>
+ <el-table-column prop="bigNumber" label="设备编号" align="center" width="200"></el-table-column>
+ <el-table-column prop="manufacturer" label="生产厂家" align="center" width="200"></el-table-column>
+ <el-table-column prop="dateOfProduction" label="出厂年月" align="center"></el-table-column>
+ <el-table-column prop="useYearMonth" label="使用年月" align="center"></el-table-column>
+ <el-table-column prop="useLife" label="使用年限" align="center"></el-table-column>
+ <el-table-column prop="shapeSize" label="外形尺寸mm(长*宽*高)" align="center" width="200"></el-table-column>
+ <el-table-column prop="totalPower" label="总功率(KW)" align="center" width="200"></el-table-column>
+ <el-table-column prop="totalWeight" label="总重量(KG)" align="center" width="200"></el-table-column>
+ <el-table-column prop="originalValue" label="原值(元)" align="center"></el-table-column>
+ <el-table-column prop="yearDepreciationRate" label="年折旧率" align="center"></el-table-column>
+ <el-table-column prop="accumulatedDepreciation" label="已提折旧" align="center"></el-table-column>
+ <el-table-column prop="netWorth" label="净值(元)" align="center"></el-table-column>
+ <el-table-column label="使用状况" align="center">
+ <template #default="{ row }">
+ <div>
+ {{ row.useStatus ? row.useStatus === 1 ? '良好' : '老化' : '' }}
+ </div>
+ </template>
+ </el-table-column>
+ <el-table-column label="是否满足需要" align="center" width="120">
+ <template #default="{ row }">
+ <div>
+ {{ row.isNeed ? row.isNeed === 1 ? '是' : '否' : '' }}
+ </div>
+ </template>
+ </el-table-column>
+ <el-table-column prop="deviceSource" label="设备来源" align="center"></el-table-column>
+ <el-table-column prop="deviceNexus" label="设备配属关系" align="center" width="150"></el-table-column>
+ <el-table-column prop="fixedPerson" label="定机人" align="center"></el-table-column>
+ <el-table-column label="操作" align="center" width="400">
+ <template #default="{ row }">
+ <el-button class="table_btn" size="mini" @click="propUpdate(row)">查看</el-button>
+ <el-button class="table_btn" size="mini" @click="propUpdate(row)">修改</el-button>
+ <el-button class="table_btn" size="mini" @click="propPlate(row)">设备标识牌</el-button>
+ <el-button class="table_btn" size="mini" @click="propPlate(row)">打印</el-button>
+ <el-button class="delete_btn" size="mini" @click="deleteInfo(row)">删除</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
+ <div class="main_footer">
+ <el-pagination
+ background
+ @current-change="changePageNum"
+ @size-change="changePageSize"
+ :current-page="pageNum"
+ :page-sizes="[10, 20, 50, 100]"
+ :page-size="pageSize"
+ layout="total, sizes, prev, pager, next, jumper"
+ :total="total">
+ </el-pagination>
+ </div>
+ <!-- 新增 修改 -->
+ <el-dialog
+ class="prop_dialog"
+ :title="asyncTitle ? '新增特种设备' : '修改特种设备信息'"
+ :visible.sync="asyncDevice"
+ width="35%">
+ <el-form ref="form" :model="formDevice" :rules="rulesDevice" label-width="auto" class="rule_form">
+ <el-form-item label="设备名称:" prop="bigDeviceName">
+ <el-input v-model="formDevice.bigDeviceName" clearable placeholder="请输入设备名称"></el-input>
+ </el-form-item>
+ <el-form-item label="规格型号:" prop="bigDeviceModel">
+ <el-input v-model="formDevice.bigDeviceModel" clearable placeholder="请输入规格型号"></el-input>
+ </el-form-item>
+ <el-form-item label="设备编号:" prop="bigNumber">
+ <el-input v-model="formDevice.bigNumber" clearable placeholder="请输入设备编号"></el-input>
+ </el-form-item>
+ <el-form-item label="生产厂家:" prop="manufacturer">
+ <el-input v-model="formDevice.manufacturer" clearable placeholder="请输入生产厂家"></el-input>
+ </el-form-item>
+ <el-form-item label="出厂年月:" prop="dateOfProduction">
+ <el-date-picker
+ v-model="formDevice.dateOfProduction"
+ type="month"
+ placeholder="请选择出厂年月"
+ value-format="yyyy-MM">
+ </el-date-picker>
+ </el-form-item>
+ <el-form-item label="使用年月:" prop="useYearMonth">
+ <el-date-picker
+ v-model="formDevice.useYearMonth"
+ type="month"
+ placeholder="请选择使用年月"
+ value-format="yyyy-MM">
+ </el-date-picker>
+ </el-form-item>
+ <el-form-item label="使用年限:" prop="useLife">
+ <el-input-number
+ v-model="formDevice.useLife"
+ :controls="false"
+ :min="0"
+ placeholder="请输入使用年限">
+ </el-input-number>
+ </el-form-item>
+ <el-form-item label="外形尺寸:" prop="shapeSize">
+ <div class="form_flex">
+ <el-input-number
+ v-model="formDevice.shapeSize"
+ :controls="false"
+ :min="0"
+ placeholder="请输入外形尺寸">
+ </el-input-number>
+ <span class="form_flex_slot" style="min-width: 120px">mm(长*宽*高)</span>
+ </div>
+ </el-form-item>
+ <el-form-item label="总功率:" prop="totalPower">
+ <div class="form_flex">
+ <el-input-number
+ v-model="formDevice.totalPower"
+ :controls="false"
+ :min="0"
+ placeholder="请输入总功率">
+ </el-input-number>
+ <span class="form_flex_slot">KW</span>
+ </div>
+ </el-form-item>
+ <el-form-item label="总重量:" prop="totalWeight">
+ <div class="form_flex">
+ <el-input-number
+ v-model="formDevice.totalWeight"
+ :controls="false"
+ :min="0"
+ placeholder="请输入总重量">
+ </el-input-number>
+ <span class="form_flex_slot">KG</span>
+ </div>
+ </el-form-item>
+ <el-form-item label="原值:" prop="originalValue">
+ <div class="form_flex">
+ <el-input-number
+ v-model="formDevice.originalValue"
+ :controls="false"
+ :min="0"
+ placeholder="请输入原值">
+ </el-input-number>
+ <span class="form_flex_slot">元</span>
+ </div>
+ </el-form-item>
+ <el-form-item label="年折旧率:" prop="yearDepreciationRate">
+ <el-input-number
+ v-model="formDevice.yearDepreciationRate"
+ :controls="false"
+ :min="0"
+ placeholder="请输入年折旧率">
+ </el-input-number>
+ </el-form-item>
+ <el-form-item label="已提折旧:" prop="accumulatedDepreciation">
+ <el-input v-model="formDevice.accumulatedDepreciation" clearable placeholder="请输入已提折旧"></el-input>
+ </el-form-item>
+ <el-form-item label="净值:" prop="netWorth">
+ <div class="form_flex">
+ <el-input-number
+ v-model="formDevice.netWorth"
+ :controls="false"
+ :min="0"
+ placeholder="请输入净值">
+ </el-input-number>
+ <span class="form_flex_slot">元</span>
+ </div>
+ </el-form-item>
+ <el-form-item label="使用状况:" prop="useStatus">
+ <el-radio-group v-model="formDevice.useStatus">
+ <el-radio :label="1">良好</el-radio>
+ <el-radio :label="2">老化</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ <el-form-item label="是否满足需要:" prop="isNeed">
+ <el-radio-group v-model="formDevice.isNeed">
+ <el-radio :label="1">是</el-radio>
+ <el-radio :label="2">否</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ <el-form-item label="设备来源:" prop="deviceSource">
+ <el-input v-model="formDevice.deviceSource" clearable placeholder="请输入设备来源"></el-input>
+ </el-form-item>
+ <el-form-item label="设备配属关系:" prop="deviceNexus">
+ <el-input v-model="formDevice.deviceNexus" clearable placeholder="请输入设备配属关系"></el-input>
+ </el-form-item>
+ <el-form-item label="定机人:" prop="fixedPerson">
+ <el-select v-model="formDevice.fixedPerson" clearable placeholder="请选择定机人">
+ <el-option
+ v-for="item in plateUserData"
+ :key="item.userId"
+ :label="item.realName"
+ :value="item.realName">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="责任人:" prop="userId">
+ <el-select v-model="formDevice.userId" clearable placeholder="请选择责任人" @change="changePerson">
+ <el-option
+ v-for="item in plateUserData"
+ :key="item.userId"
+ :label="item.realName"
+ :value="item.userId">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="责任人联系电话:" prop="zrrPhone">
+ <el-input v-model="formDevice.zrrPhone" disabled placeholder="请输入责任人联系电话"></el-input>
+ </el-form-item>
+ <el-form-item label="管理员联系电话:" prop="adminPhone">
+ <el-input v-model="formDevice.adminPhone" clearable placeholder="请输入管理员联系电话:"></el-input>
+ </el-form-item>
+ <el-form-item label="备注:">
+ <el-input
+ v-model="formDevice.bigNotes"
+ clearable
+ placeholder="请输入备注"
+ type="textarea">
+ </el-input>
+ </el-form-item>
+ </el-form>
+ <div slot="footer">
+ <el-button @click="asyncDevice = false">取 消</el-button>
+ <el-button class="submit_btn" @click="asyncTitle ? submitInsertForm() : submitUpdateForm()">提 交</el-button>
+ </div>
+ </el-dialog>
+ <!-- 设备标识牌 -->
+ <el-dialog
+ class="prop_dialog"
+ title="设备标识牌"
+ :visible.sync="asyncPlate"
+ width="50%">
+ <div class="prop_plate">
+ <div class="prop_plate_header">
+ <img :src="`${baseUrl}/materials/steelPrint/test?bigDeviceId=${bigDeviceId}&type=1`" width="100px" height="100px">
+ <span>设备标识牌</span>
+ </div>
+ <div class="prop_plate_content">
+ <div
+ v-for="item in plateList"
+ :key="item.id"
+ class="plate_item">
+ <span>{{item.label}}</span>
+ <span>{{plateData[item.value]}}</span>
+ </div>
+ </div>
+ <div class="prop_plate_footer">
+ <img src="../../../../assets/logos.png" width="44px" height="35px">
+ <span>中铁十四局集团房桥有限公司胶东分公司</span>
+ </div>
+ </div>
+ <div slot="footer">
+ <el-button @click="asyncPlate = false">取 消</el-button>
+ <el-button class="submit_btn" @click="asyncPlate = false">打 印</el-button>
+ </div>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+import { buttonPinia } from '../../../../pinia/index';
+import { throttle } from '../../../../plugins/public';
+import { downFiles } from '@/plugins/public';
+ export default {
+ name: 'SpecialEquipment',
+ data() {
+ return {
+ bigDeviceName: '',
+ bigNumber: '',
+ pageNum: 1,
+ pageSize: 10,
+ total: 0,
+ loading: false,
+ specialList: [],
+ asyncTitle: true, // true 新增 false 修改
+ asyncDevice: false,
+ formDevice: {},
+ rulesDevice: {
+ bigDeviceName: [{
+ required: true,
+ message: '请输入设备名称',
+ trigger: 'blur'
+ }],
+ bigDeviceModel: [{
+ required: true,
+ message: '请输入规格型号',
+ trigger: 'blur'
+ }],
+ bigNumber: [{
+ required: true,
+ message: '请输入设备编号',
+ trigger: 'blur'
+ }],
+ manufacturer: [{
+ required: true,
+ message: '请输入生产厂家',
+ trigger: 'blur'
+ }],
+ dateOfProduction: [{
+ required: true,
+ message: '请选择出厂年月',
+ trigger: ['blur', 'change']
+ }],
+ useYearMonth: [{
+ required: true,
+ message: '请选择使用年月',
+ trigger: ['blur', 'change']
+ }],
+ useLife: [{
+ required: true,
+ message: '请输入使用年限',
+ trigger: 'blur'
+ }],
+ shapeSize: [{
+ required: true,
+ message: '请输入外形尺寸',
+ trigger: 'blur'
+ }],
+ totalPower: [{
+ required: true,
+ message: '请输入总功率',
+ trigger: 'blur'
+ }],
+ totalWeight: [{
+ required: true,
+ message: '请输入总重量',
+ trigger: 'blur'
+ }],
+ originalValue: [{
+ required: true,
+ message: '请输入原值',
+ trigger: 'blur'
+ }],
+ yearDepreciationRate: [{
+ required: true,
+ message: '请输入年折旧率',
+ trigger: 'blur'
+ }],
+ accumulatedDepreciation: [{
+ required: true,
+ message: '请输入已提折旧',
+ trigger: 'blur'
+ }],
+ netWorth: [{
+ required: true,
+ message: '请输入净值',
+ trigger: 'blur'
+ }],
+ useStatus: [{
+ required: true,
+ message: '请选择使用状况',
+ trigger: ['blur', 'change']
+ }],
+ isNeed: [{
+ required: true,
+ message: '请选择是否满足需要',
+ trigger: ['blur', 'change']
+ }],
+ deviceSource: [{
+ required: true,
+ message: '请输入设备来源',
+ trigger: 'blur'
+ }],
+ deviceNexus: [{
+ required: true,
+ message: '请输入设备配属关系',
+ trigger: 'blur'
+ }],
+ fixedPerson: [{
+ required: true,
+ message: '请选择定机人',
+ trigger: ['blur', 'change']
+ }],
+ adminPhone: [{
+ required: true,
+ message: '请输入管理员联系电话',
+ trigger: 'blur'
+ }],
+ userId: [{
+ required: true,
+ message: '请选择责任人',
+ trigger: ['blur', 'change']
+ }],
+ zrrPhone: [{
+ required: true,
+ message: '请输入责任人联系电话',
+ trigger: 'blur'
+ }, {
+ validator: (rule, value, callback) => {
+ const reg = /^1[3456789]\d{9}$/
+ if(reg.test(value)) {
+ callback()
+ } else {
+ callback(new Error('请输入正确的电话格式'))
+ }
+ },
+ trigger: 'blur'
+ }]
+ },
+ baseUrl: process.env.VUE_APP_BASE_URL,
+ asyncPlate: false,
+ bigDeviceId: '',
+ plateList: [{
+ id: 1,
+ label: '设备名称',
+ value: 'bigDeviceName'
+ },{
+ id: 2,
+ label: '编号',
+ value: 'bigNumber'
+ },{
+ id: 3,
+ label: '规格型号',
+ value: 'bigDeviceModel'
+ },{
+ id: 4,
+ label: '生产厂家',
+ value: 'manufacturer'
+ },{
+ id: 5,
+ label: '设备状态',
+ value: 'useStatusName'
+ },{
+ id: 6,
+ label: '责任人',
+ value: 'realName'
+ },{
+ id: 7,
+ label: '设备管理员联系方式',
+ value: 'adminPhone'
+ },{
+ id: 8,
+ label: '责任人联系方式',
+ value: 'zrrPhone'
+ }],
+ plateData: {},
+ plateUserData: []
+ }
+ },
+ mounted() {
+ this.searchDeviceInfoList(true);
+ },
+ methods: {
+ // 获取全部人员
+ async getAllPlatUserpulldown() {
+ const { data } = await this.$api.Personnerl.GETSTAFFALLDATA();
+ this.plateUserData = data;
+ },
+ // 查询特种设备信息
+ searchDeviceInfoList(bol) {
+ if(bol) {
+ this.pageNum = 1;
+ }
+ this.loading = true;
+ this.specialList = [];
+ this.$api.Device.searchDeviceInfoList({
+ pageNum: this.pageNum,
+ pageSize: this.pageSize,
+ bigType: 1,
+ bigDeviceName: this.bigDeviceName,
+ bigNumber: this.bigNumber
+ }).then((result) => {
+ if(result.success) {
+ this.total = result.data.total;
+ this.specialList = result.data.list;
+ }
+ this.loading = false;
+ }).catch(() => {
+ this.loading = false;
+ });
+ },
+ // 打开添加信息
+ propInsert() {
+ this.asyncTitle = true;
+ this.asyncDevice = true;
+ },
+ // 打开修改信息
+ propUpdate(row) {
+ this.asyncTitle = false;
+ this.asyncDevice = true;
+ this.$api.Device.getDeviceDetails({
+ bigDeviceId : row.bigDeviceId
+ }).then((res) => {
+ this.$set(this.formDevice, 'bigDeviceId', res.data.bigDeviceId);
+ this.$set(this.formDevice, 'bigDeviceName', res.data.bigDeviceName);
+ this.$set(this.formDevice, 'bigDeviceModel', res.data.bigDeviceModel);
+ this.$set(this.formDevice, 'bigNumber', res.data.bigNumber);
+ this.$set(this.formDevice, 'manufacturer', res.data.manufacturer);
+ this.$set(this.formDevice, 'dateOfProduction', res.data.dateOfProduction);
+ this.$set(this.formDevice, 'useYearMonth', res.data.useYearMonth);
+ this.$set(this.formDevice, 'useLife', res.data.useLife);
+ this.$set(this.formDevice, 'shapeSize', res.data.shapeSize);
+ this.$set(this.formDevice, 'totalPower', res.data.totalPower);
+ this.$set(this.formDevice, 'totalWeight', res.data.totalWeight);
+ this.$set(this.formDevice, 'originalValue', res.data.originalValue);
+ this.$set(this.formDevice, 'yearDepreciationRate', res.data.yearDepreciationRate);
+ this.$set(this.formDevice, 'accumulatedDepreciation', res.data.accumulatedDepreciation);
+ this.$set(this.formDevice, 'netWorth', res.data.netWorth);
+ this.$set(this.formDevice, 'useStatus', res.data.useStatus);
+ this.$set(this.formDevice, 'isNeed', res.data.isNeed);
+ this.$set(this.formDevice, 'deviceSource', res.data.deviceSource);
+ this.$set(this.formDevice, 'deviceNexus', res.data.deviceNexus);
+ this.$set(this.formDevice, 'fixedPerson', res.data.fixedPerson);
+ this.$set(this.formDevice, 'userId', res.data.userId);
+ this.$set(this.formDevice, 'zrrPhone', res.data.zrrPhone);
+ this.$set(this.formDevice, 'adminPhone', res.data.adminPhone);
+ this.$set(this.formDevice, 'bigNotes', res.data.bigNotes);
+ })
+ },
+ // 查看设备标识牌
+ propPlate(row) {
+ this.bigDeviceId = row.bigDeviceId;
+ this.asyncPlate = true;
+ this.$api.Device.getDeviceDetails({
+ bigDeviceId : row.bigDeviceId
+ }).then(res => {
+ this.plateData = res.data;
+ })
+ },
+ // 导出
+ exportExcel() {
+ this.$api.Device.exportDeviceExcel({
+ bigType: 1,
+ bigDeviceName: this.bigDeviceName,
+ bigNumber: this.bigNumber
+ }).then(res => {
+ downFiles(res, '特种设备信息', 'xls')
+ })
+ },
+ // 删除设备信息
+ deleteInfo(row) {
+ this.$confirm("该操作将删除该设备信息,是否继续删除?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
+ .then(() => {
+ this.$api.Device.deleteDeviceInfo({
+ bigDeviceId: row.bigDeviceId
+ })
+ .then(res => {
+ if(res.statusMsg === 'ok') {
+ this.searchDeviceInfoList(true);
+ this.$message.success("删除成功!");
+ } else {
+ this.$message.warning(res.statusMsg);
+ }
+ })
+ })
+ .catch(() => {
+ this.$message.warning("您已取消");
+ })
+ },
+ // 提交添加信息
+ submitInsertForm: throttle(function() {
+ this.$refs.form.validate((valid) => {
+ if(valid) {
+ const params = Object.assign({}, this.formDevice);
+ params.bigType = 1;
+ this.$api.Device.insertDeviceInfo(params).then((res) => {
+ if(res.success) {
+ this.asyncDevice = false;
+ this.$message.success('添加成功!');
+ this.searchDeviceInfoList(true);
+ } else {
+ this.$message.warning(res.statusMsg);
+ }
+ })
+ }
+ })
+ }, 3000),
+ // 提交修改信息
+ submitUpdateForm: throttle(function() {
+ this.$refs.form.validate((valid) => {
+ if(valid) {
+ const params = Object.assign({}, this.formDevice);
+ params.bigType = 1;
+ this.$api.Device.updateDeviceInfo(params).then((res) => {
+ if(res.success) {
+ this.asyncDevice = false;
+ this.$message.success('修改成功!');
+ this.searchDeviceInfoList(true);
+ } else {
+ this.$message.warning(res.statusMsg);
+ }
+ })
+ }
+ })
+ }, 3000),
+ //
+ changePerson(data) {
+ if(data) {
+ const dataInfo = this.plateUserData.find(item => item.userId == data);
+ this.$set(this.formDevice, 'zrrPhone', dataInfo.phone);
+ } else {
+ this.$set(this.formDevice, 'zrrPhone', '');
+ }
+
+ },
+ // 切换页数
+ changePageNum(page) {
+ this.pageNum = page;
+ this.searchDeviceInfoList();
+ },
+ // 切换每页条数
+ changePageSize(size) {
+ this.pageSize = size;
+ this.searchDeviceInfoList();
+ },
+ // 判断按钮权限信息
+ showButton(str) {
+ const pinia = buttonPinia();
+ return pinia.$state.buttonInfo.includes(str);
+ },
+ },
+ watch: {
+ asyncDevice(bol) {
+ if(!bol) {
+ this.formDevice = {};
+ this.$refs.form.resetFields();
+ } else {
+ this.getAllPlatUserpulldown();
+ }
+ },
+ asyncPlate(bol) {
+ if(!bol) {
+ this.plateData = {};
+ }
+ }
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+@import'@/style/layout-main.scss';
+
+.form_flex {
+ display: flex;
+ align-items: center;
+ width: 100%;
+
+ .form_flex_slot {
+ padding: 0 10px;;
+ min-width: 60px;
+ white-space: nowrap;
+ text-align: center;
+ color: #EAEAEA;
+ background: #0B5274;
+ border: 1px solid #1B428F;
+ border-radius: 0 2px 2px 0;
+ }
+}
+
+.prop_plate {
+ padding: 0 15px 10px 0;
+ height: 500px;
+
+ .prop_plate_header {
+ position: relative;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ height: 120px;
+ background: #153876;
+
+ img {
+ position: absolute;
+ top: 50%;
+ left: 35px;
+ transform: translateY(-50%);
+ }
+
+ span {
+ color: #FFFFFF;
+ font-size: 70px;
+ font-weight: 600;
+ letter-spacing: 32px;
+ }
+ }
+
+ .prop_plate_content {
+ position: relative;
+ display: flex;
+ flex-wrap: wrap;
+ padding: 40px 0;
+ height: 320px;
+ background: #FFFFFF;
+
+ &::before {
+ content: '';
+ position: absolute;
+ top: 2px;
+ width: 100%;
+ height: 100%;
+ background: url('../../../../assets/sign_bg.png') no-repeat;
+ background-size: 100% 100%;
+ }
+
+ .plate_item {
+ display: flex;
+ align-items: center;
+ padding: 5px 0 8px;
+ margin: 5px 20px 10px;
+ width: calc(50% - 40px);
+ color: #050402;
+ font-size: 22px;
+ letter-spacing: 2px;
+ border-bottom: 1px solid #E4E4E4;
+
+ & > span:last-child {
+ padding-left: 20px;
+ color: #555;
+ letter-spacing: 0;
+ }
+ }
+ }
+
+ .prop_plate_footer {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ height: 50px;
+ color: #000;
+ font-size: 16px;
+ letter-spacing: 2px;
+ background: #FFFFFF;
+
+ span {
+ margin-left: 10px;
+ }
+ }
+}
+
+/deep/ .el-radio {
+ padding: 10px 0;
+}
+</style>
\ No newline at end of file
diff --git a/web/src/views/EquipmentManage/EquipInfo/index.vue b/web/src/views/EquipmentManage/EquipInfo/index.vue
new file mode 100644
index 0000000..9b71c6f
--- /dev/null
+++ b/web/src/views/EquipmentManage/EquipInfo/index.vue
@@ -0,0 +1,37 @@
+<template>
+ <div class="main">
+ <div class="main_tabs">
+ <el-tabs v-model="activeName">
+ <el-tab-pane label="特种设备" name="first"></el-tab-pane>
+ <el-tab-pane label="一般设备" name="second"></el-tab-pane>
+ </el-tabs>
+ </div>
+ <div class="main_content">
+ <component :is="activeName === 'first' ? 'SpecialEquipment' : 'GeneralEquipment'"></component>
+ </div>
+ </div>
+</template>
+
+<script>
+import SpecialEquipment from './components/SpecialEquipment.vue';
+import GeneralEquipment from './components/GeneralEquipment.vue';
+ export default {
+ components: {
+ SpecialEquipment,
+ GeneralEquipment
+ },
+ data() {
+ return {
+ activeName: 'first'
+ }
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+@import '../../../style/layout-main.scss';
+
+/deep/.main {
+ background: none;
+}
+</style>
\ No newline at end of file
diff --git a/web/src/views/EquipmentManage/EquipSpot.vue b/web/src/views/EquipmentManage/EquipSpot.vue
index 9feb288..5281d6d 100644
--- a/web/src/views/EquipmentManage/EquipSpot.vue
+++ b/web/src/views/EquipmentManage/EquipSpot.vue
@@ -144,7 +144,10 @@
required: true,
message: '请选择设备',
trigger: ['blur', 'change']
- }]
+ }],
+ bigDeviceModel: [{
+
+ }]
},
deviceData: [],
checkTypeData: []
@@ -300,10 +303,12 @@
// 切换页数
changePageNum(page) {
this.pageNum = page;
+ this.searchSpotCheckList();
},
// 切换每页条数
changePageSize(size) {
this.pageSize = size;
+ this.searchSpotCheckList();
}
},
watch: {
diff --git a/web/src/views/GreenBuild/WeldSmoke.vue b/web/src/views/GreenBuild/WeldSmoke.vue
index dc7e116..7927f60 100644
--- a/web/src/views/GreenBuild/WeldSmoke.vue
+++ b/web/src/views/GreenBuild/WeldSmoke.vue
@@ -29,25 +29,67 @@
</div>
</template>
</el-table-column>
- <el-table-column prop="bigDeviceName" label="采集时间" align="center" ></el-table-column>
- <el-table-column prop="bigNumber" label="设备" align="center"></el-table-column>
- <el-table-column prop="dc" label="粉尘浓度(mg/m³)" align="center" ></el-table-column>
- <el-table-column prop="t" label="温度(℃)" align="center" ></el-table-column>
- <el-table-column prop="dp" label="压差(pa)" align="center" ></el-table-column>
- <el-table-column prop="oc" label="氧气浓度(%)" align="center" ></el-table-column>
- <el-table-column prop="fans" label="风速(m/s)" align="center" ></el-table-column>
- <el-table-column prop="alarm" label="设备报警" align="center" ></el-table-column>
- <el-table-column label="风机启动" align="center" >
+ <el-table-column label="当前焊接机开启台数" align="center" width="150">
<template #default="{ row }">
<div>
- {{row.fanrun ? row.fanrun == 1 ? '运行' : '未运行' : ''}}
+ {{row.vb0 + ' 台'}}
+ </div>
+ </template>
+ </el-table-column>
+ <template
+ v-for="(item, index) in 10">
+ <el-table-column
+ :prop="`i${index <= 7 ? '0'+index : index + 2}`"
+ :label="`${index + 1}#焊机开机信号`"
+ align="center"
+ :key="index"
+ width="150">
+ </el-table-column>
+ </template>
+ <template
+ v-for="(item, index) in 6">
+ <el-table-column
+ :prop="`q${index <= 10 ? '0'+index : index}`"
+ :label="`${index + 1}#除尘器运行状态`"
+ align="center"
+ :key="index"
+ width="150">
+ </el-table-column>
+ </template>
+ <el-table-column label="第一组除尘器延时关闭计时" align="center" width="200">
+ <template #default="{ row }">
+ <div>
+ {{row.vb10 + ' 秒'}}
+ </div>
+ </template>
+ </el-table-column>
+ <el-table-column label="第二组除尘器延时关闭计时" align="center" width="200">
+ <template #default="{ row }">
+ <div>
+ {{row.vb11 + ' 秒'}}
+ </div>
+ </template>
+ </el-table-column>
+ <el-table-column label="第三组除尘器延时关闭计时" align="center" width="200">
+ <template #default="{ row }">
+ <div>
+ {{row.vb12 + ' 秒'}}
</div>
</template>
</el-table-column>
</el-table>
</div>
<div class="main_footer">
-
+ <el-pagination
+ background
+ @current-change="changePageNum"
+ @size-change="changePageSize"
+ :current-page="pageNum"
+ :page-sizes="[10, 20, 50, 100]"
+ :page-size="pageSize"
+ layout="total, sizes, prev, pager, next, jumper"
+ :total="total">
+ </el-pagination>
</div>
</div>
</template>
@@ -91,6 +133,16 @@
this.loading = false;
})
},
+ // 切换页数
+ changePageNum(page) {
+ this.pageNum = page;
+ this.searchSmokeList();
+ },
+ // 切换每页条数
+ changePageSize(size) {
+ this.pageSize = size;
+ this.searchSmokeList();
+ },
// 判断按钮权限信息
showButton(str) {
const pinia = buttonPinia();
diff --git a/web/src/views/LayoutIndex/components/LayoutAside.vue b/web/src/views/LayoutIndex/components/LayoutAside.vue
index 8d29a32..04e1cc0 100644
--- a/web/src/views/LayoutIndex/components/LayoutAside.vue
+++ b/web/src/views/LayoutIndex/components/LayoutAside.vue
@@ -26,7 +26,11 @@
<span>{{three.meta.title}}</span>
</template>
<template v-for="items in three.children">
- <el-menu-item :index="items.path" :key="items.name">{{items.meta.title}}</el-menu-item>
+ <el-menu-item
+ :index="items.path"
+ :key="items.name">
+ {{items.meta.title}}
+ </el-menu-item>
</template>
</el-submenu>
</template>
@@ -133,8 +137,8 @@
/deep/ .el-menu-item.is-active {
padding-left: 45px!important;
position: relative;
- margin-left: 10px;
- color: #3DC8FF;
+ // margin-left: 10px;
+ color: #EAEAEA;
border-radius: 3px;
background: linear-gradient(
90deg,
@@ -154,6 +158,10 @@
}
}
+.three_item {
+ background: #0B5274 !important;
+}
+
/deep/ .el-submenu .el-submenu__title:hover {
color: #3DC8FF;
background: rgba(57,181,254,0.7) !important;
diff --git a/web/src/views/ScanInfo/ScanDetail.vue b/web/src/views/ScanInfo/ScanDetail.vue
index 43e06bc..3d90553 100644
--- a/web/src/views/ScanInfo/ScanDetail.vue
+++ b/web/src/views/ScanInfo/ScanDetail.vue
@@ -15,28 +15,24 @@
<div class="scan_row_data">{{devicesInfo&&devicesInfo.bigNumber}}</div>
</div>
<div class="scan_row">
- <div class="scan_row_text">设备类型:</div>
- <div class="scan_row_data">{{devicesInfo&&devicesInfo.bigTypeName}}</div>
- </div>
- <div class="scan_row">
- <div class="scan_row_text">安装位置:</div>
- <div class="scan_row_data">{{devicesInfo&&devicesInfo.bigPosition}}</div>
+ <div class="scan_row_text">生产厂家:</div>
+ <div class="scan_row_data">{{devicesInfo&&devicesInfo.manufacturer}}</div>
</div>
<div class="scan_row">
<div class="scan_row_text">设备状态:</div>
- <div class="scan_row_data">{{devicesInfo&&devicesInfo.bigState===1?'在线':'离线'}}</div>
+ <div class="scan_row_data">{{devicesInfo&&devicesInfo.useStatus === 1 ? '良好' : '老化'}}</div>
</div>
<div class="scan_row">
<div class="scan_row_text">责任人:</div>
- <div class="scan_row_data">{{devicesInfo&&devicesInfo.realName===null?'':devicesInfo.realName}}</div>
+ <div class="scan_row_data">{{devicesInfo&&devicesInfo.realName ? devicesInfo.realName : ''}}</div>
</div>
<div class="scan_row">
- <div class="scan_row_text">供应商:</div>
- <div class="scan_row_data">{{devicesInfo&&devicesInfo.supplierName}}</div>
+ <div class="scan_row_text">责任人电话:</div>
+ <div class="scan_row_data">{{devicesInfo&&devicesInfo.zrrPhone}}</div>
</div>
<div class="scan_row">
- <div class="scan_row_text">钥匙柜编号:</div>
- <div class="scan_row_data">{{devicesInfo&&devicesInfo.keyCabinet}}</div>
+ <div class="scan_row_text">设备管理员联系方式:</div>
+ <div class="scan_row_data">{{devicesInfo&&devicesInfo.adminPhone}}</div>
</div>
<div class="scan_row">
<div class="scan_row_text">使用年限:</div>
@@ -60,8 +56,8 @@
//获取设备信息
getDeviceInnfo(){
this.url = window.location.href.split('?')[1].split('=')[1]
- window.document.title="大型生产设备"
- this.$api.Device.detailsBigDevice({bigDeviceId:this.url}).then(res=>{
+ window.document.title="设备信息"
+ this.$api.Device.getDeviceDetails({bigDeviceId: this.url}).then(res=>{
if(res.statusMsg === 'ok'){
this.devicesInfo = res.data
}else{
--
Gitblit v1.9.3