625 lines
20 KiB
Vue
625 lines
20 KiB
Vue
<template>
|
||
<div class="bzdyStep8">
|
||
<!-- 标准调研流程-->
|
||
<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="bzzqyjForm"
|
||
:model="form"
|
||
:rules="formRules"
|
||
class="label-input-form"
|
||
label-width="210px"
|
||
>
|
||
<ProcessTitle>
|
||
<template slot="title">基础信息</template>
|
||
</ProcessTitle>
|
||
<div class="prc-content-border">
|
||
<el-row :gutter="24">
|
||
<el-col :span="24">
|
||
<el-form-item label="标准编号/名称" prop="cid" class="add-form-item form-item-disabled">
|
||
<el-input
|
||
disabled
|
||
v-model="form.cid"
|
||
placeholder="请输入标准编号"
|
||
clearable
|
||
></el-input>
|
||
</el-form-item>
|
||
<el-form-item label="征求意见结束日期" prop="endTime" class="add-form-item form-item-disabled">
|
||
<el-date-picker
|
||
disabled
|
||
v-model="form.endTime"
|
||
type="date"
|
||
placeholder="请选择结束日期">
|
||
</el-date-picker>
|
||
</el-form-item>
|
||
<el-form-item label="标准附件" prop="fjListId" class="add-form-item form-item-disabled">
|
||
<el-input
|
||
v-model="form.fjListId"
|
||
style="display: none;"
|
||
></el-input>
|
||
<div style="display: flex;">
|
||
<div class="fileClass"
|
||
style="margin-right: 15px;padding-left: 10px"
|
||
v-for="(item, index) in form.fjList"
|
||
:key="index">
|
||
<span @click="fileLook(item)">{{ item.fileName }}</span>
|
||
<el-button
|
||
size="small"
|
||
@click="filesUpload(item)"
|
||
icon="el-icon-download"
|
||
style="height: 32px; margin-left: 5px;"
|
||
></el-button>
|
||
</div>
|
||
</div>
|
||
</el-form-item>
|
||
<el-form-item label="其他附件" prop="model" class="add-form-item form-item-disabled">
|
||
<div v-if="form.modelList.length > 0">
|
||
<div v-for="(item, index) in form.modelList" class="fileClass" :key="index" style="margin-right: 5px;">
|
||
<span @click="fileLook(item)">{{ item.name }}</span>
|
||
<el-button
|
||
size="small"
|
||
@click="filesUpload(item)"
|
||
icon="el-icon-download"
|
||
style="height: 32px; margin-left: 5px;"
|
||
></el-button>
|
||
</div>
|
||
</div>
|
||
<div v-else>
|
||
- -
|
||
</div>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
</div>
|
||
</el-form>
|
||
<ProcessTitle>
|
||
<template slot="title">征求意见列表</template>
|
||
</ProcessTitle>
|
||
<div class="button-list">
|
||
<el-button type="primary"
|
||
class="common-button-primary add-button"
|
||
@click="upload(oldData, '汇总单.xls')"
|
||
size="mini">生成汇总单
|
||
</el-button>
|
||
<el-button type="primary"
|
||
class="common-button-primary add-button"
|
||
@click="upload(data, '上报意见.xls')"
|
||
size="mini">生成上报意见
|
||
</el-button>
|
||
</div>
|
||
<el-table
|
||
ref="multipleTable"
|
||
:data="data"
|
||
tooltip-effect="dark"
|
||
border
|
||
style="width: 100%; flex: auto;"
|
||
class="drag-table"
|
||
:default-sort = "{prop: 'chapterNumber', order: 'ascending'}"
|
||
:header-cell-style="{background: '#E8E8E8', color: '#333333', fontSize: '16px',
|
||
fontWeight: 'bold', height: '48px'}">
|
||
<el-table-column
|
||
type="index"
|
||
label="序号"
|
||
width="55"
|
||
align="center">
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="chapterNumber"
|
||
sortable
|
||
align="center"
|
||
label="章条编号"
|
||
width="101px">
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="chapterName"
|
||
align="center"
|
||
width="200px"
|
||
label="章节名称">
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="commentText"
|
||
align="center"
|
||
label="修改意见内容(包括理由或依据)">
|
||
<el-table-column
|
||
prop="oldText"
|
||
align="center"
|
||
label="修改前">
|
||
<template slot-scope="scope">
|
||
<el-button size="mini" type="primary" :disabled="scope.row.chapterNumber.length === 0" @click="itermsConditionsOpen(scope.row.oldText)" class="common-button-primary">查看修改前内容</el-button>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="newText"
|
||
align="center"
|
||
label="修改后">
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="reason"
|
||
align="center"
|
||
label="修改理由">
|
||
</el-table-column>
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="department"
|
||
align="center"
|
||
label="提出部门">
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="responUserName"
|
||
align="center"
|
||
label="提出人">
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="state"
|
||
align="center"
|
||
label="处理意见">
|
||
<template slot-scope="scope">
|
||
<div>{{ stateText(scope.row.state) }}</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 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
|
||
:submitLoading="isSubmit"
|
||
:saveLoading="saveLoading"
|
||
@save="handleSave"
|
||
@submit="handleSubmit"
|
||
show-back
|
||
@back="handleSubmitNo"
|
||
show-transfer
|
||
@transfer="handleTransfer"
|
||
approval
|
||
submitBTNText="同意"
|
||
>
|
||
</ProcessFooter>
|
||
<Role-tree
|
||
check-box
|
||
is-title="转办处理人"
|
||
:is-visible.sync="drawerModal"
|
||
@checkedRole="checkedRole"
|
||
></Role-tree>
|
||
<el-dialog
|
||
title="查看修改前内容"
|
||
:visible.sync="itermsConditionsFlag"
|
||
size="800px">
|
||
<div style="height: 500px;overflow: auto;" v-html="itermsConditionsTitle"></div>
|
||
<div slot="footer">
|
||
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="itermsConditionsClose">关闭</el-button>
|
||
</div>
|
||
</el-dialog>
|
||
</div>
|
||
</template>
|
||
|
||
<script>
|
||
import ProcessHeader from '../../components/ProcessHeader'
|
||
import ProcessFooter from '../../components/ProcessFooter'
|
||
import ProcessTitle from '../../components/ProcessTitle'
|
||
import {inboundLiaisonDetail, processCreateStand,changeAssigneeNew,getBusStandFileByAttId} from 'api/process'
|
||
import axios from "axios";
|
||
|
||
export default {
|
||
name: "bzzqyjStep8",
|
||
data() {
|
||
return {
|
||
itermsConditionsFlag: false,
|
||
itermsConditionsTitle: '',
|
||
drawerModal: false,
|
||
histortData: [],
|
||
oldData: [],
|
||
data: [],
|
||
commentText: '',
|
||
taskIds: this.$route.query.taskIds,
|
||
pId: this.$route.query.prcId,
|
||
roleRow: {},
|
||
nodeList: [],
|
||
type: '',
|
||
defaultProps: {
|
||
children: 'children',
|
||
label: 'name'
|
||
},
|
||
treeData: [], // 人员数据
|
||
modalshowflag: false, // drawer开关
|
||
drawerTitle: '', //drawer标题
|
||
textarea: '', // 意见
|
||
ListModel: false, // 新增编辑抽屉开关
|
||
active: '1', // 默认显示
|
||
isSubmit: false,
|
||
saveLoading: false,
|
||
form: {
|
||
cid: '', // 编号
|
||
endTime: '', // 结束日期
|
||
cname: '', // 名称
|
||
fjList: [],
|
||
fjListId: '',
|
||
textType: '',
|
||
modelList: [],
|
||
modelNameList: '',
|
||
},
|
||
formRules: {
|
||
responUserList: [
|
||
{required: true, message: '请选择责任人', trigger: 'change'},
|
||
]
|
||
},
|
||
json: {}
|
||
}
|
||
},
|
||
components: {
|
||
ProcessHeader,
|
||
ProcessFooter,
|
||
ProcessTitle
|
||
},
|
||
methods: {
|
||
filesUpload (file) { // 下载
|
||
const attId = file.attId
|
||
if (attId) {
|
||
window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + attId
|
||
} else {
|
||
this.$message.warning('文件不存在,下载失败')
|
||
}
|
||
},
|
||
getBusStandFileByAttId(attId) { // 预览
|
||
return new Promise((resolve, reject) => {
|
||
getBusStandFileByAttId({
|
||
attId
|
||
}).then(res => {
|
||
if (res.ok) {
|
||
resolve(res.data)
|
||
} else {
|
||
reject()
|
||
}
|
||
}).catch(e => {
|
||
reject(e)
|
||
})
|
||
})
|
||
},
|
||
fileLook(file) { // 预览
|
||
const attId = file.attId
|
||
this.getBusStandFileByAttId(attId)
|
||
.then(res => {
|
||
if(res){
|
||
const editFileInfo = res
|
||
if(editFileInfo.fileSuffix === 'pdg' || editFileInfo.fileSuffix === 'PDG'){
|
||
window.open('book://ssreader/e0?url='+editFileInfo.downLoadUrl)
|
||
}else if(editFileInfo.fileSuffix === 'pdf' || editFileInfo.fileSuffix === 'PDF'){
|
||
window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id))
|
||
}else {
|
||
const nowTime = new Date().getTime()
|
||
// window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl)));
|
||
window.open('/static/onlyOffice/onlinePreview.html?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName)
|
||
}
|
||
// window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id))
|
||
}
|
||
}).catch(e => {
|
||
this.$message.warning('文件不存在,预览失败')
|
||
})
|
||
},
|
||
itermsConditionsClose () {
|
||
this.itermsConditionsFlag = false
|
||
},
|
||
itermsConditionsOpen (row) {
|
||
this.itermsConditionsFlag = true
|
||
this.itermsConditionsTitle = row
|
||
},
|
||
downloadFile (attId) {
|
||
window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + 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)
|
||
})
|
||
},
|
||
updataFj(item) {
|
||
window.location.href = '/api/att/attFile/downloadFile?fileId=' + item.id
|
||
},
|
||
getHistoryData() {
|
||
this.$http.get('lawss/activiti/get_list_by_instance', {
|
||
prcNum: this.$route.query.prcNum,
|
||
}, {}, res => {
|
||
this.histortData = res
|
||
}, e => {
|
||
})
|
||
},
|
||
upload(row, title) {
|
||
var params = {
|
||
columnName: {
|
||
chapterNumber: "章条编号",
|
||
chapterName: "章节名称",
|
||
commentText: "修改意见内容(包括理由或依据)",
|
||
oldText: "修改前",
|
||
newText: "修改后",
|
||
reason: "修改理由",
|
||
department: "提出部门",
|
||
responUserName: "提出人",
|
||
},
|
||
dataList: []
|
||
}
|
||
if (title === '上报意见.xls') {
|
||
params.columnName.stateText = "处理意见"
|
||
}
|
||
params.dataList = JSON.parse(JSON.stringify(row))
|
||
params.dataList.forEach(item => {
|
||
if (item.state === '1') {
|
||
item.stateText = '上报'
|
||
} else if (item.state === '2') {
|
||
item.stateText = '处理后上报'
|
||
} else {
|
||
item.stateText = '不上报'
|
||
}
|
||
})
|
||
this.$http.downloadFile('/api/lawss/activiti/export_excel', params, title, res => {
|
||
})
|
||
},
|
||
stateText(row) {
|
||
if (row === '1') {
|
||
return '上报'
|
||
} else if (row === '2') {
|
||
return '处理后上报'
|
||
}
|
||
},
|
||
handleTabs(name) {
|
||
this.active = name
|
||
},
|
||
handleSave() {
|
||
},
|
||
handleSubmit() {
|
||
if (this.data.length < 1) {
|
||
this.$message.warning('请输入征求意见搞')
|
||
} else {
|
||
this.isSubmit = true
|
||
var json = this.json
|
||
json.directorFlag = '0'
|
||
json.commentText = this.commentText
|
||
this.$http.post('lawss/activiti/completeTask', {
|
||
json: JSON.stringify(json),
|
||
taskId: 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.directorFlag = '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
|
||
})
|
||
} 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.fjList = data.fjList || data.form.fjList
|
||
if (data.fjListId === '') {
|
||
this.form.fjListId = ''
|
||
} else {
|
||
this.form.fjListId = data.form.fjListId || data.fjListId
|
||
}
|
||
this.form.cid = data.cid || data.form.cid;
|
||
this.form.endTime = data.endTime || data.form.endTime;
|
||
this.form.cname = data.cname || data.form.cname;
|
||
this.oldData = JSON.parse(JSON.stringify(data.info))
|
||
var arr = []
|
||
data.info.forEach(item => {
|
||
if (item.state != '3') {
|
||
arr.push(item)
|
||
}
|
||
})
|
||
this.json = data
|
||
this.form.textType = data.textType || data.form.textType
|
||
this.form.modelList = data.modelList || data.form.modelList
|
||
this.form.modelNameList = data.modelNameList || data.form.modelNameList
|
||
this.data = arr
|
||
}).catch(e => {
|
||
})
|
||
})
|
||
},
|
||
},
|
||
mounted() {
|
||
this.getHistoryData()
|
||
this.getData()
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style lang="less" scoped>
|
||
@import '~@/assets/styles/style';
|
||
|
||
.bzdyStep8 {
|
||
/deep/ .el-drawer__container {
|
||
.prc-content-border {
|
||
border: none;
|
||
padding: 0 20px 0;
|
||
}
|
||
}
|
||
|
||
.fileClass {
|
||
cursor: pointer;
|
||
}
|
||
|
||
.fileClass:hover {
|
||
color: #0c91e5;
|
||
}
|
||
|
||
position: relative;
|
||
height: 100%;
|
||
|
||
.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>
|