Commit 09f28c12 authored by ganjingcun's avatar ganjingcun

bug fix

parent c3301dc6
...@@ -5,8 +5,8 @@ import config from './config'; ...@@ -5,8 +5,8 @@ import config from './config';
Vue.use(VueResource) Vue.use(VueResource)
// const URL = "http://localhost:3000/api" const URL = "http://localhost:3000/api"
const URL = "https://api.mycard.moe/ygopro/arena" // const URL = "https://api.mycard.moe/ygopro/arena"
export default class Api { export default class Api {
......
...@@ -80,7 +80,19 @@ ...@@ -80,7 +80,19 @@
<hr> <hr>
<el-table :data="history.data" style="width: 100%">
<el-form :inline="true" :model="formInline">
<el-form-item>
<el-select style="width: 100px;" v-model="type" placeholder="状态" @change="selectChange">
<el-option label="全部" value="0"></el-option>
<el-option label="启用中" value="1"></el-option>
<el-option label="已禁用" value="2"></el-option>
</el-select>
</el-form-item>
</el-form>
<el-table :data="history.data" style="width: 100%" :default-expand-all="expand">
<el-table-column type="expand"> <el-table-column type="expand">
<template scope="props"> <template scope="props">
...@@ -170,6 +182,7 @@ ...@@ -170,6 +182,7 @@
data: function () { data: function () {
return { return {
radio: "x", radio: "x",
expand: true,
ddd: [1, 2, 31, 231, 23], ddd: [1, 2, 31, 231, 23],
needRender: true, needRender: true,
page: 1, page: 1,
...@@ -310,6 +323,7 @@ ...@@ -310,6 +323,7 @@
}, },
renderTable: function () { renderTable: function () {
var params = { var params = {
type: this.type,
page: this.page, page: this.page,
username: this.username, username: this.username,
type: this.type, type: this.type,
...@@ -336,6 +350,7 @@ ...@@ -336,6 +350,7 @@
percentage = 0 percentage = 0
} else { } else {
percentage = option.count / voteVount * 100 percentage = option.count / voteVount * 100
percentage = Math.round(percentage)
} }
option.percentage = percentage option.percentage = percentage
...@@ -345,9 +360,22 @@ ...@@ -345,9 +360,22 @@
}) })
// console.log(history.data) // console.log(history.data)
_this.history = history _this.history = history
setTimeout(function () { // setTimeout(function () {
$(".el-icon-arrow-right").trigger('click') // $(".el-icon-arrow-right").trigger('click')
}, 200) // }, 200)
// $(".el-icon-arrow-right").hover(function () {
// $(".el-icon-arrow-right").trigger('click')
// console.log("aaaa")
// }, function () {
// $(".el-icon-arrow-right").trigger('click')
// console.log("bbbb")
// });
}, (res) => { }, (res) => {
// //
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment