Kaynağa Gözat

- 装置审计记录表审计结果报告附件管理
- 装置审计记录表审计开项整改情况介绍附件管理
- 问卷表标准附件管理
- 定期会议表定期会议纪要附件管理
- 定期会议表会议行动清单附件管理

wangggziwen 1 yıl önce
ebeveyn
işleme
f402d3a64b

+ 152 - 6
ruoyi-ui/src/views/rc/audit/index.vue

@@ -89,24 +89,34 @@
 
     <el-table border v-loading="loading" :data="auditList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="装置" align="center" prop="deptName" />
-      <el-table-column label="年份" align="center" prop="year">
+      <el-table-column label="装置" align="center" prop="deptName" width="120"/>
+      <el-table-column label="年份" align="center" prop="year" width="120">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.year, '{y}') }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="预审时间" align="center" prop="preAuditTime" width="180">
+      <el-table-column label="预审时间" align="center" prop="preAuditTime" width="120">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.preAuditTime, '{y}-{m}-{d}') }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="审计时间" align="center" prop="auditTime" width="180">
+      <el-table-column label="审计时间" align="center" prop="auditTime" width="120">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.auditTime, '{y}-{m}-{d}') }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="审计结果" align="center" prop="auditResult" />
-      <el-table-column label="备注" align="center" prop="remarks" />
+      <el-table-column label="审计结果" align="center" prop="auditResult" width="120"/>
+      <el-table-column label="备注" align="center" prop="remarks"/>
+      <el-table-column label="审计结果报告" align="center" width="120" fixed="right">
+        <template slot-scope="scope">
+          <el-button icon="el-icon-folder" style="color:#6e96fa;" circle @click="handleDoc(scope.row , 'audit-result')"></el-button>
+        </template>
+      </el-table-column>
+      <el-table-column label="审计开项整改情况介绍" align="center" width="120" fixed="right">
+        <template slot-scope="scope">
+          <el-button icon="el-icon-folder" style="color:#6e96fa;" circle @click="handleDoc(scope.row , 'audit-openitem')"></el-button>
+        </template>
+      </el-table-column>
       <el-table-column label="操作" align="center" width="180" fixed="right" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
@@ -196,12 +206,61 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
+
+    <!-- 附件对话框 -->
+    <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="800px" append-to-body >
+      <el-upload ref="doc"
+                 :limit="50"
+                 :headers="doc.headers"
+                 :action="doc.url + '?pType=' + doc.pType + '&pId=' + doc.pId"
+                 :disabled="doc.isUploading"
+                 :on-progress="handleFileDocProgress"
+                 :on-success="handleFileDocSuccess"
+                 :auto-upload="true"
+                 drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          将文件拖到此处,或
+          <em>点击上传</em>
+        </div>
+      </el-upload>
+      <el-table :data="doc.commonfileList" border>
+        <el-table-column label="文件名" align="center" prop="fileName" :show-overflow-tooltip="true">
+          <template slot-scope="scope">
+            <a  class="link-type"  @click="handleDownload(scope.row)">
+              <span>{{ scope.row.fileName }}</span>
+            </a>
+          </template>
+        </el-table-column>
+        <el-table-column label="大小(Kb)" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
+        <el-table-column label="上传人" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
+        <el-table-column label="操作" align="center" width="220" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-download"
+              @click="handleDownload(scope.row)"
+            >下载</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-delete"
+              @click="handleDeleteDoc(scope.row)"
+            >删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </el-dialog>
   </div>
 </template>
 
 <script>
 import { listAudit, getAudit, delAudit, addAudit, updateAudit } from "@/api/rc/audit";
 import { listDept } from "@/api/system/dept";
