[add] 参数模板列表

This commit is contained in:
zhaomeijing
2022-04-26 14:12:22 +08:00
parent 3c0f7798cd
commit bcd041ef15
2 changed files with 222 additions and 81 deletions
@@ -14,28 +14,34 @@
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="title-text-text" <span class="title-text-text" :title="$t('entryName')">{{$t('entryName')}}</span>
:title="$t('parameterTemplate')">{{$t('parameterTemplate')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="paramsTemplateName"> <a-form-model-item class="itemModel" prop="projectName">
<a-input class="box-input" <a-select :placeholder="$t('PleaseSelect')+$t('entryName')"
:disabled="disabled" @change="projectNameChange"
v-model="formInline.paramsTemplateName" v-model="formInline.projectNameId">
:placeholder="$t('PleaseEnter')+$t('parameterTemplate')"/> <a-select-option v-for="(item, key) in projectNameList"
:key="key"
:value="item.id">
<span style="display: inline-block;width: 100%" :title=" item.projectName ">
{{ item.projectName}}
</span>
</a-select-option>
</a-select>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="title-text-text" :title="$t('status')">{{$t('status')}}</span> <span class="title-text-text" :title="$t('targetMarket')">{{$t('targetMarket')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="state"> <a-form-model-item class="itemModel" prop="targetMarket">
<j-dict-select-tag class="box-input" v-model="formInline.state" <j-multi-select-tag class="box-input" v-model="formInline.targetMarket"
:disabled="disabled" :disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('status')" :placeholder="$t('PleaseSelect')+$t('targetMarket')"
:type="'select'" :type="'select'"
:triggerChange="false" :dictCode="'params_template_state'"/> :triggerChange="false" :dictCode="'region'"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -44,30 +50,123 @@
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="title-text-text" :title="$t('zoneOfApplication')">{{$t('zoneOfApplication')}}</span> <span class="title-text-text" :title="$t('projectStatus')">{{$t('projectStatus')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="region"> <a-form-model-item class="itemModel" prop="projectStatus">
<j-dict-select-tag class="box-input" v-model="formInline.region" <j-dict-select-tag class="box-input" v-model="formInline.projectStatus"
:disabled="disabled" :disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('zoneOfApplication')" @input="handleInput('projectStatus')"
:placeholder="$t('PleaseSelect')+$t('projectStatus')"
:type="'select'" :type="'select'"
:triggerChange="false" :dictCode="'region'"/> :triggerChange="false" :dictCode="'project_status'"/>
</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('StudioEngineer')">{{$t('StudioEngineer')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="'studioEngineerName'">
<PersonnelSelection :query="{db_field_name:'studioEngineer',db_field_txt:$t('StudioEngineer')}"
:isSingleChoice="true"
:personneQuery="formInline"
@change="PersonnelSelectionChange"
:disabled="disabled"
v-model="formInline.studioEngineerName"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="24"> <a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('certifiedEngineer')">{{$t('certifiedEngineer')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="'certificationEngineerName'">
<PersonnelSelection
:query="{db_field_name:'certificationEngineer',db_field_txt:$t('certifiedEngineer')}"
:personneQuery="formInline"
@change="PersonnelSelectionChange"
:disabled="disabled"
v-model="formInline.certificationEngineerName"/>
</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('IPDInformation')">{{$t('IPDInformation')}}</span>
</div>
<a-form-model-item class="itemModel" prop="ipdInfo">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.ipdInfo"
:placeholder="$t('PleaseEnter')+$t('IPDInformation')"/>
</a-form-model-item>
</div>
<!-- ^(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&amp;%\$#_]*)?$
-->
</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="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="title-text-text" <span class="title-text-text"
:title="$t('contentDescription')">{{$t('contentDescription')}}</span> :title="$t('dehicleDevelopmentPlan')">{{$t('dehicleDevelopmentPlan')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="description"> <a-form-model-item class="itemModel" :prop="'vehicleDevelopmentPlan'">
<a-input class="box-input" <a-input class="box-input"
:disabled="disabled" :disabled="disabled"
v-model="formInline.description" v-model="formInline.vehicleDevelopmentPlan"
:placeholder="$t('PleaseEnter')+$t('contentDescription')"/> :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> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -4,39 +4,91 @@
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :md="6" :sm="8"> <a-col :md="6" :sm="8">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text" :title="$t('zoneOfApplication')"> <div class="title-text" :title="$t('NiONumber')">
<span>{{$t('zoneOfApplication')}}</span> <span>{{$t('NiONumber')}}</span>
</div> </div>
<j-dict-select-tag class="box-input" v-model="queryParam.region" <a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('NiONumber')"
:placeholder="$t('PleaseSelect')+$t('zoneOfApplication')" v-model="queryParam.projectName"></a-input>
:type="'select'"
:triggerChange="false" :dictCode="'region'"/>
</div> </div>
</a-col> </a-col>
<a-col :md="6" :sm="8"> <a-col :md="6" :sm="8">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text" :title="$t('parameterTemplate')"> <div class="title-text" :title="$t('ParameterName')">
<span>{{$t('parameterTemplate')}}</span> <span>{{$t('ParameterName')}}</span>
</div> </div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('parameterTemplate')" <a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('ParameterName')"
v-model="queryParam.description"></a-input> v-model="queryParam.projectName"></a-input>
</div> </div>
</a-col> </a-col>
<a-col :md="6" :sm="8"> <a-col :md="6" :sm="8">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text" :title="$t('status')"> <div class="title-text" :title="$t('projectStatus')">
<span>{{$t('status')}}</span> <span>{{$t('projectStatus')}}</span>
</div> </div>
<j-dict-select-tag class="box-input" v-model="queryParam.state" <j-dict-select-tag class="box-input" v-model="queryParam.projectStatus"
:placeholder="$t('PleaseSelect')+$t('zoneOfApplication')" :placeholder="$t('PleaseSelect')+$t('projectStatus')"
:type="'select'" :type="'select'"
:triggerChange="false" :dictCode="'params_template_state'"/> :triggerChange="false" :dictCode="'project_status'"/>
</div> </div>
</a-col> </a-col>
<template v-if="toggleSearchStatus">
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('StudioEngineer')">
<span>{{$t('StudioEngineer')}}</span>
</div>
<PersonnelSelection class="box-input"
:query="{db_field_name:'studioEngineer',db_field_txt:$t('StudioEngineer')}"
:isInput="true"
:personneQuery="queryParam"
@change="PersonnelSelectionChange"
v-model="queryParam.studioEngineerName"/>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('certifiedEngineer')">
<span>{{$t('certifiedEngineer')}}</span>
</div>
<PersonnelSelection :query="{db_field_name:'certificationEngineer',db_field_txt:$t('certifiedEngineer')}"
:isInput="true"
class="box-input"
:personneQuery="queryParam"
@change="PersonnelSelectionChange"
v-model="queryParam.certificationEngineerName"/>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('ModelPlatform')">
<span>{{$t('ModelPlatform')}}</span>
</div>
<j-dict-select-tag class="box-input" v-model="queryParam.vehiclePlatform"
:placeholder="$t('PleaseSelect')+$t('ModelPlatform')"
:type="'select'"
:triggerChange="false" :dictCode="'vehicle_platform'"/>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('DigitalPlatform')">
<span>{{$t('DigitalPlatform')}}</span>
</div>
<j-dict-select-tag class="box-input" v-model="queryParam.digitalPlatform"
:placeholder="$t('PleaseSelect')+$t('DigitalPlatform')"
:type="'select'"
:triggerChange="false" :dictCode="'digital_platform'"/>
</div>
</a-col>
</template>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons"> <span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24"> <a-col :md="6" :sm="24">
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button> <a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button> <a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ !toggleSearchStatus ? $t('open') : $t('away') }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</a-col> </a-col>
</span> </span>
</a-row> </a-row>
@@ -46,10 +98,6 @@
<a-icon type="plus"/> <a-icon type="plus"/>
{{$t('add')}} {{$t('add')}}
</div> </div>
<div @click="handlecody" class="operator-text" v-has="'document:getInfoById'">
<a-icon type="copy"/>
{{$t('copy')}}
</div>
<div @click="handleDel" class="operator-text" v-has="'document:deleteBatch'"> <div @click="handleDel" class="operator-text" v-has="'document:deleteBatch'">
<a-icon type="delete"/> <a-icon type="delete"/>
{{$t('BatchDelete')}} {{$t('BatchDelete')}}
@@ -73,6 +121,7 @@
<span slot="operation" slot-scope="text,record"> <span slot="operation" slot-scope="text,record">
<a class="text-operation" @click="edit(record)">{{$t('edit')}}</a> <a class="text-operation" @click="edit(record)">{{$t('edit')}}</a>
<a class="text-operation" @click="deleteLib(record)">{{$t('deleteLib')}}</a> <a class="text-operation" @click="deleteLib(record)">{{$t('deleteLib')}}</a>
<!-- <a class="text-operation" @click="entryNameClick(record)">{{$t('see')}}</a>-->
</span> </span>
</a-table> </a-table>
</div> </div>
@@ -94,11 +143,13 @@
<script> <script>
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage' import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
import addModel from './components/addModel' import addModel from './components/addModel'
import PersonnelSelection from '@/components/PersonnelSelection/index'
export default { export default {
name: 'index', name: 'index',
components: { components: {
addModel, addModel,
PersonnelSelection
}, },
data() { data() {
return { return {
@@ -111,11 +162,11 @@ export default {
dataSource: [], dataSource: [],
confirmLoading: false, confirmLoading: false,
url: { url: {
list: 'params/template/page', list: 'project/projectLibraryBase/page',
add: 'params/template/add', add: 'project/projectLibraryBase/add',
edit: 'params/template/edit', edit: 'project/projectLibraryBase/edit',
deleteBatch: 'params/template/delete', deleteBatch: 'project/projectLibraryBase/delete',
deleteAll: 'params/template/deleteBatch' deleteAll: 'project/projectLibraryBase/deleteBatch'
}, },
total: 0, total: 0,
pageSize: 10, pageSize: 10,
@@ -123,38 +174,40 @@ export default {
title: '新增', title: '新增',
columns: [ columns: [
{ {
title: this.$t('zoneOfApplication'), title: this.$t('entryName'),
align: 'center', align: 'center',
width: '10%', dataIndex: 'projectName',
dataIndex: 'region_dictText',
},
{
title: this.$t('parameterTemplate'),
align: 'center',
dataIndex: 'paramsTemplateName',
scopedSlots: { customRender: 'projectName' } scopedSlots: { customRender: 'projectName' }
}, },
{ {
title: this.$t('contentDescription'), title: this.$t('targetMarket'),
align: 'center', align: 'center',
dataIndex: 'description' dataIndex: 'targetMarket_dictText'
}, },
{ {
title: this.$t('status'), title: this.$t('projectStatus'),
align: 'center', align: 'center',
dataIndex: 'state_dictText' dataIndex: 'projectStatus_dictText'
}, },
{ {
title: this.$t('createTime'), title: this.$t('StudioEngineer'),
align: 'center', align: 'center',
width: '10%', dataIndex: 'studioEngineerName'
dataIndex: 'createTime'
}, },
{ {
title: this.$t('updateTime'), title: this.$t('certifiedEngineer'),
align: 'center', align: 'center',
width: '10%', dataIndex: 'certificationEngineerName'
dataIndex: 'updateTime' },
{
title: this.$t('ModelPlatform'),
align: 'center',
dataIndex: 'vehiclePlatform_dictText'
},
{
title: this.$t('DigitalPlatform'),
align: 'center',
dataIndex: 'digitalPlatform_dictText'
}, },
{ {
title: this.$t('operation'), title: this.$t('operation'),
@@ -180,10 +233,6 @@ export default {
//添加 //添加
handleAdd() { handleAdd() {
this.$refs.addModelRef.addModel() this.$refs.addModelRef.addModel()
},
// 复制
handlecody(){
}, },
//批量删除 //批量删除
handleDel() { handleDel() {
@@ -193,7 +242,7 @@ export default {
content: _this.$t('ConfirmBatchDeletion'), content: _this.$t('ConfirmBatchDeletion'),
onOk() { onOk() {
let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys)) let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys))
postAction(_this.url.deleteAll, { ids: idList.join(',') }).then((res) => { deleteAction(_this.url.deleteAll, { ids: idList.join(',') }).then((res) => {
if (res.success) { if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful')) _this.$message.success(_this.$t('OperationSuccessful'))
_this.selectedRowKeys = [] _this.selectedRowKeys = []
@@ -218,7 +267,7 @@ export default {
this.$confirm({ this.$confirm({
content: _this.$t('ConfirmDelete'), content: _this.$t('ConfirmDelete'),
onOk() { onOk() {
getAction(_this.url.deleteBatch, { id: val.id }).then((res) => { deleteAction(_this.url.deleteBatch, { id: val.id }).then((res) => {
if (res.success) { if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful')) _this.$message.success(_this.$t('OperationSuccessful'))
_this.getList() _this.getList()
@@ -231,14 +280,8 @@ export default {
}, },
//虚拟清单名称事件 //虚拟清单名称事件
entryNameClick(item) { entryNameClick(item) {
// console.log(item,'itemitem')
// this.$router.push({
// path: '/parameter/parameter/index',
// query: item.id
// })
let newUrl = this.$router.resolve({ let newUrl = this.$router.resolve({
path: '/parameter', path: '/ProjectDetails',
query: item query: item
}) })
window.open(newUrl.href, '_blank') window.open(newUrl.href, '_blank')
@@ -276,7 +319,7 @@ export default {
...this.queryParam ...this.queryParam
} }
this.loading = true this.loading = true
getAction(this.url.list, query).then((res) => { postAction(this.url.list, query).then((res) => {
if (res.success) { if (res.success) {
if (res.result.current > 1 && res.result.records.length == 0) { if (res.result.current > 1 && res.result.records.length == 0) {
this.pageNo = res.result.current - 1 this.pageNo = res.result.current - 1
@@ -284,7 +327,6 @@ export default {
return return
} }
this.dataSource = res.result.records || [] this.dataSource = res.result.records || []
this.total = res.result.total this.total = res.result.total
this.loading = false this.loading = false
} else { } else {