Files
laws_weilai/jero-web/src/views/projectManagement/components/listOfRegulations.vue
T
范强强 fb45ce36c6 法规清单-撤回不符合的数据进行提示;
法规清单-法规工程师-不填写符合性流程的提示语
2023-03-27 15:32:12 +08:00

2977 lines
106 KiB
Java
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>
<a-card :bordered="false">
<!-- <div class="header-text">-->
<!-- {{ $t('DocumentStandard') }}-->
<!-- </div>-->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('standard')">
<span>{{ $t('standard') }}</span>
</div>
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
v-model="queryParam.serialNumber"></j-input>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('title')">
<span>{{ $t('title') }}</span>
</div>
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
v-model="queryParam.title"></j-input>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('areaOfResponsibility')">
<span>{{ $t('areaOfResponsibility') }}</span>
</div>
<j-multi-select-tag class="box-input" v-model="queryParam.dutyTerritory"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
</div>
</a-col>
<!-- <template v-if="toggleSearchStatus">-->
<!-- <a-col :md="6" :sm="8">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text" :title="$t('listConfirmationStatus')">-->
<!-- <span>{{ $t('listConfirmationStatus') }}</span>-->
<!-- </div>-->
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('listConfirmationStatus')"-->
<!-- class="box-input"-->
<!-- allowClear-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
<!-- v-model="queryParam.inventoryAffirmStatus">-->
<!-- <a-select-option v-for="(item, key) in listOptions"-->
<!-- :key="item.key"-->
<!-- :value="item.value">-->
<!-- <span style="display: inline-block;width: 100%" :title=" item.label ">-->
<!-- {{ item.label }}-->
<!-- </span>-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- <a-col :md="6" :sm="8">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text" :title="$t('taskAffirmStatus')">-->
<!-- <span>{{ $t('taskAffirmStatus') }}</span>-->
<!-- </div>-->
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('taskAffirmStatus')"-->
<!-- class="box-input"-->
<!-- allowClear-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
<!-- v-model="queryParam.taskAffirmStatus">-->
<!-- <a-select-option v-for="(item, key) in taskOptions"-->
<!-- :key="item.key"-->
<!-- :value="item.value">-->
<!-- <span style="display: inline-block;width: 100%" :title=" item.label ">-->
<!-- {{ item.label }}-->
<!-- </span>-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </template>-->
<span style="float: right;overflow: hidden;margin-right: 11px; " class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<globalAdvancedQuery ref="globalAdvancedQueryRef"
@handleSuperQuery="handleSuperQuery"
:fieldList="fieldList"/>
<a-button class="box-button" type="primary" @click="searchQuery">{{ $t('query') }}</a-button>
<a-button class="box-button" style="margin-left: 8px"
@click="searchReset">{{ $t('reset') }}</a-button>
<!-- <a @click="handleToggleSearch" style="margin-left: 8px">-->
<!-- {{ !toggleSearchStatus ? $t('open') : $t('away') }}-->
<!-- <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />-->
<!-- </a>-->
</a-col>
</span>
</a-row>
</a-form>
</div>
<div class="table-operator"
style="overflow:hidden;margin-bottom: 20px">
<div style="float: left;margin-bottom: 0px;margin-left: 20px">
<!-- 调取-->
<div @click="transferClick" class="operator-text" v-if="this.roleSwitchingCode == '0'">
<a-icon type="profile"/>
{{ $t('Transfer') }}
</div>
<!-- 带入相关人员-->
<div class="operator-text" @click="bringInRelevantPersonnelClick" v-if="this.roleSwitchingCode == '0'">
<a-icon type="user"/>
{{ $t('bringInRelevantPersonnel') }}
</div>
<!-- 批量设置-->
<div class="operator-text" @click="batSettingClick"
v-if="this.roleSwitchingCode == '0' || this.roleSwitchingCode == '1'">
<a-icon type="setting"/>
{{ $t('BatchSetting') }}
</div>
<!-- 列表设置-->
<a-popconfirm :visible="customizevisible" overlayClassName="popconfirmmize"
placement="bottomRight" v-if="this.roleSwitchingCode == '0' || this.roleSwitchingCode == '1'">
<template slot="title" id="popconfirmmize">
<div style="max-height:360px;overflow:scroll;overflow-x: auto;">
<a-checkbox
style="margin-bottom: 22px;"
v-if="customizeList && customizeList.length"
v-model="checkAll"
:indeterminate="indeterminate"
@change="onCheckAllChange"
>{{ $t('selectAll') }}
</a-checkbox>
<a-checkbox-group @change="onChange" v-model="checkedList" class="customize-text">
<a-checkbox class="customize-text-title" :disabled="item.disabled" v-for="(item, key) in customizeList"
:key="key" :value="item.field">{{ item.name }}
</a-checkbox>
</a-checkbox-group>
<div class="drawer-bootom-button">
<a-button @click="cancel" style="margin-right: 16px">{{ $t('cancel') }}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{ $t('determine') }}
</a-button>
</div>
</div>
</template>
<div class="operator-text" style="position: relative" @click="getcustomize">
<a-icon type="setting"/>
{{ $t('customize') }}
</div>
</a-popconfirm>
<!-- 更多-->
<a-popconfirm overlayClassName="popconfirm" placement="bottomRight" v-if="this.roleSwitchingCode == '0'">
<template slot="title" id="popconfirm">
<div style="height:320px;overflow:scroll;overflow-x: auto;">
<!-- 添加-->
<div @click="handleAdd" class="operator-text-title">
<a-icon type="plus"/>
{{ $t('add') }}
</div>
<!-- 复制-->
<div @click="copyClick" class="operator-text-title">
<a-icon type="copy"/>
{{ $t('copy') }}
</div>
<!-- 批量删除-->
<div @click="handleDel" class="operator-text-title">
<a-icon type="delete"/>
{{ $t('BatchDelete') }}
</div>
<!-- 模板下载-->
<div @click="handleModule" class="operator-text-title">
<a-icon type="download"/>
{{ $t('templateDownload') }}
</div>
<!-- 导入-->
<div class="operator-text-title">
<ImportFile :url="url" :projectLibraryId=$route.query.id :isTrue="true" :accept="'.zip'"
@getList="getPersonnelList"/>
</div>
<!-- 导出-->
<div @click="handleExport" v-has="'projectLawsInventory:exportData'" class="operator-text-title">
<a-icon type="export" :rotate="-90"/>
{{ $t('export') }}
</div>
<!-- 定版-->
<div class="operator-text-title" @click="fixedPlateClick">
<a-icon type="pushpin"/>
{{ $t('fixedPlate') }}
</div>
<!-- 生成合规报告-->
<div class="operator-text-title" @click="ExportReportClick">
<a-icon type="export" :rotate="-90"/>
{{ $t('compliancereport') }}
</div>
<!-- <div class="operator-text-title" @click="batSettingClick">-->
<!-- <a-icon type="setting" />-->
<!-- {{ $t('batchSettingInformation') }}-->
<!-- </div>-->
<!-- <div class="operator-text-title" @click="batchSettingPersonnelClick">-->
<!-- <a-icon type="setting" />-->
<!-- {{ $t('batchSettingPersonnel') }}-->
<!-- </div>-->
<!-- 流程重置-->
<div class="operator-text-title" @click="alterationClick">
<a-icon type="file-search"/>
{{ $t('processReset') }}
</div>
</div>
</template>
<div class="operator-text" style="position: relative">
<span style="position: absolute;left: -13px;top: -4px">...</span>{{ $t('more') }}
</div>
</a-popconfirm>
</div>
<div style="float: right;margin-top: 1px;;margin-right: 20px">
<!-- <div class="operator-text" @click="customizeClick">-->
<!-- <a-icon type="setting"/>-->
<!-- {{ $t('customize') }}-->
<!-- </div>-->
<div @click="handleExport" v-has="'projectLawsInventory:exportData'"
v-if="this.roleSwitchingCode != '0'"
class="operator-text">
<a-icon type="export" :rotate="-90"/>
{{ $t('export') }}
</div>
<!-- 发布-->
<div class="operator-text" @click="initiateListConfirmationcClick('清单')"
v-if="this.roleSwitchingCode == '0'">
<a-icon type="solution"/>
{{ $t('release') }}
</div>
<!-- 撤回-->
<div class="operator-text" @click="withdrawnClick" v-if="this.roleSwitchingCode == '0'">
<a-icon type="rollback"/>
{{ $t('withdraw') }}
</div>
<!-- 发起任务-->
<div class="operator-text" @click="submitOrSendBackClick(0)" v-if="this.roleSwitchingCode == '1'">
<a-icon type="check-circle"/>
{{ $t('initiateTask') }}
</div>
<!-- 退回-->
<div class="operator-text" @click="submitOrSendBackClick(1)" v-if="this.roleSwitchingCode == '1'">
<a-icon type="close-circle"/>
{{ $t('sendBack') }}
</div>
<!-- 催办-->
<div class="operator-text" @click="questionClick"
v-if="this.roleSwitchingCode == '0' || this.roleSwitchingCode == '1' || this.roleSwitchingCode == '30'">
<a-icon type="sound"/>
{{ $t('question') }}
</div>
</div>
</div>
<div style="width: 100%">
<a-table
ref="table"
:components="drag(columns,'columnsAll')"
class="customizetable"
:loading="loading"
:pagination="false"
:scroll="{x: '100%',y:'calc(100vh - 300px)'}"
rowKey="id"
:data-source="dataSource"
@change="tableOnChange"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:columns="columns"
>
<span slot="operation" slot-scope="text,record">
<a class="text-operation"
v-if="roleSwitchingCode == 0 || roleSwitchingCode == 1"
@click="edit(record)">
{{ $t('edit') }}
</a>
<!-- <a class="text-operation"-->
<!-- v-else-->
<!-- @click="viewClick(record)">-->
<!-- {{ $t('view') }}-->
<!-- </a>-->
<a class="text-operation"
v-if="(
record.verifyFlowStatus == 'List to be released' ||
record.verifyFlowStatus == 'Compliance' ||
record.verifyFlowStatus == 'Non-Compliance' ||
record.verifyFlowStatus == 'To be tracked' ||
record.verifyFlowStatus == 'NA')
&& (record.designFlowStatus == 'List to be released' ||
record.designFlowStatus == 'Compliance' ||
record.designFlowStatus == 'Non-Compliance' ||
record.designFlowStatus == 'To be tracked' ||
record.designFlowStatus == 'NA')
&& roleSwitchingCode == 0"
@click="deleteLib(record)">
{{ $t('deleteLib') }}
</a>
<a class="text-operation"
@click="resultReportedClick(record)">
{{ $t('resultReported') }}
</a>
</span>
<!-- <span slot="operationOne" slot-scope="text,record">-->
<!-- <a class="text-operation"-->
<!-- @click="viewClick(record)">-->
<!-- {{ $t('view') }}-->
<!-- </a>-->
<!-- </span>-->
<span slot="titleName" slot-scope="text,record" :title="text">
<span class="textName">
{{ text }}
</span>
</span>
<span slot="standard" slot-scope="text,record" :title="text">
<a class="textName" @click="standardClick(record)">
{{ text }}
</a>
</span>
<span slot="verifyDeliverableTemplateName" slot-scope="text,result">
<span class="viewFile"
@click="viewFileClick(result.verifyDeliverableTemplate)"
v-if="result.verifyDeliverableTemplate">
{{$t('viewFile')}}
</span>
<span v-else>--</span>
</span>
<span slot="designDeliverableTemplate" slot-scope="text,result">
<span class="viewFile"
@click="viewFileClick(result.designDeliverableTemplate)"
v-if="result.designDeliverableTemplate">
{{$t('viewFile')}}
</span>
<span v-else>--</span>
</span>
<span slot="designFlowStatusName" slot-scope="text,result">
<span v-if="result.designFlowStatus == 'List to be released' ||
result.designFlowStatus == 'List to be checked'"
:title="text">
{{text}}
</span>
<a v-else @click="designFlowStatusClick(result,$t('designComplianceReview'))"
:title="text">{{text}}</a>
</span>
<span slot="verifyFlowStatusName" slot-scope="text,result">
<span v-if="result.verifyFlowStatus == 'List to be released' ||
result.verifyFlowStatus == 'List to be checked'"
:title="text">
{{text}}
</span>
<a v-else @click="designFlowStatusClick(result,$t('verificationComplianceReview'))"
:title="text">{{text}}</a>
</span>
</a-table>
<div class="buttom-box" v-if="dataSource && dataSource.length > 0">
{{ $t('total') + ' ' + this.dataSource.length + ' ' + $t('strip') }}
</div>
</div>
<listAddModel :url="url" @addModelList="addModelList" ref="addModelRef"/>
<listEditModel :url="url" @editModelList="addModelList" ref="editModelRef"/>
<batSetting :url="url" @batSettingList="addModelList" ref="batSettingRef"/>
<transferList :url="url" @transferListForm="transferListForm" ref="transferListRef"/>
<customizeList :url="url" @customizeListForm="customizeListForm" ref="customizeListRef"/>
<transferListvirtal :url="url" @transferListFormHomo="transferListFormHomo" ref="transferListvirtalRef"/>
<fixedPlate @fixedPlateForm="addModelList" ref="fixedPlateRef"/>
<a-modal
:title="listTitle"
:width="500"
:visible="visible"
:confirm-loading="confirmLoading"
:maskClosable="false"
@ok="handleOk"
@cancel="handleCancel"
>
<a-spin :spinning="confirmLoading">
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text-index">
<div class="title-text-index">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('TaskCutOffTime')">{{ $t('TaskCutOffTime') }}</span>
</div>
<a-form-model-item v-if="this.timeName == '清单'" class="itemModel" prop="inventoryAffirmDueDate">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('TaskCutOffTime')"
@change="dateChange({db_field_name:'inventoryAffirmDueDate'})"
format="YYYY-MM-DD"
:disabledDate="disabledDate"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.inventoryAffirmDueDate"
style="width: 100%"/>
</a-form-model-item>
<a-form-model-item v-else-if="this.timeName == '任务'" class="itemModel" prop="taskAffirmDueDate">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('TaskCutOffTime')"
@change="dateChange({db_field_name:'taskAffirmDueDate'})"
format="YYYY-MM-DD"
:disabledDate="disabledDate"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.taskAffirmDueDate"
style="width: 100%"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-spin>
</a-modal>
<a-modal
:title="$t('reasonForReturn')"
:width="500"
:visible="visibleComment"
:confirm-loading="confirmLoadingComment"
:maskClosable="false"
@ok="handleOkComment"
@cancel="handleCancelComment"
>
<a-form-model :model="formInlineComment" class="formAdd" :rules="rulesComment" ref="ruleFormComment">
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text-index">
<div class="title-text-Comment">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('reasonForReturn')">{{ $t('reasonForReturn') }}</span>
</div>
<a-form-model-item class="itemModelComment" :prop="'commentContent'">
<a-textarea
style="width: 100%"
:placeholder="$t('PleaseEnter')+$t('reasonForReturn')"
:disabled="false"
v-model="formInlineComment.commentContent" :rows="4"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-modal>
<a-modal
:title="$t('roleSwitching')"
:width="500"
:visible="visibleRoleSwitching"
:confirm-loading="confirmLoadingRoleSwitching"
:maskClosable="false"
@ok="handleOkRoleSwitching"
@cancel="handleCancelRoleSwitching"
>
<a-form-model :model="formInlineRoleSwitching" class="formAdd" :rules="rulesRoleSwitching"
ref="ruleFormRoleSwitching">
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text-index">
<div class="title-text-Comment">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('roleSwitching')">{{ $t('roleSwitching') }}</span>
</div>
<a-form-model-item class="itemModelComment" :prop="'roleSwitchingCode'">
<a-select allowClear :placeholder="$t('pleaseSelect')+$t('roleSwitching')"
v-model="formInlineRoleSwitching.roleSwitchingCode">
<!-- <a-select-option :value="null">{{$t('pleaseSelect')}}</a-select-option>-->
<a-select-option :value="item.roleCode" v-for="item in roleSwitchingList">
<span class="itemOption-index" :title="item.roleName">
{{ item.roleName }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-modal>
<a-modal
:title="$t('question')"
:width="500"
:visible="visibleQuestion"
:confirm-loading="confirmLoadingQuestion"
:maskClosable="false"
@ok="handleOkQuestion"
@cancel="handleCancelQuestion"
>
<a-form-model :model="formInlineQuestion" class="formAdd" :rules="rulesRoleQuestion"
ref="ruleFormQuestion">
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text-index">
<div class="title-text-Comment">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('expeditionProcess')">{{ $t('expeditionProcess') }}</span>
</div>
<a-form-model-item class="itemModelComment" :prop="'questionStatus'">
<a-select allowClear
:placeholder="$t('pleaseSelect')+$t('expeditionProcess')"
mode="multiple"
v-model="formInlineQuestion.expeditingType">
<a-select-option :value="item.value" v-for="item in questionList">
<span class="itemOption-index" :title="item.name">
{{ item.name }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-modal>
<a-modal
:title="fileTitle"
:width="600"
:visible="visibleFile"
:maskClosable="false"
@cancel="visibleFile = false"
>
<template slot="footer">
<a-button key="back" @click="visibleFile = false">
{{ $t('cancel') }}
</a-button>
</template>
<a-table
class="table"
:columns="columnsFile"
:pagination="false"
:scroll="{x:500,y: 400}"
:data-source="dataSourceFile"
:loading="loading"
>
<span slot="fileOperation" slot-scope="record">
<a class="text" @click="pdfPreview(record)"
:disabled="record.fileSuffix == '.pdf' || record.fileSuffix == '.docx' || record.fileSuffix == '.doc'
|| record.fileSuffix == '.jpg' || record.fileSuffix == '.png' || record.fileSuffix == '.gif'|| record.fileSuffix == '.jpeg'
|| record.fileSuffix == '.xlsx' || record.fileSuffix == '.xls' ? false : true">
{{ $t('See') }}
</a>
<a class="text" @click="download(record)">
{{ $t('download') }}
</a>
</span>
</a-table>
</a-modal>
<JLoading :loading="JLoading">{{ $t('dataLoading') }}</JLoading>
<JLoading :loading="JTextLoading">{{ $t('Submitting') }}</JLoading>
<resultReportedUpload @resultReportedUploadForm="addModelList" ref="resultReportedUploadRef"/>
<listOfRegulationsView ref="listOfRegulationsViewRef"/>
<batchSettingPersonnel :url="url" ref="batchSettingPersonnelRef" @batchSettingPersonnelForm="addModelList"/>
<viewFileModel ref="viewFileModelRef"/>
<designCompliance ref="designComplianceRef"/>
</a-card>
</template>
<script>
import ImportFile from '@/components/ImportFile/index'
import designCompliance from '../../toDoCenter/projectRegulationTasks/components/designCompliance'
import listAddModel from './listAddModel'
import listEditModel from './listEditModel'
import batSetting from './batSetting'
import transferList from './transferList'
import customizeList from './customizeList'
import transferListvirtal from './transferListvirtal'
import fixedPlate from './fixedPlateForm'
import resultReportedUpload from './resultReportedUpload'
import listOfRegulationsView from './listOfRegulationsView'
import viewFileModel from '@/components/viewFileModel/index'
import globalAdvancedQuery from '@/components/globalAdvancedQuery/index'
import batchSettingPersonnel from './batchSettingPersonnel'
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
import moment from 'moment'
import { mapGetters } from 'vuex'
import { Base64 } from 'js-base64'
export default {
name: 'listOfRegulations',
props: ['areaOfResponsibilityList'],
components: {
ImportFile,
listAddModel,
listEditModel,
batSetting,
transferList,
customizeList,
transferListvirtal,
globalAdvancedQuery,
fixedPlate,
resultReportedUpload,
batchSettingPersonnel,
listOfRegulationsView,
viewFileModel,
designCompliance
},
mixins: [ResizeColumnProvide, ResizeHeader],
data() {
return {
toggleSearchStatus: false,
visibleQuestion: false,
confirmLoadingQuestion: false,
roleSwitchingList: [],
formInlineQuestion: {},
rulesRoleQuestion: {
expeditingType: [
{
required: true,
message: this.$t('expeditionProcess') + this.$t('cannotEmpty'),
trigger: 'change'
}
]
},
questionList: [
{
value: 'lawsInventoryDesignExpediting',
name: this.$t('designComplianceProcess')
},
{
value: 'lawsInventoryVerifyExpediting',
name: this.$t('validationComplianceProcess')
}
],
listTitle: '',
orderBy: '1',
orderByField: '',
column: [
{
title: this.$t('standard'),
align: 'left',
dataIndex: 'serialNumber',
width: 180,
fixed: 'left',
sorter: true,
scopedSlots: { customRender: 'standard' }
},
{
title: this.$t('title'),
align: 'left',
dataIndex: 'title',
width: 180,
fixed: 'left',
scopedSlots: { customRender: 'titleName' }
},
{
title: this.$t('subtitle'),
align: 'left',
dataIndex: 'subtitle',
ellipsis: true,
width: 180
},
{
title: this.$t('applicableSupplement'),
align: 'left',
ellipsis: true,
dataIndex: 'applicableSupplement',
width: 180
},
{
title: this.$t('certificationType'),
align: 'left',
ellipsis: true,
dataIndex: 'attestationType_dictText',
width: 180
},
{
title: this.$t('certificationLevel'),
align: 'left',
ellipsis: true,
dataIndex: 'attestationRank_dictText',
width: 180
},
{
title: this.$t('areaOfResponsibility'),
align: 'left',
ellipsis: true,
sorter: true,
dataIndex: 'dutyTerritory_dictText',
width: 180
},
{
title: this.$t('regulatoryEngineer'),
align: 'left',
ellipsis: true,
sorter: true,
dataIndex: 'regulationOwnerName',
width: 180
},
{
title: this.$t('engineeringInterfacePerson'),
align: 'left',
ellipsis: true,
sorter: true,
dataIndex: 'engineeringInterfacePersonName',
width: 180
},
{
title: this.$t('remarks'),
align: 'left',
dataIndex: 'remark',
width: 180,
ellipsis: true
},
{
title: this.$t('confirmationOfDesignConformity'),
children: [
{
title: this.$t('personLiable'),
dataIndex: 'designDutyIdName',
align: 'left',
width: 180,
ellipsis: true
},
{
title: this.$t('TaskCutOffTime'),
dataIndex: 'designDueDate',
align: 'left',
ellipsis: true,
width: 140
},
{
title: this.$t('ProcessStatus'),
dataIndex: 'designFlowStatusName',
align: 'left',
ellipsis: true,
width: 140,
scopedSlots: { customRender: 'designFlowStatusName' }
},
{
title: this.$t('deliverableTemplate'),
dataIndex: 'designDeliverableTemplate',
align: 'left',
width: 180,
ellipsis: true,
scopedSlots: { customRender: 'designDeliverableTemplate' }
}
]
},
{
title: this.$t('verificationAndConformityconfirmation'),
children: [
{
title: this.$t('personLiable'),
dataIndex: 'verifyDutyIdName',
align: 'left',
width: 180,
ellipsis: true
},
{
title: this.$t('TaskCutOffTime'),
dataIndex: 'verifyDueDate',
align: 'left',
ellipsis: true,
width: 140
},
{
title: this.$t('ProcessStatus'),
dataIndex: 'verifyFlowStatusName',
align: 'left',
ellipsis: true,
width: 180,
scopedSlots: { customRender: 'verifyFlowStatusName' }
},
{
title: this.$t('deliverableTemplate'),
dataIndex: 'verifyDeliverableTemplate',
align: 'left',
width: 180,
ellipsis: true,
scopedSlots: { customRender: 'verifyDeliverableTemplateName' }
}
]
}
// {
// title: this.$t('operation'),
// align: 'left',
// fixed: 'right',
// width: 260,
// scopedSlots: { customRender: 'operation' }
// }
],
columnsAll: [],
columnsFileAll: [
{
title: this.$t('deliverableTemplate'),
dataIndex: 'fileName',
align: 'left',
width: 260,
ellipsis: true
},
{
title: this.$t('resultReported'),
dataIndex: 'fileName',
align: 'left',
width: 260,
ellipsis: true
},
{
title: this.$t('operation'),
align: 'left',
width: 130,
scopedSlots: { customRender: 'fileOperation' }
}
],
visibleFile: false,
JLoading: false,
isRoleSwitching: true,
formInlineComment: {},
rulesComment: {
commentContent: [
{
required: true,
message: this.$t('reasonForReturn') + this.$t('cannotEmpty'),
trigger: 'blur'
}
]
},
timeName: '',
visibleComment: false,
dataSourceFile: [],
confirmLoading: false,
confirmLoadingComment: false,
queryParamQuery: {},
isDisplay: true,
selectedRowKeys: [],
visible: false,
formInline: {},
rules: {
inventoryAffirmDueDate: [
{
required: true,
message: this.$t('TaskCutOffTime') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
taskAffirmDueDate: [
{
required: true,
message: this.$t('TaskCutOffTime') + this.$t('cannotEmpty'),
trigger: 'change'
}
]
},
queryParam: {},
fileTitle: '',
parkingList: [],
indeterminate: false,
customizevisible: false,
checkAll: false,
disabled: false,
checkedList: ['serialNumber', 'title', 'operation'],
selectedValue: [],
customizeList: [
{
sort: '1',
name: this.$t('standard'),
disabled: true,
headFieldCn: '编号',
headFieldEn: 'Number',
field: 'serialNumber',
key: 1,
moduleFlag: '法规清单',
status: 1
},
{
sort: '2',
disabled: true,
name: this.$t('title'),
headFieldCn: '标题',
headFieldEn: 'title',
field: 'title',
key: 2,
moduleFlag: '法规清单',
status: 2
},
{
sort: '',
name: this.$t('subtitle'),
headFieldCn: '子标题',
headFieldEn: 'Sub-title',
field: 'subtitle',
key: 3,
moduleFlag: '法规清单'
},
{
sort: '',
name: this.$t('applicableSupplement'),
headFieldCn: '适用增补件',
headFieldEn: 'Applicable Supplement',
field: 'applicableSupplement',
key: 4,
moduleFlag: '法规清单'
},
{
sort: '',
name: this.$t('certificationType'),
headFieldCn: '认证类型',
headFieldEn: 'Certification Type',
field: 'attestationType_dictText',
key: 5,
moduleFlag: '法规清单'
},
{
sort: '',
name: this.$t('certificationLevel'),
headFieldCn: '认证级别',
headFieldEn: 'Certification Level',
field: 'attestationRank_dictText',
key: 6,
moduleFlag: '法规清单'
},
{
sort: '',
name: this.$t('areaOfResponsibility'),
headFieldCn: '责任领域',
headFieldEn: 'Responsible Field',
field: 'dutyTerritory_dictText',
key: 15,
moduleFlag: '法规清单'
},
{
sort: '',
name: this.$t('regulatoryEngineer'),
headFieldCn: '法规工程师',
headFieldEn: 'Regulation Engineer',
field: 'regulationOwnerName',
key: 16,
moduleFlag: '法规清单'
},
{
sort: '',
name: this.$t('engineeringInterfacePerson'),
headFieldCn: '工程接口人',
headFieldEn: 'Eng. Interface',
field: 'engineeringInterfacePersonName',
key: 18,
moduleFlag: '法规清单'
},
{
sort: '',
name: this.$t('remarks'),
headFieldCn: '备注',
headFieldEn: 'Comments',
field: 'remark',
key: 18,
moduleFlag: '法规清单'
},
{
sort: '',
name: this.$t('confirmationOfDesignConformity') + '/' + this.$t('personLiable'),
headFieldCn: '责任人',
headFieldEn: 'Assignee',
field: 'designDutyIdName',
affirmFlag: '1',
key: 22,
moduleFlag: '法规清单'
},
{
sort: '',
name: this.$t('confirmationOfDesignConformity') + '/' + this.$t('TaskCutOffTime'),
headFieldCn: '截止时间',
headFieldEn: 'Due Date',
field: 'designDueDate',
affirmFlag: '1',
key: 23,
moduleFlag: '法规清单'
},
{
sort: '',
name: this.$t('confirmationOfDesignConformity') + '/' + this.$t('ProcessStatus'),
headFieldCn: '流程状态',
headFieldEn: 'Process Status',
field: 'designFlowStatusName',
affirmFlag: '1',
key: 24,
moduleFlag: '法规清单'
},
{
sort: '',
name: this.$t('confirmationOfDesignConformity') + '/' + this.$t('deliverableTemplate'),
headFieldCn: '交付物模板',
headFieldEn: 'Deliverable Template',
field: 'designDeliverableTemplate',
affirmFlag: '1',
key: 25,
moduleFlag: '法规清单'
},
{
sort: '',
name: this.$t('verificationAndConformityconfirmation') + '/' + this.$t('personLiable'),
headFieldCn: '责任人',
headFieldEn: 'Assignee',
field: 'verifyDutyIdName',
affirmFlag: '3',
key: 32,
moduleFlag: '法规清单'
},
{
sort: '',
name: this.$t('verificationAndConformityconfirmation') + '/' + this.$t('TaskCutOffTime'),
headFieldCn: '截止时间',
headFieldEn: 'Due Date',
field: 'verifyDueDate',
affirmFlag: '3',
key: 33,
moduleFlag: '法规清单'
},
{
sort: '',
name: this.$t('verificationAndConformityconfirmation') + '/' + this.$t('ProcessStatus'),
headFieldCn: '流程状态',
headFieldEn: 'Process Status',
field: 'verifyFlowStatusName',
affirmFlag: '3',
key: 34,
moduleFlag: '法规清单'
},
{
sort: '',
name: this.$t('verificationAndConformityconfirmation') + '/' + this.$t('deliverableTemplate'),
headFieldCn: '交付物模板',
headFieldEn: 'Deliverable Template',
field: 'verifyDeliverableTemplate',
affirmFlag: '3',
key: 36,
moduleFlag: '法规清单'
},
{
sort: '',
disabled: true,
name: this.$t('operation'),
headFieldCn: '操作',
headFieldEn: 'Operation',
key: 35,
field: 'operation',
moduleFlag: '法规清单',
status: 2
}
],
url: {
addModelList: '/project/projectLawsInventoryEO/queryPageDummy',
queryConditionInventory: '/project/projectLawsInventoryEO/queryConditionInventory',
list: '/project/projectLawsInventoryEO/list',
addModel: 'project/projectLawsInventoryEO/add',
editModel: '/project/projectLawsInventoryEO/edit',
deleteBatch: '/project/projectLawsInventoryEO/deleteBatch',
deleteOne: '/project/projectLawsInventoryEO/delete',
updateStatusBatch: '/project/projectLawsInventoryEO/updateStatusBatch',
matchRelevantPeople: '/project/projectLawsInventoryEO/matchRelevantPeople',
queryPersonByProject: '/project/projectRelatedPersonnel/queryPersonByProjectId',
importZipUrl: '/project/projectLawsInventoryEO/importData',
exportTemplate: '/project/projectLawsInventoryEO/exportTemplate',
exportData: '/project/projectLawsInventoryEO/exportData',
setBatch: '/project/projectLawsInventoryEO/setBatch',//批量设置
copyUrl: '/project/projectLawsInventoryEO/copyInfoByIds',//复制
transferUrl: '/project/projectLawsInventoryEO/getPageInfoDummy',//调取
ExportReportUrl: '/project/projectLawsInventoryEO/downloadDocxReport',
AndUserId: '/project/projectLibraryRoleRelEO/queryByProjectLibraryIdAndUserId',
AndUserIdEdit: '/project/projectLibraryRoleRelEO/edit'
},
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download',
loading: false,
dataSource: [],
isResultReported: false,
// fieldList | array |✔| 需要查询的列集合示例如下,type类型有:date/datetime/string/int/number
fieldList: [
{
type: 'string',
value: 'correspondingStandard',
text: this.$t('correspondingStandard')
},
{
type: 'string',
value: 'subtitle',
text: this.$t('subtitle')
},
{
type: '',
value: 'implementType',
text: this.$t('implementationCategory'),
dictCode: 'implement_type'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
},
{
type: 'date',
value: 'xin1Che1Xing2Shi2Shi1Ri4Qi1',
text: this.$t('ImplementationDate')
},
{
type: 'date',
value: 'implementTime',
text: this.$t('vehicleInProductionDate')
},
{
type: 'string',
value: 'wvtaId',
text: 'WVTA ID'
},
{
type: '',
value: 'attestationType',
text: this.$t('certificationType'),
dictCode: 'attestation_type'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
},
{
type: '',
value: 'attestationRank',
text: this.$t('certificationLevel'),
dictCode: 'attestation_rank'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
},
{
type: '',
value: 'dutyTerritory',
text: this.$t('areaOfResponsibility'),
dictCode: 'duty_territory'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
},
{
type: '',
value: 'region',
text: this.$t('zoneOfApplication'),
dictCode: 'region'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
},
{
type: 'Personnel',
value: 'regulationOwnerId',
valueName: 'regulationOwnerIdName',
text: this.$t('regulatoryEngineer')
},
{
type: 'Personnel',
value: 'homologationEngineerId',
valueName: 'homologationEngineerIdName',
text: this.$t('certifiedEngineer')
},
{
type: 'Personnel',
value: 'engineeringInterfacePerson',
valueName: 'engineeringInterfacePersonName',
text: this.$t('engineeringInterfacePerson')
}
],
listOptions: [
{
value: 'Not started',
key: 'Not started',
label: this.$t('notLaunch')
},
{
value: 'List to confirm',
key: 'List to confirm',
label: this.$t('toBeConfirmed')
},
{
value: 'Accepted',
key: 'Accepted',
label: this.$t('accept')
},
{
value: 'Rejected',
key: 'Rejected',
label: this.$t('refuse')
}
],
taskOptions: [
{
value: 'Not started',
key: 'Not started',
label: this.$t('notLaunch')
},
{
value: 'List to confirm',
key: 'List to confirm',
label: this.$t('toBeConfirmed')
},
{
value: 'Accepted',
key: 'Accepted',
label: this.$t('accept')
},
{
value: 'Rejected',
key: 'Rejected',
label: this.$t('refuse')
}
],
visibleRoleSwitching: false,
confirmLoadingRoleSwitching: false,
formInlineRoleSwitching: {},
AndUserId: '',
rulesRoleSwitching: {
roleSwitchingCode: [
{
required: true,
message: this.$t('roleSwitching') + this.$t('cannotEmpty'),
trigger: 'change'
}
]
},
roleSwitchingCode: '',
detailedSuccessList: [],
detailedWarningList: [],
rowKeysSuccessList: [],
selectedRowKeysList: [],
rowKeysWarningList: [],
rolecode: false,
dataWarningList: [],
completeTaskList: [],
requestsNum: 0,
JTextLoading: false,
questionIdList: [],
questionWarning: []
}
},
mounted() {
this.JLoading = true
this.getHeader()
this.getRoleByUserId(() => {
this.getAndUserId()
})
if (this.areaOfResponsibilityList && this.areaOfResponsibilityList.dutyTerritory) {
this.queryParam.dutyTerritory = this.areaOfResponsibilityList.dutyTerritory
this.queryParam = { ...this.queryParam }
}
},
computed: {
columnsFile() {
let columnResult = JSON.parse(JSON.stringify(this.columnsFileAll))
if (!this.isResultReported) {
for (var i = 0; i < columnResult.length; i++) {
if (columnResult[i].title === this.$t('resultReported')) {
columnResult.splice(i, 1)
i--
}
}
} else if (this.isResultReported) {
for (var i = 0; i < columnResult.length; i++) {
if (columnResult[i].title === this.$t('deliverableTemplate')) {
columnResult.splice(i, 1)
i--
}
}
}
return columnResult
},
columns() {
let columnResult = JSON.parse(JSON.stringify(this.columnsAll))
if (this.roleSwitchingCode == 0 || this.roleSwitchingCode == 1) {
} else {
for (var i = 0; i < columnResult.length; i++) {
if (columnResult[i].title === this.$t('operation')) {
columnResult.splice(i, 1)
i--
}
}
}
return columnResult
}
},
methods: {
...mapGetters(['userInfo']),
//收起/展开
handleToggleSearch() {
this.toggleSearchStatus = !this.toggleSearchStatus
},
//流程状态点击事件
designFlowStatusClick(row, name) {
let query = {}
let TaskKey = ''
if (name == this.$t('designComplianceReview')) {
if (row.designFlowStatus == 'Task to be confirmed') {
TaskKey = 'zrrqr'
} else if (row.designFlowStatus == 'Results to be submitted') {
TaskKey = 'zrrtjjfw'
} else if (row.designFlowStatus == 'Results to be reviewed' ||
row.designFlowStatus == 'Compliance' ||
row.designFlowStatus == 'Non-Compliance' ||
row.designFlowStatus == 'To be tracked' ||
row.designFlowStatus == 'NA') {
TaskKey = 'fggcssh'
}
query = {
actiProcInstId: row.designPId,
projectTaskInventoryId: row.id,
projectLibraryId: row.projectLibraryId,
TaskKey: TaskKey,
isDisplay: false,
flowType: 2,
Sponsor: 'regulationOwnerName',
personLiable: 'designDutyIdName',
typeOfDeliverables: 'designDeliverableTypeName',
deliverableTemplate: 'designDeliverableTemplate',
DueDate: 'designDueDate',
remarks: 'designRemark',
projectName: row.projectName,
targetMarket: row.targetMarket,
projectNameId: row.projectNameId,
primaryKeyId: row.primaryKeyId
}
} else {
if (row.verifyFlowStatus == 'Task to be confirmed') {
TaskKey = 'zrrqr'
} else if (row.verifyFlowStatus == 'Results to be submitted') {
TaskKey = 'zrrtjjfw'
} else if (row.verifyFlowStatus == 'Results to be reviewed' ||
row.verifyFlowStatus == 'Compliance' ||
row.verifyFlowStatus == 'Non-Compliance' ||
row.verifyFlowStatus == 'To be tracked' ||
row.verifyFlowStatus == 'NA') {
TaskKey = 'fggcssh'
}
query = {
actiProcInstId: row.verifyPId,
projectTaskInventoryId: row.id,
projectLibraryId: row.projectLibraryId,
TaskKey: row.taskDefinitionKey,
flowType: 4,
isDisplay: false,
Sponsor: 'regulationOwnerName',
personLiable: 'verifyDutyIdName',
typeOfDeliverables: 'verifyDeliverableTypeName',
deliverableTemplate: 'verifyDeliverableTemplate',
DueDate: 'verifyDueDate',
remarks: 'verifyRemark',
projectName: row.projectName,
targetMarket: row.targetMarket,
projectNameId: row.projectNameId,
primaryKeyId: row.primaryKeyId
}
}
this.$refs.designComplianceRef.getList(JSON.parse(JSON.stringify(query)), name)
},
//查看列表页面
viewClick(row) {
row.roleCodeIndex = this.roleSwitchingCode
this.$refs.listOfRegulationsViewRef.editModel(JSON.parse(JSON.stringify(row)))
},
//模板下载
handleModule() {
downloadFile(this.url.exportTemplate, this.$t('listOfRegulations') + this.$t('importTemplate') + '.xls', {})
},
//时间禁用
disabledDate(current) {
return current && current < moment().subtract(1, 'day')
},
//获取切换角色的数据
getRoleByUserId(callback) {
getAction('/project/projectLawsInventoryEO/getRoleByUserId', { projectLibraryId: this.$route.query.id }).then((res) => {
if (res.success) {
this.roleSwitchingList = res.result || []
} else {
this.roleSwitchingList = []
}
callback && callback()
})
},
//通过登录人查出当前是什么角色
//判断角色是否存在;存在即可展示;如不存在显示roleSwitchingList数据中的第一个
getAndUserId() {
let query = {
projectLibraryId: this.$route.query.id,
userId: this.userInfo().id,
modelType: 'Laws inventory'
}
getAction(this.url.AndUserId, query).then((res) => {
if (res.success) {
// this.isDisplay = true
this.formInlineRoleSwitching.roleSwitchingCode = res.result.roleCode
this.AndUserId = res.result.id
if (this.formInlineRoleSwitching.roleSwitchingCode) {
if (!(this.roleSwitchingList.some(val => val.roleCode == this.formInlineRoleSwitching.roleSwitchingCode))) {
this.formInlineRoleSwitching.roleSwitchingCode = this.roleSwitchingList[0] ? this.roleSwitchingList[0].roleCode : ''
}
} else {
this.formInlineRoleSwitching.roleSwitchingCode = this.roleSwitchingList[0] ? this.roleSwitchingList[0].roleCode : ''
}
this.roleSwitchingCode = this.formInlineRoleSwitching.roleSwitchingCode
this.$emit('getRoleSwitch', this.formInlineRoleSwitching.roleSwitchingCode)
this.getList()
// this.JLoading = false
} else {
this.JLoading = false
}
})
},
//生成合规报告
ExportReportClick() {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
if (selectedRowKeys && selectedRowKeys.length == 0) {
this.$message.warning(this.$t('pleaseSelectData'))
} else if (selectedRowKeys.length > 1) {
this.$message.warning(this.$t('OnlyOneSelected'))
} else {
let serialNumber = this.selectedRowKeysList[0].serialNumber
downloadFile(this.url.ExportReportUrl, this.$t('listOfRegulations') + this.$t('complianceReporting') + '-' + serialNumber + '.docx', { id: selectedRowKeys.join(',') })
}
},
//导出
handleExport() {
let roleCodeIndex = this.roleSwitchingCode
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let query = {
...this.queryParam,
ids: selectedRowKeys.join(','),
...this.queryParamQuery,
roleCode: roleCodeIndex,
excelName: this.$route.query.projectName,
projectLibraryId: this.$route.query.id
}
downloadFile(this.url.exportData, this.$route.query.projectName + '.zip', query, this.Deselect)
},
//复制
copyClick() {
if (this.selectedRowKeys.length > 0) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmReplication'),
onOk() {
let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys))
getAction(_this.url.copyUrl, { ids: idList.join(',') }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.selectedRowKeys = []
_this.getList()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
//调取
transferClick() {
this.$refs.transferListRef.transferModel()
},
//批量设置
batSettingClick() {
let code = this.roleSwitchingCode
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.$refs.batSettingRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)), code)
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
//批量设置人员
batchSettingPersonnelClick() {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let isTrue
let content = []
for (let i = 0; i < this.dataSource.length; i++) {
for (let j = 0; j < selectedRowKeys.length; j++) {
if (this.dataSource[i].id == selectedRowKeys[j]) {
content.push(this.dataSource[i])
}
}
}
for (let i = 0; i < content.length; i++) {
if (!content[i].dutyTerritory_dictText) {
this.$message.warning(this.$t('theSelectedDataResponsibilityFieldCannotEmpty'))
return
}
for (let j = 1; j < content.length; j++) {
if (content[i].dutyTerritory_dictText != content[j].dutyTerritory_dictText || !content[i].dutyTerritory_dictText) {
this.$message.warning(this.$t('theInconsistentSameResponsibility'))
return
}
}
}
for (let i = 0; i < content.length; i++) {
if (content[i].roleCode == '0' &&
content[i].taskAffirmStatus != 'List to confirm') {
isTrue = true
} else {
isTrue = false
this.$message.warning(this.$t('taskConfirmedPersonnelCannotBeSetBatch'))
return
}
}
if (isTrue) {
this.$refs.batchSettingPersonnelRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)), content)
}
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
// 撤回
withdrawnClick() {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let contentList = []
let detailedWarningList = []
let idList = []
for (let i = 0; i < this.dataSource.length; i++) {
for (let j = 0; j < selectedRowKeys.length; j++) {
if (this.dataSource[i].id == selectedRowKeys[j]) {
contentList.push(this.dataSource[i])
}
}
}
//判断当前流程状态是否为清单待校核的数据
for (let i = 0; i < contentList.length; i++) {
if (contentList[i].verifyFlowStatus == 'List to be checked' ||
contentList[i].designFlowStatus == 'List to be checked') {
idList.push(contentList[i].id)
} else {
detailedWarningList.push(
< div > { contentList[i].serialNumber + this.$t('pleaseSelectTheDataverificationVerified') } < /div>)
}
}
if (idList && idList.length > 0) {
let _this = this
this.$confirm({
content: _this.$t('confirmWithdraw'),
onOk() {
let query = {
ids: idList.join(','),
projectLibraryId: _this.$route.query.id
}
postAction('/project/projectLawsInventoryEO/studioWithdrew', query).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.selectedRowKeys = []
_this.getList()
if (detailedWarningList && detailedWarningList.length > 0) {
_this.promptInformation(detailedWarningList)
}
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
} else {
this.promptInformation(detailedWarningList)
}
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
//每一次不满足条件的提示语
promptInformation(detailedWarningList) {
let that = this
this.$warning({
content: (
< div >
{ detailedWarningList }
< /div>
)
})
},
handleOkQuestion() {
this.$refs.ruleFormQuestion.validate(valid => {
let formInlineQuestion = JSON.parse(JSON.stringify(this.formInlineQuestion))
if (formInlineQuestion.expeditingType && formInlineQuestion.expeditingType.length > 0) {
formInlineQuestion.expeditingType = formInlineQuestion.expeditingType.join(',')
}
let operateType = ''
if (this.roleSwitchingCode == '0') {
operateType = 'lawsInventoryStudioExpediting'
} else if (this.roleSwitchingCode == '1') {
operateType = 'lawsInventoryRegulationOwnerExpediting'
} else if (this.roleSwitchingCode == '30') {
operateType = 'lawsInventoryEngineeringInterfacePersonExpediting'
}
let query = {
ids: this.questionIdList.join(','),
projectLibraryId: this.$route.query.id,
expeditingType: formInlineQuestion.expeditingType,
operateType: operateType
}
this.confirmLoadingQuestion = true
postAction('project/projectLawsInventoryEO/expediting', query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.selectedRowKeys = []
this.getList()
this.visibleQuestion = false
this.confirmLoadingQuestion = false
if (this.questionWarning && this.questionWarning.length > 0) {
this.promptInformation(this.questionWarning)
}
} else {
this.$message.warning(this.$t('operationFailed'))
}
})
})
},
handleCancelQuestion() {
this.visibleQuestion = false
},
//催办
questionClick() {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let isTrue
let content = []
this.questionIdList = []
let detailedWarningList = []
this.questionWarning = []
for (let i = 0; i < this.dataSource.length; i++) {
for (let j = 0; j < selectedRowKeys.length; j++) {
if (this.dataSource[i].id == selectedRowKeys[j]) {
content.push(this.dataSource[i])
}
}
}
for (let i = 0; i < content.length > 0; i++) {
if (content[i].verifyFlowStatus == 'List to be checked' ||
content[i].designFlowStatus == 'List to be checked' ||
content[i].verifyFlowStatus == 'Task to be confirmed' ||
content[i].designFlowStatus == 'Task to be confirmed' ||
content[i].verifyFlowStatus == 'Results to be submitted' ||
content[i].designFlowStatus == 'Results to be submitted' ||
content[i].verifyFlowStatus == 'Results to be reviewed' ||
content[i].designFlowStatus == 'Results to be reviewed') {
this.questionIdList.push(content[i].id)
} else {
detailedWarningList.push(content[i].serialNumber)
}
}
if (detailedWarningList && detailedWarningList.length > 0) {
this.questionWarning.push(
< div > {
detailedWarningList
.join(',') + this.$t('conditionsNotMet') + this.$t('onlyDataInTheReminderProcessBanBeProcessed')
} < /div>)
}
if (this.questionIdList && this.questionIdList.length > 0) {
this.visibleQuestion = true
this.$nextTick(() => {
this.formInlineQuestion = {}
this.$refs.ruleFormQuestion.clearValidate()
})
} else {
this.promptInformation(this.questionWarning)
}
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
//定版
fixedPlateClick() {
if (this.dataSource && this.dataSource.length > 0) {
let isTrue
for (let i = 0; i < this.dataSource.length; i++) {
if ((this.dataSource[i].verifyFlowStatus == 'Results to be submitted' ||
this.dataSource[i].verifyFlowStatus == 'Results to be reviewed' ||
this.dataSource[i].verifyFlowStatus == 'Compliance' ||
this.dataSource[i].verifyFlowStatus == 'Non-Compliance' ||
this.dataSource[i].verifyFlowStatus == 'To be tracked' ||
this.dataSource[i].verifyFlowStatus == 'NA'
) &&
(this.dataSource[i].designFlowStatus == 'Results to be submitted' ||
this.dataSource[i].designFlowStatus == 'Results to be reviewed' ||
this.dataSource[i].designFlowStatus == 'Compliance' ||
this.dataSource[i].designFlowStatus == 'Non-Compliance' ||
this.dataSource[i].designFlowStatus == 'To be tracked' ||
this.dataSource[i].designFlowStatus == 'NA'
)) {
isTrue = true
} else {
isTrue = false
this.$message.warning(this.$t('theReceived'))
return
}
}
if (isTrue) {
this.$refs.fixedPlateRef.getData()
}
}
},
//流程重置
alterationClick() {
if (this.selectedRowKeys.length > 0) {
let _this = this
let selectedRowKeys = JSON.parse(JSON.stringify(_this.selectedRowKeys))
let isTrue
let content = []
for (let i = 0; i < this.dataSource.length; i++) {
for (let j = 0; j < selectedRowKeys.length; j++) {
if (this.dataSource[i].id == selectedRowKeys[j]) {
content.push(this.dataSource[i])
}
}
}
for (let i = 0; i < content.length; i++) {
if (content[i].designFlowStatus == 'List to be released' &&
content[i].verifyFlowStatus == 'List to be released') {
isTrue = false
} else {
isTrue = true
}
}
if (isTrue) {
this.changeInterface(selectedRowKeys)
}
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
//流程重置接口
changeInterface() {
let _this = this
this.$confirm({
width: 760,
content: _this.$t('NoteConfirmTheChange'),
onOk() {
let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys))
postAction('/project/projectLawsInventoryEO/change', {
ids: idList.join(','),
projectLibraryId: _this.$route.query.id
}).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.selectedRowKeys = []
_this.getList()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
},
//添加
handleAdd() {
this.$refs.addModelRef.addModel()
},
//切换角色的确认事件
handleOkRoleSwitching() {
this.$refs.ruleFormRoleSwitching.validate(valid => {
if (valid) {
let query = {
roleCode: this.formInlineRoleSwitching.roleSwitchingCode,
id: this.AndUserId,
projectLibraryId: this.$route.query.id,
modelType: 'Laws inventory'
}
this.confirmLoadingRoleSwitching = true
postAction(this.url.AndUserIdEdit, query).then((res) => {
if (res.success) {
this.roleSwitchingCode = this.formInlineRoleSwitching.roleSwitchingCode
this.$message.success(this.$t('OperationSuccessful'))
this.visibleRoleSwitching = false
this.confirmLoadingRoleSwitching = false
this.$emit('getRoleSwitch', this.formInlineRoleSwitching.roleSwitchingCode)
this.selectedRowKeys = []
this.getList()
} else {
this.confirmLoadingRoleSwitching = false
this.$message.warning(this.$t('operationFailed'))
}
})
}
})
},
//切换角色的取消事件
handleCancelRoleSwitching() {
this.visibleRoleSwitching = false
},
//打开切换角色的弹窗;并判断当前的角色在角色列表中是否存在;如不存在选择角色列表中的第一个
roleSwitchingClick() {
this.visibleRoleSwitching = true
this.$nextTick(() => {
this.$refs.ruleFormRoleSwitching.clearValidate()
if (!this.roleSwitchingCode) {
this.roleSwitchingCode = '0'
}
if (!(this.roleSwitchingList.some(val => val.roleCode == this.roleSwitchingCode))) {
this.roleSwitchingCode = this.roleSwitchingList[0] ? this.roleSwitchingList[0].roleCode : ''
}
this.formInlineRoleSwitching.roleSwitchingCode = this.roleSwitchingCode
this.formInlineRoleSwitching = { ...this.formInlineRoleSwitching }
})
},
//批量删除
handleDel() {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let _this = this
let selectedRowKeys = JSON.parse(JSON.stringify(_this.selectedRowKeys))
let isTrue = false
for (let i = 0; i < this.dataSource.length; i++) {
for (let j = 0; j < selectedRowKeys.length; j++) {
if (this.dataSource[i].id == selectedRowKeys[j]) {
if (
(this.dataSource[i].verifyFlowStatus == 'List to be released' ||
this.dataSource[i].verifyFlowStatus == 'Compliance' ||
this.dataSource[i].verifyFlowStatus == 'Non-Compliance' ||
this.dataSource[i].verifyFlowStatus == 'To be tracked' ||
this.dataSource[i].verifyFlowStatus == 'NA')
&&
(this.dataSource[i].designFlowStatus == 'List to be released' ||
this.dataSource[i].designFlowStatus == 'Compliance' ||
this.dataSource[i].designFlowStatus == 'Non-Compliance' ||
this.dataSource[i].designFlowStatus == 'To be tracked' ||
this.dataSource[i].designFlowStatus == 'NA')) {
isTrue = true
} else {
isTrue = false
this.$message.warning(this.$t('onlyDeleted'))
return
}
}
}
}
if (isTrue) {
this.$confirm({
content: _this.$t('ConfirmBatchDeletion'),
onOk() {
let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys))
postAction(_this.url.deleteBatch, {
ids: idList.join(','),
projectLibraryId: _this.$route.query.id
}).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.selectedRowKeys = []
_this.getList()
} else {
_this.$message.warning(res.message)
}
})
}
})
}
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
//编辑
edit(item) {
item.roleCodeIndex = this.roleSwitchingCode
this.$refs.editModelRef.editModel(JSON.parse(JSON.stringify(item)))
},
//删除
deleteLib(val) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
deleteAction(_this.url.deleteOne, { id: val.id, projectLibraryId: _this.$route.query.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
},
//选择数据
onSelectChange(value, rows) {
this.selectedRowKeys = value
this.selectedRowKeysList = rows
},
//搜索
searchQuery() {
this.selectedRowKeys = []
this.getList()
},
//重置
searchReset() {
this.queryParam = {}
this.selectedRowKeys = []
this.$refs.globalAdvancedQueryRef.resetLine()
this.$refs.globalAdvancedQueryRef.emitCallback()
// this.getList()
},
addModelList() {
this.selectedRowKeys = []
this.getList()
},
customizeListForm(val) {
this.getHeader()
},
transferListForm(id) {
this.$refs.transferListvirtalRef.transferModel(id)
},
transferListFormHomo() {
this.$refs.transferListRef.handleCancel()
this.getList()
},
handleSuperQuery(params, matchType) {
let sqp = {}
if (!params || (params && params.length == 0)) {
sqp['superQueryParams'] = ''
this.$refs.globalAdvancedQueryRef.superQueryFlag = false
} else {
this.$refs.globalAdvancedQueryRef.superQueryFlag = true
sqp['superQueryParams'] = encodeURI(JSON.stringify(params))
sqp['superQueryMatchType'] = matchType
}
this.queryParamQuery = sqp
this.getList()
},
tableOnChange(pagination, filters, sorter) {
this.orderBy = sorter.order == 'ascend' ? '1' : '2'
if (sorter.columnKey == 'attestationRank_dictText') {
this.orderByField = 'attestationRank'
} else if (sorter.columnKey == 'dutyTerritory_dictText') {
this.orderByField = 'dutyTerritory'
} else {
this.orderByField = sorter.columnKey
}
this.getList()
},
getList() {
let roleCode = this.roleSwitchingCode
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
Object.keys(queryParam).forEach(val => {
if (queryParam[val] instanceof Array) {
queryParam[val] = queryParam[val].join(',')
}
})
if (queryParam.dutyTerritory) {
queryParam.dutyTerritory = '*' + queryParam.dutyTerritory + '*'
}
let query = {
...this.queryParamQuery,
...queryParam,
projectLibraryId: this.$route.query.id,
orderBy: this.orderBy,
orderByField: this.orderByField,
roleCode: roleCode
}
this.loading = true
getAction(this.url.list, query).then((res) => {
this.getRoleByUserId()
if (res.success) {
this.dataSource = res.result || []
this.loading = false
this.JLoading = false
if (this.dataSource.length == 0) {
this.$nextTick(() => {
let anttablebody = document.getElementsByClassName('ant-table-body')
let antfixedLeft = document.querySelectorAll('.ant-table-fixed-left .ant-table-body-inner')
let antfixedRight = document.querySelectorAll('.ant-table-fixed-right .ant-table-body-inner')
anttablebody[0].classList.add('ant-table-body-one')
antfixedLeft[0].classList.add('antfixedLeft')
antfixedRight[0].classList.add('antfixedRight')
})
} else {
let anttablebody = document.getElementsByClassName('ant-table-body-one')
let antfixedLeft = document.getElementsByClassName('antfixedLeft')
let antfixedRight = document.getElementsByClassName('antfixedRight')
if (anttablebody && anttablebody.length > 0) {
anttablebody[0].classList.remove('ant-table-body-one')
}
if (antfixedLeft && antfixedLeft.length > 0) {
antfixedLeft[0].classList.remove('antfixedLeft')
}
if (antfixedRight && antfixedRight.length > 0) {
antfixedRight[0].classList.remove('antfixedRight')
}
}
} else {
this.JLoading = false
this.loading = false
}
})
},
onCheckAllChange(e) {
let selectedValue = ['serialNumber', 'title', 'operation']
this.checkedList = e.target.checked ? this.customizeList.map(item => item.field) : selectedValue
this.selectedValue = this.checkedList
this.indeterminate = false
},
onChange() {
this.selectedValue = this.checkedList
},
getcustomize() {
this.customizevisible = true
},
cancel() {
this.customizevisible = false
},
getHeader() {
getAction('head/headCustomEO/list', {
moduleFlag: '法规清单'
}).then((res) => {
if (res.success) {
if (res.result && res.result.length > 0) {
this.columnsAll = res.result
for (let j = 0; j < this.columnsAll.length; j++) {
for (let i = 0; i < this.column.length; i++) {
if (this.columnsAll[j].title == this.$t('confirmationOfDesignConformity')) {
if (this.column[i].title == this.$t('confirmationOfDesignConformity')) {
if (this.columnsAll[j].children && this.columnsAll[j].children.length > 0) {
for (let k = 0; k < this.columnsAll[j].children.length; k++) {
for (let l = 0; l < this.column[i].children.length; l++) {
if (this.columnsAll[j].children[k].title == this.column[i].children[l].title) {
this.columnsAll[j].children[k] = this.column[i].children[l]
}
}
}
}
}
} else if (this.columnsAll[j].title == this.$t('verificationAndConformityconfirmation')) {
if (this.column[i].title == this.$t('verificationAndConformityconfirmation')) {
if (this.columnsAll[j].children && this.columnsAll[j].children.length > 0) {
for (let k = 0; k < this.columnsAll[j].children.length; k++) {
for (let l = 0; l < this.column[i].children.length; l++) {
if (this.columnsAll[j].children[k].title == this.column[i].children[l].title) {
this.columnsAll[j].children[k] = this.column[i].children[l]
}
}
}
}
}
} else {
if (this.column[i].dataIndex == this.columnsAll[j].dataIndex) {
this.columnsAll[j] = this.column[i]
}
}
}
}
} else {
this.columnsAll = this.column
}
this.columnsAll.push({
title: this.$t('operation'),
align: 'left',
fixed: 'right',
width: 260,
scopedSlots: { customRender: 'operation' }
})
this.columnsAll.forEach((item) => {
if (item.children) {
item.children.forEach((val) => {
this.checkedList.push(item.dataIndex, val.dataIndex)
})
} else {
this.checkedList.push(item.dataIndex)
}
})
this.loading = false
this.JLoading = false
} else {
this.JLoading = false
this.loading = false
}
})
},
handleSubmit() {
let list = []
let uniqueArray = this.selectedValue.filter((item, index, array) => {
return array.indexOf(item) === index
})
uniqueArray.forEach(item => {
this.customizeList.forEach((val, index) => {
if (item == val.field) {
val.sort = index + 1
list.push(val)
}
})
})
this.confirmLoading = true
let headCustomEOList = JSON.parse(JSON.stringify(list))
let query = {
headCustomEOList: headCustomEOList
}
postAction('head/headCustomEO/add', query).then((res) => {
if (res.success) {
this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful'))
this.customizevisible = false
this.getHeader()
} else {
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
this.customizevisible = false
}
})
},
getPersonnelList() {
this.getList()
},
initiateListConfirmationcClick(name) {
this.listTitle = this.$t('release')
this.timeName = name
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
this.detailedSuccessList = []
this.detailedWarningList = []
let dataSource = []
for (let i = 0; i < this.dataSource.length; i++) {
for (let j = 0; j < selectedRowKeys.length; j++) {
if (this.dataSource[i].id == selectedRowKeys[j]) {
dataSource.push(this.dataSource[i])
}
}
}
for (let i = 0; i < dataSource.length; i++) {
if (dataSource[i].verifyFlowStatus == 'List to be released' || dataSource[i].designFlowStatus == 'List to be released') {
if (dataSource[i].regulationOwnerId) {
this.detailedSuccessList.push(dataSource[i])
} else {
this.detailedWarningList.push(
< div > { dataSource[i].serialNumber + this.$t('TheEngineerAndCertification') } < /div>)
}
} else {
this.detailedWarningList.push(
< div > { dataSource[i].serialNumber + ',' + this.$t('pleaseSelectinitiatedOrRejected') } < /div>)
}
}
if (this.detailedSuccessList && this.detailedSuccessList.length > 0) {
this.visible = true
this.formInline = {}
} else {
let that = this
this.$warning({
content: (
< div >
{ that.detailedWarningList }
< /div>
)
})
}
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
handleOk() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
if (this.timeName == '清单') {
let selectedRowKeys = []
this.detailedSuccessList.forEach(res => {
selectedRowKeys.push(res.id)
})
let query = {
ids: selectedRowKeys.join(','),
projectLibraryId: this.$route.query.id,
...this.formInline
}
this.confirmLoading = true
postAction('/project/projectLawsInventoryEO/studioPublish', query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.selectedRowKeys = []
this.confirmLoading = false
this.getList()
} else {
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
}
let that = this
if (this.detailedWarningList.length > 0) {
this.$warning({
content: (
< div >
{ that.detailedWarningList }
< /div>
)
})
}
this.detailedSuccessList = []
this.detailedWarningList = []
})
}
}
})
},
startProcess(value, type, index) {
let query = {
type: type,
projectLawsInvnetoryList: value,
projectNameId: this.$route.query.projectNameId,
projectName: this.$route.query.projectName,
projectLawsInventoryId: value.id
}
postAction('/workFlow/startProcess', query).then((res) => {
if (res.success) {
this.completeTaskList.push(this.completeTask(value, res.result, index))
Promise.all(this.completeTaskList).then((res) => {
if (this.requestsNum == res.length) {
this.visible = false
this.selectedRowKeys = []
this.$message.success(this.$t('OperationSuccessful'))
this.confirmLoading = false
this.JTextLoading = false
this.getList()
}
}).catch((error) => {
this.JTextLoading = false
this.$message.warning(error.message)
})
} else {
this.$message.warning(this.$t('operationFailed'))
}
})
},
completeTask(value, taskId, index) {
return new Promise((resolve, reject) => {
value.handlingTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
Object.keys(value).forEach(res => {
if (value[res] && typeof value[res] == 'string') {
value[res] = value[res].replace(/\"/g, '“')
value[res] = value[res].replace(/\'/g, '‘')
}
})
let query = {
userid: this.userInfo().id,
taskId: taskId,
json: JSON.stringify(value).replace(/\"/g, '\'')
}
postAction('/workFlow/completeTask', query).then((res) => {
if (res.success) {
resolve(res)
} else {
reject(res)
}
})
})
},
submitOrSendBackClick(num) {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.detailedWarningList = []
this.dataWarningList = []
let dataSource = []
let idList = []
this.rowKeysSuccessList = []
for (let i = 0; i < this.dataSource.length; i++) {
for (let j = 0; j < this.selectedRowKeys.length; j++) {
if (this.dataSource[i].id == this.selectedRowKeys[j]) {
dataSource.push(this.dataSource[i])
}
}
}
for (let i = 0; i < dataSource.length; i++) {
if (dataSource[i].verifyFlowStatus == 'List to be checked' ||
dataSource[i].designFlowStatus == 'List to be checked') {
idList.push(dataSource[i].id)
this.rowKeysSuccessList.push(dataSource[i])
} else {
this.detailedWarningList.push(
< div > { dataSource[i].serialNumber + this.$t('pleaseSelectTheDataverificationVerified') } < /div>)
this.dataWarningList.push(
< div > { dataSource[i].serialNumber + this.$t('pleaseSelectTheDataverificationVerified') } < /div>)
}
}
if (idList && idList.length > 0) {
if (num == 0) {
this.submitClick(this.rowKeysSuccessList, 1)
} else {
this.visibleComment = true
this.formInlineComment = {}
this.$nextTick(() => {
this.$refs.ruleFormComment.clearValidate()
})
}
} else {
this.promptInformation(this.detailedWarningList)
}
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
submitClick(dataList, num) {
let content = []
let designList = []
let verifyList = []
let detailedWarningList = []
this.completeTaskList = []
this.detailedWarningList = this.dataWarningList || []
let _this = this
_this.$destroyAll()
if (num == 1) {
for (let i = 0; i < dataList.length; i++) {
if (!dataList[i].designDeliverableType && !dataList[i].designDutyId && !dataList[i].designDueDate) {
content.push(dataList[i])
continue
}
if (!dataList[i].verifyDeliverableType && !dataList[i].verifyDutyId && !dataList[i].verifyDueDate) {
content.push(dataList[i])
continue
}
}
}
if (content && content.length > 0) {
for (let i = 0; i < content.length; i++) {
if (!content[i].designDeliverableType) {
designList.push(content[i].serialNumber)
}
if (!content[i].verifyDeliverableType) {
verifyList.push(content[i].serialNumber)
}
}
if (designList.length > 0 || verifyList.length > 0) {
detailedWarningList.push(
< div > { this.$t('theDataYouSelectedContainsSkip') } < /div>)
}
if (designList.length > 0) {
detailedWarningList.push(
< div > { designList.join(',') + ' ' + this.$t('designComplianceProcessFor') } < /div>)
}
if (verifyList.length > 0) {
detailedWarningList.push(
< div > { verifyList.join(',') + ' ' + this.$t('validationComplianceProcessFor') } < /div>)
}
this.$confirm({
content: detailedWarningList,
class: 'confirmClass',
onOk() {
_this.submitClick(dataList, 2)
}
})
return
}
if (num == 1) {
this.$confirm({
content: _this.$t('confirmLaunchTask'),
onOk() {
_this.submitAdmin(dataList)
}
})
} else {
_this.submitAdmin(dataList)
}
},
submitAdmin(dataList) {
let _this = this
this.requestsNum = 0
this.JTextLoading = true
for (let i = 0; i < dataList.length; i++) {
if (dataList[i].designDeliverableType) {
if (!dataList[i].designDutyId) {
_this.detailedWarningList.push(
< div > { dataList[i].serialNumber + _this.$t('thePersonResponsibleForDesignCannotBeBlank') } < /div>)
}
if (!dataList[i].designDueDate) {
_this.detailedWarningList.push(
< div > { dataList[i].serialNumber + _this.$t('theDeadlineForTheDesignCannotBeEmpty') } < /div>)
}
}
if (dataList[i].verifyDeliverableType) {
if (!dataList[i].verifyDueDate) {
_this.detailedWarningList.push(
< div > { dataList[i].serialNumber + _this.$t('thePersonResponsibleForVerifyingEmpty') } < /div>)
}
if (!dataList[i].verifyDutyId) {
_this.detailedWarningList.push(
< div > { dataList[i].serialNumber + _this.$t('thePersonResponsibleForVerifyingEmpty') } < /div>)
}
}
if (dataList[i].designFlowStatus == 'List to be checked') {
if (dataList[i].designDeliverableType && dataList[i].designDutyId && dataList[i].designDueDate) {
this.requestsNum++
_this.startProcess(dataList[i], 2, this.requestsNum)
}
} else {
_this.detailedWarningList.push(
< div > { dataList[i].serialNumber + _this.$t('pleaseSelectTheDataverificationVerified') } < /div>)
}
if (dataList[i].verifyFlowStatus == 'List to be checked') {
if (dataList[i].verifyDeliverableType && dataList[i].verifyDutyId && dataList[i].verifyDueDate) {
this.requestsNum++
_this.startProcess(dataList[i], 4, this.requestsNum)
}
} else {
_this.detailedWarningList.push(
< div > { dataList[i].serialNumber + _this.$t('pleaseSelectTheDataverificationVerified') } < /div>)
}
}
if (this.requestsNum == 0) {
this.$message.warning(_this.$t('theDataYouInitiate'))
// _this.promptInformation(_this.detailedWarningList)
this.JTextLoading = false
}
},
handleOkComment() {
this.$refs.ruleFormComment.validate(valid => {
if (valid) {
let content = []
let ids = []
if (this.rowKeysSuccessList && this.rowKeysSuccessList.length > 0) {
this.rowKeysSuccessList.forEach(res => {
content.push(res.serialNumber)
ids.push(res.id)
})
}
this.rejectCauseAdd(this.formInlineComment.commentContent, ids)
this.confirmLoadingComment = true
this.projectCommentAdd(content, this.formInlineComment.commentContent)
let query = {
projectLibraryId: this.$route.query.id,
ids: ids.join(',')
}
postAction('/project/projectLawsInventoryEO/regulationOwnerReturned', query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.selectedRowKeys = []
this.confirmLoading = false
this.visibleComment = false
this.confirmLoadingComment = false
this.rowKeysSuccessList = []
this.getList()
if (this.detailedWarningList && this.detailedWarningList.length > 0) {
this.promptInformation(this.detailedWarningList)
this.detailedWarningList = []
}
} else {
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
this.confirmLoadingComment = false
}
})
}
})
},
projectCommentAdd(content, commentContent) {
let query = {
commentContent: this.$t('For') + content.join(',') + this.$t('markedRejection') + ':' + commentContent,
projectLibraryId: this.$route.query.id
}
postAction('/project/projectCommentEO/add', query).then((res) => {
})
},
rejectCauseAdd(rejectCause, ids) {
let rejectTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
let query = {
rejectUserId: this.userInfo().id,
rejectTime: rejectTime,
rejectCause: rejectCause,
projectLawsInventoryId: ids.join(','),
rejectType: '0'
}
postAction('/project/projectLawsInventoryRejectCauseEO/add', query).then((res) => {
})
},
handleCancelComment() {
this.visibleComment = false
},
handleCancel() {
this.formInline = {}
this.visible = false
},
dateChange(item) {
this.formInline[item.db_field_name] = this.formInline[item.db_field_name] ? moment(this.formInline[item.db_field_name]).format('YYYY-MM-DD') : ''
},
clickButtonToUpload(item, num) {
if (num == 1) {
this.isResultReported = true
this.fileTitle = this.$t('resultReported')
} else {
this.isResultReported = false
this.fileTitle = this.$t('deliverableTemplate')
}
this.loading = true
this.visibleFile = true
getAction('sys/common/getFileInfos', { id: item }).then((res) => {
if (res.success) {
this.dataSourceFile = res.result
this.dataSourceFile.forEach((val) => {
let fileName = val.fileName
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
val.fileSuffix = fileSuffix
})
this.loading = false
} else {
this.dataSourceFile = []
this.loading = false
}
})
},
customizeClick() {
this.$refs.customizeListRef.transferModel(this.columnsAll)
},
bringInRelevantPersonnelClick() {
let _this = this
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.$confirm({
content: _this.$t('confirmBringInRelevantPersonnel'),
onOk() {
let selectedRowKeys = JSON.parse(JSON.stringify(_this.selectedRowKeys))
postAction(_this.url.matchRelevantPeople, {
ids: selectedRowKeys.join(','),
projectLibraryId: _this.$route.query.id
}).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.selectedRowKeys = []
_this.getList()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
resultReportedClick(val) {
if (this.roleSwitchingCode == 1) {
this.$refs.resultReportedUploadRef.clickButtonToUploadFile(val)
} else {
if (val.fileId) {
this.clickButtonToUpload(val.fileId, 1)
} else {
this.$message.warning(this.$t('reportNotUploaded'))
}
}
},
standardClick(row) {
let newUrl = this.$router.resolve({
path: '/docManage/library/detail',
query: {
id: row.standId
}
})
window.open(newUrl.href, '_blank')
},
viewFileClick(item) {
this.$refs.viewFileModelRef.clickButtonToUpload(item)
},
pdfPreview(fileQuery) {
let fileName = fileQuery.fileName
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix == '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id + '&userName=' + this.userInfo().username))
} else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else if (fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else {
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
}
},
download(item) {
downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id, userName: this.userInfo().username })
}
}
}
</script>
<style lang="less" scoped>
@import '~@assets/less/common.less';
.doc-detail {
background: #fff;
height: 100%;
.Virtual-detail-header {
width: 100%;
height: 68px;
line-height: 68px;
padding: 0 32px 0 32px;
box-sizing: border-box;
display: flex;
justify-content: space-between;
border-bottom: 2px #eff1f3 solid;
background: #fff;
.Virtual-detail-title {
display: inline-block;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
font-size: 20px;
font-weight: 400;
color: #040B29;
line-height: 68px;
}
.doc-detail-right {
width: 800px;
line-height: 68px;
display: flex;
}
}
.Virtual-detail-content {
padding: 0 38px 0 38px;
box-sizing: border-box;
font-size: 16px;
.box-title-text-add {
line-height: 1.4;
}
.title-text-add {
display: inline-block;
font-weight: 500;
margin-right: 16px;
height: 42px;
line-height: 42px;
}
}
}
.header-text {
font-size: 16px;
font-weight: 400;
height: 60px;
color: #000F16;
line-height: 40px;
}
.box-title-text {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 10px;
}
.box-title-text-index {
line-height: 1.4;
display: flex;
}
.title-text {
width: 110px;
color: #000F16;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
margin-top: 3px;
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.title-text-index {
width: 110px;
color: #000F16;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
margin-top: 3px;
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
line-height: 40px;
}
.box-input {
display: inline-block;
width: calc(100% - 126px);
height: 38px;
margin-top: 2px;
}
.Required {
color: red;
margin-right: 4px;
}
.box-button {
height: 38px;
}
.text-operation {
margin-right: 8px;
}
.page {
text-align: right;
margin-top: 20px;
}
.operator-text-left {
font-size: 14px;
margin-right: 20px;
background: #eff1f3;
padding: 8px 8px;
cursor: pointer;
border-radius: 4px;
}
/deep/ .ant-popover-buttons {
display: none !important;
}
.operator-text-title {
cursor: pointer;
margin-right: 22px;
font-size: 14px;
font-weight: 400;
color: #040B29;
margin-bottom: 22px;
}
.customize-text {
/*height: 1533px;*/
display: flex;
flex-direction: column;
align-items: flex-start;
}
.customize-text-title {
margin-left: 0;
font-size: 14px;
font-weight: 400;
color: #040B29;
margin-bottom: 22px;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
z-index: 100;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
.itemModelComment {
width: calc(100% - 64px);
display: inline-block;
margin-top: 2px;
}
.title-text-Comment {
width: 74px;
text-align: right;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 42px;
line-height: 48px;
}
.textName {
width: 100%;
overflow: hidden;
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
word-break: break-all
}
.buttom-box {
width: 100%;
text-align: right;
font-size: 16px;
font-weight: 500;
color: #000F16;
}
::v-deep .ant-card-body {
padding: 24px 24px 0 24px;
}
::v-deep .ant-table-row:first-child {
background: #fff !important;
opacity: 0.9;
}
::v-deep .ant-table-body {
background: transparent !important;
}
::v-deep .ant-table-body::-webkit-scrollbar {
z-index: 10000000;
}
/*::v-deep .ant-table .ant-table-fixed-left {*/
/* height: auto !important;*/
/* bottom: 8px !important;*/
/*}*/
/*::v-deep .ant-table .ant-table-fixed-right {*/
/* height: auto !important;*/
/* bottom: 8px !important;*/
/*}*/
::v-deep .ant-table-fixed-header .ant-table-body-inner {
overflow: visible;
}
/*::v-deep .ant-table-fixed-left .ant-table-body-inner {*/
/* overflow-y: scroll;*/
/*}*/
/*::v-deep .ant-table-fixed-right .ant-table-body-inner {*/
/* overflow-y: scroll;*/
/*}*/
//::v-deep .ant-table-body {
// padding-bottom: 7px;
//}
::v-deep .ant-table-body-inner {
padding-bottom: 10px;
}
::v-deep .ant-table-scroll .ant-table-header::-webkit-scrollbar {
/*height: 0;*/
width: 0;
}
::v-deep .ant-table-body-one {
padding-bottom: 0 !important;
}
::v-deep .antfixedLeft {
padding-bottom: 0 !important;
overflow: scroll !important;
}
::v-deep .antfixedRight {
padding-bottom: 0 !important;
overflow: scroll !important;
}
.viewFile {
color: #00B3BE;
cursor: pointer;
}
</style>
<style lang="less">
.box-input .ant-select-selection {
height: 38px !important;
}
.box-input .ant-select-selection__rendered {
line-height: 38px;
}
.popconfirm {
z-index: 999;
}
.popconfirm .ant-popover-buttons {
display: none !important;
}
.popconfirm .anticon-exclamation-circle {
display: none !important;
}
popconfirmmize {
z-index: 999;
}
.popconfirmmize .ant-popover-buttons {
display: none !important;
}
.popconfirmmize .anticon-exclamation-circle {
display: none !important;
}
.popconfirmmize .ant-popover-message {
padding: 4px 0 36px !important;
}
//.popconfirm .ant-popover-inner-content{
// padding: 0px 16px;
//}
//
//.popconfirm .ant-popover-message{
// padding: 23px 0 1px;
//}
.ant-table-placeholder {
padding: 0;
border-top: none;
}
.itemModelComment .ant-form-item-control-wrapper {
width: 100% !important;
}
//.customizetable .ant-table-thead > tr > th {
// height: 46px !important;
//padding: 8px 8px !important;
//font-weight: bold;
//background: #f3f6f6;
//}
//.ant-table-row-cell-ellipsis{
// padding: 0!important;
//}
.second {
padding: 0 !important;
}
//.tableList .ant-table-tbody > tr > td{
// color: #040B29 ;
//}
//.tableList .ant-table-thead > tr{
// padding: 2px 16px !important;
//}
//.tableList .ant-table-thead >tr{
// height: 56px !important;
//}
</style>
<style lang="less">
/* vue-draggable-resizable@2.1.0 begin */
.resize-table-th {
position: relative;
overflow: hidden;
}
.resize-table-th .table-draggable-handle {
height: 100% !important;
bottom: 0;
left: auto !important;
right: -5px;
cursor: col-resize;
touch-action: none;
}
.confirmClass .ant-modal-confirm-body {
display: flex;
}
.confirmClass .ant-modal-confirm-body .ant-modal-confirm-content {
margin-top: 0 !important;
}
/* 插件 end */
</style>