Sfoglia il codice sorgente

业务提问关注功能

lizhenhao 2 anni fa
parent
commit
781a83a25a

+ 14 - 0
src/api/klgBase/questions/KlgBaseQuestionsService.js

@@ -8,6 +8,13 @@ export default class KlgBaseQuestionsService {
       params: params
     })
   }
+  listFocus (params) {
+    return request({
+      url: '/klg/questions/list_focus',
+      method: 'get',
+      params: params
+    })
+  }
   queryById (id) {
     return request({
       url: '/klg/questions/queryById',
@@ -43,4 +50,11 @@ export default class KlgBaseQuestionsService {
       data: data
     })
   }
+  focusByIds (ids) {
+    return request({
+      url: '/klg/questions/focusByIds',
+      method: 'get',
+      params: {ids: ids}
+    })
+  }
 }

+ 1 - 1
src/views/modules/finance/invoice/ProgramPageForm.vue

@@ -92,7 +92,7 @@
   export default {
     data () {
       return {
-        title: '',
+        title: '项目选择',
         method: '',
         visible: false,
         loading: false,

+ 514 - 0
src/views/modules/klgBase/questions/KlgBaseQuestionsDetailForm.vue

@@ -0,0 +1,514 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+      v-dialogDrag
+      :visible.sync="visible">
+    <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="method === 'view'"
+             label-width="120px" @submit.native.prevent>
+      <el-row  :gutter="15">
+        <el-col :span="12">
+          <el-form-item label="标题" prop="title"
+                        :rules="[
+                        {required: true, message: '标题不能为空', trigger: 'blur'},{required: true, message: '标题不能为空', trigger: 'change'}
+                 ]">
+            <el-input v-model="inputForm.title" placeholder="请填写标题" clearable></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="问题类型" prop="type"
+                        :rules="[
+                        {required: true, message: '问题类型不能为空', trigger: 'blur'},{required: true, message: '问题类型不能为空', trigger: 'change'}
+                        ]">
+            <el-select v-model="inputForm.type" placeholder="请选择问题类型" clearable style="width: 100%;">
+              <el-option
+                v-for="item in $dictUtils.getDictList('question_type')"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value">
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+<!--        项目名称-->
+        <el-col :span="12">
+          <el-form-item label="所属项目" prop="programName"
+                        :rules="[
+                 ]">
+            <el-input @focus="openProgramPageForm()" v-model="inputForm.programName" placeholder="请选择项目" clearable></el-input>
+          </el-form-item>
+        </el-col>
+<!--        选择审核人  多选-->
+        <el-col :span="12">
+          <el-form-item label="问题处理人员" prop="disposeBy"
+                        :rules="[{required: true, message: '问题处理人员不能为空', trigger: 'blur'},{required: true, message: '问题处理人员不能为空', trigger: 'change'}]"
+          >
+            <UserSelect size="medium" :disabled="method === 'view'" :readonly="true" :limit='10' :value="inputForm.disposeBy" @getValue='(value) => {inputForm.disposeBy = value}'></UserSelect>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="期望完成时间" prop="expectFinishDate"
+                        :rules="[
+                 ]">
+            <el-date-picker
+              v-model="inputForm.expectFinishDate"
+              type="date"
+              value-format="yyyy-MM-dd"
+              placeholder="选择期望完成时间"
+              style="width:100%"
+              placement="bottom-start"
+              clearable>
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="问题内容" prop="content"
+          >
+            <WangEditor ref="contentEditor" v-model="inputForm.content"
+                        @getUrl="(url, lsUrl) => {
+                        inputForm.editorFilesDTOList.push({temporaryUrl: lsUrl, url: url});
+                        }"/>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24" v-for="(item,index) in inputForm.klgBaseReplyDTOList">
+          <el-form-item :label="commonJS.isNotEmpty(item.replyName)?item.replyName+'回复:':'回复:'"
+                        :prop="'content'+index"
+          >
+            <WangEditor ref="contentEditorList" :index="index" v-model="item.content"
+                        @getUrl="getUrl"/>
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
+    <!--        附件-->
+    <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+    <ProgramPageForm ref="programPageForm" @getProgram="getProgram"></ProgramPageForm>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import UpLoadComponent from '@/views/common/UpLoadComponent'
+  import SelectUserTree from '@/views/modules/utils/treeUserSelect'
+  import SelectTree from '@/components/treeSelect/treeSelect.vue'
+  import UserSelect from '@/components/userSelect'
+  import KlgBaseQuestionsService from '@/api/klgBase/questions/KlgBaseQuestionsService'
+  import ProgramPageForm from '@/views/modules/finance/invoice/ProgramPageForm'
+  import WangEditor from '@/components/editor/WangEditor'
+  export default {
+    props: {
+      businessId: {
+        type: String,
+        default: ''
+      },
+      formReadOnly: {
+        type: Boolean,
+        default: false
+      },
+      status: {
+        type: String,
+        default: ''
+      }
+    },
+    data () {
+      return {
+        title: '',
+        method: '',
+        loading: false,
+        visible: false,
+        inputForm: {
+          title: '',
+          type: '',
+          programId: '',
+          programName: '',
+          disposeBy: '',
+          expectFinishDate: '',
+          content: '',
+          status: '',
+          procInsId: '',
+          processDefinitionId: '',
+          editorFilesDTOList: [],
+          klgBaseDisposeDTOList: [],
+          klgBaseReplyDTOList: [],
+          workAttachmentDtoList: []
+        },
+        keyWatch: ''
+      }
+    },
+    klgBaseQuestionsService: null,
+    created () {
+      this.klgBaseQuestionsService = new KlgBaseQuestionsService()
+    },
+    computed: {
+      bus: {
+        get () {
+          this.$refs.uploadComponent.setDividerName('附件')
+          // this.$refs.contentEditor.clear()
+          return this.businessId
+        },
+        set (val) {
+          this.businessId = val
+        }
+      }
+    },
+    watch: {
+      'keyWatch': {
+        handler (newVal) {
+          if (this.commonJS.isNotEmpty(this.bus)) {
+            this.init('', this.bus)
+          } else {
+            this.$nextTick(() => {
+              this.$refs.inputForm.resetFields()
+            })
+          }
+        }
+      }
+    },
+    components: {
+      SelectUserTree,
+      UpLoadComponent,
+      SelectTree,
+      UserSelect,
+      ProgramPageForm,
+      WangEditor
+    },
+    methods: {
+      getKeyWatch (keyWatch) {
+        this.keyWatch = keyWatch
+      },
+      init (method, id) {
+        this.visible = true
+        if (method === 'view') {
+          this.title = '业务提问详情'
+        }
+        this.klgBaseQuestionsService = new KlgBaseQuestionsService()
+        this.method = method
+        this.inputForm = {
+          title: '',
+          type: '',
+          programId: '',
+          programName: '',
+          disposeBy: '',
+          expectFinishDate: '',
+          content: '',
+          status: '',
+          procInsId: '',
+          processDefinitionId: '',
+          editorFilesDTOList: [],
+          klgBaseDisposeDTOList: [],
+          klgBaseReplyDTOList: [],
+          workAttachmentDtoList: []
+        }
+        this.inputForm.id = id
+        this.loading = false
+        this.$nextTick(() => {
+          this.$refs.inputForm.resetFields()
+          this.loading = true
+          this.$refs.contentEditor.clear()
+          this.klgBaseQuestionsService.queryById(this.inputForm.id).then(({data}) => {
+            // if (this.status === 'audit') {
+            //   this.$refs.contentEditor.disable()
+            // } else {
+            //   this.$refs.contentEditor.enable()
+            // }
+            this.$refs.contentEditor.disable()
+            this.$refs.uploadComponent.clearUpload()
+            this.inputForm = this.recover(this.inputForm, data)
+            this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+            if (this.commonJS.isNotEmpty(this.inputForm.content)) {
+              this.$refs.contentEditor.init(this.inputForm.content)
+            }
+            if (this.commonJS.isEmpty(this.inputForm.editorFilesDTOList)) {
+              this.inputForm.editorFilesDTOList = []
+            }
+            if (this.commonJS.isEmpty(this.inputForm.workAttachmentDtoList)) {
+              this.inputForm.workAttachmentDtoList = []
+            }
+            // if (this.formReadOnly === true && this.status === 'taskFormDetail') {
+            //   this.$refs.uploadComponent.newUpload('view', this.inputForm.workAttachmentDtoList, 'klg_questions')
+            // } else if (this.formReadOnly === true && this.status === 'audit') {
+            //   this.$refs.uploadComponent.newUpload('view', this.inputForm.workAttachmentDtoList, 'klg_questions', null, null, true, JSON.parse(localStorage.getItem('user')).name)
+            // } else if (this.formReadOnly === true && this.status !== 'audit' && this.status !== 'taskFormDetail') {
+            //   this.$refs.uploadComponent.newUpload('view', this.inputForm.workAttachmentDtoList, 'klg_questions')
+            // } else {
+            //   this.$refs.uploadComponent.newUpload('view', this.inputForm.workAttachmentDtoList, 'klg_questions', null, null, true, JSON.parse(localStorage.getItem('user')).name)
+            // }
+            this.$refs.uploadComponent.newUpload(method, this.inputForm.workAttachmentDtoList, 'klg_questions')
+            this.$nextTick(() => {
+              if (this.commonJS.isNotEmpty(this.inputForm.klgBaseReplyDTOList)) {
+                // if (this.status === 'audit') {
+                //   this.inputForm.klgBaseReplyDTOList.push({content: ''})
+                // }
+                this.inputForm.klgBaseReplyDTOList.forEach((item, index) => {
+                  // if (this.commonJS.isNotEmpty(item.content)) {
+                  //   this.$refs.contentEditorList[index].init(item.content)
+                  //   this.$refs.contentEditorList[index].disable()
+                  // }
+                  this.$refs.contentEditorList[index].init(item.content)
+                  this.$refs.contentEditorList[index].disable()
+                })
+              } else {
+                this.inputForm.klgBaseReplyDTOList = []
+                // if (this.status === 'audit') {
+                //   this.inputForm.klgBaseReplyDTOList.push({content: ''})
+                // }
+              }
+            })
+            this.loading = false
+          })
+        })
+      },
+      saveForm (callback) {
+        this.doSubmit('save', callback)
+      },
+      startForm (callback) {
+        this.doSubmit('start', callback)
+      },
+      async agreeForm (callback) {
+        await this.klgBaseQuestionsService.queryById(this.inputForm.id).then(({data}) => {
+          if (this.inputForm.procInsId !== data.procInsId) { // “procInsId”已经改变,就弹出提示
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            this.err = true
+          }
+        })
+        if (this.err === true) {
+          this.err = ''
+          throw new Error()
+        } else {
+          await this.doSubmit('agree', callback)
+        }
+      },
+      // 表单提交
+      doSubmit (status, callback) {
+        if (status === 'save') {
+          // 暂存
+          this.inputForm.status = '1'
+          this.loading = true
+          if (this.$refs.uploadComponent.checkProgress()) {
+            this.loading = false
+            return
+          }
+          this.inputForm.workAttachmentDtoList = this.$refs.uploadComponent.getDataList()
+          if (this.commonJS.isNotEmpty(this.inputForm.disposeBy)) {
+            this.inputForm.klgBaseDisposeDTOList = []
+            this.inputForm.disposeBy.split(',').forEach(item => {
+              let i = {disposeBy: item, questionId: this.inputForm.id}
+              this.inputForm.klgBaseDisposeDTOList.push(i)
+            })
+          } else {
+            this.inputForm.klgBaseDisposeDTOList = []
+          }
+          this.getEditorFilesDTOList()
+          this.getEditorFilesDTOS()
+          this.klgBaseQuestionsService.saveForm(this.inputForm).then(({data}) => {
+            this.inputForm.assignee = this.inputForm.disposeBy
+            callback(data.businessTable, data.businessId, this.inputForm)
+            this.loading = false
+          }).catch(() => {
+            this.loading = false
+          })
+          return
+        } else if (status === 'start') {
+          // 送审  待审核
+          this.inputForm.status = '2'
+        } else if (status === 'agree') {
+          // 审核同意
+          if (this.inputForm.status === '2') {
+            this.inputForm.status = '5'
+          } else if (this.inputForm.status === '5') {
+            this.inputForm.finishDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+            this.inputForm.status = '6'
+          }
+        }
+        this.$refs['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+            if (this.$refs.uploadComponent.checkProgress()) {
+              this.loading = false
+              return
+            }
+            this.inputForm.klgBaseReplyDTOList.forEach((item, index) => {
+              if (this.commonJS.isEmpty(item.content)) {
+                this.inputForm.klgBaseReplyDTOList.splice(index, 1)
+              }
+            })
+            this.inputForm.workAttachmentDtoList = this.$refs.uploadComponent.getDataList()
+            if (this.commonJS.isNotEmpty(this.inputForm.disposeBy)) {
+              this.inputForm.klgBaseDisposeDTOList = []
+              this.inputForm.disposeBy.split(',').forEach(item => {
+                let i = {disposeBy: item, questionId: this.inputForm.id}
+                this.inputForm.klgBaseDisposeDTOList.push(i)
+              })
+            } else {
+              this.inputForm.klgBaseDisposeDTOList = []
+            }
+            this.getEditorFilesDTOList()
+            this.getEditorFilesDTOS()
+            this.klgBaseQuestionsService.saveForm(this.inputForm).then(({data}) => {
+              if (this.inputForm.status === '2') {
+                this.inputForm.assignee = this.inputForm.disposeBy
+              }
+              callback(data.businessTable, data.businessId, this.inputForm)
+              this.loading = false
+            }).catch(() => {
+              this.loading = false
+            })
+          }
+        })
+      },
+      async updateStatusById (type, callback) {
+        if (await this.$refs.uploadComponent.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        }
+        await this.klgBaseQuestionsService.queryById(this.inputForm.id).then(({data}) => {
+          if (this.inputForm.procInsId !== data.procInsId) { // status的值不等于“审核中”,或者“procInsId”已经改变,就弹出提示
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            this.err = true
+          }
+        })
+        if (this.err === true) {
+          this.err = ''
+          throw new Error()
+        } else {
+          // if (type === 'agree') {
+          //   // 同意
+          //   this.inputForm.status = '5'
+          // }
+          if (type === 'reject') {
+            // 驳回
+            this.loading = true
+            if (this.$refs.uploadComponent.checkProgress()) {
+              this.loading = false
+              return
+            }
+            this.inputForm.workAttachmentDtoList = this.$refs.uploadComponent.getDataList()
+            if (this.commonJS.isNotEmpty(this.inputForm.disposeBy)) {
+              this.inputForm.klgBaseDisposeDTOList = []
+              this.inputForm.disposeBy.split(',').forEach(item => {
+                let i = {disposeBy: item, questionId: this.inputForm.id}
+                this.inputForm.klgBaseDisposeDTOList.push(i)
+              })
+            } else {
+              this.inputForm.klgBaseDisposeDTOList = []
+            }
+            this.inputForm.klgBaseReplyDTOList.forEach((item, index) => {
+              if (this.commonJS.isEmpty(item.content)) {
+                this.inputForm.klgBaseReplyDTOList.splice(index, 1)
+              }
+            })
+            if (this.inputForm.status === '2') {
+              this.inputForm.status = '4'
+            } else if (this.inputForm.status === '5') {
+              this.inputForm.status = '2'
+            }
+            this.getEditorFilesDTOList()
+            this.getEditorFilesDTOS()
+            this.klgBaseQuestionsService.saveForm(this.inputForm).then(({data}) => {
+              this.inputForm.assignee = this.inputForm.disposeBy
+              callback(data.businessTable, data.businessId, this.inputForm)
+              this.loading = false
+            }).catch(() => {
+              this.loading = false
+            })
+            return
+          }
+          if (type === 'reback') {
+            // 撤回
+            let param = {status: '3', id: this.inputForm.id}
+            this.klgBaseQuestionsService.updateStatusById(param)
+          }
+        }
+      },
+      close () {
+        this.inputForm = {
+          title: '',
+          type: '',
+          programId: '',
+          programName: '',
+          disposeBy: '',
+          expectFinishDate: '',
+          content: '',
+          status: '',
+          procInsId: '',
+          processDefinitionId: '',
+          editorFilesDTOList: [],
+          klgBaseDisposeDTOList: [],
+          klgBaseReplyDTOList: [],
+          workAttachmentDtoList: []
+        }
+        this.$refs.uploadComponent.clearUpload()
+        this.$refs.inputForm.resetFields()
+        this.$refs.contentEditor.enable()
+        this.visible = false
+      },
+      openProgramPageForm () {
+        this.$refs.programPageForm.init('1', false)
+      },
+      getProgram (rows) {
+        if (this.commonJS.isNotEmpty(rows)) {
+          this.inputForm.programId = rows[0].id // 项目id
+          this.inputForm.programName = rows[0].name // 项目名称
+        }
+      },
+      getEditorFilesDTOList () {
+        let a = []
+        // this.inputForm.content.splice('amp;', '')
+        if (this.commonJS.isNotEmpty(this.inputForm.editorFilesDTOList)) {
+          this.inputForm.editorFilesDTOList.forEach((item) => {
+            if (this.inputForm.content.includes(item.temporaryUrl)) {
+              a.push(item)
+            }
+          })
+        }
+        setTimeout(() => {
+          this.inputForm.editorFilesDTOList = []
+          a.forEach((item) => {
+            this.inputForm.editorFilesDTOList.push(item)
+          })
+        }, 200)
+      },
+      getEditorFilesDTOS () {
+        if (this.commonJS.isNotEmpty(this.inputForm.klgBaseReplyDTOList)) {
+          this.inputForm.klgBaseReplyDTOList.forEach((item, index) => {
+            let a = []
+            if (this.commonJS.isNotEmpty(item.editorFilesDTOList)) {
+              item.editorFilesDTOList.forEach((item2) => {
+                if (item.content.includes(item2.temporaryUrl)) {
+                  a.push(item)
+                }
+              })
+            }
+            setTimeout(() => {
+              this.inputForm.klgBaseReplyDTOList[index].editorFilesDTOList = []
+              a.forEach((item) => {
+                this.inputForm.klgBaseReplyDTOList[index].editorFilesDTOList.push(item)
+              })
+            }, 200)
+          })
+        }
+      },
+      getUrl (url, lsUrl, index) {
+        if (this.commonJS.isEmpty(this.inputForm.klgBaseReplyDTOList[index].editorFilesDTOList)) {
+          this.inputForm.klgBaseReplyDTOList[index].editorFilesDTOList = []
+        }
+        this.inputForm.klgBaseReplyDTOList[index].editorFilesDTOList.push({temporaryUrl: lsUrl, url: url})
+      }
+    }
+  }
+</script>
+<style scoped>
+  /deep/ .el-input-number .el-input__inner {
+    text-align: left;
+  }
+  /deep/ .w-e-text-container {
+    z-index: 1 !important;
+  }
+  /deep/ .w-e-menu {
+    z-index: 1 !important;
+  }
+  /deep/ .wtext {
+    height: 400px
+  }
+</style>

