982 lines
34 KiB
Vue
982 lines
34 KiB
Vue
<!--外部标准化协会入会流程-->
|
|
<template>
|
|
<div class="bzrhStep1">
|
|
<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;">
|
|
<ProcessTitle>
|
|
<template slot="title">基础信息</template>
|
|
</ProcessTitle>
|
|
<div class="content_form">
|
|
<el-form class="label-input-form" ref="rh_pageData" :model="rh_pageData" :rules="rh_rules" label-width="150px">
|
|
<el-row>
|
|
<el-col :span="8">
|
|
<el-form-item class="add-form-item" label="协会名称:" prop="comityName">
|
|
<el-select
|
|
clearable
|
|
@change="comityChange"
|
|
v-model="rh_pageData.comityName"
|
|
placeholder="请选择标委会">
|
|
<el-option
|
|
v-for="item in rh_pageData.comityOptionsOne"
|
|
:key="item.id"
|
|
:label="item.name"
|
|
:value="item.id"/>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-form-item class="add-form-item" v-if="rh_pageData.comityName !== ''" prop="comityNameOne">
|
|
<el-select
|
|
clearable
|
|
@change="comityChangeOne"
|
|
v-model="rh_pageData.comityNameOne"
|
|
placeholder="请选择分标委">
|
|
<el-option
|
|
v-for="item in rh_pageData.comityOptionsTwo"
|
|
:key="item.id"
|
|
:label="item.name"
|
|
:value="item.id"/>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-form-item class="add-form-item" prop="comityNameTwo" v-if="rh_pageData.comityName !== '' && rh_pageData.comityNameOne !== ''">
|
|
<el-select
|
|
clearable
|
|
v-model="rh_pageData.comityNameTwo"
|
|
placeholder="请选择工作组">
|
|
<el-option
|
|
v-for="item in rh_pageData.comityOptionsTree"
|
|
:key="item.id"
|
|
:label="item.name"
|
|
:value="item.id"/>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="8">
|
|
<el-form-item class="add-form-item" label="会员角色:" prop="comityRole">
|
|
<el-select
|
|
clearable
|
|
v-model="rh_pageData.comityRole"
|
|
placeholder="请选择会员角色">
|
|
<el-option
|
|
v-for="item in comityRoleOptions"
|
|
:key="item.value"
|
|
:label="item.label"
|
|
:value="item.label"/>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-form-item class="add-form-item" label="协会状态:" prop="comityState">
|
|
<el-select
|
|
clearable
|
|
v-model="rh_pageData.comityState"
|
|
placeholder="选择协会状态">
|
|
<el-option
|
|
v-for="item in comityStateOptions"
|
|
:key="item.value"
|
|
:label="item.label"
|
|
:value="item.label"/>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-form-item class="add-form-item" label="入会性质:" prop="comityKind">
|
|
<el-select
|
|
clearable
|
|
v-model="rh_pageData.comityKind"
|
|
placeholder="请选择入会性质">
|
|
<el-option
|
|
v-for="item in comityKindOptions"
|
|
:key="item.value"
|
|
:label="item.label"
|
|
:value="item.label"/>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-form-item class="add-form-item" label="信息来源:" prop="infoSources">
|
|
<div v-if="rh_pageData.infoSources.length>0">
|
|
<div v-for="(item, index) in rh_pageData.infoSources" :key="index" style="margin-right: 5px; padding-left: 10px;color: #0c91e5;">
|
|
<a v-if="item.name.length > 30" style="cursor: pointer" @click="fileLook(item)">
|
|
{{ item.name.slice(0, 30) + '...' }} {{ ';' }}
|
|
</a>
|
|
<a v-else style="cursor: pointer" @click="fileLook(item)">{{ item.name }}</a>
|
|
<el-button
|
|
size="mini"
|
|
@click="filesUpload(item)"
|
|
icon="el-icon-download"
|
|
style="height: 25px; margin-left: 5px;"
|
|
></el-button>
|
|
</div>
|
|
</div>
|
|
<el-button
|
|
type="primary"
|
|
class="common-button-primary"
|
|
@click="uploadFile"
|
|
size="mini">
|
|
点击上传
|
|
</el-button>
|
|
</el-form-item>
|
|
<el-form-item class="add-form-item" label="协会构成:" prop="comityMake">
|
|
<el-form
|
|
class="make_form"
|
|
ref="rh_pageData.comityMake"
|
|
:model="rh_pageData.comityMake"
|
|
label-width="auto">
|
|
<el-row>
|
|
<el-col :span="8">
|
|
<el-form-item class="add-form-item" label="资质:">
|
|
<el-input
|
|
v-model="rh_pageData.comityMake.makeQualification" placeholder="请填写资质"/>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-form-item class="add-form-item" label="成员:">
|
|
<el-input v-model="rh_pageData.comityMake.makeRole" placeholder="请填写成员"/>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-form-item class="add-form-item" label="费用估计:">
|
|
<el-input v-model="rh_pageData.comityMake.makeCost" placeholder="请填写费用估计"/>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="8">
|
|
<el-form-item class="add-form-item" label="职责:">
|
|
<el-input v-model="rh_pageData.comityMake.makeDuties" placeholder="请填写职责"/>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-form-item class="add-form-item" label="任期:">
|
|
<el-input v-model="rh_pageData.comityMake.makeTime" placeholder="请填写任期"/>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
</el-form-item>
|
|
<el-form-item class="add-form-item" label="工作方向:" prop="workPath">
|
|
<el-input v-model="rh_pageData.workPath" type="textarea" placeholder="请填写工作方向"/>
|
|
</el-form-item>
|
|
<el-form-item class="add-form-item" label="协会外部联系方式:" style="margin-bottom: 50px">
|
|
<div class="comityTel_btn">
|
|
<el-button
|
|
type="primary"
|
|
size="small"
|
|
icon="el-icon-plus"
|
|
@click="add_comityTel">
|
|
添加
|
|
</el-button>
|
|
<el-button
|
|
type="danger"
|
|
size="small"
|
|
icon="el-icon-delete"
|
|
@click="del_comityTel">
|
|
批量删除
|
|
</el-button>
|
|
</div>
|
|
<el-table
|
|
class="tel_table"
|
|
:data="rh_pageData.comityTel"
|
|
border
|
|
ref="entryTable"
|
|
height="49%"
|
|
@selection-change="selectedDelete"
|
|
style="width: 100%"
|
|
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
|
|
fontWeight: 'bold', height: '20px'}">
|
|
<el-table-column type="selection" width="55"></el-table-column>
|
|
<el-table-column
|
|
prop="tel_name"
|
|
align="center"
|
|
label="联络人">
|
|
<template slot-scope="scope">
|
|
<el-input v-model="scope.row.tel_nameId" style="display: none" placeholder="请填写联络人"/>
|
|
<el-input v-model="scope.row.tel_name" readonly @click.native="choiceTel('tel_nameId', '选择联络人', scope.row)" placeholder="请填写联络人"/>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="tel_unit"
|
|
align="center"
|
|
label="单位">
|
|
<template slot-scope="scope">
|
|
<el-input v-model="scope.row.tel_unit" placeholder="请填写单位"/>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="tel_phone"
|
|
align="center"
|
|
label="电话">
|
|
<template slot-scope="scope">
|
|
<el-input v-model="scope.row.tel_phone" placeholder="请填写单位"/>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="tel_mail"
|
|
align="center"
|
|
label="邮箱">
|
|
<template slot-scope="scope">
|
|
<el-input v-model="scope.row.tel_mail" placeholder="请填写邮箱"/>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-form-item>
|
|
</el-form>
|
|
</div>
|
|
</div>
|
|
<el-collapse accordion>
|
|
<el-collapse-item title="回执说明">
|
|
<div style="margin: 10px 0;">
|
|
<el-input
|
|
type="textarea"
|
|
:rows="3"
|
|
resize="none"
|
|
placeholder="请输入意见"
|
|
v-model="commentInfo">
|
|
</el-input>
|
|
</div>
|
|
</el-collapse-item>
|
|
</el-collapse>
|
|
</div>
|
|
<div class="content" v-show="active === '2'">
|
|
<div class="block" style="padding-top: 20px;">
|
|
<el-timeline>
|
|
<el-form
|
|
ref="roleForm"
|
|
:model="roleForm"
|
|
:rules="roleFormRules"
|
|
class="label-input-form">
|
|
<el-timeline-item timestamp="起草" placement="top" :color="roleForm.startUser ? '#66b1ff' : ''">
|
|
<el-card>
|
|
<el-form-item prop="startUserName" style="margin-bottom: 0">
|
|
<h4>标准法规工程师</h4>
|
|
<div style="margin-top: 10px;width: 300px;">
|
|
<el-input v-model="roleForm.startUser" :disabled="true" style="display: none;"></el-input>
|
|
<el-input v-model="roleForm.startUserName" :disabled="true" placeholder="标准法规工程师"></el-input>
|
|
</div>
|
|
</el-form-item>
|
|
</el-card>
|
|
</el-timeline-item>
|
|
<el-timeline-item timestamp="指派人员" placement="top" :color="roleForm.startUser ? '#66b1ff' : ''">
|
|
<el-card>
|
|
<el-form-item prop="dockUserName" style="margin-bottom: 0">
|
|
<h4>技术委员会分委会主任/技术主管部门负责人</h4>
|
|
<div style="margin-top: 10px;width: 300px;">
|
|
<el-input v-model="roleForm.dockUser" style="display: none;"></el-input>
|
|
<el-input v-model="roleForm.dockUserName" placeholder="选择指派人员" @click.native="choiceZRR('dockUser', '选择指派人员', roleForm.dockUser)">
|
|
</el-input>
|
|
</div>
|
|
</el-form-item>
|
|
</el-card>
|
|
</el-timeline-item>
|
|
<el-timeline-item timestamp="填写信息" placement="top" :color="roleForm.startUser ? '#66b1ff' : ''">
|
|
<el-card>
|
|
<el-form-item prop="dockUserName1" style="margin-bottom: 0">
|
|
<h4>责任工程师</h4>
|
|
<div style="margin-top: 10px;width: 300px;">
|
|
<el-input v-model="roleForm.dutyUser1" style="display: none;"></el-input>
|
|
<el-input v-model="roleForm.dutyUserName1" :disabled="true" placeholder="责任工程师">
|
|
</el-input>
|
|
</div>
|
|
</el-form-item>
|
|
</el-card>
|
|
</el-timeline-item>
|
|
<el-timeline-item timestamp="审批" placement="top" :color="roleForm.startUser ? '#66b1ff' : ''">
|
|
<el-card>
|
|
<el-form-item prop="partUserId" style="margin-bottom: 0">
|
|
<h4>参会人员所在部门负责人</h4>
|
|
<div style="margin-top: 10px;width: 300px;">
|
|
<el-input v-model="roleForm.partUserId" style="display: none;"></el-input>
|
|
<el-input v-model="roleForm.partUser" :disabled="true" placeholder="参会人员所在部门负责人">
|
|
</el-input>
|
|
</div>
|
|
</el-form-item>
|
|
</el-card>
|
|
</el-timeline-item>
|
|
<el-timeline-item timestamp="汇总修订" placement="top" :color="roleForm.startUser ? '#66b1ff' : ''">
|
|
<el-card>
|
|
<el-form-item prop="startUserName" style="margin-bottom: 0">
|
|
<h4>标准法规部人员</h4>
|
|
<div style="margin-top: 10px;width: 300px;">
|
|
<el-input v-model="roleForm.startUser" style="display: none;"></el-input>
|
|
<el-input v-model="roleForm.startUserName" :disabled="true" placeholder="选择标准法规部人员">
|
|
</el-input>
|
|
</div>
|
|
</el-form-item>
|
|
</el-card>
|
|
</el-timeline-item>
|
|
<el-timeline-item timestamp="审批" placement="top" :color="roleForm.leaderUser ? '#66b1ff' : ''">
|
|
<el-card>
|
|
<el-form-item prop="leaderUser" style="margin-bottom: 0">
|
|
<h4>标准法规部主管领导</h4>
|
|
<div style="margin-top: 10px;width: 300px;">
|
|
<el-input v-model="roleForm.leaderUserId" style="display: none;"></el-input>
|
|
<el-input v-model="roleForm.leaderUser" placeholder="选择标准法规部主管领导" @click.native="choiceZRROne('leaderUser', '选择标准法规部主管领导', roleForm.leaderUser)">
|
|
</el-input>
|
|
</div>
|
|
</el-form-item>
|
|
</el-card>
|
|
</el-timeline-item>
|
|
<el-timeline-item timestamp="会签" placement="top" :color="roleForm.feeUser ? '#66b1ff' : ''">
|
|
<el-card>
|
|
<el-form-item prop="feeUser" style="margin-bottom: 0">
|
|
<h4>费用管理部门</h4>
|
|
<div style="margin-top: 10px;width: 300px;">
|
|
<el-input v-model="roleForm.feeUserId" style="display: none;"></el-input>
|
|
<el-input v-model="roleForm.feeUser" placeholder="选择费用管理部门" @click.native="choiceZRR('feeUser', '选择费用管理部门', roleForm.feeUser)">
|
|
</el-input>
|
|
</div>
|
|
</el-form-item>
|
|
</el-card>
|
|
</el-timeline-item>
|
|
<el-timeline-item timestamp="审定" placement="top" :color="roleForm.engineerUser ? '#66b1ff' : ''">
|
|
<el-card>
|
|
<el-form-item prop="engineerUser" style="margin-bottom: 0">
|
|
<h4>业务主管副院长 </h4>
|
|
<div style="margin-top: 10px;width: 300px;">
|
|
<el-input v-model="roleForm.engineerUserId" style="display: none;"></el-input>
|
|
<el-input v-model="roleForm.engineerUser" placeholder="选择业务主管副院长 " @click.native="choiceZRROne('engineerUser', '选择业务主管副院长 ', roleForm.engineerUser)">
|
|
</el-input>
|
|
</div>
|
|
</el-form-item>
|
|
</el-card>
|
|
</el-timeline-item>
|
|
<el-timeline-item timestamp="批准" placement="top" :color="roleForm.startUser ? '#66b1ff' : ''">
|
|
<el-card>
|
|
<el-form-item prop="directorUserName" style="margin-bottom: 0">
|
|
<h4>院长</h4>
|
|
<div style="margin-top: 10px;width: 300px;">
|
|
<el-input v-model="roleForm.directorUserId" style="display: none;"></el-input>
|
|
<el-input v-model="roleForm.directorUserName" placeholder="选择院长" @click.native="choiceZRROne('directorUserId', '选择院长', roleForm.directorUserName)">
|
|
</el-input>
|
|
</div>
|
|
</el-form-item>
|
|
</el-card>
|
|
</el-timeline-item>
|
|
</el-form>
|
|
</el-timeline>
|
|
</div>
|
|
</div>
|
|
|
|
<el-dialog width='400px' :visible.sync="fileMadel" title="上传附件">
|
|
<el-upload
|
|
class="upload-demo"
|
|
:disabled="acceptShow"
|
|
multiple
|
|
ref="uploadFile"
|
|
:action="uploadPath"
|
|
name="file"
|
|
drag
|
|
:file-list="rh_pageData.infoSources"
|
|
accept=".docx, .DOCX, .xls, .xlsx, .pdf, .PDF, .pptx"
|
|
:http-request="httpRequest"
|
|
:before-upload="handleBeforeUpload"
|
|
:before-remove="handleBeforeRemove"
|
|
:on-success="handleOnsuccess"
|
|
>
|
|
<div style="padding: 20px 0">
|
|
<i class="el-icon-upload" style="color: #3399ff"></i>
|
|
<p>点击或拖拽上传文件</p>
|
|
</div>
|
|
</el-upload>
|
|
</el-dialog>
|
|
|
|
<ProcessFooter
|
|
show-save
|
|
show-submit
|
|
:submitLoading="isSubmit"
|
|
:saveLoading="saveLoading"
|
|
@save="handleSave"
|
|
@submit="handleSubmit"
|
|
>
|
|
</ProcessFooter>
|
|
<Role-tree
|
|
check-box
|
|
is-title="选择人员信息"
|
|
:is-visible.sync="roleShowflagOne"
|
|
:nodeList="nodeListOne"
|
|
@checkedRole="drawerCheckOne"
|
|
/>
|
|
<Role-tree
|
|
is-title="选择人员信息"
|
|
:is-visible.sync="roleShowflag"
|
|
:nodeList="nodeList"
|
|
@checkedRole="drawerCheck"
|
|
/>
|
|
<Role-tree
|
|
check-box
|
|
is-title="选择联络人"
|
|
:is-visible.sync="telShowflag"
|
|
:nodeList="nodeListTel"
|
|
@checkedRole="drawerCheckTel"
|
|
/>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import ProcessHeader from "../../components/ProcessHeader";
|
|
import ProcessFooter from "../../components/ProcessFooter";
|
|
import ProcessTitle from "../../components/ProcessTitle";
|
|
import { completeTask, processBack, queryTaskFirst, saveTaskFirst, taskDel, upFile, workGroup } from "@/api/process.js";
|
|
|
|
export default {
|
|
components: {
|
|
ProcessHeader,
|
|
ProcessFooter,
|
|
ProcessTitle
|
|
},
|
|
name: "bzrhStep1",
|
|
data() {
|
|
return {
|
|
active: '1', // 默认显示
|
|
fileMadel: false,
|
|
rh_pageData: {
|
|
comityName: '',
|
|
comityNameOne: '',
|
|
comityNameTwo: '',
|
|
comityRole: '',
|
|
comityState: '',
|
|
comityKind: '',
|
|
infoSources: [],
|
|
comityMake: {
|
|
makeQualification: '',
|
|
makeRole: '',
|
|
makeCost: '',
|
|
makeDuties: '',
|
|
makeTime: '',
|
|
},
|
|
workPath: '',
|
|
comityTel: [],
|
|
fillPeople: '',
|
|
fillPeopleId: '',
|
|
fillUnit: '',
|
|
fillDept: '',
|
|
fillPost: '',
|
|
fillTel: '',
|
|
fillMail: '',
|
|
fillLeader: '',
|
|
fillLeaderId: '',
|
|
fillFile: [],
|
|
comityOptionsOne: [],
|
|
comityOptionsTwo: [],
|
|
comityOptionsTree: [],
|
|
comityOpRole: '',
|
|
comityOpRoleId: '',
|
|
},
|
|
comityRoleOptions: [
|
|
{value: '0', label: '委员'},
|
|
{value: '1', label: '观察委员'},
|
|
{value: '2', label: '通讯委员'},
|
|
{value: '3', label: '成员'}
|
|
],
|
|
comityStateOptions: [
|
|
{value: '0', label: '常设机构'},
|
|
{value: '1', label: '临时机构'}
|
|
],
|
|
comityKindOptions: [
|
|
{value: '0', label: '新增'},
|
|
{value: '1', label: '换届'},
|
|
{value: '2', label: '委员改选'}
|
|
],
|
|
/** 上传相关 */
|
|
acceptShow: false,
|
|
// 上传路径
|
|
uploadPath: 'api/att/attFile/upload',
|
|
// 上传所储存文件数组
|
|
fileTextList: [],
|
|
newDataList: [],
|
|
|
|
deleteDataList: [],
|
|
|
|
unqualidiedData: [],
|
|
|
|
roleForm: {
|
|
startUserName: this.$store.getters.userInfo.userName,
|
|
startUser: this.$store.getters.userInfo.userId,
|
|
dockUserName: '',
|
|
dockUser: '',
|
|
leaderUser: '',
|
|
leaderUserId: '',
|
|
feeUser: '',
|
|
feeUserId: '',
|
|
engineerUser: '',
|
|
engineerUserId: '',
|
|
directorUserId: '',
|
|
directorUserName: '',
|
|
},
|
|
rh_rules: {},
|
|
roleFormRules: {
|
|
dockUserName: [{required: true, message: "请选择标准法规工程师", trigger: ['blur', 'change']}],
|
|
startUserName: [{required: true, message: "请选择标准法规部人员", trigger: ['blur', 'change']}],
|
|
leaderUser: [{required: true, message: "请选择标准法规部主管领导", trigger: ['blur', 'change']}],
|
|
feeUser: [{required: true, message: "请选择费用管理部门人员", trigger: ['blur', 'change']}],
|
|
engineerUser: [{required: true, message: "请选择业务主管副院长 ", trigger: ['blur', 'change']}],
|
|
directorUserName: [{required: true, message: "请选择院长", trigger: ['blur', 'change']}],
|
|
},
|
|
roleShowflag: false,
|
|
roleShowflagOne: false,
|
|
telShowflag: false,
|
|
nodeList: [],
|
|
nodeListOne: [],
|
|
nodeListTel: [],
|
|
isSubmit: false,
|
|
saveLoading: false,
|
|
|
|
commentInfo: '',
|
|
bpnId: ''
|
|
}
|
|
},
|
|
|
|
mounted() {
|
|
this.bpnId = this.$route.query.bpnId
|
|
if (this.bpnId !== undefined) {
|
|
this.getData()
|
|
}
|
|
let type = {
|
|
type: 0
|
|
}
|
|
workGroup(type).then(res => {
|
|
this.rh_pageData.comityOptionsOne = res.data.children
|
|
})
|
|
},
|
|
methods: {
|
|
// 右上标签页面切换
|
|
handleTabs(name) {
|
|
this.active = name
|
|
},
|
|
/** 获取分标委数据字典数据 */
|
|
comityChange() {
|
|
this.rh_pageData.comityNameOne = ''
|
|
this.rh_pageData.comityNameTwo = ''
|
|
this.rh_pageData.comityOptionsOne.forEach(item => {
|
|
if (item.children !== null && item.id === this.rh_pageData.comityName) {
|
|
this.rh_pageData.comityOptionsTwo = item.children
|
|
}
|
|
})
|
|
},
|
|
/** 获取工作组字典数据 */
|
|
comityChangeOne() {
|
|
this.rh_pageData.comityNameTwo = ''
|
|
this.rh_pageData.comityOptionsTwo.forEach(item => {
|
|
if (item.children !== null && item.id === this.rh_pageData.comityNameOne) {
|
|
this.rh_pageData.comityOptionsTree = item.children
|
|
}
|
|
})
|
|
},
|
|
getData() {
|
|
queryTaskFirst({
|
|
bpnId: this.$route.query.bpnId
|
|
}).then(res => {
|
|
let mes = JSON.parse(res.mes)
|
|
this.rh_pageData = mes.rh_pageData
|
|
this.commentInfo = mes.commentInfo
|
|
this.roleForm = mes.roleForm
|
|
});
|
|
},
|
|
//上传按钮
|
|
uploadFile() {
|
|
this.fileMadel = true
|
|
},
|
|
// 文件上传限制条件
|
|
handleBeforeUpload(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 === ".docx" || fileSuffix === ".DOCX"
|
|
|| fileSuffix === ".xls" || fileSuffix === ".xlsx" || fileSuffix === ".pdf" || fileSuffix === ".PDF"
|
|
|| fileSuffix === ".PNG" || fileSuffix === ".JPG" || fileSuffix === ".JPEG" || fileSuffix === ".pptx"
|
|
|| fileSuffix === ".doc" || fileSuffix === ".DOC" || fileSuffix === ".bmp") {
|
|
return true;
|
|
} else {
|
|
this.spinShow = false;
|
|
this.$message.error("文件" + file.name + "格式不正确,请上传DOCX/PDF或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
|
|
},
|
|
// 移除上传的文件
|
|
handleBeforeRemove(file, fileList) {
|
|
this.fileData = fileList
|
|
this.rh_pageData.infoSources.forEach((item, index) => {
|
|
if (item.name === file.name || item.id === file.id) {
|
|
this.rh_pageData.infoSources.splice(index, 1)
|
|
}
|
|
})
|
|
},
|
|
/** 覆盖默认的上传行为,实现多个文件一起上传 */
|
|
httpRequest(params) {
|
|
const file = params.file
|
|
// 根据后台需求数据格式
|
|
const form = new FormData()
|
|
// 文件对象
|
|
form.append("file", file)
|
|
upFile(form).then(res=>{
|
|
if (res.ok) {
|
|
this.handleOnsuccess(res)
|
|
} else {
|
|
this.$message.warning("上传失败");
|
|
this.fileMadel = false;
|
|
}
|
|
})
|
|
},
|
|
// 文件上传成功
|
|
handleOnsuccess(res, file, fileList) {
|
|
if (res.ok) {
|
|
if (this.rh_pageData.infoSources !== null) {
|
|
this.newDataList = this.rh_pageData.infoSources
|
|
this.newDataList.push({
|
|
id: res.data.attId,
|
|
name: res.data.name
|
|
})
|
|
} else {
|
|
this.newDataList.push({
|
|
id: res.data.attId,
|
|
name: res.data.name
|
|
})
|
|
}
|
|
this.rh_pageData.infoSources = this.newDataList
|
|
this.$message({
|
|
showClose: true,
|
|
message: res.message,
|
|
type: 'success'
|
|
})
|
|
this.fileMadel = false
|
|
}
|
|
},
|
|
fileLook(file) { // 预览
|
|
const attId = file.id
|
|
this.$preview(attId)
|
|
},
|
|
filesUpload (file) { // 下载
|
|
const attId = file.id
|
|
if (attId) {
|
|
window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + attId
|
|
} else {
|
|
this.$message.warning('文件不存在,下载失败')
|
|
}
|
|
},
|
|
|
|
|
|
/** 添加 */
|
|
add_comityTel() {
|
|
var list = {
|
|
tel_name: this.tel_name,
|
|
tel_unit: this.tel_unit,
|
|
tel_phone: this.tel_phone,
|
|
tel_mail: this.tel_mail
|
|
}
|
|
this.rh_pageData.comityTel.push(list)
|
|
},
|
|
/** 批量删除 */
|
|
del_comityTel() {
|
|
if (this.deleteDataList.length < 1) {
|
|
this.$message.warning("请选择一条数据进行删除");
|
|
} else {
|
|
this.$confirm("您确认删除这些数据?", "提示", {
|
|
confirmButtonText: "确认",
|
|
confirmButtonClass: "common-button-primary",
|
|
cancelButtonText: "取消",
|
|
type: "warning"
|
|
}).then(() => {
|
|
let exits = [];
|
|
this.deleteDataList.map(item => {
|
|
let index;
|
|
index = this.rh_pageData.comityTel.findIndex(items => {
|
|
return items === item;
|
|
});
|
|
if (index > -1) {
|
|
this.rh_pageData.comityTel.splice(index, 1);
|
|
}
|
|
exits.push(item);
|
|
});
|
|
this.deleteDataList = [];
|
|
}).catch(() => {
|
|
});
|
|
}
|
|
},
|
|
// 协会外部联系方式批量选择
|
|
selectedDelete(val) {
|
|
this.deleteDataList = val
|
|
},
|
|
|
|
// 列表选人
|
|
choiceTel(type, title, val,id) {
|
|
this.choiceTelList = val
|
|
this.nodeListTel = []
|
|
this.nodeListTel.push(id)
|
|
this.type = type
|
|
this.telShowflag = true
|
|
},
|
|
drawerCheckTel(data) {
|
|
if(data.length > 0) {
|
|
this.choiceTelList.tel_nameId = data[0].id
|
|
this.choiceTelList.tel_name = data[0].name
|
|
}
|
|
this.telShowflag = false
|
|
},
|
|
// 流程阶段负责人选择
|
|
choiceZRR(type, title, id) {
|
|
this.nodeList = []
|
|
this.nodeList.push(id)
|
|
this.type = type
|
|
this.drawerTitle = title
|
|
this.roleShowflag = true
|
|
},
|
|
drawerCheck(data) {
|
|
var idList = ''
|
|
var nameList = ''
|
|
data.forEach(item => {
|
|
if (nameList.length > 0) {
|
|
nameList += ','
|
|
idList += ','
|
|
}
|
|
idList += item.id;
|
|
nameList += item.name;
|
|
});
|
|
if (this.type === 'feeUser') {
|
|
this.roleForm.feeUser = nameList
|
|
this.roleForm.feeUserId = idList
|
|
} else {
|
|
this.roleForm.dockUser = idList
|
|
this.roleForm.dockUserName = nameList
|
|
// this.rh_pageData.comityInRole = nameList
|
|
// this.rh_pageData.comityInRoleId = idList
|
|
}
|
|
this.roleShowflag = false
|
|
},
|
|
|
|
// 流程阶段人选择
|
|
choiceZRROne(type, title, id) {
|
|
this.nodeListOne = []
|
|
this.nodeListOne.push(id)
|
|
this.type = type
|
|
this.drawerTitleOne = title
|
|
this.roleShowflagOne = true
|
|
},
|
|
drawerCheckOne(data) {
|
|
this.unqualidiedData.forEach(item => {
|
|
item.engineer = data[0].name
|
|
item.engineerId = data[0].id
|
|
})
|
|
if (this.type === 'leaderUser') {
|
|
this.roleForm.leaderUser = data[0].name
|
|
this.roleForm.leaderUserId = data[0].id
|
|
} else if (this.type === 'engineerUser') {
|
|
this.roleForm.engineerUser = data[0].name
|
|
this.roleForm.engineerUserId = data[0].id
|
|
}else {
|
|
this.roleForm.directorUserName = data[0].name
|
|
this.roleForm.directorUserId = data[0].id
|
|
}
|
|
this.roleShowflagOne = false
|
|
},
|
|
|
|
// 保存按钮
|
|
handleSave() {
|
|
this.saveLoading = true
|
|
let _formData = new FormData()
|
|
_formData.append('id', this.bpnId || '')
|
|
_formData.append('createUser', this.$store.getters.userInfo.userId)
|
|
_formData.append('createUserName', this.$store.getters.userInfo.userName)
|
|
_formData.append('prcType', '20')
|
|
_formData.append('json', JSON.stringify({
|
|
roleForm: this.roleForm,
|
|
rh_pageData: this.rh_pageData,
|
|
commentInfo: this.commentInfo
|
|
}))
|
|
saveTaskFirst(_formData).then(res => {
|
|
this.saveLoading = false
|
|
this.$message.success('保存成功')
|
|
this.bpnId = res.result
|
|
}).catch(e => {
|
|
this.saveLoading = false
|
|
})
|
|
},
|
|
// 提交按钮
|
|
handleSubmit() {
|
|
let json = {
|
|
prcCreateUser: this.$store.getters.userInfo.userId,
|
|
prcCreateUserName: this.$store.getters.userInfo.userName,
|
|
roleList: this.roleForm,
|
|
rh_pageData: this.rh_pageData,
|
|
commentText: this.commentInfo,
|
|
roleForm: this.roleForm,
|
|
directorList: this.roleForm.dockUser,
|
|
}
|
|
this.$refs['rh_pageData'].validate((valid) => {
|
|
if (valid) {
|
|
this.$refs['roleForm'].validate((valid) => {
|
|
if (valid) {
|
|
this.isSubmit = true
|
|
let paramsInfo = new FormData()
|
|
// paramsInfo.append('id', this.bpnId || '')
|
|
paramsInfo.append('createUser', this.$store.getters.userInfo.userId)
|
|
paramsInfo.append('createUserName', this.$store.getters.userInfo.userName)
|
|
paramsInfo.append('type', '20')
|
|
paramsInfo.append('json', JSON.stringify({json}))
|
|
processBack(paramsInfo).then(res => {
|
|
this.taskID = res.data
|
|
const params = new FormData();
|
|
params.set('json', JSON.stringify(json))
|
|
params.set('userId', this.$store.getters.userInfo.userId)
|
|
params.set('taskId', this.taskID)
|
|
completeTask(params).then(res => {
|
|
if (res.success === true) {
|
|
this.$message.success('提交成功')
|
|
if (this.bpnId !== '') {
|
|
let taskId = {
|
|
id: this.bpnId
|
|
}
|
|
taskDel(taskId).then(res => {
|
|
return res
|
|
})
|
|
}
|
|
this.$router.push("/processCenter");
|
|
}
|
|
this.isSubmit = false
|
|
})
|
|
})
|
|
} else {
|
|
this.$message.warning('请完成流程信息的人员选择')
|
|
}
|
|
})
|
|
}
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
@import '~@/assets/styles/style';
|
|
|
|
.bzrhStep1 {
|
|
position: relative;
|
|
height: 100%;
|
|
|
|
/deep/ .el-drawer__container {
|
|
.prc-content-border {
|
|
border: none;
|
|
padding: 0 20px 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;
|
|
}
|
|
}
|
|
|
|
.content-center {
|
|
padding: 10px 0px 10px 10px;
|
|
}
|
|
|
|
.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;
|
|
}
|
|
}
|
|
}
|
|
|
|
.content_form {
|
|
padding-top: 15px;
|
|
|
|
.el-divider--horizontal {
|
|
margin-top: 0px;
|
|
}
|
|
|
|
/deep/ .el-table__body-wrapper {
|
|
height: auto !important;
|
|
}
|
|
|
|
/deep/ .el-textarea__inner {
|
|
font-family: inherit;
|
|
}
|
|
|
|
.make_form {
|
|
padding: 10px;
|
|
|
|
/deep/ .el-form-item__label-wrap {
|
|
margin-left: 0 !important;
|
|
}
|
|
|
|
/deep/ .el-form-item__content {
|
|
margin-left: 40px !important;
|
|
}
|
|
|
|
.el-input {
|
|
padding-bottom: 10px;
|
|
width: 85%;
|
|
}
|
|
}
|
|
|
|
.comityTel_btn {
|
|
text-align: right;
|
|
}
|
|
|
|
/deep/.el-form-item__content{
|
|
margin-top: 3px;
|
|
}
|
|
/deep/ .el-table th {
|
|
padding: 0px;
|
|
}
|
|
}
|
|
}
|
|
</style>
|