635 lines
28 KiB
Vue
635 lines
28 KiB
Vue
<template>
|
|
<div class="zchh-step1">
|
|
<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="rhForm"
|
|
:model="rhform"
|
|
class="label-input-form"
|
|
label-width="210px"
|
|
>
|
|
<ProcessTitle>
|
|
<template slot="title">基础信息</template>
|
|
</ProcessTitle>
|
|
<div class="prc-content-border" v-if="foldFormFlag">
|
|
<el-row :gutter="24">
|
|
<el-col :span="24">
|
|
<el-form-item label="课题名称" prop="title" class="add-form-item form-item-disabled">
|
|
<el-input
|
|
disabled
|
|
v-model="rhform.title"
|
|
placeholder="请输入课题名称"
|
|
clearable
|
|
></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="课题主要研究内容" prop="content" class="add-form-item form-item-disabled">
|
|
<el-input
|
|
disabled
|
|
v-model="rhform.content"
|
|
placeholder="请输入课题主要研究内容"
|
|
clearable
|
|
></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="参会费用" prop="price" class="add-form-item form-item-disabled">
|
|
<el-input
|
|
disabled
|
|
v-model="rhform.price"
|
|
placeholder="请输入参会费用"
|
|
clearable
|
|
></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="参会时间" prop="time2" class="add-form-item form-item-disabled">
|
|
<el-date-picker
|
|
disabled
|
|
v-model="rhform.time2"
|
|
value-format="yyyy-MM-ddHH:mm:ss"
|
|
type="datetime"
|
|
placeholder="请选择参会时间">
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
<el-form-item label="参会地点" prop="place" class="add-form-item form-item-disabled">
|
|
<el-input
|
|
disabled
|
|
v-model="rhform.place"
|
|
placeholder="请输入参会地点"
|
|
clearable
|
|
></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="承办单位" prop="Company" class="add-form-item form-item-disabled">
|
|
<el-input
|
|
disabled
|
|
v-model="rhform.Company"
|
|
placeholder="请输入承办单位"
|
|
clearable
|
|
></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="会议通知" prop="modelNameList" class="add-form-item form-item-disabled">
|
|
<div style="display: flex;">
|
|
<div class="table-jump" @click="updataFj(item)" style="margin-right: 15px;padding-left: 10px" v-for="(item, index) in rhform.modelList" :key="index">{{ item.name }}</div>
|
|
</div>
|
|
</el-form-item>
|
|
<el-form-item label="课题研究周期" prop="time" class="add-form-item form-item-disabled">
|
|
<el-date-picker
|
|
disabled
|
|
v-model="rhform.time"
|
|
type="datetimerange"
|
|
range-separator="至"
|
|
start-placeholder="开始日期"
|
|
end-placeholder="结束日期">
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</div>
|
|
<el-button style="width: 100%" :icon="foldFormFlag ? 'el-icon-caret-top' : 'el-icon-caret-bottom'" @click="foldForm">{{ foldFormFlag ? '隐藏基础信息' : '展开基础信息' }}</el-button>
|
|
</el-form>
|
|
<ProcessTitle>
|
|
<template slot="title">会后信息</template>
|
|
</ProcessTitle>
|
|
<el-form
|
|
ref="hhForm"
|
|
:model="hhform"
|
|
:rules="formRules"
|
|
class="label-input-form"
|
|
label-width="210px"
|
|
>
|
|
<el-row :gutter="24">
|
|
<el-col :span="24">
|
|
<el-form-item label="会议总结" prop="title2" class="add-form-item form-item-disabled">
|
|
<el-input
|
|
v-model="hhform.title2"
|
|
placeholder="请输入会议总结"
|
|
clearable
|
|
></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="会议资料" prop="modelNameList2" class="add-form-item form-item-disabled">
|
|
<el-input
|
|
disabled
|
|
style="display: none;"
|
|
v-model="hhform.modelNameList2"
|
|
clearable
|
|
></el-input>
|
|
<div v-if="hhform.modelList2.length > 0" class="fileClass" style="display: flex;">
|
|
<div v-for="(item, index) in hhform.modelList2" :key="index" @click="fileUpload" style="margin-right: 5px;">
|
|
{{ item.name }}
|
|
</div>
|
|
</div>
|
|
<div v-else>
|
|
<el-button
|
|
type="primary"
|
|
class="common-button-primary"
|
|
@click="fileUpload"
|
|
size="mini">
|
|
点击上传
|
|
</el-button>
|
|
</div>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
<ProcessTitle>
|
|
<template slot="title">课题组联系方式</template>
|
|
</ProcessTitle>
|
|
<el-table border
|
|
ref="selection"
|
|
:data="data1"
|
|
tooltip-effect="dark"
|
|
style="width: 100%;"
|
|
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
|
|
fontWeight: 'bold', height: '48px'}"
|
|
row-key="id">
|
|
<el-table-column
|
|
prop="ContactPerson"
|
|
label="联络人"
|
|
width="150"
|
|
align="center">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="Company"
|
|
label="单位"
|
|
align="center">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="Telephone"
|
|
label="电话"
|
|
width="200"
|
|
align="center">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="Email"
|
|
label="邮箱"
|
|
width="350"
|
|
align="center">
|
|
</el-table-column>
|
|
</el-table>
|
|
<ProcessTitle>
|
|
<template slot="title">集团内部参与人员</template>
|
|
</ProcessTitle>
|
|
<el-table border
|
|
ref="selection"
|
|
:data="data2"
|
|
tooltip-effect="dark"
|
|
style="width: 100%;"
|
|
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
|
|
fontWeight: 'bold', height: '48px'}"
|
|
row-key="id">
|
|
<el-table-column
|
|
prop="Sindex"
|
|
label="我司在工作组排名顺序"
|
|
width="170"
|
|
align="center">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="Member"
|
|
label="我司成员"
|
|
width="150"
|
|
align="center">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="Company"
|
|
label="单位"
|
|
align="center">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="Department"
|
|
label="部门"
|
|
width="150"
|
|
align="center">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="Telephone"
|
|
label="电话"
|
|
width="200"
|
|
align="center">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="Email"
|
|
label="邮箱"
|
|
width="300"
|
|
align="center">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="Identity"
|
|
label="身份"
|
|
width="150"
|
|
align="center">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="data"
|
|
label="资料"
|
|
width="250"
|
|
align="center">
|
|
<template slot-scope="scope">
|
|
<div v-if="scope.row.data.length > 0">
|
|
<div class="table-jump" @click="updataFj(item)" style="margin-right: 15px;padding-left: 10px" v-for="(item, index) in scope.row.data" :key="index">{{ item.name }}</div>
|
|
</div>
|
|
<div v-else>
|
|
- -
|
|
</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="info"
|
|
label="是否参会"
|
|
width="150"
|
|
align="center">
|
|
<template slot-scope="scope">
|
|
<el-select v-model="scope.row.info" placeholder="请选择">
|
|
<el-option label="是" value="1"></el-option>
|
|
<el-option label="否" value="0"></el-option>
|
|
</el-select>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<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'">
|
|
<div class="block" style="padding-top: 20px;">
|
|
<el-timeline>
|
|
<el-form
|
|
ref="Form"
|
|
:model="roleForm"
|
|
:rules="roleFormRules"
|
|
class="label-input-form">
|
|
<el-timeline-item timestamp="发起流程" placement="top" :color="roleForm.applyUserId ? '#66b1ff' : ''">
|
|
<el-card>
|
|
<el-form-item prop="revisionId" style="margin-bottom: 0">
|
|
<h4>流程发起人</h4>
|
|
<div style="margin-top: 10px;width: 300px;">
|
|
<el-input v-model="roleForm.revisionId" style="display: none;"/>
|
|
<el-input v-model="roleForm.revisionIdName" placeholder="流程发起人" disabled/>
|
|
</div>
|
|
</el-form-item>
|
|
</el-card>
|
|
</el-timeline-item>
|
|
<el-timeline-item timestamp="审批" placement="top" :color="roleForm.approvalId ? '#66b1ff' : ''">
|
|
<el-card>
|
|
<el-form-item prop="approvalIdName" style="margin-bottom: 0">
|
|
<h4>法规认证部部长</h4>
|
|
<div style="margin-top: 10px;width: 300px;">
|
|
<el-input v-model="roleForm.approvalId" style="display: none;"></el-input>
|
|
<el-input v-model="roleForm.approvalIdName" readonly placeholder="选择法规认证部部长" @click.native="choiceZRR('approvalId', '选择法规认证部部长', roleForm.approvalId)"></el-input>
|
|
</div>
|
|
</el-form-item>
|
|
</el-card>
|
|
</el-timeline-item>
|
|
</el-form>
|
|
</el-timeline>
|
|
</div>
|
|
</div>
|
|
<ProcessFooter
|
|
show-submit
|
|
:submitLoading="isSubmit"
|
|
:saveLoading="saveLoading"
|
|
@submit="handleSubmit"
|
|
>
|
|
</ProcessFooter>
|
|
<el-dialog width='400px' :visible.sync="fileMadel" title="上传会议资料">
|
|
<el-upload
|
|
multiple
|
|
class="upload-demo"
|
|
drag
|
|
:action="fileUrl"
|
|
ref="importfile"
|
|
name="file"
|
|
accept=".ZIP, .zip, .docx, .DOCX, .xls, .xlsx"
|
|
:before-upload="beginImportFile"
|
|
:on-success="importFileSuccess"
|
|
:on-remove="importFileRemove"
|
|
:show-file-list="true"
|
|
:file-list="fileList"
|
|
>
|
|
<div style="padding: 20px 0">
|
|
<i class="el-icon-upload" style="color: #3399ff"></i>
|
|
<p>点击或拖拽上传文件</p>
|
|
</div>
|
|
</el-upload>
|
|
</el-dialog>
|
|
<Role-tree
|
|
check-box
|
|
:is-title="drawerTitle"
|
|
:is-visible.sync="modalshowflag"
|
|
@checkedRole="checkedRole"
|
|
:nodeList="nodeList"
|
|
></Role-tree>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import ProcessHeader from "../../components/ProcessHeader";
|
|
import ProcessFooter from "../../components/ProcessFooter";
|
|
import ProcessTitle from "../../components/ProcessTitle";
|
|
import { saveTaskFirst,inboundLiaisonDetail } from "api/process";
|
|
|
|
export default {
|
|
name: "zchhStep1",
|
|
components: {
|
|
ProcessHeader,
|
|
ProcessFooter,
|
|
ProcessTitle
|
|
},
|
|
data() {
|
|
return {
|
|
fileList: [],
|
|
commentText: '',
|
|
isSubmit: false,
|
|
saveLoading: false,
|
|
active: "1", //默认显示
|
|
hhform: {
|
|
title2: '',
|
|
modelNameList2: '',
|
|
modelList2: []
|
|
},
|
|
formRules: {
|
|
title2: [
|
|
{ required: true, message: '请输入会议总结', trigger: 'blur' },
|
|
],
|
|
modelNameList2: [
|
|
{ required: true, message: '请上传课题组通知', trigger: 'blur' },
|
|
]
|
|
},
|
|
rhform: {
|
|
title: '',
|
|
content: '',
|
|
price: '',
|
|
time: '',
|
|
time2: '',
|
|
place: '',
|
|
Company: '',
|
|
modelNameList: '',
|
|
modelList: []
|
|
},
|
|
foldFormFlag: true,
|
|
data1: [],
|
|
data2: [],
|
|
roleForm: {
|
|
revisionId: this.$store.getters.userInfo.userId,
|
|
revisionIdName: this.$store.getters.userInfo.userName,
|
|
approvalId: '',
|
|
approvalIdName: '',
|
|
},
|
|
roleFormRules: {
|
|
approvalIdName: [
|
|
{required: true, message: '请选择法规认证部部长', trigger: 'change'},
|
|
],
|
|
},
|
|
fileMadel: false,
|
|
fileUrl: 'api/att/attFile/upload',
|
|
nodeList: [],
|
|
type: '',
|
|
drawerTitle: '',
|
|
modalshowflag: false,
|
|
taskIds: this.$route.query.taskIds,
|
|
pId: this.$route.query.prcId,
|
|
}
|
|
},
|
|
methods: {
|
|
updataFj (item) {
|
|
window.location.href = '/api/att/attFile/downloadFile?fileId=' + item.id
|
|
},
|
|
getData() {
|
|
return new Promise((resolve, reject) => {
|
|
inboundLiaisonDetail({
|
|
taskIds: this.taskIds,
|
|
pId: this.pId
|
|
}).then(res => {
|
|
let data = JSON.parse(res.mesg)
|
|
this.json = data
|
|
this.data1 = data.data1
|
|
this.data2 = data.data2
|
|
this.rhform.commentText = data.commentText
|
|
this.rhform.content = data.content
|
|
this.rhform.price = data.price
|
|
this.rhform.time = data.time
|
|
this.rhform.title = data.title
|
|
this.rhform.Company = data.Company
|
|
this.rhform.place = data.place
|
|
this.rhform.time2 = data.time2
|
|
this.rhform.modelList = data.modelList
|
|
this.rhform.modelNameList = data.modelNameList
|
|
this.hhform.title2 = data.title2 || ''
|
|
this.hhform.modelList2 = data.modelList2 || []
|
|
this.hhform.modelNameList2 = data.modelNameList2 || ''
|
|
this.roleForm.approvalId = data.approvalId
|
|
this.roleForm.approvalIdName = data.approvalIdName
|
|
}).catch(e => {
|
|
})
|
|
})
|
|
},
|
|
// 导入按钮 上传之前的钩子
|
|
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') {
|
|
return true
|
|
} else {
|
|
this.$message.error('文件' + file.name + '格式不正确,请上传PPT,DOCX,XLS文件')
|
|
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.hhform.modelList2.push(response.data)
|
|
let list = ''
|
|
this.hhform.modelList2.forEach(item => {
|
|
if (list.length > 0) {
|
|
list += ','
|
|
list += item.name
|
|
} else {
|
|
list+= item.name
|
|
}
|
|
})
|
|
this.hhform.modelNameList2 = list
|
|
this.$message({
|
|
showClose: true,
|
|
message: response.message,
|
|
type: 'success'
|
|
})
|
|
} else {
|
|
this.$message.error('程序异常,上传失败')
|
|
}
|
|
},
|
|
importFileRemove(file, fileList) {
|
|
let list = ''
|
|
this.hhform.modelList2 = []
|
|
fileList.forEach(item => {
|
|
this.hhform.modelList2.push(item)
|
|
if (list.length > 0) {
|
|
list += ','
|
|
list += item.name
|
|
} else {
|
|
list+= item.name
|
|
}
|
|
})
|
|
this.hhform.modelNameList2 = list
|
|
},
|
|
fileUpload() {
|
|
this.fileList = this.hhform.modelList2
|
|
this.fileMadel = true
|
|
},
|
|
handleTabs(type) {
|
|
this.active = type;
|
|
}, // 切换tabs
|
|
foldForm() {
|
|
this.foldFormFlag = !this.foldFormFlag
|
|
}, // 基础信息显隐
|
|
handleSubmit() {
|
|
this.$refs['hhForm'].validate((valid) => {
|
|
if (valid) {
|
|
let info = 0
|
|
this.data2.forEach((item, index) =>{
|
|
if (!item.info) {
|
|
info++
|
|
}
|
|
})
|
|
if (info > 0) {
|
|
return this.$message.warning('请选择是否参会')
|
|
} else{
|
|
this.$refs['Form'].validate((valid) => {
|
|
if (valid) {
|
|
this.isSubmit = true
|
|
var json = Object.assign(this.rhform, this.roleForm, this.hhform)
|
|
json.commentText = this.commentText
|
|
json.data1 = this.data1
|
|
json.data2 = this.data2
|
|
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
|
|
} else {
|
|
this.$message.warning('流程启动失败')
|
|
this.isSubmit = false
|
|
}
|
|
})
|
|
} else {
|
|
return this.$message.warning('请完善人员信息')
|
|
}
|
|
})
|
|
}
|
|
} else {
|
|
return this.$message.warning('请完善会后信息')
|
|
}
|
|
})
|
|
}, // 提交事件
|
|
choiceZRR(type, title, id) {
|
|
this.nodeList = []
|
|
this.nodeList.push(id)
|
|
this.type = type
|
|
this.drawerTitle = title
|
|
this.modalshowflag = true
|
|
}, // 点击人员input事件
|
|
checkedRole(data) {
|
|
if (this.type === 'approvalId') {
|
|
this.roleForm.approvalId = data[0].id
|
|
this.roleForm.approvalIdName = data[0].name
|
|
}
|
|
}, // 选择人员确认事件
|
|
},
|
|
mounted() {
|
|
this.getData()
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
@import '~@/assets/styles/style';
|
|
|
|
.zchh-step1 {
|
|
position: relative;
|
|
height: 100%;
|
|
.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;
|
|
}
|
|
}
|
|
}
|
|
.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;
|
|
}
|
|
}
|
|
.label-input-form {
|
|
.add-form-item {
|
|
/deep/.el-form-item__content {
|
|
.el-date-editor {
|
|
width: 400px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|
|
|
|
|