Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dakong-digital-management
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
耿迪迪
dakong-digital-management
Commits
9c4fb6dd
Commit
9c4fb6dd
authored
Aug 30, 2024
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
产品详情
parent
3ae8e162
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
2051 additions
and
69 deletions
+2051
-69
TProductDeviceTestController.java
...ng/web/controller/track/TProductDeviceTestController.java
+103
-0
TProductDrawingController.java
...ehong/web/controller/track/TProductDrawingController.java
+11
-0
TProductStoreController.java
.../zehong/web/controller/track/TProductStoreController.java
+11
-0
TProductDeviceTest.java
...va/com/zehong/system/domain/track/TProductDeviceTest.java
+94
-0
TProductDrawing.java
.../java/com/zehong/system/domain/track/TProductDrawing.java
+10
-0
TProductInspect.java
.../java/com/zehong/system/domain/track/TProductInspect.java
+10
-0
TProductStore.java
...in/java/com/zehong/system/domain/track/TProductStore.java
+20
-0
TProductDeviceTestMapper.java
.../zehong/system/mapper/track/TProductDeviceTestMapper.java
+61
-0
TProductDrawingMapper.java
...com/zehong/system/mapper/track/TProductDrawingMapper.java
+7
-0
TProductStoreMapper.java
...a/com/zehong/system/mapper/track/TProductStoreMapper.java
+7
-0
TProductDeviceTestServiceImpl.java
...tem/service/impl/track/TProductDeviceTestServiceImpl.java
+97
-0
TProductDrawingServiceImpl.java
...system/service/impl/track/TProductDrawingServiceImpl.java
+11
-0
TProductStoreServiceImpl.java
...g/system/service/impl/track/TProductStoreServiceImpl.java
+10
-0
ITProductDeviceTestService.java
...hong/system/service/track/ITProductDeviceTestService.java
+61
-0
ITProductDrawingService.java
.../zehong/system/service/track/ITProductDrawingService.java
+7
-0
ITProductStoreService.java
...om/zehong/system/service/track/ITProductStoreService.java
+7
-0
TProductDeviceTestMapper.xml
.../main/resources/mapper/track/TProductDeviceTestMapper.xml
+79
-0
TProductDrawingMapper.xml
...src/main/resources/mapper/track/TProductDrawingMapper.xml
+16
-0
TProductStoreMapper.xml
...m/src/main/resources/mapper/track/TProductStoreMapper.xml
+18
-0
drawing.js
digital-management-web/src/api/track/drawing.js
+9
-0
store.js
digital-management-web/src/api/track/store.js
+9
-0
test.js
digital-management-web/src/api/track/test.js
+53
-0
DetailInfo.vue
...ment-web/src/views/track/device/components/DetailInfo.vue
+36
-63
DeviceInfo.vue
...ment-web/src/views/track/device/components/DeviceInfo.vue
+97
-0
DeviceTest.vue
...ment-web/src/views/track/device/components/DeviceTest.vue
+350
-0
DrawInfo.vue
...gement-web/src/views/track/device/components/DrawInfo.vue
+160
-0
MarkInfo.vue
...gement-web/src/views/track/device/components/MarkInfo.vue
+180
-0
StoreInfo.vue
...ement-web/src/views/track/device/components/StoreInfo.vue
+143
-0
index.vue
...anagement-web/src/views/track/device/components/index.vue
+342
-0
index.vue
digital-management-web/src/views/track/device/index.vue
+32
-6
No files found.
digital-management-admin/src/main/java/com/zehong/web/controller/track/TProductDeviceTestController.java
0 → 100644
View file @
9c4fb6dd
package
com
.
zehong
.
web
.
controller
.
track
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.zehong.common.annotation.Log
;
import
com.zehong.common.core.controller.BaseController
;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.common.enums.BusinessType
;
import
com.zehong.system.domain.track.TProductDeviceTest
;
import
com.zehong.system.service.track.ITProductDeviceTestService
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.common.core.page.TableDataInfo
;
/**
* 设备检测Controller
*
* @author zehong
* @date 2024-08-29
*/
@RestController
@RequestMapping
(
"/track/test"
)
public
class
TProductDeviceTestController
extends
BaseController
{
@Autowired
private
ITProductDeviceTestService
tProductDeviceTestService
;
/**
* 查询设备检测列表
*/
// @PreAuthorize("@ss.hasPermi('system:test:list')")
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
TProductDeviceTest
tProductDeviceTest
)
{
startPage
();
List
<
TProductDeviceTest
>
list
=
tProductDeviceTestService
.
selectTProductDeviceTestList
(
tProductDeviceTest
);
return
getDataTable
(
list
);
}
/**
* 导出设备检测列表
*/
//@PreAuthorize("@ss.hasPermi('system:test:export')")
@Log
(
title
=
"设备检测"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TProductDeviceTest
tProductDeviceTest
)
{
List
<
TProductDeviceTest
>
list
=
tProductDeviceTestService
.
selectTProductDeviceTestList
(
tProductDeviceTest
);
ExcelUtil
<
TProductDeviceTest
>
util
=
new
ExcelUtil
<
TProductDeviceTest
>(
TProductDeviceTest
.
class
);
return
util
.
exportExcel
(
list
,
"设备检测数据"
);
}
/**
* 获取设备检测详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:test:query')")
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
AjaxResult
.
success
(
tProductDeviceTestService
.
selectTProductDeviceTestById
(
id
));
}
/**
* 新增设备检测
*/
//@PreAuthorize("@ss.hasPermi('system:test:add')")
@Log
(
title
=
"设备检测"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
TProductDeviceTest
tProductDeviceTest
)
{
return
toAjax
(
tProductDeviceTestService
.
insertTProductDeviceTest
(
tProductDeviceTest
));
}
/**
* 修改设备检测
*/
//@PreAuthorize("@ss.hasPermi('system:test:edit')")
@Log
(
title
=
"设备检测"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
TProductDeviceTest
tProductDeviceTest
)
{
return
toAjax
(
tProductDeviceTestService
.
updateTProductDeviceTest
(
tProductDeviceTest
));
}
/**
* 删除设备检测
*/
//@PreAuthorize("@ss.hasPermi('system:test:remove')")
@Log
(
title
=
"设备检测"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
tProductDeviceTestService
.
deleteTProductDeviceTestByIds
(
ids
));
}
}
digital-management-admin/src/main/java/com/zehong/web/controller/track/TProductDrawingController.java
View file @
9c4fb6dd
...
@@ -107,4 +107,15 @@ public class TProductDrawingController extends BaseController
...
@@ -107,4 +107,15 @@ public class TProductDrawingController extends BaseController
{
{
return
toAjax
(
tProductDrawingService
.
deleteTProductDrawingByIds
(
ids
));
return
toAjax
(
tProductDrawingService
.
deleteTProductDrawingByIds
(
ids
));
}
}
/**
* 根据产品主键获取图纸信息
* @param drawing
* @return
*/
@GetMapping
(
"/getDrawInfoByDeviceId"
)
public
TableDataInfo
getDrawInfoByDeviceId
(
TProductDrawing
drawing
){
startPage
();
return
getDataTable
(
tProductDrawingService
.
getDrawInfoByDeviceId
(
drawing
));
}
}
}
digital-management-admin/src/main/java/com/zehong/web/controller/track/TProductStoreController.java
View file @
9c4fb6dd
...
@@ -129,4 +129,15 @@ public class TProductStoreController extends BaseController
...
@@ -129,4 +129,15 @@ public class TProductStoreController extends BaseController
public
AjaxResult
outHouse
(
@RequestBody
List
<
HouseVo
>
storeInfo
){
public
AjaxResult
outHouse
(
@RequestBody
List
<
HouseVo
>
storeInfo
){
return
toAjax
(
tProductStoreService
.
computeStock
(
storeInfo
,
true
,
"subtract"
));
return
toAjax
(
tProductStoreService
.
computeStock
(
storeInfo
,
true
,
"subtract"
));
}
}
/**
* 根据产品主键获取配件信息
* @param store
* @return
*/
@GetMapping
(
"/getStoreInfoByDeviceId"
)
public
TableDataInfo
getStoreInfoByDeviceId
(
TProductStore
store
){
startPage
();
return
getDataTable
(
tProductStoreService
.
getStoreInfoByDeviceId
(
store
));
}
}
}
digital-management-system/src/main/java/com/zehong/system/domain/track/TProductDeviceTest.java
0 → 100644
View file @
9c4fb6dd
package
com
.
zehong
.
system
.
domain
.
track
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.core.domain.BaseEntity
;
/**
* 设备检测对象 t_product_device_test
*
* @author zehong
* @date 2024-08-29
*/
public
class
TProductDeviceTest
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** $column.columnComment */
private
Long
id
;
/** 设备编号 */
@Excel
(
name
=
"设备编号"
)
private
Long
deviceId
;
/** 检测项 */
@Excel
(
name
=
"检测项"
,
dictType
=
"device_test_item"
)
private
String
title
;
/** 检测状态 */
@Excel
(
name
=
"检测状态"
,
dictType
=
"device_test_status"
)
private
String
status
;
/** 创建人 */
private
Long
createId
;
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setDeviceId
(
Long
deviceId
)
{
this
.
deviceId
=
deviceId
;
}
public
Long
getDeviceId
()
{
return
deviceId
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
String
getTitle
()
{
return
title
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
String
getStatus
()
{
return
status
;
}
public
void
setCreateId
(
Long
createId
)
{
this
.
createId
=
createId
;
}
public
Long
getCreateId
()
{
return
createId
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"id"
,
getId
())
.
append
(
"deviceId"
,
getDeviceId
())
.
append
(
"title"
,
getTitle
())
.
append
(
"status"
,
getStatus
())
.
append
(
"remark"
,
getRemark
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"createId"
,
getCreateId
())
.
toString
();
}
}
digital-management-system/src/main/java/com/zehong/system/domain/track/TProductDrawing.java
View file @
9c4fb6dd
...
@@ -56,6 +56,8 @@ public class TProductDrawing extends BaseEntity
...
@@ -56,6 +56,8 @@ public class TProductDrawing extends BaseEntity
/** 删除状态:0否,1是 */
/** 删除状态:0否,1是 */
private
String
isDel
;
private
String
isDel
;
private
Long
deviceId
;
public
void
setId
(
Long
id
)
public
void
setId
(
Long
id
)
{
{
this
.
id
=
id
;
this
.
id
=
id
;
...
@@ -155,6 +157,14 @@ public class TProductDrawing extends BaseEntity
...
@@ -155,6 +157,14 @@ public class TProductDrawing extends BaseEntity
this
.
isDel
=
isDel
;
this
.
isDel
=
isDel
;
}
}
public
Long
getDeviceId
()
{
return
deviceId
;
}
public
void
setDeviceId
(
Long
deviceId
)
{
this
.
deviceId
=
deviceId
;
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
...
...
digital-management-system/src/main/java/com/zehong/system/domain/track/TProductInspect.java
View file @
9c4fb6dd
...
@@ -51,6 +51,8 @@ public class TProductInspect extends BaseEntity
...
@@ -51,6 +51,8 @@ public class TProductInspect extends BaseEntity
/** 创建人 */
/** 创建人 */
private
Long
createId
;
private
Long
createId
;
private
String
isDel
;
public
void
setId
(
Long
id
)
public
void
setId
(
Long
id
)
{
{
this
.
id
=
id
;
this
.
id
=
id
;
...
@@ -133,6 +135,14 @@ public class TProductInspect extends BaseEntity
...
@@ -133,6 +135,14 @@ public class TProductInspect extends BaseEntity
return
createId
;
return
createId
;
}
}
public
String
getIsDel
()
{
return
isDel
;
}
public
void
setIsDel
(
String
isDel
)
{
this
.
isDel
=
isDel
;
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
...
...
digital-management-system/src/main/java/com/zehong/system/domain/track/TProductStore.java
View file @
9c4fb6dd
...
@@ -59,6 +59,10 @@ public class TProductStore extends BaseEntity
...
@@ -59,6 +59,10 @@ public class TProductStore extends BaseEntity
private
String
isDel
;
private
String
isDel
;
private
Long
deviceId
;
private
String
useNum
;
public
void
setId
(
Long
id
)
public
void
setId
(
Long
id
)
{
{
this
.
id
=
id
;
this
.
id
=
id
;
...
@@ -167,6 +171,22 @@ public class TProductStore extends BaseEntity
...
@@ -167,6 +171,22 @@ public class TProductStore extends BaseEntity
this
.
isDel
=
isDel
;
this
.
isDel
=
isDel
;
}
}
public
Long
getDeviceId
()
{
return
deviceId
;
}
public
void
setDeviceId
(
Long
deviceId
)
{
this
.
deviceId
=
deviceId
;
}
public
String
getUseNum
()
{
return
useNum
;
}
public
void
setUseNum
(
String
useNum
)
{
this
.
useNum
=
useNum
;
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
...
...
digital-management-system/src/main/java/com/zehong/system/mapper/track/TProductDeviceTestMapper.java
0 → 100644
View file @
9c4fb6dd
package
com
.
zehong
.
system
.
mapper
.
track
;
import
java.util.List
;
import
com.zehong.system.domain.track.TProductDeviceTest
;
/**
* 设备检测Mapper接口
*
* @author zehong
* @date 2024-08-29
*/
public
interface
TProductDeviceTestMapper
{
/**
* 查询设备检测
*
* @param id 设备检测ID
* @return 设备检测
*/
public
TProductDeviceTest
selectTProductDeviceTestById
(
Long
id
);
/**
* 查询设备检测列表
*
* @param tProductDeviceTest 设备检测
* @return 设备检测集合
*/
public
List
<
TProductDeviceTest
>
selectTProductDeviceTestList
(
TProductDeviceTest
tProductDeviceTest
);
/**
* 新增设备检测
*
* @param tProductDeviceTest 设备检测
* @return 结果
*/
public
int
insertTProductDeviceTest
(
TProductDeviceTest
tProductDeviceTest
);
/**
* 修改设备检测
*
* @param tProductDeviceTest 设备检测
* @return 结果
*/
public
int
updateTProductDeviceTest
(
TProductDeviceTest
tProductDeviceTest
);
/**
* 删除设备检测
*
* @param id 设备检测ID
* @return 结果
*/
public
int
deleteTProductDeviceTestById
(
Long
id
);
/**
* 批量删除设备检测
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public
int
deleteTProductDeviceTestByIds
(
Long
[]
ids
);
}
digital-management-system/src/main/java/com/zehong/system/mapper/track/TProductDrawingMapper.java
View file @
9c4fb6dd
...
@@ -58,4 +58,11 @@ public interface TProductDrawingMapper
...
@@ -58,4 +58,11 @@ public interface TProductDrawingMapper
* @return 结果
* @return 结果
*/
*/
public
int
deleteTProductDrawingByIds
(
Long
[]
ids
);
public
int
deleteTProductDrawingByIds
(
Long
[]
ids
);
/**
* 根据产品主键获取图纸信息
* @param drawing
* @return
*/
List
<
TProductDrawing
>
getDrawInfoByDeviceId
(
TProductDrawing
drawing
);
}
}
digital-management-system/src/main/java/com/zehong/system/mapper/track/TProductStoreMapper.java
View file @
9c4fb6dd
...
@@ -58,4 +58,11 @@ public interface TProductStoreMapper
...
@@ -58,4 +58,11 @@ public interface TProductStoreMapper
* @return 结果
* @return 结果
*/
*/
public
int
deleteTProductStoreByIds
(
Long
[]
ids
);
public
int
deleteTProductStoreByIds
(
Long
[]
ids
);
/**
* 根据产品主键获取配件信息
* @param store
* @return
*/
List
<
TProductStore
>
getStoreInfoByDeviceId
(
TProductStore
store
);
}
}
digital-management-system/src/main/java/com/zehong/system/service/impl/track/TProductDeviceTestServiceImpl.java
0 → 100644
View file @
9c4fb6dd
package
com
.
zehong
.
system
.
service
.
impl
.
track
;
import
java.util.List
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.SecurityUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.track.TProductDeviceTestMapper
;
import
com.zehong.system.domain.track.TProductDeviceTest
;
import
com.zehong.system.service.track.ITProductDeviceTestService
;
/**
* 设备检测Service业务层处理
*
* @author zehong
* @date 2024-08-29
*/
@Service
public
class
TProductDeviceTestServiceImpl
implements
ITProductDeviceTestService
{
@Autowired
private
TProductDeviceTestMapper
tProductDeviceTestMapper
;
/**
* 查询设备检测
*
* @param id 设备检测ID
* @return 设备检测
*/
@Override
public
TProductDeviceTest
selectTProductDeviceTestById
(
Long
id
)
{
return
tProductDeviceTestMapper
.
selectTProductDeviceTestById
(
id
);
}
/**
* 查询设备检测列表
*
* @param tProductDeviceTest 设备检测
* @return 设备检测
*/
@Override
public
List
<
TProductDeviceTest
>
selectTProductDeviceTestList
(
TProductDeviceTest
tProductDeviceTest
)
{
return
tProductDeviceTestMapper
.
selectTProductDeviceTestList
(
tProductDeviceTest
);
}
/**
* 新增设备检测
*
* @param tProductDeviceTest 设备检测
* @return 结果
*/
@Override
public
int
insertTProductDeviceTest
(
TProductDeviceTest
tProductDeviceTest
)
{
tProductDeviceTest
.
setCreateTime
(
DateUtils
.
getNowDate
());
tProductDeviceTest
.
setCreateId
(
SecurityUtils
.
getLoginUser
().
getUser
().
getUserId
());
return
tProductDeviceTestMapper
.
insertTProductDeviceTest
(
tProductDeviceTest
);
}
/**
* 修改设备检测
*
* @param tProductDeviceTest 设备检测
* @return 结果
*/
@Override
public
int
updateTProductDeviceTest
(
TProductDeviceTest
tProductDeviceTest
)
{
return
tProductDeviceTestMapper
.
updateTProductDeviceTest
(
tProductDeviceTest
);
}
/**
* 批量删除设备检测
*
* @param ids 需要删除的设备检测ID
* @return 结果
*/
@Override
public
int
deleteTProductDeviceTestByIds
(
Long
[]
ids
)
{
return
tProductDeviceTestMapper
.
deleteTProductDeviceTestByIds
(
ids
);
}
/**
* 删除设备检测信息
*
* @param id 设备检测ID
* @return 结果
*/
@Override
public
int
deleteTProductDeviceTestById
(
Long
id
)
{
return
tProductDeviceTestMapper
.
deleteTProductDeviceTestById
(
id
);
}
}
digital-management-system/src/main/java/com/zehong/system/service/impl/track/TProductDrawingServiceImpl.java
View file @
9c4fb6dd
...
@@ -94,4 +94,15 @@ public class TProductDrawingServiceImpl implements ITProductDrawingService
...
@@ -94,4 +94,15 @@ public class TProductDrawingServiceImpl implements ITProductDrawingService
{
{
return
tProductDrawingMapper
.
deleteTProductDrawingById
(
id
);
return
tProductDrawingMapper
.
deleteTProductDrawingById
(
id
);
}
}
/**
* 根据产品主键获取图纸信息
* @param drawing
* @return
*/
@Override
public
List
<
TProductDrawing
>
getDrawInfoByDeviceId
(
TProductDrawing
drawing
){
return
tProductDrawingMapper
.
getDrawInfoByDeviceId
(
drawing
);
}
}
}
digital-management-system/src/main/java/com/zehong/system/service/impl/track/TProductStoreServiceImpl.java
View file @
9c4fb6dd
...
@@ -166,4 +166,14 @@ public class TProductStoreServiceImpl implements ITProductStoreService
...
@@ -166,4 +166,14 @@ public class TProductStoreServiceImpl implements ITProductStoreService
tProductStoreMapper
.
updateTProductStore
(
store
);
tProductStoreMapper
.
updateTProductStore
(
store
);
}
}
}
}
/**
* 根据产品主键获取配件信息
* @param store
* @return
*/
@Override
public
List
<
TProductStore
>
getStoreInfoByDeviceId
(
TProductStore
store
){
return
tProductStoreMapper
.
getStoreInfoByDeviceId
(
store
);
}
}
}
digital-management-system/src/main/java/com/zehong/system/service/track/ITProductDeviceTestService.java
0 → 100644
View file @
9c4fb6dd
package
com
.
zehong
.
system
.
service
.
track
;
import
java.util.List
;
import
com.zehong.system.domain.track.TProductDeviceTest
;
/**
* 设备检测Service接口
*
* @author zehong
* @date 2024-08-29
*/
public
interface
ITProductDeviceTestService
{
/**
* 查询设备检测
*
* @param id 设备检测ID
* @return 设备检测
*/
public
TProductDeviceTest
selectTProductDeviceTestById
(
Long
id
);
/**
* 查询设备检测列表
*
* @param tProductDeviceTest 设备检测
* @return 设备检测集合
*/
public
List
<
TProductDeviceTest
>
selectTProductDeviceTestList
(
TProductDeviceTest
tProductDeviceTest
);
/**
* 新增设备检测
*
* @param tProductDeviceTest 设备检测
* @return 结果
*/
public
int
insertTProductDeviceTest
(
TProductDeviceTest
tProductDeviceTest
);
/**
* 修改设备检测
*
* @param tProductDeviceTest 设备检测
* @return 结果
*/
public
int
updateTProductDeviceTest
(
TProductDeviceTest
tProductDeviceTest
);
/**
* 批量删除设备检测
*
* @param ids 需要删除的设备检测ID
* @return 结果
*/
public
int
deleteTProductDeviceTestByIds
(
Long
[]
ids
);
/**
* 删除设备检测信息
*
* @param id 设备检测ID
* @return 结果
*/
public
int
deleteTProductDeviceTestById
(
Long
id
);
}
digital-management-system/src/main/java/com/zehong/system/service/track/ITProductDrawingService.java
View file @
9c4fb6dd
...
@@ -58,4 +58,11 @@ public interface ITProductDrawingService
...
@@ -58,4 +58,11 @@ public interface ITProductDrawingService
* @return 结果
* @return 结果
*/
*/
public
int
deleteTProductDrawingById
(
Long
id
);
public
int
deleteTProductDrawingById
(
Long
id
);
/**
* 根据产品主键获取图纸信息
* @param drawing
* @return
*/
List
<
TProductDrawing
>
getDrawInfoByDeviceId
(
TProductDrawing
drawing
);
}
}
digital-management-system/src/main/java/com/zehong/system/service/track/ITProductStoreService.java
View file @
9c4fb6dd
...
@@ -71,4 +71,11 @@ public interface ITProductStoreService
...
@@ -71,4 +71,11 @@ public interface ITProductStoreService
*/
*/
int
computeStock
(
List
<
HouseVo
>
storeInfo
,
boolean
isAddLog
,
String
type
);
int
computeStock
(
List
<
HouseVo
>
storeInfo
,
boolean
isAddLog
,
String
type
);
/**
* 根据产品主键获取配件信息
* @param store
* @return
*/
List
<
TProductStore
>
getStoreInfoByDeviceId
(
TProductStore
store
);
}
}
digital-management-system/src/main/resources/mapper/track/TProductDeviceTestMapper.xml
0 → 100644
View file @
9c4fb6dd
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.zehong.system.mapper.track.TProductDeviceTestMapper"
>
<resultMap
type=
"TProductDeviceTest"
id=
"TProductDeviceTestResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"deviceId"
column=
"device_id"
/>
<result
property=
"title"
column=
"title"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"remark"
column=
"remark"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"createId"
column=
"create_id"
/>
</resultMap>
<sql
id=
"selectTProductDeviceTestVo"
>
select id, device_id, title, status, remark, create_time, create_id,
<include
refid=
"Common.createBy"
/>
from t_product_device_test
</sql>
<select
id=
"selectTProductDeviceTestList"
parameterType=
"TProductDeviceTest"
resultMap=
"TProductDeviceTestResult"
>
<include
refid=
"selectTProductDeviceTestVo"
/>
<where>
<if
test=
"deviceId != null "
>
and device_id = #{deviceId}
</if>
<if
test=
"title != null and title != ''"
>
and title = #{title}
</if>
<if
test=
"status != null and status != ''"
>
and status = #{status}
</if>
</where>
order by create_time desc
</select>
<select
id=
"selectTProductDeviceTestById"
parameterType=
"Long"
resultMap=
"TProductDeviceTestResult"
>
<include
refid=
"selectTProductDeviceTestVo"
/>
where id = #{id}
</select>
<insert
id=
"insertTProductDeviceTest"
parameterType=
"TProductDeviceTest"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into t_product_device_test
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"deviceId != null"
>
device_id,
</if>
<if
test=
"title != null and title != ''"
>
title,
</if>
<if
test=
"status != null and status != ''"
>
status,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"createId != null"
>
create_id,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"deviceId != null"
>
#{deviceId},
</if>
<if
test=
"title != null and title != ''"
>
#{title},
</if>
<if
test=
"status != null and status != ''"
>
#{status},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"createId != null"
>
#{createId},
</if>
</trim>
</insert>
<update
id=
"updateTProductDeviceTest"
parameterType=
"TProductDeviceTest"
>
update t_product_device_test
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"deviceId != null"
>
device_id = #{deviceId},
</if>
<if
test=
"title != null and title != ''"
>
title = #{title},
</if>
<if
test=
"status != null and status != ''"
>
status = #{status},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"createId != null"
>
create_id = #{createId},
</if>
</trim>
where id = #{id}
</update>
<delete
id=
"deleteTProductDeviceTestById"
parameterType=
"Long"
>
delete from t_product_device_test where id = #{id}
</delete>
<delete
id=
"deleteTProductDeviceTestByIds"
parameterType=
"String"
>
delete from t_product_device_test where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
digital-management-system/src/main/resources/mapper/track/TProductDrawingMapper.xml
View file @
9c4fb6dd
...
@@ -103,4 +103,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -103,4 +103,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
#{id}
</foreach>
</foreach>
</delete>
</delete>
<select
id=
"getDrawInfoByDeviceId"
parameterType=
"TProductDrawing"
resultMap=
"TProductDrawingResult"
>
SELECT
draw.*,
(select nick_name from sys_user us where us.user_id = draw.create_id) as createBy
FROM
t_product_inspect_detail detail
LEFT JOIN t_product_device dev ON dev.inspect_id = detail.inspect_id
LEFT JOIN t_product_drawing draw ON draw.id = detail.type_id
<where>
dev.id = #{deviceId} AND detail.type = '1'
<if
test=
"title != null and title != ''"
>
and draw.title like concat('%', #{title}, '%')
</if>
<if
test=
"drawingNo != null and drawingNo != ''"
>
and draw.drawing_no like concat('%', #{drawingNo}, '%')
</if>
<if
test=
"cateId != null and cateId != ''"
>
and cate_id = #{cateId}
</if>
</where>
</select>
</mapper>
</mapper>
\ No newline at end of file
digital-management-system/src/main/resources/mapper/track/TProductStoreMapper.xml
View file @
9c4fb6dd
...
@@ -100,4 +100,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -100,4 +100,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
#{id}
</foreach>
</foreach>
</delete>
</delete>
<select
id=
"getStoreInfoByDeviceId"
parameterType=
"TProductStore"
resultMap=
"TProductStoreResult"
>
SELECT
store.*,
sum(detail.number) AS useNum,
(select nick_name from sys_user us where us.user_id = store.create_id) as createBy
FROM
t_product_inspect_detail detail
LEFT JOIN t_product_device dev ON dev.inspect_id = detail.inspect_id
LEFT JOIN t_product_store store ON store.id = detail.type_id
<where>
dev.id = '1' AND detail.type = '2'
<if
test=
"title != null and title != ''"
>
and store.title like concat('%', #{title}, '%')
</if>
<if
test=
"planNo != null and planNo != ''"
>
and store.plan_no like concat('%', #{planNo}, '%')
</if>
and is_del = '0'
</where>
GROUP BY detail.type_id
</select>
</mapper>
</mapper>
\ No newline at end of file
digital-management-web/src/api/track/drawing.js
View file @
9c4fb6dd
...
@@ -60,3 +60,12 @@ export function drawInfoList(query) {
...
@@ -60,3 +60,12 @@ export function drawInfoList(query) {
params
:
query
params
:
query
})
})
}
}
//根据产品主键获取图纸信息
export
function
getDrawInfoByDeviceId
(
query
)
{
return
request
({
url
:
'/track/drawing/getDrawInfoByDeviceId'
,
method
:
'get'
,
params
:
query
})
}
digital-management-web/src/api/track/store.js
View file @
9c4fb6dd
...
@@ -69,3 +69,12 @@ export function inHouse(data) {
...
@@ -69,3 +69,12 @@ export function inHouse(data) {
data
:
data
data
:
data
})
})
}
}
//根据产品主键获取配件信息
export
function
getStoreInfoByDeviceId
(
query
)
{
return
request
({
url
:
'/track/store/getStoreInfoByDeviceId'
,
method
:
'get'
,
params
:
query
})
}
digital-management-web/src/api/track/test.js
0 → 100644
View file @
9c4fb6dd
import
request
from
'@/utils/request'
// 查询设备检测列表
export
function
listTest
(
query
)
{
return
request
({
url
:
'/track/test/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询设备检测详细
export
function
getTest
(
id
)
{
return
request
({
url
:
'/track/test/'
+
id
,
method
:
'get'
})
}
// 新增设备检测
export
function
addTest
(
data
)
{
return
request
({
url
:
'/track/test'
,
method
:
'post'
,
data
:
data
})
}
// 修改设备检测
export
function
updateTest
(
data
)
{
return
request
({
url
:
'/track/test'
,
method
:
'put'
,
data
:
data
})
}
// 删除设备检测
export
function
delTest
(
id
)
{
return
request
({
url
:
'/track/test/'
+
id
,
method
:
'delete'
})
}
// 导出设备检测
export
function
exportTest
(
query
)
{
return
request
({
url
:
'/track/test/export'
,
method
:
'get'
,
params
:
query
})
}
digital-management-web/src/views/track/device/components/DetailInfo.vue
View file @
9c4fb6dd
<
template
>
<
template
>
<el-dialog
title=
"详情"
:visible
.
sync=
"detailOpen"
width=
"800px"
append-to-body
destroy-on-close
:close-on-click-modal=
"false"
>
<el-dialog
title=
"详情"
:visible
.
sync=
"detailOpen"
width=
"1000px"
append-to-body
:close-on-click-modal=
"false"
>
<el-form
label-width=
"90px"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
<el-row
class=
"el-row-table"
>
<el-tab-pane
label=
"设备详情"
name=
"deviceInfo"
>
<el-col
:span=
"12"
>
<DeviceInfo
v-if=
"'deviceInfo' == activeName"
:deviceId=
"deviceId"
/>
<el-form-item
label=
"批次号"
>
</el-tab-pane>
<span
v-if=
"detailInfo.batchNo"
>
{{
detailInfo
.
batchNo
}}
</span>
<el-tab-pane
label=
"图纸信息"
name=
"draw"
>
<span
v-else
>
-
</span>
<DrawInfo
v-if=
"'draw' == activeName"
:deviceId=
"deviceId"
/>
</el-form-item>
</el-tab-pane>
</el-col>
<el-tab-pane
label=
"配件信息"
name=
"store"
>
<StoreInfo
v-if=
"'store' == activeName"
:deviceId=
"deviceId"
/>
<el-col
:span=
"12"
>
</el-tab-pane>
<el-form-item
label=
"设备编号"
>
<el-tab-pane
label=
"模版信息"
name=
"mark"
>
<span
v-if=
"detailInfo.deviceNo"
>
{{
detailInfo
.
deviceNo
}}
</span>
<MarkInfo
v-if=
"'mark' == activeName"
:inspectId=
"inspectId"
/>
<span
v-else
>
-
</span>
</el-tab-pane>
</el-form-item>
</el-tabs>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"设备名称"
>
<span
v-if=
"detailInfo.title"
>
{{
detailInfo
.
title
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"设备状态"
>
<span
v-if=
"detailInfo.title"
>
{{
$parent
.
statusFormat
(
detailInfo
)
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"创建时间"
>
<span
v-if=
"detailInfo.createTime"
>
{{
detailInfo
.
createTime
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"创建人"
>
<span
v-if=
"detailInfo.createBy"
>
{{
detailInfo
.
createBy
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"24"
>
<el-form-item
label=
"设备备注"
>
<span
v-if=
"detailInfo.remark"
>
{{
detailInfo
.
remark
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-dialog>
</el-dialog>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getDevice
}
from
"@/api/track/device"
;
import
DeviceInfo
from
"./DeviceInfo"
;
import
DrawInfo
from
"./DrawInfo"
;
import
StoreInfo
from
"./StoreInfo"
;
import
MarkInfo
from
"./MarkInfo"
;
export
default
{
export
default
{
name
:
"detail-info"
,
name
:
"detail-info"
,
components
:{
DeviceInfo
,
DrawInfo
,
StoreInfo
,
MarkInfo
},
data
(){
data
(){
return
{
return
{
detailOpen
:
false
,
detailOpen
:
false
,
detailInfo
:
{}
activeName
:
'deviceInfo'
,
deviceId
:
null
,
inspectId
:
null
}
}
},
},
methods
:{
methods
:{
getDetailInfo
(
id
){
handleClick
(
tab
,
event
)
{
getDevice
(
id
).
then
(
res
=>
{
console
.
log
(
tab
,
event
);
if
(
res
.
code
==
200
){
},
this
.
detailInfo
=
res
.
data
;
getDetailInfo
(
row
){
this
.
detailOpen
=
true
;
this
.
deviceId
=
row
.
id
;
}
this
.
inspectId
=
row
.
inspectId
;
})
this
.
activeName
=
"deviceInfo"
;
this
.
detailOpen
=
true
;
}
}
}
}
}
}
...
...
digital-management-web/src/views/track/device/components/DeviceInfo.vue
0 → 100644
View file @
9c4fb6dd
<
template
>
<el-form
label-width=
"90px"
>
<el-row
class=
"el-row-table"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"批次号"
>
<span
v-if=
"detailInfo.batchNo"
>
{{
detailInfo
.
batchNo
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"设备编号"
>
<span
v-if=
"detailInfo.deviceNo"
>
{{
detailInfo
.
deviceNo
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"设备名称"
>
<span
v-if=
"detailInfo.title"
>
{{
detailInfo
.
title
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"设备状态"
>
<span
v-if=
"detailInfo.title"
>
{{
statusFormat
(
detailInfo
)
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"创建时间"
>
<span
v-if=
"detailInfo.createTime"
>
{{
detailInfo
.
createTime
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"创建人"
>
<span
v-if=
"detailInfo.createBy"
>
{{
detailInfo
.
createBy
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"24"
>
<el-form-item
label=
"设备备注"
>
<span
v-if=
"detailInfo.remark"
>
{{
detailInfo
.
remark
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</
template
>
<
script
>
import
{
getDevice
}
from
"@/api/track/device"
;
export
default
{
name
:
"device-info"
,
props
:{
deviceId
:{
type
:
Number
}
},
data
(){
return
{
detailOpen
:
false
,
detailInfo
:
{},
statusOptions
:
[]
}
},
created
(){
this
.
getDeviceInfo
();
this
.
getDicts
(
"t_produce_device_status"
).
then
(
response
=>
{
this
.
statusOptions
=
response
.
data
;
});
},
methods
:{
// 设备状态字典翻译
statusFormat
(
row
,
column
)
{
return
this
.
selectDictLabel
(
this
.
statusOptions
,
row
.
status
);
},
getDeviceInfo
(){
getDevice
(
this
.
deviceId
).
then
(
res
=>
{
if
(
res
.
code
==
200
){
this
.
detailInfo
=
res
.
data
;
}
})
}
}
}
</
script
>
<
style
scoped
>
</
style
>
digital-management-web/src/views/track/device/components/DeviceTest.vue
0 → 100644
View file @
9c4fb6dd
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"检测项"
prop=
"title"
>
<el-select
v-model=
"queryParams.title"
placeholder=
"请选择检测项"
clearable
size=
"small"
>
<el-option
v-for=
"dict in titleOptions"
:key=
"dict.dictValue"
:label=
"dict.dictLabel"
:value=
"dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"检测状态"
prop=
"status"
>
<el-select
v-model=
"queryParams.status"
placeholder=
"请选择检测状态"
clearable
size=
"small"
>
<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-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=
"success"
plain
icon=
"el-icon-edit"
size=
"mini"
:disabled=
"single"
@
click=
"handleUpdate"
>
修改
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"danger"
plain
icon=
"el-icon-delete"
size=
"mini"
:disabled=
"multiple"
@
click=
"handleDelete"
>
删除
</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=
"testList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"检测项"
align=
"center"
prop=
"title"
:formatter=
"titleFormat"
/>
<el-table-column
label=
"检测状态"
align=
"center"
prop=
"status"
:formatter=
"statusFormat"
/>
<el-table-column
label=
"检测备注"
align=
"center"
prop=
"remark"
show-overflow-tooltip
>
<template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.remark"
>
{{
scope
.
row
.
remark
}}
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
createTime
,
'{y
}
-{m
}
-{d
}
{h
}
:{m
}
:{s
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"创建人"
align
=
"center"
prop
=
"createBy"
/>
<
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
destroy
-
on
-
close
:
close
-
on
-
click
-
modal
=
"false"
>
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
label
-
width
=
"80px"
>
<
el
-
row
class
=
"el-row-table"
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"检测项"
prop
=
"title"
>
<
el
-
select
style
=
"width: 100%"
v
-
model
=
"form.title"
placeholder
=
"请选择检测项"
>
<
el
-
option
v
-
for
=
"dict in titleOptions"
:
key
=
"dict.dictValue"
:
label
=
"dict.dictLabel"
:
value
=
"dict.dictValue"
/>
<
/el-select
>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"检测状态"
prop
=
"status"
>
<
el
-
select
style
=
"width: 100%"
v
-
model
=
"form.status"
placeholder
=
"请选择检测状态"
>
<
el
-
option
v
-
for
=
"dict in statusOptions"
:
key
=
"dict.dictValue"
:
label
=
"dict.dictLabel"
:
value
=
"dict.dictValue"
/>
<
/el-select
>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"24"
>
<
el
-
form
-
item
label
=
"检测备注"
prop
=
"remark"
>
<
el
-
input
v
-
model
=
"form.remark"
:
autosize
=
"{ minRows: 3
}
"
type
=
"textarea"
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
{
listTest
,
getTest
,
delTest
,
addTest
,
updateTest
,
exportTest
}
from
"@/api/track/test"
;
export
default
{
name
:
"device-test"
,
props
:{
param
:{
type
:
Object
}
}
,
components
:
{
}
,
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 导出遮罩层
exportLoading
:
false
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 设备检测表格数据
testList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 检测项字典
titleOptions
:
[],
// 检测状态字典
statusOptions
:
[],
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
deviceId
:
null
,
title
:
null
,
status
:
null
,
}
,
// 表单参数
form
:
{
}
,
// 表单校验
rules
:
{
title
:
[
{
required
:
true
,
message
:
"检测项不能为空"
,
trigger
:
"blur"
}
],
status
:
[
{
required
:
true
,
message
:
"检测状态不能为空"
,
trigger
:
"blur"
}
],
}
}
;
}
,
created
()
{
this
.
queryParams
.
deviceId
=
this
.
param
.
deviceId
;
this
.
getList
();
this
.
getDicts
(
"device_test_item"
).
then
(
response
=>
{
this
.
titleOptions
=
response
.
data
;
}
);
this
.
getDicts
(
"device_test_status"
).
then
(
response
=>
{
this
.
statusOptions
=
response
.
data
;
}
);
}
,
methods
:
{
/** 查询设备检测列表 */
getList
()
{
this
.
loading
=
true
;
listTest
(
this
.
queryParams
).
then
(
response
=>
{
this
.
testList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
}
);
}
,
// 检测项字典翻译
titleFormat
(
row
,
column
)
{
return
this
.
selectDictLabel
(
this
.
titleOptions
,
row
.
title
);
}
,
// 检测状态字典翻译
statusFormat
(
row
,
column
)
{
return
this
.
selectDictLabel
(
this
.
statusOptions
,
row
.
status
);
}
,
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
}
,
// 表单重置
reset
()
{
this
.
form
=
{
id
:
null
,
deviceId
:
null
,
title
:
"0"
,
status
:
"0"
,
remark
:
null
,
createTime
:
null
,
createId
:
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
.
id
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
}
,
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"添加设备检测"
;
}
,
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
id
=
row
.
id
||
this
.
ids
getTest
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"修改设备检测"
;
}
);
}
,
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
id
!=
null
)
{
updateTest
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
}
);
}
else
{
this
.
form
.
deviceId
=
this
.
param
.
deviceId
;
addTest
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
}
);
}
}
}
);
}
,
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
;
this
.
$confirm
(
'是否确认删除设备检测编号为"'
+
ids
+
'"的数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}
).
then
(
function
()
{
return
delTest
(
ids
);
}
).
then
(()
=>
{
this
.
getList
();
this
.
msgSuccess
(
"删除成功"
);
}
).
catch
(()
=>
{
}
);
}
,
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
this
.
queryParams
;
this
.
$confirm
(
'是否确认导出所有设备检测数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}
).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportTest
(
queryParams
);
}
).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
exportLoading
=
false
;
}
).
catch
(()
=>
{
}
);
}
}
}
;
<
/script
>
digital-management-web/src/views/track/device/components/DrawInfo.vue
0 → 100644
View file @
9c4fb6dd
<
template
>
<div
style=
"margin-bottom: 20px"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
label-width=
"68px"
>
<el-form-item
label=
"图纸名称"
prop=
"title"
>
<el-input
v-model=
"queryParams.title"
placeholder=
"请输入图纸名称"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"图纸编号"
prop=
"drawingNo"
>
<el-input
v-model=
"queryParams.drawingNo"
placeholder=
"请输入图纸编号"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"图纸分类"
prop=
"cateId"
>
<el-select
v-model=
"queryParams.cateId"
placeholder=
"请选择图纸分类"
clearable
size=
"small"
>
<el-option
v-for=
"dict in cateIdOptions"
:key=
"dict.dictValue"
:label=
"dict.dictLabel"
:value=
"dict.dictValue"
/>
</el-select>
</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-table
v-loading=
"loading"
:data=
"drawingList"
>
<el-table-column
label=
"图纸名称"
align=
"center"
prop=
"title"
show-overflow-tooltip
/>
<el-table-column
label=
"图纸编号"
align=
"center"
prop=
"drawingNo"
show-overflow-tooltip
/>
<el-table-column
label=
"图纸型号"
align=
"center"
prop=
"model"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.source"
>
{{
scope
.
row
.
source
}}
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"版本号"
align=
"center"
prop=
"version"
/>
<el-table-column
label=
"图纸分类"
align=
"center"
prop=
"cateId"
:formatter=
"cateIdFormat"
/>
<el-table-column
label=
"图纸来源"
align=
"center"
prop=
"source"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.source"
>
{{
scope
.
row
.
source
}}
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"图纸附件"
align=
"center"
prop=
"fileUrl"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.fileUrl"
>
<a
style=
"color: #1c84c6"
:href=
"JSON.parse(scope.row.fileUrl).url"
target=
"_blank"
>
查看/下载
</a>
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
show-overflow-tooltip
/>
<el-table-column
label=
"创建人"
align=
"center"
prop=
"createBy"
/>
<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-document"
@
click=
"handleDetail(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"
/>
<!-- 详情 -->
<DetailInfo
ref=
"detail"
/>
</div>
</template>
<
script
>
import
{
getDrawInfoByDeviceId
}
from
"@/api/track/drawing"
;
import
DetailInfo
from
"../../draw/components/DetailInfo"
;
export
default
{
name
:
"draw-info"
,
props
:{
deviceId
:{
type
:
Number
}
},
components
:{
DetailInfo
},
data
(){
return
{
// 总条数
total
:
0
,
loading
:
false
,
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
title
:
null
,
drawingNo
:
null
,
cateId
:
null
,
},
drawingList
:[],
cateIdOptions
:
[]
}
},
created
(){
this
.
getDicts
(
"t_draw_type"
).
then
(
response
=>
{
this
.
cateIdOptions
=
response
.
data
;
});
this
.
queryParams
.
deviceId
=
this
.
deviceId
;
this
.
getList
();
},
methods
:{
getList
()
{
this
.
loading
=
true
;
getDrawInfoByDeviceId
(
this
.
queryParams
).
then
(
response
=>
{
this
.
drawingList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
// 图纸分类字典翻译
cateIdFormat
(
row
,
column
)
{
return
this
.
selectDictLabel
(
this
.
cateIdOptions
,
row
.
cateId
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
},
//详情
handleDetail
(
row
){
this
.
$refs
.
detail
.
getDetailInfo
(
row
.
id
);
}
}
}
</
script
>
<
style
scoped
>
</
style
>
digital-management-web/src/views/track/device/components/MarkInfo.vue
0 → 100644
View file @
9c4fb6dd
<
template
>
<div
style=
"margin-bottom: 20px"
>
<div
class=
"title"
>
模版信息
</div>
<el-form
label-width=
"80px"
>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"模板名称"
>
<span
v-if=
"markInfo.title"
>
{{
markInfo
.
title
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"模板描述"
>
<span
v-if=
"markInfo.content"
>
{{
markInfo
.
content
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"创建时间"
>
<span
v-if=
"markInfo.createTime"
>
{{
markInfo
.
createTime
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"创建人"
>
<span
v-if=
"markInfo.createBy"
>
{{
markInfo
.
createBy
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div
class=
"title"
>
模版详情
</div>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
label-width=
"68px"
>
<el-form-item
label=
"装配标题"
prop=
"title"
>
<el-input
v-model=
"queryParams.title"
placeholder=
"请输入装配标题"
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-table
v-loading=
"loading"
:data=
"detailList"
>
<el-table-column
label=
"装配标题"
align=
"center"
prop=
"title"
/>
<el-table-column
label=
"装配序号"
align=
"center"
prop=
"orders"
/>
<el-table-column
label=
"装配描述"
align=
"center"
prop=
"content"
show-overflow-tooltip
/>
<el-table-column
label=
"装配图片"
align=
"center"
prop=
"imgUrl"
>
<template
slot-scope=
"scope"
>
<el-image
v-if=
"scope.row.imgUrl"
:src=
"scope.row.imgUrl"
:preview-src-list=
"[scope.row.imgUrl]"
:z-index=
"9999"
style=
"width: 30px;height: 30px;"
></el-image>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
show-overflow-tooltip
/>
<el-table-column
label=
"创建人"
align=
"center"
prop=
"createBy"
/>
<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-document"
@
click=
"handleDetail(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=
"getMarkDetail"
/>
<!-- 详情 -->
<DetailInfo
ref=
"detail"
/>
</div>
</template>
<
script
>
import
{
listDetail
}
from
"@/api/track/executeDetail"
;
import
{
getMark
}
from
"@/api/track/mark"
;
import
{
listDetail
as
markDetailList
}
from
"@/api/track/detail"
;
import
DetailInfo
from
"../../mark/detail/components/DetailInfo"
;
export
default
{
name
:
"mark-info"
,
props
:{
inspectId
:
{
type
:
Number
}
},
components
:{
DetailInfo
},
created
(){
this
.
getExecuteDetail
();
},
data
(){
return
{
total
:
0
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
markId
:
null
,
orders
:
null
,
title
:
null
,
},
markInfo
:
{},
loading
:
false
,
detailList
:
[]
}
},
methods
:{
getExecuteDetail
(){
listDetail
({
inspectId
:
this
.
inspectId
,
type
:
3
}).
then
(
res
=>
{
this
.
getMarkInfo
(
res
.
rows
[
0
].
typeId
);
this
.
queryParams
.
markId
=
res
.
rows
[
0
].
typeId
;
this
.
getMarkDetail
();
})
},
//模版信息
getMarkInfo
(
typeId
){
getMark
(
typeId
).
then
(
res
=>
{
this
.
markInfo
=
res
.
data
;
})
},
//模版步骤
getMarkDetail
(){
this
.
loading
=
true
;
markDetailList
(
this
.
queryParams
).
then
(
res
=>
{
this
.
detailList
=
res
.
rows
;
this
.
total
=
res
.
total
;
this
.
loading
=
false
;
})
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getMarkDetail
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
},
//详情
handleDetail
(
row
){
this
.
$refs
.
detail
.
getDetailInfo
(
row
.
id
);
},
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.title
{
margin-bottom
:
15px
;
font-size
:
18px
;
font-weight
:
bold
;
}
</
style
>
digital-management-web/src/views/track/device/components/StoreInfo.vue
0 → 100644
View file @
9c4fb6dd
<
template
>
<div
style=
"margin-bottom: 20px"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
label-width=
"68px"
>
<el-form-item
label=
"配件名称"
prop=
"title"
>
<el-input
v-model=
"queryParams.title"
placeholder=
"请输入配件名称"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"配件编号"
prop=
"planNo"
>
<el-input
v-model=
"queryParams.planNo"
placeholder=
"请输入配件编号"
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-table
v-loading=
"loading"
:data=
"storeList"
>
<el-table-column
label=
"配件名称"
align=
"center"
prop=
"title"
/>
<el-table-column
label=
"配件编号"
align=
"center"
prop=
"planNo"
/>
<el-table-column
label=
"规格参数"
align=
"center"
prop=
"specs"
/>
<el-table-column
label=
"库存数量"
align=
"center"
prop=
"total"
/>
<el-table-column
label=
"产品用量"
align=
"center"
prop=
"useNum"
/>
<el-table-column
label=
"供货商"
align=
"center"
prop=
"supplier"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.supplier"
>
{{
scope
.
row
.
supplier
}}
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"联系人"
align=
"center"
prop=
"username"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.username"
>
{{
scope
.
row
.
username
}}
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"联系电话"
align=
"center"
prop=
"tel"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.tel"
>
{{
scope
.
row
.
tel
}}
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
show-overflow-tooltip
/>
<el-table-column
label=
"创建人"
align=
"center"
prop=
"createBy"
show-overflow-tooltip
/>
<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-document"
@
click=
"handleDetail(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"
/>
<!-- 详情 -->
<DetailInfo
ref=
"detail"
/>
</div>
</template>
<
script
>
import
{
getStoreInfoByDeviceId
}
from
"@/api/track/store"
;
import
DetailInfo
from
"../../store/components/DetailInfo"
;
export
default
{
name
:
"store-info"
,
props
:{
deviceId
:{
type
:
Number
}
},
components
:{
DetailInfo
},
data
(){
return
{
// 总条数
total
:
0
,
// 遮罩层
loading
:
true
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
title
:
null
,
planNo
:
null
,
},
storeList
:
[]
}
},
created
(){
this
.
queryParams
.
deviceId
=
this
.
deviceId
;
this
.
getList
();
},
methods
:{
/** 查询配件列表 */
getList
()
{
this
.
loading
=
true
;
getStoreInfoByDeviceId
(
this
.
queryParams
).
then
(
response
=>
{
this
.
storeList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
},
//详情
handleDetail
(
row
){
this
.
$refs
.
detail
.
getDetailInfo
(
row
.
id
);
},
}
}
</
script
>
<
style
scoped
>
</
style
>
digital-management-web/src/views/track/device/components/index.vue
0 → 100644
View file @
9c4fb6dd
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"设备编号"
prop=
"deviceId"
>
<el-input
v-model=
"queryParams.deviceId"
placeholder=
"请输入设备编号"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"检测项"
prop=
"title"
>
<el-select
v-model=
"queryParams.title"
placeholder=
"请选择检测项"
clearable
size=
"small"
>
<el-option
v-for=
"dict in titleOptions"
:key=
"dict.dictValue"
:label=
"dict.dictLabel"
:value=
"dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"检测状态"
prop=
"status"
>
<el-select
v-model=
"queryParams.status"
placeholder=
"请选择检测状态"
clearable
size=
"small"
>
<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-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=
"success"
plain
icon=
"el-icon-edit"
size=
"mini"
:disabled=
"single"
@
click=
"handleUpdate"
>
修改
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"danger"
plain
icon=
"el-icon-delete"
size=
"mini"
:disabled=
"multiple"
@
click=
"handleDelete"
>
删除
</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=
"testList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"检测状态"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"设备编号"
align=
"center"
prop=
"deviceId"
/>
<el-table-column
label=
"检测项"
align=
"center"
prop=
"title"
:formatter=
"titleFormat"
/>
<el-table-column
label=
"检测状态"
align=
"center"
prop=
"status"
:formatter=
"statusFormat"
/>
<el-table-column
label=
"检测备注"
align=
"center"
prop=
"remark"
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"180"
>
<template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
createTime
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"创建人"
align
=
"center"
prop
=
"createId"
/>
<
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
destroy
-
on
-
close
:
close
-
on
-
click
-
modal
=
"false"
>
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
label
-
width
=
"80px"
>
<
el
-
form
-
item
label
=
"设备编号"
prop
=
"deviceId"
>
<
el
-
input
v
-
model
=
"form.deviceId"
placeholder
=
"请输入设备编号"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"检测项"
>
<
el
-
radio
-
group
v
-
model
=
"form.title"
>
<
el
-
radio
v
-
for
=
"dict in titleOptions"
:
key
=
"dict.dictValue"
:
label
=
"dict.dictValue"
>
{{
dict
.
dictLabel
}}
<
/el-radio
>
<
/el-radio-group
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"检测状态"
>
<
el
-
radio
-
group
v
-
model
=
"form.status"
>
<
el
-
radio
v
-
for
=
"dict in statusOptions"
:
key
=
"dict.dictValue"
:
label
=
"dict.dictValue"
>
{{
dict
.
dictLabel
}}
<
/el-radio
>
<
/el-radio-group
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"检测备注"
prop
=
"remark"
>
<
el
-
input
v
-
model
=
"form.remark"
:
autosize
=
"{ minRows: 3
}
"
type
=
"textarea"
placeholder
=
"请输入内容"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"创建人"
prop
=
"createId"
>
<
el
-
input
v
-
model
=
"form.createId"
placeholder
=
"请输入创建人"
/>
<
/el-form-item
>
<
/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
{
listTest
,
getTest
,
delTest
,
addTest
,
updateTest
,
exportTest
}
from
"@/api/track/test"
;
export
default
{
name
:
"Test"
,
components
:
{
}
,
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 导出遮罩层
exportLoading
:
false
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 设备检测表格数据
testList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 检测项字典
titleOptions
:
[],
// 检测状态字典
statusOptions
:
[],
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
deviceId
:
null
,
title
:
null
,
status
:
null
,
}
,
// 表单参数
form
:
{
}
,
// 表单校验
rules
:
{
title
:
[
{
required
:
true
,
message
:
"检测项不能为空"
,
trigger
:
"blur"
}
],
status
:
[
{
required
:
true
,
message
:
"检测状态不能为空"
,
trigger
:
"blur"
}
],
}
}
;
}
,
created
()
{
this
.
getList
();
this
.
getDicts
(
"device_test_item"
).
then
(
response
=>
{
this
.
titleOptions
=
response
.
data
;
}
);
this
.
getDicts
(
"devcie_test_status"
).
then
(
response
=>
{
this
.
statusOptions
=
response
.
data
;
}
);
}
,
methods
:
{
/** 查询设备检测列表 */
getList
()
{
this
.
loading
=
true
;
listTest
(
this
.
queryParams
).
then
(
response
=>
{
this
.
testList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
}
);
}
,
// 检测项字典翻译
titleFormat
(
row
,
column
)
{
return
this
.
selectDictLabel
(
this
.
titleOptions
,
row
.
title
);
}
,
// 检测状态字典翻译
statusFormat
(
row
,
column
)
{
return
this
.
selectDictLabel
(
this
.
statusOptions
,
row
.
status
);
}
,
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
}
,
// 表单重置
reset
()
{
this
.
form
=
{
id
:
null
,
deviceId
:
null
,
title
:
"0"
,
status
:
"0"
,
remark
:
null
,
createTime
:
null
,
createId
:
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
.
id
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
}
,
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"添加设备检测"
;
}
,
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
id
=
row
.
id
||
this
.
ids
getTest
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"修改设备检测"
;
}
);
}
,
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
id
!=
null
)
{
updateTest
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
}
);
}
else
{
addTest
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
}
);
}
}
}
);
}
,
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
;
this
.
$confirm
(
'是否确认删除设备检测编号为"'
+
ids
+
'"的数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}
).
then
(
function
()
{
return
delTest
(
ids
);
}
).
then
(()
=>
{
this
.
getList
();
this
.
msgSuccess
(
"删除成功"
);
}
).
catch
(()
=>
{
}
);
}
,
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
this
.
queryParams
;
this
.
$confirm
(
'是否确认导出所有设备检测数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}
).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportTest
(
queryParams
);
}
).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
exportLoading
=
false
;
}
).
catch
(()
=>
{
}
);
}
}
}
;
<
/script
>
digital-management-web/src/views/track/device/index.vue
View file @
9c4fb6dd
...
@@ -124,6 +124,11 @@
...
@@ -124,6 +124,11 @@
type
=
"text"
type
=
"text"
@
click
=
"handleAssemble(scope.row)"
@
click
=
"handleAssemble(scope.row)"
>
装配
<
/el-button
>
>
装配
<
/el-button
>
<
el
-
button
size
=
"mini"
type
=
"text"
@
click
=
"handleTest(scope.row)"
>
检测
<
/el-button
>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<
/el-table
>
<
/el-table
>
...
@@ -142,7 +147,13 @@
...
@@ -142,7 +147,13 @@
<
el
-
row
class
=
"el-row-table"
>
<
el
-
row
class
=
"el-row-table"
>
<
el
-
col
:
span
=
"12"
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"批次号"
prop
=
"inspectId"
>
<
el
-
form
-
item
label
=
"批次号"
prop
=
"inspectId"
>
<
el
-
select
style
=
"width:100%"
v
-
model
=
"form.inspectId"
placeholder
=
"请选择批次号"
clearable
size
=
"small"
>
<
el
-
select
style
=
"width:100%"
v
-
model
=
"form.inspectId"
placeholder
=
"请选择批次号"
clearable
size
=
"small"
@
change
=
"batchNoChange"
>
<
el
-
option
<
el
-
option
v
-
for
=
"execute in executeData"
v
-
for
=
"execute in executeData"
:
key
=
"execute.id"
:
key
=
"execute.id"
...
@@ -196,7 +207,7 @@
...
@@ -196,7 +207,7 @@
<
DetailInfo
ref
=
"detail"
/>
<
DetailInfo
ref
=
"detail"
/>
<!--
操作
-->
<!--
操作
-->
<
el
-
dialog
title
=
"装配详情
"
:
visible
.
sync
=
"operateOpen"
width
=
"1000px"
append
-
to
-
body
destroy
-
on
-
close
:
close
-
on
-
click
-
modal
=
"false"
>
<
el
-
dialog
:
title
=
"operateTitle
"
:
visible
.
sync
=
"operateOpen"
width
=
"1000px"
append
-
to
-
body
destroy
-
on
-
close
:
close
-
on
-
click
-
modal
=
"false"
>
<
components
<
components
:
param
=
"operateParam"
:
param
=
"operateParam"
v
-
if
=
"operateOpen"
v
-
if
=
"operateOpen"
...
@@ -212,11 +223,13 @@ import { listDevice, getDevice, delDevice, addDevice, updateDevice, exportDevice
...
@@ -212,11 +223,13 @@ import { listDevice, getDevice, delDevice, addDevice, updateDevice, exportDevice
import
{
executeInfoList
}
from
"@/api/track/execute"
;
import
{
executeInfoList
}
from
"@/api/track/execute"
;
import
DetailInfo
from
"./components/DetailInfo"
;
import
DetailInfo
from
"./components/DetailInfo"
;
import
Assemble
from
"./components/Assemble"
;
import
Assemble
from
"./components/Assemble"
;
import
DeviceTest
from
"./components/DeviceTest"
;
export
default
{
export
default
{
name
:
"Device"
,
name
:
"Device"
,
components
:
{
components
:
{
DetailInfo
,
DetailInfo
,
Assemble
Assemble
,
DeviceTest
}
,
}
,
data
()
{
data
()
{
return
{
return
{
...
@@ -269,7 +282,8 @@ export default {
...
@@ -269,7 +282,8 @@ export default {
executeData
:
[],
executeData
:
[],
operateComponent
:
null
,
operateComponent
:
null
,
operateOpen
:
false
,
operateOpen
:
false
,
operateParam
:
{
}
operateParam
:
{
}
,
operateTitle
:
""
}
;
}
;
}
,
}
,
created
()
{
created
()
{
...
@@ -407,14 +421,26 @@ export default {
...
@@ -407,14 +421,26 @@ export default {
}
,
}
,
//详情
//详情
handleDetail
(
row
){
handleDetail
(
row
){
this
.
$refs
.
detail
.
getDetailInfo
(
row
.
id
);
this
.
$refs
.
detail
.
getDetailInfo
(
row
);
}
,
}
,
//装配
//装配
handleAssemble
(
row
){
handleAssemble
(
row
){
this
.
operateTitle
=
"装配详情"
;
this
.
operateParam
=
{
deviceId
:
row
.
id
}
;
this
.
operateParam
=
{
deviceId
:
row
.
id
}
;
this
.
operateComponent
=
Assemble
;
this
.
operateComponent
=
Assemble
;
this
.
operateOpen
=
true
;
this
.
operateOpen
=
true
;
}
,
handleTest
(
row
){
this
.
operateTitle
=
"测试详情"
;
this
.
operateParam
=
{
deviceId
:
row
.
id
}
;
this
.
operateComponent
=
DeviceTest
;
this
.
operateOpen
=
true
;
}
,
batchNoChange
(){
let
info
=
this
.
executeData
.
find
(
item
=>
item
.
id
==
this
.
form
.
inspectId
);
if
(
info
){
this
.
form
.
planId
=
info
.
planId
}
}
}
}
}
}
;
}
;
...
...
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