This commit is contained in:
我是个攻城狮
2026-07-21 15:24:11 +08:00
parent b48708dbbf
commit d556c8f0c1
20 changed files with 705 additions and 67 deletions
+86 -7
View File
@@ -28,11 +28,27 @@
<span v-if="scope.row.status.value == 0" class="gray">禁用</span>
</template>
</el-table-column> -->
<el-table-column prop="satisfaction" label="满意度" width="100">
<template slot-scope="scope">
<span v-if="scope.row.satisfaction === 5">非常满意</span>
<span v-else-if="scope.row.satisfaction === 4">满意</span>
<span v-else-if="scope.row.satisfaction === 3">良好</span>
<span v-else-if="scope.row.satisfaction === 2">不满意</span>
<span v-else-if="scope.row.satisfaction === 1">非常不满意</span>
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column prop="create_time" label="申请时间" width="180"></el-table-column>
<!-- <el-table-column prop="update_time" label="修改时间" width="140"></el-table-column> -->
<el-table-column prop="update_time" label="处理时间" width="140">
<template slot-scope="scope">
<span v-if="scope.row.update_time === scope.row.create_time">--</span>
<span v-else>{{scope.row.update_time}}</span>
</template>
</el-table-column>
<el-table-column label="操作" >
<template slot-scope="scope">
<el-button @click="editClick(scope.row)" type="text" size="small" v-auth="'/game/applys/edit'">详情</el-button>
<el-button @click="openProcessDialog(scope.row)" type="text" size="small" v-auth="'/game/apply/edit'" v-if="scope.row.status.value==0">处理</el-button>
<el-button @click="deleteClick(scope.row)" type="text" size="small" v-auth="'/game/applys/delete'">删除</el-button>
</template>
</el-table-column>
@@ -53,7 +69,29 @@
</div>
</div>
<!-- 处理满意度弹窗 -->
<el-dialog
title="处理申请"
:visible.sync="processDialogVisible"
width="400px"
:close-on-click-modal="false"
>
<el-form :model="processForm" label-width="80px">
<el-form-item label="满意度" required>
<el-select v-model="processForm.satisfaction" placeholder="请选择满意度" style="width: 100%;">
<el-option label="非常满意" :value="5"></el-option>
<el-option label="满意" :value="4"></el-option>
<el-option label="良好" :value="3"></el-option>
<el-option label="不满意" :value="2"></el-option>
<el-option label="非常不满意" :value="1"></el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="processDialogVisible = false"> </el-button>
<el-button type="primary" :loading="processDialogLoading" @click="processSubmit"> </el-button>
</div>
</el-dialog>
</div>
</template>
@@ -83,7 +121,14 @@ export default {
/*是否打开编辑弹窗*/
open_edit: false,
/*当前编辑的对象*/
userModel: {}
userModel: {},
/*处理弹窗相关*/
processDialogVisible: false,
processDialogLoading: false,
processForm: {
satisfaction: null
},
processRowId: null,
};
},
created() {
@@ -105,7 +150,7 @@ export default {
this.pageSize = val;
this.getTableList();
},
/*搜索查询*/
/*搜索查询*/
onSubmit() {
this.curPage = 1;
this.getTableList();
@@ -121,7 +166,7 @@ export default {
.then(data => {
self.loading = false;
self.tableData = data.data.list.data;
console.log(self.tableData,222)
// console.log(self.tableData, 222)
self.totalDataNumber = data.data.list.total;
})
.catch(error => {});
@@ -134,11 +179,9 @@ export default {
/*打开编辑*/
editClick(row) {
let self = this;
let params = row.id;
this.$router.push({
path: '/game/applys/edit',
// name: 'mallList',
query: {
id: params
}
@@ -171,6 +214,42 @@ export default {
.catch(error => {});
})
.catch(() => {});
},
/* 打开处理弹窗 */
openProcessDialog(row) {
this.processDialogVisible = true;
this.processDialogLoading = false;
this.processForm.satisfaction = null;
this.processRowId = row.id;
},
/* 确认处理申请 */
processSubmit() {
if (!this.processForm.satisfaction) {
this.$message({
type: 'warning',
message: '请选择满意度'
});
return;
}
this.processDialogLoading = true;
GameApi.processApply({
id: this.processRowId,
satisfaction: this.processForm.satisfaction
}, true)
.then(() => {
this.$message({
type: 'success',
message: '处理成功'
});
this.processDialogVisible = false;
this.getTableList();
})
.catch(() => {})
.finally(() => {
this.processDialogLoading = false;
});
}
}
};