浏览代码

报告归档调整

lizhenhao 2 年之前
父节点
当前提交
69b13d9b64

+ 586 - 0
src/views/common/UpLoadComponentV3.1.vue

@@ -0,0 +1,586 @@
+<!--文件上传组件-->
+<template>
+  <div>
+    <el-divider v-if="showDivider" content-position="left"><i class="el-icon-document"></i> {{dividerName}}</el-divider>
+    <el-upload ref="upload" style="display: inline-block; :show-header='status'" action=""
+               :limit="999" :http-request="httpRequest"
+               multiple
+               :on-exceed="(files, fileList) =>{
+                      $message.warning(`当前限制选择 999 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`)
+                     }"
+               :show-file-list="false"
+               :on-change="changes"
+               :on-progress="uploadVideoProcess"
+               :file-list="fileList">
+      <el-button type="info" size="mini" :slot="auth==='view'&&uploadFlag===false?'tip':'trigger'" @click="clickHandel" :disabled="auth==='view'&&uploadFlag===false">点击上传</el-button>
+    </el-upload>
+    <div style="height: calc(100% - 80px);margin-top: 10px">
+      <!-- 进度条 -->
+      <el-progress style="margin-left: 5em" v-if="progressFlag" :percentage="loadProgress"></el-progress>
+      <el-table
+        ref="uploadTable"
+        :key="tableKey"
+        @row-click="tableRowClick"
+        :row-class-name="tableRowClassName"
+        :data="dataListNew">
+        <el-table-column type="seq" width="40"></el-table-column>
+        <el-table-column label="文件名称" prop="name" align="center">
+          <template scope="scope">
+            <div v-if="ifName(scope.row) === true">
+              <el-image
+                style="width: 30px; height: 30px;padding-top: 4px"
+                :src="scope.row.lsUrl"
+                :preview-src-list="[scope.row.lsUrl]"
+              ></el-image>
+            </div>
+            <div v-else>
+              <el-link  type="primary" :underline="false" @click="showFile(scope.row)">{{scope.row.name}}</el-link>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column label="创建人" prop="createBy.name" align="center"></el-table-column>
+        <el-table-column label="创建时间" prop="createDate" align="center"></el-table-column>
+        <el-table-column label="文件大小" prop="size" align="center">
+          <template slot-scope="scope">
+            {{getSize(scope.row.size)}}
+          </template>
+        </el-table-column>
+        <el-table-column label="文件类型" prop="fileType" align="center">
+          <template slot="header" scope="scope">
+            <span style="color:red;font-size: 20px">* </span><span>文件类型</span>
+          </template>
+          <template slot-scope="scope">
+            <el-select v-if="auth !== 'view'" size="small" v-model="scope.row.fileType" placeholder="请选择">
+              <el-option
+                v-for="item in $dictUtils.getDictList('cw_project_report_archive_file_type')"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value">
+              </el-option>
+            </el-select>
+            <span v-else>{{$dictUtils.getDictLabel("cw_project_report_archive_file_type", scope.row.fileType, '')}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="备注" prop="remarks" align="center">
+          <template slot-scope="scope">
+            <el-input size="small" v-if="auth !== 'view'" v-model="scope.row.remarks" placeholder="请输入"></el-input>
+            <span v-else>{{commonJS.isEmpty(scope.row.remarks)?'':scope.row.remarks}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" width="200px" fixed="right" align="center">
+          <template  scope="scope">
+            <el-button type="text"  icon="el-icon-edit" size="small" @click="toHref(scope.row)" :disabled="false">下载</el-button>
+            <el-button type="text"  icon="el-icon-delete" size="small"  @click="deleteById(scope.row, scope.$index)" :disabled="auth==='view'&&delFlag === false&&createBy!==scope.row.createBy.name">删除</el-button>
+            <!--<el-button size="small" type="text" icon="el-icon-edit"
+                     @click="handleUpdate(scope.row, scope.$index)"
+            >{{ scope.row.btn || "修改" }}</el-button>-->
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <el-image-viewer v-if="showViewer" :on-close="closeViewer" :url-list="[url]" :zIndex=9999></el-image-viewer>
+
+  </div>
+</template>
+
+<script>
+  // eslint-disable-next-line no-unused-vars
+  import OSSSerivce, {
+    httpRequest,
+    // eslint-disable-next-line no-unused-vars
+    handleRemove,
+    fileName,
+    // eslint-disable-next-line no-unused-vars
+    beforeAvatarUpload,
+    // eslint-disable-next-line no-unused-vars
+    openWindowOnUrl,
+    // eslint-disable-next-line no-unused-vars
+    toHref
+  } from '@/api/sys/OSSService'
+  import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
+  import moment from 'moment'
+  export default {
+    data () {
+      return {
+        progressFlag: false,
+        loadProgress: 0,
+        fileList: [],
+        dataList: [],
+        dataListNew: [],
+        url: '',
+        showViewer: false,
+        ossService: null,
+        auth: '',
+        directory: 'public',
+        maxValue: 300,
+        tableKey: '',
+        fileLoading: true,
+        dividerName: '',
+        uploadFlag: false,
+        delFlag: false,
+        createBy: '',
+        showDivider: true,
+        fileType: '',
+        remarks: ''
+      }
+    },
+    watch: {
+    },
+    created () {
+      this.ossService = new OSSSerivce()
+    },
+    components: {
+      ElImageViewer,
+      fileTypeComponentA: {
+        render: function (h) {
+          return h('span', {
+            domProps: {
+              innerText: this.$dictUtils.getDictLabel('cw_project_report_archive_file_type', this.value, '')
+            }
+          })
+        },
+        props: ['options', 'value']
+      },
+      fileTypeComponentB: {
+        data () {
+          return { fileType: '' }
+        },
+        props: ['options', 'value'],
+        mounted () {
+          this.fileType = this.value
+        },
+        render: function (h) {
+          return h(
+            'el-select',
+            {
+              attrs: {
+                placeholder: '请选择',
+                value: this.$dictUtils.getDictLabel('cw_project_report_archive_file_type', this.fileType, ''),
+                size: 'small',
+                clearable: true
+              },
+              props: ['options', 'value'],
+              on: {
+                change: (value) => {
+                  this.fileType = value
+                  this.$emit('updateFileType', value)
+                }
+              }
+            },
+            [
+              this.options.map((item) => {
+                let { label, value } = item
+                return h('el-option', {
+                  props: {
+                    label,
+                    value: parseInt(value),
+                    key: value
+                  }
+                })
+              })
+            ]
+          )
+        }
+      },
+      remarksComponentA: {
+        render: function (h) {
+          return h('span', {
+            domProps: {
+              innerText: this.value
+            }
+          })
+        },
+        props: ['value']
+      },
+      remarksComponentB: {
+        data () {
+          return { remarks: '' }
+        },
+        props: ['value'],
+        mounted () {
+          this.remarks = this.value
+        },
+        render: function (h) {
+          return h(
+            'el-input',
+            {
+              attrs: {
+                placeholder: '请输入',
+                value: this.remarks,
+                size: 'small',
+                clearable: true
+              },
+              props: ['value'],
+              on: {
+                input: (value) => {
+                  this.remarks = value
+                  this.$emit('updateRemarks', value)
+                }
+              }
+            }
+          )
+        }
+      }
+    },
+    mounted () {
+      window.onPreview = this.onPreview
+    },
+    methods: {
+      /**
+       * dividerName: 组件中divider的名称赋值
+       * showDivider: ‘附件‘Divider是否展示
+       *     注:值为空时,默认值为true
+       *    showDivider=false时 ‘附件‘Divider隐藏
+       **/
+      setDividerName (dividerName, showDivider) {
+        if (this.commonJS.isNotEmpty(dividerName)) {
+          this.dividerName = dividerName
+        }
+        if (this.commonJS.isNotEmpty(showDivider)) {
+          if (showDivider === false) {
+            this.showDivider = false
+          } else {
+            this.showDivider = true
+          }
+        } else {
+          this.showDivider = true
+        }
+      },
+      /**
+       * 文件上传组件初始化
+       * @param auth
+       *    auth的值为"view"时,不可上传/编辑文件
+       *    auth为其他值时,可上传/编辑文件
+       * @param fileList  要显示到文件上传列表中的文件。
+       *    注:文件必须要有url属性并且文件的url属性值必须是在oss中的路径值
+       *    例:'/attachment-file/xxx/xxx/2022/9/08/xxx.jpg'
+       * @param directory  要存放到oss的哪个文件夹下。
+       *    注:值为空时,默认存放到"public"文件夹
+       * @param maxValue  上传文件允许的最大值,单位:MB
+       *    注:值为空时,默认值为300MB
+       * @param dividerName  组件中divider的名称
+       *    注:值为空时,默认值为‘附件’
+       * @param uploadFlag  ‘上传文件’按钮是否禁用
+       *    注:值为空时,默认值为false
+       *    auth=view&&uploadFlag=false时 ‘上传文件’按钮禁用
+       * @param delFlag  ‘删除’按钮是否禁用
+       *    注:值为空时,默认值为false
+       *    auth=view&&delFlag=false时 ‘删除’按钮禁用
+       * @param showDivider  ‘附件‘Divider是否展示
+       *    注:值为空时,默认值为true
+       *    showDivider=false时 ‘附件‘Divider隐藏
+       */
+      async newUpload (auth, fileList, directory, maxValue, dividerName, uploadFlag, delFlag, showDivider) {
+        await this.fileLoadingFalse()
+        if (this.commonJS.isEmpty(dividerName)) {
+          this.dividerName = '附件'
+        } else {
+          this.dividerName = dividerName
+        }
+        if (directory !== undefined && directory !== null && directory !== '' && directory !== {}) {
+          this.directory = directory
+        } else {
+          this.directory = 'public'
+        }
+        if (maxValue !== undefined && maxValue !== null && maxValue !== '' && maxValue !== 0) {
+          this.maxValue = maxValue
+        } else {
+          this.maxValue = 300
+        }
+        this.auth = auth
+        if (this.commonJS.isEmpty(uploadFlag)) {
+          this.uploadFlag = false
+        } else {
+          if (uploadFlag !== true && uploadFlag !== false) {
+            this.uploadFlag = false
+          } else {
+            this.uploadFlag = uploadFlag
+          }
+        }
+        if (this.commonJS.isEmpty(delFlag)) {
+          this.delFlag = false
+        } else {
+          if (delFlag !== true && delFlag !== false) {
+            this.delFlag = false
+            this.createBy = delFlag
+          } else {
+            this.delFlag = delFlag
+          }
+        }
+        if (this.commonJS.isEmpty(fileList)) {
+          this.fileLoading = true
+        }
+        for await (let item of fileList) {
+          await this.ossService.getFileSizeByUrl(item.url).then((data) => {
+            item.lsUrl = data.data.url
+            item.size = data.data.size
+            this.dataList.push(item)
+            this.dataListNew.push(item)
+            if (this.dataList.length === fileList.length) {
+              this.fileLoading = true
+            }
+          })
+        }
+        // this.dataList = JSON.parse(JSON.stringify(fileList))
+        // this.dataListNew = JSON.parse(JSON.stringify(fileList))
+        if (this.commonJS.isEmpty(showDivider)) {
+          this.showDivider = true
+        } else {
+          if (showDivider === false) {
+            this.showDivider = false
+          } else {
+            this.showDivider = true
+          }
+        }
+      },
+      async httpRequest (file) {
+        await httpRequest(file, fileName(file), this.directory, this.maxValue)
+      },
+      uploadVideoProcess (event, file, fileList) {
+        this.progressFlag = true // 显示进度条
+        this.loadProgress = parseInt(event.percent) // 动态获取文件上传进度
+        if (this.loadProgress >= 100) {
+          this.loadProgress = 100
+          setTimeout(() => {
+            this.progressFlag = false
+          }, 1000) // 一秒后关闭进度条
+        }
+      },
+      getSize (value) {
+        if (this.commonJS.isEmpty(value)) {
+          return '0 B'
+        } else {
+          let val = parseInt(value)
+          if (this.commonJS.isEmpty(val)) {
+            return '0 B'
+          }
+          if (isNaN(val)) {
+            return '0 B'
+          }
+          if (val === 0) {
+            return '0 B'
+          }
+          let k = 1024
+          let sizes = ['B', 'KB', 'MB', 'GB', 'PB', 'TB', 'EB', 'ZB', 'YB']
+          let i = Math.floor(Math.log(val) / Math.log(k))
+          return (val / Math.pow(k, i)).toPrecision(3) + '' + sizes[i]
+        }
+      },
+      async changes (file, fileList) {
+        // if (file.status !== 'ready') {
+        //   return
+        // }
+        if (!beforeAvatarUpload(file, fileList, this.maxValue)) {
+          this.$message.error('文件大小不能超过 ' + this.maxValue + ' MB!')
+          return
+        }
+        this.dataListNew = []
+        this.dataList.forEach((item) => {
+          this.dataListNew.push(item)
+        })
+        for (let item of fileList) {
+          item.createDate = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+          item.createBy = {
+            id: '',
+            name: ''
+          }
+          item.createBy.id = this.$store.state.user.id
+          item.createBy.name = this.$store.state.user.name
+          this.dataListNew.push(item)
+        }
+        for await (let item of this.dataListNew) {
+          if (item.raw !== undefined && item.raw !== null && item.raw !== {}) {
+            item.url = item.raw.url
+            if (item.raw.url !== undefined && item.raw.url !== null && item.raw.url !== {}) {
+              await this.ossService.getTemporaryUrl(item.raw.url).then((data) => {
+                item.lsUrl = data.data
+              })
+            }
+          }
+        }
+        this.tableKey = Math.random()
+      },
+      showFile (row) {
+        openWindowOnUrl(row)
+      },
+      onPreview (url) {
+        this.url = url
+        this.showViewer = true
+      },
+      // 关闭查看器
+      closeViewer () {
+        this.url = ''
+        this.showViewer = false
+      },
+      toHref (row) {
+        toHref(row)
+      },
+      deleteById (row, index) {
+        this.dataListNew.splice(index, 1)
+        if (row.id !== null && row.id !== '' && row.id !== undefined) {
+          this.dataList.splice(index, 1)
+          // this.ossService.deleteMsgById(row.id)
+        } else {
+          let num
+          if (this.dataList.length > 0) {
+            num = this.dataList.length - 1
+          } else {
+            num = 0
+          }
+          this.$refs.upload.uploadFiles.splice(index - num, 1)
+        }
+      },
+      /**
+       * 关闭dialog时使用  清除el-upload中上传的文件
+       */
+      clearUpload () {
+        this.$refs.upload.uploadFiles = []
+        this.dataList = []
+        this.dataListNew = []
+        this.createBy = ''
+      },
+      /**
+       * 获取当前文件列表中的文件数据
+       */
+      getDataList () {
+        let _this = this
+        const waitForEach = function () {
+          return new Promise(function (resolve, reject) {
+            _this.dataListNew.forEach((item, index) => {
+              if (item.btnType === 'save') {
+                _this.dataListNew[index].fileTypeComponent = 'fileTypeComponentA'
+                _this.dataListNew[index].remarksComponent = 'remarksComponentA'
+                _this.dataListNew[index].btn = '修改'
+                _this.dataListNew[index].btnType = 'edit'
+                _this.dataListNew[index].fileType = _this.fileType
+                _this.dataListNew[index].remarks = _this.remarks
+              }
+            })
+            _this.tableKey = Math.random()
+            resolve(_this.dataListNew)
+          })
+        }
+        return waitForEach()
+      },
+      /**
+       * 判断进度条是否结束,附件是否加载完成
+       * @returns {boolean}
+       */
+      checkProgress () {
+        if (this.progressFlag === true) {
+          this.$message.warning('请等待附件上传完成再进行操作')
+          return true
+        }
+        if (this.fileLoading === false) {
+          this.$message.warning('请等待附件加载完成再进行操作')
+          return true
+        }
+        return false
+      },
+      ifName (row) {
+        if (this.commonJS.isEmpty(row.name)) {
+          row.name = '---'
+          return false
+        }
+        let suffix = row.name.substring(row.name.lastIndexOf('.') + 1)
+        if (suffix === 'jpg' || suffix === 'png' || suffix === 'gif' || suffix === 'bmp' || suffix === 'jpeg') {
+          return true
+        } else {
+          return false
+        }
+      },
+      fileLoadingFalse () {
+        this.fileLoading = false
+      },
+      /** 修改||保存按钮操作 */
+      handleUpdate: async function (row, rowIndex) {
+        if (row.btnType === 'edit' || this.commonJS.isEmpty(row.btnType)) {
+          let _this = this
+          const waitForEach = function () {
+            return new Promise(function (resolve, reject) {
+              _this.dataListNew.forEach((item, index) => {
+                if (item.btnType === 'save') {
+                  _this.dataListNew[index].fileTypeComponent = 'fileTypeComponentA'
+                  _this.dataListNew[index].remarksComponent = 'remarksComponentA'
+                  _this.dataListNew[index].btn = '修改'
+                  _this.dataListNew[index].btnType = 'edit'
+                  _this.dataListNew[index].fileType = _this.fileType
+                  _this.dataListNew[index].remarks = _this.remarks
+                }
+              })
+              resolve()
+            })
+          }
+          waitForEach().then(() => {
+            this.dataListNew[rowIndex].fileTypeComponent = 'fileTypeComponentB'
+            this.dataListNew[rowIndex].remarksComponent = 'remarksComponentB'
+            this.dataListNew[rowIndex].btn = '保存'
+            this.dataListNew[rowIndex].btnType = 'save'
+          })
+        } else {
+          this.dataListNew[rowIndex].fileTypeComponent = 'fileTypeComponentA'
+          this.dataListNew[rowIndex].remarksComponent = 'remarksComponentA'
+          this.dataListNew[rowIndex].btn = '修改'
+          this.dataListNew[rowIndex].btnType = 'edit'
+          this.dataListNew[rowIndex].fileType = this.fileType
+          this.dataListNew[rowIndex].remarks = this.remarks
+        }
+        this.tableKey = Math.random()
+      },
+      updateFileType (fileType) {
+        this.fileType = fileType
+      },
+      updateRemarks (remarks) {
+        this.remarks = remarks
+      },
+      tableRowClassName ({ row, rowIndex }) {
+        row.index = rowIndex
+      },
+      // 行点击事件
+      tableRowClick (row, column) {
+        if (this.auth !== 'view') {
+          if (column.label !== '备注' && column.label !== '文件名称' && column.label !== '操作') {
+            let _this = this
+            const waitForEach = function () {
+              return new Promise(function (resolve, reject) {
+                _this.dataListNew.forEach((item, index) => {
+                  if (item.btnType === 'save') {
+                    _this.dataListNew[index].fileTypeComponent = 'fileTypeComponentA'
+                    _this.dataListNew[index].remarksComponent = 'remarksComponentA'
+                    _this.dataListNew[index].btn = '修改'
+                    _this.dataListNew[index].btnType = 'edit'
+                    _this.dataListNew[index].fileType = _this.fileType
+                    _this.dataListNew[index].remarks = _this.remarks
+                  }
+                })
+                resolve()
+              })
+            }
+            waitForEach().then(() => {
+              this.fileType = this.dataListNew[row.index].fileType
+              this.remarks = this.dataListNew[row.index].remarks
+              this.dataListNew[row.index].fileTypeComponent = 'fileTypeComponentB'
+              this.dataListNew[row.index].remarksComponent = 'remarksComponentB'
+              this.dataListNew[row.index].btn = '保存'
+              this.dataListNew[row.index].btnType = 'save'
+            })
+            this.tableKey = Math.random()
+          }
+        }
+      },
+      // 点击上传文件按钮的时候,把未保存的文件保存一下
+      clickHandel () {
+        this.dataListNew.forEach((item, index) => {
+          if (item.btnType === 'save') {
+            this.dataListNew[index].fileTypeComponent = 'fileTypeComponentA'
+            this.dataListNew[index].remarksComponent = 'remarksComponentA'
+            this.dataListNew[index].btn = '修改'
+            this.dataListNew[index].btnType = 'edit'
+            this.dataListNew[index].fileType = this.fileType
+            this.dataListNew[index].remarks = this.remarks
+          }
+        })
+      }
+    }
+  }
+</script>

+ 1 - 1
src/views/modules/cw/projectRecords/ProjectRecordsChooseCom.vue

@@ -140,7 +140,7 @@
       },
       list () {
         this.loading = true
-        this.searchForm.createId = this.$store.state.user.id
+        // this.searchForm.createId = this.$store.state.user.id
         this.searchForm.status = '5'
         this.projectRecordsService.list({
           'current': this.tablePage.currentPage,

+ 127 - 127
src/views/modules/cw/projectReportArchive/ProjectReportArchiveForm.vue

@@ -184,68 +184,60 @@
                   </el-form-item>
                 </el-col>
               </el-row>
+          <el-divider content-position="left"><i class="el-icon-document"></i> 审计报告</el-divider>
+          <el-row :gutter="15">
+            <el-col :span="12">
+              <el-form-item label="报告文号" prop="reportNo"
+                            :rules="[
+                                {required: true, message:'报告文号不能为空', trigger:'blur'}
+                   ]">
+                <el-input :readonly="true" v-model="inputForm.reportNo" placeholder="请填写报告文号" clearable>
+                  <el-button slot="append" :disabled="formReadOnly" @click="openReportChoose" icon="el-icon-search"></el-button>
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="报告日期" prop="reportDate"
+                            :rules="[
+                   ]">
+                <el-input :disabled="true" v-model="inputForm.reportDate" placeholder="请填写报告日期" clearable></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="签字注师1" prop="signatureAnnotator1Name"
+                            :rules="[
+                   ]">
+                <el-input :disabled="true" v-model="inputForm.signatureAnnotator1Name" placeholder="请填写签字注师1" clearable></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="签字注师2" prop="signatureAnnotator2Name"
+                            :rules="[
+                   ]">
+                <el-input :disabled="true" v-model="inputForm.signatureAnnotator2Name" placeholder="请填写签字注师2" clearable></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="报告主办人" prop="reportCreateName"
+                            :rules="[
+                   ]">
+                <el-input :disabled="true" v-model="inputForm.reportCreateName" placeholder="请填写报告主办人" clearable></el-input>
+              </el-form-item>
+            </el-col>
+            <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="status !== 'audit'"
+                     label-width="135px" @submit.native.prevent>
+              <el-col :span="24">
+                <el-form-item label="审计意见" prop="reportRemarks"
+                              :rules="[
+                   ]">
+                  <el-input type="textarea"  style="width:100%" maxlength="225" v-model="inputForm.reportRemarks" placeholder="请填写审计意见" show-word-limit></el-input>
+
+                </el-form-item>
+              </el-col>
+            </el-form>
+          </el-row>
         </el-form>
         <el-tabs v-model="activeName" type="border-card" @tab-click="tabHandleClick">
