|
|
@@ -215,10 +215,10 @@ onMounted(() => {
|
|
|
// 审核功能
|
|
|
function handleAudit(row) {
|
|
|
$dialog.warning({
|
|
|
- title: '审核确认',
|
|
|
+ title: '提示',
|
|
|
content: '确定将此3D模型审核通过?',
|
|
|
- positiveText: '确定',
|
|
|
- negativeText: '取消',
|
|
|
+ positiveText: '审核通过',
|
|
|
+ negativeText: '不通过',
|
|
|
onPositiveClick: async () => {
|
|
|
try {
|
|
|
const auditData = {
|
|
|
@@ -234,8 +234,27 @@ function handleAudit(row) {
|
|
|
$table.value?.handleSearch()
|
|
|
}
|
|
|
catch (error) {
|
|
|
- $message.error('审核失败')
|
|
|
- console.error('审核失败:', error)
|
|
|
+ $message.error('审核通过失败')
|
|
|
+ console.error('审核通过失败:', error)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onNegativeClick: async () => {
|
|
|
+ try {
|
|
|
+ const auditData = {
|
|
|
+ id: row.id,
|
|
|
+ address: row.address || '',
|
|
|
+ audit: 2,
|
|
|
+ description: row.description || '',
|
|
|
+ display: row.display || 0,
|
|
|
+ name: row.name || '',
|
|
|
+ }
|
|
|
+ await api.update(auditData)
|
|
|
+ $message.success('审核不通过成功')
|
|
|
+ $table.value?.handleSearch()
|
|
|
+ }
|
|
|
+ catch (error) {
|
|
|
+ $message.error('审核不通过失败')
|
|
|
+ console.error('审核不通过失败:', error)
|
|
|
}
|
|
|
},
|
|
|
})
|
|
|
@@ -385,7 +404,7 @@ const columns = [
|
|
|
const buttons = []
|
|
|
|
|
|
// 只有当audit不等于1时才显示审核按钮
|
|
|
- if (row.audit !== 1) {
|
|
|
+ if (row.audit === 0) {
|
|
|
buttons.push(
|
|
|
h(
|
|
|
NButton,
|