update 项目库
This commit is contained in:
@@ -8,10 +8,35 @@ const editVehicleItemLibrary = (params) => postAction('/projectLibrary/lawsProje
|
||||
const queryByIdVehicleItemLibrary = (params) => getAction('/projectLibrary/lawsProjectLibrary/queryById', params)
|
||||
// 车型项目下拉数据
|
||||
const getCarTypeProjectList = (params) => getAction('/projectLibrary/lawsProjectLibrary/queryList', params)
|
||||
// 车型项目库-详情-项目风险性总览
|
||||
const queryProjectRiskOverview = (params) => getAction('/projectLibrary/lawsProjectLibrary/riskOverview', params)
|
||||
// 车型项目库-详情-法规清单-调取
|
||||
const transferRegulationList = (params) => postAction('/projectLibrary/lawsAssess/retrieval', params)
|
||||
// 车型项目库-详情-法规清单-复制
|
||||
const copyProject = (params) => postAction('/projectLibrary/lawsAssess/copy', params)
|
||||
|
||||
// 未符合项-新增
|
||||
const addInconformityItem = (params) => postAction('/projectLibrary/lawsEvaluationNotMet/add', params)
|
||||
// 未符合项-编辑
|
||||
const editInconformityItem = (params) => postAction('/projectLibrary/lawsEvaluationNotMet/edit', params)
|
||||
// 未符合项-批量关闭
|
||||
const batchCloseInconformityItem = (params) => postAction('/projectLibrary/lawsEvaluationNotMet/batchClose', params)
|
||||
|
||||
// 专项项目库-编辑
|
||||
const editSpecialProjectLibrary = (params) => postAction('', params)
|
||||
|
||||
export {
|
||||
addVehicleItemLibrary,
|
||||
editVehicleItemLibrary,
|
||||
queryByIdVehicleItemLibrary,
|
||||
getCarTypeProjectList
|
||||
getCarTypeProjectList,
|
||||
queryProjectRiskOverview,
|
||||
transferRegulationList,
|
||||
copyProject,
|
||||
|
||||
addInconformityItem,
|
||||
editInconformityItem,
|
||||
batchCloseInconformityItem,
|
||||
|
||||
editSpecialProjectLibrary
|
||||
}
|
||||
|
||||
+15
-15
@@ -672,23 +672,23 @@
|
||||
width: calc((100% - 32px) / 3);
|
||||
display: flex;
|
||||
margin: 0 16px 16px 0;
|
||||
}
|
||||
|
||||
label {
|
||||
width: 7.5em;
|
||||
font-size: 16px;
|
||||
font-family: PingFang SC-Regular, PingFang SC, sans-serif;
|
||||
font-weight: 400;
|
||||
color: #86909C;
|
||||
}
|
||||
.detail-page-part-form-item > label {
|
||||
width: 7.5em;
|
||||
font-size: 16px;
|
||||
font-family: PingFang SC-Regular, PingFang SC, sans-serif;
|
||||
font-weight: 400;
|
||||
color: #86909C;
|
||||
}
|
||||
|
||||
span {
|
||||
word-break: break-all;
|
||||
font-size: 16px;
|
||||
font-family: PingFang SC-Regular, PingFang SC, sans-serif;
|
||||
color: #1D2129;
|
||||
flex: 1;
|
||||
width: 0;
|
||||
}
|
||||
.detail-page-part-form-item > span {
|
||||
word-break: break-all;
|
||||
font-size: 16px;
|
||||
font-family: PingFang SC-Regular, PingFang SC, sans-serif;
|
||||
color: #1D2129;
|
||||
flex: 1;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.detail-page-part-form-item:nth-child(3n) {
|
||||
|
||||
@@ -30,6 +30,36 @@ module.exports = {
|
||||
processState: '流程状态',
|
||||
evaluationResult: '评估结果',
|
||||
responsibleDepartment: '责任部门',
|
||||
evaluationResultHistory: '评估结果历史'
|
||||
evaluationResultHistory: '评估结果历史',
|
||||
evaluationProcessDetail: '评估流程详情',
|
||||
standardNumberClauseNumber: '标准编号/条款号',
|
||||
projectNumber: '项目编号',
|
||||
evaluator: '评估人',
|
||||
dateOfEvaluation: '评估日期',
|
||||
nonConformanceTerm: '不符合项',
|
||||
solutions: '应对措施',
|
||||
riskPoint: '风险点',
|
||||
verificationScheme: '验证方案',
|
||||
estimateTheChangeCycle: '预估更改周期',
|
||||
estimatedDateOfCompletionOfRectification:'预计整改完成日期'
|
||||
},
|
||||
noncoincidenceItem: {
|
||||
noncoincidenceItem: '未符合项',
|
||||
batchClose: '批量关闭',
|
||||
actualRectificationCompletionDate: '实际整改完成日期',
|
||||
projectSelection: '项目选择',
|
||||
relevantProject: '相关项目',
|
||||
relatedProcess: '相关流程',
|
||||
viewNonMatchItemEvaluationResult: '查看未符合项评估结果',
|
||||
involvedItem: '涉及项目'
|
||||
},
|
||||
specialProjectLibrary: {
|
||||
specialProjectLibrary: '专项项目库',
|
||||
vehicleSeries: '车型系列',
|
||||
complianceAssessmentResults: '合规评估结果',
|
||||
basisDescription: '依据描述',
|
||||
whetherToApproveAProjectOrNot: '是否立项',
|
||||
vehicleModel: '车型',
|
||||
supportingMaterial: '佐证材料'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -511,7 +511,8 @@ module.exports = {
|
||||
specialty: '特点',
|
||||
comparisonItem: '比对项',
|
||||
relatedAccessory: '相关附件',
|
||||
reserveAnItem: '至少需要保留一项'
|
||||
reserveAnItem: '至少需要保留一项',
|
||||
enterTheListNameFirst: '请先输入清单名称,选择标准后将保存数据'
|
||||
},
|
||||
// 标准预警
|
||||
standardWarning: {
|
||||
|
||||
@@ -32,7 +32,7 @@ import { Base64 } from 'js-base64'
|
||||
// 支持预览的文件类型
|
||||
const CAN_PREVIEW_FILE_TYPE = ['pdf', 'image']
|
||||
// 支持预览的文件后缀
|
||||
const CAN_PREVIEW_FILE_SUFFIX = ['jpg', 'jpeg', 'png', 'raw', 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'txt', 'mp3', 'mp4', 'flv']
|
||||
const CAN_PREVIEW_FILE_SUFFIX = ['jpg', 'jpeg', 'png', 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx']
|
||||
const FILE_TYPE_IMGS = ['jpg', 'jpeg', 'png', 'raw']
|
||||
const FILE_TYPE_PDF = 'pdf'
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ import FlowChartModal from './FlowChartModal.vue'
|
||||
import UploadFile from './UploadFile'
|
||||
|
||||
// 支持预览的文件后缀
|
||||
const CAN_PREVIEW_FILE_SUFFIX = ['jpg', 'jpeg', 'png', 'raw', 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'txt', 'mp3', 'mp4', 'flv']
|
||||
const CAN_PREVIEW_FILE_SUFFIX = ['jpg', 'jpeg', 'png', 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx']
|
||||
const FILE_TYPE_IMGS = ['jpg', 'jpeg', 'png', 'raw']
|
||||
const FILE_TYPE_PDF = 'pdf'
|
||||
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
<template>
|
||||
<div class="selection-wrapper">
|
||||
<div class="box-title-text">
|
||||
<a-input class="box-input"
|
||||
:value="checkedValue"
|
||||
:title="checkedValue"
|
||||
disabled
|
||||
:max-length="500"
|
||||
@change="event => event.target.value = event.target.value.trim()"
|
||||
:placeholder="placeholder" />
|
||||
<a-button v-if="!disabled" type="primary" class="button-box" @click="handleClick">
|
||||
{{ $t('projectLibrary.noncoincidenceItem.projectSelection') }}
|
||||
</a-button>
|
||||
</div>
|
||||
|
||||
<vehicle-project-selection-drawer ref="projectSelectModal" @listChange="handleListChange" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import VehicleProjectSelectionDrawer from './VehicleProjectSelectionDrawer'
|
||||
|
||||
export default {
|
||||
name: 'VehicleProjectSelection',
|
||||
components: { VehicleProjectSelectionDrawer },
|
||||
props: {
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 是否只能选择
|
||||
selectOnly: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
},
|
||||
// 名字字符串
|
||||
nameStr: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: ''
|
||||
},
|
||||
// 回显取哪个字段的值
|
||||
echoFieldName: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: 'projectName'
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
checkedValue: null
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
nameStr: {
|
||||
immediate: true,
|
||||
handler (val) {
|
||||
this.checkedValue = val
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 点击选择标准按钮
|
||||
handleClick () {
|
||||
this.$refs.projectSelectModal.open()
|
||||
},
|
||||
handleListChange (list) {
|
||||
const ids = list.map(tt => tt.id).join(',')
|
||||
this.checkedValue = list.map(tt => tt[this.echoFieldName]).join(',')
|
||||
this.$emit('change', ids)
|
||||
this.$emit('listChange', list)
|
||||
}
|
||||
},
|
||||
model: {
|
||||
prop: 'value',
|
||||
event: 'change'
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.selection-wrapper {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.box-title-text {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.box-input {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.button-box {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .ant-input[disabled] {
|
||||
background-color: white;
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
}
|
||||
</style>
|
||||
@@ -7,17 +7,81 @@
|
||||
@close="onClose"
|
||||
:visible="visible"
|
||||
:maskClosable="false"
|
||||
destroyOnClose
|
||||
class="custom-drawer-style">
|
||||
<div class="custom-drawer-style-scroll">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
</a-spin>
|
||||
|
||||
<!--查询区域-->
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<!--项目名称-->
|
||||
<a-col :md="6" :sm="12">
|
||||
<a-form-item :label="$t('projectLibrary.projectName')">
|
||||
<j-input :placeholder="$t('pleaseEnter') + $t('projectLibrary.projectName')" v-model="queryParam.projectName"></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!--工作令编号-->
|
||||
<a-col :md="6" :sm="12">
|
||||
<a-form-item :label="$t('projectLibrary.workOrderNumber')">
|
||||
<j-input :placeholder="$t('pleaseEnter') + $t('projectLibrary.workOrderNumber')" v-model="queryParam.workNumber"></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!--项目健康状态-->
|
||||
<a-col :md="6" :sm="12">
|
||||
<a-form-item :label="$t('projectLibrary.projectHealthStatus')">
|
||||
<j-dict-select-tag
|
||||
class="box-input"
|
||||
v-model="queryParam.projectHealth"
|
||||
:placeholder="$t('pleaseSelect') + $t('projectLibrary.projectHealthStatus')"
|
||||
:type="'select'"
|
||||
:triggerChange="false"
|
||||
:dictCode="'project_health'" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :md="6" :sm="8">
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="searchReset" icon="reload" ghost>{{ $t('reset') }}</a-button>
|
||||
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 8px" v-has="'vehicleItemLibrary:search'">
|
||||
{{ $t('query') }}
|
||||
</a-button>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
|
||||
<j-table
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:can-drag="true"
|
||||
rowKey="id"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:pagination="ipagination"
|
||||
:scroll="{x: '100%'}"
|
||||
:loading="loading"
|
||||
@change="handleTableChange">
|
||||
</j-table>
|
||||
</div>
|
||||
|
||||
<div class="custom-drawer-style-bottom-btn">
|
||||
<a-button @click="handleCancel" style="margin-bottom: 0;" :loading="loading">{{ $t('close') }}</a-button>
|
||||
<a-button @click="handleOk" type="primary" style="margin-bottom: 0;" :loading="loading">
|
||||
{{ $t('preservation') }}
|
||||
</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import JTable from '../jero/JTable'
|
||||
import { JeroListMixin } from '../../mixins/JeroListMixin'
|
||||
|
||||
export default {
|
||||
name: 'VehicleProjectSelectionDrawer',
|
||||
components: { JTable },
|
||||
mixins: [JeroListMixin],
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
@@ -26,57 +90,62 @@ export default {
|
||||
// 存储表单的数据
|
||||
form: {},
|
||||
isEdit: false,
|
||||
confirmLoading: false,
|
||||
columns: [
|
||||
// 项目来源
|
||||
{
|
||||
dataIndex: 'projectSource_dictText',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.projectSource'),
|
||||
width: 250
|
||||
width: 110
|
||||
},
|
||||
// 项目名称
|
||||
{
|
||||
dataIndex: 'projectName',
|
||||
title: this.$t('projectLibrary.projectName'),
|
||||
sorter: true,
|
||||
width: 250,
|
||||
scopedSlots: { customRender: 'projectName' }
|
||||
width: 150
|
||||
},
|
||||
// 工作令编号
|
||||
{
|
||||
dataIndex: 'workNumber',
|
||||
title: this.$t('projectLibrary.workOrderNumber'),
|
||||
sorter: true,
|
||||
width: 250
|
||||
width: 150
|
||||
},
|
||||
// 项目负责人
|
||||
{
|
||||
dataIndex: 'nameWorkNo',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.projectLeader'),
|
||||
width: 250
|
||||
width: 150
|
||||
},
|
||||
// 项目健康状态
|
||||
{
|
||||
dataIndex: 'projectHealth_dictText',
|
||||
title: this.$t('projectLibrary.projectHealthStatus'),
|
||||
width: 250
|
||||
},
|
||||
// 操作
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
fixed: 'right',
|
||||
width: 150,
|
||||
scopedSlots: { customRender: 'operation' }
|
||||
width: 120
|
||||
}
|
||||
],
|
||||
disableMixinCreated: true,
|
||||
url: {
|
||||
list: '/projectLibrary/lawsProjectLibrary/page'
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open () {
|
||||
this.visible = true
|
||||
this.loadData(1)
|
||||
},
|
||||
onClose () {
|
||||
this.visible = false
|
||||
this.onClearSelected()
|
||||
},
|
||||
handleCancel () {
|
||||
this.onClose()
|
||||
},
|
||||
handleOk () {
|
||||
this.$emit('change', this.selectedRowKeys.join(','))
|
||||
this.$emit('listChange', this.selectionRows)
|
||||
this.onClose()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,3 +236,11 @@ export const SenderType = {
|
||||
moduleOwner: { text: '模块负责人', value: '1' },
|
||||
designEngineer: { text: '设计工程师', value: '2' }
|
||||
}
|
||||
|
||||
// 项目评估结果类型
|
||||
export const EvaluationResultType = new EsEnums({
|
||||
accordWith: { text: '符合', value: '1' },
|
||||
inconformity: { text: '不符合', value: '2' },
|
||||
toBeVerified: { text: '待验证', value: '3' },
|
||||
uninvolved: { text: '不涉及', value: '4' }
|
||||
})
|
||||
@@ -215,6 +215,7 @@ export default {
|
||||
.readonly-input {
|
||||
/deep/ .ant-input[disabled] {
|
||||
background-color: white;
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,313 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
<!--查询-->
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<!--标准号-->
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item :label="$t('standardNumber')" :labelCol="{span: 6}" :wrapperCol="{span: 14}">
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('standardNumber')"
|
||||
v-model="queryParam.standardNumber"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!--标准名称-->
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item :label="$t('standardName')" :labelCol="{span: 6}" :wrapperCol="{span: 14}">
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('standardName')"
|
||||
v-model="queryParam.standardName"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!--项目名称-->
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item :label="$t('projectLibrary.projectName')" :labelCol="{span: 6}" :wrapperCol="{span: 14}">
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('projectLibrary.projectName')"
|
||||
v-model="queryParam.projectName"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<template v-if="toggleSearchStatus">
|
||||
<!--责任部门-->
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item :label="$t('projectLibrary.vehicleItemLibrary.responsibleDepartment')"
|
||||
:labelCol="{span: 6}"
|
||||
:wrapperCol="{span: 14}">
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('projectLibrary.vehicleItemLibrary.responsibleDepartment')"
|
||||
v-model="queryParam.departmentId" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!--整改状态-->
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item :label="$t('enterpriseStandardLibrary.check.rectificationStatus')"
|
||||
:labelCol="{span: 6}"
|
||||
:wrapperCol="{span: 14}">
|
||||
<j-dict-select-tag v-model="queryParam.state"
|
||||
:placeholder="$t('pleaseSelect')+$t('enterpriseStandardLibrary.check.rectificationStatus')"
|
||||
type="select"
|
||||
:triggerChange="false"
|
||||
dict-code="assess_rectification" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!--预计整改完成日期-->
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item :label="$t('projectLibrary.vehicleItemLibrary.estimatedDateOfCompletionOfRectification')"
|
||||
:labelCol="{span: 6}"
|
||||
:wrapperCol="{span: 14}">
|
||||
<a-range-picker format="YYYY-MM-DD" value-format="YYYY-MM-DD" v-model="queryParam.expectedTimeRange" :disabled="false" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!--工作令编号-->
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item :label="$t('projectLibrary.workOrderNumber')" :labelCol="{span: 6}" :wrapperCol="{span: 14}">
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('projectLibrary.workOrderNumber')"
|
||||
v-model="queryParam.referenceStandard"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</template>
|
||||
<div style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||
<a @click="handleToggleSearch">
|
||||
{{ toggleSearchStatus ? $t('putAway') : $t('open') }}
|
||||
<a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
|
||||
</a>
|
||||
<a-button type="primary" @click="searchQuery" icon="search" v-has="'inconformityItem:search'">{{ $t('query') }}</a-button>
|
||||
<a-button style="margin-left: 8px" @click="searchReset" icon="reload">{{ $t('reset') }}</a-button>
|
||||
</div>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
|
||||
<div class="table-operator">
|
||||
<!-- 新增-->
|
||||
<a-button icon="plus" type="primary" @click="handleAdd" v-has="'inconformityItem:add'">{{ $t('newlyAdded') }}</a-button>
|
||||
<!-- 导出-->
|
||||
<a-button icon="upload"
|
||||
type="primary"
|
||||
ghost
|
||||
v-has="'inconformityItem:export'"
|
||||
@click="handleExportXls($t('projectLibrary.noncoincidenceItem.noncoincidenceItem'))">
|
||||
{{ $t('export') }}
|
||||
</a-button>
|
||||
<!--批量关闭-->
|
||||
<a-button type="primary" icon="setting" ghost @click="handleBatchClose" v-has="'inconformityItem:batchClose'">
|
||||
{{ $t('projectLibrary.noncoincidenceItem.batchClose') }}
|
||||
</a-button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<j-table
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:can-drag="true"
|
||||
rowKey="id"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:pagination="ipagination"
|
||||
:scroll="{x: '100%', y: yScrollHeight}"
|
||||
:operation-list="operationList"
|
||||
@operationClick="operationClick"
|
||||
@change="handleTableChange">
|
||||
|
||||
<!--跳转标准详情-->
|
||||
<template v-slot:detail="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<div class="table-text can-click-table-text" v-if="text || text === 0" @click="toDetailPage(record)">{{ text }}</div>
|
||||
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
</j-table>
|
||||
</div>
|
||||
|
||||
<!--新增、编辑-->
|
||||
<inconformity-item-modal ref="modalForm" @ok="modalFormOk" />
|
||||
<!--查看-->
|
||||
<inconformity-item-detail-modal ref="detailModal" />
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { JeroListMixin } from '../../../mixins/JeroListMixin'
|
||||
import JTable from '../../../components/jero/JTable'
|
||||
import InconformityItemModal from './modules/InconformityItemModal'
|
||||
import { batchCloseInconformityItem } from '../../../api/projectLibraryApi'
|
||||
import InconformityItemDetailModal from './modules/InconformityItemDetailModal'
|
||||
|
||||
export default {
|
||||
name: 'InconformityItemList',
|
||||
components: { JTable, InconformityItemModal, InconformityItemDetailModal },
|
||||
mixins: [JeroListMixin],
|
||||
data () {
|
||||
return {
|
||||
columns: [
|
||||
// 工作令编号
|
||||
{
|
||||
dataIndex: '',
|
||||
title: this.$t('projectLibrary.workOrderNumber'),
|
||||
width: 150
|
||||
},
|
||||
// 项目名称
|
||||
{
|
||||
dataIndex: 'projectName',
|
||||
title: this.$t('projectLibrary.projectName'),
|
||||
width: 150
|
||||
},
|
||||
// 标准编号
|
||||
{
|
||||
dataIndex: 'standardNumber',
|
||||
title: this.$t('standardNumber'),
|
||||
width: 150,
|
||||
sorter: true,
|
||||
scopedSlots: { customRender: 'detail' }
|
||||
},
|
||||
// 标准名称
|
||||
{
|
||||
dataIndex: '',
|
||||
title: this.$t('standardName'),
|
||||
width: 150,
|
||||
scopedSlots: { customRender: 'detail' }
|
||||
},
|
||||
// 条款号
|
||||
{
|
||||
dataIndex: 'termNum',
|
||||
title: this.$t('workCenter.enStandardRevision.clauseNumber'),
|
||||
width: 150
|
||||
},
|
||||
// 条款名称
|
||||
{
|
||||
title: this.$t('workCenter.enStandardRevision.clauseName'),
|
||||
width: 150,
|
||||
dataIndex: 'termName'
|
||||
},
|
||||
|
||||
// 项目来源
|
||||
{
|
||||
dataIndex: '',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.projectSource'),
|
||||
width: 120
|
||||
},
|
||||
// 责任部门
|
||||
{
|
||||
dataIndex: 'departmentId_dictText',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.responsibleDepartment'),
|
||||
width: 120
|
||||
},
|
||||
// 设计工程师
|
||||
{
|
||||
dataIndex: 'engineerName',
|
||||
title: this.$t('workCenter.standardConsultationProcess.designEngineer'),
|
||||
width: 120
|
||||
},
|
||||
// 预计整改完成日期
|
||||
{
|
||||
dataIndex: 'expectedTime',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.estimatedDateOfCompletionOfRectification'),
|
||||
sorter: true,
|
||||
width: 180
|
||||
},
|
||||
// 实际整改完成日期
|
||||
{
|
||||
dataIndex: 'realityTime',
|
||||
title: this.$t('projectLibrary.noncoincidenceItem.actualRectificationCompletionDate'),
|
||||
sorter: true,
|
||||
width: 180
|
||||
},
|
||||
// 整改状态
|
||||
{
|
||||
dataIndex: 'state_dictText',
|
||||
title: this.$t('workCenter.esInspectionProcess.rectificationStatus'),
|
||||
width: 120
|
||||
},
|
||||
// 操作
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
fixed: 'right',
|
||||
width: 150,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
],
|
||||
url: {
|
||||
list: '/projectLibrary/lawsEvaluationNotMet/page',
|
||||
exportXlsUrl: ''
|
||||
},
|
||||
operationList: [
|
||||
// 查看
|
||||
{
|
||||
text: this.$t('view'),
|
||||
clickEvent: 'handlePreview',
|
||||
has: 'inconformityItem:view'
|
||||
},
|
||||
// 编辑
|
||||
{
|
||||
text: this.$t('edit'),
|
||||
clickEvent: 'handleEdit',
|
||||
has: 'inconformityItem:edit'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 批量关闭
|
||||
*/
|
||||
handleBatchClose () {
|
||||
// 至少选择一条数据
|
||||
if (!this.selectedRowKeys || this.selectedRowKeys.length === 0) {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
return
|
||||
}
|
||||
this.loading = true
|
||||
const params = { ids: this.selectedRowKeys.join(',') }
|
||||
batchCloseInconformityItem(params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.loading = false
|
||||
this.modalFormOk()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 跳转标准详情
|
||||
* @param record
|
||||
*/
|
||||
toDetailPage ({ standardId, splitStandardSource }) {
|
||||
let path
|
||||
// 根据来源跳转不同的详情页
|
||||
switch (splitStandardSource) {
|
||||
// 国内
|
||||
case StandardSource.DOMESTIC.value:
|
||||
path = '/standardRegulationLibrary/DomesticStandardDetail'
|
||||
break
|
||||
// 海外
|
||||
case StandardSource.OVERSEAS.value:
|
||||
path = '/standardRegulationLibrary/OverseasStandardDetail'
|
||||
break
|
||||
// 企标
|
||||
case StandardSource.ENTERPRISE.value:
|
||||
path = '/enterpriseStandardLibrary/enterpriseStandardDetail'
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
if (!path) {
|
||||
return
|
||||
}
|
||||
const query = {
|
||||
id: standardId
|
||||
}
|
||||
this.$openPageNewSheet({
|
||||
path, query
|
||||
})
|
||||
},
|
||||
handlePreview ({ id }) {
|
||||
this.$refs.detailModal.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,179 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:title="$t('view')"
|
||||
placement="right"
|
||||
:visible="visible"
|
||||
@close="close"
|
||||
width="900"
|
||||
class="custom-drawer-style">
|
||||
<div class="custom-drawer-style-scroll">
|
||||
<div class="detail-page-part-form">
|
||||
<!--标准编号-->
|
||||
<div class="detail-page-part-form-item">
|
||||
<label>{{ $t('standardNumber') }}</label>
|
||||
<span>{{ detailData.standardNumber }}</span>
|
||||
</div>
|
||||
<!--标准名称-->
|
||||
<div class="detail-page-part-form-item">
|
||||
<label>{{ $t('standardName') }}</label>
|
||||
<span>{{ detailData.a }}</span>
|
||||
</div>
|
||||
<!--整改状态-->
|
||||
<div class="detail-page-part-form-item">
|
||||
<label>{{ $t('workCenter.esInspectionProcess.rectificationStatus') }}</label>
|
||||
<span>{{ detailData.state_dictText }}</span>
|
||||
</div>
|
||||
<!--相关项目-->
|
||||
<div class="detail-page-part-form-item">
|
||||
<label>{{ $t('projectLibrary.noncoincidenceItem.relevantProject') }}</label>
|
||||
<span>{{ detailData.projectName }}</span>
|
||||
</div>
|
||||
<!--预计整改完成日期-->
|
||||
<div class="detail-page-part-form-item">
|
||||
<label>{{ $t('projectLibrary.vehicleItemLibrary.estimatedDateOfCompletionOfRectification') }}</label>
|
||||
<span>{{ detailData.expectedTime }}</span>
|
||||
</div>
|
||||
<!--责任部门-->
|
||||
<div class="detail-page-part-form-item">
|
||||
<label>{{ $t('projectLibrary.vehicleItemLibrary.responsibleDepartment') }}</label>
|
||||
<span>{{ detailData.departmentId_dictText }}</span>
|
||||
</div>
|
||||
<!--设计工程师-->
|
||||
<div class="detail-page-part-form-item">
|
||||
<label>{{ $t('workCenter.standardConsultationProcess.designEngineer') }}</label>
|
||||
<span>{{ detailData.engineerName }}</span>
|
||||
</div>
|
||||
<!--相关流程-->
|
||||
<div class="detail-page-part-form-item">
|
||||
<label>{{ $t('projectLibrary.noncoincidenceItem.relatedProcess') }}</label>
|
||||
<span>{{ detailData.b }}</span>
|
||||
</div>
|
||||
<!--查看未符合项评估结果-->
|
||||
<div class="btn-box">
|
||||
<a-button type="primary" class="form-btn">{{ $t('projectLibrary.noncoincidenceItem.viewNonMatchItemEvaluationResult') }}
|
||||
</a-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--不符合项-->
|
||||
<div class="header-text">{{ $t('projectLibrary.vehicleItemLibrary.nonConformanceTerm') }}</div>
|
||||
<div class="nonconformingItem-box">
|
||||
<!--条款号-->
|
||||
<div class="line-form-item">
|
||||
<label>{{ $t('workCenter.enStandardRevision.clauseNumber') }}</label>
|
||||
<span>{{ detailData.termNum }}</span>
|
||||
</div>
|
||||
<!--条款名称-->
|
||||
<div class="line-form-item">
|
||||
<label>{{ $t('workCenter.enStandardRevision.clauseName') }}</label>
|
||||
<span>{{ detailData.termName }}</span>
|
||||
</div>
|
||||
<!--涉及项目-->
|
||||
<div class="line-form-item">
|
||||
<label>{{ $t('projectLibrary.noncoincidenceItem.involvedItem') }}</label>
|
||||
<span>{{ detailData.projectName }}</span>
|
||||
</div>
|
||||
<!--责任部门-->
|
||||
<div class="line-form-item">
|
||||
<label>{{ $t('projectLibrary.vehicleItemLibrary.responsibleDepartment') }}</label>
|
||||
<span>{{ detailData.departmentId_dictText }}</span>
|
||||
</div>
|
||||
<!--设计工程师-->
|
||||
<div class="line-form-item">
|
||||
<label>{{ $t('workCenter.standardConsultationProcess.designEngineer') }}</label>
|
||||
<span>{{ detailData.engineerName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'InconformityItemDetailModal',
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
detailData: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open () {
|
||||
this.visible = true
|
||||
},
|
||||
close () {
|
||||
this.visible = false
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~../../../../assets/less/common.less';
|
||||
|
||||
.custom-drawer-style-scroll {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.detail-page-part-form {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
.detail-page-part-form-item {
|
||||
width: calc((100% - 32px) / 2) !important;
|
||||
|
||||
label {
|
||||
width: 8.5rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .detail-page-part-form-item:nth-child(3n) {
|
||||
margin-right: 16px !important;
|
||||
}
|
||||
|
||||
/deep/ .detail-page-part-form-item:nth-child(2n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.line-form-item {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.line-form-item > label {
|
||||
width: 7.5em;
|
||||
font-size: 16px;
|
||||
font-family: PingFang SC-Regular, PingFang SC, sans-serif;
|
||||
font-weight: 400;
|
||||
color: #86909C;
|
||||
}
|
||||
|
||||
.line-form-item > span {
|
||||
word-break: break-all;
|
||||
font-size: 16px;
|
||||
font-family: PingFang SC-Regular, PingFang SC, sans-serif;
|
||||
color: #1D2129;
|
||||
flex: 1;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.btn-box {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.header-text {
|
||||
margin: 30px 0 15px 0;
|
||||
}
|
||||
|
||||
.form-btn {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.nonconformingItem-box {
|
||||
padding: 24px;
|
||||
border: 1px solid rgba(128, 128, 128, 0.15);
|
||||
border-radius: 8px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,257 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="width"
|
||||
:visible="visible"
|
||||
:maskClosable="false"
|
||||
:confirmLoading="confirmLoading"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel">
|
||||
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form :form="form">
|
||||
<!--标准编号-->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardNumber')">
|
||||
<standard-selection v-decorator="['standardNumber', validatorRules.standardNumber]"
|
||||
:placeholder="$t('pleaseSelect') + $t('standardNumber')"
|
||||
@listChange="handleStandardChange" />
|
||||
</a-form-item>
|
||||
<!--标准名称-->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardName')">
|
||||
<a-input v-decorator="['standardName', validatorRules.standardName]"
|
||||
disabled
|
||||
:placeholder="$t('pleaseEnter') + $t('standardName')" />
|
||||
</a-form-item>
|
||||
<!--工作令编号-->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('projectLibrary.workOrderNumber')">
|
||||
<vehicle-project-selection v-decorator="['projectId', validatorRules.projectId]"
|
||||
:placeholder="$t('pleaseSelect') + $t('projectLibrary.workOrderNumber')"
|
||||
echo-field-name="workNumber"
|
||||
@listChange="handleProjectChange" />
|
||||
</a-form-item>
|
||||
<!--项目名称-->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('projectLibrary.projectName')">
|
||||
<a-input v-decorator="['projectName', validatorRules.projectName]"
|
||||
disabled
|
||||
:placeholder="$t('pleaseEnter') + $t('projectLibrary.projectName')" />
|
||||
</a-form-item>
|
||||
<!--条款号-->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('docTool.split.clauseNo')">
|
||||
<a-input v-decorator="['termNum', validatorRules.termNum]"
|
||||
:maxLength="50"
|
||||
:placeholder="$t('pleaseEnter') + $t('docTool.split.clauseNo')" />
|
||||
</a-form-item>
|
||||
<!--条款名称-->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('docTool.split.clauseName')">
|
||||
<a-input v-decorator="['termName', validatorRules.termName]"
|
||||
:maxLength="50"
|
||||
:placeholder="$t('pleaseEnter') + $t('docTool.split.clauseName')" />
|
||||
</a-form-item>
|
||||
<!--责任部门 -->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('projectLibrary.vehicleItemLibrary.responsibleDepartment')">
|
||||
<j-select-depart v-decorator="['departmentId', validatorRules.departmentId]" :backDepart="true" />
|
||||
</a-form-item>
|
||||
<!--设计工程师-->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('workCenter.standardConsultationProcess.designEngineer')">
|
||||
<user-selection :placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.designEngineer')"
|
||||
v-decorator="['departmentId', validatorRules.departmentId]"
|
||||
:nameStr="model.engineerName"
|
||||
type="radio" />
|
||||
</a-form-item>
|
||||
<!--预计整改完成日期-->
|
||||
<a-form-item :labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('projectLibrary.vehicleItemLibrary.estimatedDateOfCompletionOfRectification')">
|
||||
<j-date show-type="day"
|
||||
date-format="YYYY-MM-DD"
|
||||
v-decorator="['expectedTime', validatorRules.expectedTime]"
|
||||
:placeholder="$t('pleaseSelect') + $t('projectLibrary.vehicleItemLibrary.estimatedDateOfCompletionOfRectification')" />
|
||||
</a-form-item>
|
||||
<!--实际整改完成日期-->
|
||||
<a-form-item :labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('projectLibrary.noncoincidenceItem.actualRectificationCompletionDate')">
|
||||
<j-date show-type="day"
|
||||
date-format="YYYY-MM-DD"
|
||||
v-decorator="['realityTime', validatorRules.realityTime]"
|
||||
:placeholder="$t('pleaseSelect') + $t('projectLibrary.noncoincidenceItem.actualRectificationCompletionDate')" />
|
||||
</a-form-item>
|
||||
<!--整改状态-->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('enterpriseStandardLibrary.check.rectificationStatus')">
|
||||
<j-dict-select-tag v-decorator="['state', validatorRules.state]"
|
||||
:placeholder="$t('pleaseSelect')+$t('enterpriseStandardLibrary.check.rectificationStatus')"
|
||||
:type="'select'"
|
||||
:triggerChange="false"
|
||||
dictCode="assess_rectification" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import StandardSelection from '../../../../components/selection/StandardSelection'
|
||||
import VehicleProjectSelection from '../../../../components/selection/VehicleProjectSelection'
|
||||
import UserSelection from '../../../../components/selection/UserSelection'
|
||||
import { addInconformityItem, editInconformityItem } from '../../../../api/projectLibraryApi'
|
||||
|
||||
export default {
|
||||
name: 'InconformityItemModal',
|
||||
components: { UserSelection, StandardSelection, VehicleProjectSelection },
|
||||
data () {
|
||||
return {
|
||||
title: this.$t('operation'),
|
||||
width: 800,
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
model: {},
|
||||
form: this.$form.createForm(this),
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 5 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 18 }
|
||||
},
|
||||
validatorRules: {
|
||||
// 标准编号
|
||||
standardNumber: {
|
||||
rules: [{ required: true, message: this.$t('pleaseSelect') + this.$t('standardNumber') }],
|
||||
validateTrigger: 'change'
|
||||
},
|
||||
// 标准编号
|
||||
standardName: {
|
||||
rules: [{ required: true, message: this.$t('pleaseEnter') + this.$t('standardName') }],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
// 工作令编号
|
||||
projectId: {
|
||||
rules: [{ required: true, message: this.$t('pleaseSelect') + this.$t('projectLibrary.workOrderNumber') }],
|
||||
validateTrigger: 'change'
|
||||
},
|
||||
// 项目名称
|
||||
projectName: {
|
||||
rules: [{ required: true, message: this.$t('pleaseEnter') + this.$t('projectLibrary.projectName') }],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
// 条款号
|
||||
termNum: {
|
||||
rules: [{ required: true, message: this.$t('pleaseEnter') + this.$t('docTool.split.clauseNo') }],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
// 条款名称
|
||||
termName: {
|
||||
rules: [{ required: true, message: this.$t('pleaseEnter') + this.$t('docTool.split.clauseName') }],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
// 责任部门
|
||||
departmentId: {
|
||||
rules: [{
|
||||
required: true,
|
||||
message: this.$t('pleaseSelect') + this.$t('projectLibrary.vehicleItemLibrary.responsibleDepartment')
|
||||
}],
|
||||
validateTrigger: 'change'
|
||||
},
|
||||
// 设计工程师
|
||||
engineerId: {
|
||||
rules: [{
|
||||
required: true,
|
||||
message: this.$t('pleaseSelect') + this.$t('projectLibrary.vehicleItemLibrary.responsibleDepartment')
|
||||
}],
|
||||
validateTrigger: 'change'
|
||||
},
|
||||
// 预计整改完成日期
|
||||
expectedTime: {
|
||||
rules: [{
|
||||
required: true,
|
||||
message: this.$t('pleaseSelect') + this.$t('projectLibrary.vehicleItemLibrary.estimatedDateOfCompletionOfRectification')
|
||||
}],
|
||||
validateTrigger: 'change'
|
||||
},
|
||||
// 实际整改完成日期
|
||||
realityTime: {
|
||||
rules: [{
|
||||
required: false,
|
||||
message: this.$t('pleaseSelect') + this.$t('projectLibrary.noncoincidenceItem.actualRectificationCompletionDate')
|
||||
}],
|
||||
validateTrigger: 'change'
|
||||
},
|
||||
// 整改状态
|
||||
state: {
|
||||
rules: [{ required: true, message: this.$t('pleaseSelect') + this.$t('enterpriseStandardLibrary.check.rectificationStatus') }],
|
||||
validateTrigger: 'change'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.edit({})
|
||||
},
|
||||
edit (record) {
|
||||
this.visible = true
|
||||
this.model = Object.assign({}, record)
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(this.model)
|
||||
})
|
||||
},
|
||||
handleOk () {
|
||||
this.form.validateFields((errors, values) => {
|
||||
if (!errors) {
|
||||
const formData = Object.assign(this.model, values)
|
||||
let submitFunc
|
||||
if (this.model.id) {
|
||||
submitFunc = editInconformityItem
|
||||
} else {
|
||||
submitFunc = addInconformityItem
|
||||
}
|
||||
if (!submitFunc) {
|
||||
return
|
||||
}
|
||||
this.confirmLoading = true
|
||||
submitFunc(formData).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.$emit('ok')
|
||||
this.close()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.confirmLoading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
},
|
||||
close () {
|
||||
this.visible = false
|
||||
this.model = {}
|
||||
this.form.resetFields()
|
||||
},
|
||||
/**
|
||||
* 标准变化带出标准名称
|
||||
*/
|
||||
handleStandardChange (list) {
|
||||
const standardName = list.map(tt => tt.standardName).join(',')
|
||||
this.form.setFieldsValue({ standardName })
|
||||
},
|
||||
/**
|
||||
* 工作令编号变化带出项目名称
|
||||
* @param list
|
||||
*/
|
||||
handleProjectChange (list) {
|
||||
const projectName = list.map(tt => tt.projectName).join(',')
|
||||
this.form.setFieldsValue({ projectName })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,328 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
<!--查询-->
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<!--来源-->
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item :label="$t('standardSelect.source')" :labelCol="{span: 6}" :wrapperCol="{span: 14}">
|
||||
<j-dict-select-tag v-model="queryParam.source"
|
||||
:placeholder="$t('pleaseSelect')+$t('standardSelect.source')"
|
||||
type="select"
|
||||
:triggerChange="false"
|
||||
dict-code="standard_source" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!--项目名称-->
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item :label="$t('projectLibrary.projectName')" :labelCol="{span: 6}" :wrapperCol="{span: 14}">
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('projectLibrary.projectName')"
|
||||
v-model="queryParam.projectName"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!--车型-->
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item :label="$t('projectLibrary.specialProjectLibrary.vehicleModel')" :labelCol="{span: 6}" :wrapperCol="{span: 14}">
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('projectLibrary.specialProjectLibrary.vehicleModel')"
|
||||
v-model="queryParam.vehicleModel"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<template v-if="toggleSearchStatus">
|
||||
<!--标准状态-->
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item :label="$t('projectLibrary.vehicleItemLibrary.standardState')" :labelCol="{span: 6}" :wrapperCol="{span: 14}">
|
||||
<j-dict-select-tag v-model="queryParam.standardState"
|
||||
:placeholder="$t('pleaseSelect')+$t('projectLibrary.vehicleItemLibrary.standardState')"
|
||||
type="select"
|
||||
:triggerChange="false"
|
||||
dict-code="standard_state" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!--合规评估结果-->
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item :label="$t('projectLibrary.specialProjectLibrary.complianceAssessmentResults')"
|
||||
:labelCol="{span: 6}"
|
||||
:wrapperCol="{span: 14}">
|
||||
<j-dict-select-tag v-model="queryParam.result"
|
||||
:placeholder="$t('pleaseSelect')+$t('projectLibrary.specialProjectLibrary.complianceAssessmentResults')"
|
||||
type="select"
|
||||
:triggerChange="false"
|
||||
dict-code="" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!--是否立项-->
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item :label="$t('projectLibrary.specialProjectLibrary.whetherToApproveAProjectOrNot')"
|
||||
:labelCol="{span: 6}"
|
||||
:wrapperCol="{span: 14}">
|
||||
<j-dict-select-tag v-model="queryParam.projectApproval"
|
||||
:placeholder="$t('pleaseSelect')+$t('projectLibrary.specialProjectLibrary.whetherToApproveAProjectOrNot')"
|
||||
type="select"
|
||||
:triggerChange="false"
|
||||
dict-code="yn" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</template>
|
||||
<div style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||
<a @click="handleToggleSearch">
|
||||
{{ toggleSearchStatus ? $t('putAway') : $t('open') }}
|
||||
<a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
|
||||
</a>
|
||||
<a-button type="primary" @click="searchQuery" icon="search" v-has="'specialProjectLibrary:search'">{{ $t('query') }}</a-button>
|
||||
<a-button style="margin-left: 8px" @click="searchReset" icon="reload">{{ $t('reset') }}</a-button>
|
||||
</div>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
|
||||
<div class="table-operator">
|
||||
<!--批量删除-->
|
||||
<a-button type="primary" icon="delete" ghost @click="batchDel" v-has="'specialProjectLibrary:batchDel'">
|
||||
{{ $t('batchDelete') }}
|
||||
</a-button>
|
||||
<!-- 导出-->
|
||||
<a-button icon="upload"
|
||||
type="primary"
|
||||
ghost
|
||||
v-has="'specialProjectLibrary:export'"
|
||||
@click="handleExportXls($t('projectLibrary.specialProjectLibrary.specialProjectLibrary'))">
|
||||
{{ $t('export') }}
|
||||
</a-button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<j-table
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:can-drag="true"
|
||||
rowKey="id"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:pagination="ipagination"
|
||||
:scroll="{x: '100%', y: yScrollHeight}"
|
||||
:operation-list="operationList"
|
||||
@operationClick="operationClick"
|
||||
@change="handleTableChange">
|
||||
|
||||
<!--跳转标准详情-->
|
||||
<template v-slot:detail="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<div class="table-text can-click-table-text" v-if="text || text === 0" @click="toDetailPage(record)">{{ text }}</div>
|
||||
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<!--依据描述-->
|
||||
<template v-slot:basisDescription="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<div class="table-text can-click-table-text" v-if="text || text === 0" @click="viewBasisDescription">{{ text }}</div>
|
||||
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<!--工作令编号、项目名称-->
|
||||
<template v-slot:project="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<div class="table-text can-click-table-text" v-if="text || text === 0">{{ text }}</div>
|
||||
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<!--流程编号-->
|
||||
<template v-slot:process="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<div class="table-text can-click-table-text" v-if="text || text === 0">{{ text }}</div>
|
||||
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
</j-table>
|
||||
</div>
|
||||
|
||||
<!--依据描述-->
|
||||
<basis-description-modal ref="basisDescriptionModal" />
|
||||
<!--编辑-->
|
||||
<special-project-library-modal ref="modalForm" @ok="modalFormOk" />
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import JTable from '../../../components/jero/JTable'
|
||||
import { JeroListMixin } from '../../../mixins/JeroListMixin'
|
||||
import BasisDescriptionModal from './modules/BasisDescriptionModal'
|
||||
import SpecialProjectLibraryModal from './modules/SpecialProjectLibraryModal'
|
||||
|
||||
export default {
|
||||
name: 'SpecialProjectLibrary',
|
||||
components: { JTable, BasisDescriptionModal, SpecialProjectLibraryModal },
|
||||
mixins: [JeroListMixin],
|
||||
data () {
|
||||
return {
|
||||
columns: [
|
||||
// 来源
|
||||
{
|
||||
dataIndex: 'source_dictText',
|
||||
title: this.$t('standardSelect.source'),
|
||||
width: 150
|
||||
},
|
||||
// 标准编号
|
||||
{
|
||||
dataIndex: 'standardNumber',
|
||||
title: this.$t('standardNumber'),
|
||||
width: 150,
|
||||
sorter: true,
|
||||
scopedSlots: { customRender: 'detail' }
|
||||
},
|
||||
// 标准名称
|
||||
{
|
||||
dataIndex: 'standardName',
|
||||
title: this.$t('standardName'),
|
||||
width: 150,
|
||||
scopedSlots: { customRender: 'detail' }
|
||||
},
|
||||
// 条款号
|
||||
{
|
||||
dataIndex: 'termNumber',
|
||||
title: this.$t('workCenter.enStandardRevision.clauseNumber'),
|
||||
width: 150
|
||||
},
|
||||
// 条款名称
|
||||
{
|
||||
title: this.$t('workCenter.enStandardRevision.clauseName'),
|
||||
width: 150,
|
||||
dataIndex: 'termName'
|
||||
},
|
||||
// 标准状态
|
||||
{
|
||||
dataIndex: 'standardState_dictText',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.standardState'),
|
||||
width: 120
|
||||
},
|
||||
// 车型系列
|
||||
{
|
||||
dataIndex: 'vehicleModel_dictText',
|
||||
title: this.$t('projectLibrary.specialProjectLibrary.vehicleSeries'),
|
||||
width: 120
|
||||
},
|
||||
// 合规评估结果
|
||||
{
|
||||
dataIndex: 'result',
|
||||
title: this.$t('projectLibrary.specialProjectLibrary.complianceAssessmentResults'),
|
||||
width: 120
|
||||
},
|
||||
// 依据描述
|
||||
{
|
||||
dataIndex: 'basisDescription',
|
||||
title: this.$t('projectLibrary.specialProjectLibrary.basisDescription'),
|
||||
width: 180,
|
||||
scopedSlots: { customRender: 'basisDescription' }
|
||||
},
|
||||
// 评估日期
|
||||
{
|
||||
dataIndex: 'valuationTime',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.dateOfEvaluation'),
|
||||
sorter: true,
|
||||
width: 180
|
||||
},
|
||||
// 是否立项
|
||||
{
|
||||
dataIndex: 'projectApproval_dictText',
|
||||
title: this.$t('projectLibrary.specialProjectLibrary.whetherToApproveAProjectOrNot'),
|
||||
width: 120
|
||||
},
|
||||
// 工作令编号
|
||||
{
|
||||
dataIndex: 'workNumber',
|
||||
title: this.$t('projectLibrary.workOrderNumber'),
|
||||
width: 120,
|
||||
scopedSlots: { customRender: 'project' }
|
||||
},
|
||||
// 项目名称
|
||||
{
|
||||
dataIndex: 'projectName',
|
||||
title: this.$t('projectLibrary.projectName'),
|
||||
width: 150,
|
||||
scopedSlots: { customRender: 'project' }
|
||||
},
|
||||
// 流程编号
|
||||
{
|
||||
dataIndex: 'processNum',
|
||||
title: this.$t('workCenter.processCenter.processNumber'),
|
||||
width: 120,
|
||||
scopedSlots: { customRender: 'process' }
|
||||
},
|
||||
// 操作
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
fixed: 'right',
|
||||
width: 150,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
],
|
||||
url: {
|
||||
list: '/projectLibrary/lawsSpecialProjectLibrary/page',
|
||||
deleteBatch: '/projectLibrary/lawsSpecialProjectLibrary/deleteBatch'
|
||||
},
|
||||
operationList: [
|
||||
// 编辑
|
||||
{
|
||||
text: this.$t('edit'),
|
||||
clickEvent: 'handleEdit',
|
||||
has: 'specialProjectLibrary:edit'
|
||||
}
|
||||
],
|
||||
disableMixinCreated: true,
|
||||
dataSource: [{ id: 1, basisDescription: '1111' }]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 跳转标准详情
|
||||
* @param record
|
||||
*/
|
||||
toDetailPage ({ standardId, splitStandardSource }) {
|
||||
let path
|
||||
// 根据来源跳转不同的详情页
|
||||
switch (splitStandardSource) {
|
||||
// 国内
|
||||
case StandardSource.DOMESTIC.value:
|
||||
path = '/standardRegulationLibrary/DomesticStandardDetail'
|
||||
break
|
||||
// 海外
|
||||
case StandardSource.OVERSEAS.value:
|
||||
path = '/standardRegulationLibrary/OverseasStandardDetail'
|
||||
break
|
||||
// 企标
|
||||
case StandardSource.ENTERPRISE.value:
|
||||
path = '/enterpriseStandardLibrary/enterpriseStandardDetail'
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
if (!path) {
|
||||
return
|
||||
}
|
||||
const query = {
|
||||
id: standardId
|
||||
}
|
||||
this.$openPageNewSheet({
|
||||
path, query
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 查看依据详情
|
||||
*/
|
||||
viewBasisDescription () {
|
||||
this.$refs.basisDescriptionModal.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,239 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="width"
|
||||
:visible="visible"
|
||||
:maskClosable="false"
|
||||
:confirmLoading="confirmLoading"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel">
|
||||
<!--查询区域-->
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<!--部门-->
|
||||
<a-col :md="6" :sm="12">
|
||||
<a-form-model-item :label="$t('department')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-tree-select
|
||||
tree-node-filter-prop="title"
|
||||
v-model="queryParam.responsibleDepartment"
|
||||
:maxTagCount="1"
|
||||
:show-search="true"
|
||||
:filterTreeNode="filterTreeOption"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
class="box-input"
|
||||
style="width: 100%"
|
||||
:tree-data="departList"
|
||||
:placeholder="$t('pleaseSelect') + $t('department')"
|
||||
/>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!--姓名-->
|
||||
<a-col :md="6" :sm="12">
|
||||
<a-form-item :label="$t('userSelect.name')">
|
||||
<j-input :placeholder="$t('pleaseEnter') + $t('userSelect.name')" v-model="queryParam.workNumber"></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!--工号-->
|
||||
<a-col :md="6" :sm="12">
|
||||
<a-form-item :label="$t('user.workNo')">
|
||||
<j-input :placeholder="$t('pleaseEnter') + $t('user.workNo')" v-model="queryParam.workNumber"></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :md="6" :sm="8">
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="searchReset" icon="reload" ghost>{{ $t('reset') }}</a-button>
|
||||
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 8px" v-has="'vehicleItemLibrary:search'">
|
||||
{{ $t('query') }}
|
||||
</a-button>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<j-table
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:can-drag="true"
|
||||
rowKey="id"
|
||||
:row-selection="null"
|
||||
:pagination="ipagination"
|
||||
:scroll="{x: '100%', y: 'calc(100vh - 200px - 56px - 56px - 75px - 64px - 48px)'}"
|
||||
@change="handleTableChange">
|
||||
|
||||
<template v-slot:basisDescription="{text}">
|
||||
<div class="basis-description">{{ text }}</div>
|
||||
</template>
|
||||
|
||||
<template v-slot:file="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<div class="table-text can-click-table-text" v-if="text || text === 0" @click="handlePreview(record)">{{ text }}</div>
|
||||
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</j-table>
|
||||
</div>
|
||||
|
||||
<div id="images">
|
||||
<div class="image" v-viewer="{movable: false}">
|
||||
<img v-show="image" :src="imageUrl" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { JeroListMixin } from '../../../../mixins/JeroListMixin'
|
||||
import { queryDepartTreeList } from '../../../../api/api'
|
||||
import JTable from '../../../../components/jero/JTable'
|
||||
import Vue from 'vue'
|
||||
import { ACCESS_TOKEN } from '../../../../store/mutation-types'
|
||||
import { downloadFile, getFileAccessHttpUrl } from '../../../../api/manage'
|
||||
import { previewPdf } from '../../../../utils/previewPdf'
|
||||
import { Base64 } from 'js-base64'
|
||||
|
||||
export default {
|
||||
name: 'BasisDescriptionModal',
|
||||
components: { JTable },
|
||||
mixins: [JeroListMixin],
|
||||
data () {
|
||||
return {
|
||||
title: this.$t('projectLibrary.specialProjectLibrary.basisDescription'),
|
||||
width: 1000,
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
disableMixinCreated: true,
|
||||
departList: [],
|
||||
columns: [
|
||||
// 序号
|
||||
{
|
||||
title: this.$t('serialNumber'),
|
||||
key: 'rowIndex',
|
||||
width: 80,
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
},
|
||||
// 姓名
|
||||
{
|
||||
dataIndex: '1',
|
||||
title: this.$t('userSelect.name'),
|
||||
width: 100
|
||||
},
|
||||
// 工号
|
||||
{
|
||||
dataIndex: '2',
|
||||
title: this.$t('user.workNo'),
|
||||
width: 100
|
||||
},
|
||||
// 部门
|
||||
{
|
||||
dataIndex: '3',
|
||||
title: this.$t('department'),
|
||||
width: 100
|
||||
},
|
||||
// 车型
|
||||
{
|
||||
dataIndex: '4',
|
||||
title: this.$t('projectLibrary.specialProjectLibrary.vehicleModel'),
|
||||
width: 100
|
||||
},
|
||||
// 依据描述
|
||||
{
|
||||
dataIndex: 'nameWorkNo',
|
||||
title: this.$t('projectLibrary.specialProjectLibrary.basisDescription'),
|
||||
width: 250,
|
||||
scopedSlots: { customRender: 'basisDescription' }
|
||||
},
|
||||
// 佐证材料
|
||||
{
|
||||
dataIndex: '5',
|
||||
title: this.$t('projectLibrary.specialProjectLibrary.supportingMaterial'),
|
||||
width: 120
|
||||
}
|
||||
],
|
||||
image: false,
|
||||
imageUrl: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open () {
|
||||
this.visible = true
|
||||
this.getDepartTreeList()
|
||||
this.loadData(1)
|
||||
},
|
||||
handleOk () {
|
||||
this.close()
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
},
|
||||
close () {
|
||||
this.visible = false
|
||||
},
|
||||
getDepartTreeList () {
|
||||
queryDepartTreeList().then((res) => {
|
||||
if (res.success) {
|
||||
this.departList = res.result
|
||||
} else {
|
||||
this.departList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
handlePreview (file) {
|
||||
if (!file || !file.url) {
|
||||
return
|
||||
}
|
||||
// 截取文件后缀名
|
||||
const fileSuffix = file.fileName ? file.fileName.split('.')[file.fileName.split('.').length - 1] : ''
|
||||
const canPreview = CAN_PREVIEW_FILE_SUFFIX.some(tt => fileSuffix.toLowerCase() === tt)
|
||||
// 判断是否为可预览格式的文件
|
||||
if (!canPreview) {
|
||||
this.$message.loading('该文件类型不支持预览,正在为您准备下载...').then(() => {
|
||||
this.handleDownload(file)
|
||||
})
|
||||
return
|
||||
}
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/download/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||
// 图片预览,使用自己添加的组件
|
||||
if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix.toLowerCase())) {
|
||||
this.imageUrl = getFileAccessHttpUrl(file.id)
|
||||
// 获取viewer实例
|
||||
const viewer = this.$el.querySelector('.image').$viewer
|
||||
// 调用show方法进行显示预览图
|
||||
viewer.show()
|
||||
// this.$refs.imagePreviewModal.open(file)
|
||||
return
|
||||
}
|
||||
// pdf预览
|
||||
if (canPreview && FILE_TYPE_PDF.includes(fileSuffix)) {
|
||||
const url = previewPdf(file.id)
|
||||
window.open(url)
|
||||
return
|
||||
}
|
||||
// word用KKfile预览
|
||||
if (canPreview && (fileSuffix === 'doc' || fileSuffix === 'docx')) {
|
||||
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(fileFullUrl))}`
|
||||
window.open(url)
|
||||
return
|
||||
}
|
||||
// 如果都不能预览就下载
|
||||
downloadFile(`/sys/common/download/${file.id}`, file.fileName)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
/deep/ .table-page-search-wrapper .ant-form-inline .ant-form-item > .ant-form-item-label {
|
||||
min-width: 50px;
|
||||
}
|
||||
|
||||
.basis-description {
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,95 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="width"
|
||||
:visible="visible"
|
||||
:maskClosable="false"
|
||||
:confirmLoading="confirmLoading"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form :form="form">
|
||||
<!--项目名称-->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('projectLibrary.projectName')">
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('projectLibrary.projectName')"
|
||||
@change="event => event.target.value = event.target.value.trim()"
|
||||
:maxLength="50"
|
||||
v-decorator="['projectName']" />
|
||||
</a-form-item>
|
||||
<!--工作令编号-->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('projectLibrary.workOrderNumber')">
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('projectLibrary.workOrderNumber')"
|
||||
@change="event => event.target.value = event.target.value.trim()"
|
||||
:maxLength="50"
|
||||
v-decorator="['workNumber']" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { editSpecialProjectLibrary } from '../../../../api/projectLibraryApi'
|
||||
|
||||
export default {
|
||||
name: 'SpecialProjectLibraryModal',
|
||||
data () {
|
||||
return {
|
||||
title: this.$t('projectLibrary.specialProjectLibrary.basisDescription'),
|
||||
width: 600,
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
form: this.$form.createForm(this),
|
||||
model: {},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 5 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 17 }
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
edit (record) {
|
||||
this.visible = true
|
||||
this.model = Object.assign({}, record)
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(this.model)
|
||||
})
|
||||
},
|
||||
handleOk () {
|
||||
this.form.validateFields((errors, values) => {
|
||||
if (!errors) {
|
||||
this.confirmLoading = true
|
||||
const formData = Object.assign(this.model, values)
|
||||
editSpecialProjectLibrary(formData).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.$emit('ok')
|
||||
this.close()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.confirmLoading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
},
|
||||
close () {
|
||||
this.visible = false
|
||||
this.model = {}
|
||||
this.form.resetFields()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
|
||||
</style>
|
||||
@@ -1,13 +1,205 @@
|
||||
<template>
|
||||
<internal-detail-page></internal-detail-page>
|
||||
<internal-detail-page>
|
||||
<!--查询区域-->
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<!--条款号-->
|
||||
<a-col :md="6" :sm="12">
|
||||
<a-form-item :label="$t('workCenter.enStandardRevision.clauseNumber')">
|
||||
<j-input :placeholder="$t('pleaseEnter') + $t('projectLibrary.projectName')" v-model="queryParam.projectName"></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :md="6" :sm="8">
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 8px" v-has="'evaluationResultHistory:search'">
|
||||
{{ $t('query') }}
|
||||
</a-button>
|
||||
<a-button type="primary" @click="searchReset" icon="reload" ghost>{{ $t('reset') }}</a-button>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<j-table
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:can-drag="true"
|
||||
rowKey="id"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:pagination="ipagination"
|
||||
:scroll="{x: '100%'}"
|
||||
:loading="loading"
|
||||
:operation-list="operationList"
|
||||
@operationClick="operationClick"
|
||||
@change="handleTableChange">
|
||||
|
||||
<!--跳转标准详情-->
|
||||
<template v-slot:standardDetail="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<div class="table-text can-click-table-text" v-if="text || text === 0" @click="toDetailPage(record)">{{ text }}</div>
|
||||
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<!--跳转评估结果-->
|
||||
<template v-slot:evaluationResult="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<div class="table-text can-click-table-text" v-if="text || text === 0" @click="toEvaluationResult(record)">{{ text }}</div>
|
||||
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
|
||||
</j-table>
|
||||
</div>
|
||||
</internal-detail-page>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import InternalDetailPage from '../../../components/InternalDetailPage.vue'
|
||||
import { JeroListMixin } from '../../../mixins/JeroListMixin'
|
||||
import JTable from '../../../components/jero/JTable'
|
||||
import { StandardSource } from '../../../enums/commonEnums'
|
||||
|
||||
export default {
|
||||
name: 'EvaluationResultHistoryPage',
|
||||
components: { InternalDetailPage }
|
||||
components: { JTable, InternalDetailPage },
|
||||
mixins: [JeroListMixin],
|
||||
data() {
|
||||
return {
|
||||
url: {
|
||||
list: '/projectLibrary/lawsAssessResults/page'
|
||||
},
|
||||
columns: [
|
||||
// 标准号
|
||||
{
|
||||
dataIndex: 'standardNumber',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.standardNumber'),
|
||||
width: 150,
|
||||
scopedSlots: { customRender: 'standardDetail' }
|
||||
},
|
||||
// 标准名称
|
||||
{
|
||||
dataIndex: 'standardName',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.standardName'),
|
||||
width: 150,
|
||||
scopedSlots: { customRender: 'standardDetail' }
|
||||
},
|
||||
// 条款号
|
||||
{
|
||||
dataIndex: 'termNumber',
|
||||
title: this.$t('workCenter.enStandardRevision.clauseNumber'),
|
||||
width: 150
|
||||
},
|
||||
// 英文名称
|
||||
{
|
||||
dataIndex: 'standardEnglishName',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.englishName'),
|
||||
width: 150
|
||||
},
|
||||
// 标准状态
|
||||
{
|
||||
dataIndex: 'standardState_dictText',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.standardState'),
|
||||
width: 100
|
||||
},
|
||||
// 责任部门
|
||||
{
|
||||
dataIndex: 'responsibleDepartment',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.responsibleDepartment'),
|
||||
width: 120
|
||||
},
|
||||
// 流程状态
|
||||
{
|
||||
dataIndex: 'processStatus_dictText',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.processState'),
|
||||
width: 120
|
||||
},
|
||||
// 评估结果
|
||||
{
|
||||
dataIndex: 'evaluationResults_dictText',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.evaluationResult'),
|
||||
width: 120,
|
||||
scopedSlots: { customRender: 'evaluationResult' }
|
||||
},
|
||||
// 操作
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
fixed: 'right',
|
||||
width: 210,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
],
|
||||
filters: {
|
||||
assessId: this.$route.query.assessId
|
||||
},
|
||||
operationList: [
|
||||
// 评估流程详情
|
||||
{
|
||||
text: this.$t('projectLibrary.vehicleItemLibrary.evaluationProcessDetail'),
|
||||
clickEvent: 'toEvaluationProcessDetail'
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 跳转标准详情
|
||||
* @param record
|
||||
*/
|
||||
toDetailPage ({ standardId, splitStandardSource }) {
|
||||
let path
|
||||
// 根据来源跳转不同的详情页
|
||||
switch (splitStandardSource) {
|
||||
// 国内
|
||||
case StandardSource.DOMESTIC.value:
|
||||
path = '/standardRegulationLibrary/DomesticStandardDetail'
|
||||
break
|
||||
// 海外
|
||||
case StandardSource.OVERSEAS.value:
|
||||
path = '/standardRegulationLibrary/OverseasStandardDetail'
|
||||
break
|
||||
// 企标
|
||||
case StandardSource.ENTERPRISE.value:
|
||||
path = '/enterpriseStandardLibrary/enterpriseStandardDetail'
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
if (!path) {
|
||||
return
|
||||
}
|
||||
const query = {
|
||||
id: standardId
|
||||
}
|
||||
this.$openPageNewSheet({
|
||||
path, query
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 跳转评估流程详情
|
||||
*/
|
||||
toEvaluationProcessDetail () {
|
||||
|
||||
},
|
||||
/**
|
||||
* 跳转评估结果页面
|
||||
*/
|
||||
toEvaluationResult ({ evaluationResults }) {
|
||||
this.$router.push({
|
||||
path: '/projectLibrary/EvaluationResultPage',
|
||||
query: {
|
||||
evaluationResults
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -0,0 +1,207 @@
|
||||
<template>
|
||||
<internal-detail-page :title="pageTitle">
|
||||
<j-table
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:can-drag="true"
|
||||
rowKey="id"
|
||||
:row-selection="null"
|
||||
:pagination="false"
|
||||
:scroll="{x: '100%'}"
|
||||
:loading="loading">
|
||||
</j-table>
|
||||
</internal-detail-page>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import InternalDetailPage from '../../../components/InternalDetailPage'
|
||||
import { EvaluationResultType } from '../../../enums/commonEnums'
|
||||
import JTable from '../../../components/jero/JTable'
|
||||
|
||||
export default {
|
||||
name: 'EvaluationResultPage',
|
||||
components: { JTable, InternalDetailPage },
|
||||
data () {
|
||||
return {
|
||||
pageTitle: EvaluationResultType.nameOfIndex(this.$route.query.evaluationResults),
|
||||
dataSource: [],
|
||||
// 符合表头
|
||||
coincidenceListHead: [
|
||||
// 标准编号/条款号
|
||||
{
|
||||
dataIndex: 'responsibleDepartment',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.standardNumberClauseNumber'),
|
||||
width: 120
|
||||
},
|
||||
// 项目编号
|
||||
{
|
||||
dataIndex: 'responsibleDepartment',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.projectNumber'),
|
||||
width: 120
|
||||
},
|
||||
// 责任部门
|
||||
{
|
||||
dataIndex: 'responsibleDepartment',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.responsibleDepartment'),
|
||||
width: 120
|
||||
},
|
||||
// 评估人
|
||||
{
|
||||
dataIndex: 'responsibleDepartment',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.evaluator'),
|
||||
width: 120
|
||||
},
|
||||
// 评估日期
|
||||
{
|
||||
dataIndex: 'responsibleDepartment',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.dateOfEvaluation'),
|
||||
width: 120
|
||||
}
|
||||
],
|
||||
// 不符合表头
|
||||
doesNotMatchTheHeader: [
|
||||
// 标准编号/条款号
|
||||
{
|
||||
dataIndex: 'responsibleDepartment',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.standardNumberClauseNumber'),
|
||||
width: 120
|
||||
},
|
||||
// 不符合项
|
||||
{
|
||||
dataIndex: 'responsibleDepartment',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.nonConformanceTerm'),
|
||||
width: 120
|
||||
},
|
||||
// 应对措施
|
||||
{
|
||||
dataIndex: 'responsibleDepartment',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.solutions'),
|
||||
width: 120
|
||||
},
|
||||
// 责任部门
|
||||
{
|
||||
dataIndex: 'responsibleDepartment',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.responsibleDepartment'),
|
||||
width: 120
|
||||
},
|
||||
// 评估人
|
||||
{
|
||||
dataIndex: 'responsibleDepartment',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.evaluator'),
|
||||
width: 120
|
||||
},
|
||||
// 评估日期
|
||||
{
|
||||
dataIndex: 'responsibleDepartment',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.dateOfEvaluation'),
|
||||
width: 120
|
||||
}
|
||||
],
|
||||
// 待验证表头
|
||||
tableHeaderToBeVerified: [
|
||||
// 标准编号/条款号
|
||||
{
|
||||
dataIndex: 'responsibleDepartment',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.standardNumberClauseNumber'),
|
||||
width: 120
|
||||
},
|
||||
// 风险点
|
||||
{
|
||||
dataIndex: 'responsibleDepartment',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.riskPoint'),
|
||||
width: 120
|
||||
},
|
||||
// 验证方案
|
||||
{
|
||||
dataIndex: 'responsibleDepartment',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.verificationScheme'),
|
||||
width: 120
|
||||
},
|
||||
// 预估更改周期
|
||||
{
|
||||
dataIndex: 'responsibleDepartment',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.estimateTheChangeCycle'),
|
||||
width: 120
|
||||
},
|
||||
// 责任部门
|
||||
{
|
||||
dataIndex: 'responsibleDepartment',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.responsibleDepartment'),
|
||||
width: 120
|
||||
},
|
||||
// 评估人
|
||||
{
|
||||
dataIndex: 'responsibleDepartment',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.evaluator'),
|
||||
width: 120
|
||||
},
|
||||
// 评估日期
|
||||
{
|
||||
dataIndex: 'responsibleDepartment',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.dateOfEvaluation'),
|
||||
width: 120
|
||||
}
|
||||
],
|
||||
// 不涉及表头
|
||||
noTableHeaderIsInvolved: [
|
||||
// 标准编号/条款号
|
||||
{
|
||||
dataIndex: 'responsibleDepartment',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.standardNumberClauseNumber'),
|
||||
width: 120
|
||||
},
|
||||
// 不涉及
|
||||
{
|
||||
dataIndex: 'responsibleDepartment',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.uninvolved'),
|
||||
width: 120
|
||||
},
|
||||
// 责任部门
|
||||
{
|
||||
dataIndex: 'responsibleDepartment',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.responsibleDepartment'),
|
||||
width: 120
|
||||
},
|
||||
// 评估人
|
||||
{
|
||||
dataIndex: 'responsibleDepartment',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.evaluator'),
|
||||
width: 120
|
||||
},
|
||||
// 评估日期
|
||||
{
|
||||
dataIndex: 'responsibleDepartment',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.dateOfEvaluation'),
|
||||
width: 120
|
||||
}
|
||||
],
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
columns () {
|
||||
// 符合
|
||||
if (this.$route.query.evaluationResults === EvaluationResultType.accordWith.value) {
|
||||
return this.coincidenceListHead
|
||||
}
|
||||
// 不符合
|
||||
if (this.$route.query.evaluationResults === EvaluationResultType.inconformity.value) {
|
||||
return this.doesNotMatchTheHeader
|
||||
}
|
||||
// 待验证
|
||||
if (this.$route.query.evaluationResults === EvaluationResultType.toBeVerified.value) {
|
||||
return this.tableHeaderToBeVerified
|
||||
}
|
||||
// 不涉及
|
||||
if (this.$route.query.evaluationResults === EvaluationResultType.uninvolved.value) {
|
||||
return this.noTableHeaderIsInvolved
|
||||
}
|
||||
return []
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
|
||||
</style>
|
||||
@@ -22,7 +22,7 @@
|
||||
<j-dict-select-tag
|
||||
class="box-input"
|
||||
v-model="queryParam.projectHealth"
|
||||
:placeholder="$t('pleaseSelect') + $t('personalCenter.collection.status')"
|
||||
:placeholder="$t('pleaseSelect') + $t('projectLibrary.projectHealthStatus')"
|
||||
:type="'select'"
|
||||
:triggerChange="false"
|
||||
:dictCode="'project_health'" />
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
<template>
|
||||
<internal-detail-page :title="pageTitle" :loading="loading">
|
||||
<internal-detail-page :title="pageTitle" :loading="detailLoading">
|
||||
<template v-slot:titleRightCustom>
|
||||
<a-button type="primary">{{ $t('projectLibrary.vehicleItemLibrary.noMatchItemDetails') }}</a-button>
|
||||
<!--未符合项详情-->
|
||||
<a-button type="primary" v-has="'vehicleItemLibrary:detail:noMatchItemDetail'">
|
||||
{{ $t('projectLibrary.vehicleItemLibrary.noMatchItemDetails') }}
|
||||
</a-button>
|
||||
</template>
|
||||
<!--项目信息-->
|
||||
<div class="project-form">
|
||||
@@ -32,7 +35,13 @@
|
||||
</div>
|
||||
</div>
|
||||
<!--风险性总览-->
|
||||
<a-table size="small" bordered :columns="riskOverviewColumns" :data-source="riskOverviewData"></a-table>
|
||||
<a-table size="small"
|
||||
bordered
|
||||
:columns="riskOverviewColumns"
|
||||
:data-source="riskOverviewData"
|
||||
:loading="riskOverviewLoading"
|
||||
:pagination="false">
|
||||
</a-table>
|
||||
|
||||
<!--法规清单-->
|
||||
<div class="part-title">{{ $t('projectLibrary.vehicleItemLibrary.regulationsList') }}</div>
|
||||
@@ -44,22 +53,26 @@
|
||||
<a-col :md="6" :sm="12">
|
||||
<a-form-item :label="$t('projectLibrary.vehicleItemLibrary.standardNumber')">
|
||||
<j-input :placeholder="$t('pleaseEnter') + $t('projectLibrary.vehicleItemLibrary.standardNumber')"
|
||||
v-model="queryParam.standardName"></j-input>
|
||||
v-model="queryParam.standardNumber"></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!--标准名称-->
|
||||
<a-col :md="6" :sm="12">
|
||||
<a-form-item :label="$t('projectLibrary.vehicleItemLibrary.standardName')">
|
||||
<j-input :placeholder="$t('pleaseEnter') + $t('projectLibrary.vehicleItemLibrary.standardName')"
|
||||
v-model="queryParam.standardNumber"></j-input>
|
||||
v-model="queryParam.standardName"></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="searchReset" icon="reload" ghost>{{ $t('reset') }}</a-button>
|
||||
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 8px" v-has="'vehicleItemLibrary:search'">
|
||||
<a-button type="primary"
|
||||
@click="searchQuery"
|
||||
icon="search"
|
||||
style="margin-left: 8px"
|
||||
v-has="'vehicleItemLibrary:detail:search'">
|
||||
{{ $t('query') }}
|
||||
</a-button>
|
||||
<a-button type="primary" @click="searchReset" icon="reload" ghost>{{ $t('reset') }}</a-button>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@@ -67,16 +80,17 @@
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<!-- 调取-->
|
||||
<a-button type="primary" @click="handleTransfer" ghost v-has="'vehicleItemLibrary:add'">{{ $t('projectLibrary.vehicleItemLibrary.transfer') }}
|
||||
<a-button type="primary" @click="handleTransfer" ghost v-has="'vehicleItemLibrary:detail:transfer'">
|
||||
{{ $t('projectLibrary.vehicleItemLibrary.transfer') }}
|
||||
</a-button>
|
||||
<!-- 复制-->
|
||||
<a-button type="primary" ghost @click="handleCopy" v-has="'vehicleItemLibrary:batchDel'">{{ $t('copy') }}</a-button>
|
||||
<a-button type="primary" ghost @click="handleCopy" v-has="'vehicleItemLibrary:detail:copy'">{{ $t('copy') }}</a-button>
|
||||
<!-- 导出-->
|
||||
<a-button icon="upload"
|
||||
type="primary"
|
||||
ghost
|
||||
@click="handleExportXls($t('projectLibrary.vehicleItemLibrary.vehicleItemLibrary'))"
|
||||
v-has="'vehicleItemLibrary:export'">
|
||||
v-has="'vehicleItemLibrary:detail:export'"
|
||||
@click="handleExportXls($t('projectLibrary.vehicleItemLibrary.regulationsList'))">
|
||||
{{ $t('export') }}
|
||||
</a-button>
|
||||
</div>
|
||||
@@ -89,10 +103,13 @@
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:pagination="ipagination"
|
||||
:scroll="{x: '100%'}"
|
||||
:loading="loading"
|
||||
:operation-list="operationList"
|
||||
@operationClick="operationClick"
|
||||
@change="handleTableChange">
|
||||
|
||||
<!-- 标准编号-->
|
||||
<template v-slot:standardNumber="{text, record}">
|
||||
<!--跳转标准详情-->
|
||||
<template v-slot:standardDetail="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<div class="table-text can-click-table-text" v-if="text || text === 0" @click="toDetailPage(record)">{{ text }}</div>
|
||||
@@ -100,49 +117,50 @@
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<!-- 标准名称-->
|
||||
<template v-slot:standardName="{text, record}">
|
||||
<!--跳转评估结果-->
|
||||
<template v-slot:evaluationResult="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<div class="table-text can-click-table-text" v-if="text || text === 0" @click="toDetailPage(record)">{{ text }}</div>
|
||||
<div class="table-text can-click-table-text" v-if="text || text === 0" @click="toEvaluationResult(record)">{{ text }}</div>
|
||||
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<template v-slot:operation="{text, record}">
|
||||
<a @click="evaluationResultHistory(record)">{{ $t('projectLibrary.vehicleItemLibrary.evaluationResultHistory') }}</a>
|
||||
<a-divider type="vertical" />
|
||||
<a @click="handleDelete(record.id)">
|
||||
<!--删除图标-->
|
||||
<i class="iconfont icon-shanchu_ operate-btn-icon" />
|
||||
{{ $t('delete') }}
|
||||
</a>
|
||||
</template>
|
||||
|
||||
</j-table>
|
||||
</div>
|
||||
|
||||
<!--选择标准-->
|
||||
<standard-selection-modal ref="standardSelectionModal"/>
|
||||
<standard-selection-modal ref="standardSelectionModal"
|
||||
:can-selected-source="[StandardSource.DOMESTIC.value, StandardSource.OVERSEAS.value]"
|
||||
@change="handleContinueTransfer" />
|
||||
<!--选择项目-->
|
||||
<vehicle-project-selection-drawer ref="projectSelectionModal" @change="handleContinueCopy" />
|
||||
</internal-detail-page>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import '@assets/less/common.less'
|
||||
import InternalDetailPage from '../../../components/InternalDetailPage.vue'
|
||||
import { queryByIdVehicleItemLibrary } from '../../../api/projectLibraryApi.js'
|
||||
import {
|
||||
queryByIdVehicleItemLibrary,
|
||||
queryProjectRiskOverview,
|
||||
transferRegulationList,
|
||||
copyProject
|
||||
} from '../../../api/projectLibraryApi.js'
|
||||
import { JeroListMixin } from '../../../mixins/JeroListMixin.js'
|
||||
import JTable from '../../../components/jero/JTable.vue'
|
||||
import { StandardSource } from '../../../enums/commonEnums.js'
|
||||
import StandardSelectionModal from '../../../components/selection/StandardSelectionModal.vue'
|
||||
import { StandardSource } from '../../../enums/commonEnums'
|
||||
import VehicleProjectSelectionDrawer from '../../../components/selection/VehicleProjectSelectionDrawer'
|
||||
|
||||
export default {
|
||||
name: 'VehicleItemLibraryDetail',
|
||||
components: { JTable, InternalDetailPage, StandardSelectionModal },
|
||||
components: { JTable, InternalDetailPage, StandardSelectionModal, VehicleProjectSelectionDrawer },
|
||||
mixins: [JeroListMixin],
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
StandardSource,
|
||||
detailLoading: false,
|
||||
detailData: {}, // 项目详情数据
|
||||
// 风险项总览表头
|
||||
riskOverviewColumns: [
|
||||
@@ -159,7 +177,7 @@ export default {
|
||||
// 不符合
|
||||
{
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.inconformity'),
|
||||
dataIndex: 'inconformity',
|
||||
dataIndex: 'nonConformance',
|
||||
align: 'center',
|
||||
width: 200
|
||||
},
|
||||
@@ -173,7 +191,7 @@ export default {
|
||||
// 不涉及
|
||||
{
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.uninvolved'),
|
||||
dataIndex: 'uninvolved',
|
||||
dataIndex: 'notInvolved',
|
||||
align: 'center',
|
||||
width: 200
|
||||
}
|
||||
@@ -181,6 +199,7 @@ export default {
|
||||
}
|
||||
],
|
||||
riskOverviewData: [], // 风险项总览数据
|
||||
riskOverviewLoading: false,
|
||||
// 法规清单表头
|
||||
columns: [
|
||||
// 标准号
|
||||
@@ -188,14 +207,14 @@ export default {
|
||||
dataIndex: 'standardNumber',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.standardNumber'),
|
||||
width: 150,
|
||||
scopedSlots: { customRender: 'standardNumber' }
|
||||
scopedSlots: { customRender: 'standardDetail' }
|
||||
},
|
||||
// 标准名称
|
||||
{
|
||||
dataIndex: 'standardName',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.standardName'),
|
||||
width: 150,
|
||||
scopedSlots: { customRender: 'standardName' }
|
||||
scopedSlots: { customRender: 'standardDetail' }
|
||||
},
|
||||
// 英文名称
|
||||
{
|
||||
@@ -237,7 +256,8 @@ export default {
|
||||
{
|
||||
dataIndex: 'evaluationResults_dictText',
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.evaluationResult'),
|
||||
width: 120
|
||||
width: 120,
|
||||
scopedSlots: { customRender: 'evaluationResult' }
|
||||
},
|
||||
// 责任部门
|
||||
{
|
||||
@@ -250,16 +270,31 @@ export default {
|
||||
title: this.$t('operation'),
|
||||
fixed: 'right',
|
||||
width: 210,
|
||||
scopedSlots: { customRender: 'operation' }
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
],
|
||||
url: {
|
||||
list: '/projectLibrary/lawsAssess/page',
|
||||
delete: '/projectLibrary/lawsAssess/delete'
|
||||
delete: '/projectLibrary/lawsAssess/delete',
|
||||
exportXlsUrl: '/projectLibrary/lawsAssess/exportXls'
|
||||
},
|
||||
filters: {
|
||||
projectId: this.$route.query.id
|
||||
}
|
||||
},
|
||||
operationList: [
|
||||
// 评估结果历史
|
||||
{
|
||||
text: this.$t('projectLibrary.vehicleItemLibrary.evaluationResultHistory'),
|
||||
clickEvent: 'evaluationResultHistory',
|
||||
has: 'vehicleItemLibrary:detail:evaluationResultHistory'
|
||||
},
|
||||
// 删除
|
||||
{
|
||||
text: this.$t('delete'),
|
||||
clickEvent: 'handleDelete',
|
||||
has: 'vehicleItemLibrary:detail:delete'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -269,10 +304,11 @@ export default {
|
||||
},
|
||||
created () {
|
||||
this.loadDetailData()
|
||||
this.loadProjectRiskOverview()
|
||||
},
|
||||
methods: {
|
||||
loadDetailData () {
|
||||
this.loading = true
|
||||
this.detailLoading = true
|
||||
queryByIdVehicleItemLibrary({ id: this.$route.query.id }).then(res => {
|
||||
if (res.success) {
|
||||
this.detailData = Object.assign({}, res.result || {})
|
||||
@@ -280,7 +316,22 @@ export default {
|
||||
this.$message.warn(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
this.detailLoading = false
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取风险性总览数据
|
||||
*/
|
||||
loadProjectRiskOverview () {
|
||||
this.riskOverviewLoading = true
|
||||
queryProjectRiskOverview({ id: this.$route.query.id }).then(res => {
|
||||
if (res.success) {
|
||||
this.riskOverviewData = [res.result]
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.riskOverviewLoading = false
|
||||
})
|
||||
},
|
||||
/**
|
||||
@@ -289,32 +340,111 @@ export default {
|
||||
handleTransfer () {
|
||||
this.$refs.standardSelectionModal.open()
|
||||
},
|
||||
/**
|
||||
* 调取
|
||||
* @param numbers
|
||||
*/
|
||||
handleContinueTransfer (numbers) {
|
||||
this.loading = true
|
||||
const params = { standardNumber: numbers, projectId: this.$route.query.id }
|
||||
transferRegulationList(params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.loading = false
|
||||
this.loadData()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 复制
|
||||
*/
|
||||
handleCopy () {
|
||||
|
||||
this.$refs.projectSelectionModal.open()
|
||||
},
|
||||
handleContinueCopy (ids) {
|
||||
this.loading = true
|
||||
const params = { copyProjectId: ids, projectId: this.$route.query.id }
|
||||
copyProject(params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.loading = false
|
||||
this.loadData()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 跳转详情页
|
||||
* @param id
|
||||
*/
|
||||
toDetailPage ({ id }) {
|
||||
/**
|
||||
* 跳转标准详情
|
||||
* @param record
|
||||
*/
|
||||
toDetailPage ({ standardId, splitStandardSource }) {
|
||||
let path
|
||||
// 根据来源跳转不同的详情页
|
||||
switch (splitStandardSource) {
|
||||
// 国内
|
||||
case StandardSource.DOMESTIC.value:
|
||||
path = '/standardRegulationLibrary/DomesticStandardDetail'
|
||||
break
|
||||
// 海外
|
||||
case StandardSource.OVERSEAS.value:
|
||||
path = '/standardRegulationLibrary/OverseasStandardDetail'
|
||||
break
|
||||
// 企标
|
||||
case StandardSource.ENTERPRISE.value:
|
||||
path = '/enterpriseStandardLibrary/enterpriseStandardDetail'
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
if (!path) {
|
||||
return
|
||||
}
|
||||
const query = {
|
||||
id: standardId
|
||||
}
|
||||
this.$openPageNewSheet({
|
||||
path: '/standardRegulationLibrary/DomesticStandardDetail',
|
||||
query: {
|
||||
id
|
||||
}
|
||||
path, query
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 评估结果历史
|
||||
*/
|
||||
evaluationResultHistory () {
|
||||
|
||||
evaluationResultHistory ({ id }) {
|
||||
this.$router.push({
|
||||
path: '/projectLibrary/EvaluationResultHistoryPage',
|
||||
query: {
|
||||
assessId: id
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 评估结果
|
||||
*/
|
||||
toEvaluationResult ({ evaluationResults }) {
|
||||
console.log(evaluationResults)
|
||||
this.$router.push({
|
||||
path: '/projectLibrary/EvaluationResultPage',
|
||||
query: {
|
||||
evaluationResults
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.project-form {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
Reference in New Issue
Block a user