-          <el-tab-pane label="审计报告" name="report">
-            <el-row :gutter="15">
-              <el-button type="info" style="margin-bottom: 15px" size="mini" :disabled="method === 'view'" @click="openReportChoose">
-                新增审计报告
-              </el-button>
-            </el-row>
-            <el-row  :gutter="15">
-              <vxe-table
-                border
-                show-overflow
-                show-footer
-                :column-config="{resizable: true}"
-                ref="reportTable"
-                :key="tableKeyReport"
-                class="vxe-table-element"
-                :data="inputForm.cwProjectReportArchiveReportDTOList"
-                style=""
-                @cell-click=""
-                @edit-closed=""
-                highlight-current-row
-                :edit-config="{trigger: 'click', mode: 'row', showStatus: false, autoClear: false}"
-              >
-                <vxe-table-column align="center" field="reportNo" title="报告文号" :edit-render="{}">
-                  <template v-slot:edit="scope">
-                    <el-input :disabled="true" v-model="scope.row.reportNo" placeholder="报告文号" clearable></el-input>
-                  </template>
-                </vxe-table-column>
-                <vxe-table-column align="center" field="reportDate" title="报告日期" :edit-render="{}">
-                  <template v-slot:edit="scope">
-                    <el-input :disabled="true" v-model="scope.row.reportDate" placeholder="报告日期" clearable></el-input>
-                  </template>
-                </vxe-table-column>
-                <vxe-table-column align="center" field="signatureAnnotator1Name" title="签字注师1" :edit-render="{}">
-                  <template v-slot:edit="scope">
-                    <el-input :disabled="true" v-model="scope.row.signatureAnnotator1Name" placeholder="签字注师1" clearable></el-input>
-                  </template>
-                </vxe-table-column>
-                <vxe-table-column align="center" field="signatureAnnotator2Name" title="签字注师2" :edit-render="{}">
-                  <template v-slot:edit="scope">
-                    <el-input :disabled="true" v-model="scope.row.signatureAnnotator2Name" placeholder="签字注师2" clearable></el-input>
-                  </template>
-                </vxe-table-column>
-                <vxe-table-column align="center" field="reportCreateName" title="报告主办人" :edit-render="{}">
-                  <template v-slot:edit="scope">
-                    <el-input :readonly="true" v-model="scope.row.reportCreateName" placeholder="报告主办人" clearable></el-input>
-                  </template>
-                </vxe-table-column>
-                <vxe-table-column align="center" field="remarks" title="审计意见" :edit-render="{}">
-                  <template v-slot:edit="scope">
-                    <el-input :disabled="status !== 'audit'" v-model="scope.row.remarks" placeholder="审计意见" clearable></el-input>
-                  </template>
-                </vxe-table-column>
-                <vxe-table-column align="center" title="操作" width="100">
-                  <template v-slot="scope">
-                    <el-button :disabled="method==='view'" size="mini" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'report')">删除</el-button>
-                  </template>
-                </vxe-table-column>
-              </vxe-table>
-            </el-row>
-          </el-tab-pane>
           <el-tab-pane label="附件" name="files">
             <!--        附件-->
             <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
