Browse Source

流程管理

master
xuhuajiao 10 months ago
parent
commit
bb0c322747
  1. 12
      src/api/archivesManage/library.js
  2. 4
      src/views/components/category/PreviewForm.vue
  3. 2
      src/views/system/processManage/runningProcess/index.vue
  4. 110
      src/views/system/processManage/runningProcess/module/businessDetails/index.vue
  5. 41
      src/views/system/processManage/runningProcess/module/detail.vue
  6. 2
      src/views/system/processManage/runningProcess/module/taskList/index.vue
  7. 6
      src/views/system/user/processCenter/index.vue
  8. 119
      src/views/system/user/processCenter/module/form.vue

12
src/api/archivesManage/library.js

@ -65,6 +65,15 @@ export function FetchBase64ByFileId(params) {
}) })
} }
// 利用流程确定
export function FetchUtilizeConfirm(data) {
return request({
url: 'api/control/utilizeConfirm',
method: 'post',
data: data
})
}
export default { export default {
FetchInitContorlView, FetchInitContorlView,
FetchPrintData, FetchPrintData,
@ -73,5 +82,6 @@ export default {
FetchBusinessFlowDetails, FetchBusinessFlowDetails,
FetchMainData, FetchMainData,
FetchIsAuthByLookType, FetchIsAuthByLookType,
FetchBase64ByFileId
FetchBase64ByFileId,
FetchUtilizeConfirm
} }

4
src/views/components/category/PreviewForm.vue

@ -581,7 +581,7 @@ export default {
if (val.fondsNo) { if (val.fondsNo) {
this.addOrUpdateForm[this.treeCurrentFiled.fieldName] = val.fondsName this.addOrUpdateForm[this.treeCurrentFiled.fieldName] = val.fondsName
} else if (val.name) { } else if (val.name) {
this.addOrUpdateForm[this.treeCurrentFiled.fieldName] = val.name
this.addOrUpdateForm[this.treeCurrentFiled.fieldName] = val.code
} else { } else {
this.addOrUpdateForm[this.treeCurrentFiled.fieldName] = val.dictionaryName this.addOrUpdateForm[this.treeCurrentFiled.fieldName] = val.dictionaryName
} }
@ -630,7 +630,7 @@ export default {
if (this.isTableType === 1) { if (this.isTableType === 1) {
this.addOrUpdateForm[this.currentFieldName] = val[0].fondsNo this.addOrUpdateForm[this.currentFieldName] = val[0].fondsNo
} else if (this.isTableType === 2 && this.isDesFormType !== 'prearchiveLibrary') { } else if (this.isTableType === 2 && this.isDesFormType !== 'prearchiveLibrary') {
this.addOrUpdateForm[this.currentFieldName] = val[0].name
this.addOrUpdateForm[this.currentFieldName] = val[0].code
} else { } else {
this.addOrUpdateForm[this.currentFieldName] = val[0].dictionaryName this.addOrUpdateForm[this.currentFieldName] = val[0].dictionaryName
} }

2
src/views/system/processManage/runningProcess/index.vue

@ -147,9 +147,11 @@ export default {
}, },
// table - // table -
tableDoubleClick(row) { tableDoubleClick(row) {
console.log(111)
this.$refs.processDetail.detailVisible = true this.$refs.processDetail.detailVisible = true
this.$refs.processDetail.selectRow = row this.$refs.processDetail.selectRow = row
this.$refs.processDetail.activeIndex = 0 this.$refs.processDetail.activeIndex = 0
this.$refs.processDetail.getBusinessFlowDetails()
} }
} }
} }

110
src/views/system/processManage/runningProcess/module/businessDetails/index.vue