+ 410 - 0
src/views/modules/klgBase/questions/KlgBaseQuestionsFocusList.vue

@@ -0,0 +1,410 @@
+<template>
+  <div class="page">
+    <el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+      <!-- 搜索框-->
+      <el-form-item prop="title">
+        <el-input size="small" v-model="searchForm.title" placeholder="请输入标题" clearable></el-input>
+      </el-form-item>
+      <el-form-item prop="programName">
+        <el-input @focus="openProgramPageForm()" v-model="searchForm.programName" @clear="clearProgram" placeholder="请选择项目" clearable></el-input>
+      </el-form-item>
+      <el-form-item prop="status">
+        <el-select size="small" v-model="searchForm.status" placeholder="处理状态" clearable>
+          <el-option
+            v-for="item in statusList"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item prop="type">
+        <el-select size="small" v-model="searchForm.type" placeholder="问题类型" clearable style="width: 100%;">
+          <el-option
+            v-for="item in $dictUtils.getDictList('question_type')"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item prop="createDateList" label="提交时间">
+        <el-date-picker
+          size="small"
+          v-model="searchForm.createDateList"
+          type="daterange"
+          value-format="yyyy-MM-dd"
+          range-separator="至"
+          style="width: 100%  "
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          placement="bottom-start"
+          clearabl>
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" @click="refreshList()" size="small" icon="el-icon-search">查询</el-button>
+        <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
+      </el-form-item>
+    </el-form>
+    <div class="bg-white top" style="">
+      <vxe-toolbar :refresh="{query: refreshList}" custom>
+        <template #buttons>
+<!--          <el-button v-if="hasPermission('klg:question:add')" type="primary" size="small" icon="el-icon-plus" @click="start()">新建</el-button>-->
+<!--          <el-button v-if="hasPermission('klg:question:del')" type="danger"   size="small" icon="el-icon-delete" @click="del()" :disabled="$refs.questionsTable && $refs.questionsTable.getCheckboxRecords().length === 0" plain>删除</el-button>-->
+        </template>
+      </vxe-toolbar>
+      <div style="height: calc(100% - 90px)">
+        <vxe-table
+          :key="tableKey"
+          border="inner"
+          auto-resize
+          resizable
+          height="auto"
+          :loading="loading"
+          size="small"
+          ref="questionsTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          @sort-change="sortChangeHandle"
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :checkbox-config="{}">
+          <vxe-column type="seq" width="60" title="序号"></vxe-column>
+<!--          <vxe-column type="checkbox" width="40" ></vxe-column>-->
+          <vxe-column min-width="160"align="center" title="标题" field="title">
+            <template slot-scope="scope">
+              <el-link type="primary" :underline="false" v-if="hasPermission('klg:question:view')" @click="view(scope.row.id)">{{scope.row.title}}</el-link>
+              <span v-else>{{scope.row.title}}</span>
+            </template>
+          </vxe-column>
+          <vxe-column min-width="160"align="center" title="问题类型" field="type">
+            <template slot-scope="scope">
+              {{$dictUtils.getDictLabel("question_type", scope.row.type, '-')}}
+            </template>
+          </vxe-column>
+          <vxe-column min-width="160"align="center" title="所属项目" field="programName">
+            <template slot-scope="scope">
+              <el-link  type="primary" :underline="false" v-if="hasPermission('klg:question:view')" @click="viewProgram(scope.row.programId)">{{scope.row.programName}}</el-link>
+              <span v-else>{{scope.row.programName}}</span>
+            </template>
+          </vxe-column>
+          <vxe-column min-width="160"align="center" title="提交人" field="createBy.name"></vxe-column>
+          <vxe-column min-width="160"align="center" title="提交时间" field="createDate"></vxe-column>
+          <vxe-column min-width="200"align="center" title="处理人" field="disposeByName"></vxe-column>
+          <vxe-column min-width="160"align="center" title="结案时间" field="finishDate"></vxe-column>
+          <vxe-column  min-width="150px"align="center" fixed="right" title="状态" field="status" >
+            <template slot-scope="scope">
+              <el-button  type="text" @click="registeredDetail(scope.row)" effect="dark" size="mini"
+                          :type="$dictUtils.getDictLabel('questions_status_flag', scope.row.status, '-')">
+                {{$dictUtils.getDictLabel("questions_status", scope.row.status, '-')}}
+              </el-button>
+            </template>
+          </vxe-column>
+<!--          <vxe-column title="操作" width="150px" fixed="right" align="center">-->
+<!--            <template  slot-scope="scope">-->
+<!--              <el-button v-if="hasPermission('klg:question:edit')&&scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4'" type="text" icon="el-icon-edit" size="small" @click="registeredPush(scope.row)">修改</el-button>-->
+<!--              <el-button v-if="hasPermission('klg:question:edit')&&scope.row.status==='2'||scope.row.status==='5'" type="text" icon="el-icon-edit" size="small" @click="registeredReback(scope.row)">撤回</el-button>-->
+<!--              <el-button v-if="hasPermission('klg:question:del')&&scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4'" type="text"  icon="el-icon-delete" size="small" @click="del(scope.row.id)">删除</el-button>-->
+<!--            </template>-->
+<!--          </vxe-column>-->
+        </vxe-table>
+        <vxe-pager
+          background
+          size="small"
+          :current-page="tablePage.currentPage"
+          :page-size="tablePage.pageSize"
+          :total="tablePage.total"
+          :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+          :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+          @page-change="currentChangeHandle">
+        </vxe-pager>
+      </div>
+    </div>
+<!--    <KlgBaseQuestionsForm  ref="klgBaseQuestionsForm" @refreshDataList="refreshList"></KlgBaseQuestionsForm>-->
+    <ProgramPageForm ref="programPageForm" @getProgram="getProgram"></ProgramPageForm>
+    <KlgBaseQuestionsDetailForm ref="klgBaseQuestionsDetailForm"></KlgBaseQuestionsDetailForm>
+    <ProjectFormUpdate ref="projectFormUpdate"></ProjectFormUpdate>
+  </div>
+</template>
+
+<script>
+  import KlgBaseQuestionsService from '@/api/klgBase/questions/KlgBaseQuestionsService'
+  import KlgBaseQuestionsForm from './KlgBaseQuestionsForm'
+  import TaskService from '@/api/flowable/TaskService'
+  import ProcessService from '@/api/flowable/ProcessService'
+  import ProgramPageForm from '@/views/modules/finance/invoice/ProgramPageForm'
+  import pick from 'lodash.pick'
+  import KlgBaseQuestionsDetailForm from './KlgBaseQuestionsDetailForm'
+  import ProjectFormUpdate from '@/views/modules/program/registered/ProjectFormUpdate'
+  export default {
+    data () {
+      return {
+        searchForm: {
+          createDateList: [],
+          createDateBegin: '',
+          createDateEnd: '',
+          title: '',
+          programName: '',
+          status: '',
+          type: ''
+        },
+        dataList: [],
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        tableKey: '',
+        loading: false,
+        processDefinitionAuditId: '',
+        procDefAuditKey: '',
+        taskId: '',
+        statusList: [
+          {label: '未发起', value: '0'},
+          {label: '暂存', value: '1'},
+          {label: '回复中', value: '2'},
+          {label: '问题撤回', value: '3'},
+          {label: '问题驳回', value: '4'},
+          {label: '已结案', value: '6'}
+        ]
+      }
+    },
+    klgBaseQuestionsService: null,
+    taskService: null,
+    processService: null,
+    created () {
+      this.klgBaseQuestionsService = new KlgBaseQuestionsService()
+      this.taskService = new TaskService()
+      this.processService = new ProcessService()
+    },
+    components: {
+      KlgBaseQuestionsForm,
+      ProgramPageForm,
+      KlgBaseQuestionsDetailForm,
+      ProjectFormUpdate
+    },
+    computed: {
+      userName () {
+        return JSON.parse(localStorage.getItem('user')).name
+      },
+      user () {
+        this.createName = JSON.parse(localStorage.getItem('user')).name
+        return JSON.parse(localStorage.getItem('user'))
+      }
+    },
+    mounted () {
+      this.refreshList()
+    },
+    activated () {
+      this.refreshList()
+    },
+    methods: {
+      // 新增
+      add () {
+        this.$refs.klgBaseQuestionsForm.init('add', '')
+      },
+      // 修改
+      edit (id) {
+        id = id || this.$refs.questionsTable.getCheckboxRecords().map(item => {
+          return item.id
+        })[0]
+        this.$refs.klgBaseQuestionsForm.init('edit', id)
+      },
+      // 查看
+      view (id) {
+        this.$refs.klgBaseQuestionsDetailForm.init('view', id)
+      },
+      // 查看
+      viewProgram (id) {
+        this.$refs.projectFormUpdate.init('view', id)
+      },
+      // 获取数据列表
+      refreshList () {
+        this.loading = true
+        if (!this.commonJS.isEmpty(this.searchForm.createDateList)) {
+          if (!this.commonJS.isEmpty(this.searchForm.createDateList[0]) && !this.commonJS.isEmpty(this.searchForm.createDateList[1])) {
+            this.searchForm.createDateBegin = this.moment(this.searchForm.createDateList[0]).format('YYYY-MM-DD HH:mm:ss')
+            this.searchForm.createDateEnd = this.moment(this.searchForm.createDateList[1]).format('YYYY-MM-DD HH:mm:ss')
+          }
+        } else {
+          this.searchForm.createDateBegin = ''
+          this.searchForm.createDateEnd = ''
+        }
+        this.klgBaseQuestionsService.listFocus({
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm
+        }).then(({data}) => {
+          this.dataList = data.records
+          this.tablePage.total = data.total
+          this.tableKey = Math.random()
+          this.loading = false
+        })
+        this.processService.getByName('业务提问').then(({data}) => {
+          if (!this.commonJS.isEmpty(data.id)) {
+            this.processDefinitionAuditId = data.id
+            this.procDefAuditKey = data.key
+          }
+        })
+      },
+      // 当前页
+      currentChangeHandle ({ currentPage, pageSize }) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.refreshList()
+      },
+      // 排序
+      sortChangeHandle (column) {
+        this.tablePage.orders = []
+        if (column.order != null) {
+          this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
+        }
+        this.refreshList()
+      },
+      // 删除
+      del (id) {
+        let ids = id || this.$refs.questionsTable.getCheckboxRecords().map(item => {
+          return item.id
+        }).join(',')
+        this.$confirm(`确定删除所选项吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.loading = true
+          this.klgBaseQuestionsService.delete(ids).then(({data}) => {
+            this.$message.success(data)
+            this.refreshList()
+            this.loading = false
+          })
+        })
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.searchForm.programId = ''
+        this.searchForm.programName = ''
+        this.refreshList()
+      },
+      start () {
+        // 读取流程表单
+        let tabTitle = `发起流程【业务提问】`
+        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [业务提问]`
+        this.taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
+          status: 'startAndHold'}).then((data) => {
+            this.$router.push({
+              path: '/flowable/task/TaskForm',
+              query: {
+                procDefId: this.processDefinitionAuditId,
+                procDefKey: this.procDefAuditKey,
+                status: 'startAndHold',
+                title: tabTitle,
+                formType: data.data.formType,
+                formUrl: data.data.formUrl,
+                formTitle: processTitle,
+                businessId: 'false',
+                isShow: false,
+                routePath: '/klgBase/questions/KlgBaseQuestionsList'
+              }
+            })
+          })
+      },
+      // 发起业务提问
+      registeredPush (row) {
+        // 读取流程表单
+        let title = `发起流程【业务提问】`
+        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[业务提问]`
+        let status = 'startAndHold'
+        if (row.status === '3' || row.status === '4') {
+          status = 'startAndClose'
+        }
+        this.taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
+          businessId: row.id,
+          businessTable: 'klg_base_questions'}).then((data) => {
+            this.$router.push({
+              path: '/flowable/task/TaskForm',
+              query: {
+                procDefId: this.processDefinitionAuditId,
+                procDefKey: this.procDefAuditKey,
+                title: title,
+                formType: data.data.formType,
+                formUrl: data.data.formUrl,
+                formTitle: processTitle,
+                businessTable: 'klg_base_questions',
+                businessId: row.id,
+                isShow: 'false',
+                status: status,
+                routePath: '/klgBase/questions/KlgBaseQuestionsList'
+              }
+            })
+          })
+      },
+      // 查看业务提问流程结果
+      registeredDetail (row) {
+        if (row.status !== '0' && row.status !== '1') {
+          // eslint-disable-next-line eqeqeq
+          this.taskService.getTaskDef({
+            procInsId: row.procInsId,
+            procDefId: this.processDefinitionAuditId
+          }).then(({data}) => {
+            this.$router.push({
+              path: '/flowable/task/TaskFormDetail',
+              query: {
+                isShow: 'false',
+                readOnly: true,
+                title: '业务提问' + '流程详情',
+                formTitle: '业务提问' + '流程详情',
+                businessId: row.id,
+                status: 'reback',
+                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'title', 'businessId')
+              }
+            })
+          })
+        }
+      },
+      // 撤回业务提问
+      registeredReback (row) {
+        this.$confirm(`确定要撤回该申请吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(async () => {
+          await this.klgBaseQuestionsService.queryById(row.id).then(({data}) => {
+            if (row.procInsId !== data.procInsId) { // status的值不等于“审核中”,就弹出提示
+              this.$message.error('数据已发生改变或不存在,请刷新数据')
+              this.err = true
+            }
+          })
+          if (this.err === true) {
+            this.err = ''
+            this.refreshList()
+          } else {
+            this.processService.revokeProcIns(row.procInsId).then(({data}) => {
+              let form = {status: '3', id: row.id}
+              this.klgBaseQuestionsService.updateStatusById(form)
+              this.$message.success(data)
+              this.refreshList()
+            })
+          }
+        })
+      },
+      openProgramPageForm () {
+        this.$refs.programPageForm.init('1', false)
+      },
+      getProgram (rows) {
+        if (this.commonJS.isNotEmpty(rows)) {
+          this.searchForm.programId = rows[0].id // 项目id
+          this.searchForm.programName = rows[0].name // 项目名称
+        }
+      },
+      clearProgram () {
+        this.searchForm.programId = ''
+        this.searchForm.programName = ''
+      }
+    }
+  }
+</script>

