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
eb4068ee
Commit
eb4068ee
authored
Aug 08, 2023
by
CenXinYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed: 增加字典
Signed-off-by:
CenXinYi
<
2810162984@qq.com
>
parent
d52119fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
6 deletions
+31
-6
draw.vue
src/views/equipment/draw.vue
+31
-6
No files found.
src/views/equipment/draw.vue
View file @
eb4068ee
...
@@ -75,8 +75,7 @@
...
@@ -75,8 +75,7 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"pgx"
prop=
"pgx"
>
<el-table-column
label=
"pgx"
prop=
"pgx"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.pgx === '001'"
>
压缩
</span>
{{
replaced
(
scope
.
row
.
pgx
)
}}
<span
v-if=
"scope.row.pgx === '002'"
>
排水
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"pnumber"
prop=
"pnumber"
>
<el-table-column
label=
"pnumber"
prop=
"pnumber"
>
...
@@ -156,7 +155,7 @@
...
@@ -156,7 +155,7 @@
<el-row>
<el-row>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"pgx:"
prop=
"pgx"
>
<el-form-item
label=
"pgx:"
prop=
"pgx"
>
<el-input
v-model
.
trim=
"singleDetails.pgx"
:readonly=
"true"
/>
{{ replaced(singleDetails.pgx) }}
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
...
@@ -249,7 +248,7 @@
...
@@ -249,7 +248,7 @@
<el-row>
<el-row>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"pgx:"
prop=
"pgx"
>
<el-form-item
label=
"pgx:"
prop=
"pgx"
>
<el-input
v-model
.
trim=
"singleDetails.pgx"
:readonly=
"true"
/>
{{ replaced(singleDetails.pgx) }}
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
...
@@ -396,11 +395,13 @@ import {
...
@@ -396,11 +395,13 @@ import {
checkPermission
checkPermission
}
from
'@/api/equipment/draw'
}
from
'@/api/equipment/draw'
import
{
parseTime
}
from
'@/utils'
import
{
parseTime
}
from
'@/utils'
import
{
getEquipment
}
from
'@/api/equipment/application'
import
{
get
DictData
,
get
Equipment
}
from
'@/api/equipment/application'
export
default
{
export
default
{
name
:
'Draw'
,
name
:
'Draw'
,
data
()
{
data
()
{
return
{
return
{
// 字典数据
dictList
:
[],
number
:
''
,
number
:
''
,
monthDate
:
false
,
monthDate
:
false
,
// 是否切换库
// 是否切换库
...
@@ -510,6 +511,7 @@ export default {
...
@@ -510,6 +511,7 @@ export default {
next
()
next
()
}
,
}
,
created
()
{
created
()
{
this
.
getDict
()
this
.
getList
()
this
.
getList
()
}
,
}
,
methods
:
{
methods
:
{
...
@@ -521,7 +523,7 @@ export default {
...
@@ -521,7 +523,7 @@ export default {
// 判断时间范围 是否是一个月以内的的时间
// 判断时间范围 是否是一个月以内的的时间
isWithinLastMonth
(
dateToCheck
)
{
isWithinLastMonth
(
dateToCheck
)
{
// 获取当前日期
// 获取当前日期
const
currentDate
=
new
Date
()
;
const
currentDate
=
new
Date
()
// 获取当前日期的年份和月份
// 获取当前日期的年份和月份
const
currentYear
=
currentDate
.
getFullYear
()
const
currentYear
=
currentDate
.
getFullYear
()
const
currentMonth
=
currentDate
.
getMonth
()
const
currentMonth
=
currentDate
.
getMonth
()
...
@@ -833,6 +835,29 @@ export default {
...
@@ -833,6 +835,29 @@ export default {
default
:
default
:
return
''
return
''
}
}
}
,
replaced
(
value
)
{
let
label
=
''
if
(
this
.
dictList
.
length
>
0
)
{
this
.
dictList
.
forEach
(
item
=>
{
if
(
item
.
dictValue
===
value
)
{
label
=
item
.
dictLabel
}
}
)
}
return
label
}
,
getDict
()
{
const
obj
=
{
key
:
'GX_CODE'
}
getDictData
(
obj
).
then
(
res
=>
{
console
.
log
(
'res'
,
res
)
if
(
res
.
code
===
200
&&
res
.
data
!==
null
)
{
this
.
dictList
=
res
.
data
console
.
log
(
this
.
dictList
)
}
}
)
}
}
}
}
}
}
...
...
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