master
yujialong 1 year ago
parent b99738f4e8
commit 6ddd42d38e
  1. 323
      package-lock.json
  2. 1
      package.json
  3. 2
      src/api/index.js
  4. 15
      src/components/upload/config.js
  5. 150
      src/components/upload/index.vue
  6. 37
      src/components/upload/upload.js
  7. 238
      src/pages/match/add/step1.vue
  8. 19
      src/pages/match/manage/matchArchList.vue
  9. 41
      src/pages/match/manage/matchRank.vue

323
package-lock.json generated

@ -1558,6 +1558,14 @@
"integrity": "sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA==", "integrity": "sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA==",
"dev": true "dev": true
}, },
"agentkeepalive": {
"version": "3.5.2",
"resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.5.2.tgz",
"integrity": "sha512-e0L/HNe6qkQ7H19kTlRRqUibEAwDK5AFk6y3PtMsuut2VAH6+Q4xZml1tNDJD7kSAyqmbG/K08K5WEJYtUrSlQ==",
"requires": {
"humanize-ms": "^1.2.1"
}
},
"ajv": { "ajv": {
"version": "6.10.2", "version": "6.10.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz",
@ -1580,6 +1588,78 @@
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz",
"integrity": "sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ==" "integrity": "sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ=="
}, },
"ali-oss": {
"version": "6.18.1",
"resolved": "https://registry.npmjs.org/ali-oss/-/ali-oss-6.18.1.tgz",
"integrity": "sha512-VsptD0jX3JNc3AjiLs5a9oTP0ArfT9IYhBuY6G/SpuY6LMuiwfqywrAosY65BlHKODAdYy8VWL6kmt0mO7BUGA==",
"requires": {
"address": "^1.2.2",
"agentkeepalive": "^3.4.1",
"bowser": "^1.6.0",
"copy-to": "^2.0.1",
"dateformat": "^2.0.0",
"debug": "^4.3.4",
"destroy": "^1.0.4",
"end-or-error": "^1.0.1",
"get-ready": "^1.0.0",
"humanize-ms": "^1.2.0",
"is-type-of": "^1.4.0",
"js-base64": "^2.5.2",
"jstoxml": "^2.0.0",
"merge-descriptors": "^1.0.1",
"mime": "^2.4.5",
"platform": "^1.3.1",
"pump": "^3.0.0",
"sdk-base": "^2.0.1",
"stream-http": "2.8.2",
"stream-wormhole": "^1.0.4",
"urllib": "2.41.0",
"utility": "^1.18.0",
"xml2js": "^0.6.2"
},
"dependencies": {
"address": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/address/-/address-1.2.2.tgz",
"integrity": "sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA=="
},
"debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
"requires": {
"ms": "2.1.2"
}
},
"js-base64": {
"version": "2.6.4",
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
},
"mime": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz",
"integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg=="
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"stream-http": {
"version": "2.8.2",
"resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.2.tgz",
"integrity": "sha512-QllfrBhqF1DPcz46WxKTs6Mz1Bpc+8Qm6vbqOpVav5odAXwbyzwnEczoWqtxrsmlO+cJqtPrp/8gWKWjaKLLlA==",
"requires": {
"builtin-status-codes": "^3.0.0",
"inherits": "^2.0.1",
"readable-stream": "^2.3.6",
"to-arraybuffer": "^1.0.0",
"xtend": "^4.0.0"
}
}
}
},
"alphanum-sort": { "alphanum-sort": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz",
@ -1648,8 +1728,7 @@
"any-promise": { "any-promise": {
"version": "1.3.0", "version": "1.3.0",
"resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz",
"integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=", "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8="
"dev": true
}, },
"anymatch": { "anymatch": {
"version": "2.0.0", "version": "2.0.0",
@ -2223,6 +2302,11 @@
"integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=",
"dev": true "dev": true
}, },
"bowser": {
"version": "1.9.4",
"resolved": "https://registry.npmjs.org/bowser/-/bowser-1.9.4.tgz",
"integrity": "sha512-9IdMmj2KjigRq6oWhmwv1W36pDuA4STQZ8q6YO9um+x07xgYNCD3Oou+WP/3L1HNz7iqythGet3/p4wvc8AAwQ=="
},
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
@ -2379,8 +2463,7 @@
"builtin-status-codes": { "builtin-status-codes": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz",
"integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug="
"dev": true
}, },
"bytes": { "bytes": {
"version": "3.1.0", "version": "3.1.0",
@ -2971,8 +3054,7 @@
"content-type": { "content-type": {
"version": "1.0.4", "version": "1.0.4",
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
"integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
"dev": true
}, },
"convert-source-map": { "convert-source-map": {
"version": "1.7.0", "version": "1.7.0",
@ -3014,6 +3096,11 @@
"resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz",
"integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40="
}, },
"copy-to": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/copy-to/-/copy-to-2.0.1.tgz",
"integrity": "sha512-3DdaFaU/Zf1AnpLiFDeNCD4TOWe3Zl2RZaTzUvWiIk5ERzcCodOE20Vqq4fzCbNoHURFHT4/us/Lfq+S2zyY4w=="
},
"copy-webpack-plugin": { "copy-webpack-plugin": {
"version": "4.6.0", "version": "4.6.0",
"resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.6.0.tgz", "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.6.0.tgz",
@ -3716,6 +3803,14 @@
} }
} }
}, },
"default-user-agent": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/default-user-agent/-/default-user-agent-1.0.0.tgz",
"integrity": "sha512-bDF7bg6OSNcSwFWPu4zYKpVkJZQYVrAANMYB8bc9Szem1D0yKdm4sa/rOCs2aC9+2GMqQ7KnwtZRvDhmLF0dXw==",
"requires": {
"os-name": "~1.0.3"
}
},
"defaults": { "defaults": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz",
@ -3848,8 +3943,7 @@
"destroy": { "destroy": {
"version": "1.0.4", "version": "1.0.4",
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
"integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
"dev": true
}, },
"detect-file": { "detect-file": {
"version": "1.0.0", "version": "1.0.0",
@ -3878,6 +3972,11 @@
"randombytes": "^2.0.0" "randombytes": "^2.0.0"
} }
}, },
"digest-header": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/digest-header/-/digest-header-1.1.0.tgz",
"integrity": "sha512-glXVh42vz40yZb9Cq2oMOt70FIoWiv+vxNvdKdU8CwjLad25qHM3trLxhl9bVjdr6WaslIXhWpn0NO8T/67Qjg=="
},
"dir-glob": { "dir-glob": {
"version": "2.2.2", "version": "2.2.2",
"resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz",
@ -4066,8 +4165,7 @@
"ee-first": { "ee-first": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
"dev": true
}, },
"ejs": { "ejs": {
"version": "2.7.4", "version": "2.7.4",
@ -4233,11 +4331,15 @@
"version": "1.4.4", "version": "1.4.4",
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
"integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
"dev": true,
"requires": { "requires": {
"once": "^1.4.0" "once": "^1.4.0"
} }
}, },
"end-or-error": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/end-or-error/-/end-or-error-1.0.1.tgz",
"integrity": "sha512-OclLMSug+k2A0JKuf494im25ANRBVW8qsjmwbgX7lQ8P82H21PQ1PWkoYwb9y5yMBS69BPlwtzdIFClo3+7kOQ=="
},
"enhanced-resolve": { "enhanced-resolve": {
"version": "4.1.1", "version": "4.1.1",
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.1.tgz", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.1.tgz",
@ -4325,8 +4427,7 @@
"escape-html": { "escape-html": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
"integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
"dev": true
}, },
"escape-string-regexp": { "escape-string-regexp": {
"version": "1.0.5", "version": "1.0.5",
@ -4884,6 +4985,23 @@
"mime-types": "^2.1.12" "mime-types": "^2.1.12"
} }
}, },
"formstream": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/formstream/-/formstream-1.3.1.tgz",
"integrity": "sha512-FkW++ub+VbE5dpwukJVDizNWhSgp8FhmhI65pF7BZSVStBqe6Wgxe2Z9/Vhsn7l7nXCPwP+G1cyYlX8VwWOf0g==",
"requires": {
"destroy": "^1.0.4",
"mime": "^2.5.2",
"pause-stream": "~0.0.11"
},
"dependencies": {
"mime": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz",
"integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg=="
}
}
},
"forwarded": { "forwarded": {
"version": "0.1.2", "version": "0.1.2",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz",
@ -5567,6 +5685,11 @@
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="
}, },
"get-ready": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/get-ready/-/get-ready-1.0.0.tgz",
"integrity": "sha512-mFXCZPJIlcYcth+N8267+mghfYN9h3EhsDa6JSnbA3Wrhh/XFpuowviFcsDeYZtKspQyWyJqfs4O6P8CHeTwzw=="
},
"get-stdin": { "get-stdin": {
"version": "4.0.1", "version": "4.0.1",
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz",
@ -6860,11 +6983,18 @@
"integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==",
"dev": true "dev": true
}, },
"humanize-ms": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz",
"integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==",
"requires": {
"ms": "^2.0.0"
}
},
"iconv-lite": { "iconv-lite": {
"version": "0.4.24", "version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
"dev": true,
"requires": { "requires": {
"safer-buffer": ">= 2.1.2 < 3" "safer-buffer": ">= 2.1.2 < 3"
} }
@ -7059,8 +7189,7 @@
"ip": { "ip": {
"version": "1.1.5", "version": "1.1.5",
"resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz",
"integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo="
"dev": true
}, },
"ip-regex": { "ip-regex": {
"version": "2.1.0", "version": "2.1.0",
@ -7142,6 +7271,11 @@
"integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==",
"dev": true "dev": true
}, },
"is-class-hotfix": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/is-class-hotfix/-/is-class-hotfix-0.0.6.tgz",
"integrity": "sha512-0n+pzCC6ICtVr/WXnN2f03TK/3BfXY7me4cjCAqT8TYXEl0+JBRoqBo94JJHXcyDSLUeWbNX8Fvy5g5RJdAstQ=="
},
"is-color-stop": { "is-color-stop": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-color-stop/-/is-color-stop-1.1.0.tgz", "resolved": "https://registry.npmjs.org/is-color-stop/-/is-color-stop-1.1.0.tgz",
@ -7352,6 +7486,16 @@
"has-symbols": "^1.0.1" "has-symbols": "^1.0.1"
} }
}, },
"is-type-of": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/is-type-of/-/is-type-of-1.4.0.tgz",
"integrity": "sha512-EddYllaovi5ysMLMEN7yzHEKh8A850cZ7pykrY1aNRQGn/CDjRDE9qEWbIdt7xGEVJmjBXzU/fNnC4ABTm8tEQ==",
"requires": {
"core-util-is": "^1.0.2",
"is-class-hotfix": "~0.0.6",
"isstream": "~0.1.2"
}
},
"is-typedarray": { "is-typedarray": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
@ -7521,6 +7665,11 @@
"verror": "1.10.0" "verror": "1.10.0"
} }
}, },
"jstoxml": {
"version": "2.2.9",
"resolved": "https://registry.npmjs.org/jstoxml/-/jstoxml-2.2.9.tgz",
"integrity": "sha512-OYWlK0j+roh+eyaMROlNbS5cd5R25Y+IUpdl7cNdB8HNrkgwQzIS7L9MegxOiWNBj9dQhA/yAxiMwCC5mwNoBw=="
},
"jszip": { "jszip": {
"version": "3.10.1", "version": "3.10.1",
"resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz",
@ -8102,8 +8251,7 @@
"merge-descriptors": { "merge-descriptors": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
"integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
"dev": true
}, },
"merge-source-map": { "merge-source-map": {
"version": "1.1.0", "version": "1.1.0",
@ -8345,7 +8493,6 @@
"version": "2.7.0", "version": "2.7.0",
"resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz",
"integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==",
"dev": true,
"requires": { "requires": {
"any-promise": "^1.0.0", "any-promise": "^1.0.0",
"object-assign": "^4.0.1", "object-assign": "^4.0.1",
@ -8939,6 +9086,15 @@
"mem": "^4.0.0" "mem": "^4.0.0"
} }
}, },
"os-name": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/os-name/-/os-name-1.0.3.tgz",
"integrity": "sha512-f5estLO2KN8vgtTRaILIgEGBoBrMnZ3JQ7W9TMZCnOIGwHe8TRGSpcagnWDo+Dfhd/z08k9Xe75hvciJJ8Qaew==",
"requires": {
"osx-release": "^1.0.0",
"win-release": "^1.0.0"
}
},
"os-tmpdir": { "os-tmpdir": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npm.taobao.org/os-tmpdir/download/os-tmpdir-1.0.2.tgz", "resolved": "https://registry.npm.taobao.org/os-tmpdir/download/os-tmpdir-1.0.2.tgz",
@ -8953,6 +9109,14 @@
"os-tmpdir": "^1.0.0" "os-tmpdir": "^1.0.0"
} }
}, },
"osx-release": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/osx-release/-/osx-release-1.1.0.tgz",
"integrity": "sha512-ixCMMwnVxyHFQLQnINhmIpWqXIfS2YOXchwQrk+OFzmo6nDjQ0E4KXAyyUh0T0MZgV4bUhkRrAbVqlE4yLVq4A==",
"requires": {
"minimist": "^1.1.0"
}
},
"p-defer": { "p-defer": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz",
@ -9185,6 +9349,14 @@
} }
} }
}, },
"pause-stream": {
"version": "0.0.11",
"resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz",
"integrity": "sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==",
"requires": {
"through": "~2.3"
}
},
"pbkdf2": { "pbkdf2": {
"version": "3.0.17", "version": "3.0.17",
"resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz",
@ -9290,6 +9462,11 @@
"find-up": "^2.1.0" "find-up": "^2.1.0"
} }
}, },
"platform": {
"version": "1.3.6",
"resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz",
"integrity": "sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg=="
},
"plugin-error": { "plugin-error": {
"version": "0.1.2", "version": "0.1.2",
"resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz", "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz",
@ -10044,7 +10221,6 @@
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
"integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
"dev": true,
"requires": { "requires": {
"end-of-stream": "^1.1.0", "end-of-stream": "^1.1.0",
"once": "^1.3.1" "once": "^1.3.1"
@ -10973,8 +11149,7 @@
"sax": { "sax": {
"version": "1.2.4", "version": "1.2.4",
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
"dev": true
}, },
"schart.js": { "schart.js": {
"version": "3.0.0", "version": "3.0.0",
@ -11011,6 +11186,14 @@
} }
} }
}, },
"sdk-base": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/sdk-base/-/sdk-base-2.0.1.tgz",
"integrity": "sha512-eeG26wRwhtwYuKGCDM3LixCaxY27Pa/5lK4rLKhQa7HBjJ3U3Y+f81MMZQRsDw/8SC2Dao/83yJTXJ8aULuN8Q==",
"requires": {
"get-ready": "~1.0.0"
}
},
"select-hose": { "select-hose": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz",
@ -11664,8 +11847,7 @@
"statuses": { "statuses": {
"version": "1.5.0", "version": "1.5.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
"integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow="
"dev": true
}, },
"stdout-stream": { "stdout-stream": {
"version": "1.4.1", "version": "1.4.1",
@ -11725,6 +11907,11 @@
"integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=",
"dev": true "dev": true
}, },
"stream-wormhole": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/stream-wormhole/-/stream-wormhole-1.1.0.tgz",
"integrity": "sha512-gHFfL3px0Kctd6Po0M8TzEvt3De/xu6cnRrjlfYNhwbhLPLwigI2t1nc6jrzNuaYg5C4YF78PPFuQPzRiqn9ew=="
},
"strict-uri-encode": { "strict-uri-encode": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz",
@ -11995,7 +12182,6 @@
"version": "3.3.0", "version": "3.3.0",
"resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.0.tgz", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.0.tgz",
"integrity": "sha1-5p44obq+lpsBCCB5eLn2K4hgSDk=", "integrity": "sha1-5p44obq+lpsBCCB5eLn2K4hgSDk=",
"dev": true,
"requires": { "requires": {
"any-promise": "^1.0.0" "any-promise": "^1.0.0"
} }
@ -12004,7 +12190,6 @@
"version": "1.6.0", "version": "1.6.0",
"resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz",
"integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=", "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=",
"dev": true,
"requires": { "requires": {
"thenify": ">= 3.1.0 < 4" "thenify": ">= 3.1.0 < 4"
} }
@ -12076,8 +12261,7 @@
"to-arraybuffer": { "to-arraybuffer": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz",
"integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M="
"dev": true
}, },
"to-fast-properties": { "to-fast-properties": {
"version": "2.0.0", "version": "2.0.0",
@ -12251,6 +12435,24 @@
"resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz",
"integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=" "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo="
}, },
"unescape": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/unescape/-/unescape-1.0.1.tgz",
"integrity": "sha512-O0+af1Gs50lyH1nUu3ZyYS1cRh01Q/kUKatTOkSs7jukXE6/NebucDVxyiDsA9AQ4JC1V1jUH9EO8JX2nMDgGQ==",
"requires": {
"extend-shallow": "^2.0.1"
},
"dependencies": {
"extend-shallow": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
"integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==",
"requires": {
"is-extendable": "^0.1.0"
}
}
}
},
"unicode-canonical-property-names-ecmascript": { "unicode-canonical-property-names-ecmascript": {
"version": "1.0.4", "version": "1.0.4",
"resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz",
@ -12443,6 +12645,37 @@
"requires-port": "^1.0.0" "requires-port": "^1.0.0"
} }
}, },
"urllib": {
"version": "2.41.0",
"resolved": "https://registry.npmjs.org/urllib/-/urllib-2.41.0.tgz",
"integrity": "sha512-pNXdxEv52L67jahLT+/7QE+Fup1y2Gc6EdmrAhQ6OpQIC2rl14oWwv9hvk1GXOZqEnJNwRXHABuwgPOs1CtL7g==",
"requires": {
"any-promise": "^1.3.0",
"content-type": "^1.0.2",
"debug": "^2.6.9",
"default-user-agent": "^1.0.0",
"digest-header": "^1.0.0",
"ee-first": "~1.1.1",
"formstream": "^1.1.0",
"humanize-ms": "^1.2.0",
"iconv-lite": "^0.4.15",
"ip": "^1.1.5",
"pump": "^3.0.0",
"qs": "^6.4.0",
"statuses": "^1.3.1",
"utility": "^1.16.1"
},
"dependencies": {
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"requires": {
"ms": "2.0.0"
}
}
}
},
"use": { "use": {
"version": "3.1.1", "version": "3.1.1",
"resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
@ -12491,6 +12724,18 @@
"integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=", "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=",
"dev": true "dev": true
}, },
"utility": {
"version": "1.18.0",
"resolved": "https://registry.npmjs.org/utility/-/utility-1.18.0.tgz",
"integrity": "sha512-PYxZDA+6QtvRvm//++aGdmKG/cI07jNwbROz0Ql+VzFV1+Z0Dy55NI4zZ7RHc9KKpBePNFwoErqIuqQv/cjiTA==",
"requires": {
"copy-to": "^2.0.1",
"escape-html": "^1.0.3",
"mkdirp": "^0.5.1",
"mz": "^2.7.0",
"unescape": "^1.0.1"
}
},
"utils-merge": { "utils-merge": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
@ -13218,6 +13463,14 @@
"string-width": "^1.0.2 || 2" "string-width": "^1.0.2 || 2"
} }
}, },
"win-release": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/win-release/-/win-release-1.1.1.tgz",
"integrity": "sha512-iCRnKVvGxOQdsKhcQId2PXV1vV3J/sDPXKA4Oe9+Eti2nb2ESEsYHRYls/UjoUW3bIc5ZDO8dTH50A/5iVN+bw==",
"requires": {
"semver": "^5.0.1"
}
},
"worker-farm": { "worker-farm": {
"version": "1.7.0", "version": "1.7.0",
"resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz", "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz",
@ -13331,6 +13584,20 @@
"async-limiter": "~1.0.0" "async-limiter": "~1.0.0"
} }
}, },
"xml2js": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz",
"integrity": "sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==",
"requires": {
"sax": ">=0.6.0",
"xmlbuilder": "~11.0.0"
}
},
"xmlbuilder": {
"version": "11.0.1",
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz",
"integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA=="
},
"xss": { "xss": {
"version": "1.0.14", "version": "1.0.14",
"resolved": "https://registry.npmjs.org/xss/-/xss-1.0.14.tgz", "resolved": "https://registry.npmjs.org/xss/-/xss-1.0.14.tgz",

@ -9,6 +9,7 @@
}, },
"dependencies": { "dependencies": {
"@tinymce/tinymce-vue": "^3.2.8", "@tinymce/tinymce-vue": "^3.2.8",
"ali-oss": "^6.18.1",
"axios": "^0.18.0", "axios": "^0.18.0",
"babel-polyfill": "^6.26.0", "babel-polyfill": "^6.26.0",
"echarts": "^4.8.0", "echarts": "^4.8.0",

@ -254,6 +254,8 @@ export default {
cCompetitionStageFileList: `competition/cCompetitionStageFile/listByEntity`, cCompetitionStageFileList: `competition/cCompetitionStageFile/listByEntity`,
derive: `${host}competition/cCompetitionStageFile/deriveAll`, derive: `${host}competition/cCompetitionStageFile/deriveAll`,
allExperimentalResultsAreDerived: `${host}competition/competition/performance/allExperimentalResultsAreDerived`, allExperimentalResultsAreDerived: `${host}competition/competition/performance/allExperimentalResultsAreDerived`,
derivedRanking: `${host}competition/competition/rank/derivedRanking`,
individualDerivedRanking: `${host}competition/competition/rank/individualDerivedRanking`,
gradeImport: `https://www.occupationlab.com/template/赛事成绩导入模板.xlsx`, gradeImport: `https://www.occupationlab.com/template/赛事成绩导入模板.xlsx`,
rankImportTeam: `https://www.occupationlab.com/template/赛事排名导入模板(团队赛).xlsx`, rankImportTeam: `https://www.occupationlab.com/template/赛事排名导入模板(团队赛).xlsx`,
rankImportPerson: `https://www.occupationlab.com/template/赛事排名导入模板(个人赛).xlsx`, rankImportPerson: `https://www.occupationlab.com/template/赛事排名导入模板(个人赛).xlsx`,

@ -0,0 +1,15 @@
/**
* 阿里云oss配置
* */
export default {
// oss账号信息
config: {
region: 'oss-cn-shenzhen',
accessKeyId: 'LTAI4FzqQHnk4rozqLZ8jCNj',
accessKeySecret: 'mveW7B1OyFoKUkHm8WsxmrjHmkJWHq',
bucket: 'huoran'
},
// 上传成功url前置部分(成功回调没有返回url)
preUrl: 'https://huoran.oss-cn-shenzhen.aliyuncs.com/'
}

@ -0,0 +1,150 @@
<template>
<el-upload :disabled="uploading"
:before-upload="beforeUpload"
:on-remove="onRemove"
:on-error="uploadError"
:limit="limit"
action=""
:on-exceed="handleExceed"
:show-file-list="showFiles"
:file-list="fileList"
:http-request="handleRequest"
name="file">
<slot name="trigger">
<el-button size="small"
:loading="uploading">{{ uploading ? '正在上传' : '上传文件' }}</el-button>
</slot>
<div slot="tip"
class="el-upload__tip">
<el-progress v-if="uploading"
class="upload-progress"
:stroke-width="3"
:percentage="uploadProgress"></el-progress>
<slot name="tip">
<p>支持扩展名.rar .zip .doc .docx .pdf .jpg...</p>
</slot>
</div>
</el-upload>
</template>
<script>
import OSS from 'ali-oss'
import OssConfig from './config.js'
import Util from '@/libs/util'
export default {
props: {
//
limit: {
type: Number,
default: 1
},
// (: Mb)
maxSize: {
type: Number,
default: 10
},
//
showFileList: {
type: Boolean,
default: true
},
//
fileList: {
type: Array,
default: () => []
},
// fileList使fileListfalse
changeFileList: {
type: Boolean,
default: true
},
//
onRemove: {
type: Function,
default: new Function()
},
},
data () {
return {
client: null,
uploading: false,
uploadProgress: 0,
showFiles: this.showFileList
};
},
mounted () {
this.initOss()
},
methods: {
// oss
initOss () {
this.client = new OSS(OssConfig.config)
},
//
beforeUpload (file) {
const oversize = file.size / 1024 / 1024 < this.maxSize
if (!oversize) Util.warningMsg(`请上传小于${this.maxSize}MB的附件!`)
if (oversize) {
this.$emit('beforeUpload', file)
return true
} else {
return false
}
},
//
handleProgress (progress) {
this.uploadProgress = Number((progress * 100).toFixed(2))
},
//
async handleRequest ({ file }) {
try {
this.uploadProgress = 0
this.uploading = true
this.showFiles = false
// oss
const { name } = await this.client.multipartUpload(file.name, file, {
progress: this.handleProgress
});
this.uploading = false
const url = OssConfig.preUrl + name
this.changeFileList && this.$emit('update:fileList', [
...this.fileList,
{
name: name,
url
}
])
this.showFiles = true
this.$emit('onSuccess', {
format: Util.getFileExt(file.name),
name: file.name,
url,
size: file.size,
})
} catch (error) { }
},
uploadError (err, file, fileList) {
this.$message({
message: "上传出错,请重试!",
type: "error",
center: true
})
},
beforeRemove (file, fileList) {
return this.$confirm(`确定移除 ${file.name}`);
},
handleExceed (files, fileList) {
Util.warningMsg(`当前限制选择 ${this.limit} 个文件,如需更换,请删除上一个文件再重新选择!`);
},
}
};
</script>
<style lang="scss" scoped>
/deep/.upload-progress {
max-width: 300px;
margin: 10px 0;
white-space: nowrap;
}
</style>

@ -0,0 +1,37 @@
// 阿里云oss上传
import OSS from 'ali-oss'
import OssConfig from './config'
import Util from '@/libs/util'
let client = null
// 初始化oss
const initOss = () => {
if (!client) client = new OSS(OssConfig.config)
}
export default {
// 上传文件
upload(file) {
initOss()
return new Promise(async (resolve, reject) => {
try {
// 上传到阿里云oss
const res = await client.multipartUpload(file.name, file);
resolve({
format: Util.getFileExt(file.name),
name: file.name,
url: OssConfig.preUrl + res.name,
size: file.size,
})
} catch (error) {
reject()
}
})
},
// 删除文件(传完整url,不是没有https的name,因为很多接口没有存name,只存url,所以统一使用url)
async del(url) {
initOss()
await client.delete(url.replace(OssConfig.preUrl, ''));
}
}

@ -3,10 +3,12 @@
<div class="page"> <div class="page">
<div class="page-content"> <div class="page-content">
<div class="p-title">大赛信息</div> <div class="p-title">大赛信息</div>
<el-form label-width="170px" label-suffix=":" size="small" :disabled="!editing && form.id !== ''"> <el-form label-width="170px"
label-suffix=":"
size="small"
:disabled="!editing && form.id !== ''">
<el-form-item label="竞赛封面(选填)"> <el-form-item label="竞赛封面(选填)">
<el-upload <el-upload class="avatar-uploader"
class="avatar-uploader"
accept=".jpg,.png,.jpeg,.gif" accept=".jpg,.png,.jpeg,.gif"
:on-remove="handleRemove" :on-remove="handleRemove"
:on-error="uploadError" :on-error="uploadError"
@ -16,52 +18,71 @@
:on-exceed="handleExceed" :on-exceed="handleExceed"
:action="this.api.fileupload" :action="this.api.fileupload"
:headers="headers" :headers="headers"
name="file" name="file">
> <img v-if="form.coverUrl"
<img v-if="form.coverUrl" :src="form.coverUrl" class="avatar"> :src="form.coverUrl"
<div class="uploader-default" v-else> class="avatar">
<div class="uploader-default"
v-else>
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
<p>上传封面</p> <p>上传封面</p>
</div> </div>
<div slot="tip" class="el-upload__tip"> <div slot="tip"
class="el-upload__tip">
<p>展示宽度为220高度140JPG/PNG/GIF3MB以内</p> <p>展示宽度为220高度140JPG/PNG/GIF3MB以内</p>
</div> </div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item label="竞赛封面长图(选填)"> <el-form-item label="竞赛封面长图(选填)">
<el-upload <el-upload class="avatar-uploader avatar-uploader-lg"
class="avatar-uploader avatar-uploader-lg"
accept=".jpg,.png,.jpeg,.gif" accept=".jpg,.png,.jpeg,.gif"
:on-remove="handleLgRemove" :on-remove="handleLgRemove"
:on-error="uploadError" :on-error="uploadError"
:on-success="uploadLgSuccess" :on-success="uploadLgSuccess"
:before-remove="beforeRemove" :before-remove="beforeRemove"
:limit="1" :on-exceed="handleExceed" :limit="1"
:on-exceed="handleExceed"
:action="this.api.fileupload" :action="this.api.fileupload"
:headers="headers" :headers="headers"
name="file" name="file">
> <img v-if="form.carouselUrl"
<img v-if="form.carouselUrl" :src="form.carouselUrl" class="avatar-lg"> :src="form.carouselUrl"
<div class="uploader-default" v-else> class="avatar-lg">
<div class="uploader-default"
v-else>
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
<p>上传封面</p> <p>上传封面</p>
</div> </div>
<div slot="tip" class="el-upload__tip"> <div slot="tip"
class="el-upload__tip">
<p>展示宽度为1920高度300JPG/PNG/GIF3MB以内</p> <p>展示宽度为1920高度300JPG/PNG/GIF3MB以内</p>
</div> </div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item class="req" label="竞赛名称"> <el-form-item class="req"
label="竞赛名称">
<div class="d-inline-block"> <div class="d-inline-block">
<el-input placeholder="请输入竞赛名称" v-model="form.name" clearable></el-input> <el-input placeholder="请输入竞赛名称"
v-model="form.name"
clearable></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item class="req" label="主办方"> <el-form-item class="req"
label="主办方">
<div class="inline-input"> <div class="inline-input">
<div class="input-wrap" v-for="(item,index) in sponsorList" :key="index"> <div class="input-wrap"
<el-input placeholder="主办方名称" v-model="sponsorList[index]"></el-input> v-for="(item,index) in sponsorList"
<i v-if="sponsorList.length > 1" class="remove" @click="delSponsor(index)"></i> :key="index">
<button v-if="index == 0" class="add-btn" type="button" :disabled="!editing && form.id !== ''" @click="addSponsor"> <el-input placeholder="主办方名称"
v-model="sponsorList[index]"></el-input>
<i v-if="sponsorList.length > 1"
class="remove"
@click="delSponsor(index)"></i>
<button v-if="index == 0"
class="add-btn"
type="button"
:disabled="!editing && form.id !== ''"
@click="addSponsor">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
<span>添加</span> <span>添加</span>
</button> </button>
@ -70,79 +91,136 @@
</el-form-item> </el-form-item>
<el-form-item label="承办方(选填)"> <el-form-item label="承办方(选填)">
<div class="inline-input"> <div class="inline-input">
<div class="input-wrap" v-for="(item,index) in undertakerList" :key="index"> <div class="input-wrap"
<el-input placeholder="承办方名称" v-model="undertakerList[index]"></el-input> v-for="(item,index) in undertakerList"
<i v-if="undertakerList.length > 1" class="remove" @click="delOrganizer(index)"></i> :key="index">
<button v-if="index == 0" class="add-btn" type="button" :disabled="!editing && form.id !== ''" @click="addOrganizer"> <el-input placeholder="承办方名称"
v-model="undertakerList[index]"></el-input>
<i v-if="undertakerList.length > 1"
class="remove"
@click="delOrganizer(index)"></i>
<button v-if="index == 0"
class="add-btn"
type="button"
:disabled="!editing && form.id !== ''"
@click="addOrganizer">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
<span>添加</span> <span>添加</span>
</button> </button>
</div> </div>
</div> </div>
<button v-if="!undertakerList.length" class="add-btn" type="button" @click="addOrganizer"> <button v-if="!undertakerList.length"
class="add-btn"
type="button"
@click="addOrganizer">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
<span>添加</span> <span>添加</span>
</button> </button>
</el-form-item> </el-form-item>
<el-form-item class="req" label="报名时间"> <el-form-item class="req"
<el-date-picker v-model="signupTime" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange" label="报名时间">
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" <el-date-picker v-model="signupTime"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOptions"></el-date-picker> :picker-options="pickerOptions"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item class="req" label="竞赛时间"> <el-form-item class="req"
<el-date-picker v-model="playTime" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange" label="竞赛时间">
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" <el-date-picker v-model="playTime"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOptions"></el-date-picker> :picker-options="pickerOptions"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item class="req" label="比赛范围"> <el-form-item class="req"
label="比赛范围">
<div> <div>
<el-radio v-model="form.competitionScope" :label="0">本校内</el-radio> <el-radio v-model="form.competitionScope"
:label="0">本校内</el-radio>
</div> </div>
<div> <div>
<el-radio v-model="form.competitionScope" :label="1">全平台</el-radio> <el-radio v-model="form.competitionScope"
:label="1">全平台</el-radio>
</div> </div>
<div> <div>
<el-radio v-model="form.competitionScope" :label="2">指定区域院校</el-radio> <el-radio v-model="form.competitionScope"
<el-button v-if="form.competitionScope === 2" type="primary" size="mini" @click="showRange">选择院校</el-button> :label="2">指定区域院校</el-radio>
<el-button v-if="form.competitionScope === 2"
type="primary"
size="mini"
@click="showRange">选择院校</el-button>
<span style="margin-left: 20px">{{ rangeName }}</span> <span style="margin-left: 20px">{{ rangeName }}</span>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item class="req" label="竞赛类型"> <el-form-item class="req"
<el-radio v-model="form.completeCompetitionSetup.competitionType" :label="0">个人赛</el-radio> label="竞赛类型">
<el-radio v-model="form.completeCompetitionSetup.competitionType" :label="1">团队赛</el-radio> <el-radio v-model="form.completeCompetitionSetup.competitionType"
:label="0">个人赛</el-radio>
<el-radio v-model="form.completeCompetitionSetup.competitionType"
:label="1">团队赛</el-radio>
</el-form-item> </el-form-item>
<el-form-item class="req" v-if="!form.completeCompetitionSetup.competitionType" label="报名人数上限"> <el-form-item class="req"
v-if="!form.completeCompetitionSetup.competitionType"
label="报名人数上限">
<div class="input-center"> <div class="input-center">
<el-input placeholder="请输入人数" v-model.number="form.completeCompetitionSetup.quantityLimit" type="number"></el-input> <el-input placeholder="请输入人数"
v-model.number="form.completeCompetitionSetup.quantityLimit"
type="number"></el-input>
</div> </div>
</el-form-item> </el-form-item>
<template v-if="form.completeCompetitionSetup.competitionType"> <template v-if="form.completeCompetitionSetup.competitionType">
<el-form-item class="req" label="报名团队数上限"> <el-form-item class="req"
label="报名团队数上限">
<div class="input-center"> <div class="input-center">
<el-input placeholder="请输入团队数" v-model.number="form.completeCompetitionSetup.quantityLimit" type="number"></el-input> <el-input placeholder="请输入团队数"
v-model.number="form.completeCompetitionSetup.quantityLimit"
type="number"></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item class="req" label="团队人数"> <el-form-item class="req"
<div class="input-center" style="width: 250px;"> label="团队人数">
<el-input v-model.number="form.completeCompetitionSetup.minTeamSize" type="number"></el-input> <div class="input-center"
<el-input style="margin-left: 5px;" v-model.number="form.completeCompetitionSetup.maxTeamSize" type="number"></el-input> / style="width: 250px;">
<el-input v-model.number="form.completeCompetitionSetup.minTeamSize"
type="number"></el-input>
<el-input style="margin-left: 5px;"
v-model.number="form.completeCompetitionSetup.maxTeamSize"
type="number"></el-input> /
</div> </div>
</el-form-item> </el-form-item>
</template> </template>
<el-form-item class="req" label="报名邀请码"> <el-form-item class="req"
<div class="input-center" style="width: 550px;"> label="报名邀请码">
<el-radio v-model="form.completeCompetitionSetup.isNeedCode" :label="0">不需要</el-radio> <div class="input-center"
<el-radio v-model="form.completeCompetitionSetup.isNeedCode" :label="1">需要</el-radio> style="width: 550px;">
<el-input style="width: 250px" placeholder="请输入4位邀请码或点击随机生成" v-model="form.completeCompetitionSetup.invitationCode" :disabled="form.completeCompetitionSetup.isNeedCode === 0"></el-input> <el-radio v-model="form.completeCompetitionSetup.isNeedCode"
<el-button v-if="form.completeCompetitionSetup.isNeedCode === 1" @click="randomInv">随机</el-button> :label="0">不需要</el-radio>
<el-radio v-model="form.completeCompetitionSetup.isNeedCode"
:label="1">需要</el-radio>
<el-input style="width: 250px"
placeholder="请输入4位邀请码或点击随机生成"
v-model="form.completeCompetitionSetup.invitationCode"
:disabled="form.completeCompetitionSetup.isNeedCode === 0"></el-input>
<el-button v-if="form.completeCompetitionSetup.isNeedCode === 1"
@click="randomInv">随机</el-button>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item class="req" label="竞赛详情"> <el-form-item class="req"
<quill v-if="quillShow" ref="quill" :border="true" v-model="form.description" :height="400" :readonly="!editing && form.id !== ''" /> label="竞赛详情">
<quill v-if="quillShow"
ref="quill"
:border="true"
v-model="form.description"
:height="400"
:readonly="!editing && form.id !== ''" />
</el-form-item> </el-form-item>
<el-form-item label="附件"> <el-form-item label="附件">
<el-upload <el-upload :on-remove="handleAnnexRemove"
:on-remove="handleAnnexRemove"
:on-error="uploadError" :on-error="uploadError"
:before-upload="beforeUpload" :before-upload="beforeUpload"
:on-success="uploadAnnexSuccess" :on-success="uploadAnnexSuccess"
@ -151,10 +229,11 @@
:action="this.api.fileupload" :action="this.api.fileupload"
:headers="headers" :headers="headers"
:file-list="fileList" :file-list="fileList"
name="file" name="file">
> <el-button size="small"
<el-button size="small" type="primary">点击上传</el-button> type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip"> <div slot="tip"
class="el-upload__tip">
<p>支持扩展名.rar .zip .doc .docx .pdf .jpg...</p> <p>支持扩展名.rar .zip .doc .docx .pdf .jpg...</p>
</div> </div>
</el-upload> </el-upload>
@ -163,10 +242,13 @@
</div> </div>
</div> </div>
<el-dialog title="请勾选院校" :visible.sync="rangeVisible" width="580px" custom-class="range-dia" :close-on-click-modal="false"> <el-dialog title="请勾选院校"
:visible.sync="rangeVisible"
width="580px"
custom-class="range-dia"
:close-on-click-modal="false">
<div class="range-wrap"> <div class="range-wrap">
<el-cascader <el-cascader ref="range"
ref="range"
class="range-cas" class="range-cas"
key="range" key="range"
v-model="range" v-model="range"
@ -179,8 +261,7 @@
@change="rangeChange" @change="rangeChange"
@visible-change="rangeViChange" @visible-change="rangeViChange"
@input.native="rangeSearch"></el-cascader> @input.native="rangeSearch"></el-cascader>
<el-tag <el-tag v-for="(tag, i) in rangeChecked"
v-for="(tag, i) in rangeChecked"
:key="tag.value" :key="tag.value"
class="range-check" class="range-check"
closable closable
@ -190,9 +271,13 @@
</el-tag> </el-tag>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer"
<el-button size="small" @click="rangeVisible = false"> </el-button> class="dialog-footer">
<el-button size="small" type="primary" @click="rangeSubmit"> </el-button> <el-button size="small"
@click="rangeVisible = false"> </el-button>
<el-button size="small"
type="primary"
@click="rangeSubmit"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
@ -596,7 +681,7 @@ export default {
if (!form.name) return util.warningMsg("请填写竞赛名称"); if (!form.name) return util.warningMsg("请填写竞赛名称");
// //
if (next === 2) { if (next === 2) {
if (form.competitionScope == 2 && !form.competitionRangeList.length) return util.warningMsg('请选择区域、院校') if (form.competitionScope == 2 && (!form.competitionRangeList || !form.competitionRangeList.length)) return util.warningMsg('请选择区域、院校')
if (!form.sponsor) return util.warningMsg("请填写主办方"); if (!form.sponsor) return util.warningMsg("请填写主办方");
if (!form.signUpStartTime) return util.warningMsg("请选择报名时间"); if (!form.signUpStartTime) return util.warningMsg("请选择报名时间");
let now = new Date().getTime(); let now = new Date().getTime();
@ -621,6 +706,8 @@ export default {
} }
if (isNeedCode && (!invitationCode || invitationCode.length !== 4)) return util.warningMsg('请填写四位数邀请码') if (isNeedCode && (!invitationCode || invitationCode.length !== 4)) return util.warningMsg('请填写四位数邀请码')
if (!form.description) return util.warningMsg("请填写竞赛详情"); if (!form.description) return util.warningMsg("请填写竞赛详情");
} else {
if (form.competitionScope == 2 && (!form.competitionRangeList || !form.competitionRangeList.length)) form.competitionScope = 1
} }
this.$parent.showLoad() this.$parent.showLoad()
form.publishStatus = status form.publishStatus = status
@ -752,7 +839,8 @@ $upload-lg-height: 150px;
/deep/ .d-inline-block { /deep/ .d-inline-block {
width: 216px; width: 216px;
.el-select, .el-input { .el-select,
.el-input {
width: 100%; width: 100%;
} }
} }
@ -771,7 +859,7 @@ $upload-lg-height: 150px;
.remove { .remove {
width: 16px; width: 16px;
height: 16px; height: 16px;
background: url("../../../assets/img/close.png") 0 0/cover no-repeat; background: url('../../../assets/img/close.png') 0 0 / cover no-repeat;
cursor: pointer; cursor: pointer;
} }
} }

@ -190,13 +190,14 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" <el-table-column label="操作"
align="center" align="center"
width="160"> width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="!isCompress(scope.row.fileFormat)" <el-button v-if="!isCompress(scope.row.fileFormat)"
type="text" type="text"
@click="preview(scope.row)">预览文件</el-button> @click="preview(scope.row)">预览文件</el-button>
<el-button type="primary" <el-button type="primary"
size="mini" size="mini"
:loading="scope.row.loading"
@click="exportFile(scope.row)">导出文件</el-button> @click="exportFile(scope.row)">导出文件</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -323,6 +324,7 @@ export default {
keyWord: this.keyword, keyWord: this.keyword,
}).then(({ data }) => { }).then(({ data }) => {
data.records.forEach(e => { data.records.forEach(e => {
e.loading = false
e.fileType = '其他' e.fileType = '其他'
if (util.isVideo(e.fileFormat)) { if (util.isVideo(e.fileFormat)) {
e.fileType = '视频' e.fileType = '视频'
@ -567,7 +569,20 @@ export default {
}, },
// //
exportFile (item) { exportFile (item) {
util.downloadFile(item.userName + '-' + item.fileName, item.filePath) item.loading = true
const url = item.filePath
var x = new XMLHttpRequest()
x.open("GET", url, true)
x.responseType = "blob"
x.onload = function (e) {
var url = window.URL.createObjectURL(x.response)
var a = document.createElement("a")
a.href = url
a.download = item.userName + '-' + item.fileName
a.click()
item.loading = false
}
x.send()
}, },
} }
}; };

@ -39,18 +39,28 @@
<el-button v-if="!published" <el-button v-if="!published"
type="primary" type="primary"
@click="cancelPublish(1)">发布排名</el-button> @click="cancelPublish(1)">发布排名</el-button>
<div v-else> <template v-else>
<span style="margin-right: 10px">{{ publishTime }}发布排名</span> <span style="margin-right: 10px">{{ publishTime }}发布排名</span>
<el-button type="primary" <el-button type="primary"
@click="cancelPublish(0)">取消发布</el-button> @click="cancelPublish(0)">取消发布</el-button>
</div> </template>
<el-button v-if="list.length"
type="primary"
:loading="loading"
@click="exportData">{{ loading ? '正在导出' : '批量导出' }}</el-button>
</div> </div>
</div> </div>
<el-table :data="list" <el-table :data="list"
class="table" class="table"
ref="table" ref="table"
stripe stripe
row-key="scoreId"
@selection-change="handleSelectionChange"
header-align="center"> header-align="center">
<el-table-column type="selection"
width="55"
align="center"
:reserve-selection="true"></el-table-column>
<el-table-column type="index" <el-table-column type="index"
width="60" width="60"
label="排名" label="排名"
@ -312,7 +322,9 @@ export default {
return [`${hour}:${minute}:${second} - 23:59:59`] return [`${hour}:${minute}:${second} - 23:59:59`]
})(), })(),
}, },
uploaded: 0 uploaded: 0,
multipleSelection: [],
loading: false
}; };
}, },
mounted () { mounted () {
@ -487,10 +499,33 @@ export default {
toReport (row) { toReport (row) {
this.$router.push(`/match/report?reportId=${row.reportId}`) this.$router.push(`/match/report?reportId=${row.reportId}`)
}, },
handleSelectionChange (val) { //
this.multipleSelection = val;
},
handleCurrentChange (val) { // handleCurrentChange (val) { //
this.page = val; this.page = val;
this.getData(); this.getData();
}, },
// ()
exportData () {
let { list } = this
if (this.multipleSelection.length) {
list = this.multipleSelection
}
this.loading = true
list.forEach((e, i) => {
e.serialNumber = i + 1
if (e.leaderName) e.userName = e.leaderName
})
axios.post(this.api[this.competitionType ? 'derivedRanking' : 'individualDerivedRanking'], list, {
headers: this.headers,
responseType: 'blob'
}).then((res) => {
util.downloadFileDirect(`${this.grades.find(e => e.stageId == this.active).stageName}排名.xls`, new Blob([res.data]))
this.loading = false
}).catch(res => { })
},
// //
publishSubmit () { publishSubmit () {
if (this.type) { // if (this.type) { //

Loading…
Cancel
Save