3329 lines
119 KiB
Java
3329 lines
119 KiB
Java
<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>
|
||
<!-- v-if="(isRoleSwitching && !isDisplay) || (!isDisplay && roleSwitchingList.length > 1) || isDisplay"-->
|
||
<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 class="operator-text" @click="initiateTaskConfirmationClick('任务')">-->
|
||
<!-- <a-icon type="file-protect" />-->
|
||
<!-- {{ $t('initiateTaskConfirmation') }}-->
|
||
<!-- </div>-->
|
||
</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 == '1' || this.roleSwitchingCode == '2' || this.roleSwitchingCode == '30' || this.roleSwitchingCode == '31'"
|
||
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="submitClick(0)" v-if="this.roleSwitchingCode == '1'">
|
||
<a-icon type="check-circle" />
|
||
{{ $t('initiateTask') }}
|
||
</div>
|
||
<!-- 退回-->
|
||
<div class="operator-text" @click="submitClick(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 class="operator-text"-->
|
||
<!-- v-if="roleSwitchingList.length > 1"-->
|
||
<!-- @click="roleSwitchingClick">-->
|
||
<!-- <a-icon type="select" />-->
|
||
<!-- {{ $t('roleSwitching') }}-->
|
||
<!-- </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="(record.inventoryAffirmStatus == 'List to confirm' &&
|
||
((record.roleCode == 1 && !record.regulationOwnerSubmitStatus) ||
|
||
(record.roleCode == 2 && !record.homologationEngineerSubmitStatus) ||
|
||
(record.roleCode == 4 && !record.regulationOwnerSubmitStatus && !record.homologationEngineerSubmitStatus)))
|
||
|| (record.roleCode == 0 && record.taskAffirmStatus != 'List to confirm')"
|
||
@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.inventoryAffirmStatus == 'Not started' || record.inventoryAffirmStatus == 'Rejected') && record.roleCode == 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="designDeliverableTemplateName" slot-scope="text,record">
|
||
<span :title="record.designDeliverableTypeName">{{ record.designDeliverableTypeName }}</span><br
|
||
v-if="record.designDeliverableTypeName">
|
||
<!-- <a v-if="record.designDeliverableTemplate && record.designDeliverableTemplate.split(',').length == 1"-->
|
||
<!-- :title="record.designDeliverableTemplateName"-->
|
||
<!-- @click="pdfPreviewClick(record.designDeliverableTemplateName,record.designDeliverableTemplate)">-->
|
||
<!-- {{ record.designDeliverableTemplateName.length > 10 ? record.designDeliverableTemplateName.slice(0, 9) + '...' :record.designDeliverableTemplateName}}-->
|
||
<!-- </a>-->
|
||
<!-- <a v-else-if="record.designDeliverableTemplate && record.designDeliverableTemplate.split(',').length > 1"-->
|
||
<!-- @click="clickButtonToUpload(record.designDeliverableTemplate)">{{ $t('viewFile') }}</a>-->
|
||
<span v-else>--</span>
|
||
</span>
|
||
|
||
<span slot="prehomoDeliverableTemplateName" slot-scope="text,record">
|
||
<span :title="record.prehomoDeliverableTypeName">{{ record.prehomoDeliverableTypeName }}</span><br
|
||
v-if="record.prehomoDeliverableTypeName">
|
||
<!-- <a v-if="record.prehomoDeliverableTemplate && record.prehomoDeliverableTemplate.split(',').length == 1"-->
|
||
<!-- :title="record.prehomoDeliverableTemplateName"-->
|
||
<!-- @click="pdfPreviewClick(record.prehomoDeliverableTemplateName,record.prehomoDeliverableTemplate)">-->
|
||
<!-- {{ record.prehomoDeliverableTemplateName.length > 10 ? record.prehomoDeliverableTemplateName.slice(0, 9) + '...' :record.prehomoDeliverableTemplateName}}-->
|
||
<!-- </a>-->
|
||
<!-- <a v-else-if="record.prehomoDeliverableTemplate && record.prehomoDeliverableTemplate.split(',').length > 1"-->
|
||
<!-- @click="clickButtonToUpload(record.prehomoDeliverableTemplate)">{{ $t('viewFile') }}</a>-->
|
||
<span v-else>--</span>
|
||
</span>
|
||
|
||
<span slot="verifyDeliverableTemplateName" slot-scope="text,record">
|
||
<span :title="record.verifyDeliverableTypeName">{{ record.verifyDeliverableTypeName }}</span><br
|
||
v-if="record.verifyDeliverableTypeName">
|
||
<!-- <a v-if="record.verifyDeliverableTemplate && record.verifyDeliverableTemplate.split(',').length == 1"-->
|
||
<!-- :title="record.verifyDeliverableTemplateName"-->
|
||
<!-- @click="pdfPreviewClick(record.verifyDeliverableTemplateName,record.verifyDeliverableTemplate)">-->
|
||
<!-- {{ record.verifyDeliverableTemplateName.length > 10 ? record.verifyDeliverableTemplateName.slice(0, 9) + '...' :record.verifyDeliverableTemplateName}}-->
|
||
<!-- </a>-->
|
||
<!-- <a v-else-if="record.verifyDeliverableTemplate && record.verifyDeliverableTemplate.split(',').length > 1"-->
|
||
<!-- @click="clickButtonToUpload(record.verifyDeliverableTemplate)">{{ $t('viewFile') }}</a>-->
|
||
<span v-else>--</span>
|
||
</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="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>
|
||
<a-modal
|
||
:title="$t('reasonsForRejection')"
|
||
: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('reasonsForRejection')">{{ $t('reasonsForRejection') }}</span>
|
||
</div>
|
||
<a-form-model-item class="itemModelComment" :prop="'commentContent'">
|
||
<a-textarea
|
||
style="width: 100%"
|
||
:placeholder="$t('PleaseEnter')+$t('reasonsForRejection')"
|
||
: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>
|
||
<JLoading :loading="JLoading">{{ $t('dataLoading') }}</JLoading>
|
||
<resultReportedUpload @resultReportedUploadForm="addModelList" ref="resultReportedUploadRef" />
|
||
<listOfRegulationsView ref="listOfRegulationsViewRef" />
|
||
<batchSettingPersonnel :url="url" ref="batchSettingPersonnelRef" @batchSettingPersonnelForm="addModelList" />
|
||
</a-card>
|
||
</template>
|
||
|
||
<script>
|
||
import ImportFile from '@/components/ImportFile/index'
|
||
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 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
|
||
},
|
||
mixins: [ResizeColumnProvide, ResizeHeader],
|
||
data() {
|
||
return {
|
||
toggleSearchStatus: false,
|
||
roleSwitchingList: [],
|
||
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('listConfirmationStatus'),
|
||
// align: 'left',
|
||
// dataIndex: 'inventoryAffirmStatusName',
|
||
// width: 240,
|
||
// sorter: true,
|
||
// ellipsis: true
|
||
// },
|
||
// {
|
||
// title: this.$t('taskAffirmStatus'),
|
||
// align: 'left',
|
||
// sorter: true,
|
||
// dataIndex: 'taskAffirmStatusName',
|
||
// width: 240,
|
||
// ellipsis: true
|
||
// },
|
||
// {
|
||
// title: this.$t('taskReleaseStatus'),
|
||
// align: 'center',
|
||
// dataIndex: 'taskReleaseStatus'
|
||
// },
|
||
// {
|
||
// title: this.$t('zoneOfApplication'),
|
||
// align: 'left',
|
||
// dataIndex: 'region_dictText',
|
||
// width: 180,
|
||
// ellipsis: true
|
||
// },
|
||
// {
|
||
// title: this.$t('correspondingStandard'),
|
||
// align: 'left',
|
||
// dataIndex: 'correspondingStandard',
|
||
// width: 180,
|
||
// ellipsis: true
|
||
// },
|
||
// {
|
||
// title: this.$t('implementationCategory'),
|
||
// align: 'left',
|
||
// dataIndex: 'implementType_dictText',
|
||
// width: 180,
|
||
// ellipsis: true
|
||
// },
|
||
// {
|
||
// title: this.$t('ImplementationDate'),
|
||
// align: 'left',
|
||
// width: 200,
|
||
// dataIndex: 'xin1Che1Xing2Shi2Shi1Ri4Qi1',
|
||
// ellipsis: true
|
||
// },
|
||
// {
|
||
// title: this.$t('vehicleInProductionDate'),
|
||
// align: 'left',
|
||
// width: 220,
|
||
// dataIndex: 'implementTime',
|
||
// ellipsis: true
|
||
// },
|
||
// {
|
||
// title: this.$t('certificationType'),
|
||
// align: 'left',
|
||
// dataIndex: 'attestationType_dictText',
|
||
// width: 180,
|
||
// ellipsis: true
|
||
// },
|
||
// {
|
||
// title: this.$t('certificationLevel'),
|
||
// align: 'left',
|
||
// dataIndex: 'attestationRank_dictText',
|
||
// width: 180,
|
||
// sorter: true,
|
||
// ellipsis: true
|
||
// },
|
||
// {
|
||
// title: this.$t('applicableSupplement'),
|
||
// align: 'left',
|
||
// width: 220,
|
||
// dataIndex: 'applicableSupplement',
|
||
// ellipsis: true
|
||
// },
|
||
// {
|
||
// title: 'WVTA ID',
|
||
// align: 'left',
|
||
// dataIndex: 'wvtaId',
|
||
// width: 180,
|
||
// sorter: true,
|
||
// ellipsis: true
|
||
// },
|
||
{
|
||
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('certifiedEngineer'),
|
||
// align: 'left',
|
||
// ellipsis: true,
|
||
// sorter: true,
|
||
// dataIndex: 'homologationEngineerName',
|
||
// 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('Deliverables'),
|
||
// dataIndex: 'designDeliverableTemplateName',
|
||
// align: 'left',
|
||
// width: 180,
|
||
// ellipsis: true,
|
||
// scopedSlots: { customRender: 'designDeliverableTemplateName' }
|
||
// },
|
||
// {
|
||
// title: this.$t('Sponsor'),
|
||
// dataIndex: 'designInitiatorName',
|
||
// align: 'left',
|
||
// width: 180,
|
||
// ellipsis: true
|
||
// },
|
||
{
|
||
title: this.$t('personLiable'),
|
||
dataIndex: 'designDutyName',
|
||
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
|
||
},
|
||
// {
|
||
// title: this.$t('descriptionDeliverables'),
|
||
// dataIndex: 'designRemark',
|
||
// align: 'left',
|
||
// width: 220,
|
||
// ellipsis: true
|
||
// }
|
||
]
|
||
},
|
||
// {
|
||
// title: this.$t('PrehomoConfirmation'),
|
||
// children: [
|
||
// {
|
||
// title: this.$t('Deliverables'),
|
||
// dataIndex: 'prehomoDeliverableTemplateName',
|
||
// align: 'left',
|
||
// width: 180,
|
||
// ellipsis: true,
|
||
// scopedSlots: { customRender: 'prehomoDeliverableTemplateName' }
|
||
// },
|
||
// // {
|
||
// // title: this.$t('Sponsor'),
|
||
// // dataIndex: 'prehomoInitiatorName',
|
||
// // align: 'left',
|
||
// // width: 180,
|
||
// // ellipsis: true
|
||
// // },
|
||
// {
|
||
// title: this.$t('personLiable'),
|
||
// dataIndex: 'prehomoDutyName',
|
||
// align: 'left',
|
||
// width: 180,
|
||
// ellipsis: true
|
||
// },
|
||
// {
|
||
// title: this.$t('TaskCutOffTime'),
|
||
// dataIndex: 'prehomoDueDate',
|
||
// align: 'left',
|
||
// width: 140,
|
||
// ellipsis: true
|
||
// },
|
||
// {
|
||
// title: this.$t('descriptionDeliverables'),
|
||
// dataIndex: 'prehomoRemark',
|
||
// align: 'left',
|
||
// width: 220,
|
||
// ellipsis: true
|
||
// }
|
||
// ]
|
||
// },
|
||
{
|
||
title: this.$t('verificationAndConformityconfirmation'),
|
||
children: [
|
||
// {
|
||
// title: this.$t('Deliverables'),
|
||
// dataIndex: 'verifyDeliverableTemplateName',
|
||
// align: 'left',
|
||
// width: 180,
|
||
// ellipsis: true,
|
||
// scopedSlots: { customRender: 'verifyDeliverableTemplateName' }
|
||
// },
|
||
// {
|
||
// title: this.$t('Sponsor'),
|
||
// dataIndex: 'verifyInitiatorName',
|
||
// align: 'left',
|
||
// width: 180,
|
||
// ellipsis: true
|
||
// },
|
||
{
|
||
title: this.$t('personLiable'),
|
||
dataIndex: 'verifyDutyName',
|
||
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
|
||
},
|
||
// {
|
||
// title: this.$t('descriptionDeliverables'),
|
||
// dataIndex: 'verifyRemark',
|
||
// align: 'left',
|
||
// width: 220,
|
||
// ellipsis: true
|
||
// }
|
||
]
|
||
},
|
||
{
|
||
title: this.$t('operation'),
|
||
align: 'left',
|
||
fixed: 'right',
|
||
width: 200,
|
||
scopedSlots: { customRender: 'operation' }
|
||
},
|
||
{
|
||
title: this.$t('operation'),
|
||
align: 'left',
|
||
fixed: 'right',
|
||
width: 140,
|
||
scopedSlots: { customRender: 'operationOne' }
|
||
}
|
||
],
|
||
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('reasonsForRejection') + 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('listConfirmationStatus'),
|
||
// headFieldCn: '清单确认状态',
|
||
// headFieldEn: 'List Confirmation Status',
|
||
// field: 'inventoryAffirmStatusName',
|
||
// key: 4,
|
||
// moduleFlag: '法规清单'
|
||
// },
|
||
// {
|
||
// sort: '',
|
||
// name: this.$t('taskAffirmStatus'),
|
||
// headFieldCn: '任务确认状态',
|
||
// headFieldEn: 'Task Confirmation Status',
|
||
// field: 'taskAffirmStatusName',
|
||
// key: 5,
|
||
// moduleFlag: '法规清单'
|
||
// },
|
||
// {
|
||
// sort: '',
|
||
// name: this.$t('zoneOfApplication'),
|
||
// headFieldCn: '适用地区',
|
||
// headFieldEn: 'Area',
|
||
// field: 'region_dictText',
|
||
// key: 6,
|
||
// moduleFlag: '法规清单'
|
||
// },
|
||
// {
|
||
// sort: '',
|
||
// name: this.$t('correspondingStandard'),
|
||
// headFieldCn: '对应标准',
|
||
// headFieldEn: 'Compare EU/CN',
|
||
// field: 'correspondingStandard',
|
||
// key: 7,
|
||
// moduleFlag: '法规清单'
|
||
// },
|
||
// {
|
||
// sort: '',
|
||
// name: this.$t('implementationCategory'),
|
||
// headFieldCn: '实施类别',
|
||
// headFieldEn: 'Usage',
|
||
// field: 'implementType_dictText',
|
||
// key: 8,
|
||
// moduleFlag: '法规清单'
|
||
// },
|
||
// {
|
||
// sort: '',
|
||
// name: this.$t('ImplementationDate'),
|
||
// headFieldCn: '标准实施日期',
|
||
// headFieldEn: 'New Type Execution Date',
|
||
// field: 'xin1Che1Xing2Shi2Shi1Ri4Qi1',
|
||
// key: 9,
|
||
// moduleFlag: '法规清单'
|
||
// },
|
||
// {
|
||
// sort: '',
|
||
// name: this.$t('vehicleInProductionDate'),
|
||
// headFieldCn: '在产车实施日期',
|
||
// headFieldEn: 'New Vehicle Execution Date',
|
||
// field: 'implementTime',
|
||
// key: 10,
|
||
// moduleFlag: '法规清单'
|
||
// },
|
||
// {
|
||
// sort: '',
|
||
// name: this.$t('certificationType'),
|
||
// headFieldCn: '认证类型',
|
||
// headFieldEn: 'Certification Type',
|
||
// field: 'attestationType_dictText',
|
||
// key: 11,
|
||
// moduleFlag: '法规清单'
|
||
// },
|
||
// {
|
||
// sort: '',
|
||
// name: this.$t('certificationLevel'),
|
||
// headFieldCn: '认证级别',
|
||
// headFieldEn: 'Certification Level',
|
||
// field: 'attestationRank_dictText',
|
||
// key: 12,
|
||
// moduleFlag: '法规清单'
|
||
// },
|
||
// {
|
||
// sort: '',
|
||
// name: this.$t('applicableSupplement'),
|
||
// headFieldCn: '适用增补件',
|
||
// headFieldEn: 'Applicable Supplement',
|
||
// field: 'applicableSupplement',
|
||
// key: 13,
|
||
// moduleFlag: '法规清单'
|
||
// },
|
||
// {
|
||
// sort: '',
|
||
// name: 'WVTA ID',
|
||
// headFieldCn: 'WVTA ID',
|
||
// headFieldEn: 'WVTA ID',
|
||
// field: 'wvtaId',
|
||
// key: 14,
|
||
// 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('certifiedEngineer'),
|
||
// headFieldCn: '认证工程师',
|
||
// headFieldEn: 'Homo Engineer',
|
||
// field: 'homologationEngineerName',
|
||
// key: 17,
|
||
// 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: 19,
|
||
// moduleFlag: '法规清单'
|
||
// },
|
||
// {
|
||
// sort: '',
|
||
// name: this.$t('confirmationOfDesignConformity') + '/' + this.$t('Deliverables'),
|
||
// headFieldCn: '交付物',
|
||
// headFieldEn: 'Deliverables',
|
||
// field: 'designDeliverableTemplateName',
|
||
// affirmFlag: '1',
|
||
// key: 20,
|
||
// moduleFlag: '法规清单'
|
||
// },
|
||
// {
|
||
// sort: '',
|
||
// name: this.$t('confirmationOfDesignConformity') + '/' + this.$t('Sponsor'),
|
||
// headFieldCn: '发起人',
|
||
// headFieldEn: 'Creator',
|
||
// field: 'designInitiatorName',
|
||
// affirmFlag: '1',
|
||
// key: 21,
|
||
// moduleFlag: '法规清单'
|
||
// },
|
||
{
|
||
sort: '',
|
||
name: this.$t('confirmationOfDesignConformity') + '/' + this.$t('personLiable'),
|
||
headFieldCn: '责任人',
|
||
headFieldEn: 'Assignee',
|
||
field: 'designDutyName',
|
||
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: 23,
|
||
moduleFlag: '法规清单'
|
||
},
|
||
// {
|
||
// sort: '',
|
||
// name: this.$t('confirmationOfDesignConformity') + '/' + this.$t('descriptionDeliverables'),
|
||
// headFieldCn: '交付物说明',
|
||
// headFieldEn: 'Instruction',
|
||
// field: 'designRemark',
|
||
// affirmFlag: '1',
|
||
// key: 24,
|
||
// moduleFlag: '法规清单'
|
||
// },
|
||
// {
|
||
// sort: '',
|
||
// name: this.$t('PrehomoConfirmation') + '/' + this.$t('Deliverables'),
|
||
// headFieldCn: '交付物',
|
||
// headFieldEn: 'Deliverables',
|
||
// field: 'prehomoDeliverableTemplateName',
|
||
// affirmFlag: '2',
|
||
// key: 25,
|
||
// moduleFlag: '法规清单'
|
||
// },
|
||
// {
|
||
// sort: '',
|
||
// name: this.$t('PrehomoConfirmation') + '/' + this.$t('Sponsor'),
|
||
// headFieldCn: '发起人',
|
||
// headFieldEn: 'Creator',
|
||
// field: 'prehomoInitiatorName',
|
||
// affirmFlag: '2',
|
||
// key: 26,
|
||
// moduleFlag: '法规清单'
|
||
// },
|
||
// {
|
||
// sort: '',
|
||
// name: this.$t('PrehomoConfirmation') + '/' + this.$t('personLiable'),
|
||
// headFieldCn: '责任人',
|
||
// headFieldEn: 'Assignee',
|
||
// field: 'prehomoDutyName',
|
||
// affirmFlag: '2',
|
||
// key: 27,
|
||
// moduleFlag: '法规清单'
|
||
// },
|
||
// {
|
||
// sort: '',
|
||
// name: this.$t('PrehomoConfirmation') + '/' + this.$t('TaskCutOffTime'),
|
||
// headFieldCn: '截止时间',
|
||
// headFieldEn: 'Due Date',
|
||
// field: 'prehomoDueDate',
|
||
// affirmFlag: '2',
|
||
// key: 28,
|
||
// moduleFlag: '法规清单'
|
||
// },
|
||
// {
|
||
// sort: '',
|
||
// name: this.$t('PrehomoConfirmation') + '/' + this.$t('descriptionDeliverables'),
|
||
// headFieldCn: '交付物说明',
|
||
// headFieldEn: 'Instruction',
|
||
// field: 'prehomoRemark',
|
||
// affirmFlag: '2',
|
||
// key: 29,
|
||
// moduleFlag: '法规清单'
|
||
// },
|
||
// {
|
||
// sort: '',
|
||
// name: this.$t('verificationAndConformityconfirmation') + '/' + this.$t('Deliverables'),
|
||
// headFieldCn: '交付物',
|
||
// headFieldEn: 'Deliverables',
|
||
// field: 'verifyDeliverableTemplateName',
|
||
// affirmFlag: '3',
|
||
// key: 30,
|
||
// moduleFlag: '法规清单'
|
||
// },
|
||
// {
|
||
// sort: '',
|
||
// name: this.$t('verificationAndConformityconfirmation') + '/' + this.$t('Sponsor'),
|
||
// headFieldCn: '发起人',
|
||
// headFieldEn: 'Creator',
|
||
// field: 'verifyInitiatorName',
|
||
// affirmFlag: '3',
|
||
// key: 31,
|
||
// moduleFlag: '法规清单'
|
||
// },
|
||
{
|
||
sort: '',
|
||
name: this.$t('verificationAndConformityconfirmation') + '/' + this.$t('personLiable'),
|
||
headFieldCn: '责任人',
|
||
headFieldEn: 'Assignee',
|
||
field: 'verifyDutyName',
|
||
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('descriptionDeliverables'),
|
||
// headFieldCn: '交付物说明',
|
||
// headFieldEn: 'Instruction',
|
||
// field: 'verifyRemark',
|
||
// affirmFlag: '3',
|
||
// key: 34,
|
||
// 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
|
||
}
|
||
},
|
||
|
||
mounted() {
|
||
// if (this.$route.query.studioEngineer == this.userInfo().id) {
|
||
this.JLoading = true
|
||
this.getHeader()
|
||
// this.getAndUserId()
|
||
this.getRoleByUserId(() => {
|
||
this.getAndUserId()
|
||
})
|
||
if (this.areaOfResponsibilityList && this.areaOfResponsibilityList.dutyTerritory) {
|
||
this.queryParam.dutyTerritory = this.areaOfResponsibilityList.dutyTerritory
|
||
this.queryParam = { ...this.queryParam }
|
||
}
|
||
// } else {
|
||
// this.isDisplay = false
|
||
// }
|
||
|
||
},
|
||
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))
|
||
console.log(this.isRoleSwitching)
|
||
if (!this.isRoleSwitching) {
|
||
for (var i = 0; i < columnResult.length; i++) {
|
||
if (columnResult[i].title === this.$t('operation') && columnResult[i].width == 200) {
|
||
columnResult.splice(i, 1)
|
||
i--
|
||
}
|
||
}
|
||
} else if (this.isRoleSwitching) {
|
||
for (var i = 0; i < columnResult.length; i++) {
|
||
if (columnResult[i].title === this.$t('operation') && columnResult[i].width == 140) {
|
||
columnResult.splice(i, 1)
|
||
i--
|
||
}
|
||
}
|
||
}
|
||
|
||
return columnResult
|
||
}
|
||
},
|
||
methods: {
|
||
...mapGetters(['userInfo']),
|
||
handleToggleSearch() {
|
||
this.toggleSearchStatus = !this.toggleSearchStatus
|
||
},
|
||
viewClick(row) {
|
||
// let roleCodeIndex
|
||
// if (this.isDisplay) {
|
||
// roleCodeIndex = 0
|
||
// } else {
|
||
// roleCodeIndex = 4
|
||
// }
|
||
// if (this.roleSwitchingCode == '11' ||
|
||
// this.roleSwitchingCode == '12' ||
|
||
// this.roleSwitchingCode == '13') {
|
||
// roleCodeIndex = 0
|
||
// }
|
||
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()
|
||
})
|
||
},
|
||
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.isRoleSwitching = true
|
||
// if (this.formInlineRoleSwitching.roleSwitchingCode == '0') {
|
||
// this.isDisplay = true
|
||
// } else {
|
||
// this.isDisplay = false
|
||
// if (this.formInlineRoleSwitching.roleSwitchingCode == '11' || this.formInlineRoleSwitching.roleSwitchingCode == '12' ||
|
||
// this.formInlineRoleSwitching.roleSwitchingCode == '' || this.formInlineRoleSwitching.roleSwitchingCode == '13') {
|
||
// this.isRoleSwitching = false
|
||
// }
|
||
// }
|
||
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('compliancereport') + '-' + serialNumber + '.docx', { id: selectedRowKeys.join(',') })
|
||
}
|
||
},
|
||
handleExport() {
|
||
let roleCodeIndex = this.roleSwitchingCode
|
||
// if (this.isDisplay) {
|
||
// roleCodeIndex = 0
|
||
// } else {
|
||
// roleCodeIndex = 4
|
||
// }
|
||
// if (this.roleSwitchingCode == '11' ||
|
||
// this.roleSwitchingCode == '12' ||
|
||
// this.roleSwitchingCode == '13') {
|
||
// roleCodeIndex = 0
|
||
// }
|
||
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 isTrue
|
||
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].taskAffirmStatus == 'List to confirm' ||
|
||
this.dataSource[i].inventoryAffirmStatus == 'List to confirm') {
|
||
isTrue = true
|
||
} else {
|
||
isTrue = false
|
||
this.$message.warning(this.$t('statusthetasistobeconfirmed'))
|
||
return
|
||
}
|
||
}
|
||
}
|
||
}
|
||
if (isTrue) {
|
||
let _this = this
|
||
this.$confirm({
|
||
content: _this.$t('confirmWithdraw'),
|
||
onOk() {
|
||
let query = {
|
||
ids: selectedRowKeys.join(','),
|
||
projectLibraryId: _this.$route.query.id
|
||
}
|
||
postAction('project/projectLawsInventoryEO/expediting', query).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'))
|
||
}
|
||
},
|
||
questionClick() {
|
||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
||
let isTrue
|
||
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].taskAffirmStatus == 'List to confirm' ||
|
||
this.dataSource[i].inventoryAffirmStatus == 'List to confirm') {
|
||
isTrue = true
|
||
} else {
|
||
isTrue = false
|
||
this.$message.warning(this.$t('OnlyOrTaskconfirmationOut'))
|
||
return
|
||
}
|
||
}
|
||
}
|
||
}
|
||
if (isTrue) {
|
||
let _this = this
|
||
this.$confirm({
|
||
content: _this.$t('ConfirmQuestion'),
|
||
onOk() {
|
||
let query = {
|
||
ids: selectedRowKeys.join(','),
|
||
projectLibraryId: _this.$route.query.id
|
||
}
|
||
postAction('project/projectLawsInventoryEO/expediting', query).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'))
|
||
}
|
||
},
|
||
fixedPlateClick() {
|
||
if (this.dataSource && this.dataSource.length > 0) {
|
||
let isTrue
|
||
for (let i = 0; i < this.dataSource.length; i++) {
|
||
if (this.dataSource[i].taskAffirmStatus == 'Accepted' && this.dataSource[i].inventoryAffirmStatus == 'Accepted') {
|
||
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
|
||
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].taskAffirmStatus == 'Accepted' ||
|
||
// (this.dataSource[i].inventoryAffirmStatus == 'Accepted' && this.dataSource[i].taskAffirmStatus == 'Accepted') ||
|
||
// (this.dataSource[i].inventoryAffirmStatus == 'Rejected' && this.dataSource[i].taskAffirmStatus == 'Accepted') ||
|
||
// (this.dataSource[i].inventoryAffirmStatus == 'Accepted' && this.dataSource[i].taskAffirmStatus == 'Rejected') ||
|
||
// (this.dataSource[i].inventoryAffirmStatus == 'Rejected' && this.dataSource[i].taskAffirmStatus == 'Rejected') ||
|
||
// (this.dataSource[i].inventoryAffirmStatus == 'Accepted' && this.dataSource[i].taskAffirmStatus == 'Not started') ||
|
||
// (this.dataSource[i].inventoryAffirmStatus == 'Rejected' && this.dataSource[i].taskAffirmStatus == 'Not started')) {
|
||
isTrue = true
|
||
// } else {
|
||
// isTrue = false
|
||
// this.$message.warning(this.$t('theTaskConfirmationStatusCannot'))
|
||
// return
|
||
// }
|
||
}
|
||
}
|
||
}
|
||
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.isRoleSwitching = true
|
||
// if (this.formInlineRoleSwitching.roleSwitchingCode == '0') {
|
||
// this.isDisplay = true
|
||
// } else {
|
||
// this.isDisplay = false
|
||
// if (this.formInlineRoleSwitching.roleSwitchingCode == '11' ||
|
||
// this.formInlineRoleSwitching.roleSwitchingCode == '12' ||
|
||
// this.formInlineRoleSwitching.roleSwitchingCode == '13') {
|
||
// this.isRoleSwitching = false
|
||
// }
|
||
// }
|
||
this.roleSwitchingCode = this.formInlineRoleSwitching.roleSwitchingCode
|
||
this.$message.success(this.$t('OperationSuccessful'))
|
||
this.visibleRoleSwitching = false
|
||
this.confirmLoadingRoleSwitching = false
|
||
this.$emit('getRoleSwitch',this.formInlineRoleSwitching.roleSwitchingCode)
|
||
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].inventoryAffirmStatus == 'Not started' || this.dataSource[i].inventoryAffirmStatus == 'Rejected') {
|
||
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) {
|
||
// let roleCodeIndex
|
||
// if (this.isDisplay) {
|
||
// roleCodeIndex = 0
|
||
// } else {
|
||
// roleCodeIndex = 4
|
||
// }
|
||
// if (this.roleSwitchingCode == '11' ||
|
||
// this.roleSwitchingCode == '12' ||
|
||
// this.roleSwitchingCode == '13') {
|
||
// roleCodeIndex = 0
|
||
// }
|
||
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()
|
||
},
|
||
getHeader() {
|
||
getAction('head/headCustomEO/list', {
|
||
moduleFlag: '法规清单'
|
||
}).then((res) => {
|
||
if (res.success) {
|
||
this.columnsAll = this.column
|
||
return
|
||
if (res.result.length != 0) {
|
||
this.columnsAll = res.result
|
||
} else {
|
||
this.columnsAll = this.column
|
||
}
|
||
this.columnsAll.forEach((item, index) => {
|
||
if (item.title != '设计符合性确认' && item.title != 'Pre-Homo确认' && item.title != '验证符合性确认' && item.title != '操作') {
|
||
item.width = 180
|
||
item.align = 'left'
|
||
if (item.title == '编号') {
|
||
item.sorter = true
|
||
item.scopedSlots = {
|
||
customRender: 'standard'
|
||
}
|
||
} else if (item.title == '标题') {
|
||
item.scopedSlots = {
|
||
customRender: 'titleName'
|
||
}
|
||
} else if (item.title == '清单确认状态' || item.title == '任务确认状态' || item.title == '认证级别' || item.title == 'WVTA ID' ||
|
||
item.title == '责任领域' || item.title == '法规工程师' || item.title == '认证工程师' || item.title == '工程接口人') {
|
||
item.sorter = true
|
||
}
|
||
} else {
|
||
delete item.dataIndex
|
||
delete item.fixed
|
||
item.children.forEach((val, index) => {
|
||
val.width = 180
|
||
val.align = 'left'
|
||
val.ellipsis = true
|
||
})
|
||
}
|
||
})
|
||
if (res.result.length != 0) {
|
||
this.columnsAll.push({
|
||
title: this.$t('operation'),
|
||
align: 'left',
|
||
fixed: 'right',
|
||
width: 200,
|
||
scopedSlots: { customRender: 'operation' }
|
||
},
|
||
{
|
||
title: this.$t('operation'),
|
||
align: 'left',
|
||
fixed: 'right',
|
||
width: 140,
|
||
scopedSlots: { customRender: 'operationOne' }
|
||
})
|
||
}
|
||
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
|
||
}
|
||
})
|
||
},
|
||
getList() {
|
||
let roleCode = this.roleSwitchingCode
|
||
// if (this.isDisplay) {
|
||
// roleCode = 0
|
||
// } else {
|
||
// roleCode = 4
|
||
// }
|
||
// if (this.roleSwitchingCode == '11' || this.roleSwitchingCode == '12') {
|
||
// roleCode = 0
|
||
// } else if (this.roleSwitchingCode == '13') {
|
||
// roleCode = 13
|
||
// }
|
||
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) {
|
||
this.checkedList = e.target.checked ? this.customizeList.map(item => item.field) : []
|
||
this.selectedValue = this.checkedList
|
||
this.indeterminate = false
|
||
},
|
||
onChange() {
|
||
this.selectedValue = this.checkedList
|
||
},
|
||
getcustomize() {
|
||
this.customizevisible = true
|
||
},
|
||
cancel() {
|
||
this.customizevisible = 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))
|
||
let isTrue = true
|
||
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].inventoryAffirmStatus == 'Not started' || dataSource[i].inventoryAffirmStatus == 'Rejected') {
|
||
if (dataSource[i].regulationOwnerId) {
|
||
if (dataSource[i].designDeliverableType) {
|
||
// if (!dataSource[i].designInitiatorId) {
|
||
// this.detailedWarningList.push(
|
||
// < div> {dataSource[i].serialNumber + ',' + this.$t('designComplianceReview') + this.$t('Sponsor') + this.$t('cannotEmpty')} < /div>)
|
||
// continue
|
||
// }
|
||
if (!dataSource[i].designDutyId) {
|
||
this.detailedWarningList.push(
|
||
< div> {dataSource[i].serialNumber + ',' + this.$t('designComplianceReview') + this.$t('personLiable') + this.$t('cannotEmpty')} < /div>)
|
||
continue
|
||
}
|
||
if (!dataSource[i].designDueDate) {
|
||
this.detailedWarningList.push(
|
||
< div> {dataSource[i].serialNumber + ',' + this.$t('designComplianceReview') + this.$t('cutoffTime') + this.$t('cannotEmpty')} < /div>)
|
||
continue
|
||
}
|
||
}
|
||
// if (dataSource[i].prehomoDeliverableType) {
|
||
// if (!dataSource[i].prehomoInitiatorId) {
|
||
// this.detailedWarningList.push(
|
||
// < div> {dataSource[i].serialNumber + ',' + this.$t('preHomeConfirmation') + this.$t('Sponsor') + this.$t('cannotEmpty')} < /div>)
|
||
// continue
|
||
// }
|
||
// if (!dataSource[i].prehomoDutyId) {
|
||
// this.detailedWarningList.push(
|
||
// < div> {dataSource[i].serialNumber + ',' + this.$t('preHomeConfirmation') + this.$t('personLiable') + this.$t('cannotEmpty')} < /div>)
|
||
// continue
|
||
// }
|
||
// if (!dataSource[i].prehomoDueDate) {
|
||
// this.detailedWarningList.push(
|
||
// < div> {dataSource[i].serialNumber + ',' + this.$t('preHomeConfirmation') + this.$t('cutoffTime') + this.$t('cannotEmpty')} < /div>)
|
||
// continue
|
||
// }
|
||
// }
|
||
if (dataSource[i].verifyDeliverableType) {
|
||
// if (!dataSource[i].verifyInitiatorId) {
|
||
// this.detailedWarningList.push(
|
||
// < div> {dataSource[i].serialNumber + ',' + this.$t('verificationComplianceReview') + this.$t('Sponsor') + this.$t('cannotEmpty')} < /div>)
|
||
// continue
|
||
// }
|
||
if (!dataSource[i].verifyDutyId) {
|
||
this.detailedWarningList.push(
|
||
< div> {dataSource[i].serialNumber + ',' + this.$t('verificationComplianceReview') + this.$t('personLiable') + this.$t('cannotEmpty')} < /div>)
|
||
continue
|
||
}
|
||
if (!dataSource[i].verifyDueDate) {
|
||
this.detailedWarningList.push(
|
||
< div> {dataSource[i].serialNumber + ',' + this.$t('verificationComplianceReview') + this.$t('cutoffTime') + this.$t('cannotEmpty')} < /div>)
|
||
continue
|
||
}
|
||
}
|
||
this.detailedSuccessList.push(dataSource[i])
|
||
|
||
} else {
|
||
this.detailedWarningList.push(
|
||
< div> {dataSource[i].serialNumber + this.$t('TheEngineerAndCertification')} < /div>)
|
||
// this.$message.warning(this.dataSource[i].serialNumber + this.$t('TheEngineerAndCertification'))
|
||
// isTrue = false
|
||
// return
|
||
}
|
||
} else {
|
||
this.detailedWarningList.push(
|
||
< div> {dataSource[i].serialNumber + ',' + this.$t('pleaseSelectinitiatedOrRejected')} < /div>)
|
||
// this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('pleaseSelectinitiatedOrRejected'))
|
||
// isTrue = false
|
||
// return
|
||
}
|
||
}
|
||
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'))
|
||
}
|
||
},
|
||
|
||
initiateTaskConfirmationClick(name) {
|
||
this.timeName = name
|
||
this.listTitle = this.$t('taskConfirmationDeadline')
|
||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
||
let isTrue = true
|
||
this.TaskSuccessList = []
|
||
this.TaskWarningList = []
|
||
let dataList = []
|
||
for (let i = 0; i < this.dataSource.length; i++) {
|
||
for (let j = 0; j < selectedRowKeys.length; j++) {
|
||
if (this.dataSource[i].id == selectedRowKeys[j]) {
|
||
dataList.push(this.dataSource[i])
|
||
}
|
||
}
|
||
}
|
||
for (let i = 0; i < dataList.length; i++) {
|
||
if ((dataList[i].taskAffirmStatus == 'Not started' || dataList[i].taskAffirmStatus == 'Rejected') &&
|
||
dataList[i].inventoryAffirmStatus == 'Accepted') {
|
||
if (dataList[i].engineeringInterfacePerson) {
|
||
if (dataList[i].verifyDeliverableType) {
|
||
if (dataList[i].verifyDueDate && dataList[i].verifyDutyId
|
||
&& dataList[i].verifyInitiatorId) {
|
||
} else {
|
||
this.TaskWarningList.push(
|
||
< div> {dataList[i].serialNumber + this.$t('pleaseConformityVerification')} < /div>)
|
||
continue
|
||
// isTrue = false
|
||
// this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('pleaseConformityVerification'))
|
||
// return
|
||
}
|
||
}
|
||
|
||
if (dataList[i].prehomoDeliverableType) {
|
||
if (dataList[i].prehomoDueDate && dataList[i].prehomoDutyId
|
||
&& dataList[i].prehomoInitiatorId) {
|
||
} else {
|
||
this.TaskWarningList.push(
|
||
< div> {dataList[i].serialNumber + this.$t('pleaseConfirmedByPrehomo')} < /div>)
|
||
continue
|
||
// isTrue = false
|
||
// this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('pleaseConfirmedByPrehomo'))
|
||
// return
|
||
}
|
||
}
|
||
|
||
if (dataList[i].designDeliverableType) {
|
||
if (dataList[i].designDueDate && dataList[i].designDutyId
|
||
&& dataList[i].designInitiatorId) {
|
||
} else {
|
||
this.TaskWarningList.push(
|
||
< div> {dataList[i].serialNumber + this.$t('pleaseDesignConformityConfirmation')} < /div>)
|
||
continue
|
||
// isTrue = false
|
||
// this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('pleaseDesignConformityConfirmation'))
|
||
// return
|
||
}
|
||
}
|
||
this.TaskSuccessList.push(dataList[i])
|
||
} else {
|
||
this.TaskWarningList.push(< div> {dataList[i].serialNumber + this.$t('theProjectContactEmpty')} < /div>)
|
||
// isTrue = false
|
||
// this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('theProjectContactEmpty'))
|
||
// return
|
||
}
|
||
} else {
|
||
this.TaskWarningList.push(
|
||
< div> {dataList[i].serialNumber + this.$t('PleaseTaskConfirmationRejected')} < /div>)
|
||
// isTrue = false
|
||
// this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('PleaseTaskConfirmationRejected'))
|
||
// return
|
||
}
|
||
}
|
||
if (this.TaskSuccessList && this.TaskSuccessList.length > 0) {
|
||
this.visible = true
|
||
this.formInline = {}
|
||
} else {
|
||
let that = this
|
||
this.$warning({
|
||
content: (
|
||
< div>
|
||
{that.TaskWarningList}
|
||
< /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 = []
|
||
})
|
||
} else {
|
||
// for (let i = 0; i < this.TaskSuccessList.length; i++) {
|
||
// ((i) => {
|
||
// this.TaskSuccessList[i].taskAffirmDueDate = this.formInline.taskAffirmDueDate
|
||
// Object.keys(this.TaskSuccessList[i]).forEach(res => {
|
||
// if (this.TaskSuccessList[i][res] && this.TaskSuccessList[i][res] instanceof String) {
|
||
// this.TaskSuccessList[i][res] = this.TaskSuccessList[i][res].replace(/\"/g, '“')
|
||
// this.TaskSuccessList[i][res] = this.TaskSuccessList[i][res].replace(/\'/g, '‘')
|
||
// }
|
||
// })
|
||
// setTimeout(() => {
|
||
// this.confirmLoading = true
|
||
// this.startProcess(this.TaskSuccessList[i], (i + 1))
|
||
// }, 500)
|
||
// })(i)
|
||
// }
|
||
let TaskSuccessList = JSON.parse(JSON.stringify(this.TaskSuccessList))
|
||
for (let i = 0; i < TaskSuccessList.length; i++) {
|
||
TaskSuccessList[i].taskAffirmDueDate = this.formInline.taskAffirmDueDate
|
||
Object.keys(TaskSuccessList[i]).forEach(res => {
|
||
if (TaskSuccessList[i][res] && TaskSuccessList[i][res] instanceof String) {
|
||
TaskSuccessList[i][res] = TaskSuccessList[i][res].replace(/\"/g, '“')
|
||
TaskSuccessList[i][res] = TaskSuccessList[i][res].replace(/\'/g, '‘')
|
||
}
|
||
})
|
||
}
|
||
this.confirmLoading = true
|
||
this.startProcess(TaskSuccessList)
|
||
}
|
||
}
|
||
})
|
||
},
|
||
|
||
startProcess(value) {
|
||
let query = {
|
||
type: 1,
|
||
projectLawsInvnetoryList: value,
|
||
projectNameId: this.$route.query.projectNameId,
|
||
projectName: this.$route.query.projectName,
|
||
projectLawsInventoryId: value.id,
|
||
taskAffirmDueDate: this.formInline.taskAffirmDueDate
|
||
}
|
||
postAction('/workFlow/startProcess', query).then((res) => {
|
||
if (res.success) {
|
||
this.visible = false
|
||
this.selectedRowKeys = []
|
||
this.$message.success(this.$t('OperationSuccessful'))
|
||
this.confirmLoading = false
|
||
this.getList()
|
||
let that = this
|
||
if (this.TaskWarningList.length > 0) {
|
||
this.$warning({
|
||
content: (
|
||
< div>
|
||
{that.TaskWarningList}
|
||
< /div>
|
||
)
|
||
})
|
||
}
|
||
// this.completeTask(value, res.result, index)
|
||
} else {
|
||
this.$message.warning(this.$t('operationFailed'))
|
||
}
|
||
})
|
||
},
|
||
|
||
completeTask(value, taskId, index) {
|
||
let handlingTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
||
value.handlingTime = handlingTime
|
||
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) {
|
||
if (index == this.TaskSuccessList.length) {
|
||
this.visible = false
|
||
this.selectedRowKeys = []
|
||
this.$message.success(this.$t('OperationSuccessful'))
|
||
this.confirmLoading = false
|
||
this.getList()
|
||
let that = this
|
||
if (this.TaskWarningList.length > 0) {
|
||
this.$warning({
|
||
content: (
|
||
< div>
|
||
{that.TaskWarningList}
|
||
< /div>
|
||
)
|
||
})
|
||
}
|
||
}
|
||
} else {
|
||
this.$message.warning(this.$t('operationFailed'))
|
||
}
|
||
})
|
||
},
|
||
|
||
getRowKeys(value, num, callBack) {
|
||
let isTrue = true
|
||
let dataSource = []
|
||
for (let i = 0; i < this.dataSource.length; i++) {
|
||
for (let j = 0; j < value.length; j++) {
|
||
if (this.dataSource[i].id == value[j]) {
|
||
dataSource.push(this.dataSource[i])
|
||
}
|
||
}
|
||
}
|
||
this.rowKeysSuccessList = []
|
||
this.rowKeysWarningList = []
|
||
for (let i = 0; i < dataSource.length; i++) {
|
||
if (dataSource[i].inventoryAffirmStatus == 'List to confirm' || dataSource[i].inventoryAffirmStatus == 'Rejected') {
|
||
if (dataSource[i].roleCode == 1 && dataSource[i].regulationOwnerSubmitStatus) {
|
||
|
||
this.rowKeysWarningList.push(< div> {dataSource[i].serialNumber + this.$t('submitted')} < /div>)
|
||
continue
|
||
// isTrue = false
|
||
// this.$message.warning(dataSource[i].serialNumber + this.$t('submitted'))
|
||
// return
|
||
} else if (dataSource[i].roleCode == 2 && dataSource[i].homologationEngineerSubmitStatus) {
|
||
|
||
this.rowKeysWarningList.push(< div> {dataSource[i].serialNumber + this.$t('submitted')} < /div>)
|
||
continue
|
||
// isTrue = false
|
||
// this.$message.warning(dataSource[i].serialNumber + this.$t('submitted'))
|
||
// return
|
||
} else if (dataSource[i].roleCode == 4 && (dataSource[i].homologationEngineerSubmitStatus && dataSource[i].regulationOwnerSubmitStatus)) {
|
||
|
||
this.rowKeysWarningList.push(< div> {dataSource[i].serialNumber + this.$t('submitted')} < /div>)
|
||
continue
|
||
// isTrue = false
|
||
// this.$message.warning(dataSource[i].serialNumber + this.$t('submitted'))
|
||
// return
|
||
}
|
||
if (num == 1) {
|
||
if ((dataSource[i].designInitiatorId == dataSource[i].regulationOwnerId
|
||
&& dataSource[i].designInitiatorId == this.userInfo().id) ||
|
||
(dataSource[i].designInitiatorId == dataSource[i].homologationEngineerId
|
||
&& dataSource[i].designInitiatorId == this.userInfo().id)) {
|
||
if (!dataSource[i].designDutyId && !dataSource[i].designDueDate) {
|
||
this.rowKeysWarningList.push(
|
||
< div> {dataSource[i].serialNumber + this.$t('confirmationOfDesignConformity') + this.$t('theResponsiblePersonAndDeadlineClank')} < /div>)
|
||
continue
|
||
} else if (!dataSource[i].designDutyId) {
|
||
this.rowKeysWarningList.push(
|
||
< div> {dataSource[i].serialNumber + this.$t('confirmationOfDesignConformity') + this.$t('theResponsiblePersonEmpty')} < /div>)
|
||
continue
|
||
} else if (!dataSource[i].designDueDate) {
|
||
this.rowKeysWarningList.push(
|
||
< div> {dataSource[i].serialNumber + this.$t('confirmationOfDesignConformity') + this.$t('theDeadlineEmpty')} < /div>)
|
||
continue
|
||
} else if (!dataSource[i].designDeliverableType) {
|
||
this.rowKeysWarningList.push(
|
||
< div> {dataSource[i].serialNumber + this.$t('confirmationOfDesignConformity') + this.$t('theDeliveryTypeCannotBeEmpty')} < /div>)
|
||
continue
|
||
}
|
||
}
|
||
if ((dataSource[i].prehomoInitiatorId == dataSource[i].regulationOwnerId
|
||
&& dataSource[i].prehomoInitiatorId == this.userInfo().id) ||
|
||
(dataSource[i].prehomoInitiatorId == dataSource[i].homologationEngineerId
|
||
&& dataSource[i].prehomoInitiatorId == this.userInfo().id)) {
|
||
if (!dataSource[i].prehomoDutyId && !dataSource[i].prehomoDueDate) {
|
||
this.rowKeysWarningList.push(
|
||
< div> {dataSource[i].serialNumber + this.$t('PrehomoConfirmation') + this.$t('theResponsiblePersonAndDeadlineClank')} < /div>)
|
||
continue
|
||
} else if (!dataSource[i].prehomoDutyId) {
|
||
this.rowKeysWarningList.push(
|
||
< div> {dataSource[i].serialNumber + this.$t('PrehomoConfirmation') + this.$t('theResponsiblePersonEmpty')} < /div>)
|
||
continue
|
||
} else if (!dataSource[i].prehomoDueDate) {
|
||
this.rowKeysWarningList.push(
|
||
< div> {dataSource[i].serialNumber + this.$t('PrehomoConfirmation') + this.$t('theDeadlineEmpty')} < /div>)
|
||
continue
|
||
} else if (!dataSource[i].prehomoDeliverableType) {
|
||
this.rowKeysWarningList.push(
|
||
< div> {dataSource[i].serialNumber + this.$t('PrehomoConfirmation') + this.$t('theDeliveryTypeCannotBeEmpty')} < /div>)
|
||
continue
|
||
}
|
||
}
|
||
if ((dataSource[i].verifyInitiatorId == dataSource[i].regulationOwnerId
|
||
&& dataSource[i].verifyInitiatorId == this.userInfo().id) ||
|
||
(dataSource[i].verifyInitiatorId == dataSource[i].homologationEngineerId
|
||
&& dataSource[i].verifyInitiatorId == this.userInfo().id)) {
|
||
if (!dataSource[i].verifyDutyId && !dataSource[i].verifyDueDate) {
|
||
this.rowKeysWarningList.push(
|
||
< div> {dataSource[i].serialNumber + this.$t('verificationAndConformityconfirmation') + this.$t('theResponsiblePersonAndDeadlineClank')} < /div>)
|
||
continue
|
||
} else if (!dataSource[i].verifyDutyId) {
|
||
this.rowKeysWarningList.push(
|
||
< div> {dataSource[i].serialNumber + this.$t('verificationAndConformityconfirmation') + this.$t('theResponsiblePersonEmpty')} < /div>)
|
||
continue
|
||
} else if (!dataSource[i].verifyDueDate) {
|
||
this.rowKeysWarningList.push(
|
||
< div> {dataSource[i].serialNumber + this.$t('verificationAndConformityconfirmation') + this.$t('theDeadlineEmpty')} < /div>)
|
||
continue
|
||
} else if (!dataSource[i].verifyDeliverableType) {
|
||
this.rowKeysWarningList.push(
|
||
< div> {dataSource[i].serialNumber + this.$t('verificationAndConformityconfirmation') + this.$t('theDeliveryTypeCannotBeEmpty')} < /div>)
|
||
continue
|
||
}
|
||
}
|
||
}
|
||
this.rowKeysSuccessList.push(dataSource[i])
|
||
} else {
|
||
this.rowKeysWarningList.push(< div> {dataSource[i].serialNumber + this.$t('incorrectsubmitted')} < /div>)
|
||
// isTrue = false
|
||
// this.$message.warning(dataSource[i].serialNumber+ this.$t('incorrectsubmitted'))
|
||
// return
|
||
}
|
||
}
|
||
|
||
if (this.rowKeysSuccessList && this.rowKeysSuccessList.length > 0) {
|
||
callBack && callBack()
|
||
} else {
|
||
let that = this
|
||
this.$warning({
|
||
content: (
|
||
< div>
|
||
{that.rowKeysWarningList}
|
||
< /div>
|
||
)
|
||
})
|
||
}
|
||
},
|
||
|
||
updateStatusBatch(num, selectedRowKeys) {
|
||
let _this = this
|
||
let lawsInventoryList = []
|
||
for (let i = 0; i < this.rowKeysSuccessList.length; i++) {
|
||
let roleCode
|
||
if (this.rowKeysSuccessList[i].regulationOwnerId == this.userInfo().id &&
|
||
this.rowKeysSuccessList[i].homologationEngineerId == this.userInfo().id) {
|
||
roleCode = 4
|
||
} else if (this.rowKeysSuccessList[i].regulationOwnerId == this.userInfo().id) {
|
||
roleCode = 1
|
||
} else if (this.rowKeysSuccessList[i].homologationEngineerId == this.userInfo().id) {
|
||
roleCode = 2
|
||
}
|
||
lawsInventoryList.push({
|
||
id: this.rowKeysSuccessList[i].id,
|
||
roleCode: roleCode
|
||
})
|
||
}
|
||
let query = {
|
||
operatorType: 1,
|
||
lawsInventoryList: lawsInventoryList,
|
||
projectLibraryId: _this.$route.query.id,
|
||
operatorResult: num
|
||
}
|
||
postAction(_this.url.updateStatusBatch, 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
|
||
}
|
||
if (this.rowKeysWarningList && this.rowKeysWarningList.length > 0) {
|
||
let that = this
|
||
this.$warning({
|
||
content: (
|
||
< div>
|
||
{that.rowKeysWarningList}
|
||
< /div>
|
||
)
|
||
})
|
||
}
|
||
this.rowKeysWarningList = []
|
||
this.rowKeysSuccessList = []
|
||
})
|
||
},
|
||
|
||
submitClick(num) {
|
||
let _this = this
|
||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||
this.$confirm({
|
||
content: num == 0 ? _this.$t('confirmLaunchTask') : _this.$t('confirmreturn'),
|
||
onOk() {
|
||
if (num == 0) {
|
||
let selectedRowKeys = JSON.parse(JSON.stringify(_this.selectedRowKeys))
|
||
_this.getRowKeys(selectedRowKeys, 1, function() {
|
||
_this.updateStatusBatch(num, selectedRowKeys)
|
||
})
|
||
} else {
|
||
let selectedRowKeys = JSON.parse(JSON.stringify(_this.selectedRowKeys))
|
||
_this.getRowKeys(selectedRowKeys, 2, function() {
|
||
_this.visibleComment = true
|
||
_this.formInlineComment = {}
|
||
_this.$nextTick(() => {
|
||
_this.$refs.ruleFormComment.clearValidate()
|
||
})
|
||
})
|
||
}
|
||
}
|
||
})
|
||
} else {
|
||
this.$message.warning(this.$t('selectLeastOne'))
|
||
}
|
||
},
|
||
handleOkComment() {
|
||
this.$refs.ruleFormComment.validate(valid => {
|
||
if (valid) {
|
||
let url = '/project/projectCommentEO/add'
|
||
let content = []
|
||
let ids = []
|
||
if (this.rowKeysSuccessList && this.rowKeysSuccessList.length > 0) {
|
||
this.rowKeysSuccessList.forEach(res => {
|
||
content.push(res.serialNumber)
|
||
ids.push(res.id)
|
||
})
|
||
}
|
||
let query = {
|
||
commentContent: this.$t('For') + content.join(',') + this.$t('markedRejection') + ':' + this.formInlineComment.commentContent,
|
||
projectLibraryId: this.$route.query.id
|
||
}
|
||
this.rejectCauseAdd(this.formInlineComment.commentContent, ids)
|
||
this.confirmLoadingComment = true
|
||
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
||
this.updateStatusBatch(1, selectedRowKeys)
|
||
postAction(url, query).then((res) => {
|
||
if (res.success) {
|
||
this.visibleComment = false
|
||
this.confirmLoadingComment = false
|
||
} else {
|
||
this.confirmLoadingComment = false
|
||
}
|
||
})
|
||
}
|
||
})
|
||
},
|
||
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') : ''
|
||
},
|
||
|
||
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 })
|
||
}
|
||
},
|
||
|
||
pdfPreviewClick(name, id) {
|
||
let fileName = name
|
||
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=' + id + '&userName=' + this.userInfo().username))
|
||
} else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
|
||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix)
|
||
window.open(url, '_blank')
|
||
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|
||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + 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 + '/' + id + fileSuffix)
|
||
window.open(url, '_blank')
|
||
} else {
|
||
downloadFile('/sys/common/downLoadFile', name, { id: id, userName: this.userInfo().username })
|
||
}
|
||
},
|
||
|
||
download(item) {
|
||
downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id, userName: this.userInfo().username })
|
||
},
|
||
|
||
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.getList()
|
||
} else {
|
||
_this.$message.warning(_this.$t('operationFailed'))
|
||
}
|
||
})
|
||
}
|
||
})
|
||
} else {
|
||
this.$message.warning(this.$t('selectLeastOne'))
|
||
}
|
||
},
|
||
|
||
resultReportedClick(val) {
|
||
if (val.regulationOwnerId == this.userInfo().id) {
|
||
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')
|
||
}
|
||
}
|
||
}
|
||
</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;
|
||
}
|
||
</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;
|
||
}
|
||
|
||
/* 插件 end */
|
||
</style> |