@ -2,11 +2,48 @@
<div> <div>
<el-table :data="tableData" style="width: 100%" height="300" @cell-dblclick="tableDoubleClick"> <el-table :data="tableData" style="width: 100%" height="300" @cell-dblclick="tableDoubleClick">
<el-table-column type="index" align="center" width="55" /> <el-table-column type="index" align="center" width="55" />
<el-table-column prop="groups" label="所属全宗" />
<el-table-column prop="name" label="门类名称" />
<el-table-column prop="type" label="整理方式" />
<el-table-column prop="number" label="项目号/档号" />
<el-table-column prop="title" label="题名" :show-overflow-tooltip="true" />
<el-table-column prop="fondsName" label="所属全宗" min-width="120" />
<el-table-column prop="categoryName" label="门类名称" min-width="120" />
<el-table-column prop="categoryLevel" label="整理方式">
<template slot-scope="scope">
<span>{{ scope.row.categoryLevel === 2 ? '案卷整理' : '按件整理' }}</span>
</template>
</el-table-column>
<el-table-column prop="archiveNo" label="项目号/档号" min-width="200" />
<el-table-column prop="maintitle" label="题名" min-width="200" />
<el-table-column v-if="isUtilize" prop="utilizeType" label="利用方式" width="300">
<template slot-scope="scope">
<el-checkbox-group v-model="scope.row.utilizeType" class="checkbox-style">
<el-checkbox v-for="item in uselist" :key="item.value" :label="item.value" disabled>{{ item.label }}</el-checkbox>
</el-checkbox-group>
</template>
</el-table-column>
<el-table-column v-if="isUtilize" prop="utilizeState" label="实体借阅状态" align="center" width="160">
<template slot-scope="scope">
<el-select
v-if="isFlowableForm"
v-model="scope.row.utilizeState"
placeholder="请选择"
style="width: 140px;"
@change="handleChange(scope.row.archivesId,$event)"
>
<el-option
v-for="item in utilizeStateOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<div v-else>
<!-- 实体利用状态 -1.未确认流程(未审批) 0.无需借阅 1.同意借阅 2.不允许借阅 3.已归还 -->
<span v-if="scope.row.utilizeState === -1" class="row-state soon-state">审批中</span>
<span v-if="scope.row.utilizeState === 0" class="row-state end-state">无需借阅</span>
<span v-if="scope.row.utilizeState === 1" class="row-state end-state">同意借阅</span>
<span v-if="scope.row.utilizeState === 2" class="row-state cancel-state">不允许借阅</span>
<span v-if="scope.row.utilizeState === 3" class="row-state end-state">已归还</span>
</div>
</template>
</el-table-column>
</el-table> </el-table>
<!-- @size-change="sizeChangeHandler($event)" @current-change="pageChangeHandler" --> <!-- @size-change="sizeChangeHandler($event)" @current-change="pageChangeHandler" -->
<el-pagination :page-size.sync="page.size" :total="page.total" :current-page.sync="page.page" style="margin-top: 8px;" layout="total, prev, pager, next, sizes" /> <el-pagination :page-size.sync="page.size" :total="page.total" :current-page.sync="page.page" style="margin-top: 8px;" layout="total, prev, pager, next, sizes" />
@ -16,9 +53,24 @@
<script> <script>
import ArchivesInfo from '@/views/components/archivesDetail/detail' import ArchivesInfo from '@/views/components/archivesDetail/detail'
export default { export default {
name: 'BusinessDetails', name: 'BusinessDetails',
components: { ArchivesInfo }, components: { ArchivesInfo },
props: {
tableData: {
type: Array,
default: null
},
isUtilize: {
type: Boolean,
default: false
},
isFlowableForm: {
type: Boolean,
default: false
}
},
data() { data() {
return { return {
page: { page: {
@ -27,18 +79,50 @@ export default {
page: 1 page: 1
}, },
categoryId: null, categoryId: null,
arcId: '',
isTitleType: 3, isTitleType: 3,
arcId: null,
tableData: [{
groups: '全宗A',
name: '文书档案(项目)',
type: '按件整理',
number: 'DAS-Y-2020-001',
title: '人事劳资文件级文书档案'
}]
uselist: [
{
value: 1,
label: '电子查看'
},
{
value: 2,
label: '下载'
},
{
value: 3,
label: '打印'
},
{
value: 4,
label: '实体借阅'
}
],
utilizeStateOptions: [
{
value: -1,
label: '请选择'
},
{
value: 0,
label: '无需借阅'
},
{
value: 1,
label: '同意借阅'
},
{
value: 2,
label: '不允许借阅'
}
]
} }
}, },
methods: { methods: {
handleChange(id, value) {
this.$emit('select-change', { id, value })
},
// table - // table -
tableDoubleClick(row) { tableDoubleClick(row) {
// this.$refs.archivesDetail.archivesInfoVisible = true // this.$refs.archivesDetail.archivesInfoVisible = true

41
src/views/system/processManage/runningProcess/module/detail.vue

@ -59,7 +59,7 @@
<li :class="{'active-tab-nav': activeIndex == 2 }" @click="changeActiveTab(2)">流程图</li> <li :class="{'active-tab-nav': activeIndex == 2 }" @click="changeActiveTab(2)">流程图</li>
</ul> </ul>
<div v-if="activeIndex == 0" class="double-click-btn"><i class="iconfont icon-zhuyi-lan" /><span>双击列表数据查看详情</span></div> <div v-if="activeIndex == 0" class="double-click-btn"><i class="iconfont icon-zhuyi-lan" /><span>双击列表数据查看详情</span></div>
<component :is="comName" class="component-cont" :src-img="srcImg" :task-table-list="taskTableList" />
<component :is="comName" class="component-cont" :table-data="tableData" :src-img="srcImg" :task-table-list="taskTableList" :is-utilize="isUtilize" />
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="detailVisible=false">确定</el-button> <el-button type="primary" @click="detailVisible=false">确定</el-button>
@ -70,6 +70,7 @@
<script> <script>
import { FetchGenProcessDiagram, FetchTaskByProcinstId } from '@/api/system/flowable' import { FetchGenProcessDiagram, FetchTaskByProcinstId } from '@/api/system/flowable'
import { FetchBusinessFlowDetails } from '@/api/archivesManage/library'
import processImg from './processImg/index' import processImg from './processImg/index'
import businessDetails from './businessDetails/index' import businessDetails from './businessDetails/index'
import taskList from './taskList/index' import taskList from './taskList/index'
@ -99,7 +100,9 @@ export default {
activeIndex: 0, activeIndex: 0,
selectRow: {}, selectRow: {},
srcImg: '', srcImg: '',
taskTableList: []
taskTableList: [],
tableData: [],
isUtilize: false
} }
}, },
computed: { computed: {
@ -113,16 +116,48 @@ export default {
} }
return 'businessDetails' return 'businessDetails'
} }
},
mounted() {
}, },
methods: { methods: {
changeActiveTab(data) { changeActiveTab(data) {
this.activeIndex = data this.activeIndex = data
if (this.activeIndex === 1) {
if (this.activeIndex === 0) {
this.getBusinessFlowDetails()
} else if (this.activeIndex === 1) {
this.getTaskByProcinstId() this.getTaskByProcinstId()
} else if (this.activeIndex === 2) { } else if (this.activeIndex === 2) {
this.getProcessImg() this.getProcessImg()
} }
}, },
getBusinessFlowDetails() {
const params = {
'businessId': (this.selectRow && this.selectRow.businessId) ? this.selectRow.businessId : this.selectRow.id
}
FetchBusinessFlowDetails(params).then((res) => {
if (res.code !== 500) {
console.log(res)
this.baseInfo = res.businessFlow
if (res.businessFlow.businessType === 5) {
this.isUtilize = true
res.details.forEach(item => {
item.utilizeType = item.utilizeType.split(',').map(Number)
})
} else {
this.isUtilize = false
res.details.forEach(item => {
item.utilizeType = []
})
}
this.tableData = res.details
} else {
this.$message({ message: '获取数据失败', type: 'error', offset: 8 })
}
}).catch(err => {
console.log(err)
})
},
getProcessImg() { getProcessImg() {
this.srcImg = '' this.srcImg = ''
FetchGenProcessDiagram({ 'processId': this.selectRow.procInstId }).then((res) => { FetchGenProcessDiagram({ 'processId': this.selectRow.procInstId }).then((res) => {

2
src/views/system/processManage/runningProcess/module/taskList/index.vue

@ -8,7 +8,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="name" label="任务名称" align="center" /> <el-table-column prop="name" label="任务名称" align="center" />
<el-table-column prop="assignee" label="执行人" align="center" />
<el-table-column prop="nickName" label="执行人" align="center" />
<el-table-column prop="message" label="执行意见" align="center" /> <el-table-column prop="message" label="执行意见" align="center" />
<el-table-column prop="startTime" label="创建时间" width="160" align="center"> <el-table-column prop="startTime" label="创建时间" width="160" align="center">
<template slot-scope="scope"> <template slot-scope="scope">

6
src/views/system/user/processCenter/index.vue

@ -80,7 +80,7 @@
</el-table> </el-table>
<pagination /> <pagination />
</div> </div>
<eForm ref="eForm" />
<eForm ref="eForm" @refresh="crud.refresh" />
<detial ref="processDetail" :is-center-process="true" /> <detial ref="processDetail" :is-center-process="true" />
</div> </div>
</template> </template>
@ -92,6 +92,7 @@ import CRUD, { presenter, header, crud } from '@crud/crud'
import pagination from '@crud/Pagination' import pagination from '@crud/Pagination'
import eForm from './module/form.vue' import eForm from './module/form.vue'
import detial from '@/views/system/processManage/runningProcess/module/detail' import detial from '@/views/system/processManage/runningProcess/module/detail'
export default { export default {
name: 'ProcessCenter', name: 'ProcessCenter',
components: { DateRangePicker, pagination, eForm, detial }, components: { DateRangePicker, pagination, eForm, detial },
@ -187,12 +188,15 @@ export default {
dealWithCont(row) { dealWithCont(row) {
this.$refs.eForm.formVisible = true this.$refs.eForm.formVisible = true
this.$refs.eForm.selectRow = row this.$refs.eForm.selectRow = row
this.$refs.eForm.activeIndex = 0
this.$refs.eForm.getBusinessFlowDetails()
}, },
// table - // table -
tableDoubleClick(row) { tableDoubleClick(row) {
this.$refs.processDetail.detailVisible = true this.$refs.processDetail.detailVisible = true
this.$refs.processDetail.selectRow = row this.$refs.processDetail.selectRow = row
this.$refs.processDetail.activeIndex = 0 this.$refs.processDetail.activeIndex = 0
this.$refs.processDetail.getBusinessFlowDetails()
}, },
clickRowHandler(row) { clickRowHandler(row) {
// this.$refs.table.clearSelection() // this.$refs.table.clearSelection()

119
src/views/system/user/processCenter/module/form.vue

@ -10,20 +10,20 @@
</div> </div>
<div v-if="activeIndex == 0"> <div v-if="activeIndex == 0">
<div class="detail-info"> <div class="detail-info">
<p><span>流程名称</span>{{ selectRow && selectRow.title }}</p>
<p style="width: 60%;"><span>流程名称</span>{{ selectRow && selectRow.title }}</p>
<p><span>启动时间</span>{{ selectRow && selectRow.createTime | parseTime }}</p> <p><span>启动时间</span>{{ selectRow && selectRow.createTime | parseTime }}</p>
<p><span>实例ID</span>{{ selectRow && selectRow.procInstId }}</p>
<p style="width: 60%;"><span>实例ID</span>{{ selectRow && selectRow.procInstId }}</p>
<p><span>发起人</span>{{ selectRow && selectRow.createBy }}</p> <p><span>发起人</span>{{ selectRow && selectRow.createBy }}</p>
</div> </div>
<div class="detail-list"> <div class="detail-list">
<p><span>业务类型</span>归档审批</p> <p><span>业务类型</span>归档审批</p>
<p><span>原始位置</span>全宗A-整理库-门类A</p>
<p><span>目标位置</span>全宗A-整理库-门类A</p>
<p><span>原始位置</span>-</p>
<p><span>目标位置</span>-</p>
<p><span>赋权类型</span>-</p> <p><span>赋权类型</span>-</p>
<p><span>起始时间</span>-</p> <p><span>起始时间</span>-</p>
<p><span>终止时间</span>-</p> <p><span>终止时间</span>-</p>
<p><span>利用目的</span>-</p>
<p><span>利用次数</span>-</p>
<p><span>利用目的</span>{{ baseInfo && baseInfo.borrowReason }}</p>
<!-- <p><span>利用次数</span>-</p> -->
</div> </div>
<div class="opinion"> <div class="opinion">
<!-- <h5>归档审批</h5> --> <!-- <h5>归档审批</h5> -->
@ -37,10 +37,10 @@
</el-form> </el-form>
</div> </div>
</div> </div>
<businessDetails />
<businessDetails :table-data="tableData" :is-utilize="isUtilize" :is-flowable-form="true" @select-change="handleSelectChange" />
</div> </div>
<div v-if="activeIndex == 1" class="detail-img"> <div v-if="activeIndex == 1" class="detail-img">
<img src="~@/assets/images/system/process-img.png" alt="">
<img :src="'data:image/jpeg;base64,'+ srcImg" alt="" :onerror="defaultImg">
</div> </div>
<!-- <div v-if="activeIndex == 2"> <!-- <div v-if="activeIndex == 2">
<div class="detail-list"> <div class="detail-list">
@ -65,6 +65,9 @@
<script> <script>
import { FetchBecomeDocumentConfirm } from '@/api/collect/collect' import { FetchBecomeDocumentConfirm } from '@/api/collect/collect'
// import { FetchUtilizeConfirm } from '@/api/archivesManage/library'
import { FetchGenProcessDiagram } from '@/api/system/flowable'
import { FetchBusinessFlowDetails, FetchUtilizeConfirm } from '@/api/archivesManage/library'
import businessDetails from '@/views/system/processManage/runningProcess/module/businessDetails/index.vue' import businessDetails from '@/views/system/processManage/runningProcess/module/businessDetails/index.vue'
export default { export default {
name: 'Form', name: 'Form',
@ -78,7 +81,13 @@ export default {
form: { form: {
opinion: null opinion: null
}, },
selectRow: null
selectRow: null,
srcImg: '',
defaultImg: 'this.src="' + require('@/assets/images/system/default-img.jpg') + '"',
tableData: [],
baseInfo: null,
isUtilize: false,
selectedValues: {}
} }
}, },
computed: { computed: {
@ -86,19 +95,97 @@ export default {
methods: { methods: {
changeActiveTab(data) { changeActiveTab(data) {
this.activeIndex = data this.activeIndex = data
if (data === 1) {
this.getProcessImg()
} else {
this.getBusinessFlowDetails()
}
},
getProcessImg() {
this.srcImg = ''
FetchGenProcessDiagram({ 'processId': this.selectRow.procInstId }).then((res) => {
this.srcImg = res
}).catch(err => {
console.log(err)
})
},
handleSelectChange({ id, value }) {
if (value === -1) {
this.$message.error('请选择有效实体借阅状态!')
}
this.$set(this.selectedValues, id, value)
},
getBusinessFlowDetails() {
const params = {
'businessId': this.selectRow.id
}
FetchBusinessFlowDetails(params).then((res) => {
if (res.code !== 500) {
console.log(res)
this.baseInfo = res.businessFlow
if (this.selectRow.businessType === 5) {
this.isUtilize = true
res.details.forEach(item => {
item.utilizeType = item.utilizeType.split(',').map(Number)
})
} else {
this.isUtilize = false
res.details.forEach(item => {
item.utilizeType = []
})
}
this.tableData = res.details
this.tableData.forEach(item => {
this.$set(this.selectedValues, item.archivesId, item.utilizeState)
})
} else {
this.$message({ message: '获取数据失败', type: 'error', offset: 8 })
}
}).catch(err => {
console.log(err)
})
}, },
submitOpinion(type) { submitOpinion(type) {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
if (this.selectRow.businessType === 5) {
if (Object.keys(this.selectedValues).length === 0) {
this.$message.error('请选择有效实体借阅状态!')
return false
} else {
const hasInvalidSelection = Object.values(this.selectedValues).some(value => value === -1)
if (hasInvalidSelection) {
this.$message.error('请选择有效实体借阅状态!')
return false
}
}
}
const params = { const params = {
'id': this.selectRow.id, 'id': this.selectRow.id,
'isPass': type, 'isPass': type,
'opinion': this.form.opinion
'opinion': this.form.opinion,
'map': this.selectedValues
} }
console.log(params) console.log(params)
if (this.selectRow.businessType === 1) { if (this.selectRow.businessType === 1) {
FetchBecomeDocumentConfirm(params).then((res) => { FetchBecomeDocumentConfirm(params).then((res) => {
console.log(res)
if (res.code !== 500) {
this.$message({ message: '操作提交成功', type: 'success', offset: 8 })
} else {
this.$message({ message: '操作提交失败', type: 'error', offset: 8 })
}
this.closedDialog()
}).catch(err => {
console.log(err)
})
} else if (this.selectRow.businessType === 5) {
FetchUtilizeConfirm(params).then((res) => {
if (res.code !== 500) {
this.$message({ message: '操作提交成功', type: 'success', offset: 8 })
} else {
this.$message({ message: '操作提交失败', type: 'error', offset: 8 })
}
this.closedDialog()
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
}) })
@ -107,8 +194,14 @@ export default {
return false return false
} }
}) })
},
closedDialog() {
this.formVisible = false
this.form.opinion = null
this.$emit('refresh')
} }
} }
} }
</script> </script>
@ -125,7 +218,7 @@ export default {
color: #545B65; color: #545B65;
background-color: #F6F8FC; background-color: #F6F8FC;
p{ p{
width: 50%;
width: 40%;
span{ span{
display: inline-block; display: inline-block;
width: 75px; width: 75px;
@ -165,7 +258,7 @@ export default {
overflow-y: scroll; overflow-y: scroll;
img{ img{
display: block; display: block;
width: 100%;
// width: 100%;
} }
} }
.detail-list{ .detail-list{

Loading…
Cancel
Save