Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qr-consistency-vue3
Project
Project
Details
Activity
Releases
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
刘怀志
qr-consistency-vue3
Commits
5195ec4a
Commit
5195ec4a
authored
Apr 16, 2025
by
ZhangRunSong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改模板位置
parent
aea02102
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
140 additions
and
58 deletions
+140
-58
controlPlan.js
src/api/system/controlPlan.js
+31
-1
index.vue
src/views/controlPlan/baseConfig/fillTemplate/index.vue
+7
-20
view.vue
src/views/controlPlan/baseConfig/fillTemplate/view.vue
+102
-0
view.vue
src/views/controlPlan/fillTemplate/view.vue
+0
-37
No files found.
src/api/system/controlPlan.js
View file @
5195ec4a
...
@@ -17,6 +17,36 @@ export function listTemplateForm(id) {
...
@@ -17,6 +17,36 @@ export function listTemplateForm(id) {
return
request
({
return
request
({
url
:
'/control/template/template-form'
,
url
:
'/control/template/template-form'
,
method
:
'get'
,
method
:
'get'
,
params
:
id
,
params
:
{
id
:
id
},
})
}
/**
* 查询参数列表
*/
export
function
listTemplateDetail
(
params
)
{
return
request
({
url
:
'/control/template/template-detail'
,
method
:
'get'
,
params
:
params
,
})
}
/**
* 修改参数
*/
export
function
editTemplateDetail
(
form
)
{
return
request
({
url
:
'/control/template/template-detail'
,
method
:
'put'
,
params
:
form
,
})
}
/**
* 修改参数
*/
export
function
deleteTemplateDetail
(
ids
)
{
return
request
({
url
:
'/control/template/template-detail'
,
method
:
'delete'
,
params
:
{
ids
},
})
})
}
}
\ No newline at end of file
src/views/controlPlan/fillTemplate/index.vue
→
src/views/controlPlan/
baseConfig/
fillTemplate/index.vue
View file @
5195ec4a
...
@@ -52,10 +52,10 @@
...
@@ -52,10 +52,10 @@
:data=
"templateList"
:data=
"templateList"
border
border
>
>
<el-table-column
label=
"序号"
type=
"index"
width=
"55"
align=
"center
"
/>
<el-table-column
label=
"序号"
width=
"55"
align=
"center"
prop=
"seq
"
/>
<el-table-column
label=
"模板类型"
align=
"center"
width=
"125"
prop=
"templateType"
>
<el-table-column
label=
"模板类型"
align=
"center"
width=
"125"
prop=
"templateType"
>
<template
#
default=
"scope"
>
<template
#
default=
"scope"
>
<dict-tag
:options=
"control_plan"
:value=
"scope.row.templateType"
/
>
<span
style=
"color: #1ab394"
>
{{
scope
.
row
.
templateType
}}
</span
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"模板编号"
align=
"center"
width=
"100"
prop=
"templateCode"
>
<el-table-column
label=
"模板编号"
align=
"center"
width=
"100"
prop=
"templateCode"
>
...
@@ -88,7 +88,7 @@
...
@@ -88,7 +88,7 @@
<span>
{{
parseTime
(
scope
.
row
.
updateTime
)
}}
</span>
<span>
{{
parseTime
(
scope
.
row
.
updateTime
)
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"修改人"
align=
"center"
width=
"85"
prop=
"update
By
"
/>
<el-table-column
label=
"修改人"
align=
"center"
width=
"85"
prop=
"update
Name
"
/>
<el-table-column
<el-table-column
label=
"操作"
label=
"操作"
width=
"300"
width=
"300"
...
@@ -100,7 +100,6 @@
...
@@ -100,7 +100,6 @@
v-hasPermi=
"['system:post:edit']"
v-hasPermi=
"['system:post:edit']"
link
link
type=
"primary"
type=
"primary"
icon=
"Edit"
@
click=
"viewDetails(scope.row)"
@
click=
"viewDetails(scope.row)"
>
查看详情
</el-button
>
查看详情
</el-button
>
>
...
@@ -108,7 +107,6 @@
...
@@ -108,7 +107,6 @@
v-hasPermi=
"['system:post:edit']"
v-hasPermi=
"['system:post:edit']"
link
link
type=
"primary"
type=
"primary"
icon=
"Edit"
@
click=
"handleUpdate(scope.row)"
@
click=
"handleUpdate(scope.row)"
>
编辑内容
</el-button
>
编辑内容
</el-button
>
>
...
@@ -116,7 +114,6 @@
...
@@ -116,7 +114,6 @@
v-hasPermi=
"['system:post:edit']"
v-hasPermi=
"['system:post:edit']"
link
link
type=
"primary"
type=
"primary"
icon=
"Edit"
@
click=
"restoreDefault(scope.row)"
@
click=
"restoreDefault(scope.row)"
>
恢复默认
</el-button
>
恢复默认
</el-button
>
>
...
@@ -156,20 +153,9 @@ const data = reactive({
...
@@ -156,20 +153,9 @@ const data = reactive({
postName
:
undefined
,
postName
:
undefined
,
status
:
undefined
,
status
:
undefined
,
},
},
rules
:
{
postName
:
[
{
required
:
true
,
message
:
'岗位名称不能为空'
,
trigger
:
'blur'
},
],
postCode
:
[
{
required
:
true
,
message
:
'岗位编码不能为空'
,
trigger
:
'blur'
},
],
postSort
:
[
{
required
:
true
,
message
:
'岗位顺序不能为空'
,
trigger
:
'blur'
},
],
},
})
})
const
{
queryParams
,
form
,
rules
}
=
toRefs
(
data
)
const
{
queryParams
,
form
,}
=
toRefs
(
data
)
/** 查询岗位列表 */
/** 查询岗位列表 */
function
getList
()
{
function
getList
()
{
...
@@ -209,10 +195,11 @@ function resetQuery() {
...
@@ -209,10 +195,11 @@ function resetQuery() {
/** 修改按钮操作 */
/** 修改按钮操作 */
function
handleUpdate
(
row
)
{
function
handleUpdate
(
row
)
{
proxy
.
$router
.
push
({
path
:
'/control/baseConfig/fillEdit'
,
query
:
{
id
:
row
.
id
}
});
}
}
/** 查看操作 */
function
viewDetails
(
row
)
{
function
viewDetails
(
row
)
{
proxy
.
$router
.
push
({
path
:
'/control/fillView'
,
query
:
{
id
:
row
.
id
}
});
proxy
.
$router
.
push
({
path
:
'/control/
baseConfig/
fillView'
,
query
:
{
id
:
row
.
id
}
});
}
}
function
restoreDefault
(
row
)
{}
function
restoreDefault
(
row
)
{}
...
...
src/views/controlPlan/baseConfig/fillTemplate/view.vue
0 → 100644
View file @
5195ec4a
<
template
>
<div
class=
"app-container"
>
<div
class=
"top-header"
>
<el-button
class=
"back-button"
@
click=
"handleBack"
>
<span
class=
"back-icon"
></span>
返回
</el-button>
</div>
<div
class=
"component-selector"
>
<el-tabs
v-model=
"activeTab"
class=
"demo-tabs"
>
<el-tab-pane
v-for=
"(item, index) in formList"
:key=
"index"
:label=
"item.formName"
:name=
"item.id"
>
<component>
<el-table
v-loading=
"loading"
:data=
"templateDetailList"
border
>
<el-table-column
label=
"序号"
type=
"index"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"参数组"
align=
"center"
prop=
"parameterGroup"
/>
<el-table-column
label=
"参数项"
align=
"center"
prop=
"parameterItem"
/>
<el-table-column
label=
"参数值类型"
align=
"center"
prop=
"parameterValueType"
/>
<el-table-column
label=
"显示方式"
align=
"center"
prop=
"displayMethod"
/>
<el-table-column
label=
"填写方式"
align=
"center"
prop=
"fillMethod"
/>
</el-table>
<pagination
v-show=
"total > 0"
v-model:page=
"queryParams.pageNum"
v-model:limit=
"queryParams.pageSize"
:total=
"total"
@
pagination=
"handlePagination"
/>
</component>
</el-tab-pane>
</el-tabs>
</div>
</div>
</
template
>
<
script
setup
>
import
{
listTemplateDetail
,
listTemplateForm
}
from
'@/api/system/controlPlan.js'
const
{
proxy
}
=
getCurrentInstance
();
import
{
ref
,
getCurrentInstance
}
from
'vue'
const
total
=
ref
(
0
)
const
formList
=
ref
([])
const
activeTab
=
ref
(
null
)
// 默认激活第一个标签页
const
templateDetailList
=
ref
([])
// 修改data定义方式
const
queryParams
=
ref
({
pageNum
:
1
,
pageSize
:
10
})
watch
(
activeTab
,
(
newVal
)
=>
{
queryParams
.
value
.
pageNum
=
1
// 切换标签时重置页码
getList
(
newVal
)
})
const
handlePagination
=
({
page
,
limit
})
=>
{
queryParams
.
value
.
pageNum
=
page
queryParams
.
value
.
pageSize
=
limit
getList
(
activeTab
.
value
)
}
function
getFrom
()
{
const
id
=
proxy
.
$route
.
query
.
id
listTemplateForm
(
id
).
then
(
response
=>
{
formList
.
value
=
response
.
data
if
(
formList
.
value
.
length
>
0
)
{
activeTab
.
value
=
formList
.
value
[
0
].
id
// 默认第一个标签的id
getList
(
formList
.
value
[
0
].
id
)
// 初始化加载第一个标签的数据
}
})
}
function
getList
(
formId
){
listTemplateDetail
({
id
:
formId
,
pageNum
:
queryParams
.
value
.
pageNum
,
pageSize
:
queryParams
.
value
.
pageSize
}).
then
(
response
=>
{
templateDetailList
.
value
=
response
.
rows
total
.
value
=
response
.
total
})
}
const
handleBack
=
()
=>
{
proxy
.
$router
.
push
({
path
:
'/control/baseConfig/fill'
});
}
onMounted
(()
=>
{
getFrom
();
})
</
script
>
<
style
scoped
lang=
"scss"
>
.top-header
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
margin-bottom
:
16px
;
}
</
style
>
src/views/controlPlan/fillTemplate/view.vue
deleted
100644 → 0
View file @
aea02102
<
template
>
<div
class=
"app-container"
>
<div
class=
"component-selector"
>
<el-tabs
v-model=
"activeTab"
class=
"demo-tabs"
>
<el-tab-pane
label=
"关键字部件清单"
name=
"parts"
>
<PartsComponent
/>
</el-tab-pane>
<el-tab-pane
label=
"关键字、装配、检验过程清单"
name=
"process"
>
<ProcessComponent
/>
</el-tab-pane>
<el-tab-pane
label=
"COP试验和检查表"
name=
"cop"
>
<COPComponent
/>
</el-tab-pane>
</el-tabs>
</div>
</div>
</
template
>
<
script
setup
>
import
{
listTemplateForm
}
from
'@/api/system/controlPlan.js'
const
{
proxy
}
=
getCurrentInstance
();
function
getFrom
(){
const
id
=
proxy
.
$route
.
query
.
id
;
console
.
log
(
"id:"
,
id
);
listTemplateForm
(
id
).
then
(
response
=>
{
console
.
log
(
"response:"
,
response
)
}
)
}
onMounted
(()
=>
{
//获取物品类型
getFrom
();
});
</
script
>
<
style
scoped
lang=
"scss"
>
</
style
>
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