Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
integrate-admin
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
刘旭
integrate-admin
Commits
6cf9943d
提交
6cf9943d
authored
11月 30, 2022
作者:
刘旭
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
完成平台产品
上级
48224ec1
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
265 行增加
和
275 行删除
+265
-275
index.ts
src/services/api/platformProducts/index.ts
+38
-2
addProduct.vue
src/views/manage/components/platformProducts/addProduct.vue
+4
-4
enable.vue
src/views/manage/components/platformProducts/enable.vue
+53
-0
previewProduct.vue
...ews/manage/components/platformProducts/previewProduct.vue
+0
-1
test.ts
src/views/manage/components/platformProducts/test.ts
+0
-199
platformProducts.vue
src/views/manage/platformProducts.vue
+163
-61
stso.vue
src/views/manage/stso.vue
+7
-8
没有找到文件。
src/services/api/platformProducts/index.ts
浏览文件 @
6cf9943d
...
@@ -57,4 +57,41 @@ export const checkCommon = (data: any) => {
...
@@ -57,4 +57,41 @@ export const checkCommon = (data: any) => {
method
:
'post'
,
method
:
'post'
,
data
data
})
})
}
}
\ No newline at end of file
export
const
getCommonParamData
=
(
code
:
any
)
=>
{
return
request
({
url
:
'/api/product/init/common/param/data'
,
method
:
'get'
,
params
:
{
code
}
})
}
// 启用
export
const
productEnable
=
(
data
:
any
)
=>
{
return
request
({
url
:
'/api/product/quartz/job/start'
,
method
:
'post'
,
data
})
}
// 停用
export
const
productDeactivate
=
(
code
:
any
)
=>
{
return
request
({
url
:
'/api/product/quartz/job/turn/off'
,
method
:
'post'
,
data
:
{
code
}
})
}
// 同步状态
export
const
productStatus
=
(
code
:
any
)
=>
{
return
request
({
url
:
'/api/product/quartz/job/data'
,
method
:
'get'
,
params
:
{
code
}
})
}
src/views/manage/components/platformProducts/addProduct.vue
浏览文件 @
6cf9943d
...
@@ -54,10 +54,6 @@ const beforeChange = (value: string) => {
...
@@ -54,10 +54,6 @@ const beforeChange = (value: string) => {
beforeCode
.
value
=
value
beforeCode
.
value
=
value
}
}
const
handleClose
=
()
=>
{
showDialog
.
value
=
false
}
const
onConfirm
=
()
=>
{
const
onConfirm
=
()
=>
{
if
(
type
.
value
===
'after'
)
{
if
(
type
.
value
===
'after'
)
{
if
(
!
afterCode
.
value
)
return
ElMessage
({
type
:
'warning'
,
message
:
'产品不能为空'
})
if
(
!
afterCode
.
value
)
return
ElMessage
({
type
:
'warning'
,
message
:
'产品不能为空'
})
...
@@ -72,6 +68,10 @@ const onConfirm = () => {
...
@@ -72,6 +68,10 @@ const onConfirm = () => {
}
}
}
}
const
handleClose
=
()
=>
{
showDialog
.
value
=
false
}
defineExpose
({
defineExpose
({
showDialog
,
showDialog
,
status
,
status
,
...
...
src/views/manage/components/platformProducts/enable.vue
0 → 100644
浏览文件 @
6cf9943d
<
template
>
<el-dialog
v-model=
"showDialog"
title=
"设置间隔时间"
width=
"20%"
:before-close=
"handleClose"
>
<el-form
:model=
"formData"
ref=
"formRef"
:rules=
"rules"
>
<el-form-item
label=
"间隔时间"
prop=
"cronExpression"
>
<el-input
v-model=
"formData.cronExpression"
placeholder=
"请输入间隔时间"
/>
</el-form-item>
</el-form>
<template
#
footer
>
<el-button
@
click=
"handleClose"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"onConfirm"
>
确定
</el-button>
</
template
>
</el-dialog>
</template>
<
script
setup
lang=
'ts'
>
import
{
ref
}
from
'vue'
const
showDialog
=
ref
(
false
)
const
formRef
=
ref
()
const
formData
=
ref
({
cronExpression
:
''
,
code
:
''
})
const
rules
=
ref
({
cronExpression
:
[{
required
:
true
,
message
:
"间隔时间不为空"
,
trigger
:
"blur"
}]
})
const
emits
=
defineEmits
([
'cornData'
])
const
onConfirm
=
()
=>
{
formRef
.
value
?.
validate
((
valid
:
boolean
)
=>
{
if
(
valid
)
{
emits
(
'cornData'
,
formData
.
value
)
showDialog
.
value
=
false
}
else
{
console
.
log
(
'检验失败'
);
}
})
}
const
handleClose
=
()
=>
{
showDialog
.
value
=
false
}
defineExpose
({
showDialog
,
formData
})
</
script
>
<
style
lang =
"scss"
scoped
>
</
style
>
\ No newline at end of file
src/views/manage/components/platformProducts/previewProduct.vue
浏览文件 @
6cf9943d
...
@@ -45,7 +45,6 @@ const check = () => {
...
@@ -45,7 +45,6 @@ const check = () => {
})
})
}
}
defineExpose
({
defineExpose
({
previewVisible
,
previewVisible
,
widgetForm
,
widgetForm
,
...
...
src/views/manage/components/platformProducts/test.ts
deleted
100644 → 0
浏览文件 @
48224ec1
export
const
data
=
{
"code"
:
200
,
"data"
:
{
"list"
:
[
{
"options"
:
{
"clearable"
:
false
,
"readonly"
:
false
,
"maxlength"
:
null
,
"defaultValue"
:
"http://192.168.0.49/k3cloud/"
,
"prefix"
:
""
,
"width"
:
"100%"
,
"prepend"
:
""
,
"disabled"
:
false
,
"rules"
:
{
"pattern"
:
""
,
"trigger"
:
"blur"
,
"message"
:
""
,
"type"
:
"any"
,
"enum"
:
""
,
"required"
:
true
},
"placeholder"
:
""
,
"suffix"
:
""
,
"append"
:
""
},
"model"
:
"k3_cloud_url"
,
"rules"
:
[],
"label"
:
"金蝶地址"
,
"dbFieldComment"
:
"金蝶地址"
,
"type"
:
"input"
,
"dbFieldName"
:
"k3_cloud_url"
,
"key"
:
"e814fa940a76497986a1c44be74707d0"
},
{
"options"
:
{
"clearable"
:
false
,
"readonly"
:
false
,
"maxlength"
:
null
,
"defaultValue"
:
"635755e0765c2e"
,
"prefix"
:
""
,
"width"
:
"100%"
,
"prepend"
:
""
,
"disabled"
:
false
,
"rules"
:
{
"pattern"
:
""
,
"trigger"
:
"blur"
,
"message"
:
""
,
"type"
:
"any"
,
"enum"
:
""
,
"required"
:
true
},
"placeholder"
:
""
,
"suffix"
:
""
,
"append"
:
""
},
"model"
:
"dbid"
,
"rules"
:
[],
"label"
:
"金蝶账套"
,
"dbFieldComment"
:
"金蝶账套"
,
"type"
:
"input"
,
"dbFieldName"
:
"dbid"
,
"key"
:
"74ce381b56a14fa98df0edcc247cfc5b"
},
{
"options"
:
{
"clearable"
:
false
,
"readonly"
:
false
,
"maxlength"
:
null
,
"defaultValue"
:
"admin"
,
"prefix"
:
""
,
"width"
:
"100%"
,
"prepend"
:
""
,
"disabled"
:
false
,
"rules"
:
{
"pattern"
:
""
,
"trigger"
:
"blur"
,
"message"
:
""
,
"type"
:
"any"
,
"enum"
:
""
,
"required"
:
false
},
"placeholder"
:
""
,
"suffix"
:
""
,
"append"
:
""
},
"model"
:
"uid"
,
"rules"
:
[],
"label"
:
"用户名"
,
"dbFieldComment"
:
"用户名"
,
"type"
:
"input"
,
"dbFieldName"
:
"uid"
,
"key"
:
"8389d01a315f4965bde5016dbd822d71"
},
{
"options"
:
{
"clearable"
:
false
,
"readonly"
:
false
,
"maxlength"
:
null
,
"defaultValue"
:
"kingdee$2022"
,
"prefix"
:
""
,
"width"
:
"100%"
,
"prepend"
:
""
,
"disabled"
:
false
,
"rules"
:
{
"pattern"
:
""
,
"trigger"
:
"blur"
,
"message"
:
""
,
"type"
:
"any"
,
"enum"
:
""
,
"required"
:
false
},
"placeholder"
:
""
,
"suffix"
:
""
,
"append"
:
""
},
"model"
:
"pwd"
,
"rules"
:
[],
"label"
:
"密码"
,
"dbFieldComment"
:
"密码"
,
"type"
:
"input"
,
"dbFieldName"
:
"pwd"
,
"key"
:
"afe9c315d0e84e8398b80d44f7525f83"
},
{
"options"
:
{
"clearable"
:
false
,
"readonly"
:
false
,
"maxlength"
:
null
,
"defaultValue"
:
"2052"
,
"prefix"
:
""
,
"width"
:
"100%"
,
"prepend"
:
""
,
"disabled"
:
false
,
"rules"
:
{
"pattern"
:
""
,
"trigger"
:
"blur"
,
"message"
:
""
,
"type"
:
"any"
,
"enum"
:
""
,
"required"
:
false
},
"placeholder"
:
""
,
"suffix"
:
""
,
"append"
:
""
},
"model"
:
"lang"
,
"rules"
:
[],
"label"
:
"端口"
,
"dbFieldComment"
:
"端口"
,
"type"
:
"input"
,
"dbFieldName"
:
"lang"
,
"key"
:
"9b4cac0704274b2691b8d4c9a7b86a15"
},
{
"options"
:
{
"clearable"
:
false
,
"readonly"
:
false
,
"maxlength"
:
null
,
"defaultValue"
:
"1"
,
"prefix"
:
""
,
"width"
:
"100%"
,
"prepend"
:
""
,
"disabled"
:
false
,
"rules"
:
{
"pattern"
:
""
,
"trigger"
:
"blur"
,
"message"
:
""
,
"type"
:
"any"
,
"enum"
:
""
,
"required"
:
false
},
"placeholder"
:
""
,
"suffix"
:
""
,
"append"
:
""
},
"model"
:
"duration"
,
"rules"
:
[],
"label"
:
"时长/分钟"
,
"dbFieldComment"
:
"时长/分钟"
,
"type"
:
"input"
,
"dbFieldName"
:
"duration"
,
"key"
:
"c120ff5d7b5941adbaa8d891ae766fb0"
}
],
"config"
:
{
"dbTableName"
:
"tb_kingdee_init_connect_param"
,
"formId"
:
"kingdee"
,
"dbTableComment"
:
"金蝶配置表"
,
"size"
:
"default"
,
"labelPosition"
:
"right"
,
"labelWidth"
:
100
,
"hideRequiredAsterisk"
:
false
}
},
"message"
:
""
,
"success"
:
true
}
\ No newline at end of file
src/views/manage/platformProducts.vue
浏览文件 @
6cf9943d
<
template
>
<
template
>
<el-button
type=
"primary"
icon=
"plus"
@
click=
"addProductShow"
style=
"margin: 20px 0 0 20px
;
"
>
新增
</el-button>
<el-button
type=
"primary"
icon=
"plus"
@
click=
"addProductShow"
style=
"margin: 20px 0 0 20px"
>
新增
</el-button>
<div
class=
'container'
>
<div
class=
"container"
>
<el-row
justify=
"start"
style=
"width: 100%; height: 100%
;
"
>
<el-row
justify=
"start"
style=
"width: 100%; height: 100%"
>
<el-col
:span=
"12"
style=
"padding-right: 20px
;
"
>
<el-col
:span=
"12"
style=
"padding-right: 20px"
>
<el-table
:data=
"productData"
border
>
<el-table
:data=
"productData"
border
>
<el-table-column
label=
"产品1"
prop=
"productBeforeCodeName"
align=
"center"
/>
<el-table-column
label=
"产品1"
prop=
"productBeforeCodeName"
align=
"center"
/>
<el-table-column
label=
"产品2"
prop=
"productAfterCodeName"
align=
"center"
/>
<el-table-column
label=
"产品2"
prop=
"productAfterCodeName"
align=
"center"
/>
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
width=
"
1
55"
>
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
width=
"
2
55"
>
<template
#
default=
"scope"
>
<template
#
default=
"scope"
>
<el-button
type=
"primary"
link
size=
"small"
@
click=
"selectScene(scope.row.id)"
>
选择场景
<div
style=
"display: flex; justify-content: center;"
>
</el-button>
<el-dropdown
@
command=
"handleCommand"
>
<el-divider
direction=
"vertical"
/>
<span
<el-button
type=
"danger"
link
size=
"small"
@
click=
"delProduct(scope.row.id)"
>
删除
</el-button>
style=
"cursor: pointer;color: var(--el-color-primary);display: flex;align-items: center;font-size: 12px;"
>
同步
<el-icon>
<arrow-down
/>
</el-icon>
</span>
<template
#
dropdown
>
<el-dropdown-menu>
<el-dropdown-item
:command=
"
{ flag: 'enable', code: scope.row.productBeforeCode }">启用
</el-dropdown-item>
<el-dropdown-item
:command=
"
{ flag: 'deactivate', code: scope.row.productBeforeCode }">停用
</el-dropdown-item>
</el-dropdown-menu>
</
template
>
</el-dropdown>
<el-divider
direction=
"vertical"
/>
<el-button
type=
"primary"
link
size=
"small"
@
click=
"selectScene(scope.row.id)"
>
选择场景
</el-button>
<el-divider
direction=
"vertical"
/>
<el-button
type=
"primary"
link
size=
"small"
@
click=
"editProduct(scope.row)"
>
编辑
</el-button>
<el-divider
direction=
"vertical"
/>
<el-button
type=
"danger"
link
size=
"small"
@
click=
"delProduct(scope.row.id)"
>
删除
</el-button>
</div>
</template>
</template>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -20,32 +46,38 @@
...
@@ -20,32 +46,38 @@
</div>
</div>
<el-dialog
v-model=
"showAddDialog"
title=
"选择产品"
width=
"50%"
:beforeClose=
"handleClose"
>
<el-dialog
v-model=
"showAddDialog"
title=
"选择产品"
width=
"50%"
:beforeClose=
"handleClose"
>
<el-row
justify=
"start"
style=
"padding: 0 10%;"
>
<el-row
justify=
"start"
style=
"padding: 0 10%"
>
<el-col
:span=
"6"
style=
"text-align:center"
>
<el-col
:span=
"6"
style=
"text-align: center"
>
<el-button
type=
"primary"
circle
style=
"width: 100px; height: 100px;"
@
click=
"selectBeforeProducts"
>
<el-button
type=
"primary"
:disabled=
"disabled"
circle
style=
"width: 100px; height: 100px"
@
click=
"selectBeforeProducts"
>
{{ beforeTitle }}
</el-button>
{{ beforeTitle }}
</el-button>
</el-col>
</el-col>
<el-col
:span=
"12"
style=
"display: flex; align-items: center; justify-content: center; text-align: center;"
>
<el-col
:span=
"12"
style=
"
display: flex;
align-items: center;
justify-content: center;
text-align: center;
"
>
<div
class=
"line-arrow"
>
<div
class=
"line-arrow"
>
<div
class=
"line"
></div>
<div
class=
"line"
></div>
</div>
</div>
</el-col>
</el-col>
<el-col
:span=
"6"
style=
"text-align:center"
>
<el-col
:span=
"6"
style=
"text-align: center"
>
<el-button
type=
"primary"
circle
style=
"width: 100px; height: 100px;"
@
click=
"selectAfterProducts"
>
<el-button
type=
"primary"
:disabled=
"disabled"
circle
style=
"width: 100px; height: 100px"
@
click=
"selectAfterProducts"
>
{{ afterTitle }}
</el-button>
{{ afterTitle }}
</el-button>
</el-col>
</el-col>
<el-col
:span=
"11"
style=
"margin-top: 20px
;
"
>
<el-col
:span=
"11"
style=
"margin-top: 20px"
>
<preview
P
roduct
ref=
"previewProductBeforeRef"
:code=
"productBeforeCode"
@
codeData=
"codeData"
/>
<preview
-p
roduct
ref=
"previewProductBeforeRef"
:code=
"productBeforeCode"
@
codeData=
"codeData"
/>
</el-col>
</el-col>
<el-col
:span=
"2"
>
<el-col
:span=
"2"
>
</el-col>
<el-col
:span=
"11"
style=
"margin-top: 20px"
>
<preview-product
ref=
"previewProductAfterRef"
:code=
"productAfterCode"
@
codeData=
"codeData"
/>
</el-col>
</el-col>
<el-col
:span=
"11"
style=
"margin-top: 20px;"
>
<el-col
:span=
"24"
style=
"text-align: center"
>
<previewProduct
ref=
"previewProductAfterRef"
:code=
"productAfterCode"
@
codeData=
"codeData"
/>
<el-button
type=
"primary"
@
click=
"onConfirm"
style=
"width: 88px; margin-top: 20%"
>
保存产品
</el-col>
<el-col
:span=
"24"
style=
"text-align: center;"
>
<el-button
type=
"primary"
@
click=
"onConfirm"
style=
"width: 88px; margin-top: 20%;"
>
保存产品
</el-button>
</el-button>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -54,18 +86,29 @@
...
@@ -54,18 +86,29 @@
<add-product
ref=
"addProductRef"
:options=
"options"
:productAfterCode=
"productAfterCode"
<add-product
ref=
"addProductRef"
:options=
"options"
:productAfterCode=
"productAfterCode"
:productBeforeCode=
"productBeforeCode"
@
codeChange=
"codeChange"
/>
:productBeforeCode=
"productBeforeCode"
@
codeChange=
"codeChange"
/>
<enable-vue
ref=
"enableRef"
@
cornData=
"cornData"
/>
</template>
</template>
<
script
setup
lang=
'ts'
>
<
script
setup
lang=
"ts"
>
import
{
ref
,
computed
}
from
'vue'
import
{
ref
,
computed
,
nextTick
}
from
'vue'
import
{
getPlatformProductList
,
createPlatformProduct
,
deletePlatformProduct
,
getDictItemList
,
getCommonParam
,
postCommonParam
}
from
'@/services/api/platformProducts'
import
{
import
{
ElMessage
,
ElMessageBox
}
from
'element-plus'
;
getPlatformProductList
,
import
{
useRouter
}
from
'vue-router'
;
createPlatformProduct
,
import
addProduct
from
'./components/platformProducts/addProduct.vue'
;
deletePlatformProduct
,
import
previewProduct
from
'./components/platformProducts/previewProduct.vue'
;
getDictItemList
,
getCommonParam
,
postCommonParam
,
productEnable
,
productDeactivate
,
productStatus
}
from
'@/services/api/platformProducts'
import
{
ElMessage
,
ElMessageBox
}
from
'element-plus'
import
{
useRouter
}
from
'vue-router'
import
addProduct
from
'./components/platformProducts/addProduct.vue'
import
previewProduct
from
'./components/platformProducts/previewProduct.vue'
import
enableVue
from
'./components/platformProducts/enable.vue'
const
router
=
useRouter
()
;
const
router
=
useRouter
()
const
options
=
ref
([]
as
any
)
// select 数据源
const
options
=
ref
([]
as
any
)
// select 数据源
const
showAddDialog
=
ref
(
false
)
const
showAddDialog
=
ref
(
false
)
const
productAfterCode
=
ref
()
// 第一个选择产品
const
productAfterCode
=
ref
()
// 第一个选择产品
...
@@ -76,6 +119,8 @@ const productBeforeData = ref()
...
@@ -76,6 +119,8 @@ const productBeforeData = ref()
const
addProductRef
=
ref
()
const
addProductRef
=
ref
()
const
previewProductAfterRef
=
ref
()
const
previewProductAfterRef
=
ref
()
const
previewProductBeforeRef
=
ref
()
const
previewProductBeforeRef
=
ref
()
const
enableRef
=
ref
()
const
disabled
=
ref
(
false
)
// 选择产品是否禁用
const
afterTitle
=
computed
(()
=>
{
const
afterTitle
=
computed
(()
=>
{
if
(
productAfterCode
.
value
)
{
if
(
productAfterCode
.
value
)
{
...
@@ -84,8 +129,7 @@ const afterTitle = computed(() => {
...
@@ -84,8 +129,7 @@ const afterTitle = computed(() => {
if
(
productAfterCode
.
value
===
item
.
code
)
title
=
item
.
title
if
(
productAfterCode
.
value
===
item
.
code
)
title
=
item
.
title
})
})
return
title
return
title
}
}
else
return
'选择产品'
else
return
'选择产品'
})
})
const
beforeTitle
=
computed
(()
=>
{
const
beforeTitle
=
computed
(()
=>
{
...
@@ -95,12 +139,12 @@ const beforeTitle = computed(() => {
...
@@ -95,12 +139,12 @@ const beforeTitle = computed(() => {
if
(
productBeforeCode
.
value
===
item
.
code
)
title
=
item
.
title
if
(
productBeforeCode
.
value
===
item
.
code
)
title
=
item
.
title
})
})
return
title
return
title
}
}
else
return
'选择产品'
else
return
'选择产品'
})
})
// 添加产品
// 添加产品
let
addProductShow
=
()
=>
{
let
addProductShow
=
()
=>
{
disabled
.
value
=
false
showAddDialog
.
value
=
true
showAddDialog
.
value
=
true
}
}
...
@@ -111,7 +155,7 @@ const selectAfterProducts = () => {
...
@@ -111,7 +155,7 @@ const selectAfterProducts = () => {
addProductRef
.
value
.
showDialog
=
true
addProductRef
.
value
.
showDialog
=
true
}
}
// 选择
前
产品
// 选择
后
产品
const
selectBeforeProducts
=
()
=>
{
const
selectBeforeProducts
=
()
=>
{
addProductRef
.
value
.
status
=
true
addProductRef
.
value
.
status
=
true
addProductRef
.
value
.
type
=
'before'
addProductRef
.
value
.
type
=
'before'
...
@@ -119,6 +163,10 @@ const selectBeforeProducts = () => {
...
@@ -119,6 +163,10 @@ const selectBeforeProducts = () => {
}
}
const
codeChange
=
(
code
:
string
,
value
:
string
)
=>
{
const
codeChange
=
(
code
:
string
,
value
:
string
)
=>
{
getParam
(
code
,
value
)
}
const
getParam
=
(
code
:
string
,
value
:
string
)
=>
{
if
(
code
===
'after'
)
{
if
(
code
===
'after'
)
{
getCommonParam
(
value
).
then
((
res
:
any
)
=>
{
getCommonParam
(
value
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
...
@@ -127,8 +175,7 @@ const codeChange = (code: string, value: string) => {
...
@@ -127,8 +175,7 @@ const codeChange = (code: string, value: string) => {
productAfterCode
.
value
=
value
productAfterCode
.
value
=
value
}
}
})
})
}
}
else
{
else
{
getCommonParam
(
value
).
then
((
res
:
any
)
=>
{
getCommonParam
(
value
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
previewProductBeforeRef
.
value
.
widgetForm
=
res
.
data
previewProductBeforeRef
.
value
.
widgetForm
=
res
.
data
...
@@ -139,30 +186,85 @@ const codeChange = (code: string, value: string) => {
...
@@ -139,30 +186,85 @@ const codeChange = (code: string, value: string) => {
}
}
}
}
// 获取间隔时间
const
cornData
=
(
data
:
string
)
=>
{
productEnable
(
data
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
200
)
{
ElMessage
({
type
:
'success'
,
message
:
'启动成功'
})
}
})
}
// 获取保存数据
// 获取保存数据
const
codeData
=
(
code
:
string
,
data
:
any
)
=>
{
const
codeData
=
(
code
:
string
,
data
:
any
)
=>
{
console
.
log
(
code
,
data
,
productBeforeCode
.
value
,
productAfterCode
.
value
,
'data'
);
console
.
log
(
code
,
data
,
productBeforeCode
.
value
,
productAfterCode
.
value
,
'data'
)
if
(
code
===
productBeforeCode
.
value
)
productBeforeData
.
value
=
data
if
(
code
===
productBeforeCode
.
value
)
productBeforeData
.
value
=
data
else
productAfterData
.
value
=
data
else
productAfterData
.
value
=
data
}
}
const
handleCommand
=
(
data
:
any
)
=>
{
switch
(
data
.
flag
)
{
// 启用同步
case
"enable"
:
enableRef
.
value
.
showDialog
=
true
enableRef
.
value
.
formData
.
cronExpression
=
''
enableRef
.
value
.
formData
.
code
=
data
.
code
break
;
// 停用同步
case
"deactivate"
:
ElMessageBox
.
confirm
(
'确认停用?'
,
'提示'
,
{
confirmButtonText
:
'确认'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
}).
then
(()
=>
{
productDeactivate
(
data
.
code
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
200
)
{
ElMessage
({
type
:
'success'
,
message
:
'停用成功'
})
}
})
}).
catch
(()
=>
{
return
})
break
default
:
break
;
}
}
// 选择场景
// 选择场景
const
selectScene
=
(
id
:
string
)
=>
{
const
selectScene
=
(
id
:
string
)
=>
{
sessionStorage
.
setItem
(
'platformProductRelationId'
,
id
)
sessionStorage
.
setItem
(
'platformProductRelationId'
,
id
)
router
.
push
({
path
:
'/manage/fieldConfiguration'
});
//调用router.push()
router
.
push
({
path
:
'/manage/fieldConfiguration'
})
//调用router.push()
}
// 编辑产品
const
editProduct
=
(
row
:
any
)
=>
{
showAddDialog
.
value
=
true
disabled
.
value
=
true
productAfterCode
.
value
=
row
.
productAfterCode
productBeforeCode
.
value
=
row
.
productBeforeCode
nextTick
(()
=>
{
previewProductBeforeRef
.
value
.
previewVisible
=
true
previewProductAfterRef
.
value
.
previewVisible
=
true
getParam
(
'after'
,
row
.
productAfterCode
)
getParam
(
'before'
,
row
.
productBeforeCode
)
});
}
}
// 删除产品
// 删除产品
const
delProduct
=
(
id
:
number
)
=>
{
const
delProduct
=
(
id
:
number
)
=>
{
ElMessageBox
.
confirm
(
ElMessageBox
.
confirm
(
'确认删除?'
,
'提示'
,
{
'确认删除?'
,
confirmButtonText
:
'确认'
,
'提示'
,
cancelButtonText
:
'取消'
,
{
type
:
'warning'
,
confirmButtonText
:
'确认'
,
})
cancelButtonText
:
'取消'
,
type
:
'warning'
,
}
)
.
then
(()
=>
{
.
then
(()
=>
{
deletePlatformProduct
({
id
}).
then
((
res
:
any
)
=>
{
deletePlatformProduct
({
id
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
...
@@ -173,16 +275,18 @@ const delProduct = (id: number) => {
...
@@ -173,16 +275,18 @@ const delProduct = (id: number) => {
})
})
}
}
})
})
})
})
.
catch
(()
=>
{
return
})
.
catch
(()
=>
{
return
})
}
}
const
onConfirm
=
()
=>
{
const
onConfirm
=
()
=>
{
if
(
!
productAfterCode
.
value
&&
!
productAfterCode
.
value
)
return
ElMessage
({
type
:
'warning'
,
message
:
'产品不能为空'
})
if
(
!
productAfterCode
.
value
&&
!
productAfterCode
.
value
)
return
ElMessage
({
type
:
'warning'
,
message
:
'产品不能为空'
})
let
data
=
{
let
data
=
{
productAfterCode
:
productAfterCode
.
value
,
productAfterCode
:
productAfterCode
.
value
,
productBeforeCode
:
productBeforeCode
.
value
productBeforeCode
:
productBeforeCode
.
value
,
}
}
previewProductAfterRef
.
value
.
handleGetData
()
previewProductAfterRef
.
value
.
handleGetData
()
previewProductBeforeRef
.
value
.
handleGetData
()
previewProductBeforeRef
.
value
.
handleGetData
()
...
@@ -198,13 +302,13 @@ const onConfirm = () => {
...
@@ -198,13 +302,13 @@ const onConfirm = () => {
ElMessage
({
type
:
'success'
,
message
:
'保存成功'
})
ElMessage
({
type
:
'success'
,
message
:
'保存成功'
})
}
}
})
})
},
1000
)
;
},
1000
)
}
}
const
saveCommonParam
=
(
code
:
string
,
data
:
any
)
=>
{
const
saveCommonParam
=
(
code
:
string
,
data
:
any
)
=>
{
postCommonParam
({
code
,
data
}).
then
((
res
:
any
)
=>
{
postCommonParam
({
code
,
data
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
console
.
log
(
res
)
;
console
.
log
(
res
)
}
}
})
})
}
}
...
@@ -240,8 +344,8 @@ const handleClose = () => {
...
@@ -240,8 +344,8 @@ const handleClose = () => {
showAddDialog
.
value
=
false
showAddDialog
.
value
=
false
}
}
</
script
>
</
script
>
<
style
lang
=
"scss"
scoped
>
<
style
lang
=
"scss"
scoped
>
.container
{
.container
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
display
:
flex
;
display
:
flex
;
...
@@ -268,6 +372,5 @@ const handleClose = () => {
...
@@ -268,6 +372,5 @@ const handleClose = () => {
border-bottom
:
10px
solid
transparent
;
border-bottom
:
10px
solid
transparent
;
border-left
:
10px
solid
#dcdfe6
;
border-left
:
10px
solid
#dcdfe6
;
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
src/views/manage/stso.vue
浏览文件 @
6cf9943d
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
import
{
ref
}
from
'vue'
import
{
ref
}
from
'vue'
import
{
ElMessageBox
,
ElMessage
}
from
'element-plus'
import
{
ElMessageBox
,
ElMessage
}
from
'element-plus'
import
{
getStsoList
,
createStso
,
updateStso
,
deleteStso
}
from
'@/services/api/stso'
import
{
getStsoList
,
createStso
,
updateStso
,
deleteStso
}
from
'@/services/api/stso'
import
{
getPlatformProductList
,
getCommonParam
}
from
'@/services/api/platformProducts'
import
{
getPlatformProductList
,
getCommonParam
Data
}
from
'@/services/api/platformProducts'
import
{
getCommonConfig
}
from
'@/services/api/systemApi/fieldConfiguration/commonConfig'
import
{
getCommonConfig
}
from
'@/services/api/systemApi/fieldConfiguration/commonConfig'
// 查询参数
// 查询参数
...
@@ -90,13 +90,12 @@ const editStso = (row: any) => {
...
@@ -90,13 +90,12 @@ const editStso = (row: any) => {
const
selectChange
=
(
value
:
string
)
=>
{
const
selectChange
=
(
value
:
string
)
=>
{
if
(
value
)
{
if
(
value
)
{
// getCommonParam(value).then((res: any) => {
getCommonParamData
(
value
).
then
((
res
:
any
)
=>
{
// if (res.code === 200) {
if
(
res
.
code
===
200
)
{
// console.log(res.data);
console
.
log
(
res
.
data
);
// formData.value.receiveAddress = res.data
// // formData.value.receiveAddress = res.data
}
// }
})
// })
}
}
}
}
// 添加
// 添加
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论