Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
Ygopro Arena Web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Ygopro Arena Web
Commits
428f262f
Commit
428f262f
authored
Oct 14, 2017
by
ganjingcun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
状态修改
parent
09f28c12
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
7 deletions
+38
-7
src/api.js
src/api.js
+5
-0
src/components/Vote.vue
src/components/Vote.vue
+33
-7
No files found.
src/api.js
View file @
428f262f
...
...
@@ -81,6 +81,11 @@ export default class Api {
return
Vue
.
http
.
post
(
url
,
opt
,
{
'
emulateJSON
'
:
true
});
}
static
voteStatus
(
opt
)
{
const
url
=
`
${
URL
}
/voteStatus`
return
Vue
.
http
.
post
(
url
,
opt
,
{
'
emulateJSON
'
:
true
});
}
static
getVote
(
opt
)
{
return
Vue
.
http
.
get
(
`
${
URL
}
/vote`
,
{
'
params
'
:
opt
});
}
...
...
src/components/Vote.vue
View file @
428f262f
...
...
@@ -92,7 +92,7 @@
</el-form>
<el-table
:data=
"history.data"
style=
"width: 100%"
:default-expand-all=
"expand"
>
<el-table
:data=
"history.data"
v-loading.fullscreen.lock=
"loading"
element-loading-text=
"拼命加载中"
style=
"width: 100%"
:default-expand-all=
"expand"
>
<el-table-column
type=
"expand"
>
<
template
scope=
"props"
>
...
...
@@ -113,15 +113,15 @@
<el-table-column
label=
"状态"
:formatter=
"formatter3"
></el-table-column>
<
!--<el-table-column label="状态
">
<
el-table-column
label=
"状态编辑
"
>
<
template
scope=
"props"
>
<el-tooltip :content="'Switch value: ' + props.row.status" placement="top">
<el-switch v-model="props.row.status" on-color="#13ce66" off-color="#ff4949" on-value="true" off-value="false">
<!--
<el-tooltip
:content=
"'Switch value: ' + props.row.status"
placement=
"top"
>
-->
<el-switch
v-model=
"props.row.status"
@
change=
"switchChange(props.row.id,props.row.status)"
on-color=
"#13ce66"
off-color=
"#ff4949"
on-text=
"启用"
off-text=
"禁用"
:on-value=
"onValue"
:off-value=
"offValue"
>
</el-switch>
</el-tooltip
>
<!--
</el-tooltip>
--
>
</
template
>
</el-table-column>-->
</el-table-column>
<el-table-column
label=
"操作"
width=
"100"
>
<
template
scope=
"props"
>
...
...
@@ -182,6 +182,10 @@
data
:
function
()
{
return
{
radio
:
"
x
"
,
loading
:
true
,
onValue
:
true
,
offValue
:
false
,
value2
:
true
,
expand
:
true
,
ddd
:
[
1
,
2
,
31
,
231
,
23
],
needRender
:
true
,
...
...
@@ -269,6 +273,25 @@
},
methods
:
{
switchChange
:
function
(
id
,
status
)
{
this
.
loading
=
true
var
param
=
{
id
:
id
,
status
:
status
}
API
.
voteStatus
(
param
).
then
((
res
)
=>
{
this
.
loading
=
false
// this.$notify({
// title: '操作成功',
// message: '状态已修改!',
// type: 'success'
// })
},
(
res
)
=>
{
this
.
loading
=
false
});
},
newVote
()
{
this
.
dialogFormVisible
=
true
this
.
dynamicValidateForm
.
id
=
""
...
...
@@ -331,7 +354,9 @@
to_date
:
this
.
to_date
}
var
_this
=
this
;
_this
.
loading
=
true
API
.
getVoteList
(
params
).
then
((
res
)
=>
{
_this
.
loading
=
false
var
history
=
{}
history
.
total
=
res
.
data
.
total
var
optionCountMap
=
res
.
data
.
optionCountMap
...
...
@@ -378,6 +403,7 @@
},
(
res
)
=>
{
//
_this
.
loading
=
false
})
},
submitForm
(
formName
)
{
...
...
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