fix : information 修改 删除pdf 解析

This commit is contained in:
zty 2024-07-11 13:20:26 +08:00
parent 67ab627c7e
commit 57d2239ddc
2 changed files with 0 additions and 11 deletions

View File

@ -345,7 +345,6 @@ export default {
this.impDialogVisible = false;
this.saveLoading = true;
impData(this.impForm).then(res=>{
console.log(this.impForm)
if(res.code>=200){
this.saveLoading = false;
this.$message.success("提交成功");
@ -380,7 +379,6 @@ export default {
getList() {
this.listLoading = true;
getMyRs(this.listQuery).then((response) => {
console.log(response);
if (response.data) {
this.tableData = response.data;
}
@ -391,12 +389,10 @@ export default {
if (!this.exportForm.startDate || !this.exportForm.endDate) {
this.$message.error('请选择完整的起止日期!');
return;}
console.log(this.exportForm)
exportData(this.exportForm).then((response) => {
if (response.data) {
let filename = '评审情况表.xlsx';
let tableData = response.data;
console.log(tableData)
const ws = XLSX.utils.json_to_sheet(tableData.results);
const wb = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(wb, ws, 'Sheet1');
@ -472,7 +468,6 @@ export default {
if (valid) {
const isEdit = this.dialogType === "edit";
if (isEdit) {
console.log(this.Content);
updateRs(this.Content.id, this.Content).then((response) => {
if (response.data) {
this.tableData = response.data;
@ -503,7 +498,6 @@ export default {
this.isLoading = true; // 设置加载状态防止重复请求
try {
const response = await this.fetchOptions();
console.log(response,"ceshi");
} catch (error) {
// 处理错误
@ -516,7 +510,6 @@ export default {
},
fetchOptions() {
getMyQi().then((response) => {
console.log(response);
if (response.data) {
this.options = response.data.results;
}

View File

@ -368,10 +368,6 @@ class ParsePdfViewSet(RbacFilterSet, CreateUpdateCustomMixin, ModelViewSet):
perms_map = {'get': '*', 'post': 'pdf_create'}
def destroy(self, request, *args, **kwargs):
# 判断执行状态,如果是“执行中”,则不允许删除
if self.get_object().status == "执行中":
return Response({'message': '执行中的数据不能删除'}, status=status.HTTP_400_BAD_REQUEST)
# 删除文件
path = "/home/testsearchadmin/cma_search/server"
file_path = path + self.get_object().excel_path
if os.path.isfile(file_path):