对接项目库列表

This commit is contained in:
qq787203167
2022-04-15 10:48:28 +08:00
parent 738ea57e9a
commit cadf1c9dfe
4 changed files with 216 additions and 128 deletions
+3
View File
@@ -652,4 +652,7 @@ module.exports = {
FileUploadedSuccessfully:'File uploaded successfully',
DeletedSuccessfully:'Deleted successfully',
confirmCopy:'confirm Copy ?',
DigitalPlatform:'Digital platform',
dehicleDevelopmentPlan:'Vehicle development plan',
certificationProgram:'certificationProgram',
}
+3
View File
@@ -656,4 +656,7 @@ module.exports = {
FileUploadedSuccessfully:'文件上传成功',
DeletedSuccessfully:'删除成功',
confirmCopy: '确定复制',
DigitalPlatform:'数字平台',
dehicleDevelopmentPlan:'整车开发计划',
certificationProgram:'认证计划',
}
@@ -1,6 +1,6 @@
<template>
<a-drawer
:title="'添加'"
:title="title"
:maskClosable="false"
:width="1000"
placement="right"
@@ -17,9 +17,9 @@
<span class="title-text-text" :title="$t('entryName')">{{$t('entryName')}}</span>
</div>
<a-form-model-item class="itemModel" prop="entryName">
<j-dict-select-tag class="box-input" v-model="formInline.entryName"
<j-dict-select-tag class="box-input" v-model="formInline.projectName"
:disabled="disabled"
@input="handleInput('entryName')"
@input="handleInput('projectName')"
:placeholder="$t('PleaseSelect')+$t('entryName')"
:type="'select'"
:triggerChange="false" :dictCode="'dict_field'"/>
@@ -37,7 +37,7 @@
@input="handleInput('targetMarket')"
:placeholder="$t('PleaseSelect')+$t('targetMarket')"
:type="'select'"
:triggerChange="false" :dictCode="'dict_field'"/>
:triggerChange="false" :dictCode="'region'"/>
</a-form-model-item>
</div>
</a-col>
@@ -54,35 +54,7 @@
@input="handleInput('projectStatus')"
:placeholder="$t('PleaseSelect')+$t('projectStatus')"
:type="'select'"
:triggerChange="false" :dictCode="'dict_field'"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" title="Gate">Gate</span>
</div>
<a-form-model-item class="itemModel" prop="Gate">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.Gate"
:placeholder="$t('PleaseEnter')+'Gate'"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('IPDInformation')">{{$t('IPDInformation')}}</span>
</div>
<a-form-model-item class="itemModel" prop="IPDInformation">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.IPDInformation"
:placeholder="$t('PleaseEnter')+$t('IPDInformation')"/>
:triggerChange="false" :dictCode="'project_status'"/>
</a-form-model-item>
</div>
</a-col>
@@ -92,11 +64,11 @@
<span class="title-text-text" :title="$t('StudioEngineer')">{{$t('StudioEngineer')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="'StudioEngineer'">
<PersonnelSelection :query="{db_field_name:'StudioEngineer',db_field_txt:$t('StudioEngineer')}"
<PersonnelSelection :query="{db_field_name:'studioEngineer',db_field_txt:$t('StudioEngineer')}"
:personneQuery="formInline"
@change="PersonnelSelectionChange"
:disabled="disabled"
v-model="formInline.StudioEngineer"/>
v-model="formInline.studioEngineer"/>
</a-form-model-item>
</div>
</a-col>
@@ -105,57 +77,89 @@
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('CertificationTime')">{{$t('CertificationTime')}}</span>
<span class="title-text-text" :title="$t('certifiedEngineer')">{{$t('certifiedEngineer')}}</span>
</div>
<a-form-model-item class="itemModel" prop="CertificationTime">
<a-range-picker class="box-input" v-model="formInline.CertificationTime"
:disabled="disabled"
@change="onChange('CertificationTime')"></a-range-picker>
<a-form-model-item class="itemModel" :prop="'certificationEngineer'">
<PersonnelSelection
:query="{db_field_name:'certificationEngineer',db_field_txt:$t('certifiedEngineer')}"
:personneQuery="formInline"
@change="PersonnelSelectionChange"
:disabled="disabled"
v-model="formInline.certificationEngineer"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('NTplatform')">{{$t('NTplatform')}}</span>
<span class="title-text-text" :title="$t('IPDInformation')">{{$t('IPDInformation')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="'NTplatform'">
<j-dict-select-tag class="box-input" v-model="formInline.NTplatform"
:disabled="disabled"
@input="handleInput('NTplatform')"
:placeholder="$t('PleaseSelect')+$t('NTplatform')"
:type="'select'"
:triggerChange="false" :dictCode="'dict_field'"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('NPplatform')">{{$t('NPplatform')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="'NPplatform'">
<j-dict-select-tag class="box-input" v-model="formInline.NPplatform"
:disabled="disabled"
@input="handleInput('NPplatform')"
:placeholder="$t('PleaseSelect')+$t('NPplatform')"
:type="'select'"
:triggerChange="false" :dictCode="'dict_field'"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('certificationProgramInformation')">{{$t('certificationProgramInformation')}}</span>
</div>
<a-form-model-item class="itemModel" prop="certificationProgramInformation">
<a-form-model-item class="itemModel" prop="ipdInfo">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.certificationProgramInformation"
:placeholder="$t('PleaseEnter')+$t('certificationProgramInformation')"/>
v-model="formInline.ipdInfo"
:placeholder="$t('PleaseEnter')+$t('IPDInformation')"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('ModelPlatform')">{{$t('ModelPlatform')}}</span>
</div>
<a-form-model-item class="itemModel" prop="vehiclePlatform">
<j-dict-select-tag class="box-input" v-model="formInline.vehiclePlatform"
:disabled="disabled"
@input="handleInput('vehiclePlatform')"
:placeholder="$t('PleaseSelect')+$t('ModelPlatform')"
:type="'select'"
:triggerChange="false" :dictCode="'vehicle_platform'"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('DigitalPlatform')">{{$t('DigitalPlatform')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="'digitalPlatform'">
<j-dict-select-tag class="box-input" v-model="formInline.digitalPlatform"
:disabled="disabled"
@input="handleInput('digitalPlatform')"
:placeholder="$t('PleaseSelect')+$t('DigitalPlatform')"
:type="'select'"
:triggerChange="false" :dictCode="'digital_platform'"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('dehicleDevelopmentPlan')">{{$t('dehicleDevelopmentPlan')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="'vehicleDevelopmentPlan'">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.vehicleDevelopmentPlan"
:placeholder="$t('PleaseEnter')+$t('dehicleDevelopmentPlan')"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('certificationProgram')">{{$t('certificationProgram')}}</span>
</div>
<a-form-model-item class="itemModel" prop="attestationPlan">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.attestationPlan"
:placeholder="$t('PleaseEnter')+$t('certificationProgram')"/>
</a-form-model-item>
</div>
</a-col>
@@ -171,19 +175,22 @@
<script>
import PersonnelSelection from '@/components/PersonnelSelection/index'
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
export default {
name: 'addModel',
components: {
PersonnelSelection
},
props: ['url'],
data() {
return {
formInline: {},
confirmLoading: false,
visible: false,
rules: {},
disabled: false
disabled: false,
title: ''
}
},
mounted() {
@@ -191,13 +198,45 @@
methods: {
addModel() {
this.visible = true
this.title = '新增'
this.formInline = {}
},
editModel(value) {
this.visible = true
this.title = '编辑'
this.$nextTick(() => {
this.formInline = value
})
},
handleCancel() {
this.visible = false
},
handleSubmit() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
let url = ''
let Action
if (this.formInline.id) {
url = this.url.edit
Action = putAction
} else {
url = this.url.add
Action = postAction
}
this.confirmLoading = true
Action(url, this.formInline).then((res) => {
if (res.success) {
this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.$emit('addModelList')
} else {
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
}
})
}
})
},
handleInput(value) {
this.$nextTick(() => {
@@ -320,4 +359,9 @@
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>
<style>
.ant-input-disabled {
color: rgba(0, 0, 0, 0.65) !important;
}
</style>
@@ -8,7 +8,7 @@
<span>{{$t('entryName')}}</span>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('entryName')"
v-model="queryParam.entryName"></a-input>
v-model="queryParam.projectName"></a-input>
</div>
</a-col>
<a-col :md="6" :sm="8">
@@ -40,7 +40,7 @@
<span>{{$t('StudioEngineer')}}</span>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('StudioEngineer')"
v-model="queryParam.StudioEngineer"></a-input>
v-model="queryParam.studioEngineer"></a-input>
</div>
</a-col>
</template>
@@ -98,12 +98,12 @@
@showSizeChange="SizeChange"
/>
</div>
<addModel ref="addModelRef"/>
<addModel :url="url" ref="addModelRef" @addModelList="addModelList"/>
</a-card>
</template>
<script>
import { getAction, postAction, downloadFile } from '@/api/manage'
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
import addModel from '../components/addModel'
export default {
@@ -122,11 +122,11 @@
dataSource: [],
confirmLoading: false,
url: {
list:'project/projectLibraryBase/list',
add:'project/projectLibraryBase/add',
edit:'project/projectLibraryBase/edit',
deleteBatch:'project/projectLibraryBase/delete',
deleteAll:'project/projectLibraryBase/deleteBatch',
list: 'project/projectLibraryBase/page',
add: 'project/projectLibraryBase/add',
edit: 'project/projectLibraryBase/edit',
deleteBatch: 'project/projectLibraryBase/delete',
deleteAll: 'project/projectLibraryBase/deleteBatch'
},
total: 0,
pageSize: 10,
@@ -142,37 +142,32 @@
{
title: this.$t('targetMarket'),
align: 'center',
dataIndex: 'targetMarket'
dataIndex: 'targetMarket_dictText'
},
{
title: this.$t('projectStatus'),
align: 'center',
dataIndex: 'projectStatus'
dataIndex: 'projectStatus_dictText'
},
{
title: this.$t('StudioEngineer'),
align: 'center',
dataIndex: 'studioEngineer'
dataIndex: 'studioEngineerName'
},
{
title: this.$t('certifiedEngineer'),
align: 'center',
dataIndex: 'certificationEngineer'
dataIndex: 'certificationEngineerName'
},
{
title: this.$t('CertificationTime'),
title: this.$t('ModelPlatform'),
align: 'center',
dataIndex: 'createTime'
dataIndex: 'vehiclePlatform_dictText'
},
{
title: this.$t('NTplatform'),
title: this.$t('DigitalPlatform'),
align: 'center',
dataIndex: 'NTplatform'
},
{
title: this.$t('NPplatform'),
align: 'center',
dataIndex: 'NPplatform'
dataIndex: 'digitalPlatform_dictText'
},
{
title: this.$t('operation'),
@@ -186,7 +181,7 @@
}
},
mounted() {
this.getList()
},
methods: {
handleToggleSearch() {
@@ -201,56 +196,99 @@
},
//批量删除
handleDel() {
let newUrl = this.$router.resolve({
path: '/ProjectDetails',
query: {}
})
window.open(newUrl.href, '_blank')
if (this.selectedRowKeys.length > 0) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmBatchDeletion'),
onOk() {
let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys))
deleteAction(_this.url.deleteAll, { ids: idList.join(',') }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.selectedRowKeys = []
_this.getList()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
//编辑
edit(item) {
this.title = '编辑'
this.formInline = item
this.visible = true
},
//撤回
withdraw() {
},
//维护清单
maintenanceList() {
},
//订阅
subscribe() {
this.$refs.addModelRef.editModel(JSON.parse(JSON.stringify(item)))
},
//删除
deleteLib(item) {
deleteLib(val) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
deleteAction(_this.url.deleteBatch, { id: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
},
//虚拟清单名称事件
entryNameClick(item) {
let newUrl = this.$router.resolve({
path: '/ProjectDetails',
query: item
})
window.open(newUrl.href, '_blank')
},
searchQuery() {
this.pageNo = 1
this.getList()
},
searchReset() {
this.pageNo = 1
this.queryParam = {}
this.getList()
},
pageOnChange(page, pageSize) {
this.pageNo = page
this.getList()
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.getList()
},
handleCancel() {
this.visible = false
addModelList() {
this.pageNo = 1
this.getList()
},
handleSubmit() {
getList() {
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...this.queryParam
}
this.loading = true
postAction(this.url.list, query).then((res) => {
if (res.success) {
if (res.result.current > 1 && res.result.records.length == 0) {
this.pageNo = res.result.current - 1
this.getList()
return
}
this.dataSource = res.result.records || []
this.total = res.result.total
this.loading = false
} else {
this.loading = false
}
})
}
}
}