Files
foton-laws-system-front/src/pages/processCenter/pages/creatProcess/xmqdqr/step3.vue
T
2021-12-02 20:17:07 +08:00

1319 lines
49 KiB
Vue

<template>
<div class="xmqdqr-step2">
<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 === '3' ? 'active' : ''" @click="handleTabs('3')">审批历史</div>
</div>
<div class="content" v-show="active === '1'">
<div style="flex: auto; overflow: auto">
<process-title>
<template slot="title">基础信息</template>
</process-title>
<el-form
:model="qdform"
class="label-input-form prc-content-border"
label-width="150px"
>
<el-row :gutter="24">
<el-col :span="24">
<el-form-item label="项目编号" prop="projectNumber" class="add-form-item form-item-disabled">
<el-input
v-model="qdform.projectNumber"
placeholder="请输入项目编号"
disabled
clearable
></el-input>
</el-form-item>
<el-form-item label="项目名称" prop="projectName" class="add-form-item form-item-disabled">
<el-input
v-model="qdform.projectName"
placeholder="请输入项目名称"
disabled
clearable
></el-input>
</el-form-item>
<el-form-item label="清单名称" prop="detailedListName" class="add-form-item form-item-disabled">
<el-input
v-model="qdform.detailedListName"
placeholder="请输入清单名称"
disabled
clearable
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<process-title style="margin-top:5px; margin-bottom: 5px">
<template slot="title">填写信息</template>
</process-title>
<div class="tableTitle">
<div class="tableButton">
<el-button :disabled="acceptShow" plain class="common-button-primary" size="mini" @click="addList">添加</el-button>
<el-button :disabled="acceptShow" plain class="common-button-primary" size="mini" @click="delectList">批量删除</el-button>
</div>
</div>
<el-table
:data="dataList"
border
ref="selection"
height="59%"
@selection-change="selectStandChange"
style="width: 100%; border:1px solid #ccc"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}">
<el-table-column
type="selection"
width="55"
align="center">
</el-table-column>
<el-table-column
align="center"
width="200px"
label="标准号"
>
<template slot-scope="scope">
<a v-if="scope.row.standYear" class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.standSort
}} {{ scope.row.standNumber }}-{{ scope.row.standYear }}</a>
<a v-else @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standSort }}
{{ scope.row.standNumber }}</a>
</template>
</el-table-column>
<el-table-column
prop="standName"
align="center"
label="中文名称"
width="180px"
>
<template slot-scope="scope">
<a @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standName }}</a>
</template>
</el-table-column>
<el-table-column
prop="standEnName"
label="英文名称"
align="center"
width="180px"
>
<template slot-scope="scope">
<a @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standEnName }}</a>
</template>
</el-table-column>
<el-table-column
prop="ssrq"
width="190px"
align="center"
sortable
label="标准实施日期">
<template slot-scope="scope">
<span>{{ scope.row.ssrq ? $moment(scope.row.ssrq).format("YYYY-MM-DD") : "" }}</span>
</template>
</el-table-column>
<el-table-column
prop="xcxssrqgj"
width="190px"
align="center"
label="新车型实施日期">
<template slot-scope="scope">
<span>{{ scope.row.xcxssrqgj ? $moment(scope.row.xcxssrqgj).format("YYYY-MM-DD") : "" }}</span>
</template>
</el-table-column>
<el-table-column
prop="zccssrqgj"
align="center"
sortable
width="190px"
label="在产车实施日期">
<template slot-scope="scope">
<span>{{ scope.row.zccssrqgj ? $moment(scope.row.zccssrqgj).format("YYYY-MM-DD") : "" }}</span>
</template>
</el-table-column>
<el-table-column
prop="zrbm"
label="责任部门"
align="center"
width="180px"
>
</el-table-column>
<el-table-column
prop="involve"
width="160px"
align="center"
label="标准是否涉及">
<template slot-scope="scope">
<el-select v-model="scope.row.involve"
placeholder="请选择涉不涉及"
max-length="30"
clearable>
<el-option value="involve" label="涉及"></el-option>
<el-option value="noInvolve" label="不涉及"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column
prop="remarks"
align="center"
width="180"
label="备注">
<template slot-scope="scope">
<el-input
v-model.trim="dataList[scope.$index].remarks"
placeholder="请输入备注"
>
</el-input>
</template>
</el-table-column>
</el-table>
</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="commentText">
</el-input>
</div>
</el-collapse-item>
</el-collapse>
</div>
</div>
<div class="content" v-show="active === '3'">
<div class="flow-list" style="height: 100%">
<el-table
height="100%"
ref="selection"
:data="detailData"
tooltip-effect="dark"
style="width: 100%"
border
row-key="id"
:no-data-text="listNoDataText"
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
>
<el-table-column
type="selection"
width="55"
align="center">
</el-table-column>
<el-table-column
prop="name"
label="任务步骤"
align="center"
>
</el-table-column>
<el-table-column
prop="assignee"
label="任务受理人"
align="center"
>
</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") : "" }}</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") : "" }}</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>
<loading :loading="loading">流程列表加载中</loading>
</div>
</div>
<!-- 添加标准抽屉-->
<el-drawer
title="添加标准"
:wrapperClosable="false"
:visible.sync="standModel"
size="900px"
custom-class="demo-drawer"
>
<div class="demo-drawer-content">
<el-form
class="label-input-form"
style="margin-top: 15px;"
label-width="130px"
:modal="handleSelectForm"
:inline="true"
>
<el-form-item label="标准/政策来源" class="search-item">
<el-select
v-model="handleSelectForm.dataSource"
@change="dataSourceChange"
:popper-append-to-body="false"
placeholder="请选择标准来源">
<el-option value="INLAND" label="国内标准库"></el-option>
<el-option value="FOREIGN" label="海外标准库"></el-option>
<!-- <el-option value="FOREIGN_LAWS" label="国内外政策库"></el-option>-->
<el-option value="BUSINESS_STAND" label="企业标准库"></el-option>
</el-select>
</el-form-item>
<el-form-item label="标准编号" class="search-item">
<el-input
v-model="handleSelectForm.lawNumber"
@change="lawNumberSearch"
placeholder="根据标准编号查找"
clearable
:maxlength="100"></el-input>
</el-form-item>
<!-- <el-form-item label="标准名称/政策名称" class="search-item">-->
<!-- <el-input-->
<!-- v-model="handleSelectForm.lawName"-->
<!-- @change="lawNameSearch"-->
<!-- placeholder="根据标准名称/政策名称查找"-->
<!-- clearable-->
<!-- :maxlength="100"></el-input>-->
<!-- </el-form-item>-->
<el-form-item class="search-item btn-box">
<el-button
size="small"
type="primary"
class="common-button-primary"
@click="searchLawBtn">
查询
</el-button>
</el-form-item>
<el-form-item class="search-item btn-box">
<el-button
class="common-button-default"
size="small"
type="default"
@click="clearLawBtn">
清空
</el-button>
</el-form-item>
</el-form>
<loading :loading="lawInfoTableLoading">数据获取中</loading>
<el-table
ref="selections"
tooltip-effect="dark"
style="width: 100%;overflow-y: auto;overflow-x: hidden;"
border
:loading="lawInfoTableLoading"
:data="lawInfoTable"
:height="300"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
@selection-change="handleSelectTableChange"
>
<el-table-column
fixed="left"
type="selection"
width="55"
align="center">
</el-table-column>
<div v-if="handleSelectForm.dataSource === 'INLAND'">
<el-table-column
label="标准号"
width="150"
>
<template slot-scope="scope">
<a v-if="scope.row.standYear && textStatusMap[scope.row.textStatus] === '废止' || textStatusMap[scope.row.textStatus] === '被代替'" class="table-jump" style="color: #F56C6C"
@click="handlePreview(scope.row)">{{ scope.row.standSortShow }} {{
scope.row.standNumber
}}-{{ scope.row.standYear }}</a>
<a v-else-if="scope.row.standYear" class="table-jump" style="color: #333333"
@click="handlePreview(scope.row)">{{ scope.row.standSortShow }} {{
scope.row.standNumber
}}-{{ scope.row.standYear }}</a>
<a v-else @click="handlePreview(scope.row)" class="table-jump" style="color: #333333">
{{ scope.row.standSortShow }}
{{ scope.row.standNumber }}</a>
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="standName"
label="标准名称"
min-width="300"
>
<template slot-scope="scope">
<a v-if="textStatusMap[scope.row.textStatus] === '废止' || textStatusMap[scope.row.textStatus] === '被代替'" @click="handlePreview(scope.row)" class="table-jump" style="color: #F56C6C">{{ scope.row.standName }}</a>
<a v-else @click="handlePreview(scope.row)" style="color: #333333" class="table-jump">{{ scope.row.standName }}</a>
</template>
</el-table-column>
<el-table-column
prop="issueTime"
sortable="custom"
width="120"
label="发布日期">
<template slot-scope="scope">
<span v-if="textStatusMap[scope.row.textStatus] === '废止' || textStatusMap[scope.row.textStatus] === '被代替'" style="color: #F56C6C">{{ formatIssueDate(scope.row.issueTime) }}</span>
<span v-else>{{ formatIssueDate(scope.row.issueTime) }}</span>
</template>
</el-table-column>
<el-table-column
prop="SSRQ"
sortable="custom"
width="120"
label="实施日期">
<template slot-scope="scope">
<!-- {{ formatIssueDate(scope.row.putTime) }}-->
<span v-if="textStatusMap[scope.row.textStatus] === '废止' || textStatusMap[scope.row.textStatus] === '被代替'" style="color: #F56C6C">{{ scope.row.SSRQ ? scope.row.SSRQ.substring(0, 10) : '-' }}</span>
<span v-else>{{ scope.row.SSRQ ? scope.row.SSRQ.substring(0, 10) : '-' }}</span>
</template>
</el-table-column>
<el-table-column
prop="XCXSSRQ"
sortable="custom"
width="150"
label="新车型实施日期">
<template slot-scope="scope">
<span v-if="textStatusMap[scope.row.textStatus] === '废止' || textStatusMap[scope.row.textStatus] === '被代替'" style="color: #F56C6C">{{ scope.row.XCXSSRQ ? scope.row.XCXSSRQ.substring(0, 10) : '-' }}</span>
<span v-else>{{ scope.row.XCXSSRQ ? scope.row.XCXSSRQ.substring(0, 10) : '-' }}</span>
</template>
</el-table-column>
<el-table-column
prop="ZCCSSRQ"
sortable="custom"
width="150"
label="在产车实施日期">
<template slot-scope="scope">
<span v-if="textStatusMap[scope.row.textStatus] === '废止' || textStatusMap[scope.row.textStatus] === '被代替'" style="color: #F56C6C">{{ scope.row.ZCCSSRQ ? scope.row.ZCCSSRQ.substring(0, 10) : '-' }}</span>
<span v-else>{{ scope.row.ZCCSSRQ ? scope.row.ZCCSSRQ.substring(0, 10) : '-' }}</span>
</template>
</el-table-column>
<el-table-column
prop="textStatus"
sortable="custom"
width="110"
label="文本状态">
<!-- <template slot="header" slot-scope="scope">-->
<!-- <el-tooltip class="item" effect="dark" content="计划修订”、“修订中”均为现行有效版本;“已修订”标准的有效性根据实际实施情况判定。" placement="bottom">-->
<!-- <span>文本状态<i class="el-icon-warning-outline"></i></span>-->
<!-- </el-tooltip>-->
<!-- </template>-->
<template slot-scope="scope">
<span v-if="textStatusMap[scope.row.textStatus] === '废止' || textStatusMap[scope.row.textStatus] === '被代替'" style="color: #F56C6C">{{
textStatusMap[scope.row.textStatus]
}}</span>
<span v-else>{{ textStatusMap[scope.row.textStatus] }}</span>
</template>
</el-table-column>
</div>
<div v-if="handleSelectForm.dataSource === 'FOREIGN'">
<el-table-column
label="标准号"
width="150"
>
<template slot-scope="scope">
<a v-if="scope.row.standYear && textStatusMap[scope.row.textStatus] === '废止' || textStatusMap[scope.row.textStatus] === '被代替'" style="color: #F56C6C" class="table-jump" @click="handlePreview(scope.row)">{{
scope.row.standSortShow
}} {{ scope.row.standNumber }}-{{ scope.row.standYear }}</a>
<a v-else-if="scope.row.standYear && textStatusMap[scope.row.textStatus] === '——' " style="color: #409EFF" class="table-jump" @click="handlePreview(scope.row)">{{
scope.row.standSortShow
}} {{ scope.row.standNumber }}-{{ scope.row.standYear }}</a>
<a v-else-if="scope.row.standYear" style="color: #333333" class="table-jump" @click="handlePreview(scope.row)">{{
scope.row.standSortShow
}} {{ scope.row.standNumber }}-{{ scope.row.standYear }}</a>
<a v-else style="color: #333333" @click="handlePreview(scope.row)" class="table-jump">{{
scope.row.standSortShow
}}
{{ scope.row.standNumber }}</a>
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="standName"
label="标准名称"
min-width="300"
>
<template slot-scope="scope">
<a v-if="textStatusMap[scope.row.textStatus] === '废止' || textStatusMap[scope.row.textStatus] === '被代替'" style="color: #F56C6C" @click="handlePreview(scope.row)" class="table-jump">{{
scope.row.standName
}}</a>
<a v-else-if="textStatusMap[scope.row.textStatus] === '——' " style="color: #409EFF" @click="handlePreview(scope.row)" class="table-jump">{{
scope.row.standName
}}</a>
<a v-else style="color: #333333" @click="handlePreview(scope.row)" class="table-jump">{{
scope.row.standName
}}</a>
</template>
</el-table-column>
<el-table-column
prop="issueTime"
sortable="custom"
width="120"
label="发布日期">
<template slot-scope="scope">
<div v-if="textStatusMap[scope.row.textStatus] === '废止' || textStatusMap[scope.row.textStatus] === '被代替'" style="color: #F56C6C">
{{ formatIssueDate(scope.row.issueTime) }}
</div>
<div v-else-if="textStatusMap[scope.row.textStatus] === '——' " style="color: #409EFF">
{{ formatIssueDate(scope.row.issueTime) }}
</div>
<div v-else style="color: #333333">
{{ formatIssueDate(scope.row.issueTime) }}
</div>
</template>
</el-table-column>
<el-table-column
prop="SSRQ"
sortable="custom"
width="120"
label="实施日期">
<template slot-scope="scope">
<!-- {{ formatIssueDate(scope.row.putTime) }}-->
<span v-if="textStatusMap[scope.row.textStatus] === '废止' || textStatusMap[scope.row.textStatus] === '被代替'" style="color: #F56C6C">{{
scope.row.SSRQ ? scope.row.SSRQ.substring(0, 10) : '-'
}}</span>
<span v-else-if="textStatusMap[scope.row.textStatus] === '——' " style="color: #409EFF">{{
scope.row.SSRQ ? scope.row.SSRQ.substring(0, 10) : '-'
}}</span>
<span v-else style="color: #333333">{{ scope.row.SSRQ ? scope.row.SSRQ.substring(0, 10) : '-' }}</span>
</template>
</el-table-column>
<el-table-column
prop="XCXSSRQ"
sortable="custom"
width="150"
label="新车型实施日期">
<template slot-scope="scope">
<span v-if="textStatusMap[scope.row.textStatus] === '废止' || textStatusMap[scope.row.textStatus] === '被代替'" style="color: #F56C6C">{{
scope.row.XCXSSRQ ? scope.row.XCXSSRQ.substring(0, 10) : '-'
}}</span>
<span v-else-if="textStatusMap[scope.row.textStatus] === '——' " style="color: #409EFF">{{
scope.row.XCXSSRQ ? scope.row.XCXSSRQ.substring(0, 10) : '-'
}}</span>
<span v-else style="color: #333333">{{
scope.row.XCXSSRQ ? scope.row.XCXSSRQ.substring(0, 10) : '-'
}}</span>
</template>
</el-table-column>
<el-table-column
prop="ZCCSSRQ"
sortable="custom"
width="150"
label="在产车实施日期">
<template slot-scope="scope">
<span v-if="textStatusMap[scope.row.textStatus] === '废止' || textStatusMap[scope.row.textStatus] === '被代替'" style="color: #F56C6C">{{
scope.row.ZCCSSRQ ? scope.row.ZCCSSRQ.substring(0, 10) : '-'
}}</span>
<span v-else-if="textStatusMap[scope.row.textStatus] === '——' " style="color: #409EFF">{{
scope.row.ZCCSSRQ ? scope.row.ZCCSSRQ.substring(0, 10) : '-'
}}</span>
<span v-else style="color: #333333">{{
scope.row.ZCCSSRQ ? scope.row.ZCCSSRQ.substring(0, 10) : '-'
}}</span>
</template>
</el-table-column>
<el-table-column
prop="textStatus"
sortable="custom"
width="110"
label="文本状态">
<!-- <template slot="header" slot-scope="scope">-->
<!-- <el-tooltip class="item" effect="dark" content="计划修订”、“修订中”均为现行有效版本;“已修订”标准的有效性根据实际实施情况判定。" placement="bottom">-->
<!-- <span>文本状态 <i class="el-icon-warning-outline"></i></span>-->
<!-- </el-tooltip>-->
<!-- </template>-->
<template slot-scope="scope">
<span v-if="textStatusMap[scope.row.textStatus] === '废止' || textStatusMap[scope.row.textStatus] === '被代替'" style="color: #F56C6C">{{
textStatusMap[scope.row.textStatus]
}}</span>
<span v-else-if="textStatusMap[scope.row.textStatus] === '——' " style="color: #409EFF">{{
textStatusMap[scope.row.textStatus]
}}</span>
<span v-else style="color: #333333">{{ textStatusMap[scope.row.textStatus] }}</span>
</template>
</el-table-column>
</div>
<div v-if="handleSelectForm.dataSource === 'BUSINESS_STAND'">
<el-table-column
show-overflow-tooltip
label="企标编号"
width="150"
>
<template slot-scope="scope">
<!-- <a v-if="scope.row.standYear" class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.standSortShow }} {{ scope.row.standNumber }}-{{ scope.row.standYear }}</a>-->
<a v-if="scope.row.standStatusShow === '作废'" style="color: #F56C6C" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standCode }}</a>
<a v-if="scope.row.standStatusShow === '参考'" style="color: #E6A23C" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standCode }}</a>
<a v-if="scope.row.standStatusShow !== '作废' && scope.row.standStatusShow !== '参考'" style="color: #333333" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standCode }}</a>
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="standName"
label="中文名称"
min-width="300"
>
<template slot-scope="scope">
<a v-if="scope.row.standStatusShow === '作废'" style="color: #F56C6C" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standName }}</a>
<a v-if="scope.row.standStatusShow === '参考' " style="color: #E6A23C" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standName }}</a>
<a v-if="scope.row.standStatusShow !== '作废' && scope.row.standStatusShow !== '参考'" style="color: #333333" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standName }}</a>
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="standEnName"
label="英文名称"
min-width="300"
>
<template slot-scope="scope">
<a v-if="scope.row.standStatusShow === '作废'" style="color: #F56C6C" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standEnName }}</a>
<a v-if="scope.row.standStatusShow === '参考'" style="color: #E6A23C" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standEnName }}</a>
<a v-if="scope.row.standStatusShow !== '作废' && scope.row.standStatusShow !== '参考'" style="color: #333333" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standEnName }}</a>
</template>
</el-table-column>
<el-table-column
prop="issueTime"
label="发布日期"
sortable
width="120"
>
<template slot-scope="scope">
<span v-if="scope.row.standStatusShow === '作废'" style="color: #F56C6C">{{scope.row.issueTime ? scope.row.issueTime.slice(0, 10) : ''}}</span>
<span v-if="scope.row.standStatusShow === '参考' " style="color: #E6A23C">{{scope.row.issueTime ? scope.row.issueTime.slice(0, 10) : ''}}</span>
<span v-if="scope.row.standStatusShow !== '作废' && scope.row.standStatusShow !== '参考'">{{scope.row.issueTime ? scope.row.issueTime.slice(0, 10) : ''}}</span>
</template>
</el-table-column>
<el-table-column
prop="putTime"
label="实施日期"
sortable
width="120"
>
<template slot-scope="scope">
<span v-if="scope.row.standStatusShow === '作废'" style="color: #F56C6C">{{scope.row.putTime ? scope.row.putTime.slice(0, 10) : ''}}</span>
<span v-if="scope.row.standStatusShow === '参考'" style="color: #E6A23C">{{scope.row.putTime ? scope.row.putTime.slice(0, 10) : ''}}</span>
<span v-if="scope.row.standStatusShow !== '作废' && scope.row.standStatusShow !== '参考'">{{scope.row.putTime ? scope.row.putTime.slice(0, 10) : ''}}</span>
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
sortable
prop="standStatusShow"
label="文本状态"
width="110"
>
<template slot-scope="scope">
<span v-if="scope.row.standStatusShow === '作废'" style="color: #F56C6C">
{{scope.row.standStatusShow}}
</span>
<span v-if="scope.row.standStatusShow === '参考'" style="color: #E6A23C">
{{scope.row.standStatusShow}}
</span>
<span v-if="scope.row.standStatusShow !== '作废' && scope.row.standStatusShow !== '参考'">
{{scope.row.standStatusShow}}
</span>
</template>
</el-table-column>
</div>
</el-table>
<!--分页-->
<pagination
v-show="this.lawInfoTableLoading === false"
style="position: relative;"
:page="handleSelectForm.page"
:total="handleSelectForm.total"
@pageChange="handleSelectPageChange"
@pageSizeChange="handleSelectPageSizeChange"></pagination>
<div slot="footer" class="demo-drawer-footer">
<el-button class="common-button-default" size="mini" @click="standModel = false">取消</el-button>
<el-button type="primary" size="mini" class="common-button-primary" @click="handleSelectConfirm" v-show="lawInfoTableLoading === false">确定</el-button>
</div>
</div>
</el-drawer>
<ProcessFooter
show-save
show-transfer
show-affirm
:submitLoading="isSubmit"
:transfer-loading="isTransfer"
:saveLoading="saveLoading"
@submit="handleSubmit"
@transfer="handleTransfer"
@save="handleSave"
:approval="true"
>
</ProcessFooter>
<!-- <ProcessFooter-->
<!-- :show-save="submitShow"-->
<!-- :show-transfer="submitShow"-->
<!-- :show-affirm="submitShow"-->
<!-- show-confirm-->
<!-- :submitLoading="isSubmit"-->
<!-- :transfer-loading="isTransfer"-->
<!-- :saveLoading="saveLoading"-->
<!-- @submit="handleSubmit"-->
<!-- @transfer="handleTransfer"-->
<!-- @save="handleSave"-->
<!-- @accept="handleAccept"-->
<!-- :approval="true"-->
<!-- >-->
<!-- </ProcessFooter>-->
<!-- 福田全公司选人解决方案 -->
<Role-tree
check-box
:is-title="drawerTitle"
:is-visible.sync="drawerModal"
@checkedRole="checkedTransferRole"
:nodeList="nodeList"
></Role-tree>
</div>
</template>
<script>
import ProcessHeader from "../../components/ProcessHeader";
import ProcessFooter from "../../components/ProcessFooter";
import ProcessTitle from "../../components/ProcessTitle";
import { inboundLiaisonDetail, queryDetail, saveTaskForPub ,changeAssigneeNew, execTask} from "api/process";
export default {
name: "xmqdqrStep3",
components: {
ProcessTitle,
ProcessHeader,
ProcessFooter
},
data() {
return {
lawInfoTableLoading: true,
lawInfoTable:[],
handleSelectForm: {
standName: '', //标准名称
numberName: '', //政策名称
lawsNumber: '', //政策编号
standNumber: '', //标准编号
standCode: '', //企标编号
dataSource: 'INLAND',
lawNumber: '', // 标准编号/政策编号
lawName: '', // 标准名称/政策名称
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
total: 0,
standType: '',
quoteIdList: '',
validFlag: '0',
menuId: 'nomenu'
},
isTransfer: false,
// 调整处理人抽屉状态
drawerModal: false,
drawerTitle:'',
active: "1",
nodeList: [],
nodeList2: [],
loading: false,
// 当前流程类型(1待办/2已办)
processType: 1,
isSubmit: false,
saveLoading: false,
submitShow: false,
acceptShow: false,
todoId: '',
projectId: "",
detailedId: "",
standModel: false,
standSortOptions: [],
standList: [],
projectStand:[],
standardData: [],
handleSelectTableList: [], //标准数据
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
total: 0,
//查询清单下标准数据
standCommonlySearch: {
standSort: "",
standNumber: "",
standType: "",
page: 1,
Size: this.$store.getters.userInfo.configContent
},
//表单的数据
qdform: {
BZFlag: " ", //1审批通过 其他为驳回
projectNumber: "", //项目编号
projectName: "", //项目名称
dataList: [], //项目下的标准数据
breakdownList: [] //标准下的分解单数据
},
dataList: [], //展示的标准数据
commentText: "", //审批意见
detailData: [],//流程历史数据
userId: this.$store.getters.userInfo.userId,
taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId,
standMap: new Map(),
textStatusMap: {},// 文本状态id与name对应
};
},
mounted() {
this.processTable();
this.getData();
// 查询各下拉框数据
this.$http.get("sys/dictype/getDicTypeListCode", {}, {
_this: this,
loading: "loading"
}, res => {
this.energyKindOptions = res.data.ENERGYTYPES; //适用车型
this.standSortOptions = res.data.STANDCLASSIFY; // 标准类别
this.setMap(res.data.WBZTCLASS);// 文本状态
this.setMap(this.zrbmMap, res.data.ZRBMCLASS);
this.showLocalProductData(this.getLocalPro);
}, e => {
});
},
methods: {
formatIssueDate(str) {
const momentDate = this.$moment(str)
if (momentDate.isValid()) {
return this.$moment(str).format('YYYY-MM-DD')
} else {
return str
}
},
//确认转办
checkedTransferRole (data) {
this.assigneeNewLoading = true
changeAssigneeNew({
taskId: this.$route.query.taskIds, // 任务id
assignee: data[0].id, // 被委托人
userId: this.$store.getters.userInfo.userId, // 委托人
pId: this.$route.query.prcId // 流程实例
}).then(res => {
this.isTransfer = false
if (res.success) {
this.drawerModal = false
this.$message.success('调整成功')
this.$router.push("/processCenter");
this.processNum()
} 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 => {
// let blob = new Blob([res.data], {type: 'image/jpg'})
// let url = window.URL.createObjectURL(res.data)
this.processStep = window.URL.createObjectURL(res.data)
})
},
//转办事件
handleTransfer(){
this.drawerModal = true
this.drawerTitle = '转办处理人'
this.selectPeople = row
},
// 将文本状态的id与name对应
setMap(data) {
data.forEach(item => {
this.$set(this.textStatusMap, item.value, item.label)
})
},
processTable() {
this.$http.get("lawss/activiti/get_list_by_instance", {
prcNum: this.$route.query.prcNum,
sortWord: this.shunxu ? this.paixu : "",
shunxu: this.shunxu
}, {
loading: "loading",
_this: this
}, res => {
this.detailData = res;
}, e => {
});
},
//tab改变
handleTabs(type) {
this.active = type;
},
// 点击查看
handlePreview(item) {
let routeUrl = this.$router.resolve({
name: "OtherStandardDetails",
params: {
id: item.id,
pageType: "INLAND_STAND"
}
});
window.open(routeUrl.href, "_blank");
},
//获取数据
getData() {
return new Promise((resolve, reject) => {
inboundLiaisonDetail({
taskIds: this.taskIds,
pId: this.pId
}).then(res => {
if (res) {
const processForm = JSON.parse(res.mesg);
let commitStatus = res.commitStatus
if(commitStatus && commitStatus > 0){
this.acceptShow = true
this.submitShow = false
}else {
this.acceptShow = false
this.submitShow = true
}
this.todoId = res.id
this.getFormFieldList(processForm);
}
}).catch(e => {
});
});
},
//动态表单读取
getFormFieldList(item) {
console.log(item);
this.$nextTick(() => {
if(item.form === undefined){
this.qdform = JSON.parse(JSON.stringify(item));
this.qdform.prcNum = this.prcNum;
this.qdform.prcName = this.prcName;
this.qdform["id"] = item.id;
this.dataList = item.dataList
this.dataList.forEach(item => {
this.$set(item, 'involve', 'involve')
this.$set(item, 'remarks', '')
})
// this.projectId = item.projectId;
// //获取清单id 查询对应清单下的标准
// this.detailedId = item.detailedListId;
// this.getStandData();
}else{
this.qdform = item.form
this.dataList =item.form.dataList
this.detailedId = item.form.detailedListId;
}
});
},
//查询清单下的标准
getStandData() {
this.$http.get("sarStandProjectLibrary/queryStandInfo", { id: this.projectId, cars: '1', }, {
_this: this
}, res => {
this.dataList = res.data.records;
this.dataList.forEach(item => {
// 责任部门转换
if (item.zrbm !== null || item.zrbm !== "" ) {
let k = (item.zrbm || "").split(",");
for (let i in this.zrbmOptions) {
for (let m = 0; m < k.length; m++) {
if (this.zrbmOptions[i].value === k[m]) {
k[m] = this.zrbmOptions[i].label;
}
item.zrbm = k.join(",");
}
}
}
});
this.dataList.map(item => {
if(item.zrbm === '[]'){
item.zrbm = ''
}
})
});
},
// 接受按钮
handleAccept(){
this.isSubmit = true
execTask({
todoId: this.todoId // 当前节点ID
}).then(res => {
if (res.sign && res.sign === '0') {
this.$message.success('接收成功')
this.$router.push('/processCenter')
}
this.isSubmit = false
})
},
//保存事件
handleSave() {
this.saveLoading = true;
let _formData = new FormData();
this.qdform.dataList = this.dataList
_formData.append("id", this.bpnId || "");
_formData.append("prcType", "10");
_formData.append('taskIds', this.taskIds)
_formData.append("json", JSON.stringify({
form: this.qdform,
commentText: this.commentText
}));
saveTaskForPub(_formData).then(res => {
this.saveLoading = false;
this.$message.success("保存成功");
this.bpnId = res.result;
}).catch(e => {
this.saveLoading = false;
});
},
handleRemark(){
this.dataList.map(item => {
if(item.involve === 'noInvolve'){
comFlag
}
})
},
//提交事件
handleSubmit() {
let comFlag = 0
this.dataList.map(item => {
if(item.involve === 'noInvolve' && item.remarks === ''){
comFlag++
}
})
if(comFlag > 0){
this.$message.warning('请填写不涉及的备注信息')
}else{
this.isSubmit = true;
this.qdform.currentPerson = this.$store.getters.userInfo.userName;
this.qdform.commentText = this.commentText;
this.qdform.dataList = this.dataList
const json = JSON.stringify(this.qdform);
this.$http.post("lawss/activiti/completeTask", {
taskIds: this.taskIds,
userId: this.userId,
json: json
}, {
_this: this
}, res => {
if (res.success) {
this.$message.success(res.message);
this.$router.push("/processCenter");
}
this.isSubmit = false;
}, e => {
});
}
},
addList() {
this.searchLawBtn()
this.standModel = true;
},
//批量删除
delectList(){
if (this.projectStand.length < 1) {
this.$message.warning("请选择一条数据进行删除");
} else {
this.$confirm("您确认删除这些数据?", "提示", {
confirmButtonText: "确认",
confirmButtonClass: "common-button-primary",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.projectStand.map(item => {
let index;
index = this.dataList.findIndex(items => {
return items.standId === item.standId;
});
if (index > -1) {
this.dataList.splice(index, 1);
}
});
}).catch(() => {
});
}
},
//添加标准勾选框数据
handleSelectTableChange (data) {
this.handleSelectTableList = data
console.log(this.handleSelectTableList);
},
selectStandChange(data){
this.projectStand = data
},
cancelStand() {
this.standModel = false;
},
//添加标准带入事件
okStand() {
if(this.standList.length < 1){
this.$message.warning('请至少选择一条数据进行添加')
}else{
this.standList.forEach(item =>{
if(item.ssrq === "-"){
item.ssrq = ''
}
if(item.zrbm === '[]'){
item.zrbm =''
}
})
this.standList.map(item => {
let addIndex
addIndex = this.dataList.findIndex(items =>{
return items.id === item.id
})
if(addIndex > -1){
this.$message.warning('请勿重复添加数据')
}else{
this.dataList.push(item)
}
})
this.standModel = false
}
},
//手动查找的清空按钮
clearLawBtn(){
this.lawInfoTableLoading = true
this.handleSelectForm.lawNumber = ''
this.handleSelectForm.standNumber = ''
this.handleSelectForm.lawsNumber = ''
this.handleSelectForm.standCode = ''
//清空标准名称/政策名称的查询
this.handleSelectForm.lawName = ''
this.handleSelectForm.standName = ''
this.handleSelectForm.numberName = ''
this.searchLawBtn()
},
//添加标准的查询按钮
searchLawBtn(){
this.lawInfoTableLoading = true
if (this.handleSelectForm.dataSource === 'INLAND'){
this.$http.get('sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage',this.handleSelectForm,{
_this: this
},res=>{
console.log('国内标准库数据',res)
if (res.ok){
this.lawInfoTable = res.data.list
this.handleSelectForm.total = res.data.count
if ((this.lawInfoTable.length === 0 || this.lawInfoTable === []) && this.handleSelectForm.page !== 1) {
this.lawInfoTableLoading = true
this.handleSelectPageChange(1)
}else {
this.lawInfoTableLoading = false
this.lawInfoTableLoading = false
}
}else {
this.$message.error(res.message)
}
},e=>{
this.lawInfoTable = []
this.handleSelectForm.total = 0
})
}else if(this.handleSelectForm.dataSource === 'FOREIGN'){
this.$http.get('sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage',this.handleSelectForm,{
_this: this
},res=>{
if (res.ok){
this.lawInfoTable = res.data.list
this.handleSelectForm.total = res.data.count
if ((this.lawInfoTable.length === 0 || this.lawInfoTable === []) && this.handleSelectForm.page !== 1) {
this.lawInfoTableLoading = true
this.handleSelectPageChange(1)
}else {
this.lawInfoTableLoading = false
}
}else {
this.$message.error(res.message)
this.lawInfoTableLoading = false
}
},e=>{
this.lawInfoTable = []
this.handleSelectForm.total = 0
})
}else if(this.handleSelectForm.dataSource === 'BUSINESS_STAND'){
this.$http.get('lawss/sarBussionessStand/getSarBussionStandPage',this.handleSelectForm,{
_this: this
},res=>{
if (res.ok){
this.lawInfoTable = res.data.list
this.handleSelectForm.total = res.data.count
if ((this.lawInfoTable.length === 0 || this.lawInfoTable === []) && this.handleSelectForm.page !== 1) {
this.lawInfoTableLoading = true
this.handleSelectPageChange(1)
}else {
this.lawInfoTableLoading = false
}
}else {
this.$message.error(res.message)
this.lawInfoTableLoading = false
}
},e=>{
this.lawInfoTable = []
this.handleSelectForm.total = 0
})
}else {
this.$message.warning('请先选择标准/政策来源')
}
},
handleSelectConfirm(){
if(this.handleSelectTableList.length < 1){
this.$message.warning('请至少选择一条数据进行添加')
}else{
this.standList.forEach(item =>{
if(item.ssrq === "-"){
item.ssrq = ''
}
if(item.zrbm === '[]'){
item.zrbm =''
}
})
this.handleSelectTableList.map(item => {
let addIndex
addIndex = this.dataList.findIndex(items =>{
return items.id === item.id
})
if(addIndex > -1){
this.$message.warning('请勿重复添加数据')
}else{
this.dataList.push(item)
}
})
this.dataList.forEach(item => {
this.$set(item, 'involve', 'involve')
this.$set(item, 'remarks', '')
})
this.standModel = false
}
},
dataSourceChange() {
this.handleSelectForm.page = 1
this.lawInfoTableLoading = true
this.handleSelectForm.standType = this.handleSelectForm.dataSource
this.searchLawBtn()
},
//根据标准编号的查询
lawNumberSearch() {
this.handleSelectForm.standNumber = this.handleSelectForm.lawNumber
this.handleSelectForm.lawsNumber = this.handleSelectForm.lawNumber
this.handleSelectForm.standCode = this.handleSelectForm.lawNumber
},
handleSelectPageChange(page){
this.lawInfoTableLoading = true
this.handleSelectForm.page = page
this.searchLawBtn()
},
handleSelectPageSizeChange(pageSize){
this.lawInfoTableLoading = true
this.handleSelectForm.pageSize = pageSize
this.searchLawBtn()
},
},
computed: {
listNoDataText() {
return this.processType === 1 ? "暂无待办流程" : "暂无已办流程";
}
},
};
</script>
<style lang="less" scoped>
@import '~@/assets/styles/style';
.xmqdqr-step2 {
/deep/ .el-drawer__container {
.prc-content-border {
border: none;
padding: 0 20px 0;
}
}
.choiceBtn {
.el-button--primary {
width: 150px;
}
}
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;
}
.accessStandardsAndRegulations {
height: 100%;
}
}
}
.demo-drawer-content {
margin-top: 10px;
}
}
</style>