Преглед изворни кода

SAI开项申请流程:详情处理页申请附件查询、下载

wangggziwen пре 2 година
родитељ
комит
049ff2d642

+ 8 - 10
master/src/main/java/com/ruoyi/project/production/controller/TSaiApproveFileController.java

@@ -36,19 +36,17 @@ public class TSaiApproveFileController extends BaseController
     /**
      * 查询SAI审批附件列表
      */
-    @PreAuthorize("@ss.hasPermi('production:saiApproveFile:list')")
+//    @PreAuthorize("@ss.hasPermi('production:saiApproveFile:list')")
     @GetMapping("/list")
-    public TableDataInfo list(TSaiApproveFile tSaiApproveFile)
+    public List<TSaiApproveFile> list(TSaiApproveFile tSaiApproveFile)
     {
-        startPage();
-        List<TSaiApproveFile> list = tSaiApproveFileService.selectTSaiApproveFileList(tSaiApproveFile);
-        return getDataTable(list);
+        return tSaiApproveFileService.selectTSaiApproveFileList(tSaiApproveFile);
     }
 
     /**
      * 导出SAI审批附件列表
      */
-    @PreAuthorize("@ss.hasPermi('production:saiApproveFile:export')")
+//    @PreAuthorize("@ss.hasPermi('production:saiApproveFile:export')")
     @Log(title = "SAI审批附件", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
     public AjaxResult export(TSaiApproveFile tSaiApproveFile)
@@ -61,7 +59,7 @@ public class TSaiApproveFileController extends BaseController
     /**
      * 获取SAI审批附件详细信息
      */
-    @PreAuthorize("@ss.hasPermi('production:saiApproveFile:query')")
+//    @PreAuthorize("@ss.hasPermi('production:saiApproveFile:query')")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") Long id)
     {
@@ -71,7 +69,7 @@ public class TSaiApproveFileController extends BaseController
     /**
      * 新增SAI审批附件
      */
-    @PreAuthorize("@ss.hasPermi('production:saiApproveFile:add')")
+//    @PreAuthorize("@ss.hasPermi('production:saiApproveFile:add')")
     @Log(title = "SAI审批附件", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TSaiApproveFile tSaiApproveFile)
@@ -82,7 +80,7 @@ public class TSaiApproveFileController extends BaseController
     /**
      * 修改SAI审批附件
      */
-    @PreAuthorize("@ss.hasPermi('production:saiApproveFile:edit')")
+//    @PreAuthorize("@ss.hasPermi('production:saiApproveFile:edit')")
     @Log(title = "SAI审批附件", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TSaiApproveFile tSaiApproveFile)
@@ -93,7 +91,7 @@ public class TSaiApproveFileController extends BaseController
     /**
      * 删除SAI审批附件
      */
-    @PreAuthorize("@ss.hasPermi('production:saiApproveFile:remove')")
+//    @PreAuthorize("@ss.hasPermi('production:saiApproveFile:remove')")
     @Log(title = "SAI审批附件", businessType = BusinessType.DELETE)
 	@DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids)

+ 6 - 6
master/src/main/java/com/ruoyi/project/production/controller/TSaiFileController.java

@@ -49,7 +49,7 @@ public class TSaiFileController extends BaseController
     /**
      * 查询SAI文件列表
      */
-    @PreAuthorize("@ss.hasPermi('production:saiFile:list')")
+//    @PreAuthorize("@ss.hasPermi('production:saiFile:list')")
     @GetMapping("/list")
     public TableDataInfo list(TSaiFile tSaiFile)
     {
@@ -61,7 +61,7 @@ public class TSaiFileController extends BaseController
     /**
      * 导出SAI文件列表
      */
-    @PreAuthorize("@ss.hasPermi('production:saiFile:export')")
+//    @PreAuthorize("@ss.hasPermi('production:saiFile:export')")
     @Log(title = "SAI文件", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
     public AjaxResult export(TSaiFile tSaiFile)
@@ -74,7 +74,7 @@ public class TSaiFileController extends BaseController
     /**
      * 获取SAI文件详细信息
      */
-    @PreAuthorize("@ss.hasPermi('production:saiFile:query')")
+//    @PreAuthorize("@ss.hasPermi('production:saiFile:query')")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") Long id)
     {
@@ -84,7 +84,7 @@ public class TSaiFileController extends BaseController
     /**
      * 新增SAI文件
      */
-    @PreAuthorize("@ss.hasPermi('production:saiFile:add')")
+//    @PreAuthorize("@ss.hasPermi('production:saiFile:add')")
     @Log(title = "SAI文件", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TSaiFile tSaiFile)
@@ -95,7 +95,7 @@ public class TSaiFileController extends BaseController
     /**
      * 修改SAI文件
      */
-    @PreAuthorize("@ss.hasPermi('production:saiFile:edit')")
+//    @PreAuthorize("@ss.hasPermi('production:saiFile:edit')")
     @Log(title = "SAI文件", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TSaiFile tSaiFile)
@@ -106,7 +106,7 @@ public class TSaiFileController extends BaseController
     /**
      * 删除SAI文件
      */
-    @PreAuthorize("@ss.hasPermi('production:saiFile:remove')")
+//    @PreAuthorize("@ss.hasPermi('production:saiFile:remove')")
     @Log(title = "SAI文件", businessType = BusinessType.DELETE)
 	@DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids)

+ 26 - 26
ui/src/views/approve/approveDetail/sai-apply-detail.vue

@@ -69,30 +69,30 @@
                   </a>
                 </template>
               </el-table-column>
-              <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
-              <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
-              <el-table-column :label="$t('上传时间')" align="center" prop="createdate" :show-overflow-tooltip="true" width="120"/>
+              <!--<el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />-->
+              <!--<el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>-->
+              <!--<el-table-column :label="$t('上传时间')" align="center" prop="createdate" :show-overflow-tooltip="true" width="120"/>-->
               <el-table-column :label="$t('操作')" align="center" width="120" class-name="small-padding fixed-width">
                 <template slot-scope="scope">
-                  <el-button
-                    v-if="scope.row.fileName.endsWith('pdf')||scope.row.fileName.endsWith('xlsx')||scope.row.fileName.endsWith('md')
-                 ||scope.row.fileName.endsWith('docx')||scope.row.fileName.endsWith('doc')||scope.row.fileName.endsWith('txt')
-                 ||scope.row.fileName.endsWith('jpg')||scope.row.fileName.endsWith('png')||scope.row.fileName.endsWith('csv')
-                 ||scope.row.fileName.endsWith('mp4')||scope.row.fileName.endsWith('svg')||scope.row.fileName.endsWith('dwg')
-                 ||scope.row.fileName.endsWith('flv')||scope.row.fileName.endsWith('swf')||scope.row.fileName.endsWith('gif')
-                 ||scope.row.fileName.endsWith('3gp')||scope.row.fileName.endsWith('mkv')||scope.row.fileName.endsWith('tif')"
-                    size="mini"
-                    type="text"
-                    icon="el-icon-view"
-                    @click="handleSee(scope.row)"
-                  > {{ $t('预览') }}</el-button>
-                  <el-button
-                    v-if="scope.row.fileName.endsWith('ppt')||scope.row.fileName.endsWith('pptx') "
-                    size="mini"
-                    type="text"
-                    icon="el-icon-view"
-                    @click="handleSeePPT(scope.row)"
-                  > {{ $t('ppt预览') }}</el-button>
+                  <!--<el-button-->
+                    <!--v-if="scope.row.fileName.endsWith('pdf')||scope.row.fileName.endsWith('xlsx')||scope.row.fileName.endsWith('md')-->
+                 <!--||scope.row.fileName.endsWith('docx')||scope.row.fileName.endsWith('doc')||scope.row.fileName.endsWith('txt')-->
+                 <!--||scope.row.fileName.endsWith('jpg')||scope.row.fileName.endsWith('png')||scope.row.fileName.endsWith('csv')-->
+                 <!--||scope.row.fileName.endsWith('mp4')||scope.row.fileName.endsWith('svg')||scope.row.fileName.endsWith('dwg')-->
+                 <!--||scope.row.fileName.endsWith('flv')||scope.row.fileName.endsWith('swf')||scope.row.fileName.endsWith('gif')-->
+                 <!--||scope.row.fileName.endsWith('3gp')||scope.row.fileName.endsWith('mkv')||scope.row.fileName.endsWith('tif')"-->
+                    <!--size="mini"-->
+                    <!--type="text"-->
+                    <!--icon="el-icon-view"-->
+                    <!--@click="handleSee(scope.row)"-->
+                  <!--&gt; {{ $t('预览') }}</el-button>-->
+                  <!--<el-button-->
+                    <!--v-if="scope.row.fileName.endsWith('ppt')||scope.row.fileName.endsWith('pptx') "-->
+                    <!--size="mini"-->
+                    <!--type="text"-->
+                    <!--icon="el-icon-view"-->
+                    <!--@click="handleSeePPT(scope.row)"-->
+                  <!--&gt; {{ $t('ppt预览') }}</el-button>-->
                   <el-button
                     size="mini"
                     type="text"
@@ -453,6 +453,7 @@
 <script>
 import { getToken } from "@/utils/auth";
 import { updateApply, getApply, handleApply } from "@/api/production/apply";
+import { listFile } from "@/api/production/saiApproveFile";
 import { getHistorylist } from "@/api/ehs/approvedanger";
 import { listUserPost } from "@/api/system/user";
 import { treeselect, listDept } from "@/api/system/dept";
@@ -678,7 +679,6 @@ export default {
       this.doc.id = id;
       this.doc.queryParams.pId = id;
       this.doc.pId = id;
-      this.getFileList()
       // 表单重置
       this.reset();
       this.inspector1 = null;
@@ -696,6 +696,7 @@ export default {
       // 查询SAI开项管理详细
       getApply(id).then(response => {
         this.dataForm = response.data;
+        this.getFileList()
         this.dataForm.applicantDept = Number(this.dataForm.applicantDept);
         this.inspector1 = this.dataForm.applicant;
         if (this.dataForm.inspectors != null) {
@@ -850,9 +851,8 @@ export default {
       })
     },
     getFileList() {
-      allFileList({
-        pId: this.doc.queryParams.pId,
-        pType: "saiApply"
+      listFile({
+        approveId: this.dataForm.saiApplyId
       }).then(response => {
         this.doc.commonfileListApply = response;
       });