[add] 认证增删改查

This commit is contained in:
zhaomeijing
2022-04-21 19:47:57 +08:00
parent c51c037e9a
commit 7f8ac4bd7b
2 changed files with 175 additions and 72 deletions
@@ -10,64 +10,163 @@
style="height: 100%;overflow: auto;padding-bottom: 53px;"> style="height: 100%;overflow: auto;padding-bottom: 53px;">
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm"> <a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('entryName')">{{$t('entryName')}}</span>
</div>
<a-form-model-item class="itemModel" prop="projectName">
<a-select :placeholder="$t('PleaseSelect')+$t('entryName')"
@change="projectNameChange"
v-model="formInline.projectNameId">
<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>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('targetMarket')">{{$t('targetMarket')}}</span>
</div>
<a-form-model-item class="itemModel" prop="targetMarket">
<j-multi-select-tag class="box-input" v-model="formInline.targetMarket"
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('targetMarket')"
:type="'select'"
:triggerChange="false" :dictCode="'region'"/>
</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('projectStatus')">{{$t('projectStatus')}}</span>
</div>
<a-form-model-item class="itemModel" prop="projectStatus">
<j-dict-select-tag class="box-input" v-model="formInline.projectStatus"
:disabled="disabled"
@input="handleInput('projectStatus')"
:placeholder="$t('PleaseSelect')+$t('projectStatus')"
:type="'select'"
: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>
</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('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-row :gutter="24">
<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('parameterTemplate')">{{$t('parameterTemplate')}}</span> :title="$t('dehicleDevelopmentPlan')">{{$t('dehicleDevelopmentPlan')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="paramsTemplateName"> <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.paramsTemplateName" v-model="formInline.vehicleDevelopmentPlan"
:placeholder="$t('PleaseEnter')+$t('parameterTemplate')"/> :placeholder="$t('PleaseEnter')+$t('dehicleDevelopmentPlan')"/>
</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('certificationProgram')">{{$t('certificationProgram')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="status"> <a-form-model-item class="itemModel" prop="attestationPlan">
<j-dict-select-tag class="box-input" v-model="formInline.status"
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('status')"
:type="'select'"
:triggerChange="false" :dictCode="'params_template_state'"/>
</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('zoneOfApplication')">{{$t('zoneOfApplication')}}</span>
</div>
<a-form-model-item class="itemModel" prop="region">
<j-dict-select-tag class="box-input" v-model="formInline.region"
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('zoneOfApplication')"
:type="'select'"
:triggerChange="false" :dictCode="'region'"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('contentDescription')">{{$t('contentDescription')}}</span>
</div>
<a-form-model-item class="itemModel" prop="description">
<a-input class="box-input" <a-input class="box-input"
type="textarea"
:disabled="disabled" :disabled="disabled"
v-model="formInline.description" v-model="formInline.attestationPlan"
:placeholder="$t('PleaseEnter')+$t('contentDescription')"/> :placeholder="$t('PleaseEnter')+$t('certificationProgram')"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -97,18 +196,23 @@ export default {
confirmLoading: false, confirmLoading: false,
visible: false, visible: false,
rules: { rules: {
paramsTemplateName: [ ipdInfo: [
{ required: true, message: this.$t('pleaseEnter')+ this.$t('parameterTemplate'),trigger: 'change'}, {
{ max: 50, message: this.$t('cantExeed')+ 50 + this.$t('characters'),trigger: 'change'}, pattern: /(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&amp;%$#_]*)?/,
message: this.$t('pleaseEnterTheCorrectWebAddress')
}
], ],
status: [ vehicleDevelopmentPlan: [
{ required: true, message: this.$t('PleaseSelect')+ this.$t('status'),trigger: 'change'}, {
pattern: /(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&amp;%$#_]*)?/,
message: this.$t('pleaseEnterTheCorrectWebAddress')
}
], ],
region: [ attestationPlan: [
{ required: true, message: this.$t('PleaseSelect')+ this.$t('zoneOfApplication'),trigger: 'change'}, {
], pattern: /(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&amp;%$#_]*)?/,
description: [ message: this.$t('pleaseEnterTheCorrectWebAddress')
{ max: 300, message: this.$t('cantExeed')+ 300 + this.$t('characters'),trigger: 'change'}, }
] ]
}, },
disabled: false, disabled: false,
+20 -21
View File
@@ -4,10 +4,10 @@
<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('entryName')">
<span>{{$t('zoneOfApplication')}}</span> <span>{{$t('zoneOfApplication')}}</span>
</div> </div>
<j-dict-select-tag class="box-input" v-model="queryParam.region" <j-dict-select-tag class="box-input" v-model="queryParam.targetMarket"
:placeholder="$t('PleaseSelect')+$t('zoneOfApplication')" :placeholder="$t('PleaseSelect')+$t('zoneOfApplication')"
:type="'select'" :type="'select'"
:triggerChange="false" :dictCode="'region'"/> :triggerChange="false" :dictCode="'region'"/>
@@ -15,12 +15,11 @@
</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('targetMarket')">
<span>{{$t('parameterTemplate')}}</span> <span>{{$t('parameterTemplate')}}</span>
</div> </div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('parameterTemplate')" <a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('parameterTemplate')"
v-model="queryParam.paramsTemplateName"></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">
@@ -28,8 +27,8 @@
<div class="title-text" :title="$t('status')"> <div class="title-text" :title="$t('status')">
<span>{{$t('status')}}</span> <span>{{$t('status')}}</span>
</div> </div>
<j-dict-select-tag class="box-input" v-model="queryParam.status" <j-dict-select-tag class="box-input" v-model="queryParam.targetMarket"
:placeholder="$t('PleaseSelect')+$t('status')" :placeholder="$t('PleaseSelect')+$t('zoneOfApplication')"
:type="'select'" :type="'select'"
:triggerChange="false" :dictCode="'params_template_state'"/> :triggerChange="false" :dictCode="'params_template_state'"/>
</div> </div>
@@ -47,7 +46,7 @@
<a-icon type="plus"/> <a-icon type="plus"/>
{{$t('add')}} {{$t('add')}}
</div> </div>
<div @click="handleCode" class="operator-text" v-has="'document:getInfoById'"> <div @click="handlecody" class="operator-text" v-has="'document:getInfoById'">
<a-icon type="copy"/> <a-icon type="copy"/>
{{$t('copy')}} {{$t('copy')}}
</div> </div>
@@ -74,6 +73,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>
@@ -99,7 +99,7 @@ import addModel from './components/addModel'
export default { export default {
name: 'index', name: 'index',
components: { components: {
addModel addModel,
}, },
data() { data() {
return { return {
@@ -126,21 +126,19 @@ export default {
{ {
title: this.$t('zoneOfApplication'), title: this.$t('zoneOfApplication'),
align: 'center', align: 'center',
width: '10%',
dataIndex: 'region_dictText', dataIndex: 'region_dictText',
// width: 10%,
}, },
{ {
title: this.$t('parameterTemplate'), title: this.$t('parameterTemplate'),
align: 'center', align: 'center',
dataIndex: 'paramsTemplateName', dataIndex: 'paramsTemplateName',
scopedSlots: { customRender: 'projectName' }, scopedSlots: { customRender: 'projectName' }
// width: 10%,
}, },
{ {
title: this.$t('contentDescription'), title: this.$t('contentDescription'),
align: 'center', align: 'center',
dataIndex: 'description', dataIndex: 'description'
// width: 10%
}, },
{ {
title: this.$t('status'), title: this.$t('status'),
@@ -150,11 +148,13 @@ export default {
{ {
title: this.$t('createTime'), title: this.$t('createTime'),
align: 'center', align: 'center',
width: '10%',
dataIndex: 'createTime' dataIndex: 'createTime'
}, },
{ {
title: this.$t('updateTime'), title: this.$t('updateTime'),
align: 'center', align: 'center',
width: '10%',
dataIndex: 'updateTime' dataIndex: 'updateTime'
}, },
{ {
@@ -183,7 +183,7 @@ export default {
this.$refs.addModelRef.addModel() this.$refs.addModelRef.addModel()
}, },
// 复制 // 复制
handleCode() { handlecody(){
}, },
//批量删除 //批量删除
@@ -232,11 +232,11 @@ export default {
}, },
//虚拟清单名称事件 //虚拟清单名称事件
entryNameClick(item) { entryNameClick(item) {
// let newUrl = this.$router.resolve({ let newUrl = this.$router.resolve({
// path: '/ProjectDetails', path: '/ProjectDetails',
// query: item query: item
// }) })
// window.open(newUrl.href, '_blank') window.open(newUrl.href, '_blank')
}, },
searchQuery() { searchQuery() {
this.pageNo = 1 this.pageNo = 1
@@ -273,7 +273,6 @@ export default {
this.loading = true this.loading = true
getAction(this.url.list, query).then((res) => { getAction(this.url.list, query).then((res) => {
if (res.success) { if (res.success) {
console.log(res.result)
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
this.getList() this.getList()