Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
template_vue
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
胡宝山
template_vue
Commits
ca9aa19c
Commit
ca9aa19c
authored
Sep 18, 2023
by
shifangwuji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
9/18(3)
parent
ac9ddd57
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
17 deletions
+49
-17
gxlog.js
src/api/production/gxlog.js
+9
-0
index.vue
src/views/production/craftsmanship/index.vue
+22
-13
index.vue
src/views/production/gxlog/index.vue
+18
-4
No files found.
src/api/production/gxlog.js
View file @
ca9aa19c
...
@@ -55,3 +55,12 @@ export function exporTable(params) {
...
@@ -55,3 +55,12 @@ export function exporTable(params) {
responseType
:
'blob'
responseType
:
'blob'
})
})
}
}
// 根据key值查询数据字典数据
export
function
getDictData
(
params
)
{
return
request
({
url
:
'/wbapply/queryDict'
,
method
:
'get'
,
params
})
}
\ No newline at end of file
src/views/production/craftsmanship/index.vue
View file @
ca9aa19c
...
@@ -110,7 +110,7 @@
...
@@ -110,7 +110,7 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"gx"
prop=
"gx"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"gx"
prop=
"gx"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
gx
||
'-'
}}
{{
replace
(
scope
.
row
.
gx
)
||
'-'
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
...
@@ -225,7 +225,7 @@
...
@@ -225,7 +225,7 @@
<
/el-form-item
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"gx:"
prop
=
"gx"
>
<
el
-
form
-
item
label
=
"gx:"
prop
=
"gx"
>
<
el
-
input
v
-
model
.
trim
=
"singleDetails.gx"
:
readonly
=
"true"
/
>
<
span
>
{{
replace
(
singleDetails
.
gx
)
}}
<
/span
>
<
/el-form-item
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"操作人:"
prop
=
"createName"
>
<
el
-
form
-
item
label
=
"操作人:"
prop
=
"createName"
>
...
@@ -419,13 +419,14 @@ export default {
...
@@ -419,13 +419,14 @@ export default {
page
:
1
,
page
:
1
,
rows
:
10
,
rows
:
10
,
pn
:
''
,
pn
:
''
,
key
:
'GX_CODE'
,
ptype
:
''
ptype
:
''
}
,
}
,
singleDetails
:
{
singleDetails
:
{
pn
:
''
,
pn
:
''
,
phd
:
''
,
phd
:
''
,
prank
:
''
,
prank
:
''
,
p
gx
:
''
,
gx
:
''
,
pissb
:
''
,
pissb
:
''
,
pstatus
:
''
,
pstatus
:
''
,
pnumber
:
''
,
pnumber
:
''
,
...
@@ -438,6 +439,7 @@ export default {
...
@@ -438,6 +439,7 @@ export default {
}
}
}
,
}
,
created
()
{
created
()
{
this
.
getDict
()
this
.
getList
()
this
.
getList
()
}
,
}
,
methods
:
{
methods
:
{
...
@@ -480,15 +482,6 @@ export default {
...
@@ -480,15 +482,6 @@ export default {
if
(
valid
)
{
if
(
valid
)
{
// 校验通过
// 校验通过
if
(
this
.
form
.
businessId
!==
undefined
)
{
if
(
this
.
form
.
businessId
!==
undefined
)
{
if
(
this
.
jscode
)
{
// 如果 jscode 有值
if
(
!
this
.
jbrank
)
{
// 如果 jbrank 为空
this
.
$message
.
error
(
'如果填写 jscode,则必须填写 jbrank'
);
return
;
}
}
updataInfo
(
this
.
form
).
then
(
res
=>
{
updataInfo
(
this
.
form
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
this
.
open
=
false
this
.
open
=
false
...
@@ -557,6 +550,7 @@ export default {
...
@@ -557,6 +550,7 @@ export default {
this
.
title
=
'编辑基础信息表单'
this
.
title
=
'编辑基础信息表单'
const
id
=
row
.
businessId
const
id
=
row
.
businessId
getDetailById
(
id
).
then
(
res
=>
{
getDetailById
(
id
).
then
(
res
=>
{
console
.
log
(
"res"
,
res
);
this
.
form
=
res
.
data
this
.
form
=
res
.
data
this
.
open
=
true
this
.
open
=
true
}
)
}
)
...
@@ -597,11 +591,12 @@ export default {
...
@@ -597,11 +591,12 @@ export default {
this
.
loading
=
true
this
.
loading
=
true
queryList
(
this
.
queryParams
).
then
(
res
=>
{
queryList
(
this
.
queryParams
).
then
(
res
=>
{
res
.
rows
.
updateDate
=
parseTime
(
res
.
rows
.
updateDate
,
'{y
}
-{m
}
-{d
}
'
)
res
.
rows
.
updateDate
=
parseTime
(
res
.
rows
.
updateDate
,
'{y
}
-{m
}
-{d
}
'
)
this
.
total
=
res
.
total
this
.
basicinfoMationList
=
res
.
rows
this
.
basicinfoMationList
=
res
.
rows
this
.
loading
=
false
this
.
loading
=
false
}
)
}
)
}
,
}
,
// 查询
// 查询
handleQuery
()
{
handleQuery
()
{
this
.
queryParams
.
page
=
1
this
.
queryParams
.
page
=
1
...
@@ -655,6 +650,20 @@ export default {
...
@@ -655,6 +650,20 @@ export default {
// this.download(response.msg);
// this.download(response.msg);
}
)
}
)
}
,
}
,
replace
(
value
)
{
if
(
this
.
pissbList
.
length
===
0
)
{
return
value
}
let
label
=
''
if
(
this
.
pissbList
.
length
>
0
)
{
this
.
pissbList
.
forEach
(
item
=>
{
if
(
item
.
dictValue
===
value
)
{
label
=
item
.
dictLabel
}
}
)
}
return
label
}
,
// 调数据字典查询
// 调数据字典查询
getDict
()
{
getDict
()
{
const
obj
=
{
const
obj
=
{
...
...
src/views/production/gxlog/index.vue
View file @
ca9aa19c
...
@@ -119,7 +119,7 @@
...
@@ -119,7 +119,7 @@
</el-table-column> -->
</el-table-column> -->
<el-table-column
label=
"gx"
prop=
"gx"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"gx"
prop=
"gx"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
gx
||
'-'
}}
{{
replace
(
scope
.
row
.
gx
)
||
'-'
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
...
@@ -317,7 +317,8 @@ import {
...
@@ -317,7 +317,8 @@ import {
getDetailById
,
getDetailById
,
updataInfo
,
updataInfo
,
deleteLogical
,
deleteLogical
,
exporTable
exporTable
,
getDictData
}
from
'@/api/production/gxlog'
}
from
'@/api/production/gxlog'
import
{
parseTime
}
from
'@/utils'
import
{
parseTime
}
from
'@/utils'
...
@@ -328,6 +329,8 @@ export default {
...
@@ -328,6 +329,8 @@ export default {
title
:
''
,
title
:
''
,
open
:
false
,
open
:
false
,
form
:
{
}
,
form
:
{
}
,
// 数据字典列表
dictList
:
[],
rules
:
{
rules
:
{
pn
:
[{
required
:
true
,
message
:
'请输入pn'
,
trigger
:
'blur'
}
],
pn
:
[{
required
:
true
,
message
:
'请输入pn'
,
trigger
:
'blur'
}
],
ptype
:
[{
required
:
true
,
message
:
'请输入ptype'
,
trigger
:
'blur'
}
],
ptype
:
[{
required
:
true
,
message
:
'请输入ptype'
,
trigger
:
'blur'
}
],
...
@@ -366,6 +369,7 @@ export default {
...
@@ -366,6 +369,7 @@ export default {
}
}
}
,
}
,
created
()
{
created
()
{
this
.
getDict
()
this
.
getList
()
this
.
getList
()
}
,
}
,
methods
:
{
methods
:
{
...
@@ -452,7 +456,7 @@ export default {
...
@@ -452,7 +456,7 @@ export default {
}
)
}
)
}
,
}
,
replace
(
value
)
{
replace
(
value
)
{
/*
if (this.dictList.length === 0) {
if
(
this
.
dictList
.
length
===
0
)
{
return
value
return
value
}
}
let
label
=
''
let
label
=
''
...
@@ -463,7 +467,17 @@ export default {
...
@@ -463,7 +467,17 @@ export default {
}
}
}
)
}
)
}
}
return label */
return
label
}
,
getDict
()
{
const
obj
=
{
key
:
'GX_CODE'
}
getDictData
(
obj
).
then
(
res
=>
{
if
(
res
.
code
===
200
&&
res
.
data
!==
null
)
{
this
.
dictList
=
res
.
data
}
}
)
}
,
}
,
// 编辑
// 编辑
handleUpdate
(
row
)
{
handleUpdate
(
row
)
{
...
...
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