@@ -266,7 +258,7 @@
 </template>
 
 <script>
-  import UpLoadComponent from '@/views/common/UpLoadComponentV3'
+  import UpLoadComponent from '@/views/common/UpLoadComponentV3.1'
   import SelectUserTree from '@/views/modules/utils/treeUserSelect'
   import SelectTree from '@/components/treeSelect/treeSelect.vue'
   import UserSelect from '@/components/userSelect'
@@ -334,10 +326,17 @@
             contractId: ''
           },
           auditedUnitsName: '',
-          fileNumber: ''
+          fileNumber: '',
+          reportDate: '',
+          reportNo: '',
+          signatureAnnotator1: '',
+          signatureAnnotator1Name: '',
+          signatureAnnotator2: '',
+          signatureAnnotator2Name: '',
+          reportCreateName: ''
         },
         keyWatch: '',
-        activeName: 'report',
+        activeName: 'files',
         tableKeyReport: '',
         visible: false
       }
@@ -394,7 +393,7 @@
           this.title = '项目报告归档详情'
           this.method = 'view'
         }
-        this.activeName = 'report'
+        this.activeName = 'files'
         this.projectRecordsService = new ProjectRecordsService()
         this.projectReportArchiveService = new ProjectReportArchiveService()
         this.inputForm = {
@@ -436,7 +435,14 @@
             contractId: ''
           },
           auditedUnitsName: '',
