Browse Source

访问其他系统待办

lizhenhao 2 năm trước cách đây
mục cha
commit
e59859da24

+ 18 - 0
src/api/centerservice/ccpm/FlowService.js

@@ -0,0 +1,18 @@
+import request from '@/utils/httpRequest'
+
+export default class FlowService {
+  getHistoicFlowList (procInsId) {
+    return request({
+      url: '/ccpm_flow/getHistoicFlowList',
+      method: 'get',
+      params: {procInsId: procInsId}
+    })
+  }
+  getFlowChart (procInsId) {
+    return request({
+      url: '/ccpm_flow/getFlowChart',
+      method: 'get',
+      params: {procInsId: procInsId}
+    })
+  }
+}

+ 32 - 0
src/api/centerservice/ccpm/ReimbursementService.js

@@ -0,0 +1,32 @@
+import request from '@/utils/httpRequest'
+
+export default class ReimbursementService {
+  getReimbursementById (id) {
+    return request({
+      url: '/ccpm_reimbursement/getReimbursementById',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+  reimAudit (id, flag) {
+    return request({
+      url: '/ccpm_reimbursement/reimAudit',
+      method: 'get',
+      params: {id: id, flag: flag}
+    })
+  }
+  reimReapply (id) {
+    return request({
+      url: '/ccpm_reimbursement/reimReapply',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+  deleteReim (id) {
+    return request({
+      url: '/ccpm_reimbursement/deleteReim',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+}

+ 2 - 2
src/router/index.js

@@ -40,8 +40,8 @@ const mainRoutes = {
     {path: '/ureport/preview', component: null, name: 'ureport-preview', meta: {title: '预览报表', type: 'iframe', menuId: 'ureport-preview'}},
     {path: '/form/explorer', component: null, name: 'form-explorer', meta: {title: '浏览器', type: 'iframe'}},
     {path: '/database/datatable/TableForm', component: _import('modules/database/datatable/TableForm'), name: 'table-form', meta: {title: '数据库表详情'}},
-    {path: '/404', component: _import('common/404'), name: '404', meta: {title: '404未找到'}}
-
+    {path: '/404', component: _import('common/404'), name: '404', meta: {title: '404未找到'}},
+    {path: '/flowable/task/CenterForm', component: _import('modules/flowable/task/CenterForm'), name: 'center-form', meta: {title: '流程详情-其他系统'}}
   ]
 }
 

+ 384 - 0
src/views/common/UpLoadComponentCcpm.vue

@@ -0,0 +1,384 @@
+<!--文件上传组件-->
+<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 :loading="loading" type="primary" size="mini" :slot="auth==='view'&&uploadFlag===false?'tip':'trigger'" :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"
+        v-loading="loading"
+        :key="tableKey"
+        :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="操作" 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 v-if="createBy===scope.row.createBy.name" type="text"  icon="el-icon-delete" size="small"  @click="deleteById(scope.row, scope.$index)" :disabled="auth==='view'&&delFlag === false">删除2</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,
+        loading: false,
+        dataListLength: ''
+      }
+    },
+    watch: {
+    },
+    created () {
+      this.ossService = new OSSSerivce()
+    },
+    components: {
+      ElImageViewer
+    },
+    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
+        }
+      },
+      /**
+       *  此组件目前仅供ccpm的附件查看
+       * 文件上传组件初始化
+       * @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(fileList)) {
+          this.fileLoading = true
+        } else {
+          this.dataListLength = fileList.length
+        }
+        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
+          }
+        }
+        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.dataListNew.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 () {
+        return this.dataListNew
+      },
+      /**
+       * 判断进度条是否结束,附件是否加载完成
+       * @returns {boolean}
+       */
+      checkProgress () {
+        if (this.progressFlag === true) {
+          this.$message.warning('请等待附件上传完成再进行操作')
+          return true
+        }
+        if (this.fileLoading === false) {
+          this.$message.warning('请等待附件加载完成再进行操作')
+          if (this.dataListLength === this.dataListNew.length) {
+            this.fileLoading = true
+          }
+          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
+      },
+      // 开启/关闭页面的加载中状态
+      changeLoading (loading) {
+        if (this.commonJS.isNotEmpty(loading)) {
+          this.loading = loading
+        } else {
+          this.loading = false
+        }
+      }
+    }
+  }
+</script>
+<style scoped>
+  .el-divider__text {
+    font-size: 16px;
+    font-weight: bold;
+  }
+</style>

+ 96 - 0
src/views/modules/flowable/task/CenterForm.vue

@@ -0,0 +1,96 @@
+<template>
+  <div>
+    <div style="padding: 10px 0px 66px 0px;min-height: 100px">
+      <!--标题-->
+      <h4 style="text-align:center">{{title}}</h4>
+      <el-card>
+        <!--详情页面-->
+        <component ref="form" :businessId="businessId" :is="form"></component>
+        <!--操作按钮-->
+        <div class="FlowFormFooter">
+          <el-button type="primary" :loading="loading" @click="agree" v-noMoreClick plain>同意</el-button>
+          <el-button type="danger" :loading="loading" @click="reject" v-noMoreClick plain>驳回</el-button>
+          <el-button :loading="loading" @click="close" v-noMoreClick plain>关闭</el-button>
+        </div>
+      </el-card>
+    </div>
+
+  </div>
+</template>
+
+<script>
+  import FlowService from '@/api/centerservice/ccpm/FlowService'
+  const _import = require('@/router/import-' + process.env.NODE_ENV)
+  export default {
+    flowService: null,
+    created () {
+      this.flowService = new FlowService()
+    },
+    activated () {
+      this.init()
+    },
+    components: {
+    },
+    watch: {
+    },
+    methods: {
+      init () {
+        this.form = _import(`modules${this.$route.query.formUrl}`)
+        this.businessId = this.$route.query.id
+        this.title = this.$route.query.title
+        this.$nextTick(() => {
+          this.$refs.form.getKeyWatch(Math.random().toString())
+        })
+      },
+      // 关闭
+      close () {
+        this.$store.dispatch('tagsView/delView', {fullPath: this.$route.fullPath})
+        if (this.$route.query.backPath) {
+          this.$router.push(this.$route.query.backPath)
+        } else {
+          this.$router.push('/sys/dashboard/workBench/Pending')
+        }
+        this.$refs.form.close()
+      },
+      agree () {
+        this.$refs.form.agree()
+        this.$nextTick(() => {
+          this.close()
+        })
+      },
+      reject () {
+        this.$refs.form.reject()
+        this.$nextTick(() => {
+          this.close()
+        })
+      },
+      reapply () {
+        this.$refs.form.reapply()
+        this.$nextTick(() => {
+          this.close()
+        })
+      },
+      deleteFlow () {
+        this.$refs.form.deleteFlow()
+        this.$nextTick(() => {
+          this.close()
+        })
+      },
+      changeLoading (loading) {
+        if (this.commonJS.isNotEmpty(loading)) {
+          this.loading = loading
+        } else {
+          this.loading = false
+        }
+      }
+    },
+    data () {
+      return {
+        title: '',
+        form: '',
+        businessId: '',
+        loading: false
+      }
+    }
+  }
+</script>

+ 124 - 0
src/views/modules/flowable/task/FlowHisTableCcpm.vue

@@ -0,0 +1,124 @@
+<!--文件上传组件-->
+<template>
+  <div>
+    <!--审批流程-->
+    <el-divider v-if="showDivider" content-position="left"><i class="el-icon-document"></i> {{dividerName}}</el-divider>
+
+    <el-steps :active="3" simple style="margin-top: 10px;margin-bottom: 10px;font-weight: bold;">
+      <el-step v-for="item in flowChart" :title="item.taskName" icon="&"></el-step>
+    </el-steps>
+
+    <vxe-table
+        border="inner"
+        show-footer
+        show-overflow="title"
+        ref="flowHisTable"
+        class="vxe-table-element"
+        :data="histoicFlowList"
+        :loading="loading"
+      >
+        <vxe-table-column min-width="80" align="center" field="taskName" title="审批环节" >
+          <template slot-scope="scope">
+            <span v-if="commonJS.isNotEmpty(scope.row.durationTime)" style="color:#409EFF">{{scope.row.taskName}}</span>
+            <span v-else-if="commonJS.isEmpty(scope.row.durationTime) && commonJS.isNotEmpty(scope.row.beginDate)" style="color:#F56C6C">{{scope.row.taskName}}</span>
+            <span v-else >{{scope.row.taskName}}</span>
+          </template>
+        </vxe-table-column>
+        <vxe-table-column min-width="80" align="center" field="roleName" title="审批角色" ></vxe-table-column>
+        <vxe-table-column min-width="80" align="center" field="assigneeName" title="审批人"  ></vxe-table-column>
+        <vxe-table-column min-width="80" align="center" field="beginDate" title="开始时间"  ></vxe-table-column>
+        <vxe-table-column min-width="80" align="center" field="endDate" title="结束时间" ></vxe-table-column>
+        <vxe-table-column min-width="80" align="center" field="comment" title="提交意见"  ></vxe-table-column>
+        <vxe-table-column min-width="80" align="center" field="durationTime" title="任务历时" ></vxe-table-column>
+      </vxe-table>
+  </div>
+</template>
+
+<script>
+  export default {
+    data () {
+      return {
+        dividerName: '',
+        loading: false,
+        histoicFlowList: [],
+        flowChart: [],
+        showDivider: true
+      }
+    },
+    watch: {
+    },
+    created () {
+    },
+    components: {
+    },
+    mounted () {
+    },
+    methods: {
+      /**
+       * dividerName: 组件中divider的名称赋值
+       * showDivider: 组件中divider是否展示
+       *     注:值为空时,默认值为true 展示
+       *    showDivider=false时 Divider隐藏
+       **/
+      setDividerName (dividerName, showDivider) {
+        this.showDivider = true
+        if (this.commonJS.isNotEmpty(showDivider)) {
+          if (showDivider === false) {
+            this.showDivider = false
+          }
+        }
+        this.dividerName = '审批流程'
+        if (this.commonJS.isNotEmpty(dividerName)) {
+          this.dividerName = dividerName
+        }
+      },
+      /**
+       * 组件初始化
+       * @param flowChart 流程流向图
+       * @param histoicFlowList 流程历史
+       * @param dividerName 组件中divider的名称  默认为'审批流程'
+       * @param showDivider 组件中divider是否展示  默认值为true 展示
+       */
+      setFlowHis (flowChart, histoicFlowList, dividerName, showDivider) {
+        this.histoicFlowList = []
+        if (this.commonJS.isNotEmpty(histoicFlowList)) {
+          this.histoicFlowList = histoicFlowList
+        }
+        this.flowChart = []
+        if (this.commonJS.isNotEmpty(flowChart)) {
+          this.flowChart = flowChart
+        }
+        this.dividerName = '审批流程'
+        if (this.commonJS.isNotEmpty(dividerName)) {
+          this.dividerName = dividerName
+        }
+        this.showDivider = true
+        if (this.commonJS.isNotEmpty(showDivider)) {
+          if (showDivider === false) {
+            this.showDivider = false
+          }
+        }
+      },
+      /**
+       * 关闭时清除组件中的数据
+       */
+      clearFlowHis () {
+        this.histoicFlowList = []
+        this.flowChart = []
+      },
+      // 开启/关闭页面的加载中状态
+      changeLoading (loading) {
+        this.loading = false
+        if (this.commonJS.isNotEmpty(loading)) {
+          this.loading = loading
+        }
+      }
+    }
+  }
+</script>
+<style scoped>
+  .el-divider__text {
+    font-size: 16px;
+    font-weight: bold;
+  }
+</style>

+ 41 - 8
src/views/modules/flowable/task/TodoList.vue

@@ -49,27 +49,35 @@
                 :checkbox-config="{}">
                 <vxe-column type="seq" width="60" title="序号"></vxe-column>
                 <vxe-column type="checkbox"  width="40px"></vxe-column>
-                <vxe-column  title="实例标题" field="vars.title" >
+                <vxe-column min-width="100px" align="center" title="实例标题" field="vars.title" >
                     <template slot-scope="scope">
-                      <el-link  type="primary" :underline="false" v-if="scope.row.status === 'todo'"  @click="todo(scope.row)">{{scope.row.vars.title}}</el-link>
+                      <el-link  type="primary" :underline="false" v-if="scope.row.belongProject === 'ccpm'"  @click="todoCcpm(scope.row)">{{scope.row.vars.title}}</el-link>
+                      <el-link  type="primary" :underline="false" v-else-if="scope.row.status === 'todo'"  @click="todo(scope.row)">{{scope.row.vars.title}}</el-link>
                       <span v-else>{{scope.row.vars.title}}</span>
                     </template>
                 </vxe-column>
-                <vxe-column  title="流程名称" field="processDefinitionName" > </vxe-column>
-                <vxe-column  title="当前环节" field="task.name" >
+                <vxe-column min-width="100px" align="center" title="流程名称" field="processDefinitionName" > </vxe-column>
+                <vxe-column min-width="100px" align="center" title="当前环节" field="task.name" >
                   <template slot-scope="scope">
                       <el-tag>{{scope.row.task.name}}</el-tag>
                   </template>
                 </vxe-column>
-                <vxe-column  title="流程发起人" field="vars.userName" ></vxe-column>
+                <vxe-column min-width="100px" align="center" title="流程发起人" field="vars.userName" ></vxe-column>
                 <vxe-column
+                  min-width="100px"
+                  align="center"
                   field="task.createTime"
                   title="创建时间">
                 </vxe-column>
-                <vxe-column title="操作" width="200px" fixed="right" align="center">
+                <vxe-column title="操作" width="130px" fixed="right" align="center">
                   <template slot-scope="scope">
-                    <el-button type="text" size="small" @click="todo(scope.row)">办理</el-button>
-                    <el-button  type="text" size="small" @click="trace(scope.row)">进度</el-button>
+                    <div v-if="scope.row.belongProject === 'ccpm'">
+                      <el-button type="text" size="small" @click="todoCcpm(scope.row)">ccpm审核</el-button>
+                    </div>
+                    <div v-else>
+                      <el-button type="text" size="small" @click="todo(scope.row)">办理</el-button>
+                      <el-button  type="text" size="small" @click="trace(scope.row)">进度</el-button>
+                    </div>
                   </template>
                 </vxe-column>
             </vxe-table>
@@ -95,6 +103,7 @@
           <flow-chart ref="preview" :processInstanceId="processInstanceId"></flow-chart>
         </el-dialog>
         <user-select ref="userSelect" :limit="1" @doSubmit="selectUsersToTransferTask"></user-select>
+<!--      <ReimbursementFormCcpm ref="reimbursementFormCcpm"></ReimbursementFormCcpm>-->
   </div>
 </template>
 
@@ -208,6 +217,7 @@
     components: {
       UserSelect,
       UserSelect2
+      // ReimbursementFormCcpm
       // FlowChart
     },
     watch: {
@@ -301,6 +311,29 @@
         this.$nextTick(() => {
           this.refreshList()
         })
+      },
+      // 报销审核
+      todoCcpm (row) {
+        if (row.processDefinitionName === '报销申请') {
+          let id = row.vars.notifyId
+          let title = '报销申请审批'
+          let formUrl = '/reimbursement/ReimbursementFormCcpm'
+          this.toCenterForm(id, title, formUrl) // 跳转
+        } else {
+          this.$message.warning('此流程的跨系统审核暂未开放,请前往所属系统进行审核')
+        }
+      },
+      toCenterForm (id, title, formUrl) {
+        let backPath = '/sys/dashboard/workBench/PendingList'
+        this.$router.push({ // 跳转
+          path: '/flowable/task/CenterForm',
+          query: {
+            id: id,
+            backPath: backPath,
+            title: title,
+            formUrl: formUrl
+          }
+        })
       }
     }
   }

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1023 - 0
src/views/modules/reimbursement/ReimbursementFormCcpm.vue


+ 33 - 2
src/views/modules/sys/dashboard/workBench/Pending.vue

@@ -37,6 +37,8 @@
                   <vxe-column type="checkbox"  width="40px"></vxe-column>-->
                   <vxe-column title="实例标题" field="vars.title">
                     <template slot-scope="scope">
+                      <el-link  type="primary" :underline="false" v-if="scope.row.belongProject === 'ccpm'"
+                                @click="todoCcpm(scope.row)">{{scope.row.vars.title}}</el-link>
                       <el-link type="primary" :underline="false" v-if="scope.row.status === 'todo'"
                                @click="todo(scope.row)">{{scope.row.vars.title}}
                       </el-link>
@@ -56,8 +58,13 @@
                   </vxe-column>
                   <vxe-column title="操作" width="100px" fixed="right" align="center">
                     <template slot-scope="scope">
-                      <el-button type="text" size="small" @click="todo(scope.row)">办理</el-button>
-                      <el-button  type="text" size="small" @click="trace(scope.row)">进度</el-button>
+                      <div v-if="scope.row.belongProject === 'ccpm'">
+                        <el-button type="text" size="small" @click="todoCcpm(scope.row)">ccpm审核</el-button>
+                      </div>
+                      <div v-else>
+                        <el-button type="text" size="small" @click="todo(scope.row)">办理</el-button>
+                        <el-button  type="text" size="small" @click="trace(scope.row)">进度</el-button>
+                      </div>
                     </template>
                   </vxe-column>
                 </vxe-table>
@@ -597,6 +604,30 @@
       // 查看
       view (id) {
         this.$refs.notifyForm.init('read', id)
+      },
+      // 审核方法
+      todoCcpm (row) {
+        if (row.processDefinitionName === '报销申请') {
+          let id = row.vars.notifyId
+          let title = '报销申请审批'
+          let formUrl = '/reimbursement/ReimbursementFormCcpm'
+          this.toCenterForm(id, title, formUrl) // 跳转
+        } else {
+          this.$message.warning('此流程的跨系统审核暂未开放,请前往所属系统进行审核')
+        }
+      },
+      // 审核页面跳转
+      toCenterForm (id, title, formUrl) {
+        let backPath = '/home'
+        this.$router.push({ // 跳转
+          path: '/flowable/task/CenterForm',
+          query: {
+            id: id,
+            backPath: backPath,
+            title: title,
+            formUrl: formUrl
+          }
+        })
       }
       // resetSearch () {
       //   this.$refs.searchForm.resetFields()