+ 1 - 1
src/views/modules/klgBase/questions/KlgBaseQuestionsForm.vue

@@ -494,6 +494,6 @@
     z-index: 1 !important;
   }
   /deep/ .wtext {
-    height: 200px
+    height: 400px
   }
 </style>

+ 59 - 9
src/views/modules/klgBase/questions/KlgBaseQuestionsList.vue

@@ -9,7 +9,7 @@
         <el-input @focus="openProgramPageForm()" v-model="searchForm.programName" @clear="clearProgram" placeholder="请选择项目" clearable></el-input>
       </el-form-item>
       <el-form-item prop="status">
-        <el-select size="small" v-model="searchForm.status" placeholder="请选择问题状态" clearable>
+        <el-select size="small" v-model="searchForm.status" placeholder="处理状态" clearable>
           <el-option
             v-for="item in statusList"
             :key="item.value"
@@ -18,6 +18,16 @@
           </el-option>
         </el-select>
       </el-form-item>
+      <el-form-item prop="type">
+        <el-select size="small" v-model="searchForm.type" placeholder="问题类型" clearable style="width: 100%;">
+          <el-option
+            v-for="item in $dictUtils.getDictList('question_type')"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value">
+          </el-option>
+        </el-select>
+      </el-form-item>
       <el-form-item prop="createDateList" label="提交时间">
         <el-date-picker
           size="small"
