文档工具-虚拟认证清单详情

This commit is contained in:
刘彦泽
2023-03-08 15:05:18 +08:00
parent a85ad7a331
commit 73d551bc6d
9 changed files with 1585 additions and 2 deletions
+2
View File
@@ -894,7 +894,9 @@ module.exports = {
pleaseConfirmedByPrehomo: 'Please complete the data confirmed by Pre-Homo',
pleaseConformityVerification: 'Please complete the data of Conformity verification',
virtualListDetails: 'Virtual List Details',
virtualAuthenticationListDetails: 'Virtual Authentication List Details',
maintainVirtualList: 'Maintain Virtual List',
certificationListMaintenance: 'Certification List Maintenance',
reasonsForRejection: 'Reasons For Rejection',
inconformity: 'Non-Compliance',
toTrack: 'To be tracked',
+2
View File
@@ -906,7 +906,9 @@ module.exports = {
pleaseConfirmedByPrehomo: '请补全 Pre-Homo确认的数据',
pleaseConformityVerification: '请补全验证符合性确认的数据',
virtualListDetails: '虚拟清单详情',
virtualAuthenticationListDetails: '虚拟认证清单详情',
maintainVirtualList: '维护虚拟清单',
certificationListMaintenance: '认证清单维护',
reasonsForRejection: '驳回原因',
inconformity: '不符合',
toTrack: '待追踪',
+5
View File
@@ -332,6 +332,11 @@ export const constantRouterMap = [
name: 'virtualListDetails',
component: () => import(/* webpackChunkName: "user" */ '@/views/documentTools/virtualList/components/virtualListDetails')
},
{
path: '/certificationListMaintenance',
name: 'certificationListMaintenance',
component: () => import(/* webpackChunkName: "user" */ '@/views/virtualAuthenticationList/virtualAuthenticationListDesign/certificationListMaintenance')
},
{
path: '/ProjectDetails',
name: 'ProjectDetails',
@@ -0,0 +1,269 @@
<template>
<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" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('regulationNo')">{{$t('regulationNo')}}</span>
</div>
<a-form-model-item class="itemModel" prop="regulationNo">
<j-dict-select-tag class="box-input"
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('regulationNo')"
:type="'select'"
:triggerChange="false"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
</div>
<a-form-model-item class="itemModel">
<j-dict-select-tag class="box-input"
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false"/>
</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="Required">*</span>
<span class="title-text-text" :title="'WVTA ID'">WVTA ID</span>
</div>
<a-form-model-item class="itemModel">
<a-input class="box-input"
v-model='formInline.dddd'
:disabled="disabled"
:placeholder="$t('PleaseEnter')+'WVTA ID'"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<div v-for="(item,index) in formInline.dataList" :key="index">
<div class="header-text">
<span>{{$t('itemInformation')}}</span>
<div class="box-title-text" style="margin-left: 10px">
<a-button @click='addClick(index)' style="margin-right: .8rem" icon="plus">
</a-button>
<a-button v-if="formInline.dataList.length > 1" @click="deleteClick(index)" type="primary" icon="minus">
</a-button>
</div>
</div>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('category')">{{$t('category')}}</span>
</div>
<a-form-model-item class="itemModel" prop="category">
<a-input class="box-input"
v-model="item.category"
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('category')"
:type="'select'"
:triggerChange="false"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('inspectionItems')">{{$t('inspectionItems')}}</span>
</div>
<a-form-model-item class="itemModel" prop="inspectionItems">
<j-dict-select-tag class="box-input"
v-model="item.inspectionItems"
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('inspectionItems')"
:type="'select'"
:triggerChange="false"/>
</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="Required">*</span>
<span class="title-text-text" :title="$t('Deliverables')">{{$t('Deliverables')}}</span>
</div>
<a-form-model-item class="itemModel" prop="Deliverables">
<j-dict-select-tag class="box-input"
v-model="item.Deliverables"
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('Deliverables')"
:type="'select'"
:triggerChange="false"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</div>
</a-form-model>
</a-spin>
<div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button type="primary" @click="handleSubmit" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div>
</a-drawer>
</template>
<script>
import { getAction, postAction } from '@/api/manage'
export default {
name:"addModel",
props: ['url'],
data() {
return {
visible: false,
disabled: false,
formInline: {},
confirmLoading: false,
rules: {
regulationNo: [
// {
// required: true,
// message: this.$t('regulationNo') + this.$t('cannotEmpty'),
// trigger: 'change'
// }
]
},
}
},
methods: {
addModel() {
this.visible = true
this.formInline = {}
this.formInline.dataList = [{}]
this.formInline = { ...this.formInline }
this.$nextTick(() => {
this.$refs.ruleForm.clearValidate()
})
},
handleCancel() {
this.visible = false
},
handleSubmit() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
let query = JSON.parse(JSON.stringify(this.formInline))
query.dataList.forEach(val => {
Object.keys(query).forEach(res => {
if (query[res] && query[res] instanceof Array) {
query[res] = query[res].join(',')
}
})
})
this.confirmLoading = true
postAction(this.url.addModel, query).then((res) => {
if (res.success) {
this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.$emit('addModelList')
} else {
this.$message.warning(res.message)
this.confirmLoading = false
}
})
}
})
},
addClick(index){
this.formInline.dataList.splice(index + 1, 0, {})
this.formInline = { ...this.formInline }
},
deleteClick(index) {
this.formInline.dataList.splice(index, 1)
this.formInline = { ...this.formInline }
}
}
}
</script>
<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;
height: 40px;
margin-bottom: 24px;
}
.Required {
color: red;
margin-right: 4px;
}
.header-text {
font-size: 16px;
font-weight: bold;
margin-left: 15px;
/*border-bottom: 1px #d9d9d9 dashed;*/
height: 30px;
margin-bottom: 30px;
display: flex;
}
.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;
}
</style>
@@ -0,0 +1,109 @@
<template>
<a-modal
:title="$t('batSetting')"
:width="900"
:visible="visible"
:maskClosable="false"
@cancel="handleCancel"
>
<a-form-model class="formAdd">
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
</div>
<a-form-model-item class="itemModel-multi">
<j-multi-select-tag class="box-input"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
<!-- <j-dict-select-tag class="box-input" v-model="formInline.dutyTerritory"-->
<!-- @input="handleInput('dutyTerritory')"-->
<!-- :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" dictCode="duty_territory"/>-->
</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('Deliverables')">{{$t('Deliverables')}}</span>
</div>
<a-form-model-item class="itemModel-multi">
<j-multi-select-tag class="box-input"
:placeholder="$t('PleaseSelect')+$t('Deliverables')"
:type="'select'"
:triggerChange="false"/>
<!-- <j-dict-select-tag class="box-input" v-model="formInline.attestationType"-->
<!-- @input="handleInput('attestationType')"-->
<!-- :placeholder="$t('PleaseSelect')+$t('certificationType')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" dictCode="attestation_type"/>-->
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-modal>
</template>
<script>
export default {
name: 'batSetting',
data() {
return {
visible: false,
formInline: {},
ids: [],
}
},
methods: {
edit(data) {
this.visible = true
this.$nextTick(() => {
this.ids = data || []
this.formInline = {}
})
},
handleCancel() {
this.formInline = {}
this.visible = false
},
}
}
</script>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
}
.title-text {
width: 104px;
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: 42px;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
</style>
@@ -0,0 +1,271 @@
<template>
<a-drawer
:title="$t('edit')"
:maskClosable="false"
:width="900"
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="Required">*</span>
<span class="title-text-text" :title="$t('regulationNo')">{{$t('regulationNo')}}</span>
</div>
<a-form-model-item class="itemModel" prop="serialNumber">
<j-dict-select-tag class="box-input"
v-model="formInline.serialNumber"
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('regulationNo')"
:type="'select'"
:triggerChange="false"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
</div>
<a-form-model-item class="itemModel" prop="dutyTerritory">
<j-dict-select-tag class="box-input"
v-model="formInline.dutyTerritory"
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false"/>
</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="Required">*</span>
<span class="title-text-text" :title="'WVTA ID'">WVTA ID</span>
</div>
<a-form-model-item class="itemModel" prop="wvtaId">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.wvtaId"
:placeholder="$t('PleaseEnter')+'WVTA ID'"/>
</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="Required">*</span>
<span class="title-text-text" :title="$t('category')">{{$t('category')}}</span>
</div>
<a-form-model-item class="itemModel" prop="category">
<j-dict-select-tag class="box-input"
v-model="formInline.category"
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('category')"
:type="'select'"
:triggerChange="false"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('inspectionItems')">{{$t('inspectionItems')}}</span>
</div>
<a-form-model-item class="itemModel" prop="inspectionItem">
<j-dict-select-tag class="box-input"
v-model="formInline.inspectionItem"
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('inspectionItems')"
:type="'select'"
:triggerChange="false"/>
</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="Required">*</span>
<span class="title-text-text" :title="$t('Deliverables')">{{$t('Deliverables')}}</span>
</div>
<a-form-model-item class="itemModel" prop="deliverable">
<j-dict-select-tag class="box-input"
v-model="formInline.deliverable"
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('Deliverables')"
:type="'select'"
:triggerChange="false"/>
</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 { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
export default {
name:'editModel',
props: ['url'],
data() {
return {
visible: false,
confirmLoading: false,
formInline: {},
disabled: false,
rules: {
serialNumber: [
{
required: true,
message: this.$t('regulationNo') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
dutyTerritory: [
{
required: true,
message: this.$t('areaOfResponsibility') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
wvtaId: [
{
required: true,
message: 'WVTA ID' + this.$t('cannotEmpty'),
trigger: 'change'
}
],
category: [
{
required: true,
message: this.$t('category') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
inspectionItem: [
{
required: true,
message: this.$t('inspectionItems') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
deliverable: [
{
required: true,
message: this.$t('Deliverables') + this.$t('cannotEmpty'),
trigger: 'change'
}
]
}
}
},
methods: {
handleCancel() {
this.visible = false
},
editModel(item) {
this.visible = true
this.$nextTick(() => {
this.formInline = item || {}
this.$refs.ruleForm.clearValidate()
})
},
handleSubmit() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
let formInline = JSON.parse(JSON.stringify(this.formInline))
this.confirmLoading = true
postAction(this.url.editModel, formInline).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.confirmLoading = false
this.$emit('editModelList')
} else {
this.$message.warning(res.message)
this.confirmLoading = false
}
})
} else {
this.$message.warning(res.message)
this.confirmLoading = false
}
})
},
}
}
</script>
<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;
height: 40px;
margin-bottom: 24px;
}
.Required {
color: red;
margin-right: 4px;
}
.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;
}
</style>
@@ -0,0 +1,212 @@
<template>
<a-drawer
:title="$t('Transfer')"
:maskClosable="false"
:width="1000"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<div style="margin-bottom: 60px">
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="12" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('CertificationListName')">
<span>{{$t('CertificationListName')}}</span>
</div>
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('CertificationListName')"
></j-input>
</div>
</a-col>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-col :md="12" :sm="24">
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<a-table
:columns="columns"
rowKey="id"
:scroll="{x: 800}"
:data-source="dataList"
:pagination="false"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange,columnTitle:' ' }"
:loading="loading">
</a-table>
<div class="page" v-if="dataList.length > 0">
<a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')"
show-quick-jumper
show-size-changer
:page-size.sync="pageSize"
:total="total"
:current="pageNo"
@change="onChange"
@showSizeChange="SizeChange"
/>
</div>
</div>
<div class="drawer-bootom-button">
<a-button @click="handleCancel" style="margin-right: 16px">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit(undefined)" type="primary" :loading="confirmLoading">{{$t('determine')}}</a-button>
</div>
</a-drawer>
</template>
<script>
export default {
name: 'transferList',
data() {
return {
visible: false,
confirmLoading: false,
selectedRowKeys: [],
columns: [
{
title: this.$t('VirtualListName'),
dataIndex: 'name',
align: 'left',
ellipsis: true,
width: 223
},
{
title: this.$t('instructionForUse'),
dataIndex: 'useExplain',
align: 'left',
ellipsis: true,
width: 223
},
{
title: this.$t('updateTime'),
dataIndex: 'updateTime',
align: 'left',
ellipsis: true,
width: 223
},
{
title: this.$t('creater'),
dataIndex: 'createBy',
align: 'left',
ellipsis: true,
width: 223
}
],
dataList: [],
loading: false,
pageNo: 1,
pageSize: 10,
total: 0
}
},
methods: {
transferModel() {
this.visible = true
},
searchQuery() {
this.pageNo = 1
this.replacePage()
},
searchReset() {
this.pageNo = 1
this.queryParam = {}
this.replacePage()
},
onChange(page, pageSize) {
this.pageNo = page
this.replacePage()
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.replacePage()
},
replacePage() {
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...this.queryParam
}
this.loading = true
// postAction('', query).then((res) => {
// if (res.success) {
// this.dataList = res.result.records || []
// this.total = res.result.total
// this.loading = false
// } else {
// this.loading = false
// }
// })
},
onSelectChange(value) {
this.selectedRowKeys = value
if (this.selectedRowKeys.length > 1) {
this.selectedRowKeys.shift()
}
},
handleCancel() {
this.visible = false
},
}
}
</script>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 10px;
}
.title-text {
width: 20%;
min-width: 110px;
color: #000F16;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
margin-top: 3px;
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.box-input {
display: inline-block;
width: 70%;
height: 38px;
margin-top: 2px;
}
.box-button {
height: 38px;
}
.page {
text-align: right;
margin-top: 20px;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
z-index: 100;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>
@@ -56,7 +56,7 @@
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
>
<span slot="CertificationListName" slot-scope="text,record">
<a>{{text}}</a>
<a @click="CertificationListNameClick(record)">{{text}}</a>
</span>
<span slot="operation" slot-scope="text,record">
<!-- v-if="record.createBy == userData.username || administrators"-->
@@ -72,7 +72,7 @@
<!-- v-if="record.createBy == userData.username || administrators"-->
<a class="text-operation" :disabled="record.state == 1?true:false"
v-has="'dummyInventoryBase:deleteBatch'"
>{{$t('maintenanceList')}}</a>
@click="maintenanceList(record)">{{$t('maintenanceList')}}</a>
<a class="text-operation"
v-has="'dummyInventoryBase:read'"
:disabled="record.state == 2?true:false" @click="subscribe(record)">
@@ -332,6 +332,19 @@ export default {
}
})
},
//认证清单维护
maintenanceList(item) {
let newUrl = this.$router.resolve({
path: '/certificationListMaintenance',
query: {
name: item.name,
useExplain: item.useExplain,
id: item.id,
title: '认证清单维护'
}
})
window.open(newUrl.href, '_blank')
},
//订阅
subscribe(val) {
let _this = this
@@ -372,6 +385,19 @@ export default {
}
})
},
//虚拟认证清单名称事件
CertificationListNameClick(item) {
let newUrl = this.$router.resolve({
path: '/certificationListMaintenance',
query: {
name: item.name,
useExplain: item.useExplain,
id: item.id,
title: '虚拟认证清单详情'
}
})
window.open(newUrl.href, '_blank')
},
searchQuery() {
this.pageNo = 1
this.getList()
@@ -0,0 +1,687 @@
<template>
<div class="doc-detail">
<div class="Virtual-detail-header" style="position: fixed;top: 0">
<div class="Virtual-detail-title">
<span>
{{isTrue ? $t('certificationListMaintenance'):$t('virtualAuthenticationListDetails')}}
</span>
</div>
<div class="Virtual-detail-right">
<div @click="UpdateLogClick" v-has="'dummyLog:page'" class="operator-text-text"
style="margin-right: 37px;cursor: pointer"
:title="$t('UpdateLog')">
<a-icon type="reload"/>
{{$t('UpdateLog')}}
</div>
</div>
</div>
<div style="padding-top: 88px;background: #fff;height: 100%">
<div class="detail-content" style="height: 100%">
<div class="Virtual-detail-content">
<div class="box-title-text-add">
<div class="title-text-add">
<span class="text-left" :title="$t('CertificationListName')">
{{$t('CertificationListName')}}
</span>
<span class="text-right" style="margin-right: 100px" :title="$route.query.name">
{{$route.query.name}}
</span>
<span class="text-left" style="width: 72px" :title="$t('instructionForUse')">
{{$t('instructionForUse')}}
</span>
<span class="text-right" :title="$route.query.useExplain">
{{$route.query.useExplain}}
</span>
</div>
</div>
</div>
<a-card :bordered="false" class="card">
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('category')">
<span>{{$t('category')}}</span>
</div>
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('category')"
v-model="queryParam.category"></j-input>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('inspectionItems')">
<span>{{$t('inspectionItems')}}</span>
</div>
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('inspectionItems')"
v-model="queryParam.inspectionItem"></j-input>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('standard')">
<span>{{$t('standard')}}</span>
</div>
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
v-model="queryParam.serialNumber"></j-input>
</div>
</a-col>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<globalAdvancedQuery ref="globalAdvancedQueryRef"
@handleSuperQuery="handleSuperQuery"
:fieldList="fieldList"/>
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<div class="table-operator" style="margin-bottom: 16px">
<!-- 导入-->
<!-- <div class="operator-text"-->
<!-- style="float: left;font-size: 16px;font-weight: 400;color: #040B29;">-->
<!-- {{$t('DocumentStandard')}}-->
<!-- </div>-->
<!-- v-if="isTrue"-->
<div v-if="isTrue" class="operator-text" v-has="'dummyInventoryInfo:importData'" >
<ImportFile :url="url" :dummyInventoryBaseId="$route.query.id" :isTrue="true"
:accept="'.zip'"/>
</div>
<!-- 模板下载-->
<!-- v-if="isTrue"-->
<div @click="handleModule"
v-if="isTrue"
v-has="'dummyInventoryInfo:exportTemplate'"
class="operator-text" >
<a-icon type="download"/>
{{$t('templateDownload')}}
</div>
<!-- 导出-->
<div @click="handleExport"
v-has="'dummyInventoryInfo:exportData'"
class="operator-text">
<a-icon type="export" :rotate="-90"/>
{{$t('export')}}
</div>
<!-- 调取-->
<!-- v-if="isTrue"-->
<!-- <div v-if="isTrue"-->
<!-- @click="transferClick"-->
<!-- v-has="'dummyInventoryInfo:copyInfoByIds'"-->
<!-- class="operator-text" >-->
<!-- <a-icon type="profile"/>-->
<!-- {{$t('Transfer')}}-->
<!-- </div>-->
<!-- 添加-->
<!-- v-if="isTrue"-->
<div v-if="isTrue"
@click="handleAdd"
v-has="'dummyInventoryInfo:add'"
class="operator-text" >
<a-icon type="plus"/>
{{$t('add')}}
</div>
<!-- 复制-->
<!-- v-if="isTrue"-->
<div @click="copyClick"
v-if="isTrue"
v-has="'dummyInventoryInfo:copyInfoByIds'"
class="operator-text" >
<a-icon type="copy"/>
{{$t('copy')}}
</div>
<!-- 批量设置-->
<!-- v-if="isTrue"-->
<div v-if="isTrue"
@click="batSettingClick"
v-has="'dummyInventoryInfo:setBatch'"
class="operator-text" >
<a-icon type="setting"/>
{{$t('batSetting')}}
</div>
<!-- 批量删除-->
<!-- v-if="isTrue"-->
<div @click="handleDel"
v-if="isTrue"
v-has="'dummyInventoryInfo:deleteBatch'"
class="operator-text" >
<a-icon type="delete"/>
{{$t('BatchDelete')}}
</div>
<!-- 自定义表头-->
<!-- <a-popconfirm :visible="customizevisible" overlayClassName='popconfirmmize' placement="bottomRight" >-->
<!-- <template slot="title" id="popconfirmmize">-->
<!-- <div style="height:320px;overflow:scroll;overflow-x: auto;">-->
<!-- <a-checkbox-->
<!-- style='margin-bottom: 22px;'-->
<!-- v-if="customizeList && customizeList.length"-->
<!-- v-model="checkAll"-->
<!-- :indeterminate="indeterminate"-->
<!-- @change="onCheckAllChange"-->
<!-- >{{$t('selectAll')}}-->
<!-- </a-checkbox>-->
<!-- <a-checkbox-group @change="onChange" v-model="checkedList" class="customize-text">-->
<!-- <a-checkbox class="customize-text-title" :disabled='item.disabled' v-for="(item, key) in customizeList" :key="key" :value="item.field">{{ item.name }}-->
<!-- </a-checkbox>-->
<!-- </a-checkbox-group>-->
<!-- <div class="drawer-bootom-button">-->
<!-- <a-button @click="cancel" style="margin-right: 16px">{{$t('cancel')}}</a-button>-->
<!-- <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('determine')}}</a-button>-->
<!-- </div>-->
<!-- </div>-->
<!-- </template>-->
<!-- <div class="operator-text" style="position: relative" @click='getcustomize'>-->
<!-- <a-icon type="setting"/>-->
<!-- {{ $t('customize') }}-->
<!-- </div>-->
<!-- </a-popconfirm>-->
</div>
<div style="width: 100%">
<a-table
class="table"
:loading="loading"
:pagination="false"
:components="drag(columns,'columns')"
:scroll="{x: '100%',y:'calc(100vh - 356px)'}"
rowKey="id"
:data-source="dataSource"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:columns="columns">
<span slot="item" slot-scope="text,record">
<a @click="itemClick(record)">{{text}}</a>
</span>
<span slot="operation" slot-scope="text,record">
<a v-if="isTrue"
class="text-operation"
v-has="'dummyInventoryInfo:edit'"
@click="edit(record)">{{$t('edit')}}</a>
<a v-if="isTrue"
class="text-operation"
v-has="'dummyInventoryInfo:deleteBatch'"
@click="deleteLib(record)">{{$t('deleteLib')}}</a>
<a v-if="isFalse"
class="text-operation"
@click="view(record)">{{$t('view')}}</a>
</span>
</a-table>
<div class="buttom-box" v-if="dataSource && dataSource.length > 0">
{{$t('total')+' '+this.dataSource.length+' '+ $t('strip')}}
</div>
</div>
</a-card>
</div>
</div>
<UpdateLog :url="url" ref="UpdateLogRef"/>
<transfer-list ref="transferListRef"></transfer-list>
<addModel :url="url" ref="addModelRef" @addModelList="addModelList"/>
<edit-model :url="url" ref="editModelRef" @editModelList="editModelList"></edit-model>
<bat-setting :url="url" ref="batSettingRef"></bat-setting>
</div>
</template>
<script>
import { Base64 } from 'js-base64'
import { mapGetters } from 'vuex'
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
import globalAdvancedQuery from '@/components/globalAdvancedQuery/index'
import UpdateLog from '@/components/UpdateLog/index'
import ImportFile from '@/components/ImportFile/index'
import transferList from '../components/transferList'
import addModel from '../components/addModel'
import editModel from '../components/editModel'
import batSetting from '../components/batSetting'
import { ResizeHeader,ResizeColumnProvide } from '@/mixins/header'
export default {
name:'certificationListMaintenance',
components: {
globalAdvancedQuery,
ImportFile,
UpdateLog,
transferList,
addModel,
editModel,
batSetting
},
mixins: [ResizeHeader,ResizeColumnProvide],
data() {
return {
title: '认证清单维护',
isTrue: false,
isFalse: false,
isbutton: false,
queryParamQuery: {},
dataSource: [],
url:{
list: '/authDummy/authDummyInventoryInfoEO/page',
logList: '',//更新log
exportTemplate: '',//模板下载
exportData: '',//导出
addModel: '/authDummy/authDummyInventoryInfoEO/add',//添加
copyInfo: '/authDummy/authDummyInventoryInfoEO/copyInfoByIds',//复制
deleteBatch: '/authDummy/authDummyInventoryInfoEO/deleteBatch',//批量删除
editModel: '/authDummy/authDummyInventoryInfoEO/edit',//编辑
},
queryParam: {},
orderByField: '',
columns: [
{
title: this.$t('category'),
align: 'left',
dataIndex: 'category',
width: 150,
ellipsis: true,
},
{
title: this.$t('inspectionItems'),
align: 'left',
dataIndex: 'inspectionItem',
width: 150,
ellipsis: true,
scopedSlots: { customRender: 'inspectionItems' }
},
{
title: 'WVTA ID',
align: 'left',
dataIndex: 'wvtaId',
width: 150,
ellipsis: true,
},
{
title: this.$t('standard'),
align: 'left',
dataIndex: 'serialNumber',
width: 150,
ellipsis: true,
},
{
title: this.$t('areaOfResponsibility'),
align: 'left',
dataIndex: 'dutyTerritory',
width: 200,
ellipsis: true,
},
{
title: this.$t('Deliverables'),
align: 'left',
dataIndex: 'deliverable',
width: 200,
ellipsis: true,
},
{
title: this.$t('operation'),
align: 'left',
fixed: 'right',
width: 200,
scopedSlots: { customRender: 'operation' }
}
],
selectedRowKeys: [],
loading: false,
fieldList: [
{
type: '',
value: 'shi4Yong4Fan4Wei2',
text: this.$t('scopeOfApplication'),
dictCode: 'apply_scope'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
},
{
type: '',
value: 'state',
text: this.$t('status'),
dictCode: 'state'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
},
{
type: 'string',
value: 'correspondingStandard',
text: this.$t('correspondingStandard')
},
{
type: '',
value: 'region',
text: this.$t('zoneOfApplication'),
dictCode: 'region'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
},
{
type: '',
value: 'implementType',
text: this.$t('implementationCategory'),
dictCode: 'implement_type'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
},
{
type: 'date',
value: 'xin1Che1Xing2Shi2Shi1Ri4Qi1',
text: this.$t('ImplementationDate')
},
{
type: 'date',
value: 'implementTime',
text: this.$t('vehicleInProductionDate')
},
{
type: 'string',
value: 'wvtaId',
text: 'WVTA ID'
},
{
type: '',
value: 'attestationType',
text: this.$t('certificationType'),
dictCode: 'attestation_type'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
},
{
type: '',
value: 'attestationRank',
text: this.$t('certificationLevel'),
dictCode: 'attestation_rank'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
},
{
type: '',
value: 'dutyTerritory',
text: this.$t('areaOfResponsibility'),
dictCode: 'duty_territory'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
}
]
}
},
created() {
if (this.$route.query.title == '虚拟认证清单详情') {
document.title = this.$t('virtualAuthenticationListDetails')
} else {
document.title = this.$t('certificationListMaintenance')
}
},
mounted() {
this.title = this.$route.query.title
this.isTrue = this.$route.query.title == '虚拟认证清单详情' ? false : true
this.isFalse = this.$route.query.title == '虚拟认证清单详情' ? true : false
this.getList()
},
computed: {
},
methods: {
...mapGetters(['userInfo']),
handleSuperQuery(params, matchType) {
let sqp = {}
if (!params || (params && params.length == 0)) {
sqp['superQueryParams'] = ''
this.$refs.globalAdvancedQueryRef.superQueryFlag = false
} else {
this.$refs.globalAdvancedQueryRef.superQueryFlag = true
sqp['superQueryParams'] = encodeURI(JSON.stringify(params))
sqp['superQueryMatchType'] = matchType
}
this.queryParamQuery = sqp
this.getList()
},
onSelectChange(value) {
this.selectedRowKeys = value
},
UpdateLogClick(){
this.$refs.UpdateLogRef.getList({ dummyInventoryBaseId: this.$route.query.id })
},
//搜索
searchQuery() {
this.getList()
},
//清空
searchReset() {
this.$refs.globalAdvancedQueryRef.resetLine()
this.$refs.globalAdvancedQueryRef.emitCallback()
this.queryParam = {}
this.getList()
},
//模板下载
handleModule() {
downloadFile(this.url.exportTemplate, this.$t('VirtualList') + this.$t('importTemplate') + '.xls', {})
},
//调取
// transferClick() {
// this.$refs.transferListRef.transferModel()
// },
//添加
handleAdd() {
this.$refs.addModelRef.addModel()
},
//导出
handleExport() {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let query = {
...this.queryParam,
...this.queryParamQuery,
ids: selectedRowKeys.join(','),
dummyInventoryBaseId: this.$route.query.id
}
downloadFile(this.url.exportData, this.$route.query.name + this.$t('VirtualList') + '.zip', query, this.Deselect)
},
Deselect() {
this.selectedRowKeys = []
},
//复制
copyClick() {
if (this.selectedRowKeys.length > 0) {
let _this = this
this.$confirm({
content: _this.$t('confirmCopy'),
onOk() {
let selectedRowKeys = JSON.parse(JSON.stringify(_this.selectedRowKeys))
getAction(_this.url.copyInfo, { ids: selectedRowKeys.join(',') }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.selectedRowKeys = []
_this.getList()
} else {
_this.$message.warning(res.message)
}
})
}
})
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
//批量设置
batSettingClick() {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.$refs.batSettingRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)))
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
//批量删除
handleDel() {
if (this.selectedRowKeys.length > 0) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmBatchDeletion'),
onOk() {
let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys))
deleteAction (_this.url.deleteBatch, { ids: idList.join(',') }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.selectedRowKeys = []
_this.getList()
} else {
_this.$message.warning(res.message)
}
})
}
})
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
addModelList() {
this.getList()
},
editModelList() {
this.getList()
},
getList() {
let query = {
...this.queryParam,
...this.queryParamQuery,
orderBy: this.orderBy,
orderByField: this.orderByField,
dummyInventoryBaseId: this.$route.query.id
}
this.loading = true
getAction(this.url.list,query).then((res) => {
if(res.success) {
this.dataSource = res.result.records || []
this.loading = false
} else {
this.loading = false
}
})
},
edit(item) {
this.$refs.editModelRef.editModel(JSON.parse(JSON.stringify(item)))
},
deleteLib(val) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
deleteAction(_this.url.deleteBatch, { ids: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
} else {
_this.$message.warning(res.message)
}
})
}
})
},
}
}
</script>
<style lang='less' scoped>
@import'~@assets/less/common.less';
.doc-detail {
background: #fff;
height: 100%;
.Virtual-detail-header {
width: 100%;
height: 68px;
line-height: 68px;
padding: 0 32px 0 32px;
box-sizing: border-box;
display: flex;
justify-content: space-between;
border-bottom: 2px #eff1f3 solid;
background: #fff;
z-index: 1000;
.Virtual-detail-title {
display: inline-block;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
font-size: 20px;
font-weight: 400;
color: #040B29;
line-height: 68px;
}
.doc-detail-right {
width: 800px;
line-height: 68px;
display: flex;
}
}
.Virtual-detail-content {
padding: 0 32px 0 32px;
box-sizing: border-box;
font-size: 16px;
.box-title-text-add {
line-height: 1.4;
}
.title-text-add {
display: inline-block;
width: 100%;
font-weight: 500;
margin-right: 16px;
height: 42px;
line-height: 42px;
}
}
}
.text-left {
font-size: 14px;
font-weight: 400;
color: #6F7385;
display: inline-block;
width: 100px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.text-right {
font-size: 16px;
font-weight: 400;
color: #040B29;
display: inline-block;
max-width: calc(50% - 240px);
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.box-title-text {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 10px;
margin-right: 20px;
}
.title-text {
width: 110px;
color: #000F16;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
margin-top: 3px;
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.box-input {
display: inline-block;
height: 38px;
margin-top: 2px;
}
.box-button {
height: 38px;
}
.text-operation {
margin-right: 8px;
}
.buttom-box {
width: 100%;
text-align: right;
font-size: 16px;
font-weight: 500;
color: #000F16;
}
</style>