添加项目库

This commit is contained in:
qq787203167
2022-04-07 10:31:42 +08:00
parent 0bf5153f00
commit 5dc67d8a5f
4 changed files with 696 additions and 0 deletions
@@ -0,0 +1,323 @@
<template>
<a-drawer
:title="'添加'"
:maskClosable="false"
:width="1000"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<a-spin :spinning="confirmLoading">
<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="entryName">
<j-dict-select-tag class="box-input" v-model="formInline.entryName"
:disabled="disabled"
@input="handleInput('entryName')"
:placeholder="$t('PleaseSelect')+$t('entryName')"
: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('targetMarket')">{{$t('targetMarket')}}</span>
</div>
<a-form-model-item class="itemModel" prop="targetMarket">
<j-dict-select-tag class="box-input" v-model="formInline.targetMarket"
:disabled="disabled"
@input="handleInput('targetMarket')"
:placeholder="$t('PleaseSelect')+$t('targetMarket')"
: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('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="'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')"/>
</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="'StudioEngineer'">
<PersonnelSelection :query="{db_field_name:'StudioEngineer',db_field_txt:$t('StudioEngineer')}"
:personneQuery="formInline"
@change="PersonnelSelectionChange"
:disabled="disabled"
v-model="formInline.StudioEngineer"/>
</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('CertificationTime')">{{$t('CertificationTime')}}</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>
</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>
</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-input class="box-input"
:disabled="disabled"
v-model="formInline.certificationProgramInformation"
:placeholder="$t('PleaseEnter')+$t('certificationProgramInformation')"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-spin>
<div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div>
</a-drawer>
</template>
<script>
import PersonnelSelection from '@/components/PersonnelSelection/index'
export default {
name: 'addModel',
components: {
PersonnelSelection
},
data() {
return {
formInline: {},
confirmLoading: false,
visible: false,
rules: {},
disabled: false
}
},
mounted() {
},
methods: {
addModel() {
this.visible = true
this.formInline = {}
},
handleCancel() {
this.visible = false
},
handleSubmit() {
},
handleInput(value) {
this.$nextTick(() => {
this.formInline = { ...this.formInline }
this.$refs.ruleForm.validateField([value])
})
},
PersonnelSelectionChange(value, id) {
this.formInline[value + '_id'] = id
this.formInline = { ...this.formInline }
}
}
}
</script>
<style>
.formAdd .ant-form-item-label {
width: 130px;
}
.formAdd .ant-form-item-control-wrapper {
display: inline-block;
width: calc(100% - 130px);
}
/*.formAdd .ant-form-item {*/
/* margin-bottom: 20px;*/
/*}*/
.itemModel .ant-form-item-control-wrapper {
width: 100%;
}
.box-input .ant-select-selection--single {
height: 38px;
}
.box-input .ant-select-selection--multiple {
height: 38px;
}
.box-input .ant-select-selection__rendered {
line-height: 38px;
height: 38px;
}
.box-input .ant-select-selection--multiple .ant-select-selection__rendered > ul > li {
margin-top: 6px;
}
.box-input .ant-calendar-picker {
line-height: 38px;
height: 38px;
}
.box-input .ant-calendar-picker-input {
height: 38px;
}
.box-input .ant-input-number-input-wrap {
line-height: 38px;
height: 38px;
}
</style>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
/*align-items: center;*/
}
.title-text {
width: 114px;
text-align: right;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 42px;
line-height: 48px;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
}
.Required {
color: red;
margin-right: 4px;
}
.title-text-text {
margin-top: 9px;
}
.formAdd {
margin-bottom: 40px;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>