Files
foton-laws-system-front/src/pages/processCenter/pages/creatProcess/qbrk/step5.vue
T
2023-09-04 09:39:18 +08:00

3311 lines
157 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template><div class="bzrkStep1">
<!-- 标准入库流程-->
<ProcessHeader toggle>
<template slot="proName">企标制修订-技术标准</template>
<template slot="proNode">征求意见</template>
</ProcessHeader>
<div class="headerTabs">
<div class="headerTabsItem" :class="active === '2' ? 'active' : ''" @click="handleTabs('2')">基础信息</div>
<div class="headerTabsItem" :class="active === '3' ? 'active' : ''" @click="handleTabs('3')">会签意见</div>
<div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">会签评分</div>
<div class="headerTabsItem" :class="active === '4' ? 'active' : ''" @click="handleTabs('4')">审批历史</div>
</div>
<div class="content">
<el-form
ref="form"
:model="form"
:rules="rules"
class="label-input-form"
label-width="210px"
>
<div style="flex: auto;" id="active1" v-show="active === '1'">
<template>
<el-table
:data="form.evaluationData"
:summary-method="getSummaries"
show-summary
:span-method="(({row, column, rowIndex, columnIndex})=>objectSpanMethod({row, column, rowIndex, columnIndex},form.evaluationData))"
style="width: 100%">
<el-table-column label="企业标准编写质量评价表" align="center" label-class-name="column1">
<el-table-column
label="标准类别"
>
<el-table-column
prop="oneIndexTitle"
align="center"
label="一级指标"
width = '120'
>
</el-table-column>
</el-table-column>
<el-table-column
:label="form.standSort"
>
<el-table-column
prop="twoIndexTitle"
align="center"
label="二级指标"
width = '120'
>
</el-table-column>
<el-table-column
prop="threeIndexTitle"
label="三级指标"
width="300"
>
</el-table-column>
</el-table-column>
<el-table-column
label="标准名称"
>
<el-table-column
prop="weight"
align="center"
label="指标权重 %"
width = '100'
>
<template slot-scope="scope">
{{scope.row.valueType === 'number' ? scope.row.weight * 100 : '加分项('+scope.row.weight+'分)'}}
</template>
</el-table-column>
</el-table-column>
<el-table-column
:label="form.standName"
>
<el-table-column
prop="score"
align="center"
label="指标分值10分制8合格68不合格6"
width = '200'
>
<template slot-scope="scope">
<el-form-item
:prop="'evaluationData.'+scope.$index + '.score'"
:rules="scope.row.valueType !== 'add' ? rules.score : rules.scoreNot" >
<el-input v-model.number="scope.row.score" placeholder="请填写分值" />
</el-form-item>
</template>
</el-table-column>
<el-table-column
prop="scoreMin"
align="center"
label="分值小计"
width = '80'
>
<template slot-scope="scope">
{{setScoreMin(scope.row)}}
</template>
</el-table-column>
<el-table-column
prop="reason"
align="center"
label="简述扣分理由不合格6必填"
>
<template slot-scope="scope" v-if="(scope.row.valueType !== 'add' && scope.row.score !== undefined && scope.row.score !== '' && scope.row.score < 10)">
<el-form-item
:prop="'evaluationData.'+scope.$index + '.reason'"
:rules="scope.row.score < 6 ? rules.reason : rules.reasonNot" >
<el-input v-model="scope.row.reason" placeholder="请填写扣分理由" />
</el-form-item>
</template>
</el-table-column>
</el-table-column>
</el-table-column>
</el-table>
</template>
<div>
<el-collapse accordion v-model="activeName">
<el-collapse-item title="回执说明" name = "1">
<div style="margin: 0;">
<el-form
ref="formTongGuo"
:model="formTongGuo"
:rules="rules">
<!-- <el-form-item-->
<!-- prop="approvalOpinion"-->
<!-- >-->
<!-- <el-select @change="getRule" v-model="formTongGuo.approvalOpinion" placeholder="请审批" style="margin-bottom: 20px;">-->
<!-- <el-option label="驳回" value="1"></el-option>-->
<!-- <el-option label="通过" value="0"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="会签意见文件" prop="summaryName" class="add-form-item form-item-disabled">-->
<!-- <el-input-->
<!-- disabled-->
<!-- style="display: none;"-->
<!-- v-model="form.summaryName"-->
<!-- clearable-->
<!-- ></el-input>-->
<!-- <div style="display: flex;justify-content: left;margin-top: 5px;padding-left: 20px;">-->
<!-- <div style="width: 30%;">-->
<!-- <div v-for="(item,index) in summaryList" :key="index" style="color: #409eff;cursor:pointer" class="fileClass">-->
<!-- <span style="width: 80%;" @click="handleFilePreview2(item,'preview')">{{ item.name }}</span>-->
<!-- <span style="width: 20%;margin-left: 15px;">-->
<!-- <el-button type="primary" size="mini" plain icon="el-icon-download" @click="handleFilePreview2(item,'down')"></el-button>-->
<!-- </span>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div style="width: 20%;">-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- class="common-button-primary"-->
<!-- size="mini"-->
<!-- style="margin-top: 6px; float: left;"-->
<!-- @click="fileUpload('summary')">-->
<!-- <i class="el-icon-upload"></i>-->
<!-- </el-button>-->
<!-- </div>-->
<!-- </div>-->
<!-- </el-form-item>-->
<el-form-item
prop="commentText"
>
<el-input
type="textarea"
:rows="3"
resize="none"
placeholder="请输入意见"
v-model="formTongGuo.commentText">
</el-input>
</el-form-item>
</el-form>
</div>
</el-collapse-item>
</el-collapse>
</div>
</div>
<div style="flex: auto;" v-show="active === '2'">
<formList
:form = "form"
:FBGBUSSFileList = "FBGBUSSFileList"
:LSBBBUSSFileList = "LSBBBUSSFileList"
:BZSMBUSSFileList = "BZSMBUSSFileList"
:QTWJBUSSFileList = "QTWJBUSSFileList"
:GLWJBUSSFileList = "GLWJBUSSFileList"
:disabledState = "disabledState"
:verifySarStandard = "verifySarStandard"
@emitDataLoading="emitDataLoading"></formList>
</div>
<div class="block" id="active3" v-show="active === '3'">
<ProcessTitle>
<template slot="title">条款信息</template>
</ProcessTitle>
<template>
<div class="prc-content-border" style="height: 66vh;position: relative;">
<div class="action-bar">
<!-- <el-button type="primary" class="common-button-primary add-button" size="mini" @click="choiceZRRS('', 2, '')">-->
<!-- 批量编辑-->
<!-- </el-button>-->
<el-button
type="primary"
size="mini"
class="common-button-primary add-button"
@click="createRow"
>创建条款</el-button>
</div>
<el-table
ref="selection"
tooltip-effect="dark"
style="width: 100%;margin-bottom: 20px;overflow-y:auto;height:56vh;border-bottom: 1px solid #EBEEF5;"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
@selection-change="handleSelectionChange"
row-key="id"
:data="form.modelData"
border
default-expand-all>
<!-- <el-table-column type="selection" min-width="5%" :selectable="checkSelect" align="center"/>-->
<el-table-column
label="序号"
min-width="5%"
align="center">
<template slot-scope="scope">
{{scope.$index + 1}}
</template>
</el-table-column>
<el-table-column
prop="modelNum"
label="条款号"
min-width="12%"
align="center"
>
<template slot-scope="scope">
<el-input v-model="scope.row.modelNum" :title="scope.row.modelNum" placeholder="请填写条款号"/>
</template>
</el-table-column>
<el-table-column
label="修改前"
align="center"
min-width="20%">
<template slot-scope="scope">
<el-form-item
style="margin-left: 0;margin-bottom:0;"
>
<el-input v-model="scope.row.modelUpdBefore" :title="scope.row.modelUpdBefore" :disabled="scope.row.disabled" placeholder="请填写章节修改前内容"/>
</el-form-item>
</template>
</el-table-column>
<el-table-column
label="修改后"
align="center"
min-width="20%">
<template slot-scope="scope">
<el-form-item
style="margin-left: 0;margin-bottom:0;"
>
<el-input v-model="scope.row.modelUpdAfter" :title="scope.row.modelUpdAfter" :disabled="scope.row.disabled" placeholder="请填写章节修改后内容"/>
</el-form-item>
</template>
</el-table-column>
<el-table-column
label="修改理由"
align="center"
min-width="20%">
<template slot-scope="scope">
<el-form-item
style="margin-left: 0;margin-bottom:0;"
>
<el-input v-model="scope.row.modelContent" :disabled="scope.row.disabled" placeholder="请填写修改理由"/>
</el-form-item>
</template>
</el-table-column>
<el-table-column
prop="zrDeptIdName"
label="提出部门"
align="center"
min-width="15%">
<!-- <template slot-scope="scope">-->
<!-- <el-form-item-->
<!-- style="margin-left: 0;margin-bottom:0;"-->
<!-- >-->
<!-- <el-input v-model="scope.row.zrDeptIdName" disabled placeholder="请选择提出人自动带入部门"/>-->
<!-- </el-form-item>-->
<!-- </template>-->
</el-table-column>
<el-table-column
prop="zrUserIdName"
label="责任人"
min-width="15%"
align="center">
<!-- <template slot-scope="scope">-->
<!-- <el-form-item-->
<!-- style="margin-left: 0;margin-bottom:0;"-->
<!-- >-->
<!-- <el-input v-model="scope.row.zrUserIdName" v-if="scope.row.pid === '0'" placeholder="请选择责任人" disabled />-->
<!-- </el-form-item>-->
<!-- </template>-->
</el-table-column>
<el-table-column label="操作" align="center" min-width="5%">
<template slot-scope="scope">
<div @click.stop style="display: inline-block">
<el-dropdown trigger="click" @command="handleCommand">
<i class="iconfont">&#xe61e;</i>
<el-dropdown-menu slot="dropdown">
<!-- <el-dropdown-item :command="[scope.$index,scope.row, '新增']" v-btn-permission="''">新增</el-dropdown-item>-->
<!-- <el-dropdown-item :command="[scope.$index,scope.row, '维护']" v-btn-permission="''">维护</el-dropdown-item>-->
<el-dropdown-item :command="[scope.$index,scope.row, '删除']" v-btn-permission="''">删除</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</template>
</el-table-column>
</el-table>
</div>
</template>
</div>
<!-- <div class="block" id="active2" v-show="active === '3'">-->
<!-- <ProcessTitle>-->
<!-- <template slot="title">模块信息</template>-->
<!-- </ProcessTitle>-->
<!-- <template>-->
<!-- <div class="prc-content-border" style="height: 66vh;position: relative;">-->
<!-- <div class="action-bar">-->
<!-- <el-button type="primary" class="common-button-primary add-button" size="mini" @click="choiceZRRS('', 2, '')">-->
<!-- 批量编辑-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- size="mini"-->
<!-- class="common-button-primary add-button"-->
<!-- @click="createRow"-->
<!-- >创建模块</el-button>-->
<!-- </div>-->
<!-- <el-table-->
<!-- ref="selection"-->
<!-- tooltip-effect="dark"-->
<!-- style="width: 100%;margin-bottom: 20px;overflow-y:auto;height:56vh;border-bottom: 1px solid #EBEEF5;"-->
<!-- :header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',-->
<!-- fontWeight: 'bold', height: '48px'}"-->
<!-- @selection-change="handleSelectionChange"-->
<!-- row-key="id"-->
<!-- :data="form.modelData"-->
<!-- border-->
<!-- default-expand-all-->
<!-- :tree-props="{children: 'children', hasChildren: 'hasChildren'}">-->
<!-- <el-table-column type="selection" min-width="5%" :selectable="checkSelect" align="center"/>-->
<!-- <el-table-column-->
<!-- prop="modelNum"-->
<!-- label="序号"-->
<!-- min-width="15%"-->
<!-- align="center"-->
<!-- :tree-props="{children: 'children', hasChildren: 'hasChildren'}">-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- label="名称"-->
<!-- align="center"-->
<!-- min-width="30%">-->
<!-- <template slot-scope="scope">-->
<!-- <el-form-item-->
<!-- style="margin-left: 0;margin-bottom:0;"-->
<!-- >-->
<!-- <el-input v-model="scope.row.modelName" :disabled="scope.row.disabled" placeholder="请维护模块名称" @blur="modelNameFunc(scope.row)"/>-->
<!-- </el-form-item>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- label="责任人"-->
<!-- min-width="15%"-->
<!-- align="center">-->
<!-- <template slot-scope="scope">-->
<!-- <el-form-item-->
<!-- style="margin-left: 0;margin-bottom:0;"-->
<!-- >-->
<!-- <el-input v-model="scope.row.zrUserIdName" v-if="scope.row.pid === '0'" placeholder="请选择责任人" @click.native="choiceZRRS(scope.row.zrUserId, 1, scope.$index)"/>-->
<!-- </el-form-item>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="操作" align="center" min-width="5%">-->
<!-- <template slot-scope="scope">-->
<!-- <div @click.stop style="display: inline-block">-->
<!-- <el-dropdown trigger="click" @command="handleCommand">-->
<!-- <i class="iconfont">&#xe61e;</i>-->
<!-- <el-dropdown-menu slot="dropdown">-->
<!-- <el-dropdown-item :command="[scope.$index,scope.row, '新增']" v-btn-permission="''">新增</el-dropdown-item>-->
<!-- <el-dropdown-item :command="[scope.$index,scope.row, '维护']" v-btn-permission="''">维护</el-dropdown-item>-->
<!-- <el-dropdown-item :command="[scope.$index,scope.row, '删除']" v-btn-permission="''">删除</el-dropdown-item>-->
<!-- </el-dropdown-menu>-->
<!-- </el-dropdown>-->
<!-- </div>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- </div>-->
<!-- </template>-->
<!-- </div>-->
<div class="block" style="padding-top: 20px;" v-show="active === '4'">
<div class="flow-list">
<el-table
:height="tablePHeight"
ref="selection"
:data="detailData"
tooltip-effect="dark"
style="width: 100%"
border
row-key="id"
:no-data-text="listNoDataText"
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
>
<el-table-column
prop="name"
label="任务步骤"
align="center"
>
</el-table-column>
<el-table-column
prop="assignee"
label="任务受理人"
align="center"
>
</el-table-column>
<el-table-column
prop="createTime"
label="创建时间"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.createTime ? $moment(scope.row.createTime).format('YYYY-MM-DD') : '' }}</span>
</template>
</el-table-column>
<el-table-column
prop="endTime"
label="完成时间"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.endTime ? $moment(scope.row.endTime).format('YYYY-MM-DD') : '' }}</span>
</template>
</el-table-column>
<el-table-column
prop="comment"
label="流程信息"
align="center">
<template slot-scope="scope">
<span>{{scope.row.commentText}}</span>
</template>
</el-table-column>
<el-table-column
prop="completeFlag"
label="状态"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.endTime ? '已完成' : '未完成'}}</span>
</template>
</el-table-column>
</el-table>
<loading :loading="loading">流程列表加载中</loading>
</div>
</div>
</el-form>
</div>
<!-- 保存||提交-->
<ProcessFooter
v-show="verifySarStandard"
show-save
show-submit
:submitLoading="isSubmit"
:saveLoading="saveLoading"
show-transfer
@transfer="handleTransfer"
@save="handleSave"
@submit="handleSubmit"
>
</ProcessFooter>
<el-drawer
ref="standard"
size="1400px"
:title="showDrawerTitle"
:visible.sync="showDrawer"
:before-close="showDrawerClose">
<div style="height: 98%;display: flex;">
<div class="left">
<el-tabs v-model="editableTabsValue" type="card" style="height: 100%" @tab-click="previewIframe">
<el-tab-pane
style="height: 100%"
v-if="FBGBUSSFileList.length > 0"
v-for="(item, index) in FBGBUSSFileList"
:key="item.name"
:label="item.name"
:name="item.id"
>
<loading :loading="iframeLoading">正在加载文档</loading>
<iframe width="100%" height="100%" wframeborder="0" ref="iframe" v-bind:src="iframeUrl"></iframe>
</el-tab-pane>
</el-tabs>
</div>
<div class="rightDiv">
<div class="search-area">
<el-form :model="showForm" :rules="showFormRules" class="label-input-form" style="width: 100%;" ref="showForm">
<el-form-item label="条款号" prop="modelNum" class="add-form-item">
<el-input
v-model="showForm.modelNum"
clearable
></el-input>
</el-form-item>
<el-form-item label="修改前" prop="modelUpdBefore" class="add-form-item">
<el-input
v-model="showForm.modelUpdBefore"
clearable
></el-input>
</el-form-item>
<el-form-item label="修改后" prop="modelUpdAfter" class="add-form-item">
<el-input
v-model="showForm.modelUpdAfter"
clearable
></el-input>
</el-form-item>
<el-form-item label="修改理由" prop="modelContent" class="add-form-item">
<el-input
v-model="showForm.modelContent"
clearable
></el-input>
</el-form-item>
<el-form-item label="提出部门" prop="zrDeptIdName" class="add-form-item form-item-disabled">
<el-input
v-model="showForm.zrDeptIdName" disabled
clearable
></el-input>
</el-form-item>
<el-form-item label="责任人" prop="zrUserIdName" class="add-form-item form-item-disabled">
<el-input
v-model="showForm.zrUserIdName" disabled
clearable
></el-input>
</el-form-item>
</el-form>
</div>
<div class="demo-drawer-footer">
<el-button :loading="isSubmit" size="mini" class="common-button-primary" icon="el-icon-check" type="primary" @click="createRowSubmit">
提交
</el-button>
</div>
</div>
</div>
</el-drawer>
<el-dialog width='400px' :visible.sync="fileMadel" title="上传文件">
<el-upload
multiple
drag
:file-list="fileList"
:action="fileUrl"
ref="importfile"
name="file"
accept=".pdf, .PDF, .ppt, .PPT, .pptx,.PPTX, .doc, .DOC, .docx, .DOCX, .xls, .xlsx"
:before-upload="beginImportFile"
:on-success="importFileSuccess"
:on-preview="handleFilePreview"
:on-remove="removeOneFile"
:show-file-list="true"
>
<div style="padding: 20px 0">
<i class="el-icon-upload" style="color: #3399ff"></i>
<p>点击或拖拽上传文件</p>
</div>
</el-upload>
</el-dialog>
<el-dialog
:title="config.attrName"
:visible.sync="replaceLawsNumModel"
width="875px"
: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" @keyup.enter.native="getReplaceLawsNumRowFirst">
<el-form-item label="标准来源" class="search-item" v-if="dataSource">
<el-select
:popper-append-to-body="false"
v-model="replaceLawsNumForm.standType"
placeholder="请选择标准来源"
@change="dataSourceChange">
<el-option value="INLAND" label="国内标准库"></el-option>
<el-option value="FOREIGN" label="海外标准库"></el-option>
</el-select>
</el-form-item>
<el-form-item label="编号/名称" class="search-item">
<el-input
v-model="replaceLawsNumForm.numberName"
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="getReplaceLawsNumRowFirst">
</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'}"
@selection-change="selectReplaceStandNumRowChange">
<el-table-column
type="selection"
width="55"
align="center">
</el-table-column>
<el-table-column
label="标准编号">
<template slot-scope="scope">
<a v-if="scope.row.standYear" class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.standSort }} {{ scope.row.standNumber }}-{{ scope.row.standYear }}</a>
<a v-else class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.standSort }} {{ scope.row.standNumber }}</a>
</template>
</el-table-column>
<el-table-column
prop="standName"
label="标准名称">
</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="textStatus"
label="文本状态"
width="130">
<template slot-scope="scope">
<span>{{ textStatusMap[scope.row.textStatus] }}</span>
</template>
</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 class="common-button-default" round icon="el-icon-close" @click="replaceLawsNumModel = false">取消</el-button>
<el-button type="primary" round class="common-button-primary" icon="el-icon-check" @click="replaceLawsNumModelBt">提交</el-button>
</div>
</el-dialog>
<!--意见提示-->
<el-dialog
title="提示"
:visible.sync="opinionDialogVisible"
top="30vh"
width="400px">
<span>当前征询意见暂无,请确认是否提交</span>
<span slot="footer" class="dialog-footer">
<el-button @click="opinionDialogVisible = false">取 消</el-button>
<el-button type="primary" @click="opinionClick">确 定</el-button>
</span>
</el-dialog>
<Role-tree
is-title="选择责任部门对接人"
:is-visible.sync="modalShowRoleFlag"
@checkedRole="checkedRole2"
:nodeList="nodeList2"
></Role-tree>
<!-- 福田全公司转办选人解决方案 -->
<Role-tree
check-box
:is-title="drawerTitle"
:is-visible.sync="drawerModal"
@checkedRole="checkedRoleTransfer"
:nodeList="nodeList"
></Role-tree>
<Role-tree
check-box
:is-title="drawerTitle"
:is-visible.sync="modalShowFlag"
@checkedRole="checkedRole"
:nodeList="nodeList"
></Role-tree>
<!-- <el-drawer-->
<!-- :title="drawerTitle"-->
<!-- :visible.sync="modalShowFlag"-->
<!-- :wrapperClosable="false"-->
<!-- size="800px">-->
<!-- <el-input-->
<!-- style="width:70%;padding: 10px"-->
<!-- placeholder="请输入姓名"-->
<!-- v-model="filterText">-->
<!-- </el-input>-->
<!-- <el-tree-->
<!-- :filter-node-method="filterNode"-->
<!-- v-if="modalShowFlag"-->
<!-- node-key="id"-->
<!-- style="height: 100%; overflow: auto;"-->
<!-- class="filter-tree"-->
<!-- :data="treeData"-->
<!-- :props="defaultUserProps"-->
<!-- :default-checked-keys="nodeList"-->
<!-- highlight-current-->
<!-- check-strictly-->
<!-- @check="drawerCheck"-->
<!-- default-expand-all-->
<!-- :expand-on-click-node="false"-->
<!-- show-checkbox-->
<!-- ref="tree">-->
<!-- </el-tree>-->
<!-- <div id="roleFormButton" class="demo-drawer-footer">-->
<!-- <el-button class="common-button-primary" size="mini" icon="el-icon-check" type="primary" @click="saveUserInfo">确定</el-button>-->
<!-- <el-button class="common-button-default" size="mini" icon="el-icon-close" @click="cancelUserInfo">取消</el-button>-->
<!-- </div>-->
<!-- </el-drawer>-->
<!-- 选择标准的弹框 -->
<el-drawer
ref="standard"
title="查询结果"
size="1300px"
:visible.sync="standardDrawer"
direction="rtl"
:before-close="handleReviseDrawerClose">
<div class="standard-content">
<div class="content">
<div class="standard-table-search">
<el-form :model="standardSearchForm" inline class="label-input-form search-area">
<el-form-item label="政策编号" style="margin-right:-20px" prop="lawsNumber" class="search-item" >
<el-input
v-model="standardSearchForm.lawsNumber"
clearable placeholder="根据编号查找"
:maxlength="100"
@keyup.enter.native="handleSearchStandard"/>
</el-form-item>
<el-form-item label="中文名称" style="margin-right:-20px" prop="lawsName" class="search-item" >
<el-input
v-model="standardSearchForm.lawsName"
placeholder="请输入中文名称"
clearable
:maxlength="100"></el-input>
</el-form-item>
<el-form-item label="英文名称" style="margin-right:-20px" prop="lawsEnName" class="search-item" >
<el-input
v-model="standardSearchForm.lawsEnName"
placeholder="请输入英文名称"
clearable
:maxlength="100"></el-input>
</el-form-item>
<el-formItem label="文本状态" prop="lawsTextState" class="search-item">
<el-select v-model="standardSearchForm.lawsTextState" placeholder="" filterable clearable>
<el-option
v-for="item in standStateOptions"
:key="item.value"
:value="item.value"
:label="item.label"
></el-option>
</el-select>
</el-formItem>
<el-form-item>
<el-button
icon="el-icon-search"
type="primary"
class="common-button-primary"
@click="handleSearchStandard"
round>
</el-button>
<el-button
class="common-button-default"
icon="el-icon-refresh-left"
@click="handleResetSearch"
round></el-button>
</el-form-item>
</el-form>
</div>
<div class="standard-table-wrap">
<el-table
ref="reviseDrawerTable"
:data="tableData.standardData"
tooltip-effect="dark"
style="width: 100%;"
:height="tableHeight.standardTableHeight"
border
class="drag-table"
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
@selection-change="standSelectChange">
<el-table-column
type="selection"
width="55"
align="center">
</el-table-column>
<el-table-column
type="index"
label="序号"
width="80"
align="center"
></el-table-column>
<el-table-column
label="政策编号"
align="center"
>
<template slot-scope="scope">
<a @click="handlePreview(scope.row)">{{ scope.row.lawsNumber }}</a>
</template>
</el-table-column>
<el-table-column
prop="lawsName"
label="中文名称"
align="center">
</el-table-column>
<el-table-column
prop="lawsEnName"
label="英文名称"
align="center">
</el-table-column>
<el-table-column
prop="textStatus"
label="文本状态"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.standStatusShow }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="80">
<template slot-scope="scope">
<el-button
class="opera-btn"
size="mini"
type="primary"
@click="handlePreview(scope.row)">查看
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<pagination
:page="standardSearchForm.page"
:total="standardSearchForm.total"
@pageChange="handleStandardPageChange"
@pageSizeChange="handleStandardPageSizeChange"></pagination>
<loading :loading="loadSarStandard">数据获取中</loading>
</div>
</div>
<div class="demo-drawer-footer">
<el-button
round
class="common-button-primary"
icon="el-icon-check"
type="primary"
@click="handleProcessStandardNext(1)">新增</el-button>
<el-button
round
class="common-button-primary"
icon="el-icon-check"
type="primary"
@click="handleProcessStandardNext(2)">带入</el-button>
<el-button
round
class="common-button-default"
icon="el-icon-close"
@click="handleProcessStandardNext(3)">取消</el-button>
</div>
</el-drawer>
<!-- 组件树-->
<tree-select-new
:multiple=false
:lazy=false
:modalShowFlag="modalShowFlag1"
:drawerTitle="drawerTitle1"
width = "500"
:data="standSystemOptions"
:defaultProps="defaultProps" :checkedKeys="defaultCheckedKeys"
:nodeKey="nodeKey" @popoverHide="popoverHide"></tree-select-new>
<tree-select-new
width = "500"
:lazy=true
:multiple="multipleFlag2"
:check-strictly=true
:modalShowFlag="modalShowFlag2"
:drawerTitle="drawerTitle"
:url="url"
:urlChild="urlChild"
:defaultProps="defaultCodeProps" :checkedKeys="defaultCheckedKeys1"
:nodeKey="nodeKeyCode" @popoverHide="popoverHideBusVs"></tree-select-new>
<loading :loading="dataLoading">正在加载数据</loading>
</div>
</template>
<script>
import formList from './common/formList.vue'
import ProcessHeader from '../../components/ProcessHeader'
import ProcessFooter from '../../components/ProcessFooter'
import ProcessTitle from '../../components/ProcessTitle'
import { onlyOfficeUrl,kkFileViewUrl } from '@/sysConfig'
import { processEditFile } from 'api/process'
import {saveTaskForPub,changeAssigneeNew,saveTaskFirst, queryTaskFirst, getBusStandFileByAttId,inboundLiaisonDetail} from "api/process";
import {getEvaluationIndex} from "api/businessApi";
import TreeSelect from '@/components/treeSelect/treeSelect.vue';
import TreeSelectNew from '@/components/treeSelect/treeSelectNew.vue';
let Base64 = require('js-base64').Base64;
import axios from '@/common/axiosV2'
export default {
name: "bussLibrary5",
components: {
formList,
ProcessHeader,
ProcessFooter,
ProcessTitle,
TreeSelect,
TreeSelectNew
},
data () {
const numberCodeNot = (rule, value, callback) => {
let pattern = /^[1,0]*$/
if (!pattern.test(value) || value > 1) {
return callback(new Error('评分分值只可为0分或1分'))
} else {
callback()
}
};
const numberCode = (rule, value, callback) => {
if(value === undefined || value === ''){
return callback(new Error('评分分值不可为空'))
}
let pattern = /^[0-9]*$/
if (!pattern.test(value)) {
return callback(new Error('只能输入数字'))
} else {
callback()
}
};
const validateZrUserIdName = (rule, value, callback) => {
if(this.FBGBUSSFileList.length === 0){
callback(new Error('请上传发布稿文件!'))
}
// callback()
};
const validateModelName = (rule, value, callback) => {
if(this.FBGBUSSFileList.length === 0){
callback(new Error('请上传发布稿文件!'))
}
// callback()
};
const validateFBGBUSS = (rule, value, callback) => {
if(this.FBGBUSSFileList.length === 0){
callback(new Error('请上传发布稿文件!'))
}
callback()
};
const validateBZSMBUSS = (rule, value, callback) => {
if(this.BZSMBUSSFileList.length === 0){
callback(new Error('请上传编辑说明文件!'))
}
callback()
};
return {
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
},
iframeLoading:false,
iframeUrl:"",
showForm:{
modelNum: '',
modelName: "",
modelUpdBefore: "",
modelUpdAfter: "",
modelContent: "",
zrUserId:this.$store.getters.userInfo.userId,
zrUserIdName:this.$store.getters.userInfo.userName,
zrDeptId:this.$store.getters.userInfo.institutionId,
zrDeptIdName:this.$store.getters.userInfo.institutionName,
children:[],
},
editableTabsValue:"",
showDrawerTitle:"",
showDrawer:false,
taskInfo: '征求意见',
loading: false,
dataLoading: true,
disabledState: true,
userId:this.$store.getters.userInfo.userId,
userName:this.$store.getters.userInfo.userName,
taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId,
bpnId: this.$route.query.bpnId,
prcNum: this.$route.query.prcNum,
prcName: this.$route.query.prcName,
detailData: [],
summary:'',
summaryName:'',
fileList: [],
summaryList: [],
FBGBUSSFileList: [],
BZSMBUSSFileList: [],
LSBBBUSSFileList: [],
QTWJBUSSFileList: [],
GLWJBUSSFileList: [],
caFileList: [],
FBGBJBDFileList: [],
xgdFileList: [],
ZCWBLAWSFileList: [],
GCWBLAWSFileList: [],
JDWJLAWSFileList: [],
GLWJLAWSFileList: [],
ssgFileList: [],
zqyjgFileList: [],
jdwjFileList: [],
zbjbdFileList: [],
kwjFileList: [],
glwjFileList: [],
filterText:'',
textStatusMap: {}, // 文本状态id与name对应
standardDrawer: false,
loadSarStandard: false,
verifySarStandard: true,
formTongGuo: {
approvalOpinion: '', // 通过/驳回
commentText: '', // 意见
},
standardSearchForm: {
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
total: 0,
standType: 'INLAND',
standSort: '',
standName: '',
standEnName: '',
standNumber: ''
},
tableData: {
// 标准表格数据
standardData: [],
// 任务分解单数据
taskTableData: []
},
tablePHeight:'',
tableHeight: {
standardTableHeight: null
},
selectedList: [],
standardCheckedList: [],
activeName:'1',
roleRow: {},
commentText: '', // 意见
title: '', // 新增编辑抽屉标题
config: {
attrName : '',
},
dataSource: false,
replaceLawsNumModel: false,
replaceLawType: '',
sarBussionessLawsEO: {
replaceLawsNum: ''
},
// 代替标准号
replaceLawsNumForm: {
lawsNumber:'',
numberName:'',
lawsTextState:'',
dataSource: '',
standNumber: '', // 标准编号
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
total: 0,
standType: 'BUSINESS',
quoteIdList: '',
validFlag: '0',
menuId: 'nomenu'
},
replaceLawsNumRow: [], // 代替政策号 数组内容
replaceTotal: 0,
selectedListRep: [],
replaceLoading: true,
replacePage: 1,
ListModel: false, // 新增编辑抽屉开关
active: '2', // 默认显示
isSubmit: false,
saveLoading: false,
defaultProps: {
children: 'children',
label: 'menuName'
},
defaultCodeProps: {
children: 'children',
label: 'code'
},
defaultModelProps: {
children: 'children',
label: 'model'
},
nodeList: [],
nodeList2: [],
zrType: '',
zrIndex: '',
zrIdList: [],
type: '',
defaultUserProps: {
children: 'children',
label: 'name'
},
key:1,
key1:2,
key2:3,
key3:4,
treeData: [], // 人员数据
modalShowFlag: false, // drawer开关
modalShowRoleFlag: false, // drawer开关
modalShowFlag1: false, // drawer开关
modalShowFlag2: false, // drawer开关
modalShowFlag3: false, // drawer开关
modalShowFlag4: false, // drawer开关
drawerTitle1:'',
multipleFlag2:'',
url:'',
urlChild:'',
drawerModal: false,
drawerTitle: '', //drawer标题
showCheckBox: true, // 树形控件是否展示多选框
nodeKey: 'id',
defaultCheckedKeys: [],
nodeKeyCode: 'code',
nodeKeyModel: 'model',
defaultCheckedKeys1: [],
defaultCheckedKeys2: [],
defaultCheckedKeys3: [],
fileUrl: 'api/att/attFile/uploadNew',
fileMadel: false,
fileType: '',
countryArr:'',
commentCycleDate:'',
form: {
fsRejectStatus:'',
planId:'',
planStatus:'',
reviseStatus:'',
evaluationData:[],
modelData:[],
modelDataNameVerify:[],
modelDataZrUserVerify:[],
// 基础信息
country:[],
// 基础信息
standSort: '',
standCode: '',
standYear: '',
standName: '',
standEnName: '',
textStatusBuss: '',
issueTime: '',
putTime: '',
FZRQBUSS: '',
FSRQBUSS: '',
// 过程稿件
FBGBUSS: '',
FBGBUSSName: '',
BZSMBUSS: '',
BZSMBUSSName: '',
LSBBBUSS: '',
LSBBBUSSName: '',
QTWJBUSS: '',
QTWJBUSSName: '',
// 适用范围
QCDW: '',
QCRBUSS: '',
WJSCRYBUSS: this.$store.getters.userInfo.userId,
WJSCRYBUSSName: this.$store.getters.userInfo.userName,
SYCXCLASS: '',
NYLXCLASS: '',
SYCPXCLASS: '',
TXLBBUSS: '',
VPPSBMBUSS: '',
VPPSCNBUSS: '',
KCVPPSBMBUSS: '',
KCVPPSCNBUSS: '',
CYCVPPSBMBUSS: '',
CYCVPPSCNBUSS: '',
DYBXHBUSS: '',
DYMCBUSS: '',
// 关联信息
DTQBBHBUSS: '',
BDTQBBHBUSS: '',
XGJLBUSS: '',
XGLC: '',
GLWJBUSS: '',
GLWJBUSSName: '',
XCSJBUSS: '',
CYCD:'',
CYBZ:'',
YYBZ:'',
standNum:'',
}, // 标准信息
roleForm:{
hzUserId: this.$store.getters.userInfo.userId,
hzUserName: this.$store.getters.userInfo.userName,
xdUserId: this.$store.getters.userInfo.userId,
xdUserName: this.$store.getters.userInfo.userName,
pxUserId: this.$store.getters.userInfo.userId,
pxUserName: this.$store.getters.userInfo.userName,
fbUserId: '',
fbUserName: '',
qcUserId: '', // 多实例
qcUserName:'', // 多实例
bzhUserId:'',
bzhUserName:'',
hqUserId:'', // 多实例
hqUserName:'', // 多实例
fggcsUserId:'',
fggcsUserName:'',
jsfzrUserId:'',
jsfzrUserName:'',
bzUserId:'',
bzUserName:'',
fzrUserId:'',
fzrUserName:'',
zhrUserId:'',
zhrUserName:'',
zrUserId: '',
zrUserName: '',
jlUserId: '',
jlUserName: '',
applyUpdUserId: this.$store.getters.userInfo.userId,
applyUpdUserName: this.$store.getters.userInfo.userName,
prcCreateUser: this.$store.getters.userInfo.userId,
prcCreateUserName: this.$store.getters.userInfo.userName,
},
modelRules:{
zrUserIdName: [
{ required: true, message: '请选择会签责任人', trigger: 'blur' },
],
modelName: [
{ required: true, message: '选择维护模块名称', trigger: 'blur' },
],
},
showFormRules:{
modelNum: [
{ required: true, message: '请填写条款号', trigger: 'blur' },
],
modelUpdBefore: [
{ required: true, message: '请填写修改前', trigger: 'blur' },
],
modelUpdAfter: [
{ required: true, message: '请填写修改后', trigger: 'blur' },
],
modelContent: [
{ required: true, message: '请填写修改理由', trigger: 'blur' },
],
},
roleRules:{
qcUserName: [
{ required: true, message: '选择其他起草人', trigger: 'blur' },
],
bzhUserName: [
{ required: true, message: '选择标准化员', trigger: 'blur' },
],
hqUserName: [
{ required: true, message: '请选择会签责任人', trigger: 'blur' },
],
fggcsUserName: [
{ required: true, message: '选择技术委员会负责刃/起草中心主任', trigger: 'blur' },
],
jsfzrUserName: [
{ required: true, message: '选择技术委员会负责人/起草中心主任', trigger: 'blur' },
],
bzUserName: [
{ required: true, message: '选择标准法规部部长', trigger: 'blur' },
],
fzrUserName: [
{ required: true, message: '选择专委会副主任/起草单位中心主任', trigger: 'blur' },
],
zhrUserName: [
{ required: true, message: '选择专委会主任/总院院长或主管副院长', trigger: 'blur' },
],
},
rules:{
scoreNot:[
{required: false, validator: numberCodeNot, trigger: 'blur'},
],
score: [
{required: true, validator: numberCode, trigger: 'blur'},
{ type: 'number',min: 0, max: 10, message: '分值 0 ~ 10 分 ', trigger: 'blur' },
],
reason: [{ required: true, message: '请填写扣分理由', trigger: 'blur' }],
reasonNot:[],
// commentText: [{ required: true, message: '请输入意见', trigger: 'blur' }],
approvalOpinion: [{ required: true, message: '请选择审批意见', trigger: 'change' }],
zrUserIdName: [
{ required: true, message: '请选择会签责任人', validator: validateZrUserIdName,trigger: 'blur' },
],
modelName: [
{ required: true, message: '选择维护模块名称', validator: validateModelName,trigger: 'blur' },
],
standSort: [
{ required: true, message: '请选择企标类别', trigger: 'change' }
],
standNumber: [
{ required: true, message: '请输入企标编号', trigger: 'blur' },
{ min: 1, max: 100, message: '长度在 1 到 100 个字符', trigger: 'blur' },
],
standYear: [
{ required: true, message: '请输入标准年份'},
{ min: 1, max: 100, message: '长度在 1 到 100 个字符', trigger: 'blur' },
],
standName: [
{ required: true, message: '请输入企标中文名称', trigger: 'blur' },
{ min: 1, max: 100, message: '长度在 1 到 100 个字符', trigger: 'blur' },
// {validator: this.verify.checkSpecialCharacterOftags, trigger: 'change'}
],
standEnName: [
{ required: false, message: '请输入企标英文名称', trigger: 'blur' },
{ min: 1, max: 200, message: '长度在 1 到 200 个字符', trigger: 'blur' },
{validator: this.verify.valiateEnName, trigger: 'change'}
],
textStatusBuss: [
{ required: true, message: '请选择文本状态', trigger: 'change' }
],
issueTime: [
{ required: false, message: '请选择企标发布日期', trigger: 'change'}
],
// putTime: [
// { required: true, message: '请选择企标实施日期', trigger: 'change' }
// ],
FBGBUSSName: [
{ required: true, message: '请上传发布稿',validator: validateFBGBUSS, trigger: 'blur' }
],
BZSMBUSSName: [
{ required: true, message: '请上传编制说明',validator: validateBZSMBUSS, trigger: 'blur' }
],
QCDW: [
{ required: true, message: '请选择起草部门', trigger: 'change' }
],
QCRBUSS: [
{ required: true, message: '请选择起草人', trigger: 'change' }
],
},
zrUserIds: [], // 选择多个会签责任人
userType:'', // 选择用户ID判断
countryOptions:[],//国家地区
standSortOptions: [], // 标准类别
standNatureOptions: [], // 标准性质
standStateOptions: [], // 文本状态
standSystemOptions: [], // 标准体系
busVppsOptions: [], // 车系体系架构
busVppsChildOptions: [], // 车系体系架构子集合
modelOptions: [], // 模块体系架构
modelChildOptions: [], // 模块体系架构子集合
applyArcticOptions: [], // 适用车型
gkglbmOptions: [], // 归口管理部门
categoryOptions: [], // 能源类型
applyAuthOptions: [], // 适用认证
cysdOptions: [], // 我司参与深度
cbcdOptions: [], // 采标程度
wssmrOptions: [], // 我司署名人
sycpxOptions: [], // 适用产品线
zrbmOptions: [], // 责任部门
zrgcsOptions: [], // 责任工程师
qcdwOption: [], // 起草单位
txlbOptions: [], // 体系类别
standSortConfigOptions: [], // 标准类别下拉框
adoptExtentOptions: [], // 采标程度下拉框
emergyKindOptions: [], // 能源种类下拉框
categoryConfigOptions: [], // 所属类别下拉框
assemClassOptions: [], // 总成分类下拉框
qcdwOptions:[],//起草单位下拉框
qcrOptions:[],//起草人下拉框
nylxOptions:[],//能源类型下拉框
syrzOptions:[],//适用认证下拉框
data: [], // 标准列表数据
ListForm: {}, // 新增数据
opinionDialogVisible: false
}
},
watch:{
'form.issueTime': {
handler: function() {
if(this.form.issueTime !== undefined && this.form.issueTime !== null && this.form.issueTime !== ''){
let date = new Date(this.$moment(this.form.issueTime).format('YYYY-MM-DD'))
// const FSRQBUSS = date.getFullYear()+ 5 + '-' + date.getMonth() + '-' + date.getDate()
// this.sarBussionessStandEO["FSRQBUSS"] = FSRQBUSS
let year = date.getFullYear()+5;
let month =(date.getMonth() + 1).toString();
let day = (date.getDate()).toString();
if (month.length == 1) {
month = "0" + month;
}
if (day.length == 1) {
day = "0" + day;
}
const FSRQBUSS = year + "-" + month + "-" + day;
this.form["FSRQBUSS"] = FSRQBUSS
}
},
},
'form.country': {
handler (val) {
if (val !== '' && val !== null && typeof (val) !== 'undefined') {
if (val instanceof Array) {
this.countryArr = val.join(",");
} else {
this.countryArr = val
}
} else if (val === '') {
this.countryArr = []
}
}
},
filterText(val) {
this.$refs.tree.filter(val);
},
},
computed: {
listNoDataText () {
return this.processType === 1 ? '暂无待办流程' : '暂无已办流程'
},
},
methods: {
emitDataLoading(boo){
this.dataLoading = boo
},
previewShow(attId, label) {
this.iframeLoading = true
return new Promise((resolve, reject) => {
if(attId.indexOf('ATT_FILE') === 0){
getBusStandFileByAttId({
attId
}).then(res => {
if(res){
const history = res;
const editFileInfo = res.data
if(editFileInfo.fileSuffix.toLowerCase() === 'pdg'){
this.iframeUrl = 'book://ssreader/e0?url='+editFileInfo.downLoadUrl
}else if(editFileInfo.fileSuffix.toLowerCase() === 'pdf'){
this.iframeUrl = './static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id)
}else {
const nowTime = new Date().getTime()
// window.open(onlyOfficeUrl+'/onlyOffice?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName)
this.iframeUrl = kkFileViewUrl+'/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl)) + '&watermarkTxt=' + encodeURIComponent(this.$store.getters.userInfo.userName) +'&office.preview.type=pdf';
}
this.iframeLoading = false
this.$forceUpdate()
resolve(history)
}
}).catch(e => {
})
}else{
processEditFile({
id:attId
}).then(res => {
if(res){
// const editFileInfo = res
// const showName = label
// const editFilePath = editFileInfo.editFilePath.split("/")
// editFileInfo.filePath = editFilePath[0]+'/'+editFilePath[1]+'/'
// editFileInfo.fileName = editFilePath[2]
// if(editFileInfo.pid){
// editFileInfo.pId = editFileInfo.pid
// }
// editFileInfo.fileSuffix = 'docx'
// const nowTime = new Date().getTime()
// this.iframeUrl = onlyOfficeUrl+'/onlyOffice?oldFileName=' + showName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName
// this.iframeLoading = false
const editFileInfo = res
const _index = editFileInfo.downLoadUrl.lastIndexOf('.')
editFileInfo.fileSuffix = editFileInfo.downLoadUrl.slice(_index + 1)
if(editFileInfo.fileSuffix.toLowerCase() === 'pdg'){
this.iframeUrl = 'book://ssreader/e0?url='+editFileInfo.downLoadUrl
}else if(editFileInfo.fileSuffix.toLowerCase() === 'pdf'){
this.iframeUrl = './static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id)
}else {
const nowTime = new Date().getTime()
this.iframeUrl = kkFileViewUrl+'/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl)) + '&watermarkTxt=' + encodeURIComponent(this.$store.getters.userInfo.userName) +'&office.preview.type=pdf';
}
this.iframeLoading = false
resolve(res)
}
}).catch(e => {
})
// return
// axios({
// url: 'api/lawss/activiti/selectOnlineFile',
// method: 'get',
// params: attId
// }).then(res=>{
// if(res){
// const history = res;
// const editFileInfo = res.data
// if(editFileInfo.fileSuffix.toLowerCase() === 'pdg'){
// this.iframeUrl = 'book://ssreader/e0?url='+editFileInfo.downLoadUrl
// }else if(editFileInfo.fileSuffix.toLowerCase() === 'pdf'){
// this.iframeUrl = './static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id)
// }else {
// const nowTime = new Date().getTime()
// // window.open(onlyOfficeUrl+'/onlyOffice?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName)
// this.iframeUrl = kkFileViewUrl+'/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl))+'&office.preview.type=pdf';
// // onlyOfficeUrl+'/editor?fileId='+editFileInfo.id+'&pid='+editFileInfo.pId+'&taskIds='+editFileInfo.taskId+'&editType='+editFileInfo.editType+'&oldFileName=' + showName + '&fileType=' + 'docx' + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id +'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName+'&userId='+editFileInfo.userId+'&userName='+editFileInfo.userName
// }
// this.iframeLoading = false
// this.$forceUpdate()
// resolve(history)
// }
// }).catch(e=>{
// console.log(e);
// })
}
})
},
previewIframe(targetName, action){
let attId = targetName.name
this.iframeUrl = ""
this.previewShow(attId, targetName.label)
},
showDrawerClose () {
this.showForm.modelNum = ""
this.showForm.modelUpdBefore = ""
this.showForm.modelUpdAfter = ""
this.showForm.modelContent = ""
this.showDrawer = false
},
filterData2(){
let spanOneArr = []
let concatOne = 0
this.form.evaluationData.forEach((item,index)=>{//循环后端查询出来的数据(orderdata)
if(index === 0){
spanOneArr.push(1)
}else{
//name 修改
if(item.twoIndexTitle === this.form.evaluationData[index - 1].twoIndexTitle){ //第一列需合并相同内容的字段
spanOneArr[concatOne] += 1
spanOneArr.push(0)
}else{
spanOneArr.push(1)
concatOne = index
}
}
})
return {
one: spanOneArr,
}
},
setScoreMin(row){
return row.scoreMin = ((row.score === undefined || row.score === '') ? '' : row.valueType === 'add' ? row.score : (row.score / 10).toFixed(1))
},
getSummaries(param) {
console.log(param)
const { columns, data } = param;
const sums = [];
console.log(columns)
columns.forEach((column, index) => {
if (index === 3) {
sums[index] = '合计:';
return;
}else if(index === 6){
sums[index] = '';
return;
}
const values = data.map(item => Number(item[column.property]));
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
sums[index] += ' ';
} else {
sums[index] = '';
}
if(sums[index] !== '' && sums[index].indexOf(".") !== -1){
sums[index] = parseFloat(sums[index]).toFixed(1);
}
});
if(this.form.evaluationData && this.form.evaluationData.length > 0){
this.form.evaluationData[0].sum = sums[4]
}
return sums;
},
objectSpanMethod({ row, column, rowIndex, columnIndex },value) {
if (columnIndex === 0) {
if (rowIndex === 0) {
return {
rowspan: value.length,
colspan: 1
};
} else {
return {
rowspan: 0,
colspan: 0
};
}
}else if(columnIndex === 1 ) {
const _row = (this.filterData2(this.form.evaluationData).one)[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}
},
modelProp(row,index){
console.log(row)
console.log(index)
if(row.pid === '0'){
console.log('modelData.' + index + '.modelName')
return 'modelData.' + index + '.modelName';
}else {
let propStr = "";
const indexList = row.modelIndex.split(",");
for (let i = 0; i < indexList.length; i++) {
if(i === 0){
propStr += 'modelData.' + indexList[i]
}else{
propStr += '.children.' + indexList[i]
}
}
console.log(propStr + '.modelName')
return propStr + '.modelName';
}
},
modelNameFunc(row){
if(row.modelName && row.modelName !== ''){
row.disabled = true
}
},
modelNameFunc1(row){
if(row.modelUpdateBefore && row.modelUpdateBefore !== ''){
row.disabled1 = true
}
},
modelNameFunc2(row){
if(row.modelUpdateAfter && row.modelUpdateAfter !== ''){
row.disabled2 = true
}
},
//判断是否可选
checkSelect (row,index) {
let isChecked = true;
if (row.pid !== '0') { // 判断里面是否存在某个参数
isChecked = false
} else {
isChecked = true
}
return isChecked
},
handleDelete(val, row) {
// 模态框删除按钮
this.$confirm("是否确认删除本条数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "info"
}).then(() => {
// 此为假删除,只是删除了模态框中当前行的数据,并没有真正删除表格数据
// const ids = []
// ids.push(row.id)
// this.form.modelData = this.changeRestTree(this.deletedId(this.form.modelData,ids))
this.form.modelData.splice(val,1)
this.$message({
message: "删除成功",
type: "success",
duration: 2000
});
this.$forceUpdate()
});
},
handleSelectionChange(val) {
this.zrIdList = []
val.forEach(item => {
this.zrIdList.push(item.id)
})
},
createRowSubmit(){
this.$refs['showForm'].validate((valid) => {
if (valid) {
const list = {
modelNum: this.showForm.modelNum,
modelUpdBefore: this.showForm.modelUpdBefore,
modelUpdAfter: this.showForm.modelUpdAfter,
modelContent: this.showForm.modelContent,
zrUserId:this.$store.getters.userInfo.userId,
zrUserIdName:this.$store.getters.userInfo.userName,
zrDeptId:this.$store.getters.userInfo.institutionId,
zrDeptIdName:this.$store.getters.userInfo.institutionName,
children:[],
};
if(!this.form.modelData){
this.form.modelData = []
}
this.form.modelData.push(list);
this.$message.success("新增成功")
this.showForm.modelNum = ""
this.showForm.modelUpdBefore = ""
this.showForm.modelUpdAfter = ""
this.showForm.modelContent = ""
}
})
},
createRow() {
// 创建行
// if (this.diaTable.length >= 6) { // 判断当前表格是否可继续创建
// this.$message({
// message: "超出数量无法创建",
// type: "info",
// duration: 2000
// });
// return false;
// }
if(this.FBGBUSSFileList.length > 0){
this.editableTabsValue = this.FBGBUSSFileList[0].id
this.previewShow(this.FBGBUSSFileList[0].id, this.FBGBUSSFileList[0].name)
}
this.showDrawer = true
this.showDrawerTitle = "新增征求意见"
// const list = {
// id: this.form.modelData.length + 1,
// modelNum: '',
// orderNum: this.form.modelData.length + 1, // orderNum为新创建行的索引
// pid: '0',
// modelIndex: this.form.modelData.length,
// disabled1: false,
// disabled2: false,
// modelName: "",
// modelUpdBefore: "",
// modelUpdAfter: "",
// modelContent: "",
// zrUserId:this.$store.getters.userInfo.userId,
// zrUserIdName:this.$store.getters.userInfo.userName,
// zrDeptId:this.$store.getters.userInfo.institutionId,
// zrDeptIdName:this.$store.getters.userInfo.institutionName,
// children:[],
// };
// this.form.modelData.push(list);
},
// createRow() {
// // 创建行
// // if (this.diaTable.length >= 6) { // 判断当前表格是否可继续创建
// // this.$message({
// // message: "超出数量无法创建",
// // type: "info",
// // duration: 2000
// // });
// // return false;
// // }
// const list = {
// id: this.form.modelData.length + 1,
// modelNum: this.form.modelData.length + 1+'',
// orderNum: this.form.modelData.length + 1, // orderNum为新创建行的索引
// pid: '0',
// modelIndex: this.form.modelData.length,
// disabled1: false,
// disabled2: false,
// modelName: "",
// modelUpdBefore: "",
// modelUpdAfter: "",
// modelContent: "",
// zrUserId:this.$store.getters.userInfo.userId,
// zrUserIdName:this.$store.getters.userInfo.userName,
// zrDeptId:this.$store.getters.userInfo.institutionId,
// zrDeptIdName:this.$store.getters.userInfo.institutionName,
// children:[],
// };
// this.form.modelData.push(list);
// },
createChildRow(index,row) {
// 创建行
// if (this.diaTable.length >= 6) { // 判断当前表格是否可继续创建
// this.$message({
// message: "超出数量无法创建",
// type: "info",
// duration: 2000
// });
// return false;
// }
const list = {
id: row.modelNum+'.'+(row.children.length + 1),
modelNum: row.modelNum+'.'+(row.children.length + 1),
orderNum: row.children.length + 1, // orderNum为新创建行的索引
pid: row.modelNum,
modelIndex: row.children.length,
disabled1: false,
disabled2: false,
modelName: "",
modelUpdBefore: "",
modelUpdAfter: "",
modelContent: "",
zrUserId:this.$store.getters.userInfo.userId,
zrUserIdName:this.$store.getters.userInfo.userName,
zrDeptId:this.$store.getters.userInfo.institutionId,
zrDeptIdName:this.$store.getters.userInfo.institutionName,
children:[],
};
// row.children.push(list)
row.push(list)
},
dateFormatter () {
//默认返回yyyy-MM-dd HH-mm-ss
const d = new Date();
const year = d.getFullYear();//得到年
const month = (d.getMonth()+1)<10 ? '0'+(d.getMonth()+1) : (d.getMonth()+1);//得到月
const day = d.getDate()<10 ? '0'+d.getDate() : d.getDate();//得到日
const hour = d.getHours()<10 ? '0'+d.getHours() : d.getHours();//得到时
const minute = d.getMinutes()<10 ? '0'+d.getMinutes() : d.getMinutes();//得到分
const second = d.getSeconds()<10 ? '0'+d.getSeconds() : d.getSeconds();//得到秒
return [year, month, day].join('-') + " " + [hour, minute, second].join(':');//格式为:YY-MM-DD hh:mm:ss(当前时间)
},
// choiceZRRS () {
// if (this.userType === 'zrUserId') {
// this.roleForm.zrUserId = this.zrUserIds.map(item => item.id).join(",")
// this.roleForm.zrUserName = this.zrUserIds.map(item => item.name).join(",")
// }
// this.modalshowflag2 = true
// },
checkedRole2 (data) {
let idList = ''
let nameList = ''
data.forEach( item => {
if (nameList.length > 0) {
nameList += ','
idList += ','
}
idList += item.id
nameList += item.name
})
if(this.userType === 'qcUserId'){
this.roleForm.qcUserId=idList;
this.roleForm.qcUserName=nameList;
}else if(this.userType === 'hqUserId'){
this.roleForm.hqUserId=idList;
this.roleForm.hqUserName=nameList;
}
},
checkedRoleTransfer (data) {
this.isSubmit = true
this.saveLoading = true
changeAssigneeNew({
taskId: this.$route.query.taskIds, // 任务id
userId:this.$store.getters.userInfo.userId, // 委托人
assignee: data[0].id, // 被委托人
pId: this.$route.query.prcId, // 流程实例
}).then(res => {
this.isSubmit = false
this.saveLoading = false
if (res.success) {
this.drawerModal = false
this.$message.success('调整成功')
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
this.processNum()
} else {
this.$message.warning(res.message)
}
})
},
checkedRole (data) {
if (this.type === 0) {
this.roleForm.deptUserId = data[0].id
this.roleForm.deptUserIdName = data[0].name
} else if (this.type === 1) {
this.form.modelData[this.zrIndex].zrUserId = data[0].id
this.form.modelData[this.zrIndex].zrUserIdName = data[0].name
} else {
this.form.modelData.forEach(item => {
this.zrIdList.forEach(items => {
if (item.id === items) {
item.zrUserId = data[0].id
item.zrUserIdName = data[0].name
}
})
})
}
if(this.userType === 'bzhUserId'){
this.roleForm.bzhUserId = data[0].id
this.roleForm.bzhUserName = data[0].name
}else if(this.userType === 'fggcsUserId'){
this.roleForm.fggcsUserId = data[0].id
this.roleForm.fggcsUserName = data[0].name
}else if(this.userType === 'jsfzrUserId'){
this.roleForm.jsfzrUserId = data[0].id
this.roleForm.jsfzrUserName = data[0].name
}else if(this.userType === 'bzUserId'){
this.roleForm.bzUserId = data[0].id
this.roleForm.bzUserName = data[0].name
}else if(this.userType === 'fzrUserId'){
this.roleForm.fzrUserId = data[0].id
this.roleForm.fzrUserName = data[0].name
}else if(this.userType === 'zhrUserId'){
this.roleForm.zhrUserId = data[0].id
this.roleForm.zhrUserName = data[0].name
}
this.modalShowFlag = false
},
// 责任人会签姓名搜索
filterNode(value, data) {
if (!value) return true;
return data.name.indexOf(value) !== -1;
},
getTaskId (mesg) {
this.form = mesg.form
this.form.date = new Date(this.$moment(mesg.form.date).format('YYYY-MM-DD'))
// this.getEvaluation()
this.form['SYCXCLASS'] = this.filterObj(this.form['SYCXCLASS'])
this.form['NYLXCLASS'] = this.filterObj(this.form['NYLXCLASS'])
this.form['SYCPXCLASS'] = this.filterObj(this.form['SYCPXCLASS'])
this.FBGBUSSFileList=this.assemble(this.form.FBGBUSS,this.form.FBGBUSSName);
this.BZSMBUSSFileList=this.assemble(this.form.BZSMBUSS,this.form.BZSMBUSSName);
this.LSBBBUSSFileList=this.assemble(this.form.LSBBBUSS,this.form.LSBBBUSSName);
this.QTWJBUSSFileList=this.assemble(this.form.QTWJBUSS,this.form.QTWJBUSSName);
this.GLWJBUSSFileList=this.assemble(this.form.GLWJBUSS,this.form.GLWJBUSSName);
this.summaryList=this.assemble(mesg.summary,mesg.summaryName);
this.roleForm = mesg.roleForm
this.formTongGuo.commentText = mesg.commentText
},
// 将文本状态的id与name对应
setMap(data){
data.forEach(item => {
this.$set(this.textStatusMap, item.value, item.label)
})
},
clearFormData(data){
this.form = {
// 基础信息
standInData: data.standInData ? data.standInData : '0', // 标准类型
standSort: data.standSort ? data.standSort : '', // 标准类别
standNumber: data.standNumber ? data.standNumber : '', // 标准编号
standNature: data.standNature ? data.standNature : '', // 标准性质
standEnName: data.standEnName ? data.standEnName : '', // 英文名称
standName: data.standName ? data.standName : '', // 中文名称
signFlag: data.signFlag ? data.signFlag : '1', // 是否需要会签
// 基础信息
standCode: '',
standYear: '',
textStatusBuss: '',
issueTime: '',
putTime: '',
FZRQBUSS: '',
FSRQBUSS: '',
// 过程稿件
FBGBUSS: '',
FBGBUSSName: '',
BZSMBUSS: '',
BZSMBUSSName: '',
LSBBBUSS: '',
LSBBBUSSName: '',
QTWJBUSS: '',
QTWJBUSSName: '',
// 适用范围
QCDW: '',
QCRBUSS: '',
WJSCRYBUSS: '',
SYCXCLASS: '',
NYLXCLASS: '',
SYCPXCLASS: '',
TXLBBUSS: '',
VPPSBMBUSS: '',
VPPSCNBUSS: '',
// 关联信息
DTQBBHBUSS: '',
BDTQBBHBUSS: '',
XGJLBUSS: '',
XGLC: '',
GLWJBUSS: '',
GLWJBUSSName: '',
XCSJBUSS: '',
} // 标准信息
},
handleProcessStandardNext(status) {
switch (status) {
// 新增
case 1:
this.selectedList = []
this.standardCheckedList = []
this.standardDrawer = false
this.verifySarStandard = true
this.clearFormData(this.form)
break
// 带入
case 2:
if (this.standardCheckedList.length === 1) {
this.$http.get('lawss/sarLawsInfo/getStandInfoUpdateById', {id: this.standardCheckedList[0].id}, {
_this: this
}, res => {
if(res && res.data){
const bringData = res.data
const json = Object.assign(bringData, bringData.attrInfoMap);
this.form = JSON.parse(JSON.stringify(json))
this.form.TGRLAWS = JSON.parse(JSON.stringify(json)).TGRLAWS && JSON.parse(JSON.stringify(json)).TGRLAWS !== '[]' ? JSON.parse(JSON.stringify(json)).TGRLAWS.split(',') : []
this.form.TGDWLAWS = JSON.parse(JSON.stringify(json)).TGDWLAWS && JSON.parse(JSON.stringify(json)).TGDWLAWS !== '[]' ? JSON.parse(JSON.stringify(json)).TGDWLAWS.split(',') : []
this.form.NYLXLAWS = JSON.parse(JSON.stringify(json)).NYLXLAWS && JSON.parse(JSON.stringify(json)).NYLXLAWS !== '[]' ? JSON.parse(JSON.stringify(json)).NYLXLAWS.split(',') : []
this.form.YYRZLAWS = JSON.parse(JSON.stringify(json)).YYRZLAWS && JSON.parse(JSON.stringify(json)).YYRZLAWS !== '[]' ? JSON.parse(JSON.stringify(json)).YYRZLAWS.split(',') : []
this.form.ZRBMLAWS = JSON.parse(JSON.stringify(json)).ZRBMLAWS && JSON.parse(JSON.stringify(json)).ZRBMLAWS !== '[]' ? JSON.parse(JSON.stringify(json)).ZRBMLAWS.split(',') : []
this.form.ZRGCSLAWS = JSON.parse(JSON.stringify(json)).ZRGCSLAWS && JSON.parse(JSON.stringify(json)).ZRGCSLAWS !== '[]' ? JSON.parse(JSON.stringify(json)).ZRGCSLAWS.split(',') : []
this.form.prcNum = this.prcNum
this.form.prcName = this.prcName
this.form['id'] = bringData.id
this.standardDrawer = false
this.verifySarStandard = true
this.busVsFunc()
this.modelFunc()
this.$forceUpdate()
}
// 遍历对象初始化文件信息
for(const p in this.form) {
if (typeof (this.form[p ]) != "function") {
this.initializeFileList(p,this.form[p]);
}
}
console.log("res",res);
})
} else if (this.standardCheckedList.length > 1) {
this.$message.warning('最多可以带入一条政策信息')
} else {
this.$message.warning('请选择要带入的政策信息')
}
break
// 取消
case 3:
this.selectedList = []
this.standardCheckedList = []
this.standardDrawer = false
break
}
},
initializeFileList(property ,value){
switch (property){
case 'xgd':
this.getFileList(value,this.xgdFileList);
break;
case 'fbgbjbd':
this.getFileList(value,this.FBGBJBDFileList);
break;
case 'ssg':
this.getFileList(value,this.ssgFileList);
break;
case 'ca':
this.getFileList(value,this.caFileList);
break;
case 'zbjbd':
this.getFileList(value,this.zbjbdFileList);
break;
case 'kwj':
this.getFileList(value,this.kwjFileList);
break;
case 'jdwj':
this.getFileList(value,this.jdwjFileList);
break;
case 'bpg':
this.getFileList(value,this.bpgFileList);
break;
case 'zqyjg':
this.getFileList(value,this.zqyjgFileList);
break;
case 'glwj':
this.getFileList(value,this.glwjFileList);
break;
default: ;
}
},getFileList(fileIds,defaultFileList){
// 对象为引用传递
this.$http.get('att/attFile/getMultiFileInfos', {
fileIds: fileIds
}, {
_this: this
}, res => {
let fileList = res.data
if (fileList != null && fileList.length > 0) {
for (let i = 0; i < fileList.length; i++) {
let obj = {name: '', response: {}}
obj.name = fileList[i].oldFileName
obj.response.data = fileList[i]
//根据以‘,’分割的id查询到的文件信息,放入对应的文件list中
defaultFileList.push(obj)
console.log("defaultFileList",defaultFileList);
}
}
}, e => {
})
},
handleStandardPageChange (page) {
this.standardSearchForm.page = page
this.handleSearchStandard()
},
handleStandardPageSizeChange (pageSize) {
this.standardSearchForm.pageSize = pageSize
this.handleSearchStandard()
},
standSelectChange (data) {
this.selectedList = []
for (let i = 0; i < data.length; i++) {
this.selectedList.push(data[i].id)
}
this.standardCheckedList = data
},
handleResetSearch() {
this.standardSearchForm.standType = 'BUSINESS'
this.standardSearchForm.standNumber = ''
this.standardSearchForm.standSort = ''
this.standardSearchForm.standName = ''
this.standardSearchForm.standEnName = ''
setTimeout(() => {
this.handleSearchStandard()
}, 100)
},
/**
* 关闭修订 Drawer 的监听
* @param done
*/
handleReviseDrawerClose (done) {
done()
},
getDomesticStandardTable () {
this.loadSarStandard = true
this.$http.get('lawss/sarLawsInfo/page', this.standardSearchForm, {}, res => {
this.loadSarStandard = false
if (res.ok) {
this.tableData.standardData = res.data.list
this.standardSearchForm.total = res.data.count
}
}, e => {
this.loadSarStandard = false
})
},
handleSearchStandard () {
if (this.form.standType === '') {
this.$message.warning('请选择标准来源')
} else {
this.standardDrawer = true
this.$nextTick(() => {
// 动态设置表格高度
this.tableHeight.standardTableHeight = $('.standard-table-wrap').height()
window.onresize = () => {
this.tableHeight.standardTableHeight = $('.standard-table-wrap').height()
}
})
this.getDomesticStandardTable()
}
},
saveUserInfo () {
this.filterText = ''
if (this.userType === 'zrUserId') {
this.roleForm.zrUserId = this.zrUserIds.map(item => item.id).join(",")
this.roleForm.zrUserName = this.zrUserIds.map(item => item.name).join(",")
} else if (this.userType === 'jlUserId') {
this.roleForm.jlUserId = this.roleRow.id
this.roleForm.jlUserName = this.roleRow.name
}
this.modalShowFlag = false
},
cancelUserInfo () {
this.filterText = ''
this.modalShowFlag = false
},
drawerCheck (data) {
if(this.userType === 'zrUserId'){
if(this.zrUserIds.length > 0){
const list = this.zrUserIds.filter ( item => item.id === data.id);
if(list.length === 0){
this.zrUserIds.push(data)
}else {
this.zrUserIds.forEach((item,index) => {
if(item.id === data.id){
this.zrUserIds.splice(index,1)
}
})
}
}else {
this.zrUserIds.push(data)
}
}else {
var getlist = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes());
if(getlist.length == 1) {
this.roleRow = getlist[0]
}else {
this.$refs.tree.setCheckedKeys([data.id]);
this.roleRow = this.$refs.tree.getCheckedNodes()[0]
}
}
},
// 更多
handleCommand (command) {
switch (command[2]) {
case '新增':
this.createChildRow(command[0],command[1])
break
case '维护':
command[1].disabled = false
break
case '删除':
this.handleDelete(command[0],command[1])
break
}
},
choiceZRRList (type, title, id) {
this.nodeList = []
this.nodeList.push(id)
this.userType = type
this.drawerTitle = title
this.modalShowRoleFlag = true
},
choiceZRR (type, title, id) {
this.nodeList = []
this.nodeList.push(id)
this.userType = type
this.drawerTitle = title
this.modalShowFlag = true
},
choiceZRRS(row, type, index) {
this.type = type
if (type === 1) {
this.drawerTitle = '选择责任人'
this.nodeList = []
this.zrIndex = index
this.zrType = type
this.nodeList.push(row)
this.modalShowFlag = true
} else if (type === 2) {
// 批量
if (this.zrIdList.length > 0) {
this.zrType = type
this.nodeList = []
this.modalShowFlag = true
this.drawerTitle = '批量选择责任人'
} else {
this.$message.warning('请选择要编辑的数据')
}
} else {
this.nodeList = []
this.nodeList.push(row)
this.drawerTitle = ''
this.modalShowFlag = true
}
},
// choiceZRRS (type, title, id) {
// this.nodeList = []
// this.nodeList.push(id)
// this.userType = type
// this.drawerTitle = title
// this.modalShowRoleFlag = true
// },
choiceZRR1 (type, title, id) {
this.drawerTitle = title
this.modalShowFlag1 = true
this.key++
},
choiceZRR2 (type, title, id) {
this.drawerTitle = title
this.modalShowFlag2 = true
this.url = ''
this.urlChild = ''
this.url="sarVppsTree/list"
this.urlChild="sarVppsTree/childByList"
this.key1++
},
choiceZRR3 (type, title, id) {
this.drawerTitle = title
this.modalShowFlag3 = true
this.url = ''
this.urlChild = ''
this.url="sarVppsTree/list"
this.urlChild="sarVppsTree/childByList"
this.key2++
},
choiceZRR4 (type, title, id) {
this.drawerTitle = title
this.modalShowFlag4 = true
this.url = ''
this.urlChild = ''
this.url="sarModelTree/list"
this.urlChild="sarModelTree/childByList"
this.key3++
},
getTree () {
this.$http.get('SarInstitution/institution/institutionAndUser', {}, {}, res=> {
this.treeData = res.data
})
},
// 代替政策号 请求数据
getReplaceLawsNumRowFirst () {
if (this.sarBussionessLawsEO.replaceLawsNum !== null && this.sarBussionessLawsEO.replaceLawsNum !== '') {
this.replaceLawsNumForm.quoteIdList = this.quoteIdList1.toString() === '' ? '' : this.quoteIdList1
} else {
this.quoteIdList1 = []
this.replaceLawsNumForm.quoteIdList = ''
}
this.replaceLawsNumForm.page = 1
this.replacePage = 1
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 => {
})
},
dataSourceChange (val) {
},
handleChange (event) {
// const value = event.target.value
const value = event
this.$emit('input', value)
if (value.length==1000){
return this.$message({
message: '相关标准不能输入超过1000个字符',
type: 'warning'
});
}
},
// 代替政策编号-取消
replaceLawsNumModelCancel () {
// this.replaceLawsNumModel = false
this.$refs.selections.clearSelection()
},
// 代替政策号 table选择事件
selectReplaceStandNumRowChange (row) {
this.selectedListRep = row
},
// 代替政策分页
pageChangeReplace (page) {
this.replacePage = page
this.replaceLawsNumForm.page = page
this.getReplaceLawsNumRow()
},
pageSizeChangeReplace (pageSize) {
// this.replaceRows = pageSize
this.replaceLawsNumForm.pageSize = pageSize
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.standSort !== null ? item.standSort + ' ' + item.standNumber + '-' + item.standYear : item.standNumber + '-' + item.standYear
} 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(',')
// 解决 标准入库流程--圈住的字段,先手动输入,然后再手动查找,点提交就会把手动输入的标准号覆盖
if(this.replaceLawType === 'dtbjh'){
this.form.dtbjh = this.form.dtbjh ? this.form.dtbjh + ',' + textArr.join(',') : textArr.join(',')
}else if(this.replaceLawType === 'yybj'){
this.form.yybj = this.form.yybj ? this.form.yybj + ',' +textArr.join(',') : textArr.join(',')
}else if(this.replaceLawType === 'cbbh'){
this.form.cbbh = this.form.cbbh ? this.form.cbbh + ',' +textArr.join(',') : textArr.join(',')
}else if(this.replaceLawType === 'bfbdtbzh'){
this.form.bfbdtbzh = this.form.bfbdtbzh ? this.form.bfbdtbzh + ',' +textArr.join(',') : textArr.join(',')
}else {
this.form.byybj = this.form.byybj ? this.form.byybj + ',' +textArr.join(',') : textArr.join(',')
}
// this.$emit('input', textArr.join(','))
this.$refs.selections.clearSelection()
},
// 点击查看
handlePreview (item) {
let routeUrl = this.$router.resolve({
name: 'OtherLawsStandDetails',
params: {
id: item.id,
pageType: 'LAWS_STAND'
}
})
window.open(routeUrl.href, '_blank')
},
getResetLawsNumRow () {
this.replaceLawsNumForm = {
standNumber: '', // 标准编号
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
total: 0,
standType: 'BUSINESS',
quoteIdList: '',
validFlag: '0'
}
this.getReplaceLawsNumRow()
},
selectLaws (type) {
// if (this.standNumFlag === 1) {
// this.$refs.selections.selectAll(false)
// }
// this.sarBussionessLawsEO.replaceLawsNum = ''
this.replaceLawsNumModel = true
this.replaceLawType = ''
this.replaceLawType = type
this.getReplaceLawsNumRow()
},
// 代替企标编号 请求数据
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 => {
})
},
beginImportFile (file) {
var filename = file.name
var index1 = filename.lastIndexOf('.')
var index2 = filename.length
var fileSuffix = filename.substring(index1, index2)
// const fileSuffix = file.name.split('.')[1] // 后缀名
// 判断上传文件格式
if (fileSuffix === '.pdf' || fileSuffix === '.PDF' || fileSuffix === '.ppt'|| fileSuffix === '.PPT' || fileSuffix === '.pptx'|| fileSuffix === '.PPTX'|| fileSuffix === '.doc' || fileSuffix === '.DOC' || fileSuffix === '.docx' || fileSuffix === '.DOCX' || fileSuffix === '.zip' || fileSuffix === '.xls' || fileSuffix === '.xlsx') {
return true
} else {
this.spinShow = false
this.$message.error('文件' + file.name + '格式不正确,请上传PDF/PPT/PPTX/DOC/DOCX或XLS文件')
return false
}
// 判断文件上传大小
// eslint-disable-next-line no-unreachable
if (file.size / 1024 / 1024 <= 200) {
return true
} else {
this.$message.error('文件' + file.name + '大小不超过200M')
return false
}
return true
},
getBusStandFileByAttId(attId) {
return new Promise((resolve, reject) => {
getBusStandFileByAttId({
attId
}).then(res => {
if (res.ok) {
resolve(res.data)
} else {
reject()
}
}).catch(e => {
reject(e)
})
})
},
handleFilePreview2(file,type) {
let attId = ""
if(file && file.id){
attId = file.id
}else {
attId = file.response.data.id
}
if (type === 'down') {
if (attId) {
window.location.href = '/api/att/attFile/downloadFileForSarNew?fileId=' + attId
} else {
this.$message.warning('文件不存在,下载失败')
}
} else {
this.$preview(attId)
}
},
// 文件预览及下载
handleFilePreview(file) {
const attId = file.response.data.id
if (this.preview) {
if (attId) {
window.location.href = '/api/att/attFile/downloadFileForSarNew?fileId=' + attId
} else {
this.$message.warning('文件不存在,下载失败')
}
} else {
this.getBusStandFileByAttId(attId)
.then(res => {
if(res){
const editFileInfo = res
if(editFileInfo.fileSuffix === 'pdg' || editFileInfo.fileSuffix === 'PDG'){
window.open('book://ssreader/e0?url='+editFileInfo.downLoadUrl)
}else {
const nowTime = new Date().getTime()
// window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl)));
window.open(onlyOfficeUrl+'/onlyOffice?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName)
}
}
}).catch(e => {
console.log(e)
this.$message.warning('文件不存在,预览失败')
})
}
},
// 导入标准数据成功后执行
importFileSuccess (response, file,fileList) {
// 上传成功后判断是否是两条数据是的话替换掉旧数据
// if (fileList.length > 1) {
// fileList = fileList.splice(0, 1)
// }
if (response.ok) {
const fileObj = {}
fileObj.id = file.response.data.id
fileObj.name = file.response.data.name
switch (this.fileType){
case 'FBGBUSS':
this.FBGBUSSFileList = this.FBGBUSSFileList.filter ( item => item.response === undefined);
this.FBGBUSSFileList.push(fileObj)
break;
case 'BZSMBUSS' :
this.BZSMBUSSFileList = this.BZSMBUSSFileList.filter ( item => item.response === undefined);
this.BZSMBUSSFileList.push(fileObj)
break;
case 'LSBBBUSS':
this.LSBBBUSSFileList = this.LSBBBUSSFileList.filter ( item => item.response === undefined);
this.LSBBBUSSFileList.push(fileObj)
break;
case 'GLWJLAWS':
this.GLWJLAWSFileList = this.GLWJLAWSFileList.filter ( item => item.response === undefined);
this.GLWJLAWSFileList.push(fileObj)
break;
case 'GLWJBUSS':
this.GLWJBUSSFileList = this.GLWJBUSSFileList.filter ( item => item.response === undefined);
this.GLWJBUSSFileList.push(fileObj)
break;
case 'summary':
this.summaryList = this.summaryList.filter ( item => item.response === undefined);
this.summaryList.push(fileObj)
break;
default : ;
}
this.$message({
showClose: true,
message: response.message,
type: 'success'
})
}
},
downloadFile (data) {
//文件id中出现了','字符,去除掉
window.location.href = '/api/att/attFile/downloadFileForSarNew?fileId=' + data.id
},
fileUpload (type) {
this.fileType = '';
// this.fileMadel = true;//此句应在最后执行,否则会有先显示没变换的的文件列表,在显示变换了的文件列表
this.fileType = type;
switch (this.fileType){
case 'FBGBUSS':
this.fileList=this.FBGBUSSFileList
break;
case 'BZSMBUSS' :
this.fileList=this.BZSMBUSSFileList
break;
case 'LSBBBUSS':
this.fileList=this.LSBBBUSSFileList
break;
case 'QTWJBUSS':
this.fileList=this.QTWJBUSSFileList
break;
case 'GLWJBUSS':
this.fileList=this.GLWJBUSSFileList
break;
case 'summary':
this.fileList=this.summaryList
break;
default : ;
}
this.fileMadel = true;
},
removeOneFile(file, fileLists) {
const fileList = fileLists.map(item => {
return {
id: item.id || item.response.data.id,
name: item.name || item.response.data.name
}
})
switch (this.fileType){
case 'FBGBUSS':
this.FBGBUSSFileList = fileList
break;
case 'BZSMBUSS' :
this.BZSMBUSSFileList = fileList
break;
case 'LSBBBUSS':
this.LSBBBUSSFileList = fileList
break;
case 'QTWJBUSS':
this.QTWJBUSSFileList = fileList
break;
case 'GLWJBUSS':
this.GLWJBUSSFileList = fileList
break;
case 'summary':
this.summaryList = fileList
break;
default : ;
}
},
popoverHideBusVs (checkedIds, checkedData,isShow,isLoadChild,topId) {
if(checkedData) {
if(checkedData.length > 0){
this.form.VPPSBMBUSS = checkedData.map(item => item.code).join(",")
this.form.VPPSCNBUSS = checkedData.map(item => item.chineseName).join(",")
}else {
this.form.VPPSBMBUSS = checkedData.code
this.form.VPPSCNBUSS = checkedData.chineseName
}
}
this.modalShowFlag2 = false
this.$forceUpdate()
},
popoverHide (checkedIds, checkedData,isShow,isLoadChild,topId) {
if(checkedData) {
if(checkedData.length > 0){
this.form.TXLBBUSS = checkedData.map(item => item.menuName).join(",")
}else {
this.form.TXLBBUSS = checkedData.menuName
}
}
this.modalShowFlag1 = false
this.$forceUpdate()
},
popoverHideCancel(){
this.modalShowFlag1 = false
},
popoverHideBusVs (checkedIds, checkedData,isShow,isLoadChild,topId) {
if(checkedData && checkedData.length != 0) {
if(checkedData.length > 0 && checkedData.length != 0){
this.form.cycvppsbm = checkedData.map(item => item.code).join(",")
this.form.cycvppscn = checkedData.map(item => item.chineseName).join(",")
}else {
this.form.cycvppsbm = checkedData.code
this.form.cycvppscn = checkedData.chineseName
}
this.modalShowFlag2 = false
}
},
popoverHideBusVsCancel(){
this.modalShowFlag2 = false
},
popoverHideCarVs (checkedIds, checkedData,isShow,isLoadChild,topId) {
if(checkedData && checkedData.length != 0) {
if(checkedData.length > 0){
this.form.kccvppsbm = checkedData.map(item => item.code).join(",")
this.form.kccvppscn = checkedData.map(item => item.chineseName).join(",")
}else {
this.form.kccvppsbm = checkedData.code
this.form.kccvppscn = checkedData.chineseName
}
this.modalShowFlag3 = false
}
},
popoverHideCarVsCancel(){
this.modalShowFlag3 = false
},
popoverHideModel (checkedIds, checkedData,isShow,isLoadChild,topId) {
if(checkedData && checkedData.length != 0) {
if(checkedData.length > 0){
this.form.dybxh = checkedData.map(item => item.model).join(",")
this.form.dymc = checkedData.map(item => item.name).join(",")
}else {
this.form.dybxh = checkedData.model
this.form.dymc = checkedData.name
}
this.modalShowFlag4 = false
}
},
popoverHideModelCancel(){
this.modalShowFlag4 = false
},
closeDrawer() {
this.ListModel = false
},
OkDrawer() {
this.ListModel = false
var item = {
remarks: '123'
}
this.data.push(item)
},
addList() {
this.title = '新增标准'
this.ListModel = true
},
handleTabs(name) {
this.active = name
},
handleTransfer() {
this.drawerModal = true
this.drawerTitle = '转办处理人'
},
//保存
handleSave() {
this.form.country=this.countryArr;
// if(item.country !== undefined && item.country !== null){
// this.sarStandardsInfoEO.country = item.country.split(",");
// }
this.summary=this.summaryList.map(item => item.id).join(",")
this.summaryName=this.summaryList.map(item => item.name).join(",")
this.saveLoading = true
let _formData = new FormData()
_formData.append('id', this.bpnId || '')
_formData.append('createUser', this.$store.getters.userInfo.userId)
_formData.append('createUserName', this.$store.getters.userInfo.uName)
_formData.append('taskIds', this.taskIds)
_formData.append('prcType', 'buss1')
_formData.append('prcName', '企标制修订-技术标准')
_formData.append('json', JSON.stringify({
prcNum:this.prcNum,
summary: this.summary,
summaryName: this.summaryName,
taskInfo: this.taskInfo,
form: this.form,
roleForm: this.roleForm,
commentText: this.formTongGuo.commentText
}))
saveTaskForPub(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
this.bpnId = res.result
}).catch(e => {
this.saveLoading = false
})
},
fileInfoHandle(){
//拼接文件名和id 提交到流程Activity
this.form.FBGBUSS=this.FBGBUSSFileList.map(item => item.response.data.id).join(",")
this.form.FBGBUSSName=this.FBGBUSSFileList.map(item => item.name).join(",")
this.form.BZSMBUSS=this.BZSMBUSSFileList.map(item => item.response.data.id).join(",")
this.form.BZSMBUSSName=this.BZSMBUSSFileList.map(item => item.name).join(",")
this.form.LSBBBUSS=this.LSBBBUSSFileList.map(item => item.response.data.id).join(",")
this.form.LSBBBUSSName=this.LSBBBUSSFileList.map(item => item.name).join(",")
this.form.QTWJBUSS=this.QTWJBUSSFileList.map(item => item.response.data.id).join(",")
this.form.QTWJBUSSName=this.QTWJBUSSFileList.map(item => item.name).join(",")
this.form.GLWJBUSS=this.GLWJBUSSFileList.map(item => item.response.data.id).join(",")
this.form.GLWJBUSSName=this.GLWJBUSSFileList.map(item => item.name).join(",")
},
// 删除方法
deletedId(data, ids) {
let m = 0, n = data.length;
for (; m < n; m++) {
let i = 0, j = ids.length;
for (; i <j; i++) {
if (data[m] && data[m].id === ids[i]) {
data.splice(m, 1)
}
}
if (data[m] && data[m].children.length > 0) {
this.deletedId(data[m].children, ids)
}
}
return data
},
changeRestTree(val) {
let arr = [];
if (val.length !== 0) {
val.forEach(item => {
if (item.children.length >= 1) {
item.children = this.changeTree(item.children);
}
if(item.pid === '0'){
item.id = arr.length + 1,
item.modelNum = arr.length + 1+''
item.orderNum = arr.length + 1 // orderNum为新创建行的索引
item.modelIndex = arr.length
}else {
item.id = item.modelNum+'.'+(arr.length + 1)
item.modelNum = item.modelNum+'.'+(arr.length + 1)
item.orderNum = arr.length + 1
item.pid = item.modelNum
item.modelIndex = arr.length
}
arr.push(item);
});
}
return arr;
},
changeTree(val) {
let arr = [];
this.modelDataNameVerify = []
this.modelDataZrUserVerify = []
if (val.length !== 0) {
val.forEach(item => {
let obj = {};
obj.modelName = item.modelName;
obj.zrUserIdName = item.zrUserIdName;
if(!obj.modelName || obj.modelName === ''){
this.modelDataNameVerify.push("1")
}
if(item.pid === '0' && (!obj.zrUserIdName || obj.zrUserIdName === '')){
this.modelDataZrUserVerify.push("1")
}
if (item.children.length >= 1) {
item.children = this.changeTree(item.children);
}
arr.push(item);
});
}
return arr;
},
getRule(){
if (this.formTongGuo.approvalOpinion === 0) {
this.rules.commentText[0].required = false;
this.$refs.formTongGuo.clearValidate('commentText')
}else {
this.rules.commentText[0].required = true;
}
},
handleSubmit() {
// this.getRule()
// const val= this.form.country;
// if (val !== '' && val !== null && typeof (val) !== 'undefined') {
// if (val instanceof Array) {
// this.form.country = val.join(",");
// } else {
// this.form.country = val
// }
// } else if (val === '') {
// this.form.country = []
// }
this.$refs['form'].validate((valid) => {
if (valid) {
this.$refs['formTongGuo'].validate((valid) => {
if (valid) {
if(this.form.modelData === undefined || this.form.modelData.length === 0){
this.opinionDialogVisible = true
}else{
this.commentTextHandle();
}
// this.isSubmit = true
// this.saveLoading = true
//
// this.summary=this.summaryList.map(item => item.id).join(",")
// this.summaryName=this.summaryList.map(item => item.name).join(",")
//
// this.form.commentText = this.formTongGuo.commentText
//
// // this.form.approvalOpinion = this.formTongGuo.approvalOpinion
// // 会签意见存储
// const json = JSON.stringify(this.form);
// this.$http.post('lawss/activiti/completeTask', {
// taskIds: this.taskIds,
// userId : this.userId,
// json: json
// }, {
// _this: this
// }, res => {
// if (res.success) {
// this.$message.success(res.message)
// // 流程提交之后,应该流转至待办任务页面
// this.isSubmit = false
// this.saveLoading = false
// this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
// // if(this.formTongGuo.approvalOpinion === '1'){
// // this.$message.warning("驳回成功")
// // this.isSubmit = false
// // // 流程提交之后,应该流转至待办任务页面
// // this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
// // }else{
// // this.processCreateLaws(json)
// // }
// }else {
// this.$message.success(res.message)
// }
// })
}else {
this.$message.warning('请确认是否填写完整')
}
})
}else {
this.$message.warning('请确认会签评分是否填写完整')
}
})
},
opinionClick(){
this.opinionDialogVisible = false
this.commentTextHandle();
},
commentTextHandle(){
this.isSubmit = true
this.saveLoading = true
this.summary=this.summaryList.map(item => item.id).join(",")
this.summaryName=this.summaryList.map(item => item.name).join(",")
this.form.commentText = this.formTongGuo.commentText
if(!this.form.modelData){
this.form.modelData = []
}
// 会签意见存储
const json = JSON.stringify(this.form);
this.$http.post('lawss/activiti/completeTask', {
taskIds: this.taskIds,
userId : this.userId,
json: json
}, {
_this: this
}, res => {
if (res.success) {
this.$message.success(res.message)
// 流程提交之后,应该流转至待办任务页面
this.isSubmit = false
this.saveLoading = false
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
}else {
this.$message.success(res.message)
}
})
},
busVsFunc(){
this.$http.get('sarVppsTree/list', '', {
_this: this
}, res => {
this.busVppsOptions = []
this.busVppsOptions = res.data
})
},
busVsChildFunc(id){
this.$http.get('sarVppsTree/childByList', {id:id}, {
_this: this
}, res => {
this.busVppsChildOptions = []
this.busVppsChildOptions = res.data
})
},
modelFunc(){
this.$http.get('sarModelTree/list', '', {
_this: this
}, res => {
this.modelOptions = []
this.modelOptions = res.data
})
},
/**
* @description: 动态表单读取
*/
getFormFieldList (item) {
this.$nextTick(() => {
this.form = JSON.parse(JSON.stringify(item))
this.getEvaluation()
this.form.prcNum = this.prcNum
this.form.prcName = this.prcName
this.form['id'] = item.id
this.form['SYCXCLASS'] = this.filterObj(this.form['SYCXCLASS'])
this.form['NYLXCLASS'] = this.filterObj(this.form['NYLXCLASS'])
this.form['SYCPXCLASS'] = this.filterObj(this.form['SYCPXCLASS'])
const dateArr = []
if(item.commentCycleStart && item.commentCycleEnd){
dateArr[0] = item.commentCycleStart
dateArr[1] = item.commentCycleEnd
this.commentCycleDate = dateArr
}
this.FBGBUSSFileList=this.assemble(item.FBGBUSS,item.FBGBUSSName);
this.BZSMBUSSFileList=this.assemble(item.BZSMBUSS,item.BZSMBUSSName);
this.LSBBBUSSFileList=this.assemble(item.LSBBBUSS,item.LSBBBUSSName);
this.QTWJBUSSFileList=this.assemble(item.QTWJBUSS,item.QTWJBUSSName);
this.GLWJBUSSFileList=this.assemble(item.GLWJBUSS,item.GLWJBUSSName);
this.summaryList=this.assemble(item.summary,item.summaryName);
})
},
filterObj(obj){
if(obj && obj !== ''){
if(obj instanceof Array){
return obj;
}else {
return obj.split(",")
}
}
return "";
},
assemble(ids,names){
let list= new Array();
if(ids && ids !== '' && names && names !== ''){
let idArray=ids.split(',');
let nameArray=names.split(',');
for(let i=0; i<idArray.length; i++){
list.push({id:idArray[i],name:nameArray[i]});
}
}
return list;
},
getEvaluation() {
return new Promise((resolve, reject) => {
getEvaluationIndex({
indexType: 'quality'
}).then(res => {
if (res) {
const evalList = []
res.data.forEach(item =>{
item.score = ''
item.scoreMin = ''
item.reason = ''
item.userId = this.userId
item.processNode = this.taskInfo
evalList.push(item)
})
this.form.evaluationData = evalList
this.$forceUpdate()
}
}).catch(e => {
})
})
},
getData() {
if(this.taskIds && this.pId){
return new Promise((resolve, reject) => {
inboundLiaisonDetail({
taskIds: this.taskIds,
pId: this.pId
}).then(res => {
if (res) {
const processForm = JSON.parse(res.mesg)
if (processForm.form === undefined) {
this.getFormFieldList(processForm)
} else {
//表单文件处理
this.getTaskId(processForm)
}
}
}).catch(e => {
})
})
}
},
processTable () {
this.$http.get("lawss/activiti/get_list_by_instance", {
prcNum: this.$route.query.prcNum,
sortWord: this.shunxu ? this.paixu : "",
shunxu: this.shunxu
}, {
loading: "loading",
_this: this
}, res => {
this.detailData = res
}, e => {
})
},
},
mounted () {
// this.getTaskId()
this.getData()
this.processTable()
this.$http.get('sys/dictype/getDicTypeListCode', '', {
_this: this
}, res => {
this.countryOptions = res.data.COUNTRY
this.applyCountryOptions = res.data.COUNTRY
this.regionOptions = res.data.REGION // 区域
this.standStateOptions = res.data.BUSSSTATE
this.energyKindOptions = res.data.ENERGYTYPES
this.standGeneraOptions = res.data.BUSSBIGCLASS
this.standSubclassOptions = res.data.BUSSFINECLASS
this.standSortOptions = res.data.BUSSSTANDCLASS // 标准类别
this.standNatureOptions = res.data.SARPROPERTY // 标准性质
this.standStateOptions = res.data.TEXTSTATUSBUSS // 文本状态
this.standSystemOptions = res.data.TXLBBUSS // 标准体系
this.applyArcticOptions = res.data.ENERGYTYPES // 适用车型
this.categoryOptions = res.data.NYLXCLASS // 能源类型
this.applyAuthOptions = res.data.SYRZCLASS // 适用认证
this.cysdOptions = res.data.WSCYSD // 我司参与深度
this.zrgcsOptions = res.data.ZRGCSCLASS // 责任工程师
this.txlbOptions = res.data.TXLBCLASS // 体系类别
this.qcdwOptions = res.data.QCDW // 起草单位
this.qcrOptions = res.data.QCRBUSS // 起草人
this.nylxOptions = res.data.NYLXCLASS // 能源类型
this.syrzOptions = res.data.SYRZCLASS // 适用认证
this.sycpxOptions = res.data.SYCPXCLASS // 适用产品线
this.zrgcsOptions = res.data.ZRGCSCLASS // 责任工程师
this.zrbmOptions = res.data.ZRBMCLASS // 责任部门
this.gkglbmOptions=res.data.GKGLBM;//归口管理部门
this.setMap(this.standStateOptions)
})
this.tablePHeight = $('.content').height()
window.onresize = () => {
this.tablePHeight = $('.content').height()
}
this.busVsFunc()
this.modelFunc()
}
}
</script>
<style lang="less" scoped>
@import '~@/assets/styles/style';
/deep/ .left {
width: 60%;
height: calc(~'100% - 52px');
}
/deep/ .el-tabs__content{
height: 100% !important;
}
/deep/ .rightDiv {
background: #fff;
width: 40%;
height: 98%;
.height {
margin-bottom: 0;
padding: 10px 20px;
font-size: 18px;
font-weight: bold;
color: #333333;
border-bottom: 1px solid #e5e5e5;
}
.search-area {
height: calc(~'100% - 52px');
overflow: auto;
}
.demo-drawer-footer {
width: 100%;
padding: 0 20px;
height: 50px;
line-height: 50px;
border-top: 1px solid #e8e8e8;
text-align: right;
background: #fff;
z-index: 999;
}
}
/deep/ .column1{
font-size: 18px !important;
}
/deep/ #active1 .el-form-item__content{
margin-left: 0px !important;
}
/deep/ .el-input__suffix{
display: none !important;
}
/deep/ #active2 .el-form-item__content{
margin-left: 0px !important;
}
/deep/ #active3 .el-form-item__content{
margin-left: 0px !important;
}
.bzrkStep1 {
/deep/.el-drawer__container {
.prc-content-border {
border: none;
padding: 0 20px 0;
}
}
position: relative;
height: 100%;
.headerTabs {
height: 52px;
display: flex;
align-items: center;
position: absolute;
top: 0;
right: 10px;
.headerTabsItem {
border: 1px solid #c1c1c1;
padding: 0 5px;
height: 30px;
line-height: 30px;
cursor: pointer;
}
.active {
border: 1px solid #E6A23C;
color: #fff;
background: #E6A23C;
}
}
.content {
display: flex;
flex-direction: column;
justify-content: space-between;
height: calc(~'100% - 103px');
overflow: auto;
.tableTitle {
margin-bottom: 10px;
height: 30px;
line-height: 30px;
position: relative;
font-size: 13px;
font-weight: bold;
.tableButton {
position: absolute;
right: 0;
top: 0;
}
}
}
}
.standard-content {
height: 100%;
padding: 10px 0 0;
.content {
height: 100%;
display: flex;
flex-direction: column;
padding: 0 10px;
.standard-table-wrap {
flex: auto;
overflow-y: auto;
}
.pagination {
position: static;
/deep/ .pagination-slot {
padding: 0;
}
}
}
}
</style>