fix :日常监督结果日期为空

This commit is contained in:
zty 2024-05-07 17:51:08 +08:00
parent 54e8e2a3db
commit 104d4a94c3
5 changed files with 6 additions and 10 deletions

File diff suppressed because one or more lines are too long

View File

@ -155,7 +155,6 @@ export default {
this.tableData.results =[];
this.tableData.count =0;
pdfAll(this.listQuery).then((response) => {
console.log(response);
if (response.data) {
this.tableData = response.data;
}
@ -166,10 +165,8 @@ export default {
handleDownload(scope) {
this.listLoading = true;
this.dialogTableVisible=true;
console.log(scope.row.id);
getpdf(scope.row.id).then((response) => {
if (response.code>=200) {
console.log(response.data.excel_path);
downloadFile(response.data.excel_path)
this.listLoading = false;
}else{
@ -198,7 +195,6 @@ export default {
},
handleUpSuccess(res, file, filelist) {
this.fileList = [file];
console.log(res.data.path);
this.form.pdf_file = res.data.path;
},
handleRemove(file, filelist) {

View File

@ -49,10 +49,10 @@
</el-table-column>
<el-table-column label="资料名称" min-width="110">
<template slot-scope="scope" v-if="scope.row.file_.file">
<a v-if="scope.row.file_.file.indexOf('.pdf')>-1 " :href="`/static/build/generic/web/viewer.html?file=${scope.row.file_.file}`" target="view_window" class="flv">
<!-- <a v-if="scope.row.file_.file.indexOf('.pdf')>-1 " :href="`/static/build/generic/web/viewer.html?file=${scope.row.file_.file}`" target="view_window" class="flv">
<el-link type="primary">{{ scope.row.name }}</el-link>
</a>
<el-link v-else :href="scope.row.file_.file" type="primary">{{ scope.row.name }}</el-link>
</a> -->
<el-link :href="scope.row.file_.file" type="primary">{{ scope.row.name }}</el-link>
</template>
<template slot-scope="scope" v-else>{{ scope.row.name }}</template>
</el-table-column>

View File

@ -370,7 +370,7 @@ class ParsePdfViewSet(RbacFilterSet, CreateUpdateCustomMixin, ModelViewSet):
"""
try:
pdf_file = request.data['pdf_file']
annual = request.data['year']
annual = request.data['annual']
# 读数据路径copy 在media 下新建excel,解析完成后存入数据库。
media_excel = os.path.join(os.path.dirname(EXCEL_PATH),"media_excel")
if not os.path.exists(media_excel):

View File

@ -294,7 +294,7 @@ class Oinspect(CommonBDModel):
checker = models.CharField('检查方', max_length=100)
date_inspect = models.DateField('检查日期')
result = models.TextField('检查结果', null=True, blank=True, default='')
result_date = models.DateField('检查结果日期', null=True, blank=True)
result_date = models.DateField('检查结果日期', null=True, blank=True, default='')
notification_form = models.CharField('检查通知单', max_length=100, null=True)
result_form = models.CharField('检查结果告知单', max_length=100, null=True)
task2do = models.ForeignKey('supervision.task2do', verbose_name= '关联任务执行', on_delete=models.SET_NULL, null=True, blank=True)