-          fileNumber: ''
+          fileNumber: '',
+          reportDate: '',
+          reportNo: '',
+          signatureAnnotator1: '',
+          signatureAnnotator1Name: '',
+          signatureAnnotator2: '',
+          signatureAnnotator2Name: '',
+          reportCreateName: ''
         }
         this.inputForm.id = id
         this.loading = false
@@ -521,32 +527,47 @@
             this.loading = true
             if (this.$refs.uploadComponent.checkProgress()) {
               this.loading = false
-              return
-            }
-            if (status === 'agree') {
-              // 审核同意
-              this.inputForm.auditDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
-              // this.inputForm.agreeUserId = this.$store.state.user.id
-              this.inputForm.status = '5'
-              if (this.inputForm.isNumber !== this.inputForm.number) {
-                this.$message.error('“案卷号”与“确认案卷号”不一致,请重新填写')
-                this.loading = false
-                throw new Error('“案卷号”与“确认案卷号”不一致,请重新填写')
+              throw new Error()
+            } else {
+              let _this = this
+              const wait = function () {
+                return new Promise((resolve, reject) => {
+                  if (status === 'agree') {
+                    // 审核同意
+                    _this.inputForm.auditDate = _this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+                    // this.inputForm.agreeUserId = this.$store.state.user.id
+                    _this.inputForm.status = '5'
+                    if (_this.inputForm.isNumber !== _this.inputForm.number) {
+                      _this.$message.error('“案卷号”与“确认案卷号”不一致,请重新填写')
+                      _this.loading = false
+                      throw new Error('“案卷号”与“确认案卷号”不一致,请重新填写')
+                    }
+                  }
+                  _this.$refs.uploadComponent.getDataList().then((list) => {
+                    // list为返回数据
+                    _this.inputForm.workAttachmentDtoList = list
+                    list.forEach(item => {
+                      if (_this.commonJS.isEmpty(item.fileType)) {
+                        _this.$message.error('附件中的文件类型不可以为空')
+                        throw new Error()
+                      }
+                    })
+                  })
+                  if (_this.commonJS.isEmpty(_this.inputForm.createDate)) {
+                    _this.inputForm.createDate = _this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+                  }
+                  resolve()
+                })
               }
+              wait().then(() => {
+                this.projectReportArchiveService.saveForm(this.inputForm).then(({data}) => {
+                  callback(data.businessTable, data.businessId, this.inputForm)
+                  this.loading = false
+                }).catch(() => {
+                  this.loading = false
+                })
+              })
             }
-            this.$refs.uploadComponent.getDataList().then((list) => {
-              // list为返回数据
-              this.inputForm.workAttachmentDtoList = list
-            })
-            if (this.commonJS.isEmpty(this.inputForm.createDate)) {
-              this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
-            }
-            this.projectReportArchiveService.saveForm(this.inputForm).then(({data}) => {
-              callback(data.businessTable, data.businessId, this.inputForm)
-              this.loading = false
-            }).catch(() => {
-              this.loading = false
-            })
           }
         })
       },
