Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
N
NZWZ
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
刘旭
NZWZ
Commits
7ac3cb79
提交
7ac3cb79
authored
9月 23, 2022
作者:
刘旭
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新同步功能
上级
07374f6b
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
64 行增加
和
69 行删除
+64
-69
logApi.ts
src/services/api/systemApi/log/logApi.ts
+0
-1
synchronizationAPI.ts
...vices/api/systemApi/synchronization/synchronizationAPI.ts
+7
-6
synchronizationManage.vue
src/views/system/synchronizationManage.vue
+13
-54
tableRelation.vue
src/views/system/tableRelation.vue
+42
-6
xyunLog.vue
src/views/system/xyunLog.vue
+2
-2
没有找到文件。
src/services/api/systemApi/log/logApi.ts
浏览文件 @
7ac3cb79
import
{
List
}
from
"echarts"
;
import
{
request
}
from
"../../config"
;
import
{
request
}
from
"../../config"
;
// 查询日志
// 查询日志
...
...
src/services/api/systemApi/synchronization/synchronizationAPI.ts
浏览文件 @
7ac3cb79
...
@@ -2,26 +2,27 @@ import { request } from "../../config";
...
@@ -2,26 +2,27 @@ import { request } from "../../config";
// 查询金蝶参数
// 查询金蝶参数
export
function
getSynchronization
()
{
export
function
getSynchronization
()
{
return
request
({
return
request
({
url
:
'/api/init/connect/parm'
,
url
:
'/api/init/connect/par
a
m'
,
method
:
'get'
method
:
'get'
})
})
}
}
// 保存金蝶参数
// 保存金蝶参数
export
function
putSynchronization
(
data
:
any
)
{
export
function
putSynchronization
(
data
:
any
)
{
return
request
({
return
request
({
url
:
'/api/init/connect/parm/create'
,
url
:
'/api/init/connect/par
a
m/create'
,
method
:
'post'
,
method
:
'post'
,
data
data
})
})
}
}
// 手动开启同步
// 手动开启同步
export
function
getManual
(
)
{
export
function
postManual
(
tableHeaderList
:
any
)
{
return
request
({
return
request
({
url
:
'/api/manual/synchronization'
,
url
:
'/api/manual/synchronization'
,
method
:
'get'
,
method
:
'post'
,
data
:
{
tableHeaderList
}
})
})
}
}
// 开启自动同步
// 开启自动同步
...
...
src/views/system/synchronizationManage.vue
浏览文件 @
7ac3cb79
...
@@ -2,86 +2,45 @@
...
@@ -2,86 +2,45 @@
<!-- 按钮 -->
<!-- 按钮 -->
<div
style=
"margin: 50px 50px"
>
<div
style=
"margin: 50px 50px"
>
<el-space
:size=
"30"
>
<el-space
:size=
"30"
>
<el-button
type=
"primary"
icon=
"SwitchButton"
@
click=
"handleOpen"
<el-button
type=
"primary"
icon=
"SwitchButton"
@
click=
"handleOpen"
>
启用同步
</el-button>
>
启用同步
</el-button
<el-button
type=
"info"
icon=
"CircleClose"
@
click=
"handleClose"
>
关闭同步
</el-button>
>
<el-button
type=
"primary"
icon=
"Refresh"
@
click=
"handleManual"
>
手动同步
</el-button>
<el-button
type=
"info"
icon=
"CircleClose"
@
click=
"handleClose"
>
关闭同步
</el-button
>
<el-button
type=
"primary"
icon=
"Refresh"
@
click=
"handleManual"
>
手动同步
</el-button
>
</el-space>
</el-space>
</div>
</div>
<!-- 表单区域 -->
<!-- 表单区域 -->
<div
style=
"height: 500px; width: 500px; margin: auto 25%"
>
<div
style=
"height: 500px; width: 500px; margin: auto 25%"
>
<el-form
<el-form
ref=
"ruleFormRef"
:rules=
"rules"
:model=
"sybchronizationForm"
:disabled=
"isDisabled"
label-position=
"right"
ref=
"ruleFormRef"
label-width=
"100px"
class=
"demo-ruleForm"
style=
"margin-top: 50px"
>
:rules=
"rules"
:model=
"sybchronizationForm"
:disabled=
"isDisabled"
label-position=
"right"
label-width=
"100px"
class=
"demo-ruleForm"
style=
"margin-top: 50px"
>
<el-row>
<el-row>
<el-col
:span=
"24"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"金蝶地址:"
prop=
"k3CloudUrl"
>
<el-form-item
label=
"金蝶地址:"
prop=
"k3CloudUrl"
>
<el-input
<el-input
v-model=
"sybchronizationForm.k3CloudUrl"
placeholder=
"请输入金蝶地址:"
clearable
/>
v-model=
"sybchronizationForm.k3CloudUrl"
placeholder=
"请输入金蝶地址:"
clearable
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"24"
prop=
"dbid"
>
<el-col
:span=
"24"
prop=
"dbid"
>
<el-form-item
label=
"数据库ID:"
>
<el-form-item
label=
"数据库ID:"
>
<el-input
<el-input
v-model=
"sybchronizationForm.dbid"
placeholder=
"请输入数据库ID:"
clearable
/>
v-model=
"sybchronizationForm.dbid"
placeholder=
"请输入数据库ID:"
clearable
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"24"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"语言:"
prop=
"lang"
>
<el-form-item
label=
"语言:"
prop=
"lang"
>
<el-input
<el-input
v-model=
"sybchronizationForm.lang"
placeholder=
"请输入语言:"
clearable
/>
v-model=
"sybchronizationForm.lang"
placeholder=
"请输入语言:"
clearable
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"24"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"账号:"
prop=
"uid"
>
<el-form-item
label=
"账号:"
prop=
"uid"
>
<el-input
<el-input
v-model=
"sybchronizationForm.uid"
placeholder=
"请输入账号:"
clearable
/>
v-model=
"sybchronizationForm.uid"
placeholder=
"请输入账号:"
clearable
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"24"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"密码:"
prop=
"pwd"
>
<el-form-item
label=
"密码:"
prop=
"pwd"
>
<el-input
<el-input
v-model=
"sybchronizationForm.pwd"
type=
"password"
placeholder=
"请输入密码:"
clearable
show-password
/>
v-model=
"sybchronizationForm.pwd"
type=
"password"
placeholder=
"请输入密码:"
clearable
show-password
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"24"
>
<el-col
:span=
"24"
>
<el-form-item
style=
"margin-left: 20%"
>
<el-form-item
style=
"margin-left: 20%"
>
<el-button
<el-button
type=
"primary"
icon=
"Download"
@
click=
"handleSave(ruleFormRef)"
>
保存配置
</el-button>
type=
"primary"
icon=
"Download"
@
click=
"handleSave(ruleFormRef)"
>
保存配置
</el-button
>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -94,7 +53,7 @@ import {
...
@@ -94,7 +53,7 @@ import {
getSynchronization
,
getSynchronization
,
putSynchronization
,
putSynchronization
,
getStart
,
getStart
,
ge
tManual
,
pos
tManual
,
getOff
,
getOff
,
}
from
"@/services/api/systemApi/synchronization/synchronizationAPI"
;
}
from
"@/services/api/systemApi/synchronization/synchronizationAPI"
;
import
{
ref
,
reactive
,
onMounted
}
from
"vue"
;
import
{
ref
,
reactive
,
onMounted
}
from
"vue"
;
...
@@ -141,7 +100,7 @@ const handleClose = async () => {
...
@@ -141,7 +100,7 @@ const handleClose = async () => {
};
};
const
handleManual
=
async
()
=>
{
const
handleManual
=
async
()
=>
{
if
(
isDisabled
.
value
===
true
)
return
;
if
(
isDisabled
.
value
===
true
)
return
;
const
res
:
any
=
await
getManual
(
);
const
res
:
any
=
await
postManual
([]
);
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
isDisabled
.
value
=
!
isDisabled
.
value
;
isDisabled
.
value
=
!
isDisabled
.
value
;
return
ElMessage
({
type
:
"success"
,
message
:
"手动启动成功"
});
return
ElMessage
({
type
:
"success"
,
message
:
"手动启动成功"
});
...
...
src/views/system/tableRelation.vue
浏览文件 @
7ac3cb79
<
template
>
<
template
>
<el-card>
<el-card>
<div>
<div
style=
"margin-bottom: 20px"
>
<el-form-item>
<el-button
type=
"primary"
@
click=
"addToTableRelation"
style=
"margin-right: 20px"
>
添加
</el-button>
<el-button
type=
"primary"
@
click=
"addToTableRelation"
>
添加
</el-button>
<el-button
type=
"primary"
@
click=
"synchronization"
>
同步
</el-button>
</el-form-item>
</div>
</div>
<div>
<div>
<el-table
:data=
"tableRelationList"
style=
"width: 100%; margin-bottom: 20px"
row-key=
"id"
border
<el-table
:data=
"tableRelationList"
style=
"width: 100%; margin-bottom: 20px"
row-key=
"id"
border
v-loading=
"loading"
setScrollLeft=
"left"
>
v-loading=
"loading"
setScrollLeft=
"left"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
/>
<el-table-column
type=
"selection"
width=
"55"
/>
<el-table-column
prop=
"tableName"
label=
"表名称"
width=
"230"
sortable
/>
<el-table-column
prop=
"tableName"
label=
"表名称"
width=
"230"
sortable
/>
<el-table-column
prop=
"tableHeader"
label=
"表名"
align=
"center"
width=
"220"
/>
<el-table-column
prop=
"tableHeader"
label=
"表名"
align=
"center"
width=
"220"
/>
...
@@ -66,7 +65,7 @@
...
@@ -66,7 +65,7 @@
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
re
active
,
re
f
}
from
"vue"
;
import
{
ref
}
from
"vue"
;
import
{
ElMessageBox
,
FormInstance
,
ElMessage
}
from
"element-plus"
;
import
{
ElMessageBox
,
FormInstance
,
ElMessage
}
from
"element-plus"
;
import
{
import
{
getTableRelation
,
getTableRelation
,
...
@@ -74,6 +73,9 @@ import {
...
@@ -74,6 +73,9 @@ import {
editTableRelation
,
editTableRelation
,
deleteTableRelation
,
deleteTableRelation
,
}
from
"@/services/api/systemApi/tableRelation/tableRelationAPI"
;
}
from
"@/services/api/systemApi/tableRelation/tableRelationAPI"
;
import
{
postManual
,
}
from
"@/services/api/systemApi/synchronization/synchronizationAPI"
;
const
tableRelationRef
=
ref
<
FormInstance
>
();
const
tableRelationRef
=
ref
<
FormInstance
>
();
const
tableRelationList
=
ref
([]);
const
tableRelationList
=
ref
([]);
...
@@ -82,6 +84,8 @@ const currentPage = ref(1);
...
@@ -82,6 +84,8 @@ const currentPage = ref(1);
const
pageSizes
=
ref
(
10
);
const
pageSizes
=
ref
(
10
);
const
total
=
ref
(
0
);
const
total
=
ref
(
0
);
const
modifyId
=
ref
();
const
modifyId
=
ref
();
// 多选框
const
multipleSelection
=
ref
([]
as
any
);
const
tableRelationForm
=
ref
({
const
tableRelationForm
=
ref
({
children
:
[],
children
:
[],
tableName
:
""
,
tableName
:
""
,
...
@@ -109,6 +113,38 @@ const addToTableRelation = () => {
...
@@ -109,6 +113,38 @@ const addToTableRelation = () => {
dialogVisible
.
value
=
true
;
dialogVisible
.
value
=
true
;
};
};
const
handleSelectionChange
=
(
val
:
[])
=>
{
multipleSelection
.
value
=
val
;
console
.
log
(
multipleSelection
.
value
);
}
const
synchronization
=
()
=>
{
if
(
multipleSelection
.
value
.
length
!=
0
)
{
ElMessageBox
.
confirm
(
"请确认同步?"
,
"同步"
,
{
confirmButtonText
:
"确认"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
})
.
then
(()
=>
{
const
tableHeaderList
=
[]
for
(
const
s
in
multipleSelection
.
value
)
{
tableHeaderList
.
push
(
multipleSelection
.
value
[
s
].
tableHeader
)
}
postManual
(
tableHeaderList
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
200
)
{
multipleSelection
.
value
=
[]
ElMessage
({
type
:
"success"
,
message
:
"同步成功!"
,
});
}
})
})
}
}
const
handleSizeChange
=
(
val
:
number
)
=>
{
const
handleSizeChange
=
(
val
:
number
)
=>
{
if
(
val
===
pageSizes
.
value
)
val
=
currentPage
.
value
;
if
(
val
===
pageSizes
.
value
)
val
=
currentPage
.
value
;
init
(
val
,
pageSizes
.
value
);
init
(
val
,
pageSizes
.
value
);
...
...
src/views/system/xyunLog.vue
浏览文件 @
7ac3cb79
...
@@ -132,7 +132,7 @@ const indexMethod = (index: number) => {
...
@@ -132,7 +132,7 @@ const indexMethod = (index: number) => {
};
};
const
visible
=
ref
(
false
);
const
visible
=
ref
(
false
);
// 多选框
// 多选框
const
multipleSelection
=
ref
([]);
const
multipleSelection
=
ref
([]
as
any
);
// 分页
// 分页
const
disabled
=
ref
(
false
);
const
disabled
=
ref
(
false
);
const
filters
=
ref
();
const
filters
=
ref
();
...
@@ -188,7 +188,7 @@ const handleDetails = (scope: any) => {
...
@@ -188,7 +188,7 @@ const handleDetails = (scope: any) => {
// 批量同步
// 批量同步
const
hanleSynchronis
=
()
=>
{
const
hanleSynchronis
=
()
=>
{
if
(
multipleSelection
.
value
.
length
!==
0
)
{
if
(
multipleSelection
.
value
.
length
!==
0
)
{
ElMessageBox
.
confirm
(
"请确认
删除
?"
,
"删除"
,
{
ElMessageBox
.
confirm
(
"请确认
同步
?"
,
"删除"
,
{
confirmButtonText
:
"确认"
,
confirmButtonText
:
"确认"
,
cancelButtonText
:
"取消"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
type
:
"warning"
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论