@@ -41,6 +51,7 @@
       <vxe-toolbar :refresh="{query: refreshList}" custom>
         <template #buttons>
           <el-button v-if="hasPermission('klg:question:add')" type="primary" size="small" icon="el-icon-plus" @click="start()">新建</el-button>
+          <el-button v-if="hasPermission('klg:question:add')" type="warning" size="small" icon="el-icon-plus" :disabled="$refs.questionsTable && $refs.questionsTable.getCheckboxRecords().length === 0" @click="focusQuestions()">关注</el-button>
 <!--          <el-button v-if="hasPermission('klg:question:del')" type="danger"   size="small" icon="el-icon-delete" @click="del()" :disabled="$refs.questionsTable && $refs.questionsTable.getCheckboxRecords().length === 0" plain>删除</el-button>-->
         </template>
       </vxe-toolbar>
@@ -64,13 +75,23 @@
           :checkbox-config="{}">
           <vxe-column type="seq" width="60" title="序号"></vxe-column>
           <vxe-column type="checkbox" width="40" ></vxe-column>
-          <vxe-column min-width="160"align="center" title="标题" field="title"></vxe-column>
+          <vxe-column min-width="160"align="center" title="标题" field="title">
+            <template slot-scope="scope">
+              <el-link type="primary" :underline="false" v-if="hasPermission('klg:question:view')" @click="view(scope.row.id)">{{scope.row.title}}</el-link>
+              <span v-else>{{scope.row.title}}</span>
+            </template>
+          </vxe-column>
           <vxe-column min-width="160"align="center" title="问题类型" field="type">
             <template slot-scope="scope">
               {{$dictUtils.getDictLabel("question_type", scope.row.type, '-')}}
             </template>
           </vxe-column>
