Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
Z
zhmes-agecal
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
耿迪迪
zhmes-agecal
Commits
face7351
Commit
face7351
authored
Aug 22, 2025
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 层配置调整
parent
16d19b6a
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
441 additions
and
40 deletions
+441
-40
TStoreyInfo.java
...m/src/main/java/com/zehong/system/domain/TStoreyInfo.java
+33
-0
TEquipmentInfoMapper.java
...n/java/com/zehong/system/mapper/TEquipmentInfoMapper.java
+0
-1
TStoreyInfoServiceImpl.java
...om/zehong/system/service/impl/TStoreyInfoServiceImpl.java
+39
-1
TStoreyInfoMapper.xml
...em/src/main/resources/mapper/system/TStoreyInfoMapper.xml
+29
-12
RoboticArm.vue
zhmes-agecal-web/src/views/screen/components/RoboticArm.vue
+0
-25
index.vue
zhmes-agecal-web/src/views/storey/index.vue
+339
-0
vue.config.js
zhmes-agecal-web/vue.config.js
+1
-1
No files found.
zhmes-agecal-system/src/main/java/com/zehong/system/domain/TStoreyInfo.java
View file @
face7351
...
@@ -35,6 +35,9 @@ public class TStoreyInfo extends BaseEntity
...
@@ -35,6 +35,9 @@ public class TStoreyInfo extends BaseEntity
@Excel
(
name
=
"所属老化柜ID"
)
@Excel
(
name
=
"所属老化柜ID"
)
private
Long
fEquipmentId
;
private
Long
fEquipmentId
;
/** 设备编号 */
private
String
fEquipmentCode
;
/** 层编号 */
/** 层编号 */
@Excel
(
name
=
"层编号"
)
@Excel
(
name
=
"层编号"
)
private
String
fStoreyCode
;
private
String
fStoreyCode
;
...
@@ -82,6 +85,12 @@ public class TStoreyInfo extends BaseEntity
...
@@ -82,6 +85,12 @@ public class TStoreyInfo extends BaseEntity
@Excel
(
name
=
"报警时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"报警时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
fAlarmTime
;
private
Date
fAlarmTime
;
/** 投料指令 */
private
String
feedingCommand
;
/** 退料指令 */
private
String
blankingCommand
;
public
String
getfTrayCode
()
{
public
String
getfTrayCode
()
{
return
fTrayCode
;
return
fTrayCode
;
}
}
...
@@ -191,6 +200,30 @@ public class TStoreyInfo extends BaseEntity
...
@@ -191,6 +200,30 @@ public class TStoreyInfo extends BaseEntity
return
fAlarmTime
;
return
fAlarmTime
;
}
}
public
String
getFeedingCommand
()
{
return
feedingCommand
;
}
public
void
setFeedingCommand
(
String
feedingCommand
)
{
this
.
feedingCommand
=
feedingCommand
;
}
public
String
getBlankingCommand
()
{
return
blankingCommand
;
}
public
void
setBlankingCommand
(
String
blankingCommand
)
{
this
.
blankingCommand
=
blankingCommand
;
}
public
String
getfEquipmentCode
()
{
return
fEquipmentCode
;
}
public
void
setfEquipmentCode
(
String
fEquipmentCode
)
{
this
.
fEquipmentCode
=
fEquipmentCode
;
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/mapper/TEquipmentInfoMapper.java
View file @
face7351
...
@@ -19,7 +19,6 @@ public interface TEquipmentInfoMapper
...
@@ -19,7 +19,6 @@ public interface TEquipmentInfoMapper
* @return 生产设备信息
* @return 生产设备信息
*/
*/
public
TEquipmentInfo
selectTEquipmentInfoById
(
Long
fEquipmentId
);
public
TEquipmentInfo
selectTEquipmentInfoById
(
Long
fEquipmentId
);
public
TEquipmentInfo
selectTEquipmentInfoByCode
(
String
fEquipmentCode
);
public
TEquipmentInfo
selectTEquipmentInfoByCode
(
String
fEquipmentCode
);
/**
/**
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/service/impl/TStoreyInfoServiceImpl.java
View file @
face7351
package
com
.
zehong
.
system
.
service
.
impl
;
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.List
;
import
java.util.List
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.StringUtils
;
import
com.zehong.system.domain.TEquipmentInfo
;
import
com.zehong.system.mapper.TEquipmentInfoMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TStoreyInfoMapper
;
import
com.zehong.system.mapper.TStoreyInfoMapper
;
import
com.zehong.system.domain.TStoreyInfo
;
import
com.zehong.system.domain.TStoreyInfo
;
import
com.zehong.system.service.ITStoreyInfoService
;
import
com.zehong.system.service.ITStoreyInfoService
;
import
javax.annotation.Resource
;
/**
/**
* 老化层信息Service业务层处理
* 老化层信息Service业务层处理
*
*
...
@@ -16,9 +23,12 @@ import com.zehong.system.service.ITStoreyInfoService;
...
@@ -16,9 +23,12 @@ import com.zehong.system.service.ITStoreyInfoService;
@Service
@Service
public
class
TStoreyInfoServiceImpl
implements
ITStoreyInfoService
public
class
TStoreyInfoServiceImpl
implements
ITStoreyInfoService
{
{
@
Autowired
@
Resource
private
TStoreyInfoMapper
tStoreyInfoMapper
;
private
TStoreyInfoMapper
tStoreyInfoMapper
;
@Resource
private
TEquipmentInfoMapper
equipmentInfoMapper
;
/**
/**
* 查询老化层信息
* 查询老化层信息
*
*
...
@@ -74,9 +84,35 @@ public class TStoreyInfoServiceImpl implements ITStoreyInfoService
...
@@ -74,9 +84,35 @@ public class TStoreyInfoServiceImpl implements ITStoreyInfoService
@Override
@Override
public
int
insertTStoreyInfo
(
TStoreyInfo
tStoreyInfo
)
public
int
insertTStoreyInfo
(
TStoreyInfo
tStoreyInfo
)
{
{
check
(
tStoreyInfo
);
tStoreyInfo
.
setfCreateTime
(
DateUtils
.
getNowDate
());
return
tStoreyInfoMapper
.
insertTStoreyInfo
(
tStoreyInfo
);
return
tStoreyInfoMapper
.
insertTStoreyInfo
(
tStoreyInfo
);
}
}
private
void
check
(
TStoreyInfo
tStoreyInfo
)
{
if
(
StringUtils
.
isBlank
(
tStoreyInfo
.
getfStoreyCode
())){
throw
new
RuntimeException
(
"层编号不能为空"
);
}
if
(
tStoreyInfo
.
getfStoreyCode
()
!=
null
&&
tStoreyInfo
.
getfStoreyId
()
==
null
)
{
TStoreyInfo
storeyInfo
=
tStoreyInfoMapper
.
selectTStoreyInfoByCode
(
tStoreyInfo
.
getfStoreyCode
());
if
(
storeyInfo
!=
null
)
{
throw
new
RuntimeException
(
"层编号已存在"
);
}
}
if
(
StringUtils
.
isBlank
(
tStoreyInfo
.
getfEquipmentCode
())){
throw
new
RuntimeException
(
"柜编号不许为空"
);
}
TEquipmentInfo
tEquipmentInfo
=
equipmentInfoMapper
.
selectTEquipmentInfoByCode
(
tStoreyInfo
.
getfEquipmentCode
());
if
(
tEquipmentInfo
==
null
)
{
throw
new
RuntimeException
(
"柜编号不存在"
);
}
tStoreyInfo
.
setfEquipmentId
(
tEquipmentInfo
.
getfEquipmentId
());
}
/**
/**
* 修改老化层信息
* 修改老化层信息
*
*
...
@@ -86,6 +122,8 @@ public class TStoreyInfoServiceImpl implements ITStoreyInfoService
...
@@ -86,6 +122,8 @@ public class TStoreyInfoServiceImpl implements ITStoreyInfoService
@Override
@Override
public
int
updateTStoreyInfo
(
TStoreyInfo
tStoreyInfo
)
public
int
updateTStoreyInfo
(
TStoreyInfo
tStoreyInfo
)
{
{
check
(
tStoreyInfo
);
tStoreyInfo
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
tStoreyInfoMapper
.
updateTStoreyInfo
(
tStoreyInfo
);
return
tStoreyInfoMapper
.
updateTStoreyInfo
(
tStoreyInfo
);
}
}
...
...
zhmes-agecal-system/src/main/resources/mapper/system/TStoreyInfoMapper.xml
View file @
face7351
...
@@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap
type=
"TStoreyInfo"
id=
"TStoreyInfoResult"
>
<resultMap
type=
"TStoreyInfo"
id=
"TStoreyInfoResult"
>
<result
property=
"fStoreyId"
column=
"f_storey_id"
/>
<result
property=
"fStoreyId"
column=
"f_storey_id"
/>
<result
property=
"fEquipmentId"
column=
"f_equipment_id"
/>
<result
property=
"fEquipmentId"
column=
"f_equipment_id"
/>
<result
property=
"fEquipmentCode"
column=
"f_equipment_code"
/>
<result
property=
"fStoreyCode"
column=
"f_storey_code"
/>
<result
property=
"fStoreyCode"
column=
"f_storey_code"
/>
<result
property=
"fTrayCode"
column=
"f_tray_code"
/>
<result
property=
"fTrayCode"
column=
"f_tray_code"
/>
<result
property=
"fIp"
column=
"f_ip"
/>
<result
property=
"fIp"
column=
"f_ip"
/>
...
@@ -16,6 +17,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -16,6 +17,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"fUpdateTime"
column=
"f_update_time"
/>
<result
property=
"fUpdateTime"
column=
"f_update_time"
/>
<result
property=
"fCreateTime"
column=
"f_create_time"
/>
<result
property=
"fCreateTime"
column=
"f_create_time"
/>
<result
property=
"fAlarmTime"
column=
"f_alarm_time"
/>
<result
property=
"fAlarmTime"
column=
"f_alarm_time"
/>
<result
property=
"blankingCommand"
column=
"f_blanking_command"
/>
<result
property=
"feedingCommand"
column=
"f_feeding_command"
/>
</resultMap>
</resultMap>
<sql
id=
"selectTStoreyInfoVo"
>
<sql
id=
"selectTStoreyInfoVo"
>
...
@@ -29,22 +33,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -29,22 +33,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
storeyInfo.f_update_time,
storeyInfo.f_update_time,
storeyInfo.f_create_time,
storeyInfo.f_create_time,
storeyInfo.f_alarm_time,
storeyInfo.f_alarm_time,
trayInfo.f_tray_code
storeyInfo.f_blanking_command,
storeyInfo.f_feeding_command,
trayInfo.f_tray_code,
equipmentInfo.f_equipment_code
from t_storey_info storeyInfo
from t_storey_info storeyInfo
left join t_tray_info trayInfo on storeyInfo.f_storey_code = trayInfo.f_storey_code
left join t_tray_info trayInfo on storeyInfo.f_storey_code = trayInfo.f_storey_code
left join t_equipment_info equipmentInfo on storeyInfo.f_equipment_id = equipmentInfo.f_equipment_id
</sql>
</sql>
<select
id=
"selectTStoreyInfoList"
parameterType=
"TStoreyInfo"
resultMap=
"TStoreyInfoResult"
>
<select
id=
"selectTStoreyInfoList"
parameterType=
"TStoreyInfo"
resultMap=
"TStoreyInfoResult"
>
<include
refid=
"selectTStoreyInfoVo"
/>
<include
refid=
"selectTStoreyInfoVo"
/>
<where>
<where>
<if
test=
"fEquipment
Id != null "
>
and f_equipment_id = #{fEquipmentId}
</if>
<if
test=
"fEquipment
Code != null "
>
and equipmentInfo.f_equipment_code like concat('%',#{fEquipmentCode},'%')
</if>
<if
test=
"fStoreyCode != null and fStoreyCode != ''"
>
and
f_storey_code = #{fStoreyCode}
</if>
<if
test=
"fStoreyCode != null and fStoreyCode != ''"
>
and
storeyInfo.f_storey_code like concat('%',#{fStoreyCode},'%')
</if>
<if
test=
"fIp != null and fIp != ''"
>
and
f_ip = #{fIp}
</if>
<if
test=
"fIp != null and fIp != ''"
>
and
storeyInfo.f_ip like concat concat('%',#{fIp},'%')
</if>
<if
test=
"fStatus != null and fStatus != ''"
>
and f_status = #{fStatus}
</if>
<if
test=
"fStatus != null and fStatus != ''"
>
and
storeyInfo.
f_status = #{fStatus}
</if>
<if
test=
"fPort != null "
>
and f_port = #{fPort}
</if>
<if
test=
"fPort != null "
>
and
storeyInfo.
f_port = #{fPort}
</if>
<if
test=
"fUpdateTime != null "
>
and f_update_time = #{fUpdateTime}
</if>
<if
test=
"fUpdateTime != null "
>
and
storeyInfo.
f_update_time = #{fUpdateTime}
</if>
<if
test=
"fCreateTime != null "
>
and f_create_time = #{fCreateTime}
</if>
<if
test=
"fCreateTime != null "
>
and
storeyInfo.
f_create_time = #{fCreateTime}
</if>
<if
test=
"fAlarmTime != null "
>
and f_alarm_time = #{fAlarmTime}
</if>
<if
test=
"fAlarmTime != null "
>
and
storeyInfo.
f_alarm_time = #{fAlarmTime}
</if>
</where>
</where>
</select>
</select>
<select
id=
"queryByDepartmentId"
parameterType=
"long"
resultMap=
"TStoreyInfoResult"
>
<select
id=
"queryByDepartmentId"
parameterType=
"long"
resultMap=
"TStoreyInfoResult"
>
...
@@ -59,13 +67,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -59,13 +67,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select
id=
"selectTStoreyInfoByCode"
parameterType=
"String"
resultMap=
"TStoreyInfoResult"
>
<select
id=
"selectTStoreyInfoByCode"
parameterType=
"String"
resultMap=
"TStoreyInfoResult"
>
<include
refid=
"selectTStoreyInfoVo"
/>
<include
refid=
"selectTStoreyInfoVo"
/>
where f_storey_code = #{fStoreyCode}
where
storeyInfo.
f_storey_code = #{fStoreyCode}
</select>
</select>
<select
id=
"selectNearestFreeStorey"
resultMap=
"TStoreyInfoResult"
>
<select
id=
"selectNearestFreeStorey"
resultMap=
"TStoreyInfoResult"
>
SELECT
SELECT
f_storey_id, f_equipment_id, f_storey_code, f_ip, f_status, f_port,
f_storey_id, f_equipment_id, f_storey_code, f_ip, f_status, f_port,
f_aging_start_time, f_update_time, f_create_time, f_alarm_time
f_aging_start_time, f_update_time, f_create_time, f_alarm_time
l, f_blanking_command, f_feeding_command
FROM (
FROM (
SELECT
SELECT
*,
*,
...
@@ -103,6 +111,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -103,6 +111,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"fUpdateTime != null"
>
f_update_time,
</if>
<if
test=
"fUpdateTime != null"
>
f_update_time,
</if>
<if
test=
"fCreateTime != null"
>
f_create_time,
</if>
<if
test=
"fCreateTime != null"
>
f_create_time,
</if>
<if
test=
"fAlarmTime != null"
>
f_alarm_time,
</if>
<if
test=
"fAlarmTime != null"
>
f_alarm_time,
</if>
<if
test=
"blankingCommand != null"
>
f_blanking_command,
</if>
<if
test=
"feedingCommand != null"
>
f_feeding_command,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"fStoreyId != null"
>
#{fStoreyId},
</if>
<if
test=
"fStoreyId != null"
>
#{fStoreyId},
</if>
...
@@ -114,6 +125,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -114,6 +125,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"fUpdateTime != null"
>
#{fUpdateTime},
</if>
<if
test=
"fUpdateTime != null"
>
#{fUpdateTime},
</if>
<if
test=
"fCreateTime != null"
>
#{fCreateTime},
</if>
<if
test=
"fCreateTime != null"
>
#{fCreateTime},
</if>
<if
test=
"fAlarmTime != null"
>
#{fAlarmTime},
</if>
<if
test=
"fAlarmTime != null"
>
#{fAlarmTime},
</if>
<if
test=
"blankingCommand != null"
>
#{blankingCommand},
</if>
<if
test=
"feedingCommand != null"
>
#{feedingCommand},
</if>
</trim>
</trim>
</insert>
</insert>
...
@@ -130,6 +144,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -130,6 +144,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"fUpdateTime != null"
>
f_update_time = #{fUpdateTime},
</if>
<if
test=
"fUpdateTime != null"
>
f_update_time = #{fUpdateTime},
</if>
<if
test=
"fCreateTime != null"
>
f_create_time = #{fCreateTime},
</if>
<if
test=
"fCreateTime != null"
>
f_create_time = #{fCreateTime},
</if>
<if
test=
"fAlarmTime != null"
>
f_alarm_time = #{fAlarmTime},
</if>
<if
test=
"fAlarmTime != null"
>
f_alarm_time = #{fAlarmTime},
</if>
<if
test=
"blankingCommand != null"
>
f_blanking_command = #{blankingCommand},
</if>
<if
test=
"feedingCommand != null"
>
f_feeding_command = #{feedingCommand},
</if>
</trim>
</trim>
where f_storey_id = #{fStoreyId}
where f_storey_id = #{fStoreyId}
</update>
</update>
...
...
zhmes-agecal-web/src/views/screen/components/RoboticArm.vue
View file @
face7351
...
@@ -156,33 +156,8 @@ export default {
...
@@ -156,33 +156,8 @@ export default {
showAddDialog
:
false
,
showAddDialog
:
false
,
trayCode
:
''
,
trayCode
:
''
,
loadingCommands
:
[
loadingCommands
:
[
{
trayCode
:
'TP-10023'
,
position
:
'A区-3号架'
},
{
trayCode
:
'TP-10045'
,
position
:
'B区-1号架'
},
{
trayCode
:
'TP-10067'
,
position
:
'C区-5号架'
},
{
trayCode
:
'TP-10023'
,
position
:
'A区-3号架'
},
{
trayCode
:
'TP-10045'
,
position
:
'B区-1号架'
},
{
trayCode
:
'TP-10067'
,
position
:
'C区-5号架'
},
{
trayCode
:
'TP-10023'
,
position
:
'A区-3号架'
},
{
trayCode
:
'TP-10045'
,
position
:
'B区-1号架'
},
{
trayCode
:
'TP-10067'
,
position
:
'C区-5号架'
},
{
trayCode
:
'TP-10023'
,
position
:
'A区-3号架'
},
{
trayCode
:
'TP-10045'
,
position
:
'B区-1号架'
},
{
trayCode
:
'TP-10067'
,
position
:
'C区-5号架'
}
],
],
unloadingCommands
:
[
unloadingCommands
:
[
{
trayCode
:
'TP-10089'
,
position
:
'老化区-1号柜'
},
{
trayCode
:
'TP-10101'
,
position
:
'老化区-3号柜'
},
{
trayCode
:
'TP-10089'
,
position
:
'老化区-1号柜'
},
{
trayCode
:
'TP-10101'
,
position
:
'老化区-3号柜'
},
{
trayCode
:
'TP-10089'
,
position
:
'老化区-1号柜'
},
{
trayCode
:
'TP-10101'
,
position
:
'老化区-3号柜'
},
{
trayCode
:
'TP-10089'
,
position
:
'老化区-1号柜'
},
{
trayCode
:
'TP-10101'
,
position
:
'老化区-3号柜'
},
{
trayCode
:
'TP-10101'
,
position
:
'老化区-3号柜'
},
{
trayCode
:
'TP-10089'
,
position
:
'老化区-1号柜'
},
{
trayCode
:
'TP-10101'
,
position
:
'老化区-3号柜'
},
{
trayCode
:
'TP-10089'
,
position
:
'老化区-1号柜'
},
{
trayCode
:
'TP-10101'
,
position
:
'老化区-3号柜'
}
],
],
websocket
:
null
,
websocket
:
null
,
reconnectInterval
:
null
,
reconnectInterval
:
null
,
...
...
zhmes-agecal-web/src/views/storey/index.vue
0 → 100644
View file @
face7351
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"120px"
>
<el-form-item
label=
"所属老化柜编号"
prop=
"fEquipmentCode"
>
<el-input
v-model=
"queryParams.fEquipmentCode"
placeholder=
"请输入所属老化柜编号"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"层编号"
prop=
"fStoreyCode"
>
<el-input
v-model=
"queryParams.fStoreyCode"
placeholder=
"请输入层编号"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"IP地址"
prop=
"fIp"
>
<el-input
v-model=
"queryParams.fIp"
placeholder=
"请输入IP地址"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
>
新增
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
:loading=
"exportLoading"
@
click=
"handleExport"
>
导出
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"infoList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
label=
"所属老化柜编号"
align=
"center"
prop=
"fEquipmentCode"
/>
<el-table-column
label=
"层编号"
align=
"center"
prop=
"fStoreyCode"
/>
<el-table-column
label=
"IP地址"
align=
"center"
prop=
"fIp"
/>
<el-table-column
label=
"端口号"
align=
"center"
prop=
"fPort"
/>
<el-table-column
label=
"状态"
align=
"center"
prop=
"fStatus"
>
<template
slot-scope=
"scope"
>
<el-tag
v-if =
"scope.row.fStatus === '0'"
>
空闲
</el-tag>
<el-tag
v-else-if =
"scope.row.fStatus === '1'"
>
故障
</el-tag>
<el-tag
v-else-if =
"scope.row.fStatus === '2'"
>
断电
</el-tag>
</
template
>
</el-table-column>
<el-table-column
label=
"报警时间"
align=
"center"
prop=
"fAlarmTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
fAlarmTime
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"老化开始时间"
align
=
"center"
prop
=
"fAgingStartTime"
width
=
"180"
>
<
template
slot
-
scope
=
"scope"
>
<
span
>
{{
parseTime
(
scope
.
row
.
fAgingStartTime
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"下料指令"
align
=
"center"
prop
=
"blankingCommand"
/>
<
el
-
table
-
column
label
=
"上料指令"
align
=
"center"
prop
=
"feedingCommand"
/>
<
el
-
table
-
column
label
=
"操作"
align
=
"center"
class
-
name
=
"small-padding fixed-width"
>
<
template
slot
-
scope
=
"scope"
>
<
el
-
button
size
=
"mini"
type
=
"text"
icon
=
"el-icon-edit"
@
click
=
"handleUpdate(scope.row)"
>
修改
<
/el-button
>
<
el
-
button
size
=
"mini"
type
=
"text"
icon
=
"el-icon-delete"
@
click
=
"handleDelete(scope.row)"
>
删除
<
/el-button
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
pagination
v
-
show
=
"total>0"
:
total
=
"total"
:
page
.
sync
=
"queryParams.pageNum"
:
limit
.
sync
=
"queryParams.pageSize"
@
pagination
=
"getList"
/>
<!--
添加或修改柜层信息对话框
-->
<
el
-
dialog
:
title
=
"title"
:
visible
.
sync
=
"open"
width
=
"800px"
append
-
to
-
body
>
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
label
-
width
=
"120px"
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"所属老化柜编号"
prop
=
"fEquipmentId"
>
<
el
-
input
v
-
model
=
"form.fEquipmentCode"
:
disabled
=
"form.fStoreyId !== null"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"层编号"
prop
=
"fStoreyCode"
>
<
el
-
input
v
-
model
=
"form.fStoreyCode"
placeholder
=
"请输入层编号"
:
disabled
=
"form.fStoreyId !== null"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"IP地址"
prop
=
"fIp"
>
<
el
-
input
v
-
model
=
"form.fIp"
placeholder
=
"请输入IP地址"
:
disabled
=
"form.fStoreyId !== null"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"端口号"
prop
=
"fPort"
>
<
el
-
input
v
-
model
=
"form.fPort"
placeholder
=
"请输入端口号"
:
disabled
=
"form.fStoreyId !== null"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"下料指令"
prop
=
"blankingCommand"
>
<
el
-
input
v
-
model
=
"form.blankingCommand"
placeholder
=
"请输入这一层的下料的指令"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"上料指令"
prop
=
"feedingCommand"
>
<
el
-
input
v
-
model
=
"form.feedingCommand"
placeholder
=
"请输入这一层的上料的指令"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
/el-form
>
<
div
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
type
=
"primary"
@
click
=
"submitForm"
>
确
定
<
/el-button
>
<
el
-
button
@
click
=
"cancel"
>
取
消
<
/el-button
>
<
/div
>
<
/el-dialog
>
<
/div
>
<
/template
>
<
script
>
import
{
listStorey
,
getStorey
,
delStorey
,
addStorey
,
updateStorey
,
exportStorey
}
from
"@/api/storey/storey"
;
export
default
{
name
:
"Info"
,
components
:
{
}
,
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 导出遮罩层
exportLoading
:
false
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 柜层信息表格数据
infoList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
fEquipmentCode
:
null
,
fStoreyCode
:
null
,
fIp
:
null
,
}
,
// 表单参数
form
:
{
}
,
// 表单校验
rules
:
{
fEquipmentCode
:
[
{
required
:
true
,
message
:
"设备编号不能为空"
,
trigger
:
"blur"
}
,
],
fStoreyCode
:
[
{
required
:
true
,
message
:
"楼层编号不能为空"
,
trigger
:
"blur"
}
,
],
fIp
:
[
{
required
:
true
,
message
:
"IP地址不能为空"
,
trigger
:
"blur"
}
,
],
fPort
:
[
{
required
:
true
,
message
:
"端口号不能为空"
,
trigger
:
"blur"
}
,
],
blankingCommand
:
[
{
required
:
true
,
message
:
"下料指令不能为空"
,
trigger
:
"blur"
}
],
feedingCommand
:
[
{
required
:
true
,
message
:
"上料指令不能为空"
,
trigger
:
"blur"
}
]
}
}
;
}
,
created
()
{
this
.
getList
();
}
,
methods
:
{
/** 查询柜层信息列表 */
getList
()
{
this
.
loading
=
true
;
listStorey
(
this
.
queryParams
).
then
(
response
=>
{
this
.
infoList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
}
);
}
,
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
}
,
// 表单重置
reset
()
{
this
.
form
=
{
fStoreyId
:
null
,
fEquipmentId
:
null
,
fStoreyCode
:
null
,
fIp
:
null
,
fPort
:
null
,
fStatus
:
"0"
,
fUpdateTime
:
null
,
fCreateTime
:
null
,
fAlarmTime
:
null
,
fAgingStartTime
:
null
,
blankingCommand
:
null
,
feedingCommand
:
null
}
;
this
.
resetForm
(
"form"
);
}
,
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
}
,
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
}
,
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
fStoreyId
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
}
,
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"添加柜层信息"
;
}
,
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
fStoreyId
=
row
.
fStoreyId
||
this
.
ids
getStorey
(
fStoreyId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"修改柜层信息"
;
}
);
}
,
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
fStoreyId
!=
null
)
{
updateStorey
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
}
);
}
else
{
addStorey
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
}
);
}
}
}
);
}
,
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
fStoreyIds
=
row
.
fStoreyId
||
this
.
ids
;
this
.
$confirm
(
'是否确认删除柜层信息编号为"'
+
fStoreyIds
+
'"的数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}
).
then
(
function
()
{
return
delStorey
(
fStoreyIds
);
}
).
then
(()
=>
{
this
.
getList
();
this
.
msgSuccess
(
"删除成功"
);
}
).
catch
(()
=>
{
}
);
}
,
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
this
.
queryParams
;
this
.
$confirm
(
'是否确认导出所有柜层信息数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}
).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportStorey
(
queryParams
);
}
).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
exportLoading
=
false
;
}
).
catch
(()
=>
{
}
);
}
}
}
;
<
/script
>
zhmes-agecal-web/vue.config.js
View file @
face7351
...
@@ -34,7 +34,7 @@ module.exports = {
...
@@ -34,7 +34,7 @@ module.exports = {
proxy
:
{
proxy
:
{
// detail: https://cli.vuejs.org/config/#devserver-proxy
// detail: https://cli.vuejs.org/config/#devserver-proxy
[
process
.
env
.
VUE_APP_BASE_API
]:
{
[
process
.
env
.
VUE_APP_BASE_API
]:
{
target
:
`http://localhost:808
0
/agecal`
,
target
:
`http://localhost:808
7
/agecal`
,
changeOrigin
:
true
,
changeOrigin
:
true
,
pathRewrite
:
{
pathRewrite
:
{
[
'^'
+
process
.
env
.
VUE_APP_BASE_API
]:
''
[
'^'
+
process
.
env
.
VUE_APP_BASE_API
]:
''
...
...
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