3762 lines
123 KiB
Vue
3762 lines
123 KiB
Vue
<!-- 企标制修订计划管理库 -->
|
||
<template>
|
||
<div id="enterBSysRevPlanManaLib" class="v-class">
|
||
<div class="search-area">
|
||
<div class="left">
|
||
<el-form :modal="condition" :inline="true" class="label-input-form" @keyup.enter.native="handleSearchByCondition">
|
||
<el-form-item label="计划状态" class="search-item">
|
||
<el-select
|
||
v-model="condition.planStatus"
|
||
placeholder="请选择"
|
||
filterable
|
||
clearable
|
||
>
|
||
<el-option
|
||
v-for="item in formOption.planStatusOption"
|
||
:value="item.value"
|
||
:key="item.value"
|
||
:label="item.label"
|
||
>
|
||
</el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
<el-form-item label="企标编号" class="search-item search-item-last">
|
||
<el-input
|
||
v-model="condition.standCode"
|
||
placeholder="请输入"
|
||
clearable
|
||
@keyup.enter="handleSearchByCondition"
|
||
filterable
|
||
></el-input>
|
||
</el-form-item>
|
||
<el-form-item label="企标名称" class="search-item search-item-last">
|
||
<el-input
|
||
v-model="condition.cnName"
|
||
placeholder="请输入"
|
||
clearable
|
||
@keyup.enter="handleSearchByCondition"
|
||
filterable
|
||
></el-input>
|
||
</el-form-item>
|
||
<el-form-item label="制修订类别" class="search-item search-item-last">
|
||
<el-select
|
||
v-model="condition.planType"
|
||
placeholder="请选择"
|
||
clearable
|
||
filterable
|
||
>
|
||
<el-option
|
||
v-for="item in formOption.planTypeOption"
|
||
:value="item.value"
|
||
:key="item.value"
|
||
:label="item.label"
|
||
>
|
||
</el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
<el-form-item
|
||
label="代替企标编号"
|
||
class="search-item search-item-last"
|
||
>
|
||
<el-input
|
||
v-model="condition.replacedStandNum"
|
||
placeholder="请输入"
|
||
@keyup.enter="handleSearchByCondition"
|
||
clearable
|
||
></el-input>
|
||
</el-form-item>
|
||
<el-form-item
|
||
label="起草部门"
|
||
prop="draftingUnit"
|
||
class="search-item"
|
||
>
|
||
<el-input v-model="condition.draftingUnit" v-show="false" />
|
||
<el-popover
|
||
placement="bottom"
|
||
popper-class="user-dept-popper"
|
||
trigger="click"
|
||
:value="false"
|
||
>
|
||
<el-input
|
||
slot="reference"
|
||
v-model="condition.draftingUnitName"
|
||
:placeholder="$t('m.pleaseSelectDepartment')"
|
||
clearable
|
||
id="deptBtn1"
|
||
@change="handleDraftConditionChange"
|
||
/>
|
||
<div class="api">
|
||
<dept-tree
|
||
all-dept
|
||
ref="reloadTree"
|
||
:editable="false"
|
||
treeDivId="domesticTree1"
|
||
:chkboxType="{ 'Y': '', 'N': '' }"
|
||
deptSelect
|
||
@treeDblClick="treeDblClick1"
|
||
class="ztree"
|
||
style="width: 200px; height: 400px;overflow: auto;"
|
||
>
|
||
</dept-tree>
|
||
</div>
|
||
</el-popover>
|
||
</el-form-item>
|
||
<!-- <el-form-item>
|
||
<div class="mofun-state-date">
|
||
<span style="padding-right: 5px">计划发布日期</span>
|
||
<el-date-picker
|
||
class="state-date"
|
||
v-model="condition.putTime"
|
||
type="daterange"
|
||
range-separator="至"
|
||
start-placeholder="开始日期"
|
||
end-placeholder="结束日期">
|
||
</el-date-picker>
|
||
</div>
|
||
</el-form-item>
|
||
<el-form-item>
|
||
<div class="mofun-state-date">
|
||
<span style="padding-right: 5px">计划开始编写日期</span>
|
||
<el-date-picker
|
||
class="state-date"
|
||
v-model="condition.planStartTime"
|
||
type="daterange"
|
||
range-separator="至"
|
||
start-placeholder="开始日期"
|
||
end-placeholder="结束日期">
|
||
</el-date-picker>
|
||
</div>
|
||
</el-form-item>-->
|
||
<el-form-item class="search-item btn-box">
|
||
<el-button
|
||
:loading="loading.searching"
|
||
icon="el-icon-search"
|
||
type="primary"
|
||
class="common-button-primary"
|
||
round
|
||
@click="handleSearchByCondition"
|
||
>
|
||
</el-button>
|
||
</el-form-item>
|
||
<el-form-item class="search-item btn-box">
|
||
<el-button
|
||
class="common-button-default"
|
||
icon="el-icon-refresh-left"
|
||
round
|
||
@click="clearSearch"
|
||
></el-button>
|
||
</el-form-item>
|
||
|
||
<el-form-item class="search-item btn-box">
|
||
<el-button
|
||
type="primary"
|
||
class="common-button-primary"
|
||
round
|
||
@click="selectMoreBtn"
|
||
><i class="iconfont"></i>高级查询</el-button>
|
||
</el-form-item>
|
||
<AdvancedQuery
|
||
:isAdvancedSearch.sync="isAdvancedSearch"
|
||
:twoOptions="twoOptions"
|
||
:threeOptions="threeOptions"
|
||
@twoSelectChange="twoSelectChange"
|
||
@getDomesticStandardTableBtn="getDomesticStandardTableBtn"
|
||
></AdvancedQuery>
|
||
|
||
</el-form>
|
||
</div>
|
||
</div>
|
||
<div class="action-bar">
|
||
<el-button
|
||
type="primary"
|
||
class="common-button-primary add-button"
|
||
round
|
||
@click="handleOpenAddModal"
|
||
v-btn-permission="'MHV7SA5CPD8UHYBUT3YQ'"
|
||
><i class="iconfont"></i>新增</el-button
|
||
>
|
||
<el-button
|
||
class="common-button-default in-button"
|
||
round
|
||
:loading="loading.searching"
|
||
@click="addImportModal"
|
||
v-btn-permission="'65UHFT66YUT8SNZ2BUGL'"
|
||
><i class="iconfont"></i>导入
|
||
</el-button>
|
||
<el-button
|
||
class="common-button-default export-button"
|
||
round
|
||
@click="exportData"
|
||
title="不勾选时默认导出所有筛选项;勾选时仅导出勾选项"
|
||
v-btn-permission="'YTNP52NAD7L53GT7LHPN'"
|
||
><i class="iconfont"></i>导出</el-button>
|
||
<el-button
|
||
class="common-button-default"
|
||
round
|
||
:loading="loading.searching"
|
||
@click="uploadImportModal"
|
||
v-btn-permission="'N2X4MVYZ5UE5WKMMQ375'"
|
||
><i class="iconfont"></i>模板下载</el-button>
|
||
<el-button
|
||
class="common-button-default"
|
||
round
|
||
:loading="loading.delete"
|
||
@click="beforeDelete"
|
||
v-btn-permission="'CVWKNE6C77VR7ZFRH8Y2'"
|
||
><i class="iconfont"></i>批量删除</el-button>
|
||
</div>
|
||
<div class="container">
|
||
<el-table
|
||
:data="tableData"
|
||
tooltip-effect="dark"
|
||
style="width: 100%"
|
||
border
|
||
height="100%"
|
||
:header-cell-style="{
|
||
background: '#e8e8e8',
|
||
color: '#333333',
|
||
fontSize: '16px',
|
||
fontWeight: 'bold',
|
||
height: '48px',
|
||
}"
|
||
:row-class-name="TipsClass"
|
||
@selection-change="handleSelectChange"
|
||
ref="selection"
|
||
>
|
||
<el-table-column
|
||
type="selection"
|
||
align="center"
|
||
width="55"
|
||
fixed>
|
||
</el-table-column>
|
||
<el-table-column prop="planStatus" label="计划状态" align="center" width="140">
|
||
<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">
|
||
<p v-if="scope.row.planStatus">
|
||
{{ getPlanStatusName(scope.row.planStatus) }}
|
||
</p>
|
||
<p style="color: #ccc" v-else>--</p>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column prop="planType" label="计划类型" align="center" width="100">
|
||
<template slot-scope="scope">
|
||
<p>{{ scope.row.planType === "1" ? "制定" : "修订" }}</p>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="企标编号" align="center" width="210">
|
||
<template slot-scope="scope">
|
||
<span v-if="scope.row.standCode">
|
||
{{ scope.row.standCode }}
|
||
</span>
|
||
<span style="color: #ccc;" v-else>--</span>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="replacedStandNum"
|
||
label="代替企标编号"
|
||
align="center"
|
||
width="210">
|
||
<template slot-scope="scope">
|
||
<div v-if="scope.row.replacedStandNum">
|
||
<span
|
||
v-for="(item, index) in scope.row.replacedStandNum.split(',')"
|
||
:key="index"
|
||
>
|
||
<a
|
||
@click="handlePreview(item)"
|
||
style="cursor: pointer; color: #0c91e5; margin-right: 5px"
|
||
class="span-line"
|
||
>{{ item }}</a
|
||
>
|
||
</span>
|
||
</div>
|
||
<p style="color: #ccc" v-else>--</p>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column prop="cnName" label="企标名称" align="center" min-width="180">
|
||
<template slot-scope="scope">
|
||
<p v-if="scope.row.cnName">{{ scope.row.cnName }}</p>
|
||
<p style="color: #ccc" v-else>--</p>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column prop="enName" label="英文名称" align="center" width="180">
|
||
<template slot-scope="scope">
|
||
<p v-if="scope.row.enName">{{ scope.row.enName }}</p>
|
||
<p style="color: #ccc" v-else>--</p>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="primaryDrafterName"
|
||
label="主起草人"
|
||
align="center"
|
||
width="100">
|
||
<template slot-scope="scope">
|
||
<p v-if="scope.row.primaryDrafterName">{{ scope.row.primaryDrafterName }}</p>
|
||
<p style="color: #ccc;" v-else>--</p>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="compilersUserName"
|
||
label="其它起草人"
|
||
align="center"
|
||
width="100">
|
||
<template slot-scope="scope">
|
||
<p v-if="scope.row.compilersUserName">{{ scope.row.compilersUserName }}</p>
|
||
<p style="color: #ccc;" v-else>--</p>
|
||
</template>
|
||
</el-table-column>
|
||
<!-- <el-table-column-->
|
||
<!-- prop="draftCommittee"-->
|
||
<!-- label="起草分标委"-->
|
||
<!-- align="center"-->
|
||
<!-- width="150">-->
|
||
<!-- <template slot-scope="scope">-->
|
||
<!-- <span v-if="scope.row.draftCommitteeName">-->
|
||
<!-- {{ scope.row.draftCommitteeName }}-->
|
||
<!-- </span>-->
|
||
<!-- <span style="color: #ccc" v-else>--</span>-->
|
||
<!-- </template>-->
|
||
<!-- </el-table-column>-->
|
||
<el-table-column
|
||
prop="otherDrafterDeptName"
|
||
label="起草部门"
|
||
align="center"
|
||
width="150">
|
||
<template slot-scope="scope">
|
||
<p v-if="scope.row.otherDrafterDeptName">{{ scope.row.otherDrafterDeptName }}</p>
|
||
<p style="color: #ccc;" v-else>--</p>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column prop="putTime" label="计划发布日期" align="center" width="130" sortable>
|
||
<template slot-scope="scope">
|
||
<p v-if="scope.row.putTime">
|
||
{{ $moment(scope.row.putTime).format('YYYY-MM-DD') }}
|
||
</p>
|
||
<p style="color: #ccc" v-else>--</p>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="actualEndTime"
|
||
label="实际发布日期"
|
||
sortable
|
||
align="center"
|
||
width="130"
|
||
>
|
||
<template slot-scope="scope">
|
||
<p v-if="scope.row.actualEndTime">
|
||
{{ $moment(scope.row.actualEndTime).format('YYYY-MM-DD') }}
|
||
</p>
|
||
<p style="color: #ccc" v-else>--</p>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="操作" align="center" width="50" fixed="right">
|
||
<template slot-scope="scope">
|
||
<div @click.stop style="display: inline-block">
|
||
<el-dropdown trigger="click" @command="handleCommand">
|
||
<i class="iconfont"></i>
|
||
<el-dropdown-menu slot="dropdown">
|
||
<el-dropdown-item v-btn-permission="'T3BPEC7N8Q7EFLFM448E'" :command="[scope.row, '编辑']"
|
||
>编辑</el-dropdown-item
|
||
>
|
||
<el-dropdown-item v-btn-permission="'LX93R5ALH332DMHTXGZS'" :command="[scope.row, '查看']"
|
||
>查看</el-dropdown-item
|
||
>
|
||
<el-dropdown-item :command="[scope.row, '授权']" v-btn-permission="'XLXN6XY5NULHP9P5K2GR'" v-if="scope.row.standLevel && scope.row.standLevel === 'ACF675Z88W'">授权</el-dropdown-item>
|
||
<!-- <el-dropdown-item :command="[scope.row, '导出']">导出</el-dropdown-item>-->
|
||
<!-- <el-dropdown-item :command="[scope.row, '流程']">流程</el-dropdown-item>-->
|
||
</el-dropdown-menu>
|
||
</el-dropdown>
|
||
</div>
|
||
</template>
|
||
</el-table-column>
|
||
</el-table>
|
||
<pagination
|
||
:page="condition.page"
|
||
:total="condition.total"
|
||
@pageChange="pageChange"
|
||
@pageSizeChange="pageSizeChange"
|
||
></pagination>
|
||
<loading :loading="loading.loadData">数据获取中</loading>
|
||
</div>
|
||
|
||
<!-- 查看企标计划条目 -->
|
||
<el-drawer
|
||
title="查看"
|
||
:visible.sync="visiblePlanCheck"
|
||
:wrapperClosable="false"
|
||
:before-close="onBeforeClose"
|
||
size="800px"
|
||
>
|
||
<div class="demo-drawer-content">
|
||
<div class="el-drawer-form">
|
||
<el-form
|
||
ref="form"
|
||
:model="form"
|
||
class="label-input-form"
|
||
@keyup.native.enter="handleSubmit"
|
||
>
|
||
<el-form-item
|
||
label="计划类型"
|
||
prop="planType"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
>
|
||
<p>{{ getPlanTypeName(form.planType) }}</p>
|
||
</el-form-item>
|
||
<el-form-item
|
||
label="修订企标"
|
||
prop="reviseBussStand"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
v-if="form.planType === '2'">
|
||
<p>{{ form.reviseBussStand }}</p>
|
||
</el-form-item>
|
||
<el-form-item
|
||
label="企标编号"
|
||
prop="standCode"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
>
|
||
<p>{{ form.standCode }}</p>
|
||
</el-form-item>
|
||
<!-- <el-form-item-->
|
||
<!-- label="企标类别"-->
|
||
<!-- prop="standSortShow"-->
|
||
<!-- label-width="150px"-->
|
||
<!-- class="add-form-item"-->
|
||
<!-- >-->
|
||
<!-- <p>{{ form.standSortShow }}</p>-->
|
||
<!-- </el-form-item>-->
|
||
<el-form-item
|
||
label="计划状态"
|
||
prop="planStatus"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
>
|
||
<p>{{ getPlanStatusName(form.planStatus) }}</p>
|
||
</el-form-item>
|
||
|
||
<el-form-item
|
||
label="企标名称"
|
||
prop="cnName"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
>
|
||
<!-- <el-input v-model="form.cnName"-->
|
||
<!-- :maxlength="100"-->
|
||
<!-- placeholder="请输入企标名称"-->
|
||
<!-- clearable></el-input>-->
|
||
<p>{{ form.cnName }}</p>
|
||
</el-form-item>
|
||
<el-form-item
|
||
label="英文名称"
|
||
prop="enName"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
>
|
||
<p>{{ form.enName }}</p>
|
||
</el-form-item>
|
||
<el-form-item
|
||
label="代替企标编号"
|
||
prop="replacedStandNum"
|
||
label-width="150px"
|
||
class="add-form-item select-and-input">
|
||
<p>{{ form.replacedStandNum }}</p>
|
||
</el-form-item>
|
||
<el-form-item
|
||
label="主起草部门"
|
||
prop="compilersUser"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
>
|
||
<div class="tag-group" v-if="form.primaryDrafterDeptName">
|
||
<template
|
||
v-for="(tag, index) in form.primaryDrafterDeptName.split(',')"
|
||
>
|
||
<div class="tag-wrap" :key="index">
|
||
<el-tag size="small" @close="handleRemoveTag(index)">{{
|
||
tag
|
||
}}</el-tag>
|
||
</div>
|
||
</template>
|
||
</div>
|
||
</el-form-item>
|
||
<el-form-item
|
||
label="主起草人"
|
||
prop="compilersUser"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
>
|
||
<div class="tag-group" v-if="form.primaryDrafterName">
|
||
<template
|
||
v-for="(tag, index) in form.primaryDrafterName.split(',')"
|
||
>
|
||
<div class="tag-wrap" :key="index">
|
||
<el-tag size="small">{{
|
||
tag
|
||
}}</el-tag>
|
||
</div>
|
||
</template>
|
||
</div>
|
||
</el-form-item>
|
||
<el-form-item
|
||
label="起草部门"
|
||
prop="otherDrafterDept"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
>
|
||
<div class="tag-group" v-if="form.otherDrafterDeptName">
|
||
<template
|
||
v-for="(tag, index) in form.otherDrafterDeptName.split(',')"
|
||
>
|
||
<div class="tag-wrap" :key="index">
|
||
<el-tag size="small" @close="handleRemoveTag(index)">{{
|
||
tag
|
||
}}</el-tag>
|
||
</div>
|
||
</template>
|
||
</div>
|
||
</el-form-item>
|
||
<el-form-item
|
||
label="其他起草人"
|
||
prop="compilersUser"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
>
|
||
<div class="tag-group" v-if="form.compilersUserName">
|
||
<template
|
||
v-for="(tag, index) in form.compilersUserName.split(',')"
|
||
>
|
||
<div class="tag-wrap" :key="index">
|
||
<el-tag size="small" @close="handleRemoveTag(index)">{{
|
||
tag
|
||
}}</el-tag>
|
||
</div>
|
||
</template>
|
||
</div>
|
||
</el-form-item>
|
||
<el-form-item
|
||
label="相关部门"
|
||
prop="compileUnitName"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
>
|
||
<div class="tag-group" v-if="form.compileUnitName">
|
||
<template
|
||
v-for="(tag, index) in form.compileUnitName.split(',')"
|
||
>
|
||
<div class="tag-wrap" :key="index">
|
||
<el-tag size="small">{{ tag }}</el-tag>
|
||
</div>
|
||
</template>
|
||
</div>
|
||
</el-form-item>
|
||
<el-form-item
|
||
label="标准密级"
|
||
prop="standLevel"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
>
|
||
<p>{{ getStandLevelName(form.standLevel) }}</p>
|
||
</el-form-item>
|
||
<el-form-item
|
||
label="计划开始编写日期"
|
||
prop="planStartTime"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
>
|
||
<p>
|
||
{{
|
||
form.putTime
|
||
? $moment(form.planStartTime).format("yyyy-MM-dd")
|
||
: "-"
|
||
}}
|
||
</p>
|
||
</el-form-item>
|
||
<el-form-item
|
||
label="计划发布日期"
|
||
prop="putTime"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
>
|
||
<p>
|
||
{{
|
||
form.planStartTime
|
||
? $moment(form.putTime).format("yyyy-MM-dd")
|
||
: "-"
|
||
}}
|
||
</p>
|
||
</el-form-item>
|
||
<el-form-item
|
||
label="涉及的会签部门"
|
||
prop="compileUnitName"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
>
|
||
<div class="tag-group" v-if="form.compileUnitName">
|
||
<template v-for="(tag, index) in form.compileUnitName.split(',')">
|
||
<div class="tag-wrap" :key="index">
|
||
<el-tag size="small">{{ tag }}</el-tag>
|
||
</div>
|
||
</template>
|
||
</div>
|
||
</el-form-item>
|
||
<el-form-item
|
||
label="相关流程"
|
||
prop="putTime"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
>
|
||
<p>
|
||
{{
|
||
form.prcNum
|
||
? form.prcNum
|
||
: "-"
|
||
}}
|
||
</p>
|
||
</el-form-item>
|
||
<el-form-item
|
||
label="标准制修订来源*"
|
||
prop="planSource"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
>
|
||
<p>{{ getPlanSourceName(form.planSource) }}</p>
|
||
</el-form-item>
|
||
<el-form-item
|
||
label="制修订原因"
|
||
prop="planReason"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
>
|
||
<p>{{ form.planReason }}</p>
|
||
<!-- 制修订原因附件上传 -->
|
||
<div class="file-wrap">
|
||
<p
|
||
v-for="item in form.planReasonFileList"
|
||
:key="item.id"
|
||
@click="downloadFile(item.id)"
|
||
>
|
||
{{ item.oldFileName }}
|
||
</p>
|
||
</div>
|
||
</el-form-item>
|
||
<el-form-item
|
||
label="验证工作"
|
||
prop="testWork"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
>
|
||
<p>{{ form.testWork || "-" }}</p>
|
||
<!-- 验证工作附件上传 -->
|
||
<div class="file-wrap">
|
||
<p
|
||
v-for="item in form.testWorkFileList"
|
||
:key="item.id"
|
||
@click="downloadFile(item.id)"
|
||
>
|
||
{{ item.oldFileName }}
|
||
</p>
|
||
</div>
|
||
</el-form-item>
|
||
<el-form-item
|
||
label="项目影响"
|
||
prop="planImpact"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
>
|
||
<p>{{ form.planImpact || "-" }}</p>
|
||
<!-- 项目影响附件上传 -->
|
||
<div class="file-wrap">
|
||
<p
|
||
v-for="item in form.planImpactFileLis"
|
||
:key="item.id"
|
||
@click="downloadFile(item.id)"
|
||
>
|
||
{{ item.oldFileName }}
|
||
</p>
|
||
</div>
|
||
</el-form-item>
|
||
</el-form>
|
||
</div>
|
||
</div>
|
||
</el-drawer>
|
||
<!-- 新增/编辑模态框 -->
|
||
<el-drawer
|
||
:title="isEdit ? '编辑' : '新增'"
|
||
:visible.sync="visibleAddEditModal"
|
||
:wrapperClosable="false"
|
||
size="800px"
|
||
:before-close="onBeforeClose"
|
||
>
|
||
<div class="demo-drawer-content">
|
||
<div class="el-drawer-form">
|
||
<el-form
|
||
ref="form"
|
||
:model="form"
|
||
:rules="formRules"
|
||
class="label-input-form"
|
||
@keyup.native.enter="handleSubmit"
|
||
v-if="visibleAddEditModal"
|
||
>
|
||
<el-form-item
|
||
label="计划类型"
|
||
prop="planType"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
>
|
||
<el-select
|
||
v-model="form.planType"
|
||
placeholder="请选择计划类型"
|
||
clearable
|
||
@change="planTypeChange"
|
||
>
|
||
<el-option
|
||
v-for="opt in formOption.planTypeOption"
|
||
:value="opt.value"
|
||
:key="opt.value"
|
||
:label="opt.label"
|
||
></el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
<el-form-item
|
||
label="修订企标"
|
||
prop="reviseBussStand"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
v-if="form.planType === '2'">
|
||
<el-input
|
||
v-model="form.reviseBussStand"
|
||
readonly
|
||
placeholder="请点击选择修订企标"
|
||
@click.native="visibleBussRetrieval = true"></el-input>
|
||
</el-form-item>
|
||
<el-form-item
|
||
title="请严格遵守分类,系统将按分类自动生成标准号。如有疑问请联系部门标准联络人。"
|
||
prop="standCode"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
>
|
||
<template slot="label">企标编号<i class="el-icon-warning-outline"></i></template>
|
||
<el-input
|
||
v-model="form.standCode"
|
||
:maxlength="100"
|
||
placeholder="请输入企标编号"
|
||
clearable
|
||
readonly
|
||
@click.native="isShow = true"
|
||
></el-input>
|
||
</el-form-item>
|
||
<el-form-item
|
||
title="命名请参照“SMTC 1 100 001 “,例:XXX技术要求;XXX试验方法;XXX设计指导"
|
||
prop="cnName"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
>
|
||
<template slot="label">企标名称<i class="el-icon-warning-outline"></i></template>
|
||
<el-input
|
||
v-model="form.cnName"
|
||
:maxlength="100"
|
||
placeholder="请输入企标名称"
|
||
clearable
|
||
></el-input>
|
||
</el-form-item>
|
||
<el-form-item
|
||
title="首字母大写,其它小写(除专有名词)"
|
||
prop="enName"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
>
|
||
<template slot="label">英文名称<i class="el-icon-warning-outline"></i></template>
|
||
<el-input
|
||
v-model="form.enName"
|
||
:maxlength="1000"
|
||
placeholder="请输入企标英文名称"
|
||
clearable
|
||
></el-input>
|
||
</el-form-item>
|
||
<ProcessSearchStand
|
||
key="replacedStandNum"
|
||
:config="{
|
||
attrName: '代替企标编号',
|
||
attrField: 'replacedStandNum',
|
||
}"
|
||
label-width="150px"
|
||
v-model="form.replacedStandNum"
|
||
></ProcessSearchStand>
|
||
<el-form-item
|
||
label="主起草人"
|
||
prop="primaryDrafter"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
>
|
||
<el-input v-model="form.primaryDrafter" v-show="false"></el-input>
|
||
<div class="tag-group">
|
||
<template v-for="(tag, index) in primaryDrafter">
|
||
<transition name="el-zoom-in-center">
|
||
<div
|
||
class="tag-wrap"
|
||
v-if="primaryDrafterTagAnimateList.includes(tag)"
|
||
:key="index"
|
||
>
|
||
<el-tag
|
||
size="small"
|
||
closable
|
||
@close="handleRemoveDrafterTag('primaryDrafter', index, tag.id, tag)"
|
||
>{{ tag.userName || tag.name || tag.oldname }}</el-tag
|
||
>
|
||
</div>
|
||
</transition>
|
||
</template>
|
||
<div class="tag-wrap">
|
||
<el-button
|
||
type="primary"
|
||
size="mini"
|
||
round
|
||
class="common-button-primary"
|
||
@click="handleChooseByOrgTable('primaryDrafter')"
|
||
>选择人员</el-button>
|
||
</div>
|
||
</div>
|
||
</el-form-item>
|
||
<el-form-item
|
||
label="主起草部门"
|
||
prop="primaryDrafterDept"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
v-if="false"
|
||
>
|
||
<el-input v-model="form.primaryDrafterDept" v-show="false"></el-input>
|
||
<div class="tag-group">
|
||
<template v-for="(tag, index) in primaryDrafterDept">
|
||
<transition name="el-zoom-in-center">
|
||
<div
|
||
class="tag-wrap"
|
||
v-if="primaryDrafterDeptTagAnimateList.includes(tag)"
|
||
:key="index"
|
||
>
|
||
<el-tag
|
||
size="small"
|
||
@close="handleRemoveDeptTag(index)"
|
||
>{{ tag.oldname || tag.name }}</el-tag
|
||
>
|
||
</div>
|
||
</transition>
|
||
</template>
|
||
<div class="tag-wrap">
|
||
<el-button
|
||
type="primary"
|
||
size="mini"
|
||
round
|
||
class="common-button-primary"
|
||
@click="handleChooseByDrawer('primaryDrafterDept')"
|
||
v-if="false"
|
||
>选择部门</el-button>
|
||
<span style="color: #DCDFE6" v-if="!primaryDrafterDept.length">选择主起草部门后自动带出</span>
|
||
</div>
|
||
</div>
|
||
</el-form-item>
|
||
<el-form-item
|
||
label="其他起草人"
|
||
prop="compilersUser"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
>
|
||
<el-input v-model="form.compilersUser" v-show="false"></el-input>
|
||
<div class="tag-group">
|
||
<template v-for="(tag, index) in compilersUser">
|
||
<transition name="el-zoom-in-center">
|
||
<div
|
||
class="tag-wrap"
|
||
v-if="compilersUserTagAnimateList.includes(tag)"
|
||
:key="index"
|
||
>
|
||
<el-tag
|
||
size="small"
|
||
closable
|
||
@close="handleRemovePersonTag(tag, index)"
|
||
>{{ tag.userName || tag.name || tag.oldName }}</el-tag
|
||
>
|
||
</div>
|
||
</transition>
|
||
</template>
|
||
<div class="tag-wrap">
|
||
<el-button
|
||
type="primary"
|
||
size="mini"
|
||
round
|
||
class="common-button-primary"
|
||
@click="handleChooseByOrgTable('otherDrafter')"
|
||
>选择人员</el-button
|
||
>
|
||
</div>
|
||
</div>
|
||
</el-form-item>
|
||
<el-form-item
|
||
label="起草部门"
|
||
prop="otherDrafterDept"
|
||
label-width="150px"
|
||
class="add-form-item">
|
||
<el-input v-model="form.otherDrafterDept" v-show="false"></el-input>
|
||
<div class="tag-group">
|
||
<template v-for="(tag, index) in otherDrafterDept">
|
||
<transition name="el-zoom-in-center">
|
||
<div
|
||
class="tag-wrap"
|
||
v-if="otherDrafterDeptTagAnimateList.includes(tag)"
|
||
:key="index"
|
||
>
|
||
<el-tag
|
||
size="small"
|
||
closable
|
||
@close="handleOtherRemoveDeptTag(index)"
|
||
>{{ tag.oldname || tag.name }}</el-tag
|
||
>
|
||
</div>
|
||
</transition>
|
||
</template>
|
||
<div class="tag-wrap">
|
||
<el-button
|
||
type="primary"
|
||
size="mini"
|
||
round
|
||
class="common-button-primary"
|
||
@click="handleChooseByTree('dept')"
|
||
v-if="false"
|
||
>选择部门</el-button>
|
||
<span style="color: #DCDFE6" v-if="!otherDrafterDept.length">选择起草部门后自动带出</span>
|
||
</div>
|
||
</div>
|
||
</el-form-item>
|
||
<!-- <el-form-item-->
|
||
<!-- label="起草分标委"-->
|
||
<!-- prop="draftCommittee"-->
|
||
<!-- label-width="150px"-->
|
||
<!-- class="add-form-item"-->
|
||
<!-- >-->
|
||
<!-- <el-select-->
|
||
<!-- v-model="form.draftCommittee"-->
|
||
<!-- placeholder="请选择起草分标委"-->
|
||
<!-- clearable-->
|
||
<!-- >-->
|
||
<!-- <el-option-->
|
||
<!-- v-for="item in formOption.FBW"-->
|
||
<!-- :key="item.value"-->
|
||
<!-- :value="item.value"-->
|
||
<!-- :label="item.label"></el-option>-->
|
||
<!-- </el-select>-->
|
||
<!-- </el-form-item>-->
|
||
<el-form-item
|
||
label="标准密级"
|
||
prop="standLevel"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
>
|
||
<el-select
|
||
v-model="form.standLevel"
|
||
placeholder="请选择标准密级"
|
||
clearable
|
||
>
|
||
<el-option
|
||
v-for="opt in formOption.MJ"
|
||
:key="opt.value"
|
||
:value="opt.value"
|
||
:label="opt.label"
|
||
></el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
<el-form-item
|
||
label="计划开始编写日期"
|
||
prop="planStartTime"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
>
|
||
<el-date-picker
|
||
v-model.trim="form.planStartTime"
|
||
:editable="false"
|
||
placeholder="计划开始编写日期"
|
||
clearable
|
||
></el-date-picker>
|
||
</el-form-item>
|
||
<el-form-item
|
||
label="计划发布日期"
|
||
prop="putTime"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
>
|
||
<el-date-picker
|
||
v-model.trim="form.putTime"
|
||
:editable="false"
|
||
placeholder="请选择计划发布日期"
|
||
clearable
|
||
></el-date-picker>
|
||
</el-form-item>
|
||
<el-form-item
|
||
label="涉及的会签部门"
|
||
prop="compileUnit"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
>
|
||
<el-select
|
||
v-model="form.compileUnit"
|
||
multiple
|
||
v-show="false"
|
||
></el-select>
|
||
<div class="tag-group">
|
||
<template v-for="(tag, index) in compileUnitDept">
|
||
<transition name="el-zoom-in-center">
|
||
<div
|
||
class="tag-wrap"
|
||
v-if="compileUnitTagAnimateList.includes(tag)"
|
||
:key="index"
|
||
>
|
||
<el-tag
|
||
size="small"
|
||
closable
|
||
@close="handleRemoveTag('compileUnitDept', index, tag)"
|
||
>{{ tag.oldname || tag.name }}</el-tag
|
||
>
|
||
</div>
|
||
</transition>
|
||
</template>
|
||
<div class="tag-wrap">
|
||
<el-button
|
||
type="primary"
|
||
size="mini"
|
||
round
|
||
class="common-button-primary"
|
||
@click="handleChooseByTree('dept', 'HQBM')"
|
||
>选择部门</el-button
|
||
>
|
||
</div>
|
||
</div>
|
||
</el-form-item>
|
||
<el-form-item
|
||
label="标准制修订来源"
|
||
prop="planSource"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
>
|
||
<!-- <el-select-->
|
||
<!-- v-model="form.planSource"-->
|
||
<!-- placeholder="请选择标准制修订来源"-->
|
||
<!-- filterable-->
|
||
<!-- clearable-->
|
||
<!-- >-->
|
||
<!-- <el-option-->
|
||
<!-- v-for="opt in formOption.STANDSOURCEREVISION"-->
|
||
<!-- :key="opt.value"-->
|
||
<!-- :value="opt.value"-->
|
||
<!-- :label="opt.label"-->
|
||
<!-- ></el-option>-->
|
||
<!-- </el-select>-->
|
||
<div class="search-stand-wrap">
|
||
<el-input
|
||
v-model="form.planSource"
|
||
placeholder="请填写标准制修订来源"
|
||
maxlength="100"
|
||
></el-input>
|
||
<div class="btn-wrap">
|
||
<el-button
|
||
type="primary"
|
||
class="common-button-primary"
|
||
size="mini"
|
||
@click="selectPlanSource"
|
||
>手动查找</el-button>
|
||
</div>
|
||
</div>
|
||
|
||
</el-form-item>
|
||
<el-form-item
|
||
prop="planReason"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
title="描述制修订原因。包括涉及的PQCP、LLR、公司重要会议要求、标准核心内容/条款等。可附报告说明。">
|
||
<template slot="label">制修订原因<i class="el-icon-warning-outline"></i></template>
|
||
<el-input
|
||
type="textarea"
|
||
v-model="form.planReason"
|
||
placeholder="描述制修订原因。包括涉及的PQCP、LLR、公司重要会议要求、标准核心内容/条款等。可附报告说明。"
|
||
maxlength="1000"
|
||
:autosize="{ minRows: 4, maxRows: 8 }"
|
||
show-word-limit
|
||
></el-input>
|
||
<!-- 制修订原因附件上传 -->
|
||
<div class="file-wrap">
|
||
<el-button
|
||
round
|
||
class="common-button-primary"
|
||
size="mini"
|
||
type="primary"
|
||
@click="handleUpload('制修订原因')"
|
||
>{{ fileList['planReason'].length ? '查看已上传的附件' : '附件上传' }}</el-button>
|
||
</div>
|
||
</el-form-item>
|
||
<el-form-item
|
||
prop="testWork"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
title="描述曾做过哪些验证,以确保风险最小或标准内容是可执行的。包括验证时间、方法,结果分析。验证方法包括但不限于竞品车分析,售后市场反馈,试验验证等。如内容较多可续页或另附报告说明。">
|
||
<template slot="label">验证工作<i class="el-icon-warning-outline"></i></template>
|
||
<el-input
|
||
type="textarea"
|
||
v-model="form.testWork"
|
||
placeholder="描述曾做过哪些验证,以确保风险最小或标准内容是可执行的。包括验证时间、方法,结果分析。验证方法包括但不限于竞品车分析,售后市场反馈,试验验证等。如内容较多可续页或另附报告说明。"
|
||
maxlength="1000"
|
||
:autosize="{ minRows: 4, maxRows: 8 }"
|
||
show-word-limit
|
||
></el-input>
|
||
<!-- 验证工作附件上传 -->
|
||
<div class="file-wrap">
|
||
<el-button
|
||
round
|
||
class="common-button-primary"
|
||
size="mini"
|
||
type="primary"
|
||
@click="handleUpload('验证工作')"
|
||
>{{ fileList['testWork'].length ? '查看已上传的附件' : '附件上传' }}</el-button>
|
||
</div>
|
||
</el-form-item>
|
||
<el-form-item
|
||
label="项目影响"
|
||
prop="planImpact"
|
||
label-width="150px"
|
||
class="add-form-item"
|
||
title="描述对项目的影响。包括该标准发布后涉及的项目以及预计最先在哪个项目实施,为保证标准实施效果需在项目推动的工作,特别是标准制修订前后可能引起的单车成本变化说明等。">
|
||
<template slot="label">项目影响<i class="el-icon-warning-outline"></i></template>
|
||
<el-input
|
||
type="textarea"
|
||
v-model="form.planImpact"
|
||
placeholder="描述对项目的影响。包括该标准发布后涉及的项目以及预计最先在哪个项目实施,为保证标准实施效果需在项目推动的工作,特别是标准制修订前后可能引起的单车成本变化说明等。"
|
||
maxlength="1000"
|
||
:autosize="{ minRows: 4, maxRows: 8 }"
|
||
show-word-limit
|
||
></el-input>
|
||
<!-- 项目影响附件上传 -->
|
||
<div class="file-wrap">
|
||
<el-button
|
||
round
|
||
class="common-button-primary"
|
||
size="mini"
|
||
type="primary"
|
||
@click="handleUpload('项目影响')"
|
||
>{{ fileList['planImpact'].length ? '查看已上传的附件' : '附件上传' }}</el-button>
|
||
</div>
|
||
</el-form-item>
|
||
</el-form>
|
||
</div>
|
||
</div>
|
||
<div class="demo-drawer-footer">
|
||
<el-button
|
||
round
|
||
class="common-button-primary"
|
||
icon="el-icon-check"
|
||
type="primary"
|
||
@click="handleSubmit"
|
||
:loading="loading.isSubmit"
|
||
>提交</el-button
|
||
>
|
||
<el-button
|
||
round
|
||
class="common-button-default"
|
||
icon="el-icon-close"
|
||
@click="handleCancel"
|
||
>取消</el-button
|
||
>
|
||
</div>
|
||
</el-drawer>
|
||
|
||
<!-- 人员选择/部门选择 -->
|
||
<el-drawer
|
||
:title="chooseType === 'person' ? '其他起草人' : '涉及的会签部门'"
|
||
:visible.sync="visibleTree"
|
||
>
|
||
<div class="demo-drawer-content">
|
||
<dept-tree
|
||
treeDivId="compileUnitTree"
|
||
ref="compileUnitTree"
|
||
allDept
|
||
checkEnable
|
||
onlyChecked
|
||
:show-user="chooseType === 'person'"
|
||
:editable="false"
|
||
:chkboxType="{'Y': 'ps', 'N': 'ps'}"
|
||
:check-id-list="chooseDrawerCheckIdList"
|
||
:expandAll="chooseType !== 'person'"
|
||
orgType="DEPART"
|
||
@treeOnCheck="handleTreeChecked"
|
||
v-if="visibleAddEditModal && visibleTree"
|
||
>
|
||
</dept-tree>
|
||
</div>
|
||
<div class="demo-drawer-footer">
|
||
<el-button
|
||
round
|
||
class="common-button-primary"
|
||
type="primary"
|
||
icon="el-icon-check"
|
||
@click="handleChooseConfirm"
|
||
>确定
|
||
</el-button
|
||
>
|
||
<el-button
|
||
round
|
||
class="common-button-default"
|
||
icon="el-icon-close"
|
||
@click="visibleTree = false"
|
||
>取消
|
||
</el-button
|
||
>
|
||
</div>
|
||
</el-drawer>
|
||
|
||
<!-- 主起草部门/主起草人/起草部门/其他起草人 -->
|
||
<el-drawer
|
||
:title="chooseDrawerTitle"
|
||
:visible.sync="visible.visibleChooseDrawer"
|
||
>
|
||
<div class="demo-drawer-content">
|
||
<laws-tree
|
||
:zNodes="zNodes"
|
||
treeDivId="chooseDrawerTree"
|
||
ref="chooseDrawerTree"
|
||
checkEnable
|
||
onlyChecked
|
||
:editable="false"
|
||
:chkboxType="chkboxType"
|
||
:checkIdList="chooseDrawerCheckIdList"
|
||
:loading="loading.loadZNodes"
|
||
:loading-tips="loading.loadZNodesTips"
|
||
@treeOnCheck="handleChooseDrawerOnCheck"
|
||
v-if="visible.visibleChooseDrawer"
|
||
style="height: 100%;"
|
||
>
|
||
</laws-tree>
|
||
</div>
|
||
<div class="demo-drawer-footer">
|
||
<el-button
|
||
round
|
||
class="common-button-primary"
|
||
type="primary"
|
||
icon="el-icon-check"
|
||
@click="handleChooseDrawerConfirm"
|
||
>确定</el-button
|
||
>
|
||
<el-button
|
||
round
|
||
class="common-button-default"
|
||
icon="el-icon-close"
|
||
@click="handleChooseDrawerCancel"
|
||
>取消</el-button
|
||
>
|
||
</div>
|
||
</el-drawer>
|
||
|
||
<!-- 从全公司选人,2021-03-22(上汽大数据量人员解决方案) -->
|
||
<org-table
|
||
:visible.sync="visible.visibleOrgTable"
|
||
:config="{
|
||
value: this.orgTableVal,
|
||
valueName: this.orgTableName
|
||
}"
|
||
:title="chooseDrawerTitle"
|
||
:exclude-user="excludeUser"
|
||
:max-selected="maxSelected"
|
||
:max-selected-tips="maxSelectedTips"
|
||
dialog-model
|
||
@confirm="handleChooseOrgTableConfirm"
|
||
></org-table>
|
||
|
||
<!--导入模态窗-->
|
||
<el-dialog
|
||
width="400px"
|
||
:visible.sync="importModalshowflag"
|
||
title="导入文件"
|
||
:footer-hide="true"
|
||
>
|
||
<el-upload
|
||
multiple
|
||
drag
|
||
:show-file-list="showUploadlist"
|
||
:on-progress="onProgress"
|
||
:on-success="importFileSuccess"
|
||
:on-remove="removeOneFile"
|
||
:before-upload="beforeUpload"
|
||
:on-error="handleImportTemplateErr"
|
||
:action="importUrl"
|
||
:file-list="defaultFileList"
|
||
name="file"
|
||
ref="importFile"
|
||
>
|
||
<div style="padding: 20px 0">
|
||
<i class="el-icon-upload" style="color: #3399ff"></i>
|
||
<p>点击或拖拽上传文件</p>
|
||
</div>
|
||
</el-upload>
|
||
</el-dialog>
|
||
|
||
<!-- 代替企标编号 -->
|
||
<el-dialog
|
||
title="代替企标编号"
|
||
:visible.sync="replaceLawsNumModel"
|
||
width="900px"
|
||
:close-on-click-modal="false"
|
||
@close="replaceLawsNumModelCancel"
|
||
:append-to-body="true"
|
||
>
|
||
<div class="search-area">
|
||
<div class="left">
|
||
<el-form
|
||
:modal="replaceLawsNumForm"
|
||
:inline="true"
|
||
class="label-input-form"
|
||
>
|
||
<el-form-item label="标准编号" class="search-item">
|
||
<el-input
|
||
v-model="replaceLawsNumForm.lawsNumber"
|
||
placeholder="根据标准编号查找"
|
||
clearable
|
||
:maxlength="100"
|
||
></el-input>
|
||
</el-form-item>
|
||
<el-form-item class="search-item btn-box">
|
||
<el-button
|
||
icon="el-icon-search"
|
||
type="primary"
|
||
class="common-button-primary"
|
||
round
|
||
@click="getReplaceLawsNumRow"
|
||
>
|
||
</el-button>
|
||
</el-form-item>
|
||
<el-form-item class="search-item btn-box">
|
||
<el-button
|
||
class="common-button-default"
|
||
icon="el-icon-refresh-left"
|
||
round
|
||
type="default"
|
||
@click="getResetLawsNumRow"
|
||
></el-button>
|
||
</el-form-item>
|
||
</el-form>
|
||
</div>
|
||
</div>
|
||
<el-table
|
||
ref="selections"
|
||
:data="replaceLawsNumRow"
|
||
tooltip-effect="dark"
|
||
style="width: 100%; overflow-y: auto; overflow-x: hidden"
|
||
border
|
||
:height="300"
|
||
:header-cell-style="{
|
||
background: '#e8e8e8',
|
||
color: '#333333',
|
||
fontSize: '16px',
|
||
fontWeight: 'bold',
|
||
height: '48px',
|
||
}"
|
||
class="v-class"
|
||
@selection-change="selectReplaceStandNumRowChange"
|
||
>
|
||
<el-table-column type="selection" width="55" align="center">
|
||
</el-table-column>
|
||
<el-table-column label="企标编号" width="130">
|
||
<template slot-scope="scope">
|
||
{{ scope.row.standSortShow + " " + scope.row.standCode }}
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column prop="standName" label="中文名称" width="130">
|
||
</el-table-column>
|
||
<el-table-column prop="issueTime" label="发布日期" width="130">
|
||
<template slot-scope="scope">
|
||
{{
|
||
scope.row.issueTime
|
||
? $moment(scope.row.issueTime).format("YYYY-MM-DD")
|
||
: ""
|
||
}}
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column prop="putTime" label="实施日期" width="130">
|
||
<template slot-scope="scope">
|
||
{{
|
||
scope.row.putTime
|
||
? $moment(scope.row.putTime).format("YYYY-MM-DD")
|
||
: ""
|
||
}}
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column prop="standNatureShow" label="标准性质" width="130">
|
||
</el-table-column>
|
||
<el-table-column prop="standStatusShow" label="标准状态">
|
||
</el-table-column>
|
||
</el-table>
|
||
<loading :loading="replaceLoading">{{ $t("m.dataAcquisition") }}</loading>
|
||
<!--分页-->
|
||
<pagination
|
||
style="position: relative"
|
||
:page="replacePage"
|
||
:total="replaceTotal"
|
||
@pageChange="pageChangeReplace"
|
||
@pageSizeChange="pageSizeChangeReplace"
|
||
></pagination>
|
||
<div slot="footer" class="demo-drawer-footer">
|
||
<el-button
|
||
size="small"
|
||
round
|
||
class="common-button-primary"
|
||
icon="el-icon-close"
|
||
@click="replaceLawsNumModel = false"
|
||
>取消</el-button
|
||
>
|
||
<el-button
|
||
size="small"
|
||
type="primary"
|
||
round
|
||
class="common-button-default"
|
||
icon="el-icon-check"
|
||
@click="replaceLawsNumModelBt"
|
||
>提交</el-button
|
||
>
|
||
</div>
|
||
</el-dialog>
|
||
|
||
<!-- 企标检索 -->
|
||
<BussRetrieval
|
||
:visible.sync="visibleBussRetrieval"
|
||
type="bussStandard"
|
||
:condition="{
|
||
standCode: '',
|
||
cnName: ''
|
||
}"
|
||
@confirm="handleBussRetrievalConfirm"
|
||
></BussRetrieval>
|
||
|
||
<!--企标编号生成组件-->
|
||
<GenerationNumber
|
||
:is-show.sync="isShow"
|
||
:plan-type="form.planType"
|
||
:change-num="changeNum"
|
||
:change-En="changeEn"
|
||
@isOk="isOk"
|
||
></GenerationNumber>
|
||
|
||
<!-- 导入失败 -->
|
||
<el-dialog :visible.sync="importFailed" :close-on-click-modal="false" width="400px">
|
||
<p slot="title" style="color:#f60">
|
||
<span>导入失败</span>
|
||
</p>
|
||
<div style="max-height: 300px;overflow: auto;padding: 10px 0;">
|
||
<p v-html="importForm.content"></p>
|
||
</div>
|
||
<div slot="footer" class="demo-drawer-footer">
|
||
<el-button type="primary" round class="common-button-default" icon="el-icon-check" @click="importFailed = false">确认</el-button>
|
||
</div>
|
||
</el-dialog>
|
||
|
||
<!--导出文件改名字模态框-->
|
||
<el-dialog :visible.sync="exportModelFlag" class="export-dialog" title="导出文件" width="300px">
|
||
<el-form :inline="true" class="label-input-form search-area">
|
||
<el-form-item label="导出名称" class="search-item">
|
||
<el-input v-model="exportName" placeholder="请输入导出文件名称" :maxlength="30" clearable label="导出名称"/>
|
||
</el-form-item>
|
||
</el-form>
|
||
<span slot="footer" class="demo-drawer-footer">
|
||
<el-button class="common-button-default" icon="el-icon-close" @click="exportModelFlag = false">取消</el-button>
|
||
<el-button type="primary" round class="common-button-primary" icon="el-icon-check" @click="exportTestItem">提交</el-button>
|
||
</span>
|
||
</el-dialog>
|
||
|
||
<!-- 附件上传 -->
|
||
<el-dialog
|
||
width='400px'
|
||
:visible.sync="importModalshowflagtemp"
|
||
:title="fileTitle"
|
||
:footer-hide="true"
|
||
append-to-body
|
||
@closed="defaultFileList = []"
|
||
>
|
||
<el-upload
|
||
class="customer-upload"
|
||
multiple
|
||
drag
|
||
show-file-list
|
||
:on-success="handleSuccess"
|
||
:before-upload="onBeforeUpload"
|
||
:on-remove="handleFileRemove"
|
||
:action="simpleUploadPath"
|
||
:limit="8"
|
||
:on-exceed="handleExceed"
|
||
name="file"
|
||
:file-list="defaultFileList"
|
||
ref="importFileAboutStand">
|
||
<i class="el-icon-upload"></i>
|
||
<div class="el-upload__text">点击或拖拽上传文件</div>
|
||
</el-upload>
|
||
</el-dialog>
|
||
<el-drawer
|
||
title="选择标准制修订来源"
|
||
:visible.sync="selectPlanSourceDrawer"
|
||
direction="rtl"
|
||
custom-class="demo-drawer"
|
||
ref="drawer"
|
||
size="500px"
|
||
:before-close="handleClose"
|
||
:wrapperClosable="false"
|
||
>
|
||
<div class="demo-drawer-content-mini">
|
||
<div class="search-area">
|
||
</div>
|
||
<div class="container">
|
||
<el-table
|
||
ref="sourceTable"
|
||
:data="formOption.STANDSOURCEREVISION"
|
||
border
|
||
style="width: 100%;"
|
||
height="100%"
|
||
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
|
||
fontWeight: 'bold', height: '48px'}"
|
||
@selection-change="sourceSelect">
|
||
<el-table-column
|
||
type="selection"
|
||
width="55"
|
||
align="center">
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="label"
|
||
label="标准制修订来源">
|
||
</el-table-column>
|
||
</el-table>
|
||
</div>
|
||
<!-- <pagination :page="productForm.page" :total="typeProjectTableTotal"-->
|
||
<!-- @pageChange="typeProjectTablePageChange" @pageSizeChange="typeProjectTablePageSizeChange"></pagination>-->
|
||
<!-- <loading :loading="loading">数据获取中</loading>-->
|
||
</div>
|
||
<div class="demo-drawer-footer">
|
||
<el-button type="primary" round class="common-button-primary" icon="el-icon-check" @click="sourceListOk">确定</el-button>
|
||
<el-button class="common-button-default" icon="el-icon-close" @click="handleClose">取消</el-button>
|
||
</div>
|
||
</el-drawer>
|
||
<org-table
|
||
title="人员授权"
|
||
:visible.sync="visibleOrgTable"
|
||
dialog-model
|
||
:config="{
|
||
value: '',
|
||
valueName: ''
|
||
}"
|
||
@confirm="handleOrgTableConfirm"
|
||
></org-table>
|
||
<loading style="z-index: 2099;" :loading="exportLoading">导入中...</loading>
|
||
</div>
|
||
</template>
|
||
|
||
<script>
|
||
import deptTree from "@/components/deptTree";
|
||
import ProcessSearchStand from "./components/ProcessSearchStand";
|
||
import CustomFile from "@/components/CustomFormComponents/File";
|
||
import BussRetrieval from 'process/components/BussRetrieval'
|
||
import {
|
||
getDept,
|
||
getUserOrgDept,
|
||
getDepartmentByUserId
|
||
} from 'api'
|
||
import { mapGetters } from 'vuex'
|
||
export default {
|
||
name: "EnterBSysRevPlanManaLib",
|
||
data() {
|
||
return {
|
||
exportLoading: false,
|
||
isAdvancedSearch: false,
|
||
twoOptions: [
|
||
{
|
||
label: '计划状态',
|
||
value: 'plan_status',
|
||
type: 'SEL_OPTION',
|
||
disabled: false
|
||
},
|
||
{
|
||
label: '计划类型',
|
||
value: 'plan_type',
|
||
type: 'SEL_OPTION',
|
||
disabled: false
|
||
},
|
||
{
|
||
label: '企标编号',
|
||
value: 'stand_code',
|
||
type: 'INPUT',
|
||
disabled: false
|
||
},
|
||
{
|
||
label: '企标名称',
|
||
value: 'cn_name',
|
||
type: 'INPUT',
|
||
disabled: false
|
||
},
|
||
{
|
||
label: '英文名称',
|
||
value: 'en_name',
|
||
type: 'INPUT',
|
||
disabled: false
|
||
},
|
||
{
|
||
label: '主起草部门',
|
||
value: 'primary_drafter_dept',
|
||
type: 'SEL_OPTION',
|
||
selVal: 'ORGLIST',
|
||
disabled: false
|
||
},
|
||
{
|
||
label: '起草部门',
|
||
value: 'other_drafter_dept',
|
||
type: 'SEL_OPTION',
|
||
selVal: 'ORGLIST',
|
||
disabled: false
|
||
},
|
||
{
|
||
label: '涉及会签部门',
|
||
value: 'compile_unit',
|
||
type: 'SEL_OPTS',
|
||
selVal: 'ORGLIST',
|
||
disabled: false
|
||
},
|
||
{
|
||
label: '标准密级',
|
||
value: 'stand_level',
|
||
type: 'SEL_OPTION',
|
||
selVal: '',
|
||
disabled: false
|
||
},
|
||
{
|
||
label: '标准制修订来源',
|
||
value: 'plan_source',
|
||
type: 'INPUT',
|
||
selVal: '',
|
||
disabled: false
|
||
},
|
||
{
|
||
label: '计划开始编写日期',
|
||
value: 'plan_start_time',
|
||
type: 'DATE_PIC_OPTS',
|
||
disabled: false
|
||
},
|
||
{
|
||
label: '计划发布日期',
|
||
value: 'put_time',
|
||
type: 'DATE_PIC_OPTS',
|
||
disabled: false
|
||
},
|
||
{
|
||
label: '实际发布日期',
|
||
value: 'actual_end_time',
|
||
type: 'DATE_PIC_OPTS',
|
||
disabled: false
|
||
}
|
||
],
|
||
threeOptions: [],
|
||
fileTitle: '',
|
||
importModalshowflagtemp: false,
|
||
uploadTemp: '',
|
||
saveExportType: '',
|
||
exportModelFlag: false,
|
||
exportName: '',
|
||
importUrl: "/api/lawss/sarBussStandPlan/importSarBussStandPlanInfo",
|
||
isSubmit: false,
|
||
form: {
|
||
standCode: "",
|
||
replacedStandNum: "",
|
||
planType: "",
|
||
cnName: "",
|
||
enName: "",
|
||
standSort: "",
|
||
planStartTime: "",
|
||
planEndTime: "",
|
||
compilersUser: '',
|
||
compilersUserName: '',
|
||
standLevel: "",
|
||
putTime: "",
|
||
compileUnit: [],
|
||
planSource: "",
|
||
planReason: "",
|
||
testWork: "",
|
||
planImpact: "",
|
||
planReasonFile: "",
|
||
testWorkFile: "",
|
||
planImpactFile: "",
|
||
planStatus: "",
|
||
signConfirmFile: "",
|
||
draftCommittee: "",
|
||
reviseBussStand: "",
|
||
// 主起草部门
|
||
primaryDrafterDept: '',
|
||
primaryDrafterDeptName: '',
|
||
// 主起草人
|
||
primaryDrafter: '',
|
||
primaryDrafterName: '',
|
||
// 起草部门
|
||
otherDrafterDept: '',
|
||
otherDrafterDeptName: '',
|
||
},
|
||
visibleAddEditModal: false,
|
||
isEdit: false,
|
||
formRules: {
|
||
// standSort: [
|
||
// { required: true, message: "请选择企标类别", trigger: "change" },
|
||
// ],
|
||
planStatus: [
|
||
{ required: true, message: "请选择计划状态", trigger: "change" },
|
||
],
|
||
standCode: [
|
||
{ required: true, message: "请输入企标编号", trigger: "change" },
|
||
],
|
||
replacedStandNum: [],
|
||
planType: [
|
||
{ required: true, message: "请选择计划类型", trigger: "change" },
|
||
],
|
||
cnName: [
|
||
{ required: true, message: "请填写企标名称", trigger: "blur" },
|
||
],
|
||
enName: [
|
||
{ required: true, message: "请填写企标英文名称", trigger: "blur" },
|
||
],
|
||
putTime: [
|
||
{ required: true, message: "请选择计划发布日期", trigger: "change" },
|
||
],
|
||
planEndTime: [],
|
||
compilersUser: [
|
||
{ required: true, message: "请填写其他起草人", trigger: "change" },
|
||
],
|
||
standLevel: [
|
||
{ required: true, message: "请选择标准密级", trigger: "change" },
|
||
],
|
||
planStartTime: [
|
||
{ required: true, message: "请选择计划开始编写日期", trigger: "change" },
|
||
],
|
||
compileUnit: [
|
||
{ required: true, message: "请填写涉及的会签部门", trigger: "blur" },
|
||
],
|
||
planSource: [
|
||
{
|
||
required: true,
|
||
message: "请选择标准制修订来源",
|
||
trigger: "change",
|
||
},
|
||
],
|
||
planReason: [
|
||
{ required: true, message: "请填写制修订原因", trigger: "blur" },
|
||
],
|
||
testWork: [
|
||
{ required: true, message: "请填写验证工作", trigger: "blur" },
|
||
],
|
||
planImpact: [
|
||
{ required: true, message: "请填写项目影响", trigger: "blur" },
|
||
],
|
||
planReasonFile: [],
|
||
testWorkFile: [],
|
||
planImpactFile: [],
|
||
signConfirmFile: [
|
||
{ required: true, message: "请上传签字确认文件", trigger: "blur" },
|
||
],
|
||
draftCommittee: [
|
||
{ required: true, message: "请选择起草分标委", trigger: "change" }
|
||
],
|
||
reviseBussStand: [
|
||
{ required: true, message: "请选择修订企标", trigger: "change" }
|
||
],
|
||
primaryDrafter: [
|
||
{ required: true, message: '主起草人不能为空', trigger: 'change' }
|
||
],
|
||
primaryDrafterDept: [
|
||
{ required: true, message: '主起草部门不能为空', trigger: 'change' }
|
||
],
|
||
otherDrafter: [
|
||
{ required: true, message: '其他起草人不能为空', trigger: 'change' }
|
||
],
|
||
otherDrafterDept: [
|
||
{ required: true, message: '起草部门不能为空', trigger: 'change' }
|
||
]
|
||
},
|
||
// 可选项
|
||
formOption: {
|
||
// 计划状态
|
||
planStatusOption: [
|
||
{
|
||
value: "1",
|
||
label: "制定中",
|
||
},
|
||
{
|
||
value: "2",
|
||
label: "修订中",
|
||
},
|
||
{
|
||
value: "3",
|
||
label: "已发布",
|
||
},
|
||
{
|
||
value: "4",
|
||
label: "计划已确认",
|
||
},
|
||
],
|
||
// 计划类型
|
||
planTypeOption: [
|
||
{
|
||
value: "1",
|
||
label: "制定",
|
||
},
|
||
{
|
||
value: "2",
|
||
label: "修订",
|
||
},
|
||
],
|
||
// 制修订原因
|
||
planReasonOption: [],
|
||
// 标准制修订来源
|
||
STANDSOURCEREVISION: [],
|
||
// 标准密级别
|
||
MJ: [],
|
||
// 起草分标委
|
||
FBW: []
|
||
},
|
||
loading: {
|
||
isSubmit: false,
|
||
loadData: false,
|
||
searching: false,
|
||
delete: false,
|
||
loadZNodes: false,
|
||
loadZNodesTips: ''
|
||
},
|
||
selection: [],
|
||
fileList: {
|
||
planImpact: [],
|
||
testWork: [],
|
||
planReason: [],
|
||
},
|
||
visibleTree: false,
|
||
compileUnitDept: [],
|
||
compilersUser: [],
|
||
personCheckedListCache: [],
|
||
deptCheckedListCache: [],
|
||
compileUnitTagAnimateList: [],
|
||
compilersUserTagAnimateList: [],
|
||
// 查询相关参数
|
||
condition: {
|
||
page: 1,
|
||
pageSize: this.$store.getters.userInfo.configContent,
|
||
total: 0,
|
||
validFlag: 0,
|
||
planStartTime: "",
|
||
planStartTimeSt: "",
|
||
planStartTimeEd: "",
|
||
putTime: "",
|
||
putTimeSt: "",
|
||
putTimeEd: "",
|
||
planStatus: "",
|
||
standCode: "",
|
||
cnName: "",
|
||
planType: "",
|
||
replacedStandNum: "",
|
||
draftingUnit: "",
|
||
draftingUnitName: "",
|
||
},
|
||
// 计划列表数据
|
||
tableData: [],
|
||
visiblePlanCheck: false,
|
||
importModalshowflag: false,
|
||
showUploadlist: false,
|
||
defaultFileList: [],
|
||
chooseType: "",
|
||
replaceLawsNumModel: false,
|
||
// 代替标准号
|
||
replaceLawsNumForm: {
|
||
lawsNumber: "", // 政策编号
|
||
page: 1,
|
||
pageSize: this.$store.getters.userInfo.configContent,
|
||
total: 0,
|
||
lawsType: "INLAND",
|
||
quoteIdList: "",
|
||
validFlag: "0",
|
||
},
|
||
replaceLawsNumRow: [], // 代替政策号 数组内容
|
||
replaceTotal: 0,
|
||
selectedListRep: [],
|
||
replaceLoading: true,
|
||
replacePage: 1,
|
||
visibleBussRetrieval: false,
|
||
isShow: false,
|
||
// 计划类型选择修订时,传给企标编号修订企标的值
|
||
changeNum:'',
|
||
changeEn:'',
|
||
// 计划类型选择修订时,传给企标编号修订企标的值
|
||
importFailed: false,
|
||
importForm: {
|
||
content: ''
|
||
},
|
||
selectedList: [],
|
||
// 主起草部门
|
||
primaryDrafterDept: [],
|
||
primaryDrafterDeptTagAnimateList: [],
|
||
// 主起草人
|
||
primaryDrafter: [],
|
||
primaryDrafterTagAnimateList: [],
|
||
// 起草部门
|
||
otherDrafterDept: [],
|
||
otherDrafterDeptTagAnimateList: [],
|
||
// 当前选取的字段(树结构选择)
|
||
chooseItemKey: '',
|
||
visible: {
|
||
visibleChooseDrawer: false,
|
||
visibleOrgTable: false
|
||
},
|
||
zNodes: [],
|
||
chooseDrawerCheckList: [],
|
||
chooseDrawerCheckIdList: [],
|
||
orgTableVal: '',
|
||
orgTableName: '',
|
||
selectPlanSourceDrawer: false,
|
||
sourceList: [],
|
||
bussId: '',
|
||
visibleOrgTable: false
|
||
};
|
||
},
|
||
methods: {
|
||
selectPlanSource () {
|
||
this.selectPlanSourceDrawer = true
|
||
this.sourceList = []
|
||
},
|
||
handleClose () {
|
||
this.selectPlanSourceDrawer = false
|
||
this.$refs.sourceTable.clearSelection()
|
||
},
|
||
sourceSelect (selected) {
|
||
this.sourceList = selected
|
||
},
|
||
sourceListOk () {
|
||
if (this.sourceList.length === 1) {
|
||
this.form.planSource = this.sourceList[0].label
|
||
this.sourceList = []
|
||
this.selectPlanSourceDrawer = false
|
||
this.$refs.sourceTable.clearSelection()
|
||
} else {
|
||
this.$message.warning('请选择一条数据')
|
||
}
|
||
},
|
||
planTypeChange(){
|
||
this.form.standCode = ""
|
||
this.form.cnName = ""
|
||
this.form.enName = ""
|
||
this.form.replacedStandNum = ""
|
||
this.form.reviseBussStand = ""
|
||
},
|
||
TipsClass (row, index) {
|
||
return row.row.isTimeOut === '1' ? 'TipsClass' : ''
|
||
},
|
||
handleExceed (files, fileList) {
|
||
this.$message.warning(`当前限制选择 8 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`)
|
||
},
|
||
isOk(val, obj) {
|
||
this.form.standCode = val
|
||
this.form.standCodeCondition = {...obj}
|
||
this.isShow = false
|
||
},
|
||
handleBussRetrievalConfirm(dataItem) {
|
||
this.form.reviseBussStand = dataItem.standCode
|
||
this.form.replacedStandNum = dataItem.standCode
|
||
if (this.form.planType==='2') {
|
||
let result= dataItem.standCode.split(/[()]/)
|
||
let resultOther = ''
|
||
if(result.length>0){
|
||
resultOther = result[0]
|
||
}
|
||
if (result) {
|
||
let num = result[1]
|
||
let verNum =num.replace(/[^0-9]/ig,"");
|
||
let verEn= num.replace(/[^A-Z]+/ig,"");
|
||
// 替换成当前年份
|
||
let indexRes = resultOther.lastIndexOf('-');
|
||
// let res = resultOther.substring(indexRes+1,indexRes.length);
|
||
let date=new Date;
|
||
let y = date.getFullYear()
|
||
resultOther = resultOther.replace(resultOther.substring(indexRes+1,indexRes.length),y)
|
||
this.form.standCode = resultOther +'(' +verEn + Number(Number(verNum)+1) + ')'
|
||
}
|
||
this.form.cnName = dataItem.standName
|
||
this.form.enName = dataItem.standEnName
|
||
}
|
||
this.visibleBussRetrieval = false
|
||
},
|
||
|
||
// 更多
|
||
handleCommand(command) {
|
||
switch (command[1]) {
|
||
case '编辑':
|
||
const row = JSON.parse(JSON.stringify(command[0]))
|
||
row.testWorkFileList = row.testWorkFileList || []
|
||
row.planReasonFileList = row.planReasonFileList || []
|
||
row.planImpactFileLis = row.planImpactFileLis || []
|
||
row.testWorkFileList.map((item) => {
|
||
item.name = item.oldFileName
|
||
})
|
||
row.planReasonFileList.map((item) => {
|
||
item.name = item.oldFileName
|
||
})
|
||
row.planImpactFileLis.map((item) => {
|
||
item.name = item.oldFileName
|
||
})
|
||
row.compileUnit = row.compileUnit ? row.compileUnit.split(',') : []
|
||
row.planStartTime = row.planStartTime.replace(new RegExp(/-/gm), '/')
|
||
row.putTime = row.putTime.replace(new RegExp(/-/gm), '/')
|
||
this.form = row
|
||
this.isEdit = true
|
||
this.visibleAddEditModal = true
|
||
const compilersUser = []
|
||
this.form.compilersUser.split(',').map((id, index) => {
|
||
compilersUser.push({
|
||
id,
|
||
name: this.form.compilersUserName.split(',')[index],
|
||
})
|
||
})
|
||
const otherDrafterDept = []
|
||
this.form.otherDrafterDept.split(',').map((id, index) => {
|
||
otherDrafterDept.push({
|
||
id,
|
||
name: this.form.otherDrafterDeptName.split(',')[index],
|
||
})
|
||
})
|
||
const compileUnitDept = []
|
||
const compileUnit = JSON.parse(JSON.stringify(this.form.compileUnit))
|
||
compileUnit.map((id, index) => {
|
||
compileUnitDept.push({
|
||
id,
|
||
name: this.form.compileUnitName.split(',')[index],
|
||
})
|
||
})
|
||
// 获取主起草人
|
||
if (row.primaryDrafter) {
|
||
this.primaryDrafter = [
|
||
{
|
||
id: row.primaryDrafter,
|
||
name: row.primaryDrafterName
|
||
}
|
||
]
|
||
this.form.primaryDrafter = row.primaryDrafter
|
||
this.form.primaryDrafterName = row.primaryDrafterName
|
||
}
|
||
// 起草部门
|
||
if (row.otherDrafterDeptName) {
|
||
this.otherDrafterDept = [
|
||
{
|
||
id: row.otherDrafterDept,
|
||
name: row.otherDrafterDeptName
|
||
}
|
||
]
|
||
this.form.otherDrafterDept = row.otherDrafterDept
|
||
this.form.otherDrafterDeptName = row.otherDrafterDeptName
|
||
}
|
||
// otherDrafterDept
|
||
this.compilersUser = compilersUser
|
||
this.compileUnitDept = compileUnitDept
|
||
this.otherDrafterDept = otherDrafterDept
|
||
this.fileList = {
|
||
planImpact: row.planImpactFileLis,
|
||
planReason: row.planReasonFileList,
|
||
testWork: row.testWorkFileList
|
||
}
|
||
break
|
||
case "查看":
|
||
const item = JSON.parse(JSON.stringify(command[0]))
|
||
const mj = item.standLevel
|
||
if (mj === 'GXNX7D6H59' || mj === 'JLAPYG7YCT') {
|
||
let routeUrl = this.$router.resolve({
|
||
name: 'enterBSysRevPlanManaLibDetail',
|
||
params: {
|
||
id: item.id,
|
||
pageType: 'INLAND_STAND'
|
||
}
|
||
})
|
||
window.open(routeUrl.href, '_blank')
|
||
} else if (mj === 'ACF675Z88W') {
|
||
// C3采取单独授权查看和主起草人查看
|
||
const zyqcr = item.primaryDrafter || '' // 主要起草人
|
||
const userInfo = this.userInfo
|
||
const currentId = userInfo.userId // 当前用户的id
|
||
if (!(zyqcr.indexOf(currentId) > -1)) {
|
||
this.$http.get('lawss/sarBussStandPlan/selectPerson', {
|
||
qbid: item.id
|
||
}, {
|
||
_this: this
|
||
}, res => {
|
||
if (res.data === "1") {
|
||
// 为1有权限
|
||
let routeUrl = this.$router.resolve({
|
||
name: 'enterBSysRevPlanManaLibDetail',
|
||
params: {
|
||
id: item.id,
|
||
pageType: 'INLAND_STAND'
|
||
}
|
||
})
|
||
window.open(routeUrl.href, '_blank')
|
||
} else {
|
||
this.$message.warning('当前用户无权限查看此详情')
|
||
return false
|
||
}
|
||
}, e => {
|
||
return false
|
||
})
|
||
} else {
|
||
let routeUrl = this.$router.resolve({
|
||
name: 'enterBSysRevPlanManaLibDetail',
|
||
params: {
|
||
id: item.id,
|
||
pageType: 'INLAND_STAND'
|
||
}
|
||
})
|
||
window.open(routeUrl.href, '_blank')
|
||
}
|
||
}
|
||
break;
|
||
case "导出":
|
||
// this.editTable(command[0])
|
||
break;
|
||
case '授权':
|
||
this.givePower(command[0])
|
||
break
|
||
}
|
||
},
|
||
// 授权-查询权限
|
||
givePower (item) {
|
||
this.bussId = item.id
|
||
this.visibleOrgTable = true
|
||
},
|
||
// 人员授权-确定
|
||
handleOrgTableConfirm(checkedList, checkedIdList) {
|
||
const idList = []
|
||
const nameList = []
|
||
checkedList.map(item => {
|
||
idList.push(item.userId)
|
||
nameList.push(item.userName)
|
||
})
|
||
this.$http.post('lawss/sarBussStandPlan/insertPerson', {
|
||
qbid: this.bussId,
|
||
userIds: idList.join(',')
|
||
}, {
|
||
_this: this
|
||
}, res => {
|
||
if (res.ok) {
|
||
this.visibleOrgTable = false
|
||
}
|
||
}, e => {
|
||
|
||
})
|
||
},
|
||
pageChange(page) {
|
||
this.condition.page = page;
|
||
this.queryPlanListByPagination();
|
||
},
|
||
pageSizeChange(pageSize) {
|
||
this.condition.pageSize = this.$store.getters.userInfo.configContent;
|
||
this.queryPlanListByPagination();
|
||
},
|
||
|
||
importmodalFlags() {
|
||
this.importmodalFlag = true;
|
||
this.$nextTick(() => {
|
||
this.$refs["importfile"].clearFiles();
|
||
});
|
||
},
|
||
// 模板下载
|
||
uploadImportModal() {
|
||
window.open('/api/lawss/sarBussStandPlan/exportTemplate')
|
||
// window.open(
|
||
// "/api/att/attFile/uploadModalFile?fileName=企标制修订计划管理库导入模板.zip"
|
||
// );
|
||
},
|
||
// 导出
|
||
exportData() {
|
||
if (this.selection.length) {
|
||
this.exportModelFlag = true
|
||
this.exportName = ''
|
||
this.saveExportType = 'apart'
|
||
} else {
|
||
this.saveExportType = 'all'
|
||
this.exportModelFlag = true
|
||
this.exportName = ''
|
||
}
|
||
},
|
||
// 导出确定功能
|
||
exportTestItem() {
|
||
if (this.saveExportType === 'apart') {
|
||
if (this.selectedList != null && this.selectedList !== '') {
|
||
const exportURL = '/api/lawss/sarBussStandPlan/exportStandardPlanExcel?exportType=' + this.saveExportType + '&exportContent=' + this.selectedList.join(',') + '&exportName=' + this.exportName
|
||
window.open(exportURL)
|
||
this.$message.success('导出信息成功')
|
||
}
|
||
} else if (this.saveExportType === 'all') {
|
||
let exportEOStr = JSON.stringify(this.condition)
|
||
exportEOStr = exportEOStr.replace(/""/g, null)
|
||
window.open('/api/lawss/sarBussStandPlan/exportStandardPlanExcel?exportType=' + this.saveExportType + '&exportContent=' + exportEOStr + '&exportName=' + this.exportName)
|
||
this.$message.success('导出信息成功')
|
||
}
|
||
this.exportModelFlag = false
|
||
},
|
||
|
||
/**
|
||
* @description: 新增计划
|
||
* @date: 2020-11-03 15:20:46
|
||
* @auth: chenxiaoxi
|
||
*/
|
||
handleSubmit() {
|
||
this.$refs["form"].validate((valid) => {
|
||
if (valid) {
|
||
if (this.form.id) {
|
||
const dataForm = JSON.parse(JSON.stringify(this.form));
|
||
const fileList = JSON.parse(JSON.stringify(this.fileList));
|
||
const planReasonFile = [];
|
||
const testWorkFile = [];
|
||
const planImpactFile = [];
|
||
// 制修订原因附件
|
||
fileList.planReason.map((item) => {
|
||
if (item.response) {
|
||
planReasonFile.push(item.response.data.attId)
|
||
} else {
|
||
planReasonFile.push(item.id)
|
||
}
|
||
});
|
||
dataForm.planReasonFile = planReasonFile.join(",");
|
||
// 验证工作附件
|
||
fileList.testWork.map((item) => {
|
||
if (item.response) {
|
||
testWorkFile.push(item.response.data.attId)
|
||
} else {
|
||
testWorkFile.push(item.id)
|
||
}
|
||
});
|
||
dataForm.testWorkFile = testWorkFile.join(",");
|
||
// 项目影响附件
|
||
fileList.planImpact.map((item) => {
|
||
if (item.response) {
|
||
planImpactFile.push(item.response.data.attId)
|
||
} else {
|
||
planImpactFile.push(item.id)
|
||
}
|
||
})
|
||
dataForm.planImpactFile = planImpactFile.join(",");
|
||
dataForm.putTime = this.$dateFormat(
|
||
new Date(dataForm.putTime),
|
||
"yyyy-MM-dd hh:mm:ss"
|
||
);
|
||
dataForm.planStartTime = this.$dateFormat(
|
||
new Date(dataForm.planStartTime),
|
||
"yyyy-MM-dd hh:mm:ss"
|
||
);
|
||
if (this.isEdit) {
|
||
let arrUnit = []
|
||
arrUnit.push(dataForm.compileUnit)
|
||
dataForm.compileUnit = arrUnit.join(",")
|
||
let arrUser = []
|
||
arrUser.push(dataForm.compilersUser)
|
||
dataForm.compilersUser = arrUser.join(",")
|
||
let arrOther = []
|
||
arrOther.push(this.form.otherDrafterDept)
|
||
dataForm.otherDrafterDept = arrOther.join(",")
|
||
}
|
||
dataForm.classCode = dataForm.standCodeCondition ? dataForm.standCodeCondition.classCode : ''
|
||
dataForm.qbCode = dataForm.standCodeCondition ? dataForm.standCodeCondition.qbCode : ''
|
||
this.loading.isSubmit = true
|
||
const url = this.isEdit
|
||
? "lawss/sarBussStandPlan/updateStandPlan"
|
||
: "lawss/sarBussStandPlan/createSarBussPlanInfo";
|
||
const methods = this.isEdit ? "putData" : "postData";
|
||
this.$http[methods](
|
||
url,
|
||
dataForm,
|
||
{},
|
||
(res2) => {
|
||
this.loading["isSubmit"] = false;
|
||
if (res2.ok) {
|
||
this.$message.success(this.isEdit ? "保存成功" : "新增成功");
|
||
this.handleCancel();
|
||
setTimeout(() => {
|
||
this.queryPlanListByPagination();
|
||
}, 100);
|
||
} else {
|
||
this.$message.warning(res2.message);
|
||
}
|
||
},
|
||
(err) => {
|
||
this.loading["isSubmit"] = false;
|
||
}
|
||
)
|
||
} else {
|
||
// 进行企标编号校验
|
||
const standCode = this.form.standCode || ''
|
||
const splitStrArray = standCode.split(' ')
|
||
const number = splitStrArray[3] || ''
|
||
const numberArray = number.split('-')
|
||
const newNumber = numberArray[0] ? parseInt(numberArray[0]) : ''
|
||
this.$http.get('lawss/sarBussRecordsCode/InspectionNumber', {
|
||
qbcode: splitStrArray[1],
|
||
classCode: splitStrArray[2],
|
||
number: newNumber
|
||
}, {
|
||
// _this: this
|
||
}, res => {
|
||
if (res.ok) {
|
||
const dataForm = JSON.parse(JSON.stringify(this.form));
|
||
const fileList = JSON.parse(JSON.stringify(this.fileList));
|
||
const planReasonFile = [];
|
||
const testWorkFile = [];
|
||
const planImpactFile = [];
|
||
// 制修订原因附件
|
||
fileList.planReason.map((item) => {
|
||
if (item.response) {
|
||
planReasonFile.push(item.response.data.attId)
|
||
} else {
|
||
planReasonFile.push(item.id)
|
||
}
|
||
});
|
||
dataForm.planReasonFile = planReasonFile.join(",");
|
||
// 验证工作附件
|
||
fileList.testWork.map((item) => {
|
||
if (item.response) {
|
||
testWorkFile.push(item.response.data.attId)
|
||
} else {
|
||
testWorkFile.push(item.id)
|
||
}
|
||
});
|
||
dataForm.testWorkFile = testWorkFile.join(",");
|
||
// 项目影响附件
|
||
fileList.planImpact.map((item) => {
|
||
if (item.response) {
|
||
planImpactFile.push(item.response.data.attId)
|
||
} else {
|
||
planImpactFile.push(item.id)
|
||
}
|
||
})
|
||
dataForm.planImpactFile = planImpactFile.join(",");
|
||
dataForm.putTime = this.$dateFormat(
|
||
new Date(dataForm.putTime),
|
||
"yyyy-MM-dd hh:mm:ss"
|
||
);
|
||
dataForm.planStartTime = this.$dateFormat(
|
||
new Date(dataForm.planStartTime),
|
||
"yyyy-MM-dd hh:mm:ss"
|
||
);
|
||
if (this.isEdit) {
|
||
let arrUnit = []
|
||
arrUnit.push(dataForm.compileUnit)
|
||
dataForm.compileUnit = arrUnit.join(",");
|
||
let arrUser = []
|
||
arrUser.push(dataForm.compilersUser)
|
||
dataForm.compilersUser = arrUser.join(",");
|
||
let arrOther = []
|
||
arrUser.push(dataForm.otherDrafterDept)
|
||
dataForm.otherDrafterDept = arrOther.join(",");
|
||
}
|
||
dataForm.classCode = dataForm.standCodeCondition ? dataForm.standCodeCondition.classCode : ''
|
||
dataForm.qbCode = dataForm.standCodeCondition ? dataForm.standCodeCondition.qbCode : ''
|
||
this.loading.isSubmit = true;
|
||
const url = this.isEdit
|
||
? "lawss/sarBussStandPlan/updateStandPlan"
|
||
: "lawss/sarBussStandPlan/createSarBussPlanInfo";
|
||
const methods = this.isEdit ? "putData" : "postData";
|
||
this.$http[methods](
|
||
url,
|
||
dataForm,
|
||
{},
|
||
(res2) => {
|
||
this.loading["isSubmit"] = false;
|
||
if (res2.ok) {
|
||
this.$message.success(this.isEdit ? "保存成功" : "新增成功");
|
||
this.handleCancel();
|
||
setTimeout(() => {
|
||
this.queryPlanListByPagination();
|
||
}, 100);
|
||
} else {
|
||
this.$message.warning(res2.message);
|
||
}
|
||
},
|
||
(err) => {
|
||
this.loading["isSubmit"] = false;
|
||
}
|
||
)
|
||
} else {
|
||
this.$message.warning(res.message)
|
||
}
|
||
}, e => {
|
||
console.error('企标编号重复校验', e)
|
||
})
|
||
|
||
}
|
||
|
||
} else {
|
||
this.$message.warning('请检查表单是否填写完整')
|
||
}
|
||
});
|
||
},
|
||
|
||
handleSelectChange(selection) {
|
||
this.selection = selection;
|
||
this.selectedList = []
|
||
for (let i = 0; i < selection.length; i++) {
|
||
this.selectedList.push(selection[i].id)
|
||
}
|
||
},
|
||
|
||
/**
|
||
* @description: 查询表单选项
|
||
* @date: 2020-11-03 16:53:10
|
||
* @auth: chenxiaoxi
|
||
*/
|
||
getOptions() {
|
||
this.$http.get(
|
||
"sys/dictype/getDicTypeListCode",
|
||
{},
|
||
{},
|
||
// { _this: this },
|
||
(res) => {
|
||
this.formOption.STANDSOURCEREVISION =
|
||
res.data.STANDSOURCEREVISION || [];
|
||
this.formOption.MJ = res.data.MJ || [];
|
||
this.formOption.BUSSSTANDCLASS = res.data.BUSSSTANDCLASS;
|
||
this.formOption.FBW = res.data.FBW;
|
||
},
|
||
(err) => {}
|
||
);
|
||
},
|
||
|
||
handleChange() {},
|
||
|
||
handleChooseConfirm () {
|
||
if (this.chooseType === 'person') {
|
||
this.compilersUser = this.personCheckedListCache.filter(
|
||
(item) => !item.isParent
|
||
)
|
||
const data = []
|
||
this.compilersUser.map((item) => {
|
||
data.push(item.id)
|
||
})
|
||
this.form.compilersUser = data.join(',')
|
||
if (this.$refs['form']) {
|
||
this.$refs['form'].validateField('compilersUser')
|
||
}
|
||
} else {
|
||
this.compileUnitDept = this.deptCheckedListCache.filter(item => item.orgType === 'DEPART')
|
||
const data = []
|
||
this.compileUnitDept.map((item) => {
|
||
data.push(item.id)
|
||
})
|
||
this.form.compileUnit = data.join(',')
|
||
}
|
||
this.visibleTree = false
|
||
},
|
||
|
||
handleTreeChecked(checkedList) {
|
||
if (this.chooseType === "person") {
|
||
this.personCheckedListCache = checkedList;
|
||
} else {
|
||
this.deptCheckedListCache = checkedList;
|
||
}
|
||
},
|
||
|
||
/**
|
||
* @description: 部门tag移除
|
||
* @date: 2020-11-04 19:33:35
|
||
* @auth: chenxiaoxi
|
||
*/
|
||
handleRemovePersonTag(tag, index) {
|
||
this.compilersUser.splice(index, 1);
|
||
let compilersUser = this.form.compilersUser.split(',')
|
||
compilersUser.splice(index, 1)
|
||
this.form.compilersUser = compilersUser.join(',')
|
||
const orgId = tag.departId || tag.orgId
|
||
let findFlag = false
|
||
for (let i = 0; i < this.compilersUser.length; i++) {
|
||
if (this.compilersUser[i].departId === orgId) {
|
||
findFlag = true
|
||
break
|
||
}
|
||
}
|
||
if (!findFlag) {
|
||
let spliceIndex = -1
|
||
const otherDrafterDept = []
|
||
for (let i = 0; i < this.otherDrafterDept.length; i++) {
|
||
if (this.otherDrafterDept[i].id === orgId) {
|
||
spliceIndex = i
|
||
break
|
||
} else {
|
||
otherDrafterDept.push(this.otherDrafterDept[i].id)
|
||
}
|
||
}
|
||
this.otherDrafterDept.splice(spliceIndex, 1)
|
||
this.form.otherDrafterDept = otherDrafterDept.join(',')
|
||
}
|
||
},
|
||
// 起草部门移除
|
||
handleOtherRemoveDeptTag(index) {
|
||
this.otherDrafterDept.splice(index, 1);
|
||
let otherDrafterDept = this.form.otherDrafterDept.split(',')
|
||
otherDrafterDept.splice(index, 1)
|
||
this.form.otherDrafterDept = otherDrafterDept.join(',')
|
||
},
|
||
|
||
/**
|
||
* @description: 分页查询计划列表
|
||
* @date: 2020-11-04 15:52:17
|
||
* @auth: chenxiaoxi
|
||
*/
|
||
queryPlanListByPagination(advanceSearch) {
|
||
if (this.condition.planStartTime !== "" && this.condition.planStartTime.length > 0) {
|
||
this.condition.planStartTimeSt = this.$dateFormat(new Date(this.condition.planStartTime[0]), "yyyy-MM-dd")
|
||
this.condition.planStartTimeEd = this.$dateFormat(new Date(this.condition.planStartTime[1]), "yyyy-MM-dd")
|
||
}
|
||
if (this.condition.putTime !== "" && this.condition.putTime.length > 0) {
|
||
this.condition.putTimeSt = this.$dateFormat(new Date(this.condition.putTime[0]), "yyyy-MM-dd")
|
||
this.condition.putTimeEd = this.$dateFormat(new Date(this.condition.putTime[1]), "yyyy-MM-dd")
|
||
}
|
||
this.condition.primaryDrafterDept = this.condition.draftingUnit
|
||
this.condition.draftingUnit = undefined
|
||
this.loading.loadData = true;
|
||
const formData = advanceSearch || this.condition
|
||
if (advanceSearch) {
|
||
this.condition.advanceSearchVOStr = advanceSearch.advanceSearchVOStr
|
||
}
|
||
this.$http.get(
|
||
"lawss/sarBussStandPlan/page",
|
||
formData,
|
||
{},
|
||
(res) => {
|
||
this.loading.loadData = false;
|
||
this.loading.searching = false;
|
||
this.tableData = res.data.list
|
||
this.condition.total = res.data.count;
|
||
},
|
||
(err) => {
|
||
this.loading.loadData = false;
|
||
this.loading.searching = false;
|
||
}
|
||
);
|
||
},
|
||
|
||
getPlanStatusName(status) {
|
||
switch (status) {
|
||
case "1":
|
||
return "制定中";
|
||
case "2":
|
||
return "修订中";
|
||
case "3":
|
||
return "已发布";
|
||
case "4":
|
||
return "计划已确认";
|
||
}
|
||
},
|
||
|
||
/**
|
||
* @description: 条件查询
|
||
* @date: 2020-11-04 19:33:16
|
||
* @auth: chenxiaoxi
|
||
*/
|
||
handleSearchByCondition() {
|
||
this.condition.page = 1;
|
||
this.loading.searching = true;
|
||
this.queryPlanListByPagination();
|
||
},
|
||
|
||
/**
|
||
* @description: 搜索条件重置
|
||
* @date: 2020-11-04 19:33:05
|
||
* @auth: chenxiaoxi
|
||
*/
|
||
clearSearch(search = true) {
|
||
this.condition = {
|
||
page: 1,
|
||
pageSize: this.$store.getters.userInfo.configContent,
|
||
total: 0,
|
||
validFlag: 0,
|
||
planStatus: "",
|
||
planStartTime: "",
|
||
planStartTimeSt: "",
|
||
planStartTimeEd: "",
|
||
putTime: "",
|
||
putTimeSt: "",
|
||
putTimeEd: "",
|
||
standCode: "",
|
||
cnName: "",
|
||
planType: "",
|
||
replacedStandNum: "",
|
||
draftingUnit: "",
|
||
draftingUnitName: "",
|
||
};
|
||
search && this.queryPlanListByPagination();
|
||
},
|
||
|
||
getReplaceLawsNumRow() {
|
||
if (
|
||
this.sarBussionessLawsEO.replaceLawsNum !== null &&
|
||
this.sarBussionessLawsEO.replaceLawsNum !== ""
|
||
) {
|
||
this.replaceLawsNumForm.quoteIdList =
|
||
this.quoteIdList1.toString() === "" ? "" : this.quoteIdList1;
|
||
} else {
|
||
this.quoteIdList1 = [];
|
||
this.replaceLawsNumForm.quoteIdList = "";
|
||
}
|
||
this.$http.get(
|
||
"lawss/sarBussionessStand/getSarBussionStandPage",
|
||
this.replaceLawsNumForm,
|
||
{
|
||
// _this: this,
|
||
// loading: "replaceLoading",
|
||
},
|
||
(res) => {
|
||
this.replaceLawsNumRow = res.data.list;
|
||
this.replaceTotal = res.data.count;
|
||
if (this.selectedListRep.length !== 0) {
|
||
this.selectedListRep.map((list) => {
|
||
this.replaceLawsNumRow.map((item) => {
|
||
if (list.id === item.id) {
|
||
item._checked = true;
|
||
}
|
||
});
|
||
});
|
||
}
|
||
},
|
||
(e) => {}
|
||
);
|
||
},
|
||
|
||
getResetLawsNumRow() {
|
||
this.replaceLawsNumForm = {
|
||
page: 1,
|
||
pageSize: this.$store.getters.userInfo.configContent,
|
||
total: 0,
|
||
validFlag: "0",
|
||
};
|
||
this.getReplaceLawsNumRow();
|
||
},
|
||
|
||
// 代替政策编号确定
|
||
replaceLawsNumModelBt() {
|
||
let textArr = [];
|
||
|
||
if (typeof this.value === "string") {
|
||
if (this.value) {
|
||
textArr = this.value.split(",");
|
||
}
|
||
}
|
||
if (this.selectedListRep.length === 0) {
|
||
return this.$message({
|
||
message: "请先选择数据",
|
||
type: "warning",
|
||
});
|
||
}
|
||
if (this.selectedListRep.length + textArr.length > 20) {
|
||
return this.$message({
|
||
message: "代替标准号最多选择20项",
|
||
type: "warning",
|
||
});
|
||
}
|
||
this.selectedListRep.map((item) => {
|
||
let texts = "";
|
||
// if (item.standYear != null && item.standYear !== '') {
|
||
texts = item.standSortShow + " " + item.standCode;
|
||
// } else {
|
||
// texts = item.standSort !== null ? item.standSort + ' ' + item.standNumber : item.standNumber
|
||
// }
|
||
textArr.push(texts);
|
||
textArr = [...new Set(textArr)];
|
||
this.replaceLawsNumModel = false;
|
||
});
|
||
// this.SarLawsInfoEO.replaceLawsNum = textArr.join(',')
|
||
this.$emit("input", textArr.join(","));
|
||
this.$refs.selections.clearSelection();
|
||
},
|
||
|
||
// 代替政策分页
|
||
pageChangeReplace(page) {
|
||
this.replacePage = page;
|
||
this.replaceLawsNumForm.page = page;
|
||
this.getReplaceLawsNumRow();
|
||
},
|
||
pageSizeChangeReplace(pageSize) {
|
||
// this.replaceRows = pageSize
|
||
this.replaceLawsNumForm.pageSize = pageSize;
|
||
this.getReplaceLawsNumRow();
|
||
},
|
||
|
||
// 代替政策号 table选择事件
|
||
selectReplaceStandNumRowChange(row) {
|
||
this.selectedListRep = row;
|
||
},
|
||
|
||
handleOpenAddModal() {
|
||
// 设置默认主起草部门与主起草人
|
||
this.primaryDrafter = [
|
||
{
|
||
id: this.userInfo.userId,
|
||
name: this.userInfo.userName || this.userInfo.uName,
|
||
userName: this.userInfo.userName,
|
||
orgId: this.userInfo.pOrgId
|
||
}
|
||
]
|
||
this.form.primaryDrafter = this.userInfo.userId
|
||
this.form.primaryDrafterName = this.userInfo.userName || this.userInfo.uName
|
||
if (this.userInfo.orgType === 'DEPART') {
|
||
this.form.primaryDrafterDept = this.userInfo.orgId
|
||
this.form.primaryDrafterDeptName = this.userInfo.orgName
|
||
this.primaryDrafterDept = [
|
||
{
|
||
id: this.userInfo.orgId,
|
||
name: this.userInfo.orgName
|
||
}
|
||
]
|
||
this.form.otherDrafterDept = this.userInfo.orgId
|
||
this.otherDrafterDept = [
|
||
{
|
||
id: this.userInfo.orgId,
|
||
name: this.userInfo.orgName
|
||
}
|
||
]
|
||
} else {
|
||
this.form.primaryDrafterDept = this.userInfo.pOrgId
|
||
this.form.primaryDrafterDeptName = this.userInfo.pOrgName
|
||
this.primaryDrafterDept = [
|
||
{
|
||
id: this.userInfo.pOrgId,
|
||
name: this.userInfo.pOrgName
|
||
}
|
||
]
|
||
this.form.otherDrafterDept = this.userInfo.pOrgId
|
||
this.otherDrafterDept = [
|
||
{
|
||
id: this.userInfo.pOrgId,
|
||
name: this.userInfo.pOrgName
|
||
}
|
||
]
|
||
}
|
||
this.visibleAddEditModal = true;
|
||
},
|
||
|
||
handleFileRemove(file, fileList) {
|
||
this.fileList[this.uploadTemp] = fileList;
|
||
},
|
||
|
||
handleSuccess(res, file, fileList) {
|
||
if (res.ok) {
|
||
this.fileList[this.uploadTemp] = fileList;
|
||
} else {
|
||
fileList.pop()
|
||
this.$message.error(res.message)
|
||
}
|
||
},
|
||
|
||
onBeforeUpload(file) {
|
||
// var filename = file.name;
|
||
// var index1 = filename.lastIndexOf(".");
|
||
// var index2 = filename.length;
|
||
// var fileSuffix = filename.substring(index1, index2);
|
||
// const allowedSuffix = ['.pdf', '.doc', '.docx','.ppt','.pptx']
|
||
// if (!allowedSuffix.includes(fileSuffix.toLowerCase())) {
|
||
// this.$message.error(
|
||
// "文件" +
|
||
// file.name +
|
||
// "格式不正确,请上传pdf、doc、docx、ppt文件"
|
||
// )
|
||
// return false
|
||
// }
|
||
// 判断文件上传大小
|
||
if (!(file.size / 1024 / 1024 <= 200)) {
|
||
this.$message.error("文件" + file.name + "大小不超过200M");
|
||
return false
|
||
}
|
||
return true
|
||
},
|
||
|
||
handleCancel() {
|
||
this.form = {
|
||
standCode: "",
|
||
replacedStandNum: "",
|
||
planType: "",
|
||
cnName: "",
|
||
enName: "",
|
||
standSort: "",
|
||
planStartTime: "",
|
||
planEndTime: "",
|
||
compilersUser: "",
|
||
otherDrafterDept: "",
|
||
standLevel: "",
|
||
putTime: "",
|
||
compileUnit: [],
|
||
planSource: "",
|
||
planReason: "",
|
||
testWork: "",
|
||
planImpact: "",
|
||
planReasonFile: "",
|
||
testWorkFile: "",
|
||
planImpactFile: "",
|
||
planStatus: "",
|
||
signConfirmFile: "",
|
||
draftCommittee: "",
|
||
reviseBussStand: ""
|
||
};
|
||
this.fileList = {
|
||
planImpact: [],
|
||
testWork: [],
|
||
planReason: [],
|
||
};
|
||
this.compilersUser = [];
|
||
this.otherDrafterDept = [];
|
||
this.compileUnitDept = [];
|
||
this.isEdit = false;
|
||
setTimeout(() => {
|
||
this.visibleAddEditModal = false;
|
||
}, 100);
|
||
},
|
||
|
||
onBeforeClose(done) {
|
||
this.handleCancel();
|
||
setTimeout(() => {
|
||
done();
|
||
}, 50);
|
||
},
|
||
|
||
getPlanStatus(planStatus) {
|
||
let planStatusName = "-";
|
||
this.formOption.planStatusOption.map((item) => {
|
||
if (item.value === planStatus) {
|
||
planStatusName = item.label;
|
||
}
|
||
});
|
||
return planStatusName;
|
||
},
|
||
|
||
getPlanTypeName(planType) {
|
||
let planTypeName = "-";
|
||
this.formOption.planTypeOption.map((item) => {
|
||
if (item.value === planType) {
|
||
planTypeName = item.label;
|
||
}
|
||
});
|
||
return planTypeName;
|
||
},
|
||
getFBWName (FBW) {
|
||
let FBWName = '-'
|
||
this.formOption.FBW.map((item) => {
|
||
if (item.value === FBW) {
|
||
FBWName = item.label
|
||
}
|
||
});
|
||
return FBWName;
|
||
},
|
||
getStandLevelName(standLevel) {
|
||
let levelName = "-";
|
||
this.formOption.MJ.map((item) => {
|
||
if (item.value === standLevel) {
|
||
levelName = item.label;
|
||
}
|
||
});
|
||
return levelName;
|
||
},
|
||
|
||
getPlanSourceName(sourceType) {
|
||
let sourceName = "-";
|
||
this.formOption.STANDSOURCEREVISION.map((item) => {
|
||
if (item.value === sourceType) {
|
||
sourceName = item.label;
|
||
}
|
||
});
|
||
return sourceName;
|
||
},
|
||
|
||
downloadFile(attId) {
|
||
if (attId != null && attId !== "") {
|
||
window.location.href =
|
||
"/api/att/attFile/downloadFileForSar?fileId=" + attId;
|
||
} else {
|
||
this.$message.error("请选择要下载的文件");
|
||
}
|
||
},
|
||
|
||
addImportModal() {
|
||
this.importModalshowflag = true;
|
||
this.$nextTick(() => {
|
||
this.$refs.importFile.clearFiles();
|
||
});
|
||
},
|
||
// 文件上传时的钩子函数
|
||
onProgress (event, file, fileList) {
|
||
this.exportLoading = true
|
||
this.importModalshowflag = false
|
||
},
|
||
// 导入成功回调
|
||
importFileSuccess(res, file, fileList) {
|
||
this.exportLoading = false
|
||
if (res.ok) {
|
||
this.importModalshowflag = false;
|
||
this.$message({
|
||
message: res.message,
|
||
type: "success",
|
||
});
|
||
this.queryPlanListByPagination();
|
||
} else {
|
||
this.importFailed = true;
|
||
this.showUploadlist = false;
|
||
// this.$message({
|
||
// message: res.message,
|
||
// type: "warning",
|
||
// });
|
||
this.importFailed = true
|
||
this.importForm.content = res.message
|
||
}
|
||
},
|
||
// 新增、编辑上传文件之前的钩子
|
||
beforeUpload(file) {
|
||
var filename = file.name;
|
||
var index1 = filename.lastIndexOf(".");
|
||
var index2 = filename.length;
|
||
var fileSuffix = filename.substring(index1, index2);
|
||
if (fileSuffix === ".zip") {
|
||
return true;
|
||
} else {
|
||
this.$message.error("文件" + file.name + "格式不正确,请上传zip文件");
|
||
return false;
|
||
}
|
||
// 判断文件上传大小
|
||
if (file.size / 1024 / 1024 <= 200) {
|
||
return true;
|
||
} else {
|
||
this.$message.error("文件" + file.name + "大小不超过200M");
|
||
return false;
|
||
}
|
||
return true;
|
||
},
|
||
|
||
removeOneFile(file, fileList) {},
|
||
|
||
/**
|
||
* @description: 导入失败回调
|
||
* @date: 2020-11-06 10:05:02
|
||
* @auth: chenxiaoxi
|
||
*/
|
||
handleImportTemplateErr(err) {
|
||
// console.log(err);
|
||
},
|
||
|
||
handleChooseByTree (type, field) {
|
||
this.visibleTree = true
|
||
this.chooseType = type
|
||
switch (field) {
|
||
case 'HQBM':
|
||
this.chooseDrawerCheckIdList = this.form.compileUnit instanceof Array ? this.form.compileUnit : this.form.compileUnit.split(',')
|
||
break
|
||
}
|
||
},
|
||
|
||
replaceLawsNumModelCancel() {
|
||
// this.replaceLawsNumModel = false
|
||
this.$refs.selections.clearSelection();
|
||
},
|
||
|
||
// 点击查看
|
||
handlePreview(standNum) {
|
||
this.$http.post(
|
||
"lawss/sarTestItem/validateStandNumber",
|
||
{
|
||
standnumber: standNum,
|
||
},
|
||
{
|
||
// _this: this,
|
||
},
|
||
(res) => {
|
||
if (res.ok) {
|
||
this.pageType = res.data.standType;
|
||
|
||
const item = res.data
|
||
const mj = item.attrInfoMap.QBMJ
|
||
if (mj === 'GXNX7D6H59') {
|
||
// C1所有人都可查看
|
||
} else if (mj === 'JLAPYG7YCT') {
|
||
// C2只能让起草部门人员即填写中的相关部门/涉及会签部门人员可看
|
||
// (起草部门、相关部门、会签部门,部门下所有人员)
|
||
const attrInfoMap = item.attrInfoMap || {}
|
||
const xgbm = attrInfoMap.XGBM || '' // 相关部门
|
||
const qcbm = attrInfoMap.ZRBM || '' // 起草部门
|
||
const xghqbm = attrInfoMap.XHQBM || '' // 相关会签部门
|
||
const bm = [xgbm, qcbm, xghqbm].join(',') // 全部部门 字符串拼接
|
||
const currentUserInfo = this.userInfo
|
||
const currentBm = [currentUserInfo.orgId, currentUserInfo.pOrgId] // 当前用户的部门和科室
|
||
const inBm = currentBm.some(item => {
|
||
return bm.indexOf(item) > -1
|
||
})
|
||
// 如果当前用户的部门和科室不在全部部门里 就不允许查看
|
||
if (!inBm) {
|
||
this.$message.warning('当前用户无权限查看此详情')
|
||
return false
|
||
}
|
||
} else if (mj === 'ACF675Z88W') {
|
||
// C3采取单独授权查看(当前实现只能主起草人、其他起草人看即可,后续的授权4月份开发)
|
||
const attrInfoMap = item.attrInfoMap || {}
|
||
const zyqcr = attrInfoMap.ZYQCR || '' // 主要起草人
|
||
const qcr = [zyqcr].join(',') // 全部起草人 字符串拼接
|
||
const userInfo = this.userInfo
|
||
const currentId = userInfo.userId // 当前用户的id
|
||
// 如果当前用户的部门和科室不在全部部门里 就不允许查看
|
||
if (!(qcr.indexOf(currentId) > -1)) {
|
||
this.$message.warning('当前用户无权限查看此详情')
|
||
return false
|
||
}
|
||
}
|
||
|
||
let routeUrl = this.$router.resolve({
|
||
name: "OtherBussStandardDetails",
|
||
params: {
|
||
id: res.data.standid,
|
||
pageType: this.pageType,
|
||
},
|
||
});
|
||
window.open(routeUrl.href, "_blank");
|
||
} else {
|
||
this.$message.warning(res.message)
|
||
}
|
||
},
|
||
(e) => {}
|
||
);
|
||
},
|
||
|
||
treeDblClick1(treeId, treeNode) {
|
||
this.condition.draftingUnit = treeNode.id;
|
||
this.condition.draftingUnitName = treeNode.oldname || treeNode.name;
|
||
$("#deptBtn1").click();
|
||
},
|
||
|
||
handleSignConfirmFileSuccess() {
|
||
this.$refs["form"].validateField("signConfirmFile");
|
||
},
|
||
|
||
beforeDelete() {
|
||
let flag = false
|
||
this.selection.forEach((item) => {
|
||
if (item.planStatus !== '4'){
|
||
flag = true
|
||
}
|
||
})
|
||
if (flag === true){
|
||
this.$message.warning('仅能删除"计划已确认"状态的数据')
|
||
} else if (this.selection.length) {
|
||
this.$confirm('确认删除这些数据?', '提示', {
|
||
confirmButtonText: '确定',
|
||
confirmButtonClass: 'common-button-primary',
|
||
cancelButtonText: '取消',
|
||
type: 'warning',
|
||
roundButton: true
|
||
}).then(() => {
|
||
const idList = []
|
||
this.selection.map(item => {
|
||
idList.push(item.id)
|
||
})
|
||
this.loading.delete = true
|
||
this.$http.put('lawss/sarBussStandPlan/deleteByIds', {ids: idList.join(',')}, {
|
||
// _this: this
|
||
}, res => {
|
||
if (res.ok) {
|
||
this.$message.success('操作成功')
|
||
this.selectedList = []
|
||
this.loading.delete = false
|
||
this.condition.page = 1
|
||
setTimeout(() => {
|
||
this.queryPlanListByPagination();
|
||
}, 100)
|
||
} else {
|
||
this.loading.delete = false
|
||
this.$message.warning(res.message)
|
||
}
|
||
}, e => {
|
||
this.loading.delete = false
|
||
})
|
||
})
|
||
} else {
|
||
this.$message.warning('请选择要删除的数据')
|
||
}
|
||
},
|
||
|
||
handleUpload(title) {
|
||
this.fileTitle = title + '附件上传'
|
||
switch (title) {
|
||
case '制修订原因':
|
||
this.uploadTemp = 'planReason'
|
||
this.defaultFileList = this.fileList['planReason']
|
||
break
|
||
case '项目影响':
|
||
this.uploadTemp = 'planImpact'
|
||
this.defaultFileList = this.fileList['planImpact']
|
||
break
|
||
case '验证工作':
|
||
this.uploadTemp = 'testWork'
|
||
this.defaultFileList = this.fileList['testWork']
|
||
break
|
||
}
|
||
this.importModalshowflagtemp = true
|
||
},
|
||
|
||
// 树组件选取
|
||
handleChooseByDrawer(field) {
|
||
this.chooseItemKey = field
|
||
setTimeout(() => {
|
||
this.visible.visibleChooseDrawer = true
|
||
}, 100)
|
||
this.loading.loadZNodes = true
|
||
switch (field) {
|
||
// 主起草人
|
||
case 'primaryDrafter':
|
||
this.loading.loadZNodesTips = '正在加载主起草人'
|
||
getDept()
|
||
.then(deptRes => {
|
||
const deptList = deptRes.data
|
||
getUserOrgDept()
|
||
.then(userRes => {
|
||
const userList = userRes.data
|
||
deptList.map(item => {
|
||
item.name = item.orgName
|
||
item.icon = 'static/images/dept.png'
|
||
item.iconSkin = 'org-dept'
|
||
item.isParent = true
|
||
item.isChecked = true
|
||
})
|
||
const _USERLIST = []
|
||
const EXCLUDES_USER = this.form.compilersUser === '' ? [] : this.form.compilersUser.split(',')
|
||
userList.map(item => {
|
||
if (item.email) {
|
||
item.name = `${item.userName}(${item.email})`
|
||
} else {
|
||
item.name = item.userName
|
||
}
|
||
item.icon = 'static/images/user.png'
|
||
item.iconSkin = 'org-user'
|
||
item.pId = item.orgId
|
||
item.id = item.userId
|
||
if (!EXCLUDES_USER.includes(item.id)) {
|
||
_USERLIST.push(item)
|
||
}
|
||
})
|
||
this.zNodes = [...deptList, ..._USERLIST]
|
||
// 勾选回显
|
||
this.chooseDrawerCheckIdList = this.form.primaryDrafter.split(',')
|
||
setTimeout(() => {
|
||
this.loading.loadZNodes = false
|
||
}, 100)
|
||
})
|
||
})
|
||
break
|
||
// 其他起草人
|
||
case 'otherDrafter':
|
||
this.loading.loadZNodesTips = '正在加载其他起草人'
|
||
getDept()
|
||
.then(deptRes => {
|
||
const deptList = deptRes.data
|
||
getUserOrgDept()
|
||
.then(userRes => {
|
||
const userList = userRes.data
|
||
deptList.map(item => {
|
||
item.name = item.orgName
|
||
item.icon = 'static/images/dept.png'
|
||
item.iconSkin = 'org-dept'
|
||
item.isParent = true
|
||
item.isChecked = true
|
||
})
|
||
const _USERLIST = []
|
||
userList.map(item => {
|
||
if (item.email) {
|
||
item.name = `${item.userName}(${item.email})`
|
||
} else {
|
||
item.name = item.userName
|
||
}
|
||
item.icon = 'static/images/user.png'
|
||
item.iconSkin = 'org-user'
|
||
item.pId = item.orgId
|
||
item.id = item.userId
|
||
if (item.id !== this.form.primaryDrafter) {
|
||
_USERLIST.push(item)
|
||
}
|
||
})
|
||
this.zNodes = [...deptList, ..._USERLIST]
|
||
// 勾选回显
|
||
this.chooseDrawerCheckIdList = this.form.compilersUser.split(',')
|
||
setTimeout(() => {
|
||
this.loading.loadZNodes = false
|
||
}, 100)
|
||
})
|
||
})
|
||
}
|
||
},
|
||
|
||
handleChooseByOrgTable(field) {
|
||
this.chooseItemKey = field
|
||
switch (field) {
|
||
case 'primaryDrafter':
|
||
this.orgTableVal = this.form.primaryDrafter
|
||
this.orgTableName = this.form.primaryDrafterName
|
||
break
|
||
case 'otherDrafter':
|
||
this.orgTableVal = this.form.compilersUser
|
||
this.orgTableName = this.form.compilersUserName
|
||
break
|
||
}
|
||
setTimeout(() => {
|
||
this.visible.visibleOrgTable = true
|
||
}, 100)
|
||
},
|
||
|
||
handleChooseOrgTableConfirm(checkedList) {
|
||
switch (this.chooseItemKey) {
|
||
case 'primaryDrafter':
|
||
if (!checkedList.length) {
|
||
this.$message.warning('主起草人不能为空')
|
||
return false
|
||
} else {
|
||
this.primaryDrafter = checkedList
|
||
this.form.primaryDrafter = checkedList[0].userId
|
||
this.form.primaryDrafterName = checkedList[0].userName
|
||
this.getDepartmentByUserId(this.form.primaryDrafter)
|
||
.then(dept => {
|
||
this.form.primaryDrafterDept = dept[0].pOrgId
|
||
this.form.primaryDrafterDeptName = dept[0].pOrgName
|
||
let flag = true
|
||
for (let i = 0; i < this.otherDrafterDept.length; i++) {
|
||
if (this.otherDrafterDept[i].id === dept[0].pOrgId) {
|
||
flag = false
|
||
return false
|
||
}
|
||
}
|
||
if (flag) {
|
||
this.otherDrafterDept.push({
|
||
id: dept[0].pOrgId,
|
||
name: dept[0].pOrgName
|
||
})
|
||
const otherDrafterDept = this.form.otherDrafterDept === '' ? dept[0].pOrgId : this.form.otherDrafterDept + ',' + dept[0].pOrgId
|
||
this.form.otherDrafterDept = otherDrafterDept
|
||
}
|
||
this.primaryDrafterDept = [{
|
||
id: dept[0].pOrgId,
|
||
name: dept[0].pOrgName
|
||
}]
|
||
})
|
||
}
|
||
break
|
||
case 'otherDrafter':
|
||
if (!checkedList.length) {
|
||
this.$message.warning('其他起草人不能为空')
|
||
} else {
|
||
this.compilersUser = checkedList
|
||
const compilersUser = [], compilersUserName = [], otherDrafterDeptId = [this.form.primaryDrafterDept], otherDrafterDeptName = [this.form.primaryDrafterDeptName], otherDrafterDept = [...this.primaryDrafterDept]
|
||
checkedList.map(item => {
|
||
compilersUser.push(item.userId)
|
||
compilersUserName.push(item.userName)
|
||
})
|
||
this.getDepartmentByUserId(compilersUser.join(','))
|
||
.then(dept => {
|
||
dept.map(item => {
|
||
if (!otherDrafterDeptId.includes(item.pOrgId) && item.pOrgId) {
|
||
otherDrafterDeptId.push(item.pOrgId)
|
||
otherDrafterDeptName.push(item.pOrgName)
|
||
let flag = true
|
||
otherDrafterDept.map(otherItem => {
|
||
if (otherItem.id === item.pOrgId) {
|
||
flag = false
|
||
}
|
||
})
|
||
if (flag) {
|
||
otherDrafterDept.push({
|
||
id: item.pOrgId,
|
||
name: item.pOrgName
|
||
})
|
||
}
|
||
}
|
||
})
|
||
this.form.compilersUser = compilersUser.join(',')
|
||
this.form.compilersUserName = compilersUserName.join(',')
|
||
this.form.otherDrafterDept = otherDrafterDeptId.join(',')
|
||
this.form.otherDrafterDeptName = otherDrafterDeptName.join(',')
|
||
this.otherDrafterDept = otherDrafterDept
|
||
})
|
||
}
|
||
default:
|
||
break
|
||
}
|
||
setTimeout(() => {
|
||
this.visible.visibleOrgTable = false
|
||
}, 100)
|
||
},
|
||
|
||
handleChooseDrawerOnCheck(checkList) {
|
||
this.chooseDrawerCheckList = checkList
|
||
},
|
||
|
||
handleChooseDrawerConfirm() {
|
||
switch (this.chooseItemKey) {
|
||
case 'primaryDrafter':
|
||
if (!this.chooseDrawerCheckList.length) {
|
||
this.$message.warning('主起草人不能为空')
|
||
return false
|
||
} else if (this.chooseDrawerCheckList.length > 1) {
|
||
this.$message.warning('主起草人只能为一个人')
|
||
return false
|
||
} else {
|
||
this.primaryDrafter = this.chooseDrawerCheckList
|
||
this.form.primaryDrafter = this.chooseDrawerCheckList[0].userId
|
||
this.form.primaryDrafterName = this.chooseDrawerCheckList[0].userName
|
||
this.getDepartmentByUserId(this.form.primaryDrafter)
|
||
.then(dept => {
|
||
this.form.primaryDrafterDept = dept[0].pOrgId
|
||
this.form.primaryDrafterDeptName = dept[0].pOrgName
|
||
this.primaryDrafterDept = [{
|
||
id: dept[0].pOrgId,
|
||
name: dept[0].pOrgName
|
||
}]
|
||
})
|
||
}
|
||
break
|
||
case 'otherDrafter':
|
||
if (!this.chooseDrawerCheckList.length) {
|
||
this.$message.warning('其他起草人不能为空')
|
||
} else {
|
||
this.compilersUser = this.chooseDrawerCheckList
|
||
const compilersUser = [], otherDrafterDeptId = [], otherDrafterDeptName = [], otherDrafterDept = [...this.primaryDrafterDept]
|
||
this.chooseDrawerCheckList.map(item => {
|
||
compilersUser.push(item.userId)
|
||
})
|
||
this.getDepartmentByUserId(compilersUser.join(','))
|
||
.then(dept => {
|
||
dept.map(item => {
|
||
if (!otherDrafterDeptId.includes(item.pOrgId) && item.pOrgId) {
|
||
otherDrafterDeptId.push(item.pOrgId)
|
||
otherDrafterDeptName.push(item.pOrgName)
|
||
otherDrafterDept.push({
|
||
id: item.pOrgId,
|
||
name: item.pOrgName
|
||
})
|
||
}
|
||
})
|
||
this.form.compilersUser = compilersUser.join(',')
|
||
this.form.otherDrafterDept = otherDrafterDeptId.join(',')
|
||
this.form.otherDrafterDeptName = otherDrafterDeptName.join(',')
|
||
this.otherDrafterDept = otherDrafterDept
|
||
})
|
||
}
|
||
default:
|
||
break
|
||
}
|
||
setTimeout(() => {
|
||
this.visible.visibleChooseDrawer = false
|
||
}, 100)
|
||
},
|
||
|
||
handleChooseDrawerCancel() {
|
||
this.chooseItemKey = ''
|
||
this.chooseDrawerCheckList = []
|
||
this.chooseDrawerCheckIdList = []
|
||
this.zNodes = []
|
||
setTimeout(() => {
|
||
this.visible.visibleChooseDrawer = false
|
||
}, 100)
|
||
},
|
||
|
||
/**
|
||
* 高级检索
|
||
*/
|
||
selectMoreBtn () {
|
||
this.isAdvancedSearch = true
|
||
this.threeOptions = []
|
||
},
|
||
|
||
/**
|
||
* 高级检索
|
||
* 检索项修改时为了匹配对应的下拉菜单的
|
||
*/
|
||
twoSelectChange (val, obj) {
|
||
switch (val) {
|
||
case 'plan_status':
|
||
this.threeOptions = [
|
||
{
|
||
label: '制定中',
|
||
value: '1'
|
||
},
|
||
{
|
||
label: '修订中',
|
||
value: '2'
|
||
},
|
||
{
|
||
label: '已发布',
|
||
value: '3'
|
||
},
|
||
{
|
||
label: '计划已确认',
|
||
value: '4'
|
||
},
|
||
]
|
||
break
|
||
case 'plan_type':
|
||
this.threeOptions = [
|
||
{
|
||
label: '制定',
|
||
value: '1'
|
||
},
|
||
{
|
||
label: '修订',
|
||
value: '2'
|
||
},
|
||
]
|
||
break
|
||
case 'draft_committee':
|
||
this.threeOptions = this.formOption.FBW
|
||
break
|
||
case 'stand_level':
|
||
this.threeOptions = this.formOption.MJ
|
||
break
|
||
case 'plan_source':
|
||
this.threeOptions = this.formOption.STANDSOURCEREVISION
|
||
break
|
||
}
|
||
},
|
||
// 高级检索搜索
|
||
getDomesticStandardTableBtn (advancedSearch) {
|
||
let formData = {}
|
||
formData.page = 1
|
||
formData.advanceSearchStr = ''
|
||
formData.advanceSearchVOStr = JSON.stringify(advancedSearch) || ''
|
||
formData.pageSize = this.$store.getters.userInfo.configContent
|
||
// 重置页码
|
||
this.clearSearch(false)
|
||
this.queryPlanListByPagination(formData)
|
||
},
|
||
|
||
handleRemoveDrafterTag(type, index, drafterId, tag) {
|
||
const orgId = tag.departId || tag.orgId
|
||
switch (type) {
|
||
case 'primaryDrafter':
|
||
this.primaryDrafter.splice(index, 1)
|
||
const primaryDrafter = this.form.primaryDrafter.split(',')
|
||
primaryDrafter.splice(primaryDrafter.indexOf(drafterId), 1)
|
||
this.form.primaryDrafter = primaryDrafter.join(',')
|
||
// 判断其他起草人中是否还有该部门下的人
|
||
let findFlag = false
|
||
for (let i = 0; i < this.compilersUser.length; i++) {
|
||
if (this.compilersUser[i].departId === orgId) {
|
||
findFlag = true
|
||
break
|
||
}
|
||
}
|
||
if (!findFlag) {
|
||
let spliceIndex = -1
|
||
const otherDrafterDept = []
|
||
for (let i = 0; i < this.otherDrafterDept.length; i++) {
|
||
if (this.otherDrafterDept[i].id === orgId) {
|
||
spliceIndex = i
|
||
} else {
|
||
otherDrafterDept.push(this.otherDrafterDept[i].id)
|
||
}
|
||
}
|
||
this.otherDrafterDept.splice(spliceIndex, 1)
|
||
this.form.otherDrafterDept = otherDrafterDept.join(',')
|
||
}
|
||
break
|
||
}
|
||
},
|
||
|
||
handleRemoveTag(type, index, tag) {
|
||
switch (type) {
|
||
case 'compileUnitDept':
|
||
this.compileUnitDept.splice(index, 1)
|
||
const compileUnit = this.form.compileUnit.split(',')
|
||
compileUnit.splice(compileUnit.indexOf(tag.id), 1)
|
||
this.form.compileUnit = compileUnit.join(',')
|
||
break
|
||
}
|
||
},
|
||
|
||
handleDraftConditionChange(val) {
|
||
if (val === '') {
|
||
this.condition.draftingUnit = ''
|
||
}
|
||
},
|
||
|
||
getDepartmentByUserId(userIds) {
|
||
return new Promise((resolve, reject) => {
|
||
getDepartmentByUserId({
|
||
userIds
|
||
}).then(res => {
|
||
if (res.ok) {
|
||
resolve(res.data)
|
||
}
|
||
}).catch(e => {})
|
||
})
|
||
}
|
||
},
|
||
components: {
|
||
deptTree,
|
||
ProcessSearchStand,
|
||
CustomFile,
|
||
BussRetrieval
|
||
},
|
||
props: {},
|
||
computed: {
|
||
chooseDrawerTitle() {
|
||
switch (this.chooseItemKey) {
|
||
case 'primaryDrafterDept':
|
||
return '主起草部门'
|
||
case 'primaryDrafter':
|
||
return '主起草人'
|
||
case 'otherDrafterDept':
|
||
return '起草部门'
|
||
case 'otherDrafter':
|
||
return '其他起草人'
|
||
default:
|
||
return '组织机构'
|
||
}
|
||
},
|
||
excludeUser() {
|
||
switch (this.chooseItemKey) {
|
||
case 'primaryDrafter':
|
||
return this.form.compilersUser
|
||
case 'otherDrafter':
|
||
return this.form.primaryDrafter
|
||
default:
|
||
return []
|
||
}
|
||
},
|
||
maxSelected() {
|
||
switch (this.chooseItemKey) {
|
||
case 'primaryDrafter':
|
||
return 1
|
||
default:
|
||
return -1
|
||
}
|
||
},
|
||
maxSelectedTips() {
|
||
switch (this.chooseItemKey) {
|
||
case 'primaryDrafter':
|
||
return '主起草人只能为一个人'
|
||
default:
|
||
return ''
|
||
}
|
||
},
|
||
chkboxType() {
|
||
return { 'Y': '', 'N': '' }
|
||
// {'Y': 'ps', 'N': 'ps'} : { 'Y': '', 'N': '' }
|
||
},
|
||
...mapGetters(['userInfo'])
|
||
},
|
||
watch: {
|
||
primaryDrafterDept: {
|
||
deep: true,
|
||
handler(val) {
|
||
if (this.visibleAddEditModal) {
|
||
setTimeout(() => {
|
||
this.primaryDrafterDeptTagAnimateList = [...val]
|
||
}, 100)
|
||
}
|
||
}
|
||
},
|
||
primaryDrafter: {
|
||
deep: true,
|
||
handler(val) {
|
||
if (this.visibleAddEditModal) {
|
||
setTimeout(() => {
|
||
this.primaryDrafterTagAnimateList = [...val]
|
||
}, 100)
|
||
}
|
||
}
|
||
},
|
||
otherDrafterDept: {
|
||
deep: true,
|
||
handler(val, oldVal) {
|
||
if (this.visibleAddEditModal) {
|
||
setTimeout(() => {
|
||
this.otherDrafterDeptTagAnimateList = [...val]
|
||
}, 100)
|
||
}
|
||
}
|
||
},
|
||
compileUnitDept: {
|
||
deep: true,
|
||
handler(val) {
|
||
if (this.visibleAddEditModal) {
|
||
setTimeout(() => {
|
||
this.compileUnitTagAnimateList = [...val]
|
||
}, 100)
|
||
}
|
||
}
|
||
},
|
||
compilersUser: {
|
||
deep: true,
|
||
handler(val, oldVal) {
|
||
if (this.visibleAddEditModal) {
|
||
setTimeout(() => {
|
||
this.compilersUserTagAnimateList = [...val]
|
||
}, 100)
|
||
}
|
||
}
|
||
},
|
||
},
|
||
mounted() {
|
||
this.getOptions();
|
||
this.queryPlanListByPagination();
|
||
},
|
||
beforeDestroy() {
|
||
this.tableData = []
|
||
this.twoOptions = []
|
||
}
|
||
};
|
||
</script>
|
||
|
||
<style lang="less" scoped>
|
||
@import "~@/assets/styles/style";
|
||
@import "~@/assets/styles/mixins";
|
||
#enterBSysRevPlanManaLib {
|
||
height: 100%;
|
||
display: flex;
|
||
flex-direction: column;
|
||
/deep/ .TipsClass {
|
||
background: #fde2e2;
|
||
&.hover-row {
|
||
td {
|
||
background: #fde2e2;
|
||
}
|
||
}
|
||
}
|
||
.container {
|
||
width: 100%;
|
||
flex: auto;
|
||
overflow: hidden;
|
||
display: flex;
|
||
flex-direction: column;
|
||
position: relative;
|
||
.table-wrap {
|
||
flex: auto;
|
||
overflow-y: auto;
|
||
position: absolute;
|
||
width: 100%;
|
||
height: 100%;
|
||
}
|
||
.pagination {
|
||
position: static;
|
||
/deep/ .pagination-slot {
|
||
padding: 0;
|
||
}
|
||
}
|
||
}
|
||
.el-divider {
|
||
.el-divider__text {
|
||
font-size: 16px;
|
||
color: #0c91e5;
|
||
}
|
||
}
|
||
.standards-drawer-table-one {
|
||
position: relative;
|
||
height: 350px;
|
||
.pagination {
|
||
bottom: 0;
|
||
}
|
||
}
|
||
.standards-drawer-table {
|
||
margin-top: 10px;
|
||
}
|
||
.see-drawer {
|
||
.searchAngNewBtn {
|
||
float: right;
|
||
}
|
||
.el-divider {
|
||
clear: both;
|
||
}
|
||
}
|
||
}
|
||
.add-form-item {
|
||
&.select-and-input {
|
||
/deep/ .el-form-item__content {
|
||
display: flex;
|
||
.search-btn-wrap {
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
.file-wrap {
|
||
padding: 5px 10px;
|
||
border-top: 1px dashed #ddd;
|
||
}
|
||
.tag-group {
|
||
min-height: 49px;
|
||
display: flex;
|
||
flex-flow: row wrap;
|
||
justify-content: flex-start;
|
||
padding-left: 10px;
|
||
.tag-wrap {
|
||
height: 50px;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
margin-right: 5px;
|
||
user-select: none;
|
||
&:last-child {
|
||
margin-right: 0;
|
||
}
|
||
}
|
||
}
|
||
/deep/.el-form-item__content {
|
||
p {
|
||
padding: 0 30px 0 10px;
|
||
line-height: 50px;
|
||
}
|
||
}
|
||
.file-wrap {
|
||
p {
|
||
padding: 0;
|
||
color: #409eff;
|
||
&:hover {
|
||
cursor: pointer;
|
||
text-decoration: underline;
|
||
}
|
||
}
|
||
}
|
||
.span-line:hover {
|
||
text-decoration: underline;
|
||
}
|
||
.state-date {
|
||
width: 375px !important;
|
||
height: 30px;
|
||
padding-bottom: 0px;
|
||
padding-top: 0px;
|
||
}
|
||
::v-deep .el-drawer__header{
|
||
&>span:first-child{
|
||
outline: none!important;
|
||
}
|
||
}
|
||
::v-deep .el-drawer{
|
||
outline: none !important;
|
||
}
|
||
.search-stand-wrap {
|
||
display: flex;
|
||
.el-input {
|
||
flex: 1;
|
||
overflow: hidden;
|
||
}
|
||
.btn-wrap {
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
}
|
||
</style>
|
||
<style lang="less">
|
||
.mofun-state-date {
|
||
.el-date-editor .el-range-separator {
|
||
width: 8%;
|
||
line-height: 28px;
|
||
}
|
||
.search-area .el-form-item .el-form-item__content .el-input__icon {
|
||
line-height: 22px;
|
||
}
|
||
}
|
||
</style>
|