-          <vxe-column min-width="160"align="center" title="所属项目" field="programName"></vxe-column>
+          <vxe-column min-width="160"align="center" title="所属项目" field="programName">
+            <template slot-scope="scope">
+              <el-link  type="primary" :underline="false" v-if="hasPermission('klg:question:view')" @click="viewProgram(scope.row.programId)">{{scope.row.programName}}</el-link>
+              <span v-else>{{scope.row.programName}}</span>
+            </template>
+          </vxe-column>
           <vxe-column min-width="160"align="center" title="提交人" field="createBy.name"></vxe-column>
           <vxe-column min-width="160"align="center" title="提交时间" field="createDate"></vxe-column>
           <vxe-column min-width="200"align="center" title="处理人" field="disposeByName"></vxe-column>
@@ -85,9 +106,9 @@
           </vxe-column>
           <vxe-column title="操作" width="150px" fixed="right" align="center">
             <template  slot-scope="scope">
-              <el-button v-if="hasPermission('klg:question:edit')&&scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4'" type="text" icon="el-icon-edit" size="small" @click="registeredPush(scope.row)">修改</el-button>
-              <el-button v-if="hasPermission('klg:question:edit')&&scope.row.status==='2'||scope.row.status==='5'" type="text" icon="el-icon-edit" size="small" @click="registeredReback(scope.row)">撤回</el-button>
-              <el-button v-if="hasPermission('klg:question:del')&&scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4'" type="text"  icon="el-icon-delete" size="small" @click="del(scope.row.id)">删除</el-button>
+              <el-button v-if="hasPermission('klg:question:edit')&&scope.row.createBy.id === $store.state.user.id&&scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4'" type="text" icon="el-icon-edit" size="small" @click="registeredPush(scope.row)">修改</el-button>
+              <el-button v-if="hasPermission('klg:question:edit')&&scope.row.createBy.id === $store.state.user.id&&scope.row.status==='2'||scope.row.status==='5'" type="text" icon="el-icon-edit" size="small" @click="registeredReback(scope.row)">撤回</el-button>
+              <el-button v-if="hasPermission('klg:question:del')&&scope.row.createBy.id === $store.state.user.id&&scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4'" type="text"  icon="el-icon-delete" size="small" @click="del(scope.row.id)">删除</el-button>
             </template>
           </vxe-column>
         </vxe-table>