@@ -616,7 +637,14 @@
             contractId: ''
           },
           auditedUnitsName: '',
-          fileNumber: ''
+          fileNumber: '',
+          reportDate: '',
+          reportNo: '',
+          signatureAnnotator1: '',
+          signatureAnnotator1Name: '',
+          signatureAnnotator2: '',
+          signatureAnnotator2Name: '',
+          reportCreateName: ''
         }
         this.$refs.uploadComponent.clearUpload()
         this.$refs.inputForm.resetFields()
@@ -675,43 +703,15 @@
         this.$refs.reportChooseByProjectCom.init(this.inputForm.projectId)
       },
       // 审计报告选择结果获取
-      getReport (list) {
-        if (this.commonJS.isEmpty(this.inputForm.cwProjectReportArchiveReportDTOList)) {
-          this.inputForm.cwProjectReportArchiveReportDTOList = []
-        }
-        let _this = this
-        let _list = list
-        const waitForEach = function () {
-          return new Promise(function (resolve, reject) {
-            _list.forEach((item) => {
-              _this.inputForm.cwProjectReportArchiveReportDTOList.forEach(report => {
-                if (item.reportNo === report.reportNo) {
-                  _this.$message.error('已存在审计报告 “' + report.reportNo + '”,请重新选择')
-                  throw new Error('已存在审计报告 “' + report.reportNo + '”,请重新选择')
-                }
-              })
-            })
-            resolve()
-          })
-        }
-        waitForEach().then(() => {
-          list.forEach(item => {
-            let p = {
-              reportId: item.newLineId,
-              reportDate: item.reportDate,
-              reportNo: item.reportNo,
-              signatureAnnotator1: item.signatureAnnotator1,
-              signatureAnnotator1Name: item.signatureAnnotator1Name,
-              signatureAnnotator2: item.signatureAnnotator2,
-              signatureAnnotator2Name: item.signatureAnnotator2Name,
-              createBy: item.createBy,
-              reportCreateName: item.createName
-            }
-            this.$refs.reportTable.insertAt(p)
-            this.inputForm.cwProjectReportArchiveReportDTOList.push(p)
-            this.tableKeyReport = Math.random()
-          })
-        })
+      getReport (row) {
+        this.inputForm.reportDate = row.reportDate
+        this.inputForm.reportNo = row.reportNo
+        this.inputForm.signatureAnnotator1 = row.signatureAnnotator1
+        this.inputForm.signatureAnnotator1Name = row.signatureAnnotator1Name
+        this.inputForm.signatureAnnotator2 = row.signatureAnnotator2
+        this.inputForm.signatureAnnotator2Name = row.signatureAnnotator2Name
+        // this.inputForm.createBy = row.createBy
+        this.inputForm.reportCreateName = row.createName
       }
     }
   }

