Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-app-operator-master
Commits
9f22e139
Commit
9f22e139
authored
Feb 24, 2025
by
wanghuazhou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: 页面代码整理
parent
0422189d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
93 deletions
+44
-93
audit.vue
src/views/ecw/currencyRate/audit.vue
+6
-7
form.vue
src/views/ecw/currencyRate/form.vue
+4
-2
index.vue
src/views/ecw/currencyRate/index.vue
+9
-25
logs.vue
src/views/ecw/currencyRate/logs.vue
+16
-36
query.vue
src/views/ecw/currencyRate/query.vue
+9
-23
No files found.
src/views/ecw/currencyRate/audit.vue
View file @
9f22e139
<
template
>
<div>
<div
class=
"remarks"
>
{{
row
.
remarks
||
'
无
'
}}
</div>
<div
class=
"remarks"
>
{{
row
.
remarks
||
$t
(
'
无
'
)
}}
</div>
<div><i>
{{
row
.
updateAt
}}
</i>
<b>
{{
row
.
updateBy
}}
</b></div>
</div>
</
template
>
...
...
@@ -8,13 +8,12 @@
<
script
>
import
Vue
from
'
vue
'
const
props
=
{
row
:
Object
,
}
export
default
Vue
.
extend
({
props
:
{
row
:
{
type
:
Object
,
required
:
true
,
},
},
props
,
})
</
script
>
...
...
src/views/ecw/currencyRate/form.vue
View file @
9f22e139
...
...
@@ -52,7 +52,7 @@
<el-col
:span=
"11"
>
<div>
<i
v-if=
"model.expiration && expires > 0"
class=
"diff"
>
{{ expires }}天后过期
</i>
<i
v-if=
"model.expiration && expires <
=
0"
class=
"diff expired"
>
已过期{{ 0 - expires }}天
</i>
<i
v-if=
"model.expiration && expires < 0"
class=
"diff expired"
>
已过期{{ 0 - expires }}天
</i>
</div>
</el-col>
</el-form-item>
...
...
@@ -146,8 +146,10 @@ export default Vue.extend({
if
(
await
this
.
$refs
[
'
form
'
].
validate
().
catch
(()
=>
{}))
{
if
(
this
.
update
)
{
await
updateCurrencyRate
(
this
.
model
.
id
,
this
.
model
)
}
else
{
await
createCurrencyRate
(
this
.
model
)
}
await
createCurrencyRate
(
this
.
model
)
this
.
$emit
(
'
update:model
'
,
this
.
model
)
this
.
close
()
}
...
...
src/views/ecw/currencyRate/index.vue
View file @
9f22e139
...
...
@@ -61,35 +61,19 @@ import Query from './query.vue'
import
Audit
from
'
./audit.vue
'
import
Decimal
from
'
decimal.js
'
const
components
=
{
FormDialog
,
LogsDialog
,
Query
,
Audit
,
}
export
default
Vue
.
extend
({
components
:
{
FormDialog
,
LogsDialog
,
Query
,
Audit
,
},
components
,
data
()
{
return
{
map
:
{
countries
:
{},
currencies
:
{},
},
dict
:
{
countries
:
[],
currencies
:
[],
},
form
:
{
rules
:
{},
},
map
:
{
countries
:
{},
currencies
:
{},
},
dict
:
{
countries
:
[],
currencies
:
[],
},
query
:
{
show
:
true
,
loading
:
false
,
params
:
{
page
:
1
,
rows
:
10
,
expiration
:
[
''
,
''
],
},
result
:
{
list
:
[],
total
:
0
,
},
params
:
{
page
:
1
,
rows
:
10
,
expiration
:
[
''
,
''
],
},
result
:
{
list
:
[],
total
:
0
,
},
},
dialogs
:
{
form
:
{
visible
:
false
,
update
:
false
,
data
:
{},
},
...
...
@@ -101,7 +85,7 @@ export default Vue.extend({
async
pagination
()
{
this
.
query
.
loading
=
true
try
{
this
.
query
.
result
=
(
await
getCurrencyRatePage
(
this
.
query
.
params
)).
data
this
.
query
.
result
=
await
getCurrencyRatePage
(
this
.
query
.
params
).
then
(
it
=>
it
.
data
)
}
finally
{
this
.
query
.
loading
=
false
}
...
...
@@ -150,7 +134,7 @@ export default Vue.extend({
this
.
dict
.
currencies
=
await
getCurrencyList
().
then
(
it
=>
it
.
data
)
this
.
map
.
countries
=
this
.
dict
.
countries
.
reduce
((
m
,
e
)
=>
(
m
[
e
.
id
]
=
e
,
m
),
{})
this
.
map
.
currencies
=
this
.
dict
.
currencies
.
reduce
((
m
,
e
)
=>
(
m
[
e
.
id
]
=
e
,
m
),
{})
this
.
pagination
()
await
this
.
pagination
()
},
})
</
script
>
...
...
src/views/ecw/currencyRate/logs.vue
View file @
9f22e139
...
...
@@ -41,18 +41,6 @@
</div>
</
template
>
</el-table-column>
<!-- <el-table-column :label="$t('修改前')" align="right" class-name="before">
<template v-slot="{ row }">
<div>{{ amount(row.sourceAmount1, row.targetAmount1) }}</div>
<div>1 : <i>{{ rate(row.sourceAmount1, row.targetAmount1) }}</i>, {{ row.sourceExpiration }}</div>
</template>
</el-table-column>
<el-table-column :label="$t('修改后')" align="right" class-name="after">
<template v-slot="{ row }">
<div>{{ amount(row.sourceAmount2, row.targetAmount2) }}</div>
<div>1 : <i>{{ rate(row.sourceAmount2, row.targetAmount2) }}</i>, {{ row.targetExpiration }}</div>
</template>
</el-table-column> -->
</el-table>
<pagination
v-show=
"total > 0"
:background=
"false"
small
layout=
"total,prev,pager,next,jumper"
:total=
"total"
:page.sync=
"page"
:limit.sync=
"limit"
@
pagination=
"pagination"
/>
</el-dialog>
...
...
@@ -62,33 +50,25 @@
import
{
getCurrencyRateLogs
}
from
'
@/api/ecw/currencyRate
'
import
Decimal
from
'
decimal.js
'
import
Vue
from
'
vue
'
import
audit
from
'
./audit.vue
'
import
Audit
from
'
./audit.vue
'
const
components
=
{
Audit
,
}
const
props
=
{
id
:
Number
,
visible
:
{
type
:
Boolean
,
default
:
false
,
},
source
:
Object
,
target
:
Object
,
}
export
default
Vue
.
extend
({
components
:
{
audit
},
props
:
{
visible
:
{
type
:
Boolean
,
default
:
false
,
},
id
:
Number
,
source
:
{
},
target
:
{
},
},
model
:
{
prop
:
'
visible
'
,
event
:
'
update
'
,
},
components
,
props
,
model
:
{
prop
:
'
visible
'
,
event
:
'
update
'
,
},
data
()
{
return
{
loading
:
false
,
page
:
1
,
limit
:
10
,
list
:
[],
total
:
0
,
}
return
{
loading
:
false
,
page
:
1
,
limit
:
10
,
list
:
[],
total
:
0
,
}
},
methods
:
{
close
()
{
...
...
src/views/ecw/currencyRate/query.vue
View file @
9f22e139
...
...
@@ -33,29 +33,16 @@
<
script
>
import
Vue
from
'
vue
'
const
props
=
{
show
:
{
type
:
Boolean
,
default
:
false
,
},
value
:
{
type
:
Object
,
default
:
{},
},
countries
:
{
type
:
Array
,
default
:
[],
},
currencies
:
{
type
:
Array
,
default
:
[],
},
}
export
default
Vue
.
extend
({
props
:
{
show
:
{
type
:
Boolean
,
default
:
false
,
},
value
:
{
type
:
Object
,
default
:
{},
},
countries
:
{
type
:
Array
,
default
:
[],
},
currencies
:
{
type
:
Array
,
default
:
[],
},
},
model
:
{
prop
:
'
value
'
,
event
:
'
update
'
,
},
props
,
model
:
{
prop
:
'
value
'
,
event
:
'
update
'
,
},
data
()
{
return
{
params
:
this
.
value
,
...
...
@@ -66,7 +53,6 @@ export default Vue.extend({
this
.
$emit
(
'
query
'
,
this
.
params
)
},
clear
()
{
console
.
log
(
'
query
'
,
this
.
params
)
this
.
$emit
(
'
update:value
'
,
this
.
params
=
{})
},
},
...
...
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