This commit is contained in:
RenCheng 2025-04-29 09:45:38 +08:00
commit 2d00c98d1f
7 changed files with 514 additions and 190 deletions

View File

@ -0,0 +1,35 @@
<template>
<div class="container">
<h1>点击下面的链接启动 WPS Office</h1>
<button @click="launchWPS">启动 WPS</button>
</div>
</template>
<script>
export default {
methods: {
launchWPS() {
window.location.href = 'myapp://test';
}
}
};
</script>
<style scoped>
.container {
text-align: center;
margin-top: 50px;
}
button {
padding: 10px 20px;
font-size: 16px;
background-color: #007bff;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}
button:hover {
background-color: #0056b3;
}
</style>

View File

@ -75,7 +75,7 @@ export default {
loading: false,
//
queryParam: {
sourceType: 1,
sourceType: 2,
schemaMass: null,
massKey: null
},

View File

@ -135,9 +135,9 @@ export default {
getselect(){
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
if (res.success) {
this.dataTypedataSources = res.result.result.DATA_CONN_STANDARD
if(res.result.result.DATA_CONN_STANDARD.length > 0){
this.queryParam.schemaMass = res.result.result.DATA_CONN_STANDARD[0].cnName
this.dataTypedataSources = res.result.result.DATA_CONN_ORIGINAL
if(res.result.result.DATA_CONN_ORIGINAL.length > 0){
this.queryParam.schemaMass = res.result.result.DATA_CONN_ORIGINAL[0].cnName
}
this.getMetaDataTypeTree();
} else {

View File

@ -18,7 +18,7 @@
:dataSource="dataSource"
@change="handleTableChange">
<!-- :locale="myLocale"-->
<template slot="exportStatus" slot-scope="text">
<template slot="runStatus" slot-scope="text">
<span style="color:black;" v-if="text === 0">正在导出</span>
<span style="color:green;" v-if="text === 1">导出成功</span>
<span style="color:red;" v-if="text === 2">导出失败</span>
@ -66,8 +66,8 @@ import { getAction, deleteAction, putAction, postAction } from '@/api/manage'
{
title: '导出状态',
align:"center",
dataIndex: 'exportStatus',
scopedSlots: { customRender: 'exportStatus' }
dataIndex: 'runStatus',
scopedSlots: { customRender: 'runStatus' }
},
{
title: '导出结束时间',

View File

@ -0,0 +1,131 @@
<template>
<a-modal
:title="title"
:width="900"
:visible="visible"
@cancel="close"
:footer="null"
:ok-button-props="{ style: { display: 'none' } }">
<a-spin :spinning="confirmLoading">
<a-table
ref="table"
size="middle"
bordered
rowKey="id"
:pagination="ipagination"
:columns="columns"
:dataSource="dataSource"
@change="handleTableChange">
<!-- :locale="myLocale"-->
<template slot="runStatus" slot-scope="text">
<span style="color:black;" v-if="text === 0">正在恢复</span>
<span style="color:green;" v-if="text === 1">恢复成功</span>
<span style="color:red;" v-if="text === 2">恢复失败</span>
</template>
<!-- 字符串超长截取省略号显示-->
</a-table>
</a-spin>
</a-modal>
</template>
<script>
import moment from "moment"
import { getAction, deleteAction, putAction, postAction } from '@/api/manage'
export default {
name: "recoveryLog",
components: {
},
data () {
return {
title:"操作",
buttonStyle: 'solid',
visible: false,
confirmLoading: false,
columns: [
{
title: '#',
dataIndex: '',
key:'id',
width:60,
align:"id",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title: '用户名',
align:"center",
dataIndex: 'schemaName',
},
{
title: '创建时间',
align:"center",
dataIndex: 'createTime'
},
{
title: '恢复状态',
align:"center",
dataIndex: 'runStatus',
scopedSlots: { customRender: 'runStatus' }
},
{
title: '恢复结束时间',
align:"center",
dataIndex: 'endTime'
},
],
syncTaskId:"",
queryParam: {
pageNum :1,
pageSize:20
},
dataSource:[],
ipagination:{}
}
},
created () {
},
methods: {
open (record) {
this.visible =true;
this.syncTaskId = record;
this.getlist();
},
close () {
this.$emit('ok');
this.visible = false;
},
getlist(){
getAction('/idcDataBackup/getDmImportLog?sourceType='+this.syncTaskId).then((res) => {
if (res.success) {
this.dataSource = res.result;
if(res.result.total)
{
this.ipagination.total = res.result.total;
}
} else {
this.$message.warning(res.message);
}
});
},
handleTableChange(pagination, filters, sorter) {
//
//TODO
if (Object.keys(sorter).length > 0) {
this.isorter.column = sorter.field;
this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
}
this.ipagination = pagination;
this.getlist();
},
}
}
</script>
<style scoped>
.disabled{
pointer-events: none;
}
</style>

View File

@ -1,214 +1,144 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<a-form-item label="模式名称">
<a-select placeholder="选择模式" option-filter-prop="children" size="large" v-model="queryParam.schemaName" >
<a-select-option v-for="d in allSchemaName" :key="d">
{{ d }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24" >
<a-button type="primary" style="left: 10px" @click="loadData" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px;left: 10px">重置</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<div class="linese"></div>
<!-- table区域-begin -->
<div style="height:calc(100vh - 316px);background: #e6e9f1;overflow:hidden;padding: 15px;">
<a-table
ref="table"
size="middle"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys,onChange: onSelectChange}"
@change="handleTableChange">
<!-- :locale="myLocale"-->
<a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource"
:pagination="ipagination" :loading="loading"
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" @change="handleTableChange">
<!-- :locale="myLocale"-->
<!-- 字符串超长截取省略号显示-->
<template slot="Status" slot-scope="text">
<span style="color:black;" v-if="text === 0" >未恢复</span>
<span style="color:darkorange;" v-if="text === 1">恢复中</span>
<span style="color:#87d068;" v-if="text === 2">完成</span>
<template slot="sourceType" slot-scope="text">
<span style="color:black;" v-if="text === 1">原始库</span>
<span style="color:darkorange;" v-if="text === 2">标准库</span>
<span style="color:#87d068;" v-if="text === 3">专题库</span>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">恢复备份</a>
<a @click="handleRun(record.sourceType)">一键恢复</a>
<a-divider type="vertical" />
<a >恢复日志</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
<a @click="showlog(record.sourceType)">同步日志</a>
</span>
</a-table>
</div>
<!-- table区域-end -->
<div class="linese"></div>
<!-- table区域-end -->
<!-- 表单区域 -->
<backupModal ref="modalForm" @ok="modalFormOk"></backupModal>
<recoveryLog ref="recoveryLog" @ok="modalFormOk"></recoveryLog>
</a-card>
</template>
<script>
import { shipModelPageList,
shipModeldeleteById } from '@/api/ship'
import { getAction} from '@/api/manage'
import { taskCreate,
taskUpdateById,
taskQueryById,
taskPageList,
taskDistributeTask,
taskDeleteById } from '@/api/task'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import JEllipsis from "@/components/jeecg/JEllipsis";
export default {
name: "recovery",
mixins:[JeecgListMixin],
components: {
JEllipsis,
VNodes: {
functional: true,
render: (h, ctx) => ctx.props.vnodes,
import { getAction, deleteAction, putAction, postAction } from '@/api/manage'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import JEllipsis from "@/components/jeecg/JEllipsis";
import backupModal from './modules/backupModal'
import recoveryLog from './modules/recoveryLog'
export default {
name: "recovery",
mixins: [JeecgListMixin],
components: {
JEllipsis,
backupModal,
recoveryLog,
VNodes: {
functional: true,
render: (h, ctx) => ctx.props.vnodes,
},
},
data() {
return {
description: '数据库恢复',
dataSource: [
],
schemaName: "",
allSchemaName: [],
queryParam: {
pageNum: 1,
pageSize: 10
},
},
data () {
return {
description: '数据库恢复',
dataSource: [
],
schemaName:"",
allSchemaName:[],
queryParam: {
pageNum :1,
pageSize:20
},
columns: [
{
title: '#',
dataIndex: '',
key:'id',
width:60,
align:"id",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title: '任务名称',
align:"center",
dataIndex: 'name',
},
{
title: '创建时间',
align:"center",
dataIndex: 'createTime'
},
{
title: '备份开始时间',
align:"center",
dataIndex: 'startTime'
},
{
title: '备份结束时间',
align:"center",
dataIndex: 'endTime',
},
{
title: '备份状态',
align:"center",
dataIndex: 'Status',
scopedSlots: { customRender: 'Status' },
},
{
title: '操作',
dataIndex: 'action',
align:"center",
width:180,
scopedSlots: { customRender: 'action' },
columns: [
{
title: '序号',
dataIndex: '',
key: 'id',
width: 60,
align: "id",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
]
},
{
title: '任务名称',
align: "center",
dataIndex: 'taskName',
},
{
title: '数据库',
align: "center",
dataIndex: 'sourceType',
scopedSlots: { customRender: 'sourceType' }
},
{
title: '备注',
align: "center",
dataIndex: 'remark'
},
{
title: '操作',
dataIndex: 'action',
align: "center",
width: 260,
scopedSlots: { customRender: 'action' },
}
]
}
},
computed: {
},
created() {
this.getAllSchemaName();
this.loadData();
},
methods: {
//handleTableChange
handleTableChange(pagination, filters, sorter) {
//
//TODO
if (Object.keys(sorter).length > 0) {
this.isorter.column = sorter.field;
this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
}
},
computed: {
},
created () {
this.getAllSchemaName();
this.ipagination = pagination;
this.loadData();
},
methods: {
//handleTableChange
handleTableChange(pagination, filters, sorter) {
//
//TODO
if (Object.keys(sorter).length > 0) {
this.isorter.column = sorter.field;
this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
loadData() {
getAction("/idcDataBackup/importPageList?pageNo=1&pageSize=10").then((res) => {
if (res.success) {
this.dataSource = res.result.records;
} else {
this.$message.warning(res.message);
}
this.ipagination = pagination;
this.loadData();
},
getAllSchemaName(){
getAction("/fileDataLink/getAllSchemaName").then((res) => {
if (res.success) {
console.log(res)
this.allSchemaName = res.result;
}else{
this.$message.warning(res.message);
}
});
},
loadData() {
},
handleDelete: function (id) {
var that = this;
taskDeleteById({id: id}).then((res) => {
if (res.success) {
that.$message.success(res.message);
that.loadData();
} else {
that.$message.warning(res.message);
}
});
},
handleEdit: function (record) {
this.$refs.modalForm.edit(record);
this.$refs.modalForm.title = "编辑";
},
handleDistribute:function (id) {
var that = this;
taskDistributeTask({id: id}).then((res) => {
if (res.success) {
that.$message.success(res.message);
that.loadData();
} else {
that.$message.warning(res.message);
}
});
},
handleAdd() {
this.$refs.modalForm.add();
this.$refs.modalForm.title = "新增";
},
});
},
handleRun(sourceType) {
postAction("/idcDataBackup/dmImportBySourceType",{sourceType:sourceType}).then(res => {
if (res.success) {
this.$message.success(res.result);
} else {
this.$message.warning(res.message);
}
})
},
showlog:function(id) {
this.$refs.recoveryLog.open(id);
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
@import '~@assets/less/common.less';
</style>

View File

@ -0,0 +1,228 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<a-form-item label="模式名称">
<a-select placeholder="选择模式" option-filter-prop="children" size="large" v-model="queryParam.schemaName" >
<a-select-option v-for="d in allSchemaName" :key="d">
{{ d }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24" >
<a-button type="primary" style="left: 10px" @click="loadData" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px;left: 10px">重置</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<div class="linese"></div>
<!-- table区域-begin -->
<div style="height:calc(100vh - 316px);background: #e6e9f1;overflow:hidden;padding: 15px;">
<a-table
ref="table"
size="middle"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys,onChange: onSelectChange}"
@change="handleTableChange">
<!-- :locale="myLocale"-->
<!-- 字符串超长截取省略号显示-->
<template slot="sourceType" slot-scope="text">
<span style="color:black;" v-if="text === 1">原始库</span>
<span style="color:darkorange;" v-if="text === 2">标准库</span>
<span style="color:#87d068;" v-if="text === 3">专题库</span>
<span style="color:wheat;" v-if="text === 4">系统库</span>
</template>
<!-- 字符串超长截取省略号显示-->
<template slot="Status" slot-scope="text">
<span style="color:black;" v-if="text === 0" >未恢复</span>
<span style="color:darkorange;" v-if="text === 1">恢复中</span>
<span style="color:#87d068;" v-if="text === 2">完成</span>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">恢复备份</a>
<a-divider type="vertical" />
<a >恢复日志</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
</a-table>
</div>
<!-- table区域-end -->
<div class="linese"></div>
<!-- 表单区域 -->
</a-card>
</template>
<script>
import { shipModelPageList,
shipModeldeleteById } from '@/api/ship'
import { getAction} from '@/api/manage'
import { taskCreate,
taskUpdateById,
taskQueryById,
taskPageList,
taskDistributeTask,
taskDeleteById } from '@/api/task'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import JEllipsis from "@/components/jeecg/JEllipsis";
export default {
name: "recovery",
mixins:[JeecgListMixin],
components: {
JEllipsis,
VNodes: {
functional: true,
render: (h, ctx) => ctx.props.vnodes,
},
},
data () {
return {
description: '数据库恢复',
dataSource: [
],
schemaName:"",
allSchemaName:[],
queryParam: {
pageNum :1,
pageSize:20
},
columns: [
{
title: '#',
dataIndex: '',
key:'id',
width:60,
align:"id",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title: '任务名称',
align:"center",
dataIndex: 'taskName',
},
{
title: '数据库',
align: "center",
dataIndex: 'sourceType',
scopedSlots: { customRender: 'sourceType' }
},
{
title: '备份开始时间',
align:"center",
dataIndex: 'startTime'
},
{
title: '备份结束时间',
align:"center",
dataIndex: 'endTime',
},
{
title: '备份状态',
align:"center",
dataIndex: 'Status',
scopedSlots: { customRender: 'Status' },
},
{
title: '操作',
dataIndex: 'action',
align:"center",
width:260,
scopedSlots: { customRender: 'action' },
}
]
}
},
computed: {
},
created () {
this.getAllSchemaName();
this.loadData();
},
methods: {
//handleTableChange
handleTableChange(pagination, filters, sorter) {
//
//TODO
if (Object.keys(sorter).length > 0) {
this.isorter.column = sorter.field;
this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
}
this.ipagination = pagination;
this.loadData();
},
getAllSchemaName(){
getAction("/fileDataLink/getAllSchemaName").then((res) => {
if (res.success) {
console.log(res)
this.allSchemaName = res.result;
}else{
this.$message.warning(res.message);
}
});
},
loadData() {
getAction("/idcDataBackup/importPageList?pageNo=1&pageSize=10").then((res) => {
if (res.success) {
this.dataSource = res.result.records;
} else {
this.$message.warning(res.message);
}
});
},
handleDelete: function (id) {
var that = this;
taskDeleteById({id: id}).then((res) => {
if (res.success) {
that.$message.success(res.message);
that.loadData();
} else {
that.$message.warning(res.message);
}
});
},
handleEdit: function (record) {
this.$refs.modalForm.edit(record);
this.$refs.modalForm.title = "编辑";
},
handleDistribute:function (id) {
var that = this;
taskDistributeTask({id: id}).then((res) => {
if (res.success) {
that.$message.success(res.message);
that.loadData();
} else {
that.$message.warning(res.message);
}
});
},
handleAdd() {
this.$refs.modalForm.add();
this.$refs.modalForm.title = "新增";
},
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>