+ 1 - 0
src/views/modules/cw/projectReportArchive/ProjectReportArchiveList.vue

@@ -132,6 +132,7 @@
           <vxe-column min-width="150" align="center" title="底稿册数" field="papersNum"></vxe-column>
           <vxe-column min-width="150" align="center" title="档案年度" field="year"></vxe-column>
           <vxe-column min-width="230" align="center" title="案卷号" field="number"></vxe-column>
+          <vxe-column min-width="200" align="center" title="报告号" field="reportNo"></vxe-column>
           <vxe-column min-width="200" align="center" title="归档时间" field="auditDate"></vxe-column>
           <vxe-column min-width="150" align="center" title="创建人" field="createBy.name"></vxe-column>
           <vxe-column min-width="200" align="center" title="创建时间" field="createDate"></vxe-column>

+ 133 - 128
src/views/modules/cw/projectReportArchive/ProjectReportArchiveTaskForm.vue

@@ -175,68 +175,60 @@
                   </el-form-item>
                 </el-col>
               </el-row>
-        </el-form>
-        <el-tabs v-model="activeName" type="border-card" @tab-click="tabHandleClick">
-          <el-tab-pane label="审计报告" name="report">
+          <el-divider content-position="left"><i class="el-icon-document"></i> 审计报告</el-divider>
             <el-row :gutter="15">
