fix : information 修改 删除pdf 解析
This commit is contained in:
parent
67ab627c7e
commit
57d2239ddc
|
@ -345,7 +345,6 @@ export default {
|
||||||
this.impDialogVisible = false;
|
this.impDialogVisible = false;
|
||||||
this.saveLoading = true;
|
this.saveLoading = true;
|
||||||
impData(this.impForm).then(res=>{
|
impData(this.impForm).then(res=>{
|
||||||
console.log(this.impForm)
|
|
||||||
if(res.code>=200){
|
if(res.code>=200){
|
||||||
this.saveLoading = false;
|
this.saveLoading = false;
|
||||||
this.$message.success("提交成功");
|
this.$message.success("提交成功");
|
||||||
|
@ -380,7 +379,6 @@ export default {
|
||||||
getList() {
|
getList() {
|
||||||
this.listLoading = true;
|
this.listLoading = true;
|
||||||
getMyRs(this.listQuery).then((response) => {
|
getMyRs(this.listQuery).then((response) => {
|
||||||
console.log(response);
|
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.tableData = response.data;
|
this.tableData = response.data;
|
||||||
}
|
}
|
||||||
|
@ -391,12 +389,10 @@ export default {
|
||||||
if (!this.exportForm.startDate || !this.exportForm.endDate) {
|
if (!this.exportForm.startDate || !this.exportForm.endDate) {
|
||||||
this.$message.error('请选择完整的起止日期!');
|
this.$message.error('请选择完整的起止日期!');
|
||||||
return;}
|
return;}
|
||||||
console.log(this.exportForm)
|
|
||||||
exportData(this.exportForm).then((response) => {
|
exportData(this.exportForm).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
let filename = '评审情况表.xlsx';
|
let filename = '评审情况表.xlsx';
|
||||||
let tableData = response.data;
|
let tableData = response.data;
|
||||||
console.log(tableData)
|
|
||||||
const ws = XLSX.utils.json_to_sheet(tableData.results);
|
const ws = XLSX.utils.json_to_sheet(tableData.results);
|
||||||
const wb = XLSX.utils.book_new();
|
const wb = XLSX.utils.book_new();
|
||||||
XLSX.utils.book_append_sheet(wb, ws, 'Sheet1');
|
XLSX.utils.book_append_sheet(wb, ws, 'Sheet1');
|
||||||
|
@ -472,7 +468,6 @@ export default {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const isEdit = this.dialogType === "edit";
|
const isEdit = this.dialogType === "edit";
|
||||||
if (isEdit) {
|
if (isEdit) {
|
||||||
console.log(this.Content);
|
|
||||||
updateRs(this.Content.id, this.Content).then((response) => {
|
updateRs(this.Content.id, this.Content).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.tableData = response.data;
|
this.tableData = response.data;
|
||||||
|
@ -503,7 +498,6 @@ export default {
|
||||||
this.isLoading = true; // 设置加载状态,防止重复请求
|
this.isLoading = true; // 设置加载状态,防止重复请求
|
||||||
try {
|
try {
|
||||||
const response = await this.fetchOptions();
|
const response = await this.fetchOptions();
|
||||||
console.log(response,"ceshi");
|
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// 处理错误
|
// 处理错误
|
||||||
|
@ -516,7 +510,6 @@ export default {
|
||||||
},
|
},
|
||||||
fetchOptions() {
|
fetchOptions() {
|
||||||
getMyQi().then((response) => {
|
getMyQi().then((response) => {
|
||||||
console.log(response);
|
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.options = response.data.results;
|
this.options = response.data.results;
|
||||||
}
|
}
|
||||||
|
|
|
@ -368,10 +368,6 @@ class ParsePdfViewSet(RbacFilterSet, CreateUpdateCustomMixin, ModelViewSet):
|
||||||
perms_map = {'get': '*', 'post': 'pdf_create'}
|
perms_map = {'get': '*', 'post': 'pdf_create'}
|
||||||
|
|
||||||
def destroy(self, request, *args, **kwargs):
|
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"
|
path = "/home/testsearchadmin/cma_search/server"
|
||||||
file_path = path + self.get_object().excel_path
|
file_path = path + self.get_object().excel_path
|
||||||
if os.path.isfile(file_path):
|
if os.path.isfile(file_path):
|
||||||
|
|
Loading…
Reference in New Issue