布局认证目录
This commit is contained in:
@@ -875,4 +875,8 @@ module.exports = {
|
||||
regulatoryCertificationTaskConfirmation:'Regulatory certification task confirmation',
|
||||
confirmationEngineeringInterfacePerson:'Confirmation of engineering interface person',
|
||||
engineerReply:'Engineer reply',
|
||||
catalogFile:'Catalog File',
|
||||
testScheme:'Test Scheme',
|
||||
testReportLocation:'Test report location',
|
||||
explain:'Explain',
|
||||
}
|
||||
@@ -880,4 +880,8 @@ module.exports = {
|
||||
regulatoryCertificationTaskConfirmation:'法规认证任务确认',
|
||||
confirmationEngineeringInterfacePerson:'工程接口人确认',
|
||||
engineerReply:'工程师回复',
|
||||
catalogFile:'目录文件',
|
||||
testScheme:'试验方案',
|
||||
testReportLocation:'检测报告位置',
|
||||
explain:'说明',
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
<a-drawer
|
||||
:title="$t('CertificationDirectory')"
|
||||
:maskClosable="false"
|
||||
:width="1000"
|
||||
:width="1100"
|
||||
placement="right"
|
||||
:closable="true"
|
||||
@close="handleCancel"
|
||||
@@ -11,14 +11,14 @@
|
||||
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
||||
<div style="margin-bottom: 60px">
|
||||
<div class="table-operator">
|
||||
<div class="operator-text">
|
||||
<div class="operator-text" @click="addData">
|
||||
<a-icon type="plus"/>
|
||||
{{$t('add')}}
|
||||
</div>
|
||||
</div>
|
||||
<a-table
|
||||
:columns="columns"
|
||||
:scroll="{x: 800}"
|
||||
:scroll="{x: 900}"
|
||||
:data-source="dataList"
|
||||
:pagination="false"
|
||||
:loading="loading">
|
||||
@@ -26,6 +26,9 @@
|
||||
<a class="text" @click="edit(record)">
|
||||
{{ $t('edit') }}
|
||||
</a>
|
||||
<a class="text" @click="deleteData(record)">
|
||||
{{ $t('delete') }}
|
||||
</a>
|
||||
</span>
|
||||
</a-table>
|
||||
<div class="page" v-if="dataList.length > 0">
|
||||
@@ -41,21 +44,24 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="drawer-bootom-button">
|
||||
<a-button @click="handleCancel" type="danger" style="margin-right: 16px">{{$t('cancel')}}</a-button>
|
||||
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
|
||||
<!-- style="margin-right: 16px"-->
|
||||
<a-button @click="handleCancel" type="danger">{{$t('cancel')}}</a-button>
|
||||
<!-- <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>-->
|
||||
</div>
|
||||
</a-drawer>
|
||||
|
||||
<certificationDirectoryAdd ref="certificationDirectoryAddRef" />
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
|
||||
import certificationDirectoryAdd from './certificationDirectoryAdd'
|
||||
export default {
|
||||
name: 'certificationDirectory',
|
||||
components: {},
|
||||
components: {
|
||||
certificationDirectoryAdd
|
||||
},
|
||||
props: ['url'],
|
||||
data() {
|
||||
return {
|
||||
@@ -77,14 +83,32 @@
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('uploadTime'),
|
||||
dataIndex: 'uploadTime',
|
||||
title: this.$t('catalogFile'),
|
||||
dataIndex: 'catalogFile',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('enclosure'),
|
||||
dataIndex: 'enclosure',
|
||||
title: this.$t('testScheme'),
|
||||
dataIndex: 'testScheme',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('testReportLocation'),
|
||||
dataIndex: 'testReportLocation',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('explain'),
|
||||
dataIndex: 'explain',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('uploadTime'),
|
||||
dataIndex: 'uploadTime',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
},
|
||||
@@ -156,7 +180,13 @@
|
||||
},
|
||||
edit() {
|
||||
|
||||
}
|
||||
},
|
||||
deleteData(){
|
||||
|
||||
},
|
||||
addData(){
|
||||
this.$refs.certificationDirectoryAddRef.add()
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -217,4 +247,7 @@
|
||||
text-align: right;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.text{
|
||||
margin-right: 8px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,238 @@
|
||||
<template>
|
||||
<div>
|
||||
<a-drawer
|
||||
:title="$t('add')"
|
||||
: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" 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('directoryName')">{{$t('directoryName')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.directoryName"
|
||||
:placeholder="$t('PleaseEnter')+$t('directoryName')"/>
|
||||
</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('batch')">{{$t('batch')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.batch"
|
||||
:placeholder="$t('PleaseEnter')+$t('batch')"/>
|
||||
</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('catalogFile')">{{$t('catalogFile')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-button type="primary" class="button-text"
|
||||
@click="clickButtonToUpload('catalogFile')">
|
||||
{{ (formInline.catalogFile === 'null' || formInline.catalogFile === ''||
|
||||
formInline.catalogFile == null) ? $t('clickUpload') : $t('viewUploadedFiles') }}
|
||||
</a-button>
|
||||
</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('testScheme')">{{$t('testScheme')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-button type="primary" class="button-text"
|
||||
@click="clickButtonToUpload('testScheme')">
|
||||
{{ (formInline.testScheme === 'null' || formInline.testScheme === ''||
|
||||
formInline.testScheme == null) ? $t('clickUpload') : $t('viewUploadedFiles') }}
|
||||
</a-button>
|
||||
</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('testReportLocation')">{{$t('testReportLocation')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.testReportLocation"
|
||||
:placeholder="$t('PleaseEnter')+$t('testReportLocation')"/>
|
||||
</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('explain')">{{$t('explain')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-textarea
|
||||
style="width: 100%"
|
||||
:placeholder="$t('PleaseEnter')+$t('explain')"
|
||||
v-model="formInline.explain" :rows="4"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-spin>
|
||||
<div class="drawer-bootom-button">
|
||||
<a-button @click="handleCancel" style="margin-right: 16px" type="danger">{{$t('cancel')}}</a-button>
|
||||
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import uploadFile from '@/components/uploadFile/file'
|
||||
|
||||
export default {
|
||||
name: 'certificationDirectoryAdd',
|
||||
components: {
|
||||
uploadFile
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
formInline: {},
|
||||
confirmLoading: false,
|
||||
disabled: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
add(){
|
||||
this.visible = true
|
||||
this.formInline = {}
|
||||
},
|
||||
edit(val){
|
||||
this.visible = true
|
||||
this.$nextTick(()=>{
|
||||
this.formInline = val
|
||||
})
|
||||
},
|
||||
handleCancel() {
|
||||
|
||||
},
|
||||
handleSubmit() {
|
||||
|
||||
},
|
||||
clickButtonToUpload(item) {
|
||||
this.$refs.uploadFile.perentHandleFunc()
|
||||
this.$refs.uploadFile.visible = true
|
||||
this.uploadName = item
|
||||
getAction('sys/common/getFileInfos', { id: this.formInline[item] }).then((res) => {
|
||||
if (res.success) {
|
||||
this.$refs.uploadFile.perentHandleFunc(res.result)
|
||||
} else {
|
||||
this.$refs.uploadFile.perentHandleFunc()
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 上传文件的回调 */
|
||||
uploadSuccess(data) {
|
||||
let attIdList = []
|
||||
if (data && data.length > 0) {
|
||||
data.map(item => {
|
||||
attIdList.push(item.id || data.name)
|
||||
})
|
||||
}
|
||||
/** 赋值给当前对应的表单文件 */
|
||||
this.formInline[this.uploadName] = attIdList.join(',')
|
||||
this.formInline = { ...this.formInline }
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.drawer-bootom-button {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
z-index: 100;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
text-align: right;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
|
||||
.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;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.title-text-text {
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
|
||||
.formAdd {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user