@@ -105,6 +126,8 @@
     </div>
 <!--    <KlgBaseQuestionsForm  ref="klgBaseQuestionsForm" @refreshDataList="refreshList"></KlgBaseQuestionsForm>-->
     <ProgramPageForm ref="programPageForm" @getProgram="getProgram"></ProgramPageForm>
+    <KlgBaseQuestionsDetailForm ref="klgBaseQuestionsDetailForm"></KlgBaseQuestionsDetailForm>
+    <ProjectFormUpdate ref="projectFormUpdate"></ProjectFormUpdate>
   </div>
 </template>
 
@@ -115,6 +138,8 @@
   import ProcessService from '@/api/flowable/ProcessService'
   import ProgramPageForm from '@/views/modules/finance/invoice/ProgramPageForm'
   import pick from 'lodash.pick'
+  import KlgBaseQuestionsDetailForm from './KlgBaseQuestionsDetailForm'
+  import ProjectFormUpdate from '@/views/modules/program/registered/ProjectFormUpdate'
   export default {
     data () {
       return {
@@ -124,7 +149,8 @@
           createDateEnd: '',
           title: '',
           programName: '',
-          status: ''
+          status: '',
+          type: ''
         },
         dataList: [],
         tablePage: {
@@ -158,7 +184,9 @@
     },
     components: {
       KlgBaseQuestionsForm,
-      ProgramPageForm
+      ProgramPageForm,
+      KlgBaseQuestionsDetailForm,
+      ProjectFormUpdate
     },
     computed: {
       userName () {
@@ -189,7 +217,11 @@
       },
       // 查看
       view (id) {
-        this.$refs.klgBaseQuestionsForm.init('view', id)
+        this.$refs.klgBaseQuestionsDetailForm.init('view', id)
+      },
+      // 查看
+      viewProgram (id) {
+        this.$refs.projectFormUpdate.init('view', id)
       },
       // 获取数据列表
       refreshList () {
@@ -253,6 +285,24 @@
           })
         })
       },
