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
06c33762
Commit
06c33762
authored
Aug 24, 2024
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
装配模版库
parent
d7658991
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
1789 additions
and
0 deletions
+1789
-0
TProductMarkController.java
...m/zehong/web/controller/track/TProductMarkController.java
+103
-0
TProductMarkDetailController.java
...ng/web/controller/track/TProductMarkDetailController.java
+103
-0
TProductMark.java
...ain/java/com/zehong/system/domain/track/TProductMark.java
+79
-0
TProductMarkDetail.java
...va/com/zehong/system/domain/track/TProductMarkDetail.java
+120
-0
TProductMarkDetailMapper.java
.../zehong/system/mapper/track/TProductMarkDetailMapper.java
+61
-0
TProductMarkMapper.java
...va/com/zehong/system/mapper/track/TProductMarkMapper.java
+61
-0
TProductMarkDetailServiceImpl.java
...tem/service/impl/track/TProductMarkDetailServiceImpl.java
+97
-0
TProductMarkServiceImpl.java
...ng/system/service/impl/track/TProductMarkServiceImpl.java
+97
-0
ITProductMarkDetailService.java
...hong/system/service/track/ITProductMarkDetailService.java
+61
-0
ITProductMarkService.java
...com/zehong/system/service/track/ITProductMarkService.java
+61
-0
TProductMarkDetailMapper.xml
.../main/resources/mapper/track/TProductMarkDetailMapper.xml
+83
-0
TProductMarkMapper.xml
...em/src/main/resources/mapper/track/TProductMarkMapper.xml
+69
-0
detail.js
digital-management-web/src/api/track/detail.js
+53
-0
mark.js
digital-management-web/src/api/track/mark.js
+53
-0
DetailInfo.vue
...web/src/views/track/mark/detail/components/DetailInfo.vue
+69
-0
index.vue
digital-management-web/src/views/track/mark/detail/index.vue
+335
-0
index.vue
digital-management-web/src/views/track/mark/index.vue
+284
-0
No files found.
digital-management-admin/src/main/java/com/zehong/web/controller/track/TProductMarkController.java
0 → 100644
View file @
06c33762
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.TProductMark
;
import
com.zehong.system.service.track.ITProductMarkService
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.common.core.page.TableDataInfo
;
/**
* 装配模板Controller
*
* @author zehong
* @date 2024-08-23
*/
@RestController
@RequestMapping
(
"/track/mark"
)
public
class
TProductMarkController
extends
BaseController
{
@Autowired
private
ITProductMarkService
tProductMarkService
;
/**
* 查询装配模板列表
*/
// @PreAuthorize("@ss.hasPermi('system:mark:list')")
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
TProductMark
tProductMark
)
{
startPage
();
List
<
TProductMark
>
list
=
tProductMarkService
.
selectTProductMarkList
(
tProductMark
);
return
getDataTable
(
list
);
}
/**
* 导出装配模板列表
*/
//@PreAuthorize("@ss.hasPermi('system:mark:export')")
@Log
(
title
=
"装配模板"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TProductMark
tProductMark
)
{
List
<
TProductMark
>
list
=
tProductMarkService
.
selectTProductMarkList
(
tProductMark
);
ExcelUtil
<
TProductMark
>
util
=
new
ExcelUtil
<
TProductMark
>(
TProductMark
.
class
);
return
util
.
exportExcel
(
list
,
"装配模板数据"
);
}
/**
* 获取装配模板详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:mark:query')")
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
AjaxResult
.
success
(
tProductMarkService
.
selectTProductMarkById
(
id
));
}
/**
* 新增装配模板
*/
//@PreAuthorize("@ss.hasPermi('system:mark:add')")
@Log
(
title
=
"装配模板"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
TProductMark
tProductMark
)
{
return
toAjax
(
tProductMarkService
.
insertTProductMark
(
tProductMark
));
}
/**
* 修改装配模板
*/
//@PreAuthorize("@ss.hasPermi('system:mark:edit')")
@Log
(
title
=
"装配模板"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
TProductMark
tProductMark
)
{
return
toAjax
(
tProductMarkService
.
updateTProductMark
(
tProductMark
));
}
/**
* 删除装配模板
*/
//@PreAuthorize("@ss.hasPermi('system:mark:remove')")
@Log
(
title
=
"装配模板"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
tProductMarkService
.
deleteTProductMarkByIds
(
ids
));
}
}
digital-management-admin/src/main/java/com/zehong/web/controller/track/TProductMarkDetailController.java
0 → 100644
View file @
06c33762
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.TProductMarkDetail
;
import
com.zehong.system.service.track.ITProductMarkDetailService
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.common.core.page.TableDataInfo
;
/**
* 装配详情Controller
*
* @author zehong
* @date 2024-08-24
*/
@RestController
@RequestMapping
(
"/track/detail"
)
public
class
TProductMarkDetailController
extends
BaseController
{
@Autowired
private
ITProductMarkDetailService
tProductMarkDetailService
;
/**
* 查询装配详情列表
*/
// @PreAuthorize("@ss.hasPermi('system:detail:list')")
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
TProductMarkDetail
tProductMarkDetail
)
{
startPage
();
List
<
TProductMarkDetail
>
list
=
tProductMarkDetailService
.
selectTProductMarkDetailList
(
tProductMarkDetail
);
return
getDataTable
(
list
);
}
/**
* 导出装配详情列表
*/
//@PreAuthorize("@ss.hasPermi('system:detail:export')")
@Log
(
title
=
"装配详情"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TProductMarkDetail
tProductMarkDetail
)
{
List
<
TProductMarkDetail
>
list
=
tProductMarkDetailService
.
selectTProductMarkDetailList
(
tProductMarkDetail
);
ExcelUtil
<
TProductMarkDetail
>
util
=
new
ExcelUtil
<
TProductMarkDetail
>(
TProductMarkDetail
.
class
);
return
util
.
exportExcel
(
list
,
"装配详情数据"
);
}
/**
* 获取装配详情详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:detail:query')")
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
AjaxResult
.
success
(
tProductMarkDetailService
.
selectTProductMarkDetailById
(
id
));
}
/**
* 新增装配详情
*/
//@PreAuthorize("@ss.hasPermi('system:detail:add')")
@Log
(
title
=
"装配详情"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
TProductMarkDetail
tProductMarkDetail
)
{
return
toAjax
(
tProductMarkDetailService
.
insertTProductMarkDetail
(
tProductMarkDetail
));
}
/**
* 修改装配详情
*/
//@PreAuthorize("@ss.hasPermi('system:detail:edit')")
@Log
(
title
=
"装配详情"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
TProductMarkDetail
tProductMarkDetail
)
{
return
toAjax
(
tProductMarkDetailService
.
updateTProductMarkDetail
(
tProductMarkDetail
));
}
/**
* 删除装配详情
*/
//@PreAuthorize("@ss.hasPermi('system:detail:remove')")
@Log
(
title
=
"装配详情"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
tProductMarkDetailService
.
deleteTProductMarkDetailByIds
(
ids
));
}
}
digital-management-system/src/main/java/com/zehong/system/domain/track/TProductMark.java
0 → 100644
View file @
06c33762
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_mark
*
* @author zehong
* @date 2024-08-23
*/
public
class
TProductMark
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** $column.columnComment */
private
Long
id
;
/** 模板名称 */
@Excel
(
name
=
"模板名称"
)
private
String
title
;
/** 模板描述 */
@Excel
(
name
=
"模板描述"
)
private
String
content
;
/** $column.columnComment */
private
Long
createId
;
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
String
getTitle
()
{
return
title
;
}
public
void
setContent
(
String
content
)
{
this
.
content
=
content
;
}
public
String
getContent
()
{
return
content
;
}
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
(
"title"
,
getTitle
())
.
append
(
"content"
,
getContent
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"createId"
,
getCreateId
())
.
toString
();
}
}
digital-management-system/src/main/java/com/zehong/system/domain/track/TProductMarkDetail.java
0 → 100644
View file @
06c33762
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_mark_detail
*
* @author zehong
* @date 2024-08-24
*/
public
class
TProductMarkDetail
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** $column.columnComment */
private
Long
id
;
/** 模板编号 */
private
Long
markId
;
/** 装配序号 */
@Excel
(
name
=
"装配序号"
)
private
Long
orders
;
/** 装配标题 */
@Excel
(
name
=
"装配标题"
)
private
String
title
;
/** 装配描述 */
@Excel
(
name
=
"装配描述"
)
private
String
content
;
/** 装配图片 */
@Excel
(
name
=
"装配图片"
)
private
String
imgUrl
;
/** $column.columnComment */
private
Long
createId
;
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setMarkId
(
Long
markId
)
{
this
.
markId
=
markId
;
}
public
Long
getMarkId
()
{
return
markId
;
}
public
void
setOrders
(
Long
orders
)
{
this
.
orders
=
orders
;
}
public
Long
getOrders
()
{
return
orders
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
String
getTitle
()
{
return
title
;
}
public
void
setContent
(
String
content
)
{
this
.
content
=
content
;
}
public
String
getContent
()
{
return
content
;
}
public
void
setImgUrl
(
String
imgUrl
)
{
this
.
imgUrl
=
imgUrl
;
}
public
String
getImgUrl
()
{
return
imgUrl
;
}
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
(
"markId"
,
getMarkId
())
.
append
(
"orders"
,
getOrders
())
.
append
(
"title"
,
getTitle
())
.
append
(
"content"
,
getContent
())
.
append
(
"imgUrl"
,
getImgUrl
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"createId"
,
getCreateId
())
.
toString
();
}
}
digital-management-system/src/main/java/com/zehong/system/mapper/track/TProductMarkDetailMapper.java
0 → 100644
View file @
06c33762
package
com
.
zehong
.
system
.
mapper
.
track
;
import
java.util.List
;
import
com.zehong.system.domain.track.TProductMarkDetail
;
/**
* 装配详情Mapper接口
*
* @author zehong
* @date 2024-08-24
*/
public
interface
TProductMarkDetailMapper
{
/**
* 查询装配详情
*
* @param id 装配详情ID
* @return 装配详情
*/
public
TProductMarkDetail
selectTProductMarkDetailById
(
Long
id
);
/**
* 查询装配详情列表
*
* @param tProductMarkDetail 装配详情
* @return 装配详情集合
*/
public
List
<
TProductMarkDetail
>
selectTProductMarkDetailList
(
TProductMarkDetail
tProductMarkDetail
);
/**
* 新增装配详情
*
* @param tProductMarkDetail 装配详情
* @return 结果
*/
public
int
insertTProductMarkDetail
(
TProductMarkDetail
tProductMarkDetail
);
/**
* 修改装配详情
*
* @param tProductMarkDetail 装配详情
* @return 结果
*/
public
int
updateTProductMarkDetail
(
TProductMarkDetail
tProductMarkDetail
);
/**
* 删除装配详情
*
* @param id 装配详情ID
* @return 结果
*/
public
int
deleteTProductMarkDetailById
(
Long
id
);
/**
* 批量删除装配详情
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public
int
deleteTProductMarkDetailByIds
(
Long
[]
ids
);
}
digital-management-system/src/main/java/com/zehong/system/mapper/track/TProductMarkMapper.java
0 → 100644
View file @
06c33762
package
com
.
zehong
.
system
.
mapper
.
track
;
import
java.util.List
;
import
com.zehong.system.domain.track.TProductMark
;
/**
* 装配模板Mapper接口
*
* @author zehong
* @date 2024-08-23
*/
public
interface
TProductMarkMapper
{
/**
* 查询装配模板
*
* @param id 装配模板ID
* @return 装配模板
*/
public
TProductMark
selectTProductMarkById
(
Long
id
);
/**
* 查询装配模板列表
*
* @param tProductMark 装配模板
* @return 装配模板集合
*/
public
List
<
TProductMark
>
selectTProductMarkList
(
TProductMark
tProductMark
);
/**
* 新增装配模板
*
* @param tProductMark 装配模板
* @return 结果
*/
public
int
insertTProductMark
(
TProductMark
tProductMark
);
/**
* 修改装配模板
*
* @param tProductMark 装配模板
* @return 结果
*/
public
int
updateTProductMark
(
TProductMark
tProductMark
);
/**
* 删除装配模板
*
* @param id 装配模板ID
* @return 结果
*/
public
int
deleteTProductMarkById
(
Long
id
);
/**
* 批量删除装配模板
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public
int
deleteTProductMarkByIds
(
Long
[]
ids
);
}
digital-management-system/src/main/java/com/zehong/system/service/impl/track/TProductMarkDetailServiceImpl.java
0 → 100644
View file @
06c33762
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.TProductMarkDetailMapper
;
import
com.zehong.system.domain.track.TProductMarkDetail
;
import
com.zehong.system.service.track.ITProductMarkDetailService
;
/**
* 装配详情Service业务层处理
*
* @author zehong
* @date 2024-08-24
*/
@Service
public
class
TProductMarkDetailServiceImpl
implements
ITProductMarkDetailService
{
@Autowired
private
TProductMarkDetailMapper
tProductMarkDetailMapper
;
/**
* 查询装配详情
*
* @param id 装配详情ID
* @return 装配详情
*/
@Override
public
TProductMarkDetail
selectTProductMarkDetailById
(
Long
id
)
{
return
tProductMarkDetailMapper
.
selectTProductMarkDetailById
(
id
);
}
/**
* 查询装配详情列表
*
* @param tProductMarkDetail 装配详情
* @return 装配详情
*/
@Override
public
List
<
TProductMarkDetail
>
selectTProductMarkDetailList
(
TProductMarkDetail
tProductMarkDetail
)
{
return
tProductMarkDetailMapper
.
selectTProductMarkDetailList
(
tProductMarkDetail
);
}
/**
* 新增装配详情
*
* @param tProductMarkDetail 装配详情
* @return 结果
*/
@Override
public
int
insertTProductMarkDetail
(
TProductMarkDetail
tProductMarkDetail
)
{
tProductMarkDetail
.
setCreateTime
(
DateUtils
.
getNowDate
());
tProductMarkDetail
.
setCreateId
(
SecurityUtils
.
getLoginUser
().
getUser
().
getUserId
());
return
tProductMarkDetailMapper
.
insertTProductMarkDetail
(
tProductMarkDetail
);
}
/**
* 修改装配详情
*
* @param tProductMarkDetail 装配详情
* @return 结果
*/
@Override
public
int
updateTProductMarkDetail
(
TProductMarkDetail
tProductMarkDetail
)
{
return
tProductMarkDetailMapper
.
updateTProductMarkDetail
(
tProductMarkDetail
);
}
/**
* 批量删除装配详情
*
* @param ids 需要删除的装配详情ID
* @return 结果
*/
@Override
public
int
deleteTProductMarkDetailByIds
(
Long
[]
ids
)
{
return
tProductMarkDetailMapper
.
deleteTProductMarkDetailByIds
(
ids
);
}
/**
* 删除装配详情信息
*
* @param id 装配详情ID
* @return 结果
*/
@Override
public
int
deleteTProductMarkDetailById
(
Long
id
)
{
return
tProductMarkDetailMapper
.
deleteTProductMarkDetailById
(
id
);
}
}
digital-management-system/src/main/java/com/zehong/system/service/impl/track/TProductMarkServiceImpl.java
0 → 100644
View file @
06c33762
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.TProductMarkMapper
;
import
com.zehong.system.domain.track.TProductMark
;
import
com.zehong.system.service.track.ITProductMarkService
;
/**
* 装配模板Service业务层处理
*
* @author zehong
* @date 2024-08-23
*/
@Service
public
class
TProductMarkServiceImpl
implements
ITProductMarkService
{
@Autowired
private
TProductMarkMapper
tProductMarkMapper
;
/**
* 查询装配模板
*
* @param id 装配模板ID
* @return 装配模板
*/
@Override
public
TProductMark
selectTProductMarkById
(
Long
id
)
{
return
tProductMarkMapper
.
selectTProductMarkById
(
id
);
}
/**
* 查询装配模板列表
*
* @param tProductMark 装配模板
* @return 装配模板
*/
@Override
public
List
<
TProductMark
>
selectTProductMarkList
(
TProductMark
tProductMark
)
{
return
tProductMarkMapper
.
selectTProductMarkList
(
tProductMark
);
}
/**
* 新增装配模板
*
* @param tProductMark 装配模板
* @return 结果
*/
@Override
public
int
insertTProductMark
(
TProductMark
tProductMark
)
{
tProductMark
.
setCreateTime
(
DateUtils
.
getNowDate
());
tProductMark
.
setCreateId
(
SecurityUtils
.
getLoginUser
().
getUser
().
getUserId
());
return
tProductMarkMapper
.
insertTProductMark
(
tProductMark
);
}
/**
* 修改装配模板
*
* @param tProductMark 装配模板
* @return 结果
*/
@Override
public
int
updateTProductMark
(
TProductMark
tProductMark
)
{
return
tProductMarkMapper
.
updateTProductMark
(
tProductMark
);
}
/**
* 批量删除装配模板
*
* @param ids 需要删除的装配模板ID
* @return 结果
*/
@Override
public
int
deleteTProductMarkByIds
(
Long
[]
ids
)
{
return
tProductMarkMapper
.
deleteTProductMarkByIds
(
ids
);
}
/**
* 删除装配模板信息
*
* @param id 装配模板ID
* @return 结果
*/
@Override
public
int
deleteTProductMarkById
(
Long
id
)
{
return
tProductMarkMapper
.
deleteTProductMarkById
(
id
);
}
}
digital-management-system/src/main/java/com/zehong/system/service/track/ITProductMarkDetailService.java
0 → 100644
View file @
06c33762
package
com
.
zehong
.
system
.
service
.
track
;
import
java.util.List
;
import
com.zehong.system.domain.track.TProductMarkDetail
;
/**
* 装配详情Service接口
*
* @author zehong
* @date 2024-08-24
*/
public
interface
ITProductMarkDetailService
{
/**
* 查询装配详情
*
* @param id 装配详情ID
* @return 装配详情
*/
public
TProductMarkDetail
selectTProductMarkDetailById
(
Long
id
);
/**
* 查询装配详情列表
*
* @param tProductMarkDetail 装配详情
* @return 装配详情集合
*/
public
List
<
TProductMarkDetail
>
selectTProductMarkDetailList
(
TProductMarkDetail
tProductMarkDetail
);
/**
* 新增装配详情
*
* @param tProductMarkDetail 装配详情
* @return 结果
*/
public
int
insertTProductMarkDetail
(
TProductMarkDetail
tProductMarkDetail
);
/**
* 修改装配详情
*
* @param tProductMarkDetail 装配详情
* @return 结果
*/
public
int
updateTProductMarkDetail
(
TProductMarkDetail
tProductMarkDetail
);
/**
* 批量删除装配详情
*
* @param ids 需要删除的装配详情ID
* @return 结果
*/
public
int
deleteTProductMarkDetailByIds
(
Long
[]
ids
);
/**
* 删除装配详情信息
*
* @param id 装配详情ID
* @return 结果
*/
public
int
deleteTProductMarkDetailById
(
Long
id
);
}
digital-management-system/src/main/java/com/zehong/system/service/track/ITProductMarkService.java
0 → 100644
View file @
06c33762
package
com
.
zehong
.
system
.
service
.
track
;
import
java.util.List
;
import
com.zehong.system.domain.track.TProductMark
;
/**
* 装配模板Service接口
*
* @author zehong
* @date 2024-08-23
*/
public
interface
ITProductMarkService
{
/**
* 查询装配模板
*
* @param id 装配模板ID
* @return 装配模板
*/
public
TProductMark
selectTProductMarkById
(
Long
id
);
/**
* 查询装配模板列表
*
* @param tProductMark 装配模板
* @return 装配模板集合
*/
public
List
<
TProductMark
>
selectTProductMarkList
(
TProductMark
tProductMark
);
/**
* 新增装配模板
*
* @param tProductMark 装配模板
* @return 结果
*/
public
int
insertTProductMark
(
TProductMark
tProductMark
);
/**
* 修改装配模板
*
* @param tProductMark 装配模板
* @return 结果
*/
public
int
updateTProductMark
(
TProductMark
tProductMark
);
/**
* 批量删除装配模板
*
* @param ids 需要删除的装配模板ID
* @return 结果
*/
public
int
deleteTProductMarkByIds
(
Long
[]
ids
);
/**
* 删除装配模板信息
*
* @param id 装配模板ID
* @return 结果
*/
public
int
deleteTProductMarkById
(
Long
id
);
}
digital-management-system/src/main/resources/mapper/track/TProductMarkDetailMapper.xml
0 → 100644
View file @
06c33762
<?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.TProductMarkDetailMapper"
>
<resultMap
type=
"TProductMarkDetail"
id=
"TProductMarkDetailResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"markId"
column=
"mark_id"
/>
<result
property=
"orders"
column=
"orders"
/>
<result
property=
"title"
column=
"title"
/>
<result
property=
"content"
column=
"content"
/>
<result
property=
"imgUrl"
column=
"img_url"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"createId"
column=
"create_id"
/>
</resultMap>
<sql
id=
"selectTProductMarkDetailVo"
>
select id, mark_id, orders, title, content, img_url, create_time, create_id from t_product_mark_detail
</sql>
<select
id=
"selectTProductMarkDetailList"
parameterType=
"TProductMarkDetail"
resultMap=
"TProductMarkDetailResult"
>
<include
refid=
"selectTProductMarkDetailVo"
/>
<where>
<if
test=
"markId != null "
>
and mark_id = #{markId}
</if>
<if
test=
"orders != null "
>
and orders = #{orders}
</if>
<if
test=
"title != null and title != ''"
>
and title like concat('%', #{title}, '%')
</if>
</where>
order by orders asc
</select>
<select
id=
"selectTProductMarkDetailById"
parameterType=
"Long"
resultMap=
"TProductMarkDetailResult"
>
<include
refid=
"selectTProductMarkDetailVo"
/>
where id = #{id}
</select>
<insert
id=
"insertTProductMarkDetail"
parameterType=
"TProductMarkDetail"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into t_product_mark_detail
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"markId != null"
>
mark_id,
</if>
<if
test=
"orders != null"
>
orders,
</if>
<if
test=
"title != null and title != ''"
>
title,
</if>
<if
test=
"content != null"
>
content,
</if>
<if
test=
"imgUrl != null"
>
img_url,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"createId != null"
>
create_id,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"markId != null"
>
#{markId},
</if>
<if
test=
"orders != null"
>
#{orders},
</if>
<if
test=
"title != null and title != ''"
>
#{title},
</if>
<if
test=
"content != null"
>
#{content},
</if>
<if
test=
"imgUrl != null"
>
#{imgUrl},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"createId != null"
>
#{createId},
</if>
</trim>
</insert>
<update
id=
"updateTProductMarkDetail"
parameterType=
"TProductMarkDetail"
>
update t_product_mark_detail
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"markId != null"
>
mark_id = #{markId},
</if>
<if
test=
"orders != null"
>
orders = #{orders},
</if>
<if
test=
"title != null and title != ''"
>
title = #{title},
</if>
<if
test=
"content != null"
>
content = #{content},
</if>
<if
test=
"imgUrl != null"
>
img_url = #{imgUrl},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"createId != null"
>
create_id = #{createId},
</if>
</trim>
where id = #{id}
</update>
<delete
id=
"deleteTProductMarkDetailById"
parameterType=
"Long"
>
delete from t_product_mark_detail where id = #{id}
</delete>
<delete
id=
"deleteTProductMarkDetailByIds"
parameterType=
"String"
>
delete from t_product_mark_detail 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/TProductMarkMapper.xml
0 → 100644
View file @
06c33762
<?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.TProductMarkMapper"
>
<resultMap
type=
"TProductMark"
id=
"TProductMarkResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"title"
column=
"title"
/>
<result
property=
"content"
column=
"content"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"createId"
column=
"create_id"
/>
</resultMap>
<sql
id=
"selectTProductMarkVo"
>
select id, title, content, create_time, create_id from t_product_mark
</sql>
<select
id=
"selectTProductMarkList"
parameterType=
"TProductMark"
resultMap=
"TProductMarkResult"
>
<include
refid=
"selectTProductMarkVo"
/>
<where>
<if
test=
"title != null and title != ''"
>
and title like concat('%', #{title}, '%')
</if>
</where>
order by create_time desc
</select>
<select
id=
"selectTProductMarkById"
parameterType=
"Long"
resultMap=
"TProductMarkResult"
>
<include
refid=
"selectTProductMarkVo"
/>
where id = #{id}
</select>
<insert
id=
"insertTProductMark"
parameterType=
"TProductMark"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into t_product_mark
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"title != null and title != ''"
>
title,
</if>
<if
test=
"content != null and content != ''"
>
content,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"createId != null"
>
create_id,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"title != null and title != ''"
>
#{title},
</if>
<if
test=
"content != null and content != ''"
>
#{content},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"createId != null"
>
#{createId},
</if>
</trim>
</insert>
<update
id=
"updateTProductMark"
parameterType=
"TProductMark"
>
update t_product_mark
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"title != null and title != ''"
>
title = #{title},
</if>
<if
test=
"content != null and content != ''"
>
content = #{content},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"createId != null"
>
create_id = #{createId},
</if>
</trim>
where id = #{id}
</update>
<delete
id=
"deleteTProductMarkById"
parameterType=
"Long"
>
delete from t_product_mark where id = #{id}
</delete>
<delete
id=
"deleteTProductMarkByIds"
parameterType=
"String"
>
delete from t_product_mark where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
digital-management-web/src/api/track/detail.js
0 → 100644
View file @
06c33762
import
request
from
'@/utils/request'
// 查询装配详情列表
export
function
listDetail
(
query
)
{
return
request
({
url
:
'/track/detail/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询装配详情详细
export
function
getDetail
(
id
)
{
return
request
({
url
:
'/track/detail/'
+
id
,
method
:
'get'
})
}
// 新增装配详情
export
function
addDetail
(
data
)
{
return
request
({
url
:
'/track/detail'
,
method
:
'post'
,
data
:
data
})
}
// 修改装配详情
export
function
updateDetail
(
data
)
{
return
request
({
url
:
'/track/detail'
,
method
:
'put'
,
data
:
data
})
}
// 删除装配详情
export
function
delDetail
(
id
)
{
return
request
({
url
:
'/track/detail/'
+
id
,
method
:
'delete'
})
}
// 导出装配详情
export
function
exportDetail
(
query
)
{
return
request
({
url
:
'/track/detail/export'
,
method
:
'get'
,
params
:
query
})
}
digital-management-web/src/api/track/mark.js
0 → 100644
View file @
06c33762
import
request
from
'@/utils/request'
// 查询装配模板列表
export
function
listMark
(
query
)
{
return
request
({
url
:
'/track/mark/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询装配模板详细
export
function
getMark
(
id
)
{
return
request
({
url
:
'/track/mark/'
+
id
,
method
:
'get'
})
}
// 新增装配模板
export
function
addMark
(
data
)
{
return
request
({
url
:
'/track/mark'
,
method
:
'post'
,
data
:
data
})
}
// 修改装配模板
export
function
updateMark
(
data
)
{
return
request
({
url
:
'/track/mark'
,
method
:
'put'
,
data
:
data
})
}
// 删除装配模板
export
function
delMark
(
id
)
{
return
request
({
url
:
'/track/mark/'
+
id
,
method
:
'delete'
})
}
// 导出装配模板
export
function
exportMark
(
query
)
{
return
request
({
url
:
'/track/mark/export'
,
method
:
'get'
,
params
:
query
})
}
digital-management-web/src/views/track/mark/detail/components/DetailInfo.vue
0 → 100644
View file @
06c33762
<
template
>
<el-dialog
title=
"详情"
:visible
.
sync=
"detailOpen"
width=
"800px"
append-to-body
destroy-on-close
:close-on-click-modal=
"false"
>
<el-form
label-width=
"90px"
>
<el-row
class=
"el-row-table"
>
<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.orders"
>
{{
detailInfo
.
orders
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"24"
>
<el-form-item
label=
"装配描述"
>
<span
v-if=
"detailInfo.content"
>
{{
detailInfo
.
content
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"24"
>
<el-form-item
label=
"装配图片"
>
<el-image
v-if=
"detailInfo.imgUrl"
:src=
"detailInfo.imgUrl"
:preview-src-list=
"[detailInfo.imgUrl]"
:z-index=
"9999"
style=
"width: 100px;height: 100px;"
></el-image>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-dialog>
</
template
>
<
script
>
import
{
getDetail
}
from
"@/api/track/detail"
;
export
default
{
name
:
"detail-info"
,
data
(){
return
{
detailOpen
:
false
,
detailInfo
:
{}
}
},
methods
:{
getDetailInfo
(
id
){
getDetail
(
id
).
then
(
res
=>
{
if
(
res
.
code
==
200
){
this
.
detailInfo
=
res
.
data
;
this
.
detailOpen
=
true
;
}
})
}
}
}
</
script
>
<
style
scoped
>
</
style
>
digital-management-web/src/views/track/mark/detail/index.vue
0 → 100644
View file @
06c33762
<
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-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-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=
"detailList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<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"
/>
<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>
<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-input
v-model=
"form.title"
placeholder=
"请输入装配标题"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"装配序号"
prop=
"orders"
>
<el-input
type=
"Number"
v-model=
"form.orders"
placeholder=
"请输入装配序号"
/>
</el-form-item>
</el-col>
<el-col
:span=
"24"
>
<el-form-item
label=
"装配描述"
prop=
"content"
>
<el-input
v-model=
"form.content"
:autosize=
"{ minRows: 3 }"
type=
"textarea"
placeholder=
"请输入内容"
/>
</el-form-item>
</el-col>
<el-col
:span=
"24"
>
<el-form-item
label=
"装配图片"
>
<imageUpload
v-model=
"form.imgUrl"
/>
</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>
<!-- 详情 -->
<DetailInfo
ref=
"detail"
/>
</div>
</template>
<
script
>
import
{
listDetail
,
getDetail
,
delDetail
,
addDetail
,
updateDetail
,
exportDetail
}
from
"@/api/track/detail"
;
import
ImageUpload
from
'@/components/ImageUpload'
;
import
DetailInfo
from
"./components/DetailInfo"
;
export
default
{
name
:
"Detail"
,
components
:
{
ImageUpload
,
DetailInfo
},
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 导出遮罩层
exportLoading
:
false
,
// 选中数组
ids
:
[],
titles
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 装配详情表格数据
detailList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
markId
:
null
,
orders
:
null
,
title
:
null
,
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
orders
:
[
{
required
:
true
,
message
:
"装配序号不能为空"
,
trigger
:
"blur"
}
],
title
:
[
{
required
:
true
,
message
:
"装配标题不能为空"
,
trigger
:
"blur"
}
],
content
:
[
{
required
:
true
,
message
:
"装配描述不能为空"
,
trigger
:
"blur"
}
]
}
};
},
created
()
{
this
.
queryParams
.
markId
=
this
.
$route
.
query
.
markId
;
this
.
getList
();
},
methods
:
{
/** 查询装配详情列表 */
getList
()
{
this
.
loading
=
true
;
listDetail
(
this
.
queryParams
).
then
(
response
=>
{
this
.
detailList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
// 表单重置
reset
()
{
this
.
form
=
{
id
:
null
,
markId
:
null
,
orders
:
null
,
title
:
null
,
content
:
null
,
imgUrl
:
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
.
titles
=
selection
.
map
(
item
=>
item
.
title
);
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
getDetail
(
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
)
{
updateDetail
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
else
{
this
.
form
.
markId
=
this
.
$route
.
query
.
markId
;
addDetail
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
;
const
titles
=
row
.
title
||
this
.
titles
;
this
.
$confirm
(
'是否确认删除装配标题为"'
+
titles
+
'"的数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(
function
()
{
return
delDetail
(
ids
);
}).
then
(()
=>
{
this
.
getList
();
this
.
msgSuccess
(
"删除成功"
);
}).
catch
(()
=>
{});
},
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
this
.
queryParams
;
this
.
$confirm
(
'是否确认导出所有装配详情数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportDetail
(
queryParams
);
}).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
},
//详情
handleDetail
(
row
){
this
.
$refs
.
detail
.
getDetailInfo
(
row
.
id
);
},
}
};
</
script
>
digital-management-web/src/views/track/mark/index.vue
0 → 100644
View file @
06c33762
<
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-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-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=
"markList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"模板名称"
align=
"center"
prop=
"title"
/>
<el-table-column
label=
"模板描述"
align=
"center"
prop=
"content"
show-overflow-tooltip
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
/>
<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>
<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=
"500px"
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=
"title"
>
<el-input
v-model=
"form.title"
placeholder=
"请输入模板名称"
/>
</el-form-item>
<el-form-item
label=
"模板描述"
prop=
"content"
>
<el-input
v-model=
"form.content"
:autosize=
"{ minRows: 3 }"
type=
"textarea"
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
{
listMark
,
getMark
,
delMark
,
addMark
,
updateMark
,
exportMark
}
from
"@/api/track/mark"
;
export
default
{
name
:
"Mark"
,
components
:
{
},
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 导出遮罩层
exportLoading
:
false
,
// 选中数组
ids
:
[],
titles
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 装配模板表格数据
markList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
title
:
null
,
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
title
:
[
{
required
:
true
,
message
:
"模板名称不能为空"
,
trigger
:
"blur"
}
],
content
:
[
{
required
:
true
,
message
:
"模板描述不能为空"
,
trigger
:
"blur"
}
],
}
};
},
created
()
{
this
.
getList
();
},
methods
:
{
/** 查询装配模板列表 */
getList
()
{
this
.
loading
=
true
;
listMark
(
this
.
queryParams
).
then
(
response
=>
{
this
.
markList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
// 表单重置
reset
()
{
this
.
form
=
{
id
:
null
,
title
:
null
,
content
:
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
.
titles
=
selection
.
map
(
item
=>
item
.
title
);
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
getMark
(
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
)
{
updateMark
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
else
{
addMark
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
;
const
titles
=
row
.
title
||
this
.
titles
;
this
.
$confirm
(
'是否确认删除装配模板名称为"'
+
titles
+
'"的数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(
function
()
{
return
delMark
(
ids
);
}).
then
(()
=>
{
this
.
getList
();
this
.
msgSuccess
(
"删除成功"
);
}).
catch
(()
=>
{});
},
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
this
.
queryParams
;
this
.
$confirm
(
'是否确认导出所有装配模板数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportMark
(
queryParams
);
}).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
},
/** 详情*/
handleDetail
(
row
){
this
.
$router
.
push
({
path
:
"/track/mark/detail"
,
query
:{
markId
:
row
.
id
}})
}
}
};
</
script
>
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