-              <el-button type="info" style="margin-bottom: 15px" size="mini" :disabled="formReadOnly" @click="openReportChoose">
-                新增审计报告
-              </el-button>
-            </el-row>
-            <el-row  :gutter="15">
-              <vxe-table
-                border
-                show-overflow
-                show-footer
-                :column-config="{resizable: true}"
-                ref="reportTable"
-                :key="tableKeyReport"
-                class="vxe-table-element"
-                :data="inputForm.cwProjectReportArchiveReportDTOList"
-                style=""
-                @cell-click=""
-                @edit-closed=""
-                highlight-current-row
-                :edit-config="{trigger: 'click', mode: 'row', showStatus: false, autoClear: false}"
-              >
-                <vxe-table-column align="center" field="reportNo" title="报告文号" :edit-render="{}">
-                  <template v-slot:edit="scope">
-                    <el-input :readonly="true" v-model="scope.row.reportNo" placeholder="报告文号" clearable></el-input>
-                  </template>
-                </vxe-table-column>
-                <vxe-table-column align="center" field="reportDate" title="报告日期" :edit-render="{}">
-                  <template v-slot:edit="scope">
-                    <el-input :readonly="true" v-model="scope.row.reportDate" placeholder="报告日期" clearable></el-input>
-                  </template>
-                </vxe-table-column>
-                <vxe-table-column align="center" field="signatureAnnotator1Name" title="签字注师1" :edit-render="{}">
-                  <template v-slot:edit="scope">
-                    <el-input :readonly="true" v-model="scope.row.signatureAnnotator1Name" placeholder="签字注师1" clearable></el-input>
-                  </template>
-                </vxe-table-column>
-                <vxe-table-column align="center" field="signatureAnnotator2Name" title="签字注师2" :edit-render="{}">
-                  <template v-slot:edit="scope">
-                    <el-input :readonly="true" v-model="scope.row.signatureAnnotator2Name" placeholder="签字注师2" clearable></el-input>
-                  </template>
-                </vxe-table-column>
-                <vxe-table-column align="center" field="reportCreateName" title="报告主办人" :edit-render="{}">
-                  <template v-slot:edit="scope">
-                    <el-input :readonly="true" v-model="scope.row.reportCreateName" placeholder="报告主办人" clearable></el-input>
-                  </template>
-                </vxe-table-column>
-                <vxe-table-column align="center" field="remarks" title="审计意见" :edit-render="{}">
-                  <template v-slot:edit="scope">
-                    <el-input :disabled="status !== 'audit'" v-model="scope.row.remarks" placeholder="审计意见" clearable></el-input>
-                  </template>
-                </vxe-table-column>
-                <vxe-table-column align="center" title="操作" width="100">
-                  <template v-slot="scope">
-                    <el-button :disabled="formReadOnly" size="mini" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'report')">删除</el-button>
-                  </template>
-                </vxe-table-column>
-              </vxe-table>
+              <el-col :span="12">
+                <el-form-item label="报告文号" prop="reportNo"
+                              :rules="[
+                                {required: true, message:'报告文号不能为空', trigger:'blur'}
+                   ]">
+                  <el-input :readonly="true" v-model="inputForm.reportNo" placeholder="请填写报告文号" clearable>
+                    <el-button slot="append" :disabled="formReadOnly" @click="openReportChoose" icon="el-icon-search"></el-button>
+                  </el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="报告日期" prop="reportDate"
+                              :rules="[
+                   ]">
+                  <el-input :disabled="true" v-model="inputForm.reportDate" placeholder="请填写报告日期" clearable></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="签字注师1" prop="signatureAnnotator1Name"
+                              :rules="[
+                   ]">
+                  <el-input :disabled="true" v-model="inputForm.signatureAnnotator1Name" placeholder="请填写签字注师1" clearable></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="签字注师2" prop="signatureAnnotator2Name"
+                              :rules="[
+                   ]">
+                  <el-input :disabled="true" v-model="inputForm.signatureAnnotator2Name" placeholder="请填写签字注师2" clearable></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="报告主办人" prop="reportCreateName"
+                              :rules="[
+                   ]">
+                  <el-input :disabled="true" v-model="inputForm.reportCreateName" placeholder="请填写报告主办人" clearable></el-input>
+                </el-form-item>
+              </el-col>
+              <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="status !== 'audit'"
+                       label-width="135px" @submit.native.prevent>
+              <el-col :span="24">
+                <el-form-item label="审计意见" prop="reportRemarks"
+                              :rules="[
+                   ]">
+                  <el-input type="textarea"  style="width:100%" maxlength="225" v-model="inputForm.reportRemarks" placeholder="请填写审计意见" show-word-limit></el-input>
+
+                </el-form-item>
+              </el-col>
+              </el-form>
             </el-row>
-          </el-tab-pane>
+        </el-form>
+        <el-tabs v-model="activeName" type="border-card" @tab-click="tabHandleClick">
           <el-tab-pane label="附件" name="files">
             <!--        附件-->
             <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
@@ -252,7 +244,7 @@
 </template>
 
 <script>
-  import UpLoadComponent from '@/views/common/UpLoadComponentV3'
+  import UpLoadComponent from '@/views/common/UpLoadComponentV3.1'
   import SelectUserTree from '@/views/modules/utils/treeUserSelect'
   import SelectTree from '@/components/treeSelect/treeSelect.vue'
   import UserSelect from '@/components/userSelect'
@@ -320,10 +312,17 @@
             contractId: ''
           },
           auditedUnitsName: '',
-          fileNumber: ''
+          fileNumber: '',
+          reportDate: '',
+          reportNo: '',
+          signatureAnnotator1: '',
+          signatureAnnotator1Name: '',
+          signatureAnnotator2: '',
+          signatureAnnotator2Name: '',
+          reportCreateName: ''
         },
         keyWatch: '',
-        activeName: 'report',
+        activeName: 'files',
         tableKeyReport: ''
       }
     },
@@ -371,7 +370,7 @@
         this.keyWatch = keyWatch
       },
       init (method, id) {
-        this.activeName = 'report'
+        this.activeName = 'files'
         this.projectRecordsService = new ProjectRecordsService()
         this.projectReportArchiveService = new ProjectReportArchiveService()
         this.method = method
@@ -414,7 +413,14 @@
             contractId: ''
           },
           auditedUnitsName: '',
-          fileNumber: ''
+          fileNumber: '',
+          reportDate: '',
+          reportNo: '',
+          signatureAnnotator1: '',
+          signatureAnnotator1Name: '',
+          signatureAnnotator2: '',
+          signatureAnnotator2Name: '',
+          reportCreateName: ''
         }
         this.inputForm.id = id
         this.loading = false