+      // 关注业务提问
+      focusQuestions (id) {
+        let ids = id || this.$refs.questionsTable.getCheckboxRecords().map(item => {
+          return item.id
+        }).join(',')
+        this.$confirm(`确定关注所选项吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'primary'
+        }).then(() => {
+          this.loading = true
+          this.klgBaseQuestionsService.focusByIds(ids).then(({data}) => {
+            this.$message.success(data)
+            this.refreshList()
+            this.loading = false
+          })
+        })
+      },
       resetSearch () {
         this.$refs.searchForm.resetFields()
         this.searchForm.programId = ''

+ 414 - 0
src/views/modules/klgBase/questions/KlgBaseQuestionsOwnList.vue

@@ -0,0 +1,414 @@
+<template>
+  <div class="page">
+    <el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+      <!-- 搜索框-->
+      <el-form-item prop="title">
+        <el-input size="small" v-model="searchForm.title" placeholder="请输入标题" clearable></el-input>
+      </el-form-item>
+      <el-form-item prop="programName">
+        <el-input @focus="openProgramPageForm()" v-model="searchForm.programName" @clear="clearProgram" placeholder="请选择项目" clearable></el-input>
+      </el-form-item>
+      <el-form-item prop="status">
+        <el-select size="small" v-model="searchForm.status" placeholder="处理状态" clearable>
+          <el-option
+            v-for="item in statusList"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item prop="type">
+        <el-select size="small" v-model="searchForm.type" placeholder="问题类型" clearable style="width: 100%;">
+          <el-option
+            v-for="item in $dictUtils.getDictList('question_type')"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item prop="createDateList" label="提交时间">
+        <el-date-picker
+          size="small"
+          v-model="searchForm.createDateList"
+          type="daterange"
+          value-format="yyyy-MM-dd"
+          range-separator="至"
+          style="width: 100%  "
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          placement="bottom-start"
+          clearabl>
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" @click="refreshList()" size="small" icon="el-icon-search">查询</el-button>
+        <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
+      </el-form-item>
+    </el-form>
+    <div class="bg-white top" style="">
+      <vxe-toolbar :refresh="{query: refreshList}" custom>
+        <template #buttons>
+<!--          <el-button v-if="hasPermission('klg:question:add')" type="primary" size="small" icon="el-icon-plus" @click="start()">新建</el-button>-->
+<!--          <el-button v-if="hasPermission('klg:question:del')" type="danger"   size="small" icon="el-icon-delete" @click="del()" :disabled="$refs.questionsTable && $refs.questionsTable.getCheckboxRecords().length === 0" plain>删除</el-button>-->
+        </template>
+      </vxe-toolbar>
+      <div style="height: calc(100% - 90px)">
+        <vxe-table
+          :key="tableKey"
+          border="inner"
+          auto-resize
+          resizable
+          height="auto"
+          :loading="loading"
+          size="small"
+          ref="questionsTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          @sort-change="sortChangeHandle"
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :checkbox-config="{}">
+          <vxe-column type="seq" width="60" title="序号"></vxe-column>
+<!--          <vxe-column type="checkbox" width="40" ></vxe-column>-->
+          <vxe-column min-width="160"align="center" title="标题" field="title">
+            <template slot-scope="scope">
+              <el-link type="primary" :underline="false" v-if="hasPermission('klg:question:view')" @click="view(scope.row.id)">{{scope.row.title}}</el-link>
+              <span v-else>{{scope.row.title}}</span>
+            </template>
+          </vxe-column>
+          <vxe-column min-width="160"align="center" title="问题类型" field="type">
+            <template slot-scope="scope">
+              {{$dictUtils.getDictLabel("question_type", scope.row.type, '-')}}
+            </template>
+          </vxe-column>
+          <vxe-column min-width="160"align="center" title="所属项目" field="programName">
+            <template slot-scope="scope">
+              <el-link  type="primary" :underline="false" v-if="hasPermission('klg:question:view')" @click="viewProgram(scope.row.programId)">{{scope.row.programName}}</el-link>
+              <span v-else>{{scope.row.programName}}</span>
+            </template>
+          </vxe-column>
+          <vxe-column min-width="160"align="center" title="提交人" field="createBy.name"></vxe-column>
+          <vxe-column min-width="160"align="center" title="提交时间" field="createDate"></vxe-column>
+          <vxe-column min-width="200"align="center" title="处理人" field="disposeByName"></vxe-column>
+          <vxe-column min-width="160"align="center" title="结案时间" field="finishDate"></vxe-column>
+          <vxe-column  min-width="150px"align="center" fixed="right" title="状态" field="status" >
+            <template slot-scope="scope">
+              <el-button  type="text" @click="registeredDetail(scope.row)" effect="dark" size="mini"
+                          :type="$dictUtils.getDictLabel('questions_status_flag', scope.row.status, '-')">
+                {{$dictUtils.getDictLabel("questions_status", scope.row.status, '-')}}
+              </el-button>
+            </template>
+          </vxe-column>
+<!--          <vxe-column title="操作" width="150px" fixed="right" align="center">-->
+<!--            <template  slot-scope="scope">-->
+<!--              <el-button v-if="hasPermission('klg:question:edit')&&scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4'" type="text" icon="el-icon-edit" size="small" @click="registeredPush(scope.row)">修改</el-button>-->
+<!--              <el-button v-if="hasPermission('klg:question:edit')&&scope.row.status==='2'||scope.row.status==='5'" type="text" icon="el-icon-edit" size="small" @click="registeredReback(scope.row)">撤回</el-button>-->
+<!--              <el-button v-if="hasPermission('klg:question:del')&&scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4'" type="text"  icon="el-icon-delete" size="small" @click="del(scope.row.id)">删除</el-button>-->
+<!--            </template>-->
+<!--          </vxe-column>-->
+        </vxe-table>
+        <vxe-pager
+          background
+          size="small"
+          :current-page="tablePage.currentPage"
+          :page-size="tablePage.pageSize"
+          :total="tablePage.total"
+          :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+          :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+          @page-change="currentChangeHandle">
+        </vxe-pager>
+      </div>
+    </div>
+<!--    <KlgBaseQuestionsForm  ref="klgBaseQuestionsForm" @refreshDataList="refreshList"></KlgBaseQuestionsForm>-->
+    <ProgramPageForm ref="programPageForm" @getProgram="getProgram"></ProgramPageForm>
+    <KlgBaseQuestionsDetailForm ref="klgBaseQuestionsDetailForm"></KlgBaseQuestionsDetailForm>
+    <ProjectFormUpdate ref="projectFormUpdate"></ProjectFormUpdate>
+  </div>
+</template>
+
+<script>
+  import KlgBaseQuestionsService from '@/api/klgBase/questions/KlgBaseQuestionsService'
+  import KlgBaseQuestionsForm from './KlgBaseQuestionsForm'
+  import TaskService from '@/api/flowable/TaskService'
+  import ProcessService from '@/api/flowable/ProcessService'
+  import ProgramPageForm from '@/views/modules/finance/invoice/ProgramPageForm'
+  import pick from 'lodash.pick'
+  import KlgBaseQuestionsDetailForm from './KlgBaseQuestionsDetailForm'
+  import ProjectFormUpdate from '@/views/modules/program/registered/ProjectFormUpdate'
+  export default {
+    data () {
+      return {
+        searchForm: {
+          createDateList: [],
+          createDateBegin: '',
+          createDateEnd: '',
+          title: '',
+          programName: '',
+          status: '',
+          createBy: {
+            id: ''
+          },
+          type: ''
+        },
+        dataList: [],
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        tableKey: '',
+        loading: false,
+        processDefinitionAuditId: '',
+        procDefAuditKey: '',
+        taskId: '',
+        statusList: [
+          {label: '未发起', value: '0'},
+          {label: '暂存', value: '1'},
+          {label: '回复中', value: '2'},
+          {label: '问题撤回', value: '3'},
+          {label: '问题驳回', value: '4'},
+          {label: '已结案', value: '6'}
+        ]
+      }
+    },
+    klgBaseQuestionsService: null,
+    taskService: null,
+    processService: null,
+    created () {
+      this.klgBaseQuestionsService = new KlgBaseQuestionsService()
+      this.taskService = new TaskService()
+      this.processService = new ProcessService()
+    },
+    components: {
+      KlgBaseQuestionsForm,
+      ProgramPageForm,
+      KlgBaseQuestionsDetailForm,
+      ProjectFormUpdate
+    },
+    computed: {
+      userName () {
+        return JSON.parse(localStorage.getItem('user')).name
+      },
+      user () {
+        this.createName = JSON.parse(localStorage.getItem('user')).name
+        return JSON.parse(localStorage.getItem('user'))
+      }
+    },
+    mounted () {
+      this.refreshList()
+    },
+    activated () {
+      this.refreshList()
+    },
+    methods: {
+      // 新增
+      add () {
+        this.$refs.klgBaseQuestionsForm.init('add', '')
+      },
+      // 修改
+      edit (id) {
+        id = id || this.$refs.questionsTable.getCheckboxRecords().map(item => {
+          return item.id
+        })[0]
+        this.$refs.klgBaseQuestionsForm.init('edit', id)
+      },
+      // 查看
+      view (id) {
+        this.$refs.klgBaseQuestionsDetailForm.init('view', id)
+      },
+      // 查看
+      viewProgram (id) {
+        this.$refs.projectFormUpdate.init('view', id)
+      },
+      // 获取数据列表
+      refreshList () {
+        this.loading = true
+        if (!this.commonJS.isEmpty(this.searchForm.createDateList)) {
+          if (!this.commonJS.isEmpty(this.searchForm.createDateList[0]) && !this.commonJS.isEmpty(this.searchForm.createDateList[1])) {
+            this.searchForm.createDateBegin = this.moment(this.searchForm.createDateList[0]).format('YYYY-MM-DD HH:mm:ss')
+            this.searchForm.createDateEnd = this.moment(this.searchForm.createDateList[1]).format('YYYY-MM-DD HH:mm:ss')
+          }
+        } else {
+          this.searchForm.createDateBegin = ''
+          this.searchForm.createDateEnd = ''
+        }
+        this.searchForm.createBy.id = this.$store.state.user.id
+        this.klgBaseQuestionsService.list({
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm
+        }).then(({data}) => {
+          this.dataList = data.records
+          this.tablePage.total = data.total
+          this.tableKey = Math.random()
+          this.loading = false
+        })
+        this.processService.getByName('业务提问').then(({data}) => {
+          if (!this.commonJS.isEmpty(data.id)) {
+            this.processDefinitionAuditId = data.id
+            this.procDefAuditKey = data.key
+          }
+        })
+      },
+      // 当前页
+      currentChangeHandle ({ currentPage, pageSize }) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.refreshList()
+      },
+      // 排序
+      sortChangeHandle (column) {
+        this.tablePage.orders = []
+        if (column.order != null) {
+          this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
+        }
+        this.refreshList()
+      },
+      // 删除
+      del (id) {
+        let ids = id || this.$refs.questionsTable.getCheckboxRecords().map(item => {
+          return item.id
+        }).join(',')
+        this.$confirm(`确定删除所选项吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.loading = true
+          this.klgBaseQuestionsService.delete(ids).then(({data}) => {
+            this.$message.success(data)
+            this.refreshList()
+            this.loading = false
+          })
+        })
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.searchForm.programId = ''
+        this.searchForm.programName = ''
+        this.refreshList()
+      },
+      start () {
+        // 读取流程表单
+        let tabTitle = `发起流程【业务提问】`
+        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [业务提问]`
+        this.taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
+          status: 'startAndHold'}).then((data) => {
+            this.$router.push({
+              path: '/flowable/task/TaskForm',
+              query: {
+                procDefId: this.processDefinitionAuditId,
+                procDefKey: this.procDefAuditKey,
+                status: 'startAndHold',
+                title: tabTitle,
+                formType: data.data.formType,
+                formUrl: data.data.formUrl,
+                formTitle: processTitle,
+                businessId: 'false',
+                isShow: false,
+                routePath: '/klgBase/questions/KlgBaseQuestionsList'
+              }
+            })
+          })
+      },
+      // 发起业务提问
+      registeredPush (row) {
+        // 读取流程表单
+        let title = `发起流程【业务提问】`
+        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[业务提问]`
+        let status = 'startAndHold'
+        if (row.status === '3' || row.status === '4') {
+          status = 'startAndClose'
+        }
+        this.taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
+          businessId: row.id,
+          businessTable: 'klg_base_questions'}).then((data) => {
+            this.$router.push({
+              path: '/flowable/task/TaskForm',
+              query: {
+                procDefId: this.processDefinitionAuditId,
+                procDefKey: this.procDefAuditKey,
+                title: title,
+                formType: data.data.formType,
+                formUrl: data.data.formUrl,
+                formTitle: processTitle,
+                businessTable: 'klg_base_questions',
+                businessId: row.id,
+                isShow: 'false',
+                status: status,
+                routePath: '/klgBase/questions/KlgBaseQuestionsList'
+              }
+            })
+          })
+      },
+      // 查看业务提问流程结果
+      registeredDetail (row) {
+        if (row.status !== '0' && row.status !== '1') {
+          // eslint-disable-next-line eqeqeq
+          this.taskService.getTaskDef({
+            procInsId: row.procInsId,
+            procDefId: this.processDefinitionAuditId
+          }).then(({data}) => {
+            this.$router.push({
+              path: '/flowable/task/TaskFormDetail',
+              query: {
+                isShow: 'false',
+                readOnly: true,
+                title: '业务提问' + '流程详情',
+                formTitle: '业务提问' + '流程详情',
+                businessId: row.id,
+                status: 'reback',
+                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'title', 'businessId')
+              }
+            })
+          })
+        }
+      },
+      // 撤回业务提问
+      registeredReback (row) {
+        this.$confirm(`确定要撤回该申请吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(async () => {
+          await this.klgBaseQuestionsService.queryById(row.id).then(({data}) => {
+            if (row.procInsId !== data.procInsId) { // status的值不等于“审核中”,就弹出提示
+              this.$message.error('数据已发生改变或不存在,请刷新数据')
+              this.err = true
+            }
+          })
+          if (this.err === true) {
+            this.err = ''
+            this.refreshList()
+          } else {
+            this.processService.revokeProcIns(row.procInsId).then(({data}) => {
+              let form = {status: '3', id: row.id}
+              this.klgBaseQuestionsService.updateStatusById(form)
+              this.$message.success(data)
+              this.refreshList()
+            })
+          }
+        })
+      },
+      openProgramPageForm () {
+        this.$refs.programPageForm.init('1', false)
+      },
+      getProgram (rows) {
+        if (this.commonJS.isNotEmpty(rows)) {
+          this.searchForm.programId = rows[0].id // 项目id
+          this.searchForm.programName = rows[0].name // 项目名称
+        }
+      },
+      clearProgram () {
+        this.searchForm.programId = ''
+        this.searchForm.programName = ''
+      }
+    }
+  }
+</script>