Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zhengyuan-danger-chemistry-manage
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
耿迪迪
zhengyuan-danger-chemistry-manage
Commits
2d837d7d
Commit
2d837d7d
authored
Feb 14, 2023
by
王晓倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备台账和特种设备台账改动,新加详情
parent
8e795399
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
500 additions
and
352 deletions
+500
-352
TDeviceInfo.java
...m/src/main/java/com/zehong/system/domain/TDeviceInfo.java
+121
-105
TSpecialDeviceRecord.java
...n/java/com/zehong/system/domain/TSpecialDeviceRecord.java
+22
-28
TDeviceInfoServiceImpl.java
...om/zehong/system/service/impl/TDeviceInfoServiceImpl.java
+20
-20
TMaintainPlanServiceImpl.java
.../zehong/system/service/impl/TMaintainPlanServiceImpl.java
+1
-1
TRepairOrderServiceImpl.java
...m/zehong/system/service/impl/TRepairOrderServiceImpl.java
+1
-1
TDeviceInfoMapper.xml
...em/src/main/resources/mapper/system/TDeviceInfoMapper.xml
+45
-37
index.vue
...anage-web/src/views/deviceManagement/deviceInfo/index.vue
+139
-88
index.vue
...eb/src/views/deviceManagement/specialDeviceInfo/index.vue
+151
-72
No files found.
danger-manage-system/src/main/java/com/zehong/system/domain/TDeviceInfo.java
View file @
2d837d7d
...
@@ -2,9 +2,12 @@ package com.zehong.system.domain;
...
@@ -2,9 +2,12 @@ package com.zehong.system.domain;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.core.domain.BaseEntity
;
import
com.zehong.common.core.domain.BaseEntity
;
import
java.util.Date
;
/**
/**
* 设备信息管理对象 t_device_info
* 设备信息管理对象 t_device_info
*
*
...
@@ -18,171 +21,176 @@ public class TDeviceInfo extends BaseEntity
...
@@ -18,171 +21,176 @@ public class TDeviceInfo extends BaseEntity
/** $column.columnComment */
/** $column.columnComment */
private
Long
id
;
private
Long
id
;
/** 设备位号 */
@Excel
(
name
=
"设备位号"
)
private
String
tagNumber
;
/** 设备名称 */
/** 设备名称 */
@Excel
(
name
=
"设备名称"
)
@Excel
(
name
=
"设备名称"
)
private
String
deviceName
;
private
String
deviceName
;
/**
设备编码
*/
/**
规格
*/
@Excel
(
name
=
"
设备编码
"
)
@Excel
(
name
=
"
规格
"
)
private
String
deviceCode
;
private
String
specifications
;
/** 设备状态(0正常 1报警 2离线) */
/** 技术性能 */
private
String
deviceStatus
;
@Excel
(
name
=
"技术性能"
)
private
String
function
;
/**
设备类型
*/
/**
介质
*/
@Excel
(
name
=
"
设备类型(液位探测器/气体报警器/压力报警器)"
,
readConverterExp
=
"1=液位探测器,2=气体报警器,3=压力报警器
"
)
@Excel
(
name
=
"
介质
"
)
private
String
deviceType
;
private
String
medium
;
/**
位号
*/
/**
制造厂家
*/
@Excel
(
name
=
"
位号
"
)
@Excel
(
name
=
"
制造厂家
"
)
private
String
tagNumbe
r
;
private
String
manufacto
r
;
/**
设备等级
*/
/**
所属车间
*/
@Excel
(
name
=
"
设备等级(一级危险源/二级危险源/三级危险源)"
,
readConverterExp
=
"1=一级危险源,2=二级危险源,3=三级危险源
"
)
@Excel
(
name
=
"
所属车间"
,
readConverterExp
=
"1=电仪车间,2=化工车间,3=热电车间,4=压缩车间,5=尿素车间,6=制气车间,7=维修车间
"
)
private
String
deviceGrade
;
private
String
shop
;
/** 安装位置 */
/** 投运时间 */
@Excel
(
name
=
"安装位置"
)
@Excel
(
name
=
"投运时间(xxxx-xx-xx)"
,
dateFormat
=
"yyyy-MM-dd"
)
private
String
installLocation
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
commissionDate
;
/**
是否特种设备(0否,1是)
*/
/**
设备状态
*/
@Excel
(
name
=
"
是否特种设备(是/否)"
,
readConverterExp
=
"0=否,1=是
"
)
@Excel
(
name
=
"
设备状态"
,
readConverterExp
=
"0=运行,1=备用,2=检修
"
)
private
String
isSpecial
;
private
String
deviceStatus
;
/** 负责人 */
/** 设备分类 */
@Excel
(
name
=
"负责人"
)
@Excel
(
name
=
"设备分类(动设备/静设备)"
,
readConverterExp
=
"1=动设备,2=静设备"
)
private
String
responsiblePerson
;
private
String
classify
;
/** 分级 */
@Excel
(
name
=
"分级"
)
private
String
deviceGrade
;
/**
负责人电话
*/
/**
是否特种设备(0否,1是)
*/
@Excel
(
name
=
"
负责人电话
"
)
@Excel
(
name
=
"
是否特种设备(否/是)"
,
readConverterExp
=
"0=否,1=是
"
)
private
String
responsiblePhone
;
private
String
isSpecial
;
/**
备注信息
*/
/**
特种设备类型
*/
@Excel
(
name
=
"
备注信息
"
)
@Excel
(
name
=
"
特种设备类型(预防事故设施/控制事故设施/减少与消除事故影响设施)"
,
readConverterExp
=
"1=预防事故设施,2=控制事故设施,3=减少与消除事故影响设施
"
)
private
String
remarks
;
private
String
deviceType
;
/** 是否
作废(0正常,1作
废) */
/** 是否
报废(0正常,1报
废) */
@Excel
(
name
=
"是否
作废(0正常,1作废)
"
)
@Excel
(
name
=
"是否
报废(否/是)"
,
readConverterExp
=
"0=否,1=是
"
)
private
String
isCancel
;
private
String
isCancel
;
/** 是否删除(0正常,1删除) */
/** 是否删除(0正常,1删除) */
private
String
isDel
;
private
String
isDel
;
public
void
setId
(
Long
id
)
public
Long
getId
()
{
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
this
.
id
=
id
;
}
}
public
Long
getId
()
public
String
getTagNumber
()
{
{
return
tagNumber
;
return
id
;
}
}
public
void
setDeviceName
(
String
deviceName
)
{
public
void
setTagNumber
(
String
tagNumber
)
{
this
.
deviceName
=
deviceName
;
this
.
tagNumber
=
tagNumber
;
}
}
public
String
getDeviceName
()
public
String
getDeviceName
()
{
{
return
deviceName
;
return
deviceName
;
}
}
public
void
setDeviceCode
(
String
deviceCode
)
{
public
void
setDeviceName
(
String
deviceName
)
{
this
.
device
Code
=
deviceCod
e
;
this
.
device
Name
=
deviceNam
e
;
}
}
public
String
getDeviceCode
()
public
String
getSpecifications
()
{
{
return
specifications
;
return
deviceCode
;
}
}
public
void
setDeviceStatus
(
String
deviceStatus
)
{
public
void
setSpecifications
(
String
specifications
)
{
this
.
deviceStatus
=
deviceStatu
s
;
this
.
specifications
=
specification
s
;
}
}
public
String
getDeviceStatus
()
public
String
getFunction
()
{
{
return
function
;
return
deviceStatus
;
}
}
public
void
setDeviceType
(
String
deviceType
)
{
public
void
setFunction
(
String
function
)
{
this
.
deviceType
=
deviceType
;
this
.
function
=
function
;
}
}
public
String
getDeviceType
()
public
String
getMedium
()
{
{
return
medium
;
return
deviceType
;
}
}
public
void
setTagNumber
(
String
tagNumber
)
{
public
void
setMedium
(
String
medium
)
{
this
.
tagNumber
=
tagNumber
;
this
.
medium
=
medium
;
}
}
public
String
getTagNumber
()
public
String
getManufactor
()
{
{
return
manufactor
;
return
tagNumber
;
}
}
public
void
setDeviceGrade
(
String
deviceGrade
)
{
public
void
setManufactor
(
String
manufactor
)
{
this
.
deviceGrade
=
deviceGrade
;
this
.
manufactor
=
manufactor
;
}
}
public
String
getDeviceGrade
()
public
String
getShop
()
{
{
return
shop
;
return
deviceGrade
;
}
}
public
void
setInstallLocation
(
String
installLocation
)
{
public
void
setShop
(
String
shop
)
{
this
.
installLocation
=
installLocation
;
this
.
shop
=
shop
;
}
}
public
String
getInstallLocation
()
public
Date
getCommissionDate
()
{
{
return
commissionDate
;
return
installLocation
;
}
}
public
void
setIsSpecial
(
String
isSpecial
)
{
public
void
setCommissionDate
(
Date
commissionDate
)
{
this
.
isSpecial
=
isSpecial
;
this
.
commissionDate
=
commissionDate
;
}
}
public
String
getIsSpecial
()
public
String
getDeviceStatus
()
{
{
return
deviceStatus
;
return
isSpecial
;
}
}
public
void
setResponsiblePerson
(
String
responsiblePerson
)
{
public
void
setDeviceStatus
(
String
deviceStatus
)
{
this
.
responsiblePerson
=
responsiblePerson
;
this
.
deviceStatus
=
deviceStatus
;
}
}
public
String
getResponsiblePerson
()
public
String
getDeviceType
()
{
{
return
deviceType
;
return
responsiblePerson
;
}
}
public
void
setResponsiblePhone
(
String
responsiblePhone
)
{
public
void
setDeviceType
(
String
deviceType
)
{
this
.
responsiblePhone
=
responsiblePhon
e
;
this
.
deviceType
=
deviceTyp
e
;
}
}
public
String
getResponsiblePhone
()
public
String
getClassify
()
{
{
return
classify
;
return
responsiblePhone
;
}
}
public
void
setIsDel
(
String
isDel
)
{
public
void
setClassify
(
String
classify
)
{
this
.
isDel
=
isDel
;
this
.
classify
=
classify
;
}
}
public
String
getIsDel
()
public
String
getDeviceGrade
()
{
{
return
deviceGrade
;
return
isDel
;
}
}
public
String
getRemarks
(
)
{
public
void
setDeviceGrade
(
String
deviceGrade
)
{
return
remarks
;
this
.
deviceGrade
=
deviceGrade
;
}
}
public
void
setRemarks
(
String
remarks
)
{
public
String
getIsSpecial
()
{
this
.
remarks
=
remarks
;
return
isSpecial
;
}
public
void
setIsSpecial
(
String
isSpecial
)
{
this
.
isSpecial
=
isSpecial
;
}
}
public
String
getIsCancel
()
{
public
String
getIsCancel
()
{
...
@@ -192,4 +200,12 @@ public class TDeviceInfo extends BaseEntity
...
@@ -192,4 +200,12 @@ public class TDeviceInfo extends BaseEntity
public
void
setIsCancel
(
String
isCancel
)
{
public
void
setIsCancel
(
String
isCancel
)
{
this
.
isCancel
=
isCancel
;
this
.
isCancel
=
isCancel
;
}
}
public
String
getIsDel
()
{
return
isDel
;
}
public
void
setIsDel
(
String
isDel
)
{
this
.
isDel
=
isDel
;
}
}
}
danger-manage-system/src/main/java/com/zehong/system/domain/TSpecialDeviceRecord.java
View file @
2d837d7d
...
@@ -27,9 +27,9 @@ public class TSpecialDeviceRecord extends BaseEntity
...
@@ -27,9 +27,9 @@ public class TSpecialDeviceRecord extends BaseEntity
@Excel
(
name
=
"对应类型"
)
@Excel
(
name
=
"对应类型"
)
private
String
operateType
;
private
String
operateType
;
/** 设备
编
号 */
/** 设备
位
号 */
@Excel
(
name
=
"设备
编
号"
)
@Excel
(
name
=
"设备
位
号"
)
private
String
deviceCode
;
private
String
tagNumber
;
/** 设备id */
/** 设备id */
private
Long
deviceId
;
private
Long
deviceId
;
...
@@ -46,14 +46,12 @@ public class TSpecialDeviceRecord extends BaseEntity
...
@@ -46,14 +46,12 @@ public class TSpecialDeviceRecord extends BaseEntity
/** 是否删除 */
/** 是否删除 */
private
String
isDel
;
private
String
isDel
;
public
void
setId
(
Long
id
)
public
Long
getId
()
{
{
return
id
;
this
.
id
=
id
;
}
}
public
Long
getId
()
public
void
setId
(
Long
id
)
{
{
this
.
id
=
id
;
return
id
;
}
}
public
String
getOperateCode
()
{
public
String
getOperateCode
()
{
...
@@ -64,14 +62,20 @@ public class TSpecialDeviceRecord extends BaseEntity
...
@@ -64,14 +62,20 @@ public class TSpecialDeviceRecord extends BaseEntity
this
.
operateCode
=
operateCode
;
this
.
operateCode
=
operateCode
;
}
}
public
void
setDeviceCode
(
String
deviceCode
)
public
String
getOperateType
()
{
{
return
operateType
;
this
.
deviceCode
=
deviceCode
;
}
public
void
setOperateType
(
String
operateType
)
{
this
.
operateType
=
operateType
;
}
public
String
getTagNumber
()
{
return
tagNumber
;
}
}
public
String
getDeviceCode
()
public
void
setTagNumber
(
String
tagNumber
)
{
{
this
.
tagNumber
=
tagNumber
;
return
deviceCode
;
}
}
public
Long
getDeviceId
()
{
public
Long
getDeviceId
()
{
...
@@ -82,24 +86,14 @@ public class TSpecialDeviceRecord extends BaseEntity
...
@@ -82,24 +86,14 @@ public class TSpecialDeviceRecord extends BaseEntity
this
.
deviceId
=
deviceId
;
this
.
deviceId
=
deviceId
;
}
}
public
String
getOperateType
()
{
public
Date
getEffectiveDate
()
{
return
operateType
;
return
effectiveDate
;
}
public
void
setOperateType
(
String
operateType
)
{
this
.
operateType
=
operateType
;
}
}
public
void
setEffectiveDate
(
Date
effectiveDate
)
public
void
setEffectiveDate
(
Date
effectiveDate
)
{
{
this
.
effectiveDate
=
effectiveDate
;
this
.
effectiveDate
=
effectiveDate
;
}
}
public
Date
getEffectiveDate
()
{
return
effectiveDate
;
}
public
String
getRecordStatus
()
{
public
String
getRecordStatus
()
{
return
recordStatus
;
return
recordStatus
;
}
}
...
...
danger-manage-system/src/main/java/com/zehong/system/service/impl/TDeviceInfoServiceImpl.java
View file @
2d837d7d
...
@@ -126,32 +126,32 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
...
@@ -126,32 +126,32 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
{
{
try
try
{
{
// 验证是否存在这个用户
// // 验证是否存在这个设备位号
TDeviceInfo
d
=
new
TDeviceInfo
();
//
TDeviceInfo d = new TDeviceInfo();
d
.
setDeviceCode
(
device
.
getDeviceCode
());
// d.setTagNumber(device.getTagNumber
());
List
<
TDeviceInfo
>
list
=
tDeviceInfoMapper
.
selectTDeviceInfoList
(
d
);
//
List<TDeviceInfo> list = tDeviceInfoMapper.selectTDeviceInfoList(d);
if
(
list
.
size
()
==
0
)
//
if (list.size() == 0)
{
//
{
this
.
insertTDeviceInfo
(
device
);
this
.
insertTDeviceInfo
(
device
);
successNum
++;
successNum
++;
// successMsg.append("<br/>" + successNum + "、设备 " + device.getDeviceName() + "(" + device.getDeviceCode() + ")" + " 导入成功");
//
//
successMsg.append("<br/>" + successNum + "、设备 " + device.getDeviceName() + "(" + device.getDeviceCode() + ")" + " 导入成功");
}
//
}
else
if
(
isUpdateSupport
)
//
else if (isUpdateSupport)
{
//
{
this
.
updateTDeviceInfo
(
device
);
//
this.updateTDeviceInfo(device);
successNum
++;
//
successNum++;
// successMsg.append("<br/>" + successNum + "、设备 " + device.getDeviceName() + "(" + device.getDeviceCode() + ")" + " 更新成功");
//
//
successMsg.append("<br/>" + successNum + "、设备 " + device.getDeviceName() + "(" + device.getDeviceCode() + ")" + " 更新成功");
}
//
}
else
//
else
{
//
{
failureNum
++;
//
failureNum++;
failureMsg
.
append
(
"<br/>"
+
failureNum
+
"、设备编号 "
+
device
.
getDeviceCode
()
+
" 已存在"
);
// failureMsg.append("<br/>" + failureNum + "、设备位号 " + device.getTagNumber
() + " 已存在");
}
//
}
}
}
catch
(
Exception
e
)
catch
(
Exception
e
)
{
{
failureNum
++;
failureNum
++;
String
msg
=
"<br/>"
+
failureNum
+
"、设备 "
+
device
.
getDeviceName
()
+
"("
+
device
.
get
DeviceCode
()
+
")"
+
" 导入失败:"
;
String
msg
=
"<br/>"
+
failureNum
+
"、设备 "
+
device
.
getDeviceName
()
+
"("
+
device
.
get
TagNumber
()
+
")"
+
" 导入失败:"
;
failureMsg
.
append
(
msg
+
e
.
getMessage
());
failureMsg
.
append
(
msg
+
e
.
getMessage
());
log
.
error
(
msg
,
e
);
log
.
error
(
msg
,
e
);
}
}
...
...
danger-manage-system/src/main/java/com/zehong/system/service/impl/TMaintainPlanServiceImpl.java
View file @
2d837d7d
...
@@ -68,7 +68,7 @@ public class TMaintainPlanServiceImpl implements ITMaintainPlanService
...
@@ -68,7 +68,7 @@ public class TMaintainPlanServiceImpl implements ITMaintainPlanService
TDeviceInfo
tDeviceInfo
=
tDeviceInfoMapper
.
selectTDeviceInfoById
(
Long
.
valueOf
(
id
));
TDeviceInfo
tDeviceInfo
=
tDeviceInfoMapper
.
selectTDeviceInfoById
(
Long
.
valueOf
(
id
));
TSpecialDeviceRecord
tSpecialDeviceRecord
=
new
TSpecialDeviceRecord
();
TSpecialDeviceRecord
tSpecialDeviceRecord
=
new
TSpecialDeviceRecord
();
tSpecialDeviceRecord
.
set
DeviceCode
(
tDeviceInfo
.
getDeviceCode
());
tSpecialDeviceRecord
.
set
TagNumber
(
tDeviceInfo
.
getTagNumber
());
tSpecialDeviceRecord
.
setDeviceId
(
tDeviceInfo
.
getId
());
tSpecialDeviceRecord
.
setDeviceId
(
tDeviceInfo
.
getId
());
tSpecialDeviceRecord
.
setOperateCode
(
planCode
);
tSpecialDeviceRecord
.
setOperateCode
(
planCode
);
tSpecialDeviceRecord
.
setOperateType
(
"1"
);
tSpecialDeviceRecord
.
setOperateType
(
"1"
);
...
...
danger-manage-system/src/main/java/com/zehong/system/service/impl/TRepairOrderServiceImpl.java
View file @
2d837d7d
...
@@ -66,7 +66,7 @@ public class TRepairOrderServiceImpl implements ITRepairOrderService
...
@@ -66,7 +66,7 @@ public class TRepairOrderServiceImpl implements ITRepairOrderService
TDeviceInfo
tDeviceInfo
=
tDeviceInfoMapper
.
selectTDeviceInfoById
(
tRepairOrder
.
getDeviceId
());
TDeviceInfo
tDeviceInfo
=
tDeviceInfoMapper
.
selectTDeviceInfoById
(
tRepairOrder
.
getDeviceId
());
TSpecialDeviceRecord
tSpecialDeviceRecord
=
new
TSpecialDeviceRecord
();
TSpecialDeviceRecord
tSpecialDeviceRecord
=
new
TSpecialDeviceRecord
();
tSpecialDeviceRecord
.
set
DeviceCode
(
tDeviceInfo
.
getDeviceCode
());
tSpecialDeviceRecord
.
set
TagNumber
(
tDeviceInfo
.
getTagNumber
());
tSpecialDeviceRecord
.
setDeviceId
(
tDeviceInfo
.
getId
());
tSpecialDeviceRecord
.
setDeviceId
(
tDeviceInfo
.
getId
());
tSpecialDeviceRecord
.
setOperateCode
(
repairCode
);
tSpecialDeviceRecord
.
setOperateCode
(
repairCode
);
tSpecialDeviceRecord
.
setOperateType
(
"2"
);
tSpecialDeviceRecord
.
setOperateType
(
"2"
);
...
...
danger-manage-system/src/main/resources/mapper/system/TDeviceInfoMapper.xml
View file @
2d837d7d
...
@@ -7,43 +7,44 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -7,43 +7,44 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap
type=
"TDeviceInfo"
id=
"TDeviceInfoResult"
>
<resultMap
type=
"TDeviceInfo"
id=
"TDeviceInfoResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"id"
column=
"id"
/>
<result
property=
"deviceName"
column=
"device_name"
/>
<result
property=
"deviceName"
column=
"device_name"
/>
<result
property=
"deviceCode"
column=
"device_code"
/>
<result
property=
"deviceStatus"
column=
"device_status"
/>
<result
property=
"deviceType"
column=
"device_type"
/>
<result
property=
"deviceType"
column=
"device_type"
/>
<result
property=
"classify"
column=
"classify"
/>
<result
property=
"tagNumber"
column=
"tag_number"
/>
<result
property=
"tagNumber"
column=
"tag_number"
/>
<result
property=
"specifications"
column=
"specifications"
/>
<result
property=
"function"
column=
"function"
/>
<result
property=
"medium"
column=
"medium"
/>
<result
property=
"manufactor"
column=
"manufactor"
/>
<result
property=
"shop"
column=
"shop"
/>
<result
property=
"commissionDate"
column=
"commission_date"
/>
<result
property=
"deviceStatus"
column=
"device_status"
/>
<result
property=
"deviceGrade"
column=
"device_grade"
/>
<result
property=
"deviceGrade"
column=
"device_grade"
/>
<result
property=
"i
nstallLocation"
column=
"install_location
"
/>
<result
property=
"i
sCancel"
column=
"is_cancel
"
/>
<result
property=
"isSpecial"
column=
"is_special"
/>
<result
property=
"isSpecial"
column=
"is_special"
/>
<result
property=
"responsiblePerson"
column=
"responsible_person"
/>
<result
property=
"isDel"
column=
"is_del"
/>
<result
property=
"responsiblePhone"
column=
"responsible_phone"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"isDel"
column=
"is_del"
/>
<result
property=
"isCancel"
column=
"is_cancel"
/>
<result
property=
"remarks"
column=
"remarks"
/>
</resultMap>
</resultMap>
<sql
id=
"selectTDeviceInfoVo"
>
<sql
id=
"selectTDeviceInfoVo"
>
select id, device_name, device_
code, device_status, device_type, tag_number, device_grade, install_location, is_special, responsible_person, responsible_phone, create_time, update_time, is_cancel, is_del, remarks
from t_device_info
select id, device_name, device_
type, classify, tag_number, specifications, function, medium, manufactor, shop, commission_date, device_status, device_grade, is_cancel, is_special, is_del, create_time, update_time
from t_device_info
</sql>
</sql>
<select
id=
"selectTDeviceInfoList"
parameterType=
"TDeviceInfo"
resultMap=
"TDeviceInfoResult"
>
<select
id=
"selectTDeviceInfoList"
parameterType=
"TDeviceInfo"
resultMap=
"TDeviceInfoResult"
>
<include
refid=
"selectTDeviceInfoVo"
/>
<include
refid=
"selectTDeviceInfoVo"
/>
<where>
is_del = '0'
<where>
is_del = '0'
<if
test=
"deviceName != null and deviceName != ''"
>
and device_name like concat('%', #{deviceName}, '%')
</if>
<if
test=
"deviceName != null and deviceName != ''"
>
and device_name like concat('%', #{deviceName}, '%')
</if>
<if
test=
"
deviceCode != null and deviceCode != ''"
>
and device_code like concat('%', #{deviceCode
}, '%')
</if>
<if
test=
"
tagNumber != null and tagNumber != ''"
>
and tag_number like concat('%', #{tagNumber
}, '%')
</if>
<if
test=
"deviceStatus != null and deviceStatus != ''"
>
and device_status = #{deviceStatus}
</if>
<if
test=
"deviceStatus != null and deviceStatus != ''"
>
and device_status = #{deviceStatus}
</if>
<if
test=
"deviceType != null and deviceType != ''"
>
and device_type = #{deviceType}
</if>
<if
test=
"deviceType != null and deviceType != ''"
>
and device_type = #{deviceType}
</if>
<if
test=
"
tagNumber != null and tagNumber != ''"
>
and tag_number = #{tagNumber
}
</if>
<if
test=
"
shop != null and shop != ''"
>
and shop = #{shop
}
</if>
<if
test=
"deviceGrade != null and deviceGrade != ''"
>
and device_grade = #{deviceGrade}
</if>
<if
test=
"deviceGrade != null and deviceGrade != ''"
>
and device_grade = #{deviceGrade}
</if>
<if
test=
"isSpecial != null and isSpecial != ''"
>
and is_special = #{isSpecial}
</if>
<if
test=
"isSpecial != null and isSpecial != ''"
>
and is_special = #{isSpecial}
</if>
<if
test=
"isCancel != null and isCancel != ''"
>
and is_cancel = #{isCancel}
</if>
<if
test=
"isCancel != null and isCancel != ''"
>
and is_cancel = #{isCancel}
</if>
<if
test=
"responsiblePhone != null and responsiblePhone != ''"
>
and responsible_phone = #{responsiblePhone}
</if>
<if
test=
"params.beginTime != null and params.beginTime != ''"
>
<!-- 开始时间检索 -->
<if
test=
"params.beginTime != null and params.beginTime != ''"
>
<!-- 开始时间检索 -->
AND date_format(c
reate_tim
e,'%y%m%d')
>
= date_format(#{params.beginTime},'%y%m%d')
AND date_format(c
ommission_dat
e,'%y%m%d')
>
= date_format(#{params.beginTime},'%y%m%d')
</if>
</if>
<if
test=
"params.endTime != null and params.endTime != ''"
>
<!-- 结束时间检索 -->
<if
test=
"params.endTime != null and params.endTime != ''"
>
<!-- 结束时间检索 -->
AND date_format(c
reate_tim
e,'%y%m%d')
<
= date_format(#{params.endTime},'%y%m%d')
AND date_format(c
ommission_dat
e,'%y%m%d')
<
= date_format(#{params.endTime},'%y%m%d')
</if>
</if>
</where>
</where>
</select>
</select>
...
@@ -57,35 +58,41 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -57,35 +58,41 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into t_device_info
insert into t_device_info
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"deviceName != null"
>
device_name,
</if>
<if
test=
"deviceName != null"
>
device_name,
</if>
<if
test=
"deviceCode != null"
>
device_code,
</if>
<if
test=
"deviceStatus != null"
>
device_status,
</if>
<if
test=
"deviceType != null"
>
device_type,
</if>
<if
test=
"deviceType != null"
>
device_type,
</if>
<if
test=
"classify != null"
>
classify,
</if>
<if
test=
"tagNumber != null"
>
tag_number,
</if>
<if
test=
"tagNumber != null"
>
tag_number,
</if>
<if
test=
"specifications != null"
>
specifications,
</if>
<if
test=
"function != null"
>
function,
</if>
<if
test=
"medium != null"
>
medium,
</if>
<if
test=
"manufactor != null"
>
manufactor,
</if>
<if
test=
"shop != null"
>
shop,
</if>
<if
test=
"commissionDate != null"
>
commission_date,
</if>
<if
test=
"deviceStatus != null"
>
device_status,
</if>
<if
test=
"deviceGrade != null"
>
device_grade,
</if>
<if
test=
"deviceGrade != null"
>
device_grade,
</if>
<if
test=
"i
nstallLocation != null"
>
install_location
,
</if>
<if
test=
"i
sCancel != null"
>
is_cancel
,
</if>
<if
test=
"isSpecial != null"
>
is_special,
</if>
<if
test=
"isSpecial != null"
>
is_special,
</if>
<if
test=
"responsiblePerson != null"
>
responsible_person,
</if>
<if
test=
"isDel != null"
>
is_del,
</if>
<if
test=
"responsiblePhone != null"
>
responsible_phone,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"isDel != null"
>
is_del,
</if>
<if
test=
"remarks != null"
>
remarks,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"deviceName != null"
>
#{deviceName},
</if>
<if
test=
"deviceName != null"
>
#{deviceName},
</if>
<if
test=
"deviceCode != null"
>
#{deviceCode},
</if>
<if
test=
"deviceStatus != null"
>
#{deviceStatus},
</if>
<if
test=
"deviceType != null"
>
#{deviceType},
</if>
<if
test=
"deviceType != null"
>
#{deviceType},
</if>
<if
test=
"classify != null"
>
#{classify},
</if>
<if
test=
"tagNumber != null"
>
#{tagNumber},
</if>
<if
test=
"tagNumber != null"
>
#{tagNumber},
</if>
<if
test=
"specifications != null"
>
#{specifications},
</if>
<if
test=
"function != null"
>
#{function},
</if>
<if
test=
"medium != null"
>
#{medium},
</if>
<if
test=
"manufactor != null"
>
#{manufactor},
</if>
<if
test=
"shop != null"
>
#{shop},
</if>
<if
test=
"commissionDate != null"
>
#{commissionDate},
</if>
<if
test=
"deviceStatus != null"
>
#{deviceStatus},
</if>
<if
test=
"deviceGrade != null"
>
#{deviceGrade},
</if>
<if
test=
"deviceGrade != null"
>
#{deviceGrade},
</if>
<if
test=
"i
nstallLocation != null"
>
#{installLocation
},
</if>
<if
test=
"i
sCancel != null"
>
#{isCancel
},
</if>
<if
test=
"isSpecial != null"
>
#{isSpecial},
</if>
<if
test=
"isSpecial != null"
>
#{isSpecial},
</if>
<if
test=
"responsiblePerson != null"
>
#{responsiblePerson},
</if>
<if
test=
"isDel != null"
>
#{isDel},
</if>
<if
test=
"responsiblePhone != null"
>
#{responsiblePhone},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"isDel != null"
>
#{isDel},
</if>
<if
test=
"remarks != null"
>
#{remarks},
</if>
</trim>
</trim>
</insert>
</insert>
...
@@ -93,20 +100,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -93,20 +100,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update t_device_info
update t_device_info
<trim
prefix=
"SET"
suffixOverrides=
","
>
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"deviceName != null"
>
device_name = #{deviceName},
</if>
<if
test=
"deviceName != null"
>
device_name = #{deviceName},
</if>
<if
test=
"deviceCode != null"
>
device_code = #{deviceCode},
</if>
<if
test=
"deviceStatus != null"
>
device_status = #{deviceStatus},
</if>
<if
test=
"deviceType != null"
>
device_type = #{deviceType},
</if>
<if
test=
"deviceType != null"
>
device_type = #{deviceType},
</if>
<if
test=
"classify != null"
>
classify = #{classify},
</if>
<if
test=
"tagNumber != null"
>
tag_number = #{tagNumber},
</if>
<if
test=
"tagNumber != null"
>
tag_number = #{tagNumber},
</if>
<if
test=
"specifications != null"
>
specifications = #{specifications},
</if>
<if
test=
"function != null"
>
function = #{function},
</if>
<if
test=
"medium != null"
>
medium = #{medium},
</if>
<if
test=
"manufactor != null"
>
manufactor = #{manufactor},
</if>
<if
test=
"shop != null"
>
shop = #{shop},
</if>
<if
test=
"commissionDate != null"
>
commission_date = #{commissionDate},
</if>
<if
test=
"deviceStatus != null"
>
device_status = #{deviceStatus},
</if>
<if
test=
"deviceGrade != null"
>
device_grade = #{deviceGrade},
</if>
<if
test=
"deviceGrade != null"
>
device_grade = #{deviceGrade},
</if>
<if
test=
"i
nstallLocation != null"
>
install_location = #{installLocation
},
</if>
<if
test=
"i
sCancel != null"
>
is_cancel = #{isCancel
},
</if>
<if
test=
"isSpecial != null"
>
is_special = #{isSpecial},
</if>
<if
test=
"isSpecial != null"
>
is_special = #{isSpecial},
</if>
<if
test=
"responsiblePerson != null"
>
responsible_person = #{responsiblePerson},
</if>
<if
test=
"responsiblePhone != null"
>
responsible_phone = #{responsiblePhone},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"isDel != null"
>
is_del = #{isDel},
</if>
<if
test=
"isDel != null"
>
is_del = #{isDel},
</if>
<if
test=
"isCancel != null"
>
is_cancel = #{isCancel},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"remarks != null"
>
remarks = #{remarks},
</if>
</trim>
</trim>
where id = #{id} and is_del = '0'
where id = #{id} and is_del = '0'
</update>
</update>
...
...
danger-manage-web/src/views/deviceManagement/deviceInfo/index.vue
View file @
2d837d7d
...
@@ -10,16 +10,16 @@
...
@@ -10,16 +10,16 @@
@
keyup
.
enter
.
native=
"handleQuery"
@
keyup
.
enter
.
native=
"handleQuery"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"设备
编码"
prop=
"deviceCode
"
>
<el-form-item
label=
"设备
位号"
prop=
"tagNumber
"
>
<el-input
<el-input
v-model=
"queryParams.
deviceCode
"
v-model=
"queryParams.
tagNumber
"
placeholder=
"请输入设备
编码
"
placeholder=
"请输入设备
位号
"
clearable
clearable
size=
"small"
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
@
keyup
.
enter
.
native=
"handleQuery"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"设备类型"
prop=
"deviceType"
>
<
!--
<
el-form-item
label=
"设备类型"
prop=
"deviceType"
>
<el-select
v-model=
"queryParams.deviceType"
placeholder=
"请选择设备类型"
clearable
size=
"small"
>
<el-select
v-model=
"queryParams.deviceType"
placeholder=
"请选择设备类型"
clearable
size=
"small"
>
<el-option
<el-option
v-for =
"dict in typeOptions"
v-for =
"dict in typeOptions"
...
@@ -28,6 +28,16 @@
...
@@ -28,6 +28,16 @@
:value =
"dict.dictValue"
:value =
"dict.dictValue"
/>
/>
</el-select>
</el-select>
</el-form-item>
-->
<el-form-item
label=
"所属车间"
prop=
"shop"
>
<el-select
v-model=
"queryParams.shop"
placeholder=
"请选择所属车间"
clearable
size=
"small"
>
<el-option
v-for =
"dict in shopOptions"
:key =
"dict.dictValue"
:label =
"dict.dictLabel"
:value =
"dict.dictValue"
/>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"是否报废"
prop=
"isCancel"
>
<el-form-item
label=
"是否报废"
prop=
"isCancel"
>
<el-select
v-model=
"queryParams.isCancel"
placeholder=
"请选择是否报废"
clearable
size=
"small"
>
<el-select
v-model=
"queryParams.isCancel"
placeholder=
"请选择是否报废"
clearable
size=
"small"
>
...
@@ -75,36 +85,34 @@
...
@@ -75,36 +85,34 @@
<el-table
v-loading=
"loading"
:data=
"deviceInfoList"
>
<el-table
v-loading=
"loading"
:data=
"deviceInfoList"
>
<el-table-column
label=
"设备名称"
align=
"center"
prop=
"deviceName"
/>
<el-table-column
label=
"设备名称"
align=
"center"
prop=
"deviceName"
/>
<el-table-column
label=
"设备
编码"
align=
"center"
prop=
"deviceCode
"
>
<el-table-column
label=
"设备
位号"
align=
"center"
prop=
"tagNumber
"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.
deviceCode == '' || scope.row.deviceCode
== null"
>
-
</span>
<span
v-if=
"scope.row.
tagNumber == '' || scope.row.tagNumber
== null"
>
-
</span>
<span
v-else
>
{{
scope
.
row
.
deviceCode
}}
</span>
<span
v-else
>
{{
scope
.
row
.
tagNumber
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"
设备类型"
align=
"center"
prop=
"deviceType"
>
<el-table-column
label=
"
介质"
align=
"center"
prop=
"medium"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.deviceType == '' || scope.row.deviceType == null"
>
-
</span>
<span
v-if=
"scope.row.medium == '' || scope.row.medium == null"
>
-
</span>
<span
v-if=
"scope.row.deviceType == '1'"
>
液位探测器
</span>
<span
v-else
>
{{
scope
.
row
.
medium
}}
</span>
<span
v-if=
"scope.row.deviceType == '2'"
>
气体探测器
</span>
<span
v-if=
"scope.row.deviceType == '3'"
>
液压力探测器
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"设备等级"
align=
"center"
prop=
"deviceGrade"
>
<el-table-column
label=
"所属车间"
align=
"center"
prop=
"shop"
:formatter=
"shopFormat"
/>
<el-table-column
label=
"设备分类"
align=
"center"
prop=
"classify"
:formatter=
"classifyFormat"
/>
<el-table-column
label=
"设备状态"
align=
"center"
prop=
"deviceStatus"
:formatter=
"statusFormat"
/>
<el-table-column
label=
"分级"
align=
"center"
prop=
"deviceGrade"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.deviceGrade == '' || scope.row.deviceGrade == null"
>
-
</span>
<span
v-if=
"scope.row.deviceGrade == '' || scope.row.deviceGrade == null"
>
-
</span>
<span
v-if=
"scope.row.deviceGrade == '1'"
>
一级危险源
</span>
<span
v-else
>
{{
scope
.
row
.
deviceGrade
}}
</span>
<span
v-if=
"scope.row.deviceGrade == '2'"
>
二级危险源
</span>
<span
v-if=
"scope.row.deviceGrade == '3'"
>
三级危险源
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"设备状态"
align=
"center"
prop=
"deviceStatus"
:formatter=
"statusFormat"
/>
<el-table-column
label=
"是否报废"
align=
"center"
prop=
"isCancel"
>
<el-table-column
label=
"是否报废"
align=
"center"
prop=
"isCancel"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.isCancel == '0'"
>
否
</span>
<span
v-if=
"scope.row.isCancel == '0'"
>
否
</span>
<span
v-if=
"scope.row.isCancel == '1'"
>
是
</span>
<span
v-if=
"scope.row.isCancel == '1'"
>
是
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
width=
"200"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-button
v-if=
"scope.row.isCancel=='0'"
v-if=
"scope.row.isCancel=='0'"
...
@@ -120,6 +128,13 @@
...
@@ -120,6 +128,13 @@
icon=
"el-icon-edit"
icon=
"el-icon-edit"
@
click=
"handleCancel(scope.row)"
@
click=
"handleCancel(scope.row)"
>
报废
</el-button>
>
报废
</el-button>
<el-button
v-if=
"scope.row.isCancel=='0'"
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleDetail(scope.row)"
>
详情
</el-button>
<el-button
<el-button
size=
"mini"
size=
"mini"
type=
"text"
type=
"text"
...
@@ -144,33 +159,47 @@
...
@@ -144,33 +159,47 @@
<el-row>
<el-row>
<el-col
:span=
"11"
>
<el-col
:span=
"11"
>
<el-form-item
label=
"设备名称"
prop=
"deviceName"
>
<el-form-item
label=
"设备名称"
prop=
"deviceName"
>
<el-input
v-model=
"form.deviceName"
placeholder=
"请输入设备名称"
/>
<el-input
v-model=
"form.deviceName"
placeholder=
"请输入设备名称"
:disabled=
"readOnly"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"设备
编码"
prop=
"deviceCode
"
>
<el-form-item
label=
"设备
位号"
prop=
"tagNumber
"
>
<el-input
v-model=
"form.
deviceCode"
placeholder=
"请输入设备编码
"
/>
<el-input
v-model=
"form.
tagNumber"
placeholder=
"请输入设备位号"
:disabled=
"readOnly
"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row>
<el-row>
<el-col
:span=
"11"
>
<el-col
:span=
"11"
>
<el-form-item
label=
"设备类型"
prop=
"deviceType"
>
<el-form-item
label=
"介质"
prop=
"medium"
>
<el-select
v-model=
"form.deviceType"
placeholder=
"请选择设备类型"
clearable
size=
"small"
style=
"width: 100%"
>
<el-input
v-model=
"form.medium"
placeholder=
"请输入介质"
:disabled=
"readOnly"
/>
<el-option
v-for =
"dict in typeOptions"
:key =
"dict.dictValue"
:label =
"dict.dictLabel"
:value =
"dict.dictValue"
/>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"设备等级"
prop=
"deviceGrade"
>
<el-form-item
label=
"制造厂家"
prop=
"manufactor"
>
<el-select
v-model=
"form.deviceGrade"
placeholder=
"请选择设备等级"
clearable
size=
"small"
style=
"width: 100%"
>
<el-input
v-model=
"form.manufactor"
placeholder=
"请输入规格"
:disabled=
"readOnly"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"23"
>
<el-form-item
label=
"规格"
prop=
"specifications"
>
<el-input
v-model=
"form.specifications"
placeholder=
"请输入规格"
:disabled=
"readOnly"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"23"
>
<el-form-item
label=
"技术性能"
prop=
"function"
>
<el-input
type=
"textarea"
v-model=
"form.function"
placeholder=
"请输入技术性能"
:disabled=
"readOnly"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"11"
>
<el-form-item
label=
"所属车间"
prop=
"shop"
>
<el-select
v-model=
"form.shop"
placeholder=
"请选择所属车间"
clearable
size=
"small"
style=
"width: 100%"
:disabled=
"readOnly"
>
<el-option
<el-option
v-for =
"dict in
grade
Options"
v-for =
"dict in
shop
Options"
:key =
"dict.dictValue"
:key =
"dict.dictValue"
:label =
"dict.dictLabel"
:label =
"dict.dictLabel"
:value =
"dict.dictValue"
:value =
"dict.dictValue"
...
@@ -178,43 +207,53 @@
...
@@ -178,43 +207,53 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
<el-col
:span=
"12"
>
<el-row>
<el-form-item
label=
"投运时间"
prop=
"commissionDate"
>
<!--<el-col :span="11">
<el-date-picker
clearable
size=
"small"
:disabled=
"readOnly"
<el-form-item label="是否特种设备" prop="isSpecial">
v-model=
"form.commissionDate"
<el-select v-model="form.isSpecial" placeholder="请选择是否特种设备" clearable size="small" style="width: 100%">
type=
"date"
<el-option label="否" value="0" />
value-format=
"yyyy-MM-dd"
<el-option label="是" value="1" />
placeholder=
"选择投运时间"
</el-select>
style=
"width: 100%"
>
</el-date-picker>
</el-form-item>
</el-form-item>
</el-col>
-->
</el-col>
</el-row>
</el-row>
<el-row>
<el-row>
<el-col
:span=
"11"
>
<el-col
:span=
"11"
>
<el-form-item
label=
"位号"
prop=
"tagNumber"
>
<el-form-item
label=
"设备分类"
prop=
"classify"
>
<el-input
v-model=
"form.tagNumber"
placeholder=
"请输入位号"
/>
<el-select
v-model=
"form.classify"
placeholder=
"请选择设备分类"
clearable
size=
"small"
style=
"width: 100%"
:disabled=
"readOnly"
>
<el-option
v-for =
"dict in classifyOptions"
:key =
"dict.dictValue"
:label =
"dict.dictLabel"
:value =
"dict.dictValue"
/>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"
安装位置"
prop=
"installLocation
"
>
<el-form-item
label=
"
分级"
prop=
"deviceGrade
"
>
<el-input
v-model=
"form.
installLocation"
placeholder=
"请输入安装位置
"
/>
<el-input
v-model=
"form.
deviceGrade"
placeholder=
"请输入分级"
:disabled=
"readOnly
"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row>
<el-row>
<el-col
:span=
"11"
>
<el-col
:span=
"11"
>
<el-form-item
label=
"负责人"
prop=
"responsiblePerson"
>
<el-form-item
label=
"设备状态"
prop=
"deviceStatus"
>
<el-input
v-model=
"form.responsiblePerson"
placeholder=
"请输入负责人"
/>
<el-select
v-model=
"form.deviceStatus"
placeholder=
"请选择设备状态"
clearable
size=
"small"
style=
"width: 100%"
:disabled=
"readOnly"
>
</el-form-item>
<el-option
</el-col>
v-for =
"dict in statusOptions"
<el-col
:span=
"12"
>
:key =
"dict.dictValue"
<el-form-item
label=
"负责人电话"
prop=
"responsiblePhone"
>
:label =
"dict.dictLabel"
<el-input
v-model=
"form.responsiblePhone"
placeholder=
"请输入负责人电话"
/>
:value =
"dict.dictValue"
/>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
v-show=
"!readOnly"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</div>
...
@@ -240,7 +279,7 @@
...
@@ -240,7 +279,7 @@
<em>
点击上传
</em>
<em>
点击上传
</em>
</div>
</div>
<div
class=
"el-upload__tip"
slot=
"tip"
>
<div
class=
"el-upload__tip"
slot=
"tip"
>
<el-checkbox
v-model=
"upload.updateSupport"
/>
是否更新已经存在的设备数据
<!-- <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的设备数据-->
<el-link
type=
"info"
style=
"font-size:12px"
@
click=
"importTemplate"
>
下载模板
</el-link>
<el-link
type=
"info"
style=
"font-size:12px"
@
click=
"importTemplate"
>
下载模板
</el-link>
</div>
</div>
<div
class=
"el-upload__tip"
style=
"color:red"
slot=
"tip"
>
提示:仅允许导入“xls”或“xlsx”格式文件!
</div>
<div
class=
"el-upload__tip"
style=
"color:red"
slot=
"tip"
>
提示:仅允许导入“xls”或“xlsx”格式文件!
</div>
...
@@ -279,29 +318,29 @@ export default {
...
@@ -279,29 +318,29 @@ export default {
total
:
0
,
total
:
0
,
// 设备信息管理表格数据
// 设备信息管理表格数据
deviceInfoList
:
[],
deviceInfoList
:
[],
// 设备类型数据字典
typeOptions
:
[],
// 设备状态数据字典
// 设备状态数据字典
statusOptions
:
[],
statusOptions
:
[],
// 设备等级数据字典
// 所属车间数据字典
gradeOptions
:
[],
shopOptions
:
[],
// 设备分类数据字典
classifyOptions
:
[],
// 弹出层标题
// 弹出层标题
title
:
""
,
title
:
""
,
// 是否显示弹出层
// 是否显示弹出层
open
:
false
,
open
:
false
,
readOnly
:
false
,
// 查询参数
// 查询参数
queryParams
:
{
queryParams
:
{
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
deviceName
:
null
,
deviceName
:
null
,
deviceCode
:
null
,
deviceStatus
:
null
,
deviceStatus
:
null
,
deviceType
:
null
,
deviceType
:
null
,
tagNumber
:
null
,
tagNumber
:
null
,
shop
:
null
,
deviceGrade
:
null
,
deviceGrade
:
null
,
isSpecial
:
"0"
,
isSpecial
:
"0"
,
isCancel
:
null
,
isCancel
:
null
,
responsiblePhone
:
null
,
},
},
// 设备导入参数
// 设备导入参数
upload
:
{
upload
:
{
...
@@ -325,45 +364,42 @@ export default {
...
@@ -325,45 +364,42 @@ export default {
deviceName
:
[
deviceName
:
[
{
required
:
true
,
message
:
"请输入设备名称"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"请输入设备名称"
,
trigger
:
"blur"
}
],
],
/*deviceCode
: [
shop
:
[
{ required: true, message: "请
输入设备编号
", trigger: "blur" }
{
required
:
true
,
message
:
"请
选择所属车间
"
,
trigger
:
"blur"
}
],
],
deviceType: [
classify
:
[
{ required: true, message: "请选择设备类型", trigger: "blur" }
{
required
:
true
,
message
:
"请选择设备分类"
,
trigger
:
"blur"
}
],
deviceStatus
:
[
{
required
:
true
,
message
:
"请选择设备状态"
,
trigger
:
"blur"
}
],
],
deviceGrade: [
{ required: true, message: "请选择设备等级", trigger: "blur" }
],*/
/*isSpecial: [
{ required: true, message: "请选择是否特种装备", trigger: "blur" }
],*/
}
}
};
};
},
},
created
()
{
created
()
{
this
.
getList
();
this
.
getList
();
this
.
getDicts
(
"t_
device_type
"
).
then
(
response
=>
{
this
.
getDicts
(
"t_
classify
"
).
then
(
response
=>
{
this
.
type
Options
=
response
.
data
;
this
.
classify
Options
=
response
.
data
;
})
})
this
.
getDicts
(
"t_device_status"
).
then
(
response
=>
{
this
.
getDicts
(
"t_device_status"
).
then
(
response
=>
{
this
.
statusOptions
=
response
.
data
;
this
.
statusOptions
=
response
.
data
;
})
})
this
.
getDicts
(
"t_
device_grade
"
).
then
(
response
=>
{
this
.
getDicts
(
"t_
shop
"
).
then
(
response
=>
{
this
.
grade
Options
=
response
.
data
;
this
.
shop
Options
=
response
.
data
;
})
})
},
},
methods
:
{
methods
:
{
// 设备
类型
// 设备
分类
type
Format
(
row
,
column
)
{
classify
Format
(
row
,
column
)
{
return
this
.
selectDictLabel
(
this
.
typeOptions
,
row
.
deviceType
);
return
this
.
selectDictLabel
(
this
.
classifyOptions
,
row
.
classify
);
},
},
// 设备状态
// 设备状态
statusFormat
(
row
,
column
)
{
statusFormat
(
row
,
column
)
{
return
this
.
selectDictLabel
(
this
.
statusOptions
,
row
.
deviceStatus
);
return
this
.
selectDictLabel
(
this
.
statusOptions
,
row
.
deviceStatus
);
},
},
//
设备等级
//
所属车间
grade
Format
(
row
,
column
)
{
shop
Format
(
row
,
column
)
{
return
this
.
selectDictLabel
(
this
.
gradeOptions
,
row
.
deviceGrade
);
return
this
.
selectDictLabel
(
this
.
shopOptions
,
row
.
shop
);
},
},
/** 查询设备信息管理列表 */
/** 查询设备信息管理列表 */
getList
()
{
getList
()
{
...
@@ -384,15 +420,18 @@ export default {
...
@@ -384,15 +420,18 @@ export default {
this
.
form
=
{
this
.
form
=
{
id
:
null
,
id
:
null
,
deviceName
:
null
,
deviceName
:
null
,
deviceCode
:
null
,
deviceStatus
:
null
,
deviceStatus
:
"0"
,
deviceType
:
null
,
deviceType
:
null
,
tagNumber
:
null
,
tagNumber
:
null
,
deviceGrade
:
null
,
deviceGrade
:
null
,
installLocation
:
null
,
classify
:
null
,
specifications
:
null
,
function
:
null
,
medium
:
null
,
manufactor
:
null
,
shop
:
null
,
isSpecial
:
"0"
,
isSpecial
:
"0"
,
responsiblePerson
:
null
,
commissionDate
:
null
,
responsiblePhone
:
null
,
createTime
:
null
,
createTime
:
null
,
updateTime
:
null
,
updateTime
:
null
,
isDel
:
null
isDel
:
null
...
@@ -411,12 +450,14 @@ export default {
...
@@ -411,12 +450,14 @@ export default {
},
},
/** 新增按钮操作 */
/** 新增按钮操作 */
handleAdd
()
{
handleAdd
()
{
this
.
readOnly
=
false
;
this
.
reset
();
this
.
reset
();
this
.
open
=
true
;
this
.
open
=
true
;
this
.
title
=
"添加设备信息"
;
this
.
title
=
"添加设备信息"
;
},
},
/** 修改按钮操作 */
/** 修改按钮操作 */
handleUpdate
(
row
)
{
handleUpdate
(
row
)
{
this
.
readOnly
=
false
;
this
.
reset
();
this
.
reset
();
const
id
=
row
.
id
||
this
.
ids
const
id
=
row
.
id
||
this
.
ids
getDeviceInfo
(
id
).
then
(
response
=>
{
getDeviceInfo
(
id
).
then
(
response
=>
{
...
@@ -461,10 +502,20 @@ export default {
...
@@ -461,10 +502,20 @@ export default {
this
.
msgSuccess
(
"报废成功"
);
this
.
msgSuccess
(
"报废成功"
);
}).
catch
(()
=>
{});
}).
catch
(()
=>
{});
},
},
/** 详情按钮操作 */
handleDetail
(
row
)
{
this
.
readOnly
=
true
;
this
.
reset
();
getDeviceInfo
(
row
.
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"设备信息详情"
;
});
},
/** 删除按钮操作 */
/** 删除按钮操作 */
handleDelete
(
row
)
{
handleDelete
(
row
)
{
// const ids = row.id || this.ids;
// const ids = row.id || this.ids;
this
.
$confirm
(
'是否确认删除
设备编号为"'
+
row
.
deviceCode
+
'"的数据项
?'
,
"警告"
,
{
this
.
$confirm
(
'是否确认删除
"'
+
row
.
deviceName
+
'"
?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
type
:
"warning"
...
@@ -493,7 +544,7 @@ export default {
...
@@ -493,7 +544,7 @@ export default {
},
},
/** 导入按钮操作 */
/** 导入按钮操作 */
handleImport
()
{
handleImport
()
{
this
.
upload
.
title
=
"
用户
导入"
;
this
.
upload
.
title
=
"
设备
导入"
;
this
.
upload
.
open
=
true
;
this
.
upload
.
open
=
true
;
},
},
/** 下载模板操作 */
/** 下载模板操作 */
...
...
danger-manage-web/src/views/deviceManagement/specialDeviceInfo/index.vue
View file @
2d837d7d
...
@@ -10,16 +10,16 @@
...
@@ -10,16 +10,16 @@
@
keyup
.
enter
.
native=
"handleQuery"
@
keyup
.
enter
.
native=
"handleQuery"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"设备
编码"
prop=
"deviceCode
"
>
<el-form-item
label=
"设备
位号"
prop=
"tagNumber
"
>
<el-input
<el-input
v-model=
"queryParams.
deviceCode
"
v-model=
"queryParams.
tagNumber
"
placeholder=
"请输入设备
编码
"
placeholder=
"请输入设备
位号
"
clearable
clearable
size=
"small"
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
@
keyup
.
enter
.
native=
"handleQuery"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"设备类型"
prop=
"deviceType"
>
<
!--
<
el-form-item
label=
"设备类型"
prop=
"deviceType"
>
<el-select
v-model=
"queryParams.deviceType"
placeholder=
"请选择设备类型"
clearable
size=
"small"
>
<el-select
v-model=
"queryParams.deviceType"
placeholder=
"请选择设备类型"
clearable
size=
"small"
>
<el-option
<el-option
v-for =
"dict in typeOptions"
v-for =
"dict in typeOptions"
...
@@ -28,6 +28,16 @@
...
@@ -28,6 +28,16 @@
:value =
"dict.dictValue"
:value =
"dict.dictValue"
/>
/>
</el-select>
</el-select>
</el-form-item>
-->
<el-form-item
label=
"所属车间"
prop=
"shop"
>
<el-select
v-model=
"queryParams.shop"
placeholder=
"请选择所属车间"
clearable
size=
"small"
>
<el-option
v-for =
"dict in shopOptions"
:key =
"dict.dictValue"
:label =
"dict.dictLabel"
:value =
"dict.dictValue"
/>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"是否报废"
prop=
"isCancel"
>
<el-form-item
label=
"是否报废"
prop=
"isCancel"
>
<el-select
v-model=
"queryParams.isCancel"
placeholder=
"请选择是否报废"
clearable
size=
"small"
>
<el-select
v-model=
"queryParams.isCancel"
placeholder=
"请选择是否报废"
clearable
size=
"small"
>
...
@@ -75,36 +85,35 @@
...
@@ -75,36 +85,35 @@
<el-table
v-loading=
"loading"
:data=
"deviceInfoList"
>
<el-table
v-loading=
"loading"
:data=
"deviceInfoList"
>
<el-table-column
label=
"设备名称"
align=
"center"
prop=
"deviceName"
/>
<el-table-column
label=
"设备名称"
align=
"center"
prop=
"deviceName"
/>
<el-table-column
label=
"设备
编码"
align=
"center"
prop=
"deviceCode
"
>
<el-table-column
label=
"设备
位号"
align=
"center"
prop=
"tagNumber
"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.
deviceCode == '' || scope.row.deviceCode
== null"
>
-
</span>
<span
v-if=
"scope.row.
tagNumber == '' || scope.row.tagNumber
== null"
>
-
</span>
<span
v-else
>
{{
scope
.
row
.
deviceCode
}}
</span>
<span
v-else
>
{{
scope
.
row
.
tagNumber
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"
设备类型"
align=
"center"
prop=
"deviceType"
>
<el-table-column
label=
"
介质"
align=
"center"
prop=
"medium"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.deviceType == '' || scope.row.deviceType == null"
>
-
</span>
<span
v-if=
"scope.row.medium == '' || scope.row.medium == null"
>
-
</span>
<span
v-if=
"scope.row.deviceType == '1'"
>
液位探测器
</span>
<span
v-else
>
{{
scope
.
row
.
medium
}}
</span>
<span
v-if=
"scope.row.deviceType == '2'"
>
气体探测器
</span>
<span
v-if=
"scope.row.deviceType == '3'"
>
液压力探测器
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"设备等级"
align=
"center"
prop=
"deviceGrade"
>
<el-table-column
label=
"所属车间"
align=
"center"
prop=
"shop"
:formatter=
"shopFormat"
/>
<el-table-column
label=
"设备类型"
align=
"center"
prop=
"deviceType"
:formatter=
"typeFormat"
width=
"200"
/>
<el-table-column
label=
"设备分类"
align=
"center"
prop=
"classify"
:formatter=
"classifyFormat"
/>
<el-table-column
label=
"设备状态"
align=
"center"
prop=
"deviceStatus"
:formatter=
"statusFormat"
/>
<el-table-column
label=
"分级"
align=
"center"
prop=
"deviceGrade"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.deviceGrade == '' || scope.row.deviceGrade == null"
>
-
</span>
<span
v-if=
"scope.row.deviceGrade == '' || scope.row.deviceGrade == null"
>
-
</span>
<span
v-if=
"scope.row.deviceGrade == '1'"
>
一级危险源
</span>
<span
v-else
>
{{
scope
.
row
.
deviceGrade
}}
</span>
<span
v-if=
"scope.row.deviceGrade == '2'"
>
二级危险源
</span>
<span
v-if=
"scope.row.deviceGrade == '3'"
>
三级危险源
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"设备状态"
align=
"center"
prop=
"deviceStatus"
:formatter=
"statusFormat"
/>
<el-table-column
label=
"是否报废"
align=
"center"
prop=
"isCancel"
>
<el-table-column
label=
"是否报废"
align=
"center"
prop=
"isCancel"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.isCancel == '0'"
>
否
</span>
<span
v-if=
"scope.row.isCancel == '0'"
>
否
</span>
<span
v-if=
"scope.row.isCancel == '1'"
>
是
</span>
<span
v-if=
"scope.row.isCancel == '1'"
>
是
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
width=
"200"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-button
v-if=
"scope.row.isCancel=='0'"
v-if=
"scope.row.isCancel=='0'"
...
@@ -120,6 +129,13 @@
...
@@ -120,6 +129,13 @@
icon=
"el-icon-edit"
icon=
"el-icon-edit"
@
click=
"handleCancel(scope.row)"
@
click=
"handleCancel(scope.row)"
>
报废
</el-button>
>
报废
</el-button>
<el-button
v-if=
"scope.row.isCancel=='0'"
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleDetail(scope.row)"
>
详情
</el-button>
<el-button
<el-button
size=
"mini"
size=
"mini"
type=
"text"
type=
"text"
...
@@ -144,21 +160,47 @@
...
@@ -144,21 +160,47 @@
<el-row>
<el-row>
<el-col
:span=
"11"
>
<el-col
:span=
"11"
>
<el-form-item
label=
"设备名称"
prop=
"deviceName"
>
<el-form-item
label=
"设备名称"
prop=
"deviceName"
>
<el-input
v-model=
"form.deviceName"
placeholder=
"请输入设备名称"
/>
<el-input
v-model=
"form.deviceName"
placeholder=
"请输入设备名称"
:disabled=
"readOnly"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"设备
编码"
prop=
"deviceCode
"
>
<el-form-item
label=
"设备
位号"
prop=
"tagNumber
"
>
<el-input
v-model=
"form.
deviceCode"
placeholder=
"请输入设备编码
"
/>
<el-input
v-model=
"form.
tagNumber"
placeholder=
"请输入设备位号"
:disabled=
"readOnly
"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row>
<el-row>
<el-col
:span=
"11"
>
<el-col
:span=
"11"
>
<el-form-item
label=
"设备类型"
prop=
"deviceType"
>
<el-form-item
label=
"介质"
prop=
"medium"
>
<el-select
v-model=
"form.deviceType"
placeholder=
"请选择设备类型"
clearable
size=
"small"
style=
"width: 100%"
>
<el-input
v-model=
"form.medium"
placeholder=
"请输入介质"
:disabled=
"readOnly"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"制造厂家"
prop=
"manufactor"
>
<el-input
v-model=
"form.manufactor"
placeholder=
"请输入规格"
:disabled=
"readOnly"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"23"
>
<el-form-item
label=
"规格"
prop=
"specifications"
>
<el-input
v-model=
"form.specifications"
placeholder=
"请输入规格"
:disabled=
"readOnly"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"23"
>
<el-form-item
label=
"技术性能"
prop=
"function"
>
<el-input
type=
"textarea"
v-model=
"form.function"
placeholder=
"请输入技术性能"
:disabled=
"readOnly"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"11"
>
<el-form-item
label=
"所属车间"
prop=
"shop"
>
<el-select
v-model=
"form.shop"
placeholder=
"请选择所属车间"
clearable
size=
"small"
style=
"width: 100%"
:disabled=
"readOnly"
>
<el-option
<el-option
v-for =
"dict in
type
Options"
v-for =
"dict in
shop
Options"
:key =
"dict.dictValue"
:key =
"dict.dictValue"
:label =
"dict.dictLabel"
:label =
"dict.dictLabel"
:value =
"dict.dictValue"
:value =
"dict.dictValue"
...
@@ -167,10 +209,10 @@
...
@@ -167,10 +209,10 @@
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"设备
等级"
prop=
"deviceGrad
e"
>
<el-form-item
label=
"设备
类型"
prop=
"deviceTyp
e"
>
<el-select
v-model=
"form.device
Grade"
placeholder=
"请选择设备等级"
clearable
size=
"small"
style=
"width: 100%
"
>
<el-select
v-model=
"form.device
Type"
placeholder=
"请选择设备类型"
clearable
size=
"small"
style=
"width: 100%"
:disabled=
"readOnly
"
>
<el-option
<el-option
v-for =
"dict in
grad
eOptions"
v-for =
"dict in
typ
eOptions"
:key =
"dict.dictValue"
:key =
"dict.dictValue"
:label =
"dict.dictLabel"
:label =
"dict.dictLabel"
:value =
"dict.dictValue"
:value =
"dict.dictValue"
...
@@ -179,42 +221,52 @@
...
@@ -179,42 +221,52 @@
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row>
<!--<el-col :span="11">
<el-form-item label="是否特种设备" prop="isSpecial">
<el-select v-model="form.isSpecial" placeholder="请选择是否特种设备" clearable size="small" style="width: 100%">
<el-option label="否" value="0" />
<el-option label="是" value="1" />
</el-select>
</el-form-item>
</el-col>-->
</el-row>
<el-row>
<el-row>
<el-col
:span=
"11"
>
<el-col
:span=
"11"
>
<el-form-item
label=
"位号"
prop=
"tagNumber"
>
<el-form-item
label=
"设备分类"
prop=
"classify"
>
<el-input
v-model=
"form.tagNumber"
placeholder=
"请输入位号"
/>
<el-select
v-model=
"form.classify"
placeholder=
"请选择设备分类"
clearable
size=
"small"
style=
"width: 100%"
:disabled=
"readOnly"
>
<el-option
v-for =
"dict in classifyOptions"
:key =
"dict.dictValue"
:label =
"dict.dictLabel"
:value =
"dict.dictValue"
/>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"安装位置"
prop=
"installLocation"
>
<el-form-item
label=
"投运时间"
prop=
"commissionDate"
>
<el-input
v-model=
"form.installLocation"
placeholder=
"请输入安装位置"
/>
<el-date-picker
clearable
size=
"small"
:disabled=
"readOnly"
v-model=
"form.commissionDate"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"选择投运时间"
style=
"width: 100%"
>
</el-date-picker>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row>
<el-row>
<el-col
:span=
"11"
>
<el-col
:span=
"11"
>
<el-form-item
label=
"负责人"
prop=
"responsiblePerson"
>
<el-form-item
label=
"设备状态"
prop=
"deviceStatus"
>
<el-input
v-model=
"form.responsiblePerson"
placeholder=
"请输入负责人"
/>
<el-select
v-model=
"form.deviceStatus"
placeholder=
"请选择设备状态"
clearable
size=
"small"
style=
"width: 100%"
:disabled=
"readOnly"
>
<el-option
v-for =
"dict in statusOptions"
:key =
"dict.dictValue"
:label =
"dict.dictLabel"
:value =
"dict.dictValue"
/>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"
负责人电话"
prop=
"responsiblePhon
e"
>
<el-form-item
label=
"
分级"
prop=
"deviceGrad
e"
>
<el-input
v-model=
"form.
responsiblePhone"
placeholder=
"请输入负责人电话
"
/>
<el-input
v-model=
"form.
deviceGrade"
placeholder=
"请输入分级"
:disabled=
"readOnly
"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
v-show=
"!readOnly"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</div>
...
@@ -240,7 +292,7 @@
...
@@ -240,7 +292,7 @@
<em>
点击上传
</em>
<em>
点击上传
</em>
</div>
</div>
<div
class=
"el-upload__tip"
slot=
"tip"
>
<div
class=
"el-upload__tip"
slot=
"tip"
>
<el-checkbox
v-model=
"upload.updateSupport"
/>
是否更新已经存在的设备数据
<!-- <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的设备数据-->
<el-link
type=
"info"
style=
"font-size:12px"
@
click=
"importTemplate"
>
下载模板
</el-link>
<el-link
type=
"info"
style=
"font-size:12px"
@
click=
"importTemplate"
>
下载模板
</el-link>
</div>
</div>
<div
class=
"el-upload__tip"
style=
"color:red"
slot=
"tip"
>
提示:仅允许导入“xls”或“xlsx”格式文件!
</div>
<div
class=
"el-upload__tip"
style=
"color:red"
slot=
"tip"
>
提示:仅允许导入“xls”或“xlsx”格式文件!
</div>
...
@@ -283,25 +335,27 @@ export default {
...
@@ -283,25 +335,27 @@ export default {
typeOptions
:
[],
typeOptions
:
[],
// 设备状态数据字典
// 设备状态数据字典
statusOptions
:
[],
statusOptions
:
[],
// 设备等级数据字典
// 所属车间数据字典
gradeOptions
:
[],
shopOptions
:
[],
// 设备分类数据字典
classifyOptions
:
[],
// 弹出层标题
// 弹出层标题
title
:
""
,
title
:
""
,
// 是否显示弹出层
// 是否显示弹出层
open
:
false
,
open
:
false
,
readOnly
:
false
,
// 查询参数
// 查询参数
queryParams
:
{
queryParams
:
{
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
deviceName
:
null
,
deviceName
:
null
,
deviceCode
:
null
,
deviceStatus
:
null
,
deviceStatus
:
null
,
deviceType
:
null
,
deviceType
:
null
,
tagNumber
:
null
,
tagNumber
:
null
,
shop
:
null
,
deviceGrade
:
null
,
deviceGrade
:
null
,
isSpecial
:
"1"
,
isSpecial
:
"1"
,
isCancel
:
null
,
isCancel
:
null
,
responsiblePhone
:
null
,
},
},
// 设备导入参数
// 设备导入参数
upload
:
{
upload
:
{
...
@@ -325,18 +379,18 @@ export default {
...
@@ -325,18 +379,18 @@ export default {
deviceName
:
[
deviceName
:
[
{
required
:
true
,
message
:
"请输入设备名称"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"请输入设备名称"
,
trigger
:
"blur"
}
],
],
/*deviceCode: [
shop
:
[
{ required: true, message: "请输入设备编号", trigger: "blur" }
{
required
:
true
,
message
:
"请选择所属车间"
,
trigger
:
"blur"
}
],
classify
:
[
{
required
:
true
,
message
:
"请选择设备分类"
,
trigger
:
"blur"
}
],
deviceStatus
:
[
{
required
:
true
,
message
:
"请选择设备状态"
,
trigger
:
"blur"
}
],
],
deviceType
:
[
deviceType
:
[
{
required
:
true
,
message
:
"请选择设备类型"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"请选择设备类型"
,
trigger
:
"blur"
}
],
],
deviceGrade: [
{ required: true, message: "请选择设备等级", trigger: "blur" }
],*/
/*isSpecial: [
{ required: true, message: "请选择是否特种装备", trigger: "blur" }
],*/
}
}
};
};
},
},
...
@@ -351,6 +405,12 @@ export default {
...
@@ -351,6 +405,12 @@ export default {
this
.
getDicts
(
"t_device_grade"
).
then
(
response
=>
{
this
.
getDicts
(
"t_device_grade"
).
then
(
response
=>
{
this
.
gradeOptions
=
response
.
data
;
this
.
gradeOptions
=
response
.
data
;
})
})
this
.
getDicts
(
"t_classify"
).
then
(
response
=>
{
this
.
classifyOptions
=
response
.
data
;
})
this
.
getDicts
(
"t_shop"
).
then
(
response
=>
{
this
.
shopOptions
=
response
.
data
;
})
},
},
methods
:
{
methods
:
{
// 设备类型
// 设备类型
...
@@ -361,9 +421,13 @@ export default {
...
@@ -361,9 +421,13 @@ export default {
statusFormat
(
row
,
column
)
{
statusFormat
(
row
,
column
)
{
return
this
.
selectDictLabel
(
this
.
statusOptions
,
row
.
deviceStatus
);
return
this
.
selectDictLabel
(
this
.
statusOptions
,
row
.
deviceStatus
);
},
},
// 设备等级
// 设备分类
gradeFormat
(
row
,
column
)
{
classifyFormat
(
row
,
column
)
{
return
this
.
selectDictLabel
(
this
.
gradeOptions
,
row
.
deviceGrade
);
return
this
.
selectDictLabel
(
this
.
classifyOptions
,
row
.
classify
);
},
// 所属车间
shopFormat
(
row
,
column
)
{
return
this
.
selectDictLabel
(
this
.
shopOptions
,
row
.
shop
);
},
},
/** 查询设备信息管理列表 */
/** 查询设备信息管理列表 */
getList
()
{
getList
()
{
...
@@ -384,15 +448,18 @@ export default {
...
@@ -384,15 +448,18 @@ export default {
this
.
form
=
{
this
.
form
=
{
id
:
null
,
id
:
null
,
deviceName
:
null
,
deviceName
:
null
,
deviceCode
:
null
,
deviceStatus
:
null
,
deviceStatus
:
"0"
,
deviceType
:
null
,
deviceType
:
null
,
tagNumber
:
null
,
tagNumber
:
null
,
deviceGrade
:
null
,
deviceGrade
:
null
,
installLocation
:
null
,
classify
:
null
,
specifications
:
null
,
function
:
null
,
medium
:
null
,
manufactor
:
null
,
shop
:
null
,
isSpecial
:
"1"
,
isSpecial
:
"1"
,
responsiblePerson
:
null
,
commissionDate
:
null
,
responsiblePhone
:
null
,
createTime
:
null
,
createTime
:
null
,
updateTime
:
null
,
updateTime
:
null
,
isDel
:
null
isDel
:
null
...
@@ -411,18 +478,20 @@ export default {
...
@@ -411,18 +478,20 @@ export default {
},
},
/** 新增按钮操作 */
/** 新增按钮操作 */
handleAdd
()
{
handleAdd
()
{
this
.
readOnly
=
false
;
this
.
reset
();
this
.
reset
();
this
.
open
=
true
;
this
.
open
=
true
;
this
.
title
=
"添加设备信息"
;
this
.
title
=
"添加
特种
设备信息"
;
},
},
/** 修改按钮操作 */
/** 修改按钮操作 */
handleUpdate
(
row
)
{
handleUpdate
(
row
)
{
this
.
readOnly
=
false
;
this
.
reset
();
this
.
reset
();
const
id
=
row
.
id
||
this
.
ids
const
id
=
row
.
id
||
this
.
ids
getDeviceInfo
(
id
).
then
(
response
=>
{
getDeviceInfo
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
open
=
true
;
this
.
title
=
"修改设备信息"
;
this
.
title
=
"修改
特种
设备信息"
;
});
});
},
},
/** 提交按钮 */
/** 提交按钮 */
...
@@ -461,10 +530,20 @@ export default {
...
@@ -461,10 +530,20 @@ export default {
this
.
msgSuccess
(
"报废成功"
);
this
.
msgSuccess
(
"报废成功"
);
}).
catch
(()
=>
{});
}).
catch
(()
=>
{});
},
},
/** 详情按钮操作 */
handleDetail
(
row
)
{
this
.
readOnly
=
true
;
this
.
reset
();
getDeviceInfo
(
row
.
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"特种设备信息详情"
;
});
},
/** 删除按钮操作 */
/** 删除按钮操作 */
handleDelete
(
row
)
{
handleDelete
(
row
)
{
// const ids = row.id || this.ids;
// const ids = row.id || this.ids;
this
.
$confirm
(
'是否确认删除
设备编号为"'
+
row
.
deviceCode
+
'"的数据项
?'
,
"警告"
,
{
this
.
$confirm
(
'是否确认删除
"'
+
row
.
deviceName
+
'"
?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
type
:
"warning"
...
@@ -479,7 +558,7 @@ export default {
...
@@ -479,7 +558,7 @@ export default {
/** 导出按钮操作 */
/** 导出按钮操作 */
handleExport
()
{
handleExport
()
{
const
queryParams
=
this
.
queryParams
;
const
queryParams
=
this
.
queryParams
;
this
.
$confirm
(
'是否确认导出所有设备信息管理数据项?'
,
"警告"
,
{
this
.
$confirm
(
'是否确认导出所有
特种
设备信息管理数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
type
:
"warning"
...
@@ -493,7 +572,7 @@ export default {
...
@@ -493,7 +572,7 @@ export default {
},
},
/** 导入按钮操作 */
/** 导入按钮操作 */
handleImport
()
{
handleImport
()
{
this
.
upload
.
title
=
"
用户
导入"
;
this
.
upload
.
title
=
"
特种设备
导入"
;
this
.
upload
.
open
=
true
;
this
.
upload
.
open
=
true
;
},
},
/** 下载模板操作 */
/** 下载模板操作 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment