489 lines
20 KiB
Vue
489 lines
20 KiB
Vue
<template>
|
|
<div class="bzdyStep7">
|
|
<!-- 标准调研流程-->
|
|
<ProcessHeader toggle>
|
|
<template slot="proName">标准调研流程</template>
|
|
<template slot="proNode">责任部门对接人及标准法规部部长审核</template>
|
|
</ProcessHeader>
|
|
<div class="headerTabs">
|
|
<div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div>
|
|
<div class="headerTabsItem" :class="active === '2' ? 'active' : ''" @click="handleTabs('2')">审批历史</div>
|
|
</div>
|
|
<div class="content" v-show="active === '1'">
|
|
<div style="flex: auto; overflow: auto;">
|
|
<el-form
|
|
ref="qbkwForm"
|
|
:model="form"
|
|
:rules="formRules"
|
|
class="label-input-form"
|
|
label-width="210px"
|
|
>
|
|
<ProcessTitle>
|
|
<template slot="title">基础信息</template>
|
|
</ProcessTitle>
|
|
<el-collapse-transition>
|
|
<div class="prc-content-border" v-if="foldFormFlag === false">
|
|
<el-row :gutter="24">
|
|
<el-col :span="12">
|
|
<el-form-item label="调研标题" prop="title" class="add-form-item form-item-disabled">
|
|
<el-input
|
|
disabled
|
|
v-model="form.title"
|
|
placeholder="请输入调研标题"
|
|
clearable
|
|
></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="完成时间" prop="date" class="add-form-item form-item-disabled">
|
|
<el-date-picker
|
|
disabled
|
|
v-model="form.date"
|
|
type="date"
|
|
placeholder="请选择完成时间">
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
<el-form-item label="汇总调研结果" prop="hzfileId" class="add-form-item form-item-disabled">
|
|
<div v-if="form.hzfileName" class="fileClass">
|
|
<span @click="clickButtonToUpload2(form.hzfileId)">{{ form.hzfileName }}</span>
|
|
<el-button
|
|
size="small"
|
|
@click="updateFile(form.hzfileId)"
|
|
icon="el-icon-download"
|
|
style="height: 32px; margin-left: 5px;"
|
|
></el-button>
|
|
</div>
|
|
<div v-else>
|
|
- -
|
|
</div>
|
|
</el-form-item>
|
|
<!-- <el-form-item label="审核意见" prop="textsh" class="add-form-item form-item-disabled">-->
|
|
<!-- <el-input-->
|
|
<!-- v-model="form.textsh"-->
|
|
<!-- placeholder="请输入审核意见"-->
|
|
<!-- clearable-->
|
|
<!-- ></el-input>-->
|
|
<!-- </el-form-item>-->
|
|
</el-col>
|
|
</el-row>
|
|
</div>
|
|
</el-collapse-transition>
|
|
<el-button v-if="foldFormFlag === false" style="width: 100%" icon="el-icon-caret-top" @click="foldForm">隐藏基础信息</el-button>
|
|
<el-button v-if="foldFormFlag === true" style="width: 100%" icon="el-icon-caret-bottom" @click="foldForm">展开基础信息</el-button>
|
|
</el-form>
|
|
<ProcessTitle>
|
|
<template slot="title">调研信息</template>
|
|
</ProcessTitle>
|
|
<div>
|
|
<el-table
|
|
:data="tableData"
|
|
tooltip-effect="dark"
|
|
class="drag-table"
|
|
style="width: 100%; flex: auto;"
|
|
border
|
|
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
|
|
fontWeight: 'bold', height: '48px'}"
|
|
ref="selection"
|
|
>
|
|
<el-table-column
|
|
type="index"
|
|
label="序号"
|
|
width="55"
|
|
align="center">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="name"
|
|
label="责任人"
|
|
align="center">
|
|
</el-table-column>
|
|
<el-table-column
|
|
label="文件"
|
|
align="center">
|
|
<template slot-scope="scope">
|
|
<div class="fileClass">
|
|
<span @click="clickButtonToUpload2(scope.row.fileId)">{{scope.row.fileName}}</span>
|
|
<el-button
|
|
size="small"
|
|
@click="updateFile(scope.row.fileId)"
|
|
icon="el-icon-download"
|
|
style="height: 32px; margin-left: 5px;"
|
|
></el-button>
|
|
</div>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
<el-collapse accordion>
|
|
<el-collapse-item title="审批意见">
|
|
<div style="margin: 10px 0;">
|
|
<el-input
|
|
type="textarea"
|
|
:rows="3"
|
|
resize="none"
|
|
placeholder="请输入意见"
|
|
v-model="commentText">
|
|
</el-input>
|
|
</div>
|
|
</el-collapse-item>
|
|
</el-collapse>
|
|
</div>
|
|
</div>
|
|
<div class="content" v-show="active === '2'">
|
|
<el-table
|
|
height="100%"
|
|
ref="selection"
|
|
:data="histortData"
|
|
tooltip-effect="dark"
|
|
style="width: 100%"
|
|
border
|
|
row-key="id"
|
|
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}">
|
|
<el-table-column
|
|
prop="name"
|
|
label="任务步骤"
|
|
align="center"
|
|
sortable="custom"
|
|
>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="assignee"
|
|
label="任务受理人"
|
|
align="center"
|
|
sortable="custom"
|
|
>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="createTime"
|
|
label="创建时间"
|
|
sortable="custom"
|
|
align="center">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.createTime ? $moment(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') : '' }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="endTime"
|
|
label="完成时间"
|
|
align="center">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.endTime ? $moment(scope.row.endTime).format('YYYY-MM-DD HH:mm:ss') : '' }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="comment"
|
|
label="审批意见"
|
|
align="center">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.commentText }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="completeFlag"
|
|
label="状态"
|
|
align="center">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.endTime ? '已完成' : '未完成'}}</span>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
<ProcessFooter
|
|
show-submit
|
|
show-back
|
|
approval
|
|
@back="handleSubmitNo"
|
|
:submitLoading="isSubmit"
|
|
:saveLoading="saveLoading"
|
|
show-transfer
|
|
@transfer="handleTransfer"
|
|
@submit="handleSubmit"
|
|
submitBTNText="同意"
|
|
>
|
|
</ProcessFooter>
|
|
<Role-tree
|
|
check-box
|
|
is-title="转办处理人"
|
|
:is-visible.sync="drawerModal"
|
|
@checkedRole="checkedRole"
|
|
></Role-tree>
|
|
<el-dialog width='400px' :visible.sync="fileMadel" title="上传文件">
|
|
<el-upload
|
|
multiple
|
|
drag
|
|
:action="fileUrl"
|
|
ref="importfile"
|
|
name="file"
|
|
accept=".ZIP, .zip, .docx, .DOCX, .xls, .xlsx, .pdf, .PDF"
|
|
:before-upload="beginImportFile"
|
|
:on-success="importFileSuccess"
|
|
:show-file-list="false"
|
|
>
|
|
<div style="padding: 20px 0">
|
|
<i class="el-icon-upload" style="color: #3399ff"></i>
|
|
<p>点击或拖拽上传文件</p>
|
|
</div>
|
|
</el-upload>
|
|
</el-dialog>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import ProcessHeader from '../../components/ProcessHeader'
|
|
import ProcessFooter from '../../components/ProcessFooter'
|
|
import ProcessTitle from '../../components/ProcessTitle'
|
|
import {inboundLiaisonDetail,changeAssigneeNew} from 'api/process'
|
|
import axios from "axios";
|
|
|
|
export default {
|
|
name: "bzdyStep7",
|
|
data() {
|
|
return {
|
|
drawerModal: false,
|
|
foldFormFlag: false,
|
|
histortData: [],
|
|
commentText: '',
|
|
tableData: [],
|
|
taskIds: this.$route.query.taskIds,
|
|
pId: this.$route.query.prcId,
|
|
active: '1', // 默认显示
|
|
isSubmit: false,
|
|
saveLoading: false,
|
|
form: {
|
|
title: '', // 调研标题
|
|
date: '', // 完成时间
|
|
hzfileId: '',
|
|
hzfileName: '',
|
|
textsh: ''
|
|
},
|
|
formRules: {
|
|
textsh: [
|
|
{ required: true, message: '请输入审核意见', trigger: 'blur' },
|
|
]
|
|
},
|
|
json: {},
|
|
fileUrl: 'api/att/attFile/upload',
|
|
fileMadel: false,
|
|
}
|
|
},
|
|
components: {
|
|
ProcessHeader,
|
|
ProcessFooter,
|
|
ProcessTitle
|
|
},
|
|
methods: {
|
|
clickButtonToUpload2(file) {
|
|
const attId = file
|
|
this.$preview(attId)
|
|
},
|
|
handleTransfer() {
|
|
this.drawerModal = true
|
|
},
|
|
checkedRole (data) {
|
|
changeAssigneeNew({
|
|
taskId: this.$route.query.taskIds, // 任务id
|
|
userId:this.$store.getters.userInfo.userId, // 委托人
|
|
assignee: data[0].id, // 被委托人
|
|
pId: this.$route.query.prcId, // 流程实例
|
|
}).then(res => {
|
|
if (res.success) {
|
|
this.drawerModal = false
|
|
this.$message.success('调整成功')
|
|
this.processNum()
|
|
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
|
|
} else {
|
|
this.$message.warning(res.message)
|
|
}
|
|
})
|
|
},
|
|
// 请求转换流程图
|
|
processNum (row) {
|
|
axios.request({
|
|
url: '/api/lawss/activiti/getImg?_t=' + new Date().getTime(),
|
|
responseType: 'blob',
|
|
method: 'get',
|
|
params: {
|
|
prcNum: this.$route.query.prcNum
|
|
}
|
|
}).then(res => {
|
|
this.processStep = window.URL.createObjectURL(res.data)
|
|
})
|
|
},
|
|
foldForm() {
|
|
this.foldFormFlag = !this.foldFormFlag
|
|
},
|
|
getHistoryData () {
|
|
this.$http.get('lawss/activiti/get_list_by_instance', {
|
|
prcNum: this.$route.query.prcNum,
|
|
}, {}, res => {
|
|
this.histortData = res
|
|
}, e => {})
|
|
},
|
|
updateFile (fileId) {
|
|
window.location.href = '/api/att/attFile/downloadFile?fileId=' + fileId
|
|
},
|
|
// 导入按钮 上传之前的钩子
|
|
beginImportFile (file) {
|
|
var filename = file.name
|
|
var index1 = filename.lastIndexOf('.')
|
|
var index2 = filename.length
|
|
var fileSuffix = filename.substring(index1, index2)
|
|
// const fileSuffix = file.name.split('.')[1] // 后缀名
|
|
// 判断上传文件格式
|
|
if (fileSuffix === '.ppt' || fileSuffix === '.docx' || fileSuffix === '.DOCX' || fileSuffix === '.PPT' || fileSuffix === '.xls' || fileSuffix === '.xlsx' || fileSuffix === '.XLS' || fileSuffix === '.XLSX' || fileSuffix === '.pdf' || fileSuffix === '.PDF') {
|
|
return true
|
|
} else {
|
|
this.spinShow = false
|
|
this.$message.error('文件' + file.name + '格式不正确,请上传PPT,DOCX,XLS,PDF文件')
|
|
return false
|
|
}
|
|
// 判断文件上传大小
|
|
// eslint-disable-next-line no-unreachable
|
|
if (file.size / 1024 / 1024 <= 200) {
|
|
return true
|
|
} else {
|
|
this.$message.error('文件' + file.name + '大小不超过200M')
|
|
return false
|
|
}
|
|
return true
|
|
},
|
|
// 导入标准数据成功后执行
|
|
importFileSuccess (response, file) {
|
|
if (response.ok) {
|
|
this.fileMadel = false
|
|
this.form.hzfileId = response.data.id
|
|
this.form.hzfileName = response.data.name
|
|
this.$message({
|
|
showClose: true,
|
|
message: response.message,
|
|
type: 'success'
|
|
})
|
|
}
|
|
},
|
|
fileUpload () {
|
|
this.fileMadel = true
|
|
},
|
|
handleTabs(name) {
|
|
this.active = name
|
|
},
|
|
handleSave() {},
|
|
handleSubmit() {
|
|
this.isSubmit = true
|
|
var json = this.json
|
|
json.actionFlag = 0
|
|
json.commentText = this.commentText
|
|
this.$http.post('lawss/activiti/completeTask', {
|
|
json: JSON.stringify(json),
|
|
taskIds: this.taskIds,
|
|
userId: this.$store.getters.userInfo.userId
|
|
}, {}, res => {
|
|
if (res.success) {
|
|
this.$message.success('提交成功')
|
|
this.$router.push('/processCenter')
|
|
}
|
|
this.isSubmit = false
|
|
})
|
|
},
|
|
handleSubmitNo() {
|
|
if (this.commentText) {
|
|
this.isSubmit = true
|
|
var json = this.json
|
|
json.commentText = this.commentText
|
|
json.actionFlag = 1
|
|
this.$http.post('lawss/activiti/completeTask', {
|
|
json: JSON.stringify(json),
|
|
taskIds: this.taskIds,
|
|
userId: this.$store.getters.userInfo.userId
|
|
}, {}, res => {
|
|
if (res.success) {
|
|
this.$message.success('驳回成功')
|
|
this.$router.push('/processCenter')
|
|
}
|
|
this.isSubmit = false
|
|
})
|
|
} else {
|
|
this.$message.warning('请输入反馈意见')
|
|
}
|
|
},
|
|
getData() {
|
|
return new Promise((resolve, reject) => {
|
|
inboundLiaisonDetail({
|
|
taskIds: this.taskIds,
|
|
pId: this.pId
|
|
}).then(res => {
|
|
let data = JSON.parse(res.mesg)
|
|
this.form.title = data.title || data.form.title
|
|
this.form.date = data.date || data.form.date
|
|
this.json = data || data.form
|
|
this.tableData = data.responUserList || data.form.responUserList
|
|
this.form.hzfileId = data.hzfileId || data.form.hzfileId
|
|
this.form.hzfileName = data.hzfileName || data.form.hzfileName
|
|
}).catch(e => {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
mounted () {
|
|
this.getHistoryData()
|
|
this.getData()
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
@import '~@/assets/styles/style';
|
|
.bzdyStep7 {
|
|
/deep/.el-drawer__container {
|
|
.prc-content-border {
|
|
border: none;
|
|
padding: 0 20px 0;
|
|
}
|
|
}
|
|
position: relative;
|
|
height: 100%;
|
|
.fileClass {
|
|
cursor: pointer;
|
|
}
|
|
.fileClass:hover{
|
|
color: #0c91e5;
|
|
}
|
|
.headerTabs {
|
|
height: 52px;
|
|
display: flex;
|
|
align-items: center;
|
|
position: absolute;
|
|
top: 0;
|
|
right: 10px;
|
|
.headerTabsItem {
|
|
border: 1px solid #c1c1c1;
|
|
padding: 0 5px;
|
|
height: 30px;
|
|
line-height: 30px;
|
|
cursor: pointer;
|
|
}
|
|
.active {
|
|
border: 1px solid #E6A23C;
|
|
color: #fff;
|
|
background: #E6A23C;
|
|
}
|
|
}
|
|
.content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-between;
|
|
height: calc(~'100% - 103px');
|
|
overflow: auto;
|
|
.tableTitle {
|
|
margin-bottom: 10px;
|
|
height: 30px;
|
|
line-height: 30px;
|
|
position: relative;
|
|
font-size: 13px;
|
|
font-weight: bold;
|
|
.tableButton {
|
|
position: absolute;
|
|
right: 0;
|
|
top: 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|