mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 03:46:45 +08:00
投票
This commit is contained in:
13
package-lock.json
generated
13
package-lock.json
generated
@@ -13,6 +13,7 @@
|
||||
"ant-design-vue": "^3.2.12",
|
||||
"axios": "^1.1.3",
|
||||
"core-js": "^3.8.3",
|
||||
"dayjs": "^1.11.6",
|
||||
"element-plus": "^2.2.17",
|
||||
"element-resize-detector": "^1.2.4",
|
||||
"html2canvas": "^1.4.1",
|
||||
@@ -4949,9 +4950,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/dayjs": {
|
||||
"version": "1.11.5",
|
||||
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.5.tgz",
|
||||
"integrity": "sha512-CAdX5Q3YW3Gclyo5Vpqkgpj8fSdLQcRuzfX6mC6Phy0nfJ0eGYOeS7m4mt2plDWLAtA4TqTakvbboHvUxfe4iA=="
|
||||
"version": "1.11.6",
|
||||
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.6.tgz",
|
||||
"integrity": "sha512-zZbY5giJAinCG+7AGaw0wIhNZ6J8AhWuSXKvuc1KAyMiRsvGQWqh4L+MomvhdAYjN+lqvVCMq1I41e3YHvXkyQ=="
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.3.4",
|
||||
@@ -15686,9 +15687,9 @@
|
||||
}
|
||||
},
|
||||
"dayjs": {
|
||||
"version": "1.11.5",
|
||||
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.5.tgz",
|
||||
"integrity": "sha512-CAdX5Q3YW3Gclyo5Vpqkgpj8fSdLQcRuzfX6mC6Phy0nfJ0eGYOeS7m4mt2plDWLAtA4TqTakvbboHvUxfe4iA=="
|
||||
"version": "1.11.6",
|
||||
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.6.tgz",
|
||||
"integrity": "sha512-zZbY5giJAinCG+7AGaw0wIhNZ6J8AhWuSXKvuc1KAyMiRsvGQWqh4L+MomvhdAYjN+lqvVCMq1I41e3YHvXkyQ=="
|
||||
},
|
||||
"debug": {
|
||||
"version": "4.3.4",
|
||||
|
||||
BIN
src/assets/del.png
Normal file
BIN
src/assets/del.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
@@ -129,13 +129,22 @@
|
||||
action="/manageApi/vote/baseVoteupload"
|
||||
v-model:file-list="fileList"
|
||||
> -->
|
||||
<a-upload
|
||||
:before-upload="beforeUpload"
|
||||
:multiple="false"
|
||||
:max-count="1"
|
||||
v-model:file-list="fileList"
|
||||
>
|
||||
<a-upload :before-upload="beforeUpload" :max-count="1">
|
||||
<button class="xkbtn">点击上传</button>
|
||||
<template #itemRender="{ file, actions }">
|
||||
<a-space v-if="file.type.indexOf('sheet') > -1">
|
||||
<span :style="file.status === 'error' ? 'color: red' : ''">
|
||||
{{ file.name }}
|
||||
</span>
|
||||
<a href="javascript:;" @click="actions.remove">
|
||||
<img
|
||||
src="../../assets/del.png"
|
||||
alt="del"
|
||||
style="width: 12px; height: 12px"
|
||||
/>
|
||||
</a>
|
||||
</a-space>
|
||||
</template>
|
||||
</a-upload>
|
||||
<div v-if="voteCount > 0">
|
||||
<a-tag color="processing">
|
||||
@@ -286,36 +295,22 @@ export default {
|
||||
|
||||
// 限制文件格式上传
|
||||
const beforeUpload = (file) => {
|
||||
console.log(file);
|
||||
if (file.type.indexOf("sheet") == -1) {
|
||||
message.destroy();
|
||||
message.error("请上传正确的文件格式");
|
||||
|
||||
console.log(state.fileList);
|
||||
|
||||
state.fileList = [];
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
// let resFileList = [...info.fileList];
|
||||
|
||||
// resFileList.map((file) => {
|
||||
// if (file.response) {
|
||||
// // Component will show file.url as link
|
||||
// file.url = file.response.url;
|
||||
// console.log("file========", file);
|
||||
// console.log("file========", file.response);
|
||||
// state.voteCount = file.response.data;
|
||||
// }
|
||||
// });
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append("uploadFile", file);
|
||||
baseVoteupload(formData).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
console.log(res);
|
||||
state.basevote = res.data.data;
|
||||
}
|
||||
});
|
||||
return false;
|
||||
};
|
||||
|
||||
//删除题干信息接口
|
||||
|
||||
Reference in New Issue
Block a user