对接虚拟清单列表

This commit is contained in:
qq787203167
2022-04-08 17:03:14 +08:00
parent 86d30c54b7
commit 23815e837a
5 changed files with 163 additions and 36 deletions
+1
View File
@@ -627,4 +627,5 @@ module.exports = {
DeliverableStatus:'Deliverable status', DeliverableStatus:'Deliverable status',
CurrentStatusOfTheProject:'Current status of the project', CurrentStatusOfTheProject:'Current status of the project',
NonConformance:'Non conformance', NonConformance:'Non conformance',
listSubclauses:'list subclauses',
} }
+1
View File
@@ -631,4 +631,5 @@ module.exports = {
DeliverableStatus:'交付物状态', DeliverableStatus:'交付物状态',
CurrentStatusOfTheProject:'项目当前状态', CurrentStatusOfTheProject:'项目当前状态',
NonConformance:'未符合项', NonConformance:'未符合项',
listSubclauses:'清单条目'
} }
@@ -3,39 +3,43 @@
<div class="Virtual-detail-header" style="position: fixed;top: 0"> <div class="Virtual-detail-header" style="position: fixed;top: 0">
<div class="Virtual-detail-title"> <div class="Virtual-detail-title">
<span style="line-height: 74px;display: inline-block;float: left"> <span style="line-height: 74px;display: inline-block;float: left">
<a-icon type="left-circle" theme="filled" style="margin-right: 6px;font-size: 30px;color: #21c9cc;"/> <a-icon type="arrow-left" style="margin-right: 6px;font-size: 26px;"/>
</span> </span>
<span> <span>
{{this.title}} {{this.title}}
</span> </span>
</div> </div>
<div class="Virtual-detail-right"> <div class="Virtual-detail-right">
<div @click="UpdateLog" class="operator-text-text" :title="$t('UpdateLog')"> <div @click="UpdateLog" class="operator-text-text" style="margin-right: 37px" :title="$t('UpdateLog')">
<a-icon type="reload"/> <a-icon type="reload"/>
{{$t('UpdateLog')}} {{$t('UpdateLog')}}
</div> </div>
</div> </div>
</div> </div>
<div style="padding-top: 84px;background: #fff;height: 100%"> <div style="padding-top: 88px;background: #fff;height: 100%">
<div class="detail-content" style="height: 100%"> <div class="detail-content" style="height: 100%">
<div class="Virtual-detail-content"> <div class="Virtual-detail-content">
<div class="box-title-text-add"> <div class="box-title-text-add">
<div class="title-text-add"> <div class="title-text-add">
<span :title="$t('VirtualListName')"> <span class="text-left" :title="$t('VirtualListName')">
{{$t('VirtualListName')}}:是的开了房间都是立刻就的路上看见圣诞快乐 上看到了附件三零客机上的翻开历史交锋是开了房间都是付款了第三方</span> {{$t('VirtualListName')}}
</div> </span>
</div> <span class="text-right" style="margin-right: 100px">
<div class="box-title-text-add"> 是的开了房间都是立刻就的路上看见圣诞快乐
<div class="title-text-add"> </span>
<span> <span class="text-left" :title="$t('instructionForUse')">
{{$t('instructionForUse')}}:是的开了房间都是立刻就的路上看见圣诞快乐 上看到了附件三零客机上的翻开历史交锋是开了房间都是付款了第三方</span> {{$t('instructionForUse')}}
</span>
<span class="text-right">
是的开了房间都是立刻就的路上看见圣诞快乐 上看到了附件三零客机上的翻开历史交锋是开了房间都是付款了第三方
</span>
</div> </div>
</div> </div>
</div> </div>
<a-divider orientation="left"> <a-card :bordered="false" class="card">
清单条目 <div class="header-text">
</a-divider> {{$t('listSubclauses')}}
<a-card :bordered="false"> </div>
<div class="table-page-search-wrapper"> <div class="table-page-search-wrapper">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :md="6" :sm="8"> <a-col :md="6" :sm="8">
@@ -124,6 +128,7 @@
import ImportFile from '@/components/ImportFile/index' import ImportFile from '@/components/ImportFile/index'
import addModel from './addModel' import addModel from './addModel'
import editModel from './editModel' import editModel from './editModel'
export default { export default {
name: 'virtualListDetails', name: 'virtualListDetails',
components: { components: {
@@ -316,10 +321,10 @@
}, },
handleAdd() { handleAdd() {
this.$refs.addModelRef.addModel() this.$refs.addModelRef.addModel()
}, },
handleDel() { handleDel() {
this.$refs.editModelRef.editModel() this.$refs.editModelRef.editModel()
}, },
onSelectChange(value) { onSelectChange(value) {
this.selectedRowKeys = value this.selectedRowKeys = value
@@ -371,7 +376,7 @@
} }
.Virtual-detail-content { .Virtual-detail-content {
padding: 0 38px 0 38px; padding: 0 32px 0 32px;
box-sizing: border-box; box-sizing: border-box;
font-size: 16px; font-size: 16px;
@@ -381,6 +386,7 @@
.title-text-add { .title-text-add {
display: inline-block; display: inline-block;
width: 100%;
font-weight: 500; font-weight: 500;
margin-right: 16px; margin-right: 16px;
height: 42px; height: 42px;
@@ -430,6 +436,37 @@
text-align: right; text-align: right;
margin-top: 20px; margin-top: 20px;
} }
.header-text {
font-size: 16px;
font-weight: 400;
height: 40px;
color: #000F16;
}
.text-left {
font-size: 14px;
font-weight: 400;
color: #6F7385;
margin-right: 40px;
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;
}
</style> </style>
<style> <style>
.box-input .ant-select-selection { .box-input .ant-select-selection {
@@ -439,4 +476,8 @@
.box-input .ant-select-selection__rendered { .box-input .ant-select-selection__rendered {
line-height: 38px; line-height: 38px;
} }
.card .ant-card-body {
padding: 14px 32px 32px 32px;
}
</style> </style>
@@ -8,7 +8,7 @@
<span>{{$t('VirtualListName')}}</span> <span>{{$t('VirtualListName')}}</span>
</div> </div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('VirtualListName')" <a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('VirtualListName')"
v-model="queryParam.db_field_name"></a-input> v-model="queryParam.name"></a-input>
</div> </div>
</a-col> </a-col>
<a-col :md="6" :sm="8"> <a-col :md="6" :sm="8">
@@ -16,10 +16,10 @@
<div class="title-text" :title="$t('listStatus')"> <div class="title-text" :title="$t('listStatus')">
<span>{{$t('listStatus')}}</span> <span>{{$t('listStatus')}}</span>
</div> </div>
<j-dict-select-tag class="box-input" v-model="queryParam.db_field_name" <j-dict-select-tag class="box-input" v-model="queryParam.state"
:placeholder="$t('PleaseSelect')+$t('listStatus')" :placeholder="$t('PleaseSelect')+$t('listStatus')"
:type="'select'" :type="'select'"
:triggerChange="false" :dictCode="''"/> :triggerChange="false" :dictCode="'dummy_inventory_state'"/>
</div> </div>
</a-col> </a-col>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons"> <span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
@@ -127,6 +127,7 @@
<script> <script>
import { getAction, postAction, downloadFile } from '@/api/manage' import { getAction, postAction, downloadFile } from '@/api/manage'
import eventBUs from '../../../common/event'
export default { export default {
name: 'index', name: 'index',
@@ -139,7 +140,12 @@
visible: false, visible: false,
dataSource: [], dataSource: [],
confirmLoading: false, confirmLoading: false,
url: {}, url: {
list: '/dummy/dummyInventoryBaseEO/page',
add: '/dummy/dummyInventoryBaseEO/add',
edit: '/dummy/dummyInventoryBaseEO/edit',
deleteBatch: '/dummy/dummyInventoryBaseEO/deleteBatch'
},
total: 0, total: 0,
pageSize: 10, pageSize: 10,
pageNo: 1, pageNo: 1,
@@ -148,18 +154,18 @@
{ {
title: this.$t('VirtualListName'), title: this.$t('VirtualListName'),
align: 'center', align: 'center',
dataIndex: 'VirtualListName', dataIndex: 'name',
scopedSlots: { customRender: 'VirtualListName' } scopedSlots: { customRender: 'VirtualListName' }
}, },
{ {
title: this.$t('listStatus'), title: this.$t('listStatus'),
align: 'center', align: 'center',
dataIndex: 'listStatus' dataIndex: 'state'
}, },
{ {
title: this.$t('creater'), title: this.$t('creater'),
align: 'center', align: 'center',
dataIndex: 'creater' dataIndex: 'createBy'
}, },
{ {
title: this.$t('operation'), title: this.$t('operation'),
@@ -170,10 +176,11 @@
} }
], ],
queryParam: {} queryParam: {}
} }
}, },
mounted() { mounted() {
this.getList()
}, },
methods: { methods: {
onSelectChange(value) { onSelectChange(value) {
@@ -187,11 +194,25 @@
}, },
//批量删除 //批量删除
handleDel() { handleDel() {
let newUrl = this.$router.resolve({ if (this.selectedRowKeys.length > 0) {
path: '/virtualListDetails', let _this = this
query: {} this.$confirm({
}) content: _this.$t('ConfirmBatchDeletion'),
window.open(newUrl.href, '_blank') onOk() {
let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys))
getAction(_this.url.deleteBatch, { ids: idList.join(',') }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.selectedRowKeys = []
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
}, },
//编辑 //编辑
edit(item) { edit(item) {
@@ -212,31 +233,94 @@
}, },
//删除 //删除
deleteLib(item) { deleteLib(val) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
_this.verifyBind(val.id, () => {
getAction(_this.url.deleteBatch, { ids: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
})
}
})
}, },
//虚拟清单名称事件 //虚拟清单名称事件
VirtualListNameClick(item) { VirtualListNameClick(item) {
let newUrl = this.$router.resolve({
path: '/virtualListDetails',
query: {}
})
window.open(newUrl.href, '_blank')
},
getList() {
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...this.queryParam
}
this.loading = true
getAction(this.url.list, query).then((res) => {
if (res.success) {
if (res.result.current > 1 && res.result.records.length == 0) {
this.pageNo = res.result.current - 1
this.getList()
return
}
this.dataSource = res.result.records || []
this.total = res.result.total
this.loading = false
} else {
this.loading = false
}
})
}, },
searchQuery() { searchQuery() {
this.pageNo = 1 this.pageNo = 1
this.getList()
}, },
searchReset() { searchReset() {
this.queryParam = {}
this.pageNo = 1 this.pageNo = 1
this.getList()
}, },
pageOnChange(page, pageSize) { pageOnChange(page, pageSize) {
this.pageNo = page this.pageNo = page
this.getList()
}, },
SizeChange(page, pageSize) { SizeChange(page, pageSize) {
this.pageNo = 1 this.pageNo = 1
this.pageSize = pageSize this.pageSize = pageSize
this.getList()
}, },
handleCancel() { handleCancel() {
this.visible = false this.visible = false
}, },
handleSubmit() { handleSubmit() {
let url = ''
if (this.queryParam.id) {
url = this.url.edit
} else {
url = this.url.add
}
this.confirmLoading = true
postAction(url, this.queryParam).then((res) => {
if (res.success) {
this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.getList()
} else {
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
}
})
} }
} }
} }
@@ -47,7 +47,7 @@
<a-icon type="file-search" title="变更" class="operator-text-left"/> <a-icon type="file-search" title="变更" class="operator-text-left"/>
<a-icon type="bulb" title="定板" class="operator-text-left"/> <a-icon type="bulb" title="定板" class="operator-text-left"/>
</div> </div>
<div style="float: right;margin-bottom: 19px"> <div style="float: right;margin-top: 4px">
<div class="operator-text" v-has="'document:importZip'"> <div class="operator-text" v-has="'document:importZip'">
<ImportFile :url="url"/> <ImportFile :url="url"/>
</div> </div>