update 国内标准体系联调、车型项目库详情、用户新增编辑开启工号字段
This commit is contained in:
@@ -71,6 +71,15 @@
|
||||
:scroll="{x: '100%'}"
|
||||
@change="handleTableChange">
|
||||
|
||||
<!-- 项目名称-->
|
||||
<template v-slot:projectName="{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="handleDetail(record)">{{ text }}</div>
|
||||
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<template v-slot:operation="{text, record}">
|
||||
<a @click="operationClick(operationList[0],record)">{{ operationList[0].text }}</a>
|
||||
<a-divider type="vertical" />
|
||||
@@ -124,7 +133,8 @@ export default {
|
||||
dataIndex: 'projectName',
|
||||
title: this.$t('projectLibrary.projectName'),
|
||||
sorter: true,
|
||||
width: 250
|
||||
width: 250,
|
||||
scopedSlots: { customRender: 'projectName' }
|
||||
},
|
||||
// 工作令编号
|
||||
{
|
||||
@@ -192,15 +202,13 @@ export default {
|
||||
handlePMSInfoSynchronization () {
|
||||
|
||||
},
|
||||
operationClick (operation, record) {
|
||||
if (operation.clickEvent === 'handleDelete') {
|
||||
this.handleDelete(record.id)
|
||||
} else {
|
||||
this[operation.clickEvent](record)
|
||||
}
|
||||
},
|
||||
handleDetail () {
|
||||
|
||||
handleDetail ({ id, projectName }) {
|
||||
this.$router.push({
|
||||
path: '/projectLibrary/VehicleItemLibraryDetail',
|
||||
query: {
|
||||
id, projectName
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,217 @@
|
||||
<template>
|
||||
<internal-detail-page :title="pageTitle" :loading="loading">
|
||||
<template v-slot:titleRightCustom>
|
||||
<a-button type="primary">{{ $t('projectLibrary.vehicleItemLibrary.noMatchItemDetails') }}</a-button>
|
||||
</template>
|
||||
<!--项目信息-->
|
||||
<div class="project-form">
|
||||
<!--项目来源-->
|
||||
<div class="detail-page-part-form-item">
|
||||
<label>{{ $t('projectLibrary.vehicleItemLibrary.projectSource') }}</label>
|
||||
<span>{{ detailData.projectSource_dictText }}</span>
|
||||
</div>
|
||||
<!--项目名称-->
|
||||
<div class="detail-page-part-form-item">
|
||||
<label>{{ $t('projectLibrary.projectName') }}</label>
|
||||
<span>{{ detailData.projectName }}</span>
|
||||
</div>
|
||||
<!--工作令编号-->
|
||||
<div class="detail-page-part-form-item">
|
||||
<label>{{ $t('projectLibrary.workOrderNumber') }}</label>
|
||||
<span>{{ detailData.workNumber }}</span>
|
||||
</div>
|
||||
<!--项目负责人-->
|
||||
<div class="detail-page-part-form-item">
|
||||
<label>{{ $t('projectLibrary.vehicleItemLibrary.projectLeader') }}</label>
|
||||
<span>{{ detailData.nameWorkNo }}</span>
|
||||
</div>
|
||||
<!--项目健康状态-->
|
||||
<div class="detail-page-part-form-item">
|
||||
<label>{{ $t('projectLibrary.projectHealthStatus') }}</label>
|
||||
<span>{{ detailData.projectHealth_dictText }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<!--风险性总览-->
|
||||
<a-table size="small" bordered :columns="riskOverviewColumns" :data-source="riskOverviewData"></a-table>
|
||||
|
||||
<!--法规清单-->
|
||||
<div class="part-title">{{ $t('projectLibrary.vehicleItemLibrary.regulationsList') }}</div>
|
||||
<!--查询区域-->
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline">
|
||||
<a-row :gutter="24">
|
||||
<!--标准号/标准名称-->
|
||||
<a-col :md="6" :sm="12">
|
||||
<a-form-item :label="$t('projectLibrary.vehicleItemLibrary.standardNumberStandardName')">
|
||||
<j-input :placeholder="$t('pleaseEnter') + $t('projectLibrary.vehicleItemLibrary.standardNumberStandardName')"
|
||||
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="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 class="table-operator">
|
||||
<!-- 调取-->
|
||||
<a-button type="primary" @click="handleTransfer" ghost v-has="'vehicleItemLibrary:add'">{{ $t('projectLibrary.vehicleItemLibrary.transfer') }}
|
||||
</a-button>
|
||||
<!-- 复制-->
|
||||
<a-button type="primary" ghost @click="handleCopy" v-has="'vehicleItemLibrary:batchDel'">{{ $t('copy') }}</a-button>
|
||||
<!-- 导出-->
|
||||
<a-button icon="upload"
|
||||
type="primary"
|
||||
ghost
|
||||
@click="handleExportXls($t('projectLibrary.vehicleItemLibrary.vehicleItemLibrary'))"
|
||||
v-has="'vehicleItemLibrary:export'">
|
||||
{{ $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%'}"
|
||||
@change="handleTableChange">
|
||||
|
||||
<template v-slot:operation="{text, record}">
|
||||
<a @click="operationClick(operationList[0],record)">{{ operationList[0].text }}</a>
|
||||
<a-divider type="vertical" />
|
||||
<a-dropdown placement="bottomCenter">
|
||||
<a-icon type="more" class="operate-icon-btn operate-icon-more" />
|
||||
<a-menu slot="overlay">
|
||||
<a-menu-item v-for="(operation, index) in operationList.slice(operateMaxNum)" :key="index">
|
||||
<a @click="operationClick(operation,record)">
|
||||
<div class="operate-btn">
|
||||
<!-- 编辑图标-->
|
||||
<i class="iconfont icon-bianji operate-btn-icon" v-if="operation.text === $t('edit')" />
|
||||
<!-- 删除图标-->
|
||||
<i class="iconfont icon-shanchu_ operate-btn-icon" v-if="operation.text === $t('delete')" />
|
||||
{{ operation.text }}
|
||||
</div>
|
||||
</a>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</a-dropdown>
|
||||
</template>
|
||||
|
||||
</j-table>
|
||||
</div>
|
||||
</internal-detail-page>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import '@assets/less/common.less'
|
||||
import InternalDetailPage from '../../../components/InternalDetailPage.vue'
|
||||
import { queryByIdVehicleItemLibrary } from '../../../api/projectLibraryApi.js'
|
||||
import { JeroListMixin } from '../../../mixins/JeroListMixin.js'
|
||||
import JTable from '../../../components/jero/JTable.vue'
|
||||
|
||||
export default {
|
||||
name: 'VehicleItemLibraryDetail',
|
||||
components: { JTable, InternalDetailPage },
|
||||
mixins: [JeroListMixin],
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
detailData: {}, // 项目详情数据
|
||||
// 风险项总览表头
|
||||
riskOverviewColumns: [
|
||||
{
|
||||
title: this.$route.query.projectName + this.$t('projectLibrary.vehicleItemLibrary.riskOverview'),
|
||||
children: [
|
||||
// 符合
|
||||
{
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.conform'),
|
||||
dataIndex: 'conform',
|
||||
align: 'center',
|
||||
width: 200
|
||||
},
|
||||
// 不符合
|
||||
{
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.inconformity'),
|
||||
dataIndex: 'inconformity',
|
||||
align: 'center',
|
||||
width: 200
|
||||
},
|
||||
// 待验证
|
||||
{
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.toBeVerified'),
|
||||
dataIndex: 'toBeVerified',
|
||||
align: 'center',
|
||||
width: 200
|
||||
},
|
||||
// 不涉及
|
||||
{
|
||||
title: this.$t('projectLibrary.vehicleItemLibrary.uninvolved'),
|
||||
dataIndex: 'uninvolved',
|
||||
align: 'center',
|
||||
width: 200
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
riskOverviewData: [] // 风险项总览数据
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
pageTitle () {
|
||||
return `《${this.$route.query.projectName}》${this.$t('details')}`
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.loadDetailData()
|
||||
},
|
||||
methods: {
|
||||
loadDetailData () {
|
||||
this.loading = true
|
||||
queryByIdVehicleItemLibrary({ id: this.$route.query.id }).then(res => {
|
||||
if (res.success) {
|
||||
this.detailData = Object.assign({}, res.result || {})
|
||||
} else {
|
||||
this.$message.warn(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
handleTransfer () {
|
||||
|
||||
},
|
||||
handleCopy () {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.project-form {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.detail-page-part-form-item {
|
||||
label {
|
||||
width: 7em;
|
||||
}
|
||||
}
|
||||
|
||||
.part-title {
|
||||
font-size: 16px;
|
||||
font-family: PingFang SC-Medium, PingFang SC, sans-serif;
|
||||
font-weight: bold;
|
||||
color: #1D2129;
|
||||
margin: 24px 0 15px 0;
|
||||
}
|
||||
</style>
|
||||
@@ -3,7 +3,6 @@
|
||||
:title="title"
|
||||
:width="width"
|
||||
:visible="visible"
|
||||
switchFullscreen
|
||||
:maskClosable="false"
|
||||
:confirmLoading="confirmLoading"
|
||||
:ok-text="$t('preservation')"
|
||||
@@ -17,7 +16,7 @@
|
||||
<!--项目来源-->
|
||||
<a-col :span="12">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('projectLibrary.vehicleItemLibrary.projectSource')">
|
||||
<j-dict-select-tag v-decorator="['projectSource', validatorRules.projectSource]" dictCode="project_source" disabled
|
||||
<j-dict-select-tag v-decorator="['projectSource', validatorRules.projectSource]" dict-code="project_source" disabled
|
||||
:placeholder="$t('pleaseSelect') + $t('projectLibrary.vehicleItemLibrary.projectSource')" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -53,7 +52,7 @@
|
||||
<!--项目健康度-->
|
||||
<a-col :span="12">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('projectLibrary.projectHealthStatus')">
|
||||
<j-dict-select-tag v-decorator="['projectHealth', validatorRules.projectHealth]" dictCode="project_health"
|
||||
<j-dict-select-tag v-decorator="['projectHealth', validatorRules.projectHealth]" dict-code="project_health"
|
||||
:placeholder="$t('pleaseSelect') + $t('projectLibrary.projectHealthStatus')" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
Reference in New Issue
Block a user