|
@@ -17,7 +17,7 @@
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
:icon="UploadFilled"
|
|
|
- @click="dialogVisible = true"
|
|
|
+ @click="(dialogVisible = true), (count = 0)"
|
|
|
>
|
|
|
上传审核内容
|
|
|
</el-button>
|
|
@@ -49,6 +49,11 @@
|
|
|
}}</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column align="center" prop="statusCode" label="审核结果">
|
|
|
+ <template #default="scope">
|
|
|
+ {{ scope.row.reviewResult ? scope.row.reviewResult.labelDesc : '-' }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column align="center" prop="address" label="操作">
|
|
|
<template #default="scope">
|
|
|
<el-button
|
|
@@ -58,6 +63,14 @@
|
|
|
>
|
|
|
查看详情
|
|
|
</el-button>
|
|
|
+ <el-popconfirm
|
|
|
+ title="确定要删除该文件吗?"
|
|
|
+ @confirm="deleteRow(scope.row)"
|
|
|
+ >
|
|
|
+ <template #reference>
|
|
|
+ <el-button size="small" type="danger"> 删除 </el-button>
|
|
|
+ </template>
|
|
|
+ </el-popconfirm>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -71,22 +84,26 @@
|
|
|
:total="page_data.total"
|
|
|
/>
|
|
|
|
|
|
- <el-dialog v-model="dialogVisible" title="选择文件">
|
|
|
+ <el-dialog @close="dialogClose" v-model="dialogVisible" title="选择文件">
|
|
|
<div>文件名称</div>
|
|
|
<br />
|
|
|
<el-input v-model="input" placeholder="请输入文件名称" clearable />
|
|
|
<br />
|
|
|
<br />
|
|
|
+ <!-- :action="config.base.videoProcessing + '/review/img/upload'" -->
|
|
|
<el-upload
|
|
|
v-model:file-list="fileList"
|
|
|
- class="upload-demo"
|
|
|
ref="upload_ele"
|
|
|
:on-error="upError"
|
|
|
- :limit="1"
|
|
|
+ :limit="20"
|
|
|
+ multiple
|
|
|
:on-exceed="handleExceed"
|
|
|
+ :on-success="upSuccess"
|
|
|
:headers="{ Authorization }"
|
|
|
:on-progress="upProgress"
|
|
|
:before-upload="upload"
|
|
|
+ :auto-upload="false"
|
|
|
+ :data="{ title: input }"
|
|
|
:action="config.base.videoProcessing + '/review/img/upload'"
|
|
|
>
|
|
|
<el-button type="primary" :icon="UploadFilled"> 选择文件 </el-button>
|
|
@@ -105,7 +122,7 @@
|
|
|
import header_local from '../components/header.vue';
|
|
|
import { UploadFilled } from '@element-plus/icons-vue';
|
|
|
import { ElMessage, genFileId } from 'element-plus';
|
|
|
-import { storeImg, historyImg } from '@/api/processing';
|
|
|
+import { storeImg, historyImg, deleteRowImage } from '@/api/processing';
|
|
|
import { ref } from 'vue';
|
|
|
import config from '../../../config/index';
|
|
|
import { useRouter } from 'vue-router';
|
|
@@ -113,6 +130,7 @@ const route = useRouter();
|
|
|
|
|
|
const Authorization = localStorage.getItem('token') || '';
|
|
|
|
|
|
+const count = ref(0);
|
|
|
const dialogVisible = ref(false);
|
|
|
const upload_ele = ref(null);
|
|
|
const fileList = ref([]);
|
|
@@ -128,7 +146,7 @@ getList();
|
|
|
|
|
|
function upProgress(par) {
|
|
|
// 上传进度
|
|
|
- console.log(par);
|
|
|
+ // console.log(par);
|
|
|
}
|
|
|
|
|
|
function handleExceed(files) {
|
|
@@ -150,24 +168,28 @@ function upload(file) {
|
|
|
}
|
|
|
|
|
|
function submit() {
|
|
|
- if (!fileList.value[0]) return ElMessage.error('请选择图片文件');
|
|
|
+ upload_ele.value.submit();
|
|
|
+}
|
|
|
+
|
|
|
+function dialogClose() {
|
|
|
+ upload_ele.value.clearFiles();
|
|
|
+ dialogVisible.value = false;
|
|
|
+ input.value = '';
|
|
|
+}
|
|
|
+
|
|
|
+function upSuccess(res) {
|
|
|
+ ++count.value;
|
|
|
+
|
|
|
+ if (res.code !== 0) return ElMessage.error(res.message);
|
|
|
storeImg({
|
|
|
data: {
|
|
|
title: input.value || '',
|
|
|
- url: fileList.value[0].response.data.url
|
|
|
+ url: res.data.url
|
|
|
}
|
|
|
- })
|
|
|
- .then(r => {
|
|
|
- dialogVisible.value = false;
|
|
|
- input.value = '';
|
|
|
- getList();
|
|
|
- upload_ele.value.clearFiles();
|
|
|
- })
|
|
|
- .catch(e => {
|
|
|
- upload_ele.value.clearFiles();
|
|
|
- dialogVisible.value = false;
|
|
|
- input.value = '';
|
|
|
- });
|
|
|
+ }).then(r => {
|
|
|
+ count.value >= fileList.value.length && dialogClose();
|
|
|
+ getList();
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
function getList() {
|
|
@@ -195,6 +217,13 @@ function currentChange(page) {
|
|
|
page_data.value.page = page;
|
|
|
getList();
|
|
|
}
|
|
|
+
|
|
|
+function deleteRow(row) {
|
|
|
+ deleteRowImage({ id: row.id }).then(r => {
|
|
|
+ getList();
|
|
|
+ ElMessage.success('删除成功');
|
|
|
+ });
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style>
|