|
@@ -32,7 +32,6 @@
|
|
|
<el-button icon="edit" size="small" type="primary" link @click="uploadFunc(scope.row)">上传</el-button>
|
|
<el-button icon="edit" size="small" type="primary" link @click="uploadFunc(scope.row)">上传</el-button>
|
|
|
<el-button icon="edit" size="small" type="primary" link @click="configurationFunc(scope.row)">配置</el-button>
|
|
<el-button icon="edit" size="small" type="primary" link @click="configurationFunc(scope.row)">配置</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
-
|
|
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
<div class="gva-pagination">
|
|
<div class="gva-pagination">
|
|
@@ -62,16 +61,15 @@
|
|
|
}}</el-text>
|
|
}}</el-text>
|
|
|
</el-upload>
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
-
|
|
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
|
<el-button type="primary" @click="submitUpload" v-loading.fullscreen.lock="fullscreenLoading">立即创建</el-button>
|
|
<el-button type="primary" @click="submitUpload" v-loading.fullscreen.lock="fullscreenLoading">立即创建</el-button>
|
|
|
- <el-button @click="resetForm()">重置</el-button>
|
|
|
|
|
|
|
+ <el-button @click="resetUploadForm()">重置</el-button>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
- <el-dialog v-model="dialogConfFormVisible" custom-class="conf-dialog" :before-close="closeDialog" :title="dialogTitle"
|
|
|
|
|
- :show-close="false" :close-on-press-escape="false" :close-on-click-modal="false">
|
|
|
|
|
|
|
+ <el-dialog v-model="dialogConfFormVisible" custom-class="conf-dialog" :before-close="closeConfDialog"
|
|
|
|
|
+ :title="dialogTitle" :show-close="false" :close-on-press-escape="false" :close-on-click-modal="false">
|
|
|
<div style="height:60vh;overflow:auto;padding:0 12px;">
|
|
<div style="height:60vh;overflow:auto;padding:0 12px;">
|
|
|
<el-form ref="taskForm" :rules="confRules" :model="confForm" label-width="80px">
|
|
<el-form ref="taskForm" :rules="confRules" :model="confForm" label-width="80px">
|
|
|
<el-form-item label="任务id" prop="task_id">
|
|
<el-form-item label="任务id" prop="task_id">
|
|
@@ -89,7 +87,6 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
<template #footer>
|
|
<template #footer>
|
|
|
<div class="dialog-footer">
|
|
<div class="dialog-footer">
|
|
|
<el-button size="small" @click="closeConfDialog">取 消</el-button>
|
|
<el-button size="small" @click="closeConfDialog">取 消</el-button>
|
|
@@ -224,16 +221,6 @@ const handleSelectionChange = (val) => {
|
|
|
apis.value = val
|
|
apis.value = val
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// 弹窗相关
|
|
|
|
|
-const initForm = () => {
|
|
|
|
|
- uploadForm.value.resetFields()
|
|
|
|
|
- upload.value!.clearFiles()
|
|
|
|
|
- form.value = {
|
|
|
|
|
- task_id: '',//游戏id
|
|
|
|
|
- responsible_person: '',
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
const uploadFunc = async (row) => {
|
|
const uploadFunc = async (row) => {
|
|
|
// const res = await getGameTaskById({ id: row.task_id })
|
|
// const res = await getGameTaskById({ id: row.task_id })
|
|
|
form.value.task_id = row.task_id
|
|
form.value.task_id = row.task_id
|
|
@@ -269,7 +256,16 @@ const openDialog = (key) => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+//新加初始化fileList.data = []的重置代码
|
|
|
|
|
+
|
|
|
|
|
+const resetUploadForm = () => {
|
|
|
|
|
+ fileList.data = []
|
|
|
|
|
+ initForm()
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
const closeDialog = () => {
|
|
const closeDialog = () => {
|
|
|
|
|
+ fileList.data = []
|
|
|
initForm()
|
|
initForm()
|
|
|
dialogFormVisible.value = false
|
|
dialogFormVisible.value = false
|
|
|
}
|
|
}
|
|
@@ -393,8 +389,12 @@ const handleRemove: UploadProps['onRemove'] = (file, fileList) => {
|
|
|
const submitUpload = async () => {
|
|
const submitUpload = async () => {
|
|
|
uploadForm.value.validate(async valid => {
|
|
uploadForm.value.validate(async valid => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
|
|
+ console.log("数组内容")
|
|
|
|
|
+ console.log(fileList)
|
|
|
if (fileList.data.length <= 0) {
|
|
if (fileList.data.length <= 0) {
|
|
|
ElMessage.error("至少上传一款脚本!");
|
|
ElMessage.error("至少上传一款脚本!");
|
|
|
|
|
+ console.log("错误fileList")
|
|
|
|
|
+ console.log(fileList)
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
upload.value!.submit()
|
|
upload.value!.submit()
|
|
@@ -433,6 +433,15 @@ const submitUpload = async () => {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+// 弹窗相关
|
|
|
|
|
+const initForm = () => {
|
|
|
|
|
+ uploadForm.value.resetFields()
|
|
|
|
|
+ upload.value!.clearFiles()
|
|
|
|
|
+ form.value = {
|
|
|
|
|
+ task_id: '',//游戏id
|
|
|
|
|
+ responsible_person: '',
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
//重置
|
|
//重置
|
|
|
const resetForm = async () => {
|
|
const resetForm = async () => {
|