@@ -498,33 +504,53 @@
             this.loading = true
             if (this.$refs.uploadComponent.checkProgress()) {
               this.loading = false
-              return
-            }
-            if (status === 'agree') {
-              if (this.inputForm.isNumber !== this.inputForm.number) {
-                this.$message.error('“案卷号”与“确认案卷号”不一致,请重新填写')
-                this.loading = false
-                throw new Error('“案卷号”与“确认案卷号”不一致,请重新填写')
-              } else {
-                // 审核同意
-                this.inputForm.auditDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
-                // this.inputForm.agreeUserId = this.$store.state.user.id
-                this.inputForm.status = '5'
+              throw new Error()
+            } else {
+              let _this = this
+              const wait = function () {
+                return new Promise(async (resolve, reject) => {
+                  if (status === 'agree') {
+                    // 审核同意
+                    _this.inputForm.auditDate = _this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+                    // this.inputForm.agreeUserId = this.$store.state.user.id
+                    _this.inputForm.status = '5'
+                    if (_this.inputForm.isNumber !== _this.inputForm.number) {
+                      _this.$message.error('“案卷号”与“确认案卷号”不一致,请重新填写')
+                      _this.loading = false
+                      reject(new Error('“案卷号”与“确认案卷号”不一致,请重新填写'))
+                    }
+                  }
+                  await _this.$refs.uploadComponent.getDataList().then((list) => {
+                    // list为返回数据
+                    _this.inputForm.workAttachmentDtoList = list
+                    list.forEach(item => {
+                      if (_this.commonJS.isEmpty(item.fileType)) {
+                        _this.$message.error('附件中的文件类型不可以为空')
+                        reject(new Error('附件中的文件类型不可以为空'))
+                      }
+                    })
+                  })
+                  if (_this.commonJS.isEmpty(_this.inputForm.createDate)) {
+                    _this.inputForm.createDate = _this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+                  }
+                  resolve()
+                })
               }
+              wait().then(() => {
+                console.log('123')
+                this.projectReportArchiveService.saveForm(this.inputForm).then(({data}) => {
+                  callback(data.businessTable, data.businessId, this.inputForm)
+                  this.loading = false
+                }).catch(() => {
+                  this.loading = false
+                  throw new Error()
+                })
+              }).catch(() => {
+                console.log('456')
+                this.loading = false
+                throw new Error()
+              })
             }
-            this.$refs.uploadComponent.getDataList().then((list) => {
-              // list为返回数据
-              this.inputForm.workAttachmentDtoList = list
-            })
-            if (this.commonJS.isEmpty(this.inputForm.createDate)) {
-              this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
-            }
-            this.projectReportArchiveService.saveForm(this.inputForm).then(({data}) => {
-              callback(data.businessTable, data.businessId, this.inputForm)
-              this.loading = false
-            }).catch(() => {
-              this.loading = false
-            })
           }
         })
       },
@@ -622,7 +648,14 @@
             contractId: ''
           },
           auditedUnitsName: '',
-          fileNumber: ''
+          fileNumber: '',
+          reportDate: '',
+          reportNo: '',
+          signatureAnnotator1: '',
+          signatureAnnotator1Name: '',
+          signatureAnnotator2: '',
+          signatureAnnotator2Name: '',
+          reportCreateName: ''
         }
         this.$refs.uploadComponent.clearUpload()
         this.$refs.inputForm.resetFields()
@@ -680,43 +713,15 @@
         this.$refs.reportChooseByProjectCom.init(this.inputForm.projectId)
       },
       // 审计报告选择结果获取
-      getReport (list) {
-        if (this.commonJS.isEmpty(this.inputForm.cwProjectReportArchiveReportDTOList)) {
-          this.inputForm.cwProjectReportArchiveReportDTOList = []
-        }
-        let _this = this
-        let _list = list
-        const waitForEach = function () {
-          return new Promise(function (resolve, reject) {
-            _list.forEach((item) => {
-              _this.inputForm.cwProjectReportArchiveReportDTOList.forEach(report => {
-                if (item.reportNo === report.reportNo) {
-                  _this.$message.error('已存在审计报告 “' + report.reportNo + '”,请重新选择')
-                  throw new Error('已存在审计报告 “' + report.reportNo + '”,请重新选择')
-                }
-              })
-            })
-            resolve()
-          })
-        }
-        waitForEach().then(() => {
-          list.forEach(item => {
-            let p = {
-              reportId: item.newLineId,
-              reportDate: item.reportDate,
-              reportNo: item.reportNo,
-              signatureAnnotator1: item.signatureAnnotator1,
-              signatureAnnotator1Name: item.signatureAnnotator1Name,
-              signatureAnnotator2: item.signatureAnnotator2,
-              signatureAnnotator2Name: item.signatureAnnotator2Name,
-              createBy: item.createBy,
-              reportCreateName: item.createName
-            }
-            this.$refs.reportTable.insertAt(p)
-            this.inputForm.cwProjectReportArchiveReportDTOList.push(p)
-            this.tableKeyReport = Math.random()
-          })
-        })
+      getReport (row) {
+        this.inputForm.reportDate = row.reportDate
+        this.inputForm.reportNo = row.reportNo
+        this.inputForm.signatureAnnotator1 = row.signatureAnnotator1
+        this.inputForm.signatureAnnotator1Name = row.signatureAnnotator1Name
+        this.inputForm.signatureAnnotator2 = row.signatureAnnotator2
+        this.inputForm.signatureAnnotator2Name = row.signatureAnnotator2Name
+        // this.inputForm.createBy = row.createBy
+        this.inputForm.reportCreateName = row.createName
       }
     }
   }

+ 5 - 5
src/views/modules/cw/projectReportArchive/ReportChooseByProjectCom.vue

@@ -40,10 +40,10 @@
           :sort-config="{remote:true}"
           :data="dataList"
           :row-config="{isCurrent: true}"
-          :checkbox-config="{trigger: 'row'}"
+          :radio-config="{trigger: 'row'}"
         >
           <vxe-column type="seq" width="60" title="序号"></vxe-column>
-          <vxe-column type="checkbox" width="40px"></vxe-column>
+          <vxe-column type="radio" width="40px"></vxe-column>
           <vxe-column min-width="230" align="center" title="报告文号" field="reportNo"></vxe-column>
           <vxe-column min-width="180" align="center" title="报告日期" field="reportDate"></vxe-column>
           <vxe-column min-width="150" align="center" title="签字注师1" field="signatureAnnotator1Name"></vxe-column>
@@ -105,13 +105,13 @@
       },
       // 表单提交
       getReport () {
-        let list = this.$refs.reportTable.getCheckboxRecords()
-        if (this.commonJS.isEmpty(list)) {
+        let row = this.$refs.reportTable.getRadioRecord()
+        if (this.commonJS.isEmpty(row)) {
           this.$message.error('请选择一条数据')
           return
         }
         this.close()
-        this.$emit('getReport', list)
+        this.$emit('getReport', row)
       },
       list () {
         this.loading = true

+ 2 - 1
src/views/modules/flowable/task/TaskForm.vue

@@ -295,7 +295,8 @@
         if (this.formType === '2') { // 外置表单
           this.$refs.form.saveForm(() => {
             this.$message.success('操作成功')
-            this.changeBusiness()
+            // this.changeBusiness()
+            this.businessId = 'false'
             this.$store.dispatch('tagsView/delView', {fullPath: this.$route.fullPath})
             this.$router.push(this.$route.query.routePath)
             this.$refs.form.close()