+import { getToken } from "@/utils/auth";
+import { addCommonfile, allFileList, delCommonfile, updateCommonfile } from "@/api/rc/commonfile";
 
 export default {
   name: "Audit",
@@ -243,6 +302,32 @@ export default {
       },
       // 装置列表
       deptOptions: [],
+      // 附件参数
+      doc: {
+        file: "",
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "附件",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 报告附件上传位置编号
+        ids: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/rc/commonfile/uploadFile",
+        commonfileList: null,
+        queryParams: {
+          pId: null,
+          pType: ''
+        },
+        pType: '',
+        pId: null,
+        form: {}
+      },
     };
   },
   created() {
@@ -250,6 +335,67 @@ export default {
     this.getDeptList();
   },
   methods: {
+    /** 附件按钮操作 */
+    handleDoc(row , type) {
+      var typeName = "";
+      if (type === "audit-result"){
+        typeName = "审计结果报告";
+      } else if (type === "audit-openitem"){
+        typeName = "审计开项整改情况介绍";
+      }
+      this.doc.pType = type
+      this.doc.queryParams.pType = type
+      this.doc.id = row.id;
+      this.doc.title = row.deptName + typeName + "(" + new Date(row.year).getFullYear() + ")";
+      this.doc.open = true;
+      this.doc.queryParams.pId = row.id
+      this.doc.pId = row.id
+      this.getFileList();
+    },
+    getFileList(){
+      allFileList(this.doc.queryParams).then(response => {
+        this.doc.commonfileList = response;
+      });
+    },
+    //附件上传中处理
+    handleFileDocProgress(event, file, fileList) {
+      this.doc.file = file;
+      this.doc.isUploading = true;
+    },
+    //附件上传成功处理
+    handleFileDocSuccess(response, file, fileList) {
+      this.doc.isUploading = false;
+      this.$alert(response.msg, '导入结果', { dangerouslyUseHTMLString: true });
+      this.getFileList()
+    },
+    // 文件下载处理
+    handleDownload(row) {
+      var name = row.fileName;
+      var url = row.fileUrl;
+      var suffix = url.substring(url.lastIndexOf("."), url.length);
+      const a = document.createElement('a')
+      a.setAttribute('download', name)
+      a.setAttribute('target', '_blank')
+      a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
+      a.click()
+    },
+    /** 删除按钮操作 */
+    handleDeleteDoc(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: "warning"
+      }).then(function() {
+        return delCommonfile(ids);
+      }).then(() => {
+        this.getFileList()
+        this.$message({
+          message: '删除成功',
+          type: 'success'
+        });
+      })
+    },
     /** 问卷详情 */
     handleInfo(row) {
       this.$router.push({

+ 10 - 8
ruoyi-ui/src/views/rc/deptinfo/index.vue

@@ -80,17 +80,17 @@
         </template>
       </el-table-column>
       <el-table-column label="装置信息" align="center" prop="deptInfo" />
-      <el-table-column label="装置平面图" align="center" width="120">
+      <el-table-column label="装置平面图" align="center" width="120" fixed="right">
         <template slot-scope="scope">
           <el-button icon="el-icon-folder" style="color:#6e96fa;" circle @click="handleDoc(scope.row , 'deptinfo-plane')"></el-button>
         </template>
       </el-table-column>
-      <el-table-column label="装置欢迎介绍" align="center" width="120">
+      <el-table-column label="装置欢迎介绍" align="center" width="120" fixed="right">
         <template slot-scope="scope">
           <el-button icon="el-icon-folder" style="color:#6e96fa;" circle @click="handleDoc(scope.row , 'deptinfo-welcome')"></el-button>
         </template>
       </el-table-column>
-      <el-table-column label="装置视频介绍" align="center" width="120">
+      <el-table-column label="装置视频介绍" align="center" width="120" fixed="right">
         <template slot-scope="scope">
           <el-button icon="el-icon-folder" style="color:#6e96fa;" circle @click="handleDoc(scope.row , 'deptinfo-video')"></el-button>
         </template>
@@ -195,7 +195,6 @@
               type="text"
               icon="el-icon-delete"
               @click="handleDeleteDoc(scope.row)"
-              v-hasPermi="['training:trainingrecords:file']"
             >删除</el-button>
           </template>
         </el-table-column>
@@ -329,15 +328,18 @@ export default {
     /** 删除按钮操作 */
     handleDeleteDoc(row) {
       const ids = row.id || this.ids;
-      this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
-        confirmButtonText: this.$t('确定'),
-        cancelButtonText: this.$t('取消'),
+      this.$confirm('是否确认删除?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
         type: "warning"
       }).then(function() {
         return delCommonfile(ids);
       }).then(() => {
         this.getFileList()
-        this.msgSuccess(this.$t('删除成功'));
+        this.$message({
+          message: '删除成功',
+          type: 'success'
+        });
       })
     },
     /** 查询装置信息列表 */

+ 149 - 3
ruoyi-ui/src/views/rc/meeting/index.vue

@@ -92,15 +92,25 @@
 
     <el-table border v-loading="loading" :data="meetingList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="年份" align="center" prop="year">
+      <el-table-column label="装置" align="center" prop="deptName" width="120" />
+      <el-table-column label="年份" align="center" prop="year" width="120">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.year, '{y}') }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="涉及code" align="center" prop="questionnaireId" />
+      <el-table-column label="涉及code" align="center" prop="questionnaireId" width="100" />
       <el-table-column label="负责人" align="center" prop="personInChargeName" width="100" />
       <el-table-column label="备注" align="center" prop="remarks" />
-      <el-table-column label="装置" align="center" prop="deptName" />
+      <el-table-column label="定期会议纪要" align="center" width="120" fixed="right">
+        <template slot-scope="scope">
+          <el-button icon="el-icon-folder" style="color:#6e96fa;" circle @click="handleDoc(scope.row , 'meeting-record')"></el-button>
+        </template>
+      </el-table-column>
+      <el-table-column label="会议行动清单" align="center" width="120" fixed="right">
+        <template slot-scope="scope">
+          <el-button icon="el-icon-folder" style="color:#6e96fa;" circle @click="handleDoc(scope.row , 'meeting-actionlist')"></el-button>
+        </template>
+      </el-table-column>
       <el-table-column label="操作" align="center" width="180" fixed="right" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
@@ -172,6 +182,53 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
+
+    <!-- 附件对话框 -->
+    <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="800px" append-to-body >
+      <el-upload ref="doc"
+                 :limit="50"
+                 :headers="doc.headers"
+                 :action="doc.url + '?pType=' + doc.pType + '&pId=' + doc.pId"
+                 :disabled="doc.isUploading"
+                 :on-progress="handleFileDocProgress"
+                 :on-success="handleFileDocSuccess"
+                 :auto-upload="true"
+                 drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          将文件拖到此处,或
+          <em>点击上传</em>
+        </div>
+      </el-upload>
+      <el-table :data="doc.commonfileList" border>
+        <el-table-column label="文件名" align="center" prop="fileName" :show-overflow-tooltip="true">
+          <template slot-scope="scope">
+            <a  class="link-type"  @click="handleDownload(scope.row)">
+              <span>{{ scope.row.fileName }}</span>
+            </a>
+          </template>
+        </el-table-column>
+        <el-table-column label="大小(Kb)" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
+        <el-table-column label="上传人" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
+        <el-table-column label="操作" align="center" width="220" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-download"
+              @click="handleDownload(scope.row)"
+            >下载</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-delete"
+              @click="handleDeleteDoc(scope.row)"
+            >删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </el-dialog>
   </div>
 </template>
 
@@ -179,6 +236,8 @@
 import { listMeeting, getMeeting, delMeeting, addMeeting, updateMeeting } from "@/api/rc/meeting";
 import { listDept } from "@/api/system/dept";
 import { listAllUser } from "@/api/system/user";
+import { getToken } from "@/utils/auth";
+import { addCommonfile, allFileList, delCommonfile, updateCommonfile } from "@/api/rc/commonfile";
 
 export default {
   name: "Meeting",
@@ -221,6 +280,32 @@ export default {
       deptOptions: [],
       // 用户列表
       userOptions: [],
+      // 附件参数
+      doc: {
+        file: "",
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "附件",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 报告附件上传位置编号
+        ids: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/rc/commonfile/uploadFile",
+        commonfileList: null,
+        queryParams: {
+          pId: null,
+          pType: ''
+        },
+        pType: '',
+        pId: null,
+        form: {}
+      },
     };
   },
   created() {
@@ -229,6 +314,67 @@ export default {
     this.getUserList();
   },
   methods: {
+    /** 附件按钮操作 */
+    handleDoc(row , type) {
+      var typeName = "";
+      if (type === "meeting-record"){
+        typeName = "定期会议纪要";
+      } else if (type === "meeting-actionlist"){
+        typeName = "会议行动清单";
+      }
+      this.doc.pType = type
+      this.doc.queryParams.pType = type
+      this.doc.id = row.id;
+      this.doc.title = typeName;
+      this.doc.open = true;
+      this.doc.queryParams.pId = row.id
+      this.doc.pId = row.id
+      this.getFileList();
+    },
+    getFileList(){
+      allFileList(this.doc.queryParams).then(response => {
+        this.doc.commonfileList = response;
+      });
+    },
+    //附件上传中处理
+    handleFileDocProgress(event, file, fileList) {
+      this.doc.file = file;
+      this.doc.isUploading = true;
+    },
+    //附件上传成功处理
+    handleFileDocSuccess(response, file, fileList) {
+      this.doc.isUploading = false;
+      this.$alert(response.msg, '导入结果', { dangerouslyUseHTMLString: true });
+      this.getFileList()
+    },
+    // 文件下载处理
+    handleDownload(row) {
+      var name = row.fileName;
+      var url = row.fileUrl;
+      var suffix = url.substring(url.lastIndexOf("."), url.length);
+      const a = document.createElement('a')
+      a.setAttribute('download', name)
+      a.setAttribute('target', '_blank')
+      a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
+      a.click()
+    },
+    /** 删除按钮操作 */
+    handleDeleteDoc(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: "warning"
+      }).then(function() {
+        return delCommonfile(ids);
+      }).then(() => {
+        this.getFileList()
+        this.$message({
+          message: '删除成功',
+          type: 'success'
+        });
+      })
+    },
     /** 查询用户列表 */
     getUserList() {
       listAllUser().then(response => {

+ 139 - 1
ruoyi-ui/src/views/rc/questionnaire/index.vue

@@ -141,6 +141,11 @@
       <el-table-column label="负责人" align="center" prop="personInChargeName" />
       <el-table-column label="审核人" align="center" prop="reviewerName" />
       <el-table-column label="备注" align="center" prop="remarks" width="150" />
+      <el-table-column label="标准附件" align="center" width="100" fixed="right">
+        <template slot-scope="scope">
+          <el-button icon="el-icon-folder" style="color:#6e96fa;" circle @click="handleDoc(scope.row , 'questionnaire-standard')"></el-button>
+        </template>
+      </el-table-column>
       <el-table-column label="操作" align="center" width="120" fixed="right" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
@@ -261,6 +266,53 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
+
+    <!-- 附件对话框 -->
+    <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="800px" append-to-body >
+      <el-upload ref="doc"
+                 :limit="50"
+                 :headers="doc.headers"
+                 :action="doc.url + '?pType=' + doc.pType + '&pId=' + doc.pId"
+                 :disabled="doc.isUploading"
+                 :on-progress="handleFileDocProgress"
+                 :on-success="handleFileDocSuccess"
+                 :auto-upload="true"
+                 drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          将文件拖到此处,或
+          <em>点击上传</em>
+        </div>
+      </el-upload>
+      <el-table :data="doc.commonfileList" border>
+        <el-table-column label="文件名" align="center" prop="fileName" :show-overflow-tooltip="true">
+          <template slot-scope="scope">
+            <a  class="link-type"  @click="handleDownload(scope.row)">
+              <span>{{ scope.row.fileName }}</span>
+            </a>
+          </template>
+        </el-table-column>
+        <el-table-column label="大小(Kb)" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
+        <el-table-column label="上传人" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
+        <el-table-column label="操作" align="center" width="220" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-download"
+              @click="handleDownload(scope.row)"
+            >下载</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-delete"
+              @click="handleDeleteDoc(scope.row)"
+            >删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </el-dialog>
   </div>
 </template>
 
@@ -268,6 +320,8 @@
 import { listQuestionnaire, getQuestionnaire, delQuestionnaire, addQuestionnaire, updateQuestionnaire } from "@/api/rc/questionnaire";
 import { listDept } from "@/api/system/dept";
 import { listAllUser } from "@/api/system/user";
+import { getToken } from "@/utils/auth";
+import { addCommonfile, allFileList, delCommonfile, updateCommonfile } from "@/api/rc/commonfile";
 
 export default {
   name: "Questionnaire",
@@ -320,6 +374,32 @@ export default {
       },
       // 用户列表
       userOptions: [],
+      // 附件参数
+      doc: {
+        file: "",
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "附件",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 报告附件上传位置编号
+        ids: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/rc/commonfile/uploadFile",
+        commonfileList: null,
+        queryParams: {
+          pId: null,
+          pType: ''
+        },
+        pType: '',
+        pId: null,
+        form: {}
+      },
     };
   },
   created() {
@@ -327,7 +407,65 @@ export default {
     this.getDeptList();
     this.getUserList();
   },
-  methods: {
+  methods: {/** 附件按钮操作 */
+    handleDoc(row , type) {
+      var typeName = "";
+      if (type === "questionnaire-standard"){
+        typeName = "标准附件";
+      }
+      this.doc.pType = type
+      this.doc.queryParams.pType = type
+      this.doc.id = row.id;
+      this.doc.title = "标准附件(CODE " + row.code + ")";
+      this.doc.open = true;
+      this.doc.queryParams.pId = row.id
+      this.doc.pId = row.id
+      this.getFileList();
+    },
+    getFileList(){
+      allFileList(this.doc.queryParams).then(response => {
+        this.doc.commonfileList = response;
+      });
+    },
+    //附件上传中处理
+    handleFileDocProgress(event, file, fileList) {
+      this.doc.file = file;
+      this.doc.isUploading = true;
+    },
+    //附件上传成功处理
+    handleFileDocSuccess(response, file, fileList) {
+      this.doc.isUploading = false;
+      this.$alert(response.msg, '导入结果', { dangerouslyUseHTMLString: true });
+      this.getFileList()
+    },
+    // 文件下载处理
+    handleDownload(row) {
+      var name = row.fileName;
+      var url = row.fileUrl;
+      var suffix = url.substring(url.lastIndexOf("."), url.length);
+      const a = document.createElement('a')
+      a.setAttribute('download', name)
+      a.setAttribute('target', '_blank')
+      a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
+      a.click()
+    },
+    /** 删除按钮操作 */
+    handleDeleteDoc(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: "warning"
+      }).then(function() {
+        return delCommonfile(ids);
+      }).then(() => {
+        this.getFileList()
+        this.$message({
+          message: '删除成功',
+          type: 'success'
+        });
+      })
+    },
     /** 查询用户列表 */
     getUserList() {
       listAllUser().then(response => {