布局认证目录

This commit is contained in:
qq787203167
2022-05-23 14:33:32 +08:00
parent 1ccab18a2f
commit 912f2dac24
5 changed files with 123 additions and 43 deletions
@@ -44,25 +44,26 @@
</div>
</div>
<div class="drawer-bootom-button">
<!-- style="margin-right: 16px"-->
<!-- 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>-->
<!-- <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>-->
</div>
</a-drawer>
<certificationDirectoryAdd ref="certificationDirectoryAddRef" />
<certificationDirectoryAdd @certificationDirectoryList="certificationDirectoryList"
ref="certificationDirectoryAddRef"/>
</div>
</template>
<script>
import { getAction, postAction } from '@/api/manage'
import { getAction, postAction, deleteAction } from '@/api/manage'
import certificationDirectoryAdd from './certificationDirectoryAdd'
export default {
name: 'certificationDirectory',
components: {
certificationDirectoryAdd
},
props: ['url'],
data() {
return {
visible: false,
@@ -78,31 +79,31 @@
},
{
title: this.$t('batch'),
dataIndex: 'batch',
dataIndex: 'lot',
align: 'center',
ellipsis: true
},
{
title: this.$t('catalogFile'),
dataIndex: 'catalogFile',
dataIndex: 'directoryFile',
align: 'center',
ellipsis: true
},
{
title: this.$t('testScheme'),
dataIndex: 'testScheme',
dataIndex: 'experimentFile',
align: 'center',
ellipsis: true
},
{
title: this.$t('testReportLocation'),
dataIndex: 'testReportLocation',
dataIndex: 'detectionReportLocation',
align: 'center',
ellipsis: true
},
{
title: this.$t('explain'),
dataIndex: 'explain',
dataIndex: 'explainInfo',
align: 'center',
ellipsis: true
},
@@ -124,7 +125,11 @@
loading: false,
pageNo: 1,
pageSize: 10,
total: 0
total: 0,
url: {
page: '/project/projectCertificationDirectoryEO/page',
delete: '/project/projectCertificationDirectoryEO/delete'
}
}
},
mounted() {
@@ -162,7 +167,7 @@
...this.queryParam
}
this.loading = true
postAction(this.url.addModelList, query).then((res) => {
getAction(this.url.page, query).then((res) => {
if (res.success) {
this.dataList = res.result.records || []
this.total = res.result.total
@@ -178,21 +183,39 @@
handleSubmit() {
this.visible = false
},
edit() {
edit(val) {
this.$refs.certificationDirectoryAddRef.edit(JSON.parse(JSON.stringify(val)))
},
deleteData(){
deleteData(val) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
deleteAction(_this.url.delete, { id: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.replacePage()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
},
addData(){
this.$refs.certificationDirectoryAddRef.add()
addData() {
this.$refs.certificationDirectoryAddRef.add()
},
certificationDirectoryList() {
this.pageNo = 1
this.replacePage()
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
.page {
text-align: right;
margin-top: 20px;
@@ -202,7 +225,7 @@
position: absolute;
bottom: 0;
width: 100%;
z-index:100;
z-index: 100;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
@@ -243,11 +266,13 @@
.box-button {
height: 38px;
}
.table-operator{
.table-operator {
text-align: right;
margin-bottom: 20px;
}
.text{
.text {
margin-right: 8px;
}
</style>