|
|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
- <BasicModal :maskClosable="false" :width="1600" @register="registerModal" v-bind="$attrs" :title="title" centered
|
|
|
- :showOkBtn="false" :showCancelBtn="false" wrapClassName="basic-modal-custom" :footer="null">
|
|
|
+ <BasicModal :maskClosable="false" :width="1430" @register="registerModal" v-bind="$attrs" :title="title" centered
|
|
|
+ :showOkBtn="false" :showCancelBtn="false" wrapClassName="version-res-modal" :footer="null">
|
|
|
<div class="custom-content">
|
|
|
<div class="left-box">
|
|
|
<div class="res-list-btn" v-for="(item, index) in resBtns" :key="index"
|
|
|
@@ -45,20 +45,22 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</BasicModal>
|
|
|
+ <HistoryResListModal @register="registerHistoryModal"></HistoryResListModal>
|
|
|
</template>
|
|
|
<script>
|
|
|
import { defineComponent, reactive, ref, onMounted, watch, computed } from 'vue';
|
|
|
-import { BasicModal, useModalInner } from '/@/components/Modal';
|
|
|
+import { BasicModal, useModalInner, useModal } from '/@/components/Modal';
|
|
|
// 导入表格组件,表格事件
|
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
|
|
import { Button, message } from 'ant-design-vue';
|
|
|
import { getResByVersion } from '/@/api/sys/version';
|
|
|
import { session } from '/@/utils/Memory';
|
|
|
import moment from 'moment';
|
|
|
+import HistoryResListModal from './HistoryResListModal.vue';
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'VersionResModal',
|
|
|
- components: { BasicModal, BasicTable, TableAction, Button },
|
|
|
+ components: { BasicModal, BasicTable, TableAction, Button, HistoryResListModal },
|
|
|
setup(_, { emit }) {
|
|
|
const title = ref('');
|
|
|
const resBtns = ref([
|
|
|
@@ -96,6 +98,7 @@ export default defineComponent({
|
|
|
currentFid.value = FID;
|
|
|
title.value = `【${VERSION_NAME} V${VERSION_NO}】资源绑定查看`;
|
|
|
});
|
|
|
+ const [registerHistoryModal,{openModal}] = useModal();
|
|
|
const typeObj = {
|
|
|
MR: "地图资源",
|
|
|
DR: "场景资源",
|
|
|
@@ -106,16 +109,17 @@ export default defineComponent({
|
|
|
const getVersionResData = () => {
|
|
|
return new Promise(resolve => {
|
|
|
let params = {
|
|
|
+ keyStr: searchValue.value,
|
|
|
fid: currentFid.value,
|
|
|
serviceType: currentType.value
|
|
|
}
|
|
|
getResByVersion(params).then(res => {
|
|
|
if (res.resp_code === 0 && res.datas) {
|
|
|
- let resData = res.datas.pageData;
|
|
|
- resData.forEach(item => {
|
|
|
+ let resData = res.datas[currentType.value];
|
|
|
+ resData.pageData.forEach(item => {
|
|
|
item.type = typeObj[item.RESOURCE_TYPE]
|
|
|
})
|
|
|
- resolve(resData)
|
|
|
+ resolve(resData.pageData)
|
|
|
}
|
|
|
else {
|
|
|
resolve([])
|
|
|
@@ -167,7 +171,7 @@ export default defineComponent({
|
|
|
registerTable,
|
|
|
{ reload, collapseAll, getRowSelection, getSelectRowKeys, setSelectedRowKeys },
|
|
|
] = useTable({
|
|
|
- title: '版本列表', //'菜单列表'
|
|
|
+ title: '资源列表', //'菜单列表'
|
|
|
api: getVersionResData, //加载数据
|
|
|
columns: columns,
|
|
|
useSearchForm: false, //开启搜索区域
|
|
|
@@ -183,16 +187,16 @@ export default defineComponent({
|
|
|
pagination: {
|
|
|
hideOnSinglePage: false
|
|
|
},
|
|
|
- rowKey: (record) => record.fid,
|
|
|
+ rowKey: (record) => record.SERVICEID,
|
|
|
actionColumn: {
|
|
|
width: 200,
|
|
|
title: '操作',
|
|
|
dataIndex: 'action',
|
|
|
slots: { customRender: 'action' },
|
|
|
},
|
|
|
- rowSelection: {
|
|
|
- type: 'checkbox',
|
|
|
- },
|
|
|
+ // rowSelection: {
|
|
|
+ // type: 'checkbox',
|
|
|
+ // },
|
|
|
});
|
|
|
//表格查询功能
|
|
|
const searchTable = () => {
|
|
|
@@ -209,16 +213,20 @@ export default defineComponent({
|
|
|
reload();
|
|
|
}
|
|
|
// 浏览
|
|
|
- const handleFetchRes = ()=>{
|
|
|
+ const handleFetchRes = () => {
|
|
|
|
|
|
}
|
|
|
// 查看
|
|
|
- const handleLookRes = ()=>{
|
|
|
-
|
|
|
+ const handleLookRes = () => {
|
|
|
+
|
|
|
}
|
|
|
// 历史版本
|
|
|
- const handleSearchHistory = ()=>{
|
|
|
-
|
|
|
+ const handleSearchHistory = (record) => {
|
|
|
+ openModal(true,{
|
|
|
+ serviceId: record.SERVICEID,
|
|
|
+ serviceName: record.SERVICENAME,
|
|
|
+ type:record.type
|
|
|
+ })
|
|
|
}
|
|
|
return {
|
|
|
title,
|
|
|
@@ -227,6 +235,7 @@ export default defineComponent({
|
|
|
searchValue,
|
|
|
registerModal,
|
|
|
registerTable,
|
|
|
+ registerHistoryModal,
|
|
|
handleChangeRes,
|
|
|
resetTable,
|
|
|
searchTable,
|
|
|
@@ -239,86 +248,83 @@ export default defineComponent({
|
|
|
});
|
|
|
</script>
|
|
|
<style lang="less">
|
|
|
-.basic-modal-custom {
|
|
|
-
|
|
|
+.version-res-modal {
|
|
|
.ant-modal-content {
|
|
|
- background-color: #eff0f5;
|
|
|
+ background-color: #eff0f5 !important;
|
|
|
|
|
|
.scroll-container .scrollbar__wrap {
|
|
|
margin-bottom: 0 !important;
|
|
|
}
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|
|
|
+<style lang="less" scoped>
|
|
|
+.custom-content {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
|
|
|
- .custom-content {
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- // height: 100%;
|
|
|
-
|
|
|
- .left-box {
|
|
|
- padding: 20px;
|
|
|
- width: 240px;
|
|
|
- height: 80vh;
|
|
|
- background-color: #ffffff;
|
|
|
- border-radius: 6px;
|
|
|
-
|
|
|
- .res-list-btn {
|
|
|
- height: 35px;
|
|
|
- margin-bottom: 16px;
|
|
|
- background-color: #eff0f5;
|
|
|
- line-height: 35px;
|
|
|
- text-align: center;
|
|
|
- color: #333333;
|
|
|
- cursor: pointer;
|
|
|
- user-select: none;
|
|
|
- }
|
|
|
+ .left-box {
|
|
|
+ padding: 20px;
|
|
|
+ width: 240px;
|
|
|
+ background-color: #ffffff;
|
|
|
+ border-radius: 6px;
|
|
|
|
|
|
- .clicked {
|
|
|
- background-color: #0671dd;
|
|
|
- color: #FFFFFF;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .right-box {
|
|
|
- margin-left: 10px;
|
|
|
- width: calc(100% - 250px);
|
|
|
- height: 80vh;
|
|
|
+ .res-list-btn {
|
|
|
+ height: 35px;
|
|
|
+ margin-bottom: 16px;
|
|
|
+ background-color: #eff0f5;
|
|
|
+ line-height: 35px;
|
|
|
+ text-align: center;
|
|
|
+ color: #333333;
|
|
|
+ cursor: pointer;
|
|
|
+ user-select: none;
|
|
|
+ }
|
|
|
|
|
|
- .right-header {
|
|
|
- margin-bottom: 10px;
|
|
|
- height: 74px;
|
|
|
- padding: 0 20px;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- background-color: #ffffff;
|
|
|
- border-radius: 6px;
|
|
|
- justify-content: space-between;
|
|
|
+ .clicked {
|
|
|
+ background-color: #0671dd;
|
|
|
+ color: #FFFFFF;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- .search {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
+ .right-box {
|
|
|
+ margin-left: 10px;
|
|
|
+ width: calc(100% - 250px);
|
|
|
|
|
|
- .label {
|
|
|
- width: 120px;
|
|
|
- }
|
|
|
- }
|
|
|
+ .right-header {
|
|
|
+ margin-bottom: 10px;
|
|
|
+ height: 74px;
|
|
|
+ padding: 0 20px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ background-color: #ffffff;
|
|
|
+ border-radius: 6px;
|
|
|
+ justify-content: space-between;
|
|
|
|
|
|
- .handle-btns {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
+ .search {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
|
|
|
- .btn {
|
|
|
- margin-left: 10px;
|
|
|
- }
|
|
|
- }
|
|
|
+ .label {
|
|
|
+ width: 120px;
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- .right-body {
|
|
|
- padding: 0 20px;
|
|
|
- height: calc(100% - 84px);
|
|
|
- background-color: #ffffff;
|
|
|
- border-radius: 6px;
|
|
|
+ .handle-btns {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ .btn {
|
|
|
+ margin-left: 10px;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .right-body {
|
|
|
+ padding: 0 20px;
|
|
|
+ height: calc(100% - 84px);
|
|
|
+ background-color: #ffffff;
|
|
|
+ border-radius: 6px;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</style>
|