[update] 上报库
This commit is contained in:
@@ -1,100 +1,105 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-drawer
|
<div>
|
||||||
:title="title"
|
<a-drawer
|
||||||
:maskClosable="false"
|
:title="title"
|
||||||
:width="1000"
|
:maskClosable="false"
|
||||||
placement="right"
|
:width="1000"
|
||||||
:closable="true"
|
placement="right"
|
||||||
@close="handleCancel"
|
:closable="true"
|
||||||
:visible="visible"
|
@close="handleCancel"
|
||||||
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
:visible="visible"
|
||||||
<a-spin :spinning="confirmLoading">
|
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
||||||
<a-form>
|
<a-spin :spinning="confirmLoading">
|
||||||
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
<a-form>
|
||||||
<a-row :gutter="24">
|
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||||
<a-col :span="12">
|
<a-row :gutter="24">
|
||||||
<div class="box-title-text">
|
<a-col :span="12">
|
||||||
<div class="title-text">
|
<div class="box-title-text">
|
||||||
<span class="Required">*</span>
|
<div class="title-text">
|
||||||
<span class="title-text-text"
|
<span class="Required">*</span>
|
||||||
:title="$t('parameterTemplate')">{{$t('parameterTemplate')}}</span>
|
<span class="title-text-text"
|
||||||
|
:title="$t('parameterTemplate')">{{$t('parameterTemplate')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="templateName">
|
||||||
|
<a-input class="box-input"
|
||||||
|
:disabled="disabled"
|
||||||
|
v-model="formInline.templateName"
|
||||||
|
:placeholder="$t('PleaseEnter')+$t('templateName')"/>
|
||||||
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" prop="templateName">
|
</a-col>
|
||||||
<a-input class="box-input"
|
<a-col :span="12">
|
||||||
:disabled="disabled"
|
<div class="box-title-text">
|
||||||
v-model="formInline.templateName"
|
<div class="title-text">
|
||||||
:placeholder="$t('PleaseEnter')+$t('templateName')"/>
|
<span class="Required">*</span>
|
||||||
</a-form-model-item>
|
<span class="title-text-text" :title="$t('status')">{{$t('status')}}</span>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
<a-form-model-item class="itemModel" prop="state">
|
||||||
<a-col :span="12">
|
<a-select allowClear :placeholder="$t('PleaseSelect')+$t('status')" v-model='formInline.state'>
|
||||||
<div class="box-title-text">
|
<a-select-option :key="'0'" :value="'0'">{{$t('Enable')}}
|
||||||
<div class="title-text">
|
</a-select-option>
|
||||||
<span class="Required">*</span>
|
<a-select-option :key="'1'" :value="'1'">{{$t('disable')}}
|
||||||
<span class="title-text-text" :title="$t('status')">{{$t('status')}}</span>
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" prop="state">
|
</a-col>
|
||||||
<a-select allowClear :placeholder="$t('PleaseSelect')+$t('status')" v-model='formInline.state'>
|
</a-row>
|
||||||
<a-select-option :key="'0'" :value="'0'">{{$t('Enable')}}
|
<a-row :gutter="24">
|
||||||
</a-select-option>
|
<a-col :span="24">
|
||||||
<a-select-option :key="'1'" :value="'1'">{{$t('disable')}}
|
<div class="box-title-text">
|
||||||
</a-select-option>
|
<div class="title-text">
|
||||||
</a-select>
|
|
||||||
</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"
|
<span class="title-text-text"
|
||||||
:title="$t('contentDescription')">{{$t('contentDescription')}}</span>
|
:title="$t('contentDescription')">{{$t('contentDescription')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="description">
|
||||||
|
<a-input class="box-input add-input"
|
||||||
|
type="textarea"
|
||||||
|
:disabled="disabled"
|
||||||
|
v-model="formInline.description"
|
||||||
|
:placeholder="$t('PleaseEnter')+$t('contentDescription')"/>
|
||||||
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" prop="description">
|
</a-col>
|
||||||
<a-input class="box-input add-input"
|
</a-row>
|
||||||
type="textarea"
|
<a-row :gutter="24">
|
||||||
:disabled="disabled"
|
<a-col :span="12">
|
||||||
v-model="formInline.description"
|
<div class="box-title-text">
|
||||||
:placeholder="$t('PleaseEnter')+$t('contentDescription')"/>
|
<div class="title-text">
|
||||||
</a-form-model-item>
|
<span class="title-text-text"
|
||||||
</div>
|
:title="$t('attachmentTemplate')">{{$t('attachmentTemplate')}}</span>
|
||||||
</a-col>
|
</div>
|
||||||
</a-row>
|
<a-form-model-item class="itemModel" prop="paramsTemplateName">
|
||||||
<a-row :gutter="24">
|
<a-button type="primary" class="button-text"
|
||||||
<a-col :span="12">
|
@click="clickButtonToUpload('fileTemplateConnectId')">
|
||||||
<div class="box-title-text">
|
{{ (formInline.fileTemplateConnectId === 'null' || formInline.fileTemplateConnectId === '' ||
|
||||||
<div class="title-text">
|
formInline.fileTemplateConnectId == null) ? $t('clickUpload') : $t('viewUploadedFiles')}}
|
||||||
<span class="Required">*</span>
|
</a-button>
|
||||||
<span class="title-text-text"
|
</a-form-model-item>
|
||||||
:title="$t('parameterTemplate')">{{$t('parameterTemplate')}}</span>
|
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" prop="templateName">
|
</a-col>
|
||||||
<a-input class="box-input"
|
</a-row>
|
||||||
:disabled="disabled"
|
</a-form-model>
|
||||||
v-model="formInline.templateName"
|
</a-form>
|
||||||
:placeholder="$t('PleaseEnter')+$t('templateName')"/>
|
</a-spin>
|
||||||
</a-form-model-item>
|
<div class="drawer-bootom-button">
|
||||||
</div>
|
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button>
|
||||||
</a-col>
|
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
|
||||||
</a-row>
|
</div>
|
||||||
</a-form-model>
|
</a-drawer>
|
||||||
</a-form>
|
<uploadFileChange ref="uploadFile" @uploadSuccess="uploadSuccess"></uploadFileChange>
|
||||||
</a-spin>
|
</div>
|
||||||
<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>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PersonnelSelection from '@/components/PersonnelSelection/index'
|
import PersonnelSelection from '@/components/PersonnelSelection/index'
|
||||||
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
|
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
|
||||||
|
import uploadFileChange from '@/components/uploadFileChange/file'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'addModel',
|
name: 'addModel',
|
||||||
components: {
|
components: {
|
||||||
|
uploadFileChange,
|
||||||
PersonnelSelection
|
PersonnelSelection
|
||||||
},
|
},
|
||||||
props: ['url'],
|
props: ['url'],
|
||||||
@@ -124,6 +129,28 @@ export default {
|
|||||||
this.getNameList()
|
this.getNameList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
uploadSuccess(data) {
|
||||||
|
let attIdList = []
|
||||||
|
if (data && data.length > 0) {
|
||||||
|
data.map(item => {
|
||||||
|
attIdList.push(item.id || data.name)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.$refs.uploadFile.visible = false
|
||||||
|
/** 赋值给当前对应的表单文件 */
|
||||||
|
this.formInline.fileTemplateConnectId = attIdList.join(',')
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
},
|
||||||
|
clickButtonToUpload(item) {
|
||||||
|
this.$refs.uploadFile.visible = true
|
||||||
|
getAction('sys/common/getFileInfos', { id: this.formInline[item] }).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$refs.uploadFile.perentHandleFunc(res.result)
|
||||||
|
} else {
|
||||||
|
this.$refs.uploadFile.perentHandleFunc()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
getNameList() {
|
getNameList() {
|
||||||
getAction('project/projectNameInfoEO/list', {}).then((res) => {
|
getAction('project/projectNameInfoEO/list', {}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
|||||||
Reference in New Issue
Block a user