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
48224ec1
提交
48224ec1
authored
11月 29, 2022
作者:
刘旭
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
页面补全
上级
49315233
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
196 行增加
和
74 行删除
+196
-74
index.ts
src/services/api/platformProducts/index.ts
+26
-0
addProduct.vue
src/views/manage/components/platformProducts/addProduct.vue
+37
-10
previewProduct.vue
...ews/manage/components/platformProducts/previewProduct.vue
+24
-20
platformProducts.vue
src/views/manage/platformProducts.vue
+69
-35
stso.vue
src/views/manage/stso.vue
+40
-9
没有找到文件。
src/services/api/platformProducts/index.ts
浏览文件 @
48224ec1
...
@@ -32,4 +32,29 @@ export const deletePlatformProduct = (params: any) => {
...
@@ -32,4 +32,29 @@ export const deletePlatformProduct = (params: any) => {
method
:
'delete'
,
method
:
'delete'
,
params
params
})
})
}
export
const
getCommonParam
=
(
code
:
string
)
=>
{
return
request
({
url
:
'/api/product/init/common/param'
,
method
:
'get'
,
params
:
{
code
}
})
}
export
const
postCommonParam
=
(
data
:
any
)
=>
{
return
request
({
url
:
'/api/product/init/common/param/create'
,
method
:
'post'
,
data
})
}
// 校验
export
const
checkCommon
=
(
data
:
any
)
=>
{
return
request
({
url
:
'/api/product/init/common/param/check'
,
method
:
'post'
,
data
})
}
}
\ No newline at end of file
src/views/manage/components/platformProducts/addProduct.vue
浏览文件 @
48224ec1
<
template
>
<
template
>
<el-dialog
v-model=
"showDialog"
title=
"选择产品"
width=
"30%"
>
<el-dialog
v-model=
"showDialog"
title=
"选择产品"
width=
"30%"
:before-close=
"handleClose"
>
<div
class=
"select"
>
<div
class=
"select"
>
<el-select
v-if=
"status"
v-model=
"product
AfterCode"
@
change=
"after
Change"
>
<el-select
v-if=
"status"
v-model=
"product
BeforeCode"
@
change=
"before
Change"
>
<el-option
v-for=
"item in options"
:key=
"item.id"
:label=
"item.title"
:value=
"item.code"
/>
<el-option
v-for=
"item in options"
:key=
"item.id"
:label=
"item.title"
:value=
"item.code"
/>
</el-select>
</el-select>
<el-select
v-else
v-model=
"productBeforeCode"
@
change=
"beforeChange"
>
<el-select
v-else
v-model=
"productAfterCode"
@
change=
"afterChange"
>
<el-option
v-for=
"item in options"
:key=
"item.id"
:label=
"item.title"
:value=
"item.code"
/>
<el-option
v-for=
"item in options"
:key=
"item.id"
:label=
"item.title"
:value=
"item.code"
/>
</el-select>
</el-select>
</div>
</div>
<template
#
footer
>
<template
#
footer
>
<el-button
type=
"primary"
@
click=
"
showDialog = false
"
>
确定
</el-button>
<el-button
type=
"primary"
@
click=
"
onConfirm
"
>
确定
</el-button>
</
template
>
</
template
>
</el-dialog>
</el-dialog>
</template>
</template>
<
script
setup
lang=
'ts'
>
<
script
setup
lang=
'ts'
>
import
{
ref
}
from
'vue'
import
{
ref
}
from
'vue'
import
{
ElMessage
}
from
'element-plus'
const
props
=
defineProps
({
const
props
=
defineProps
({
// 第
一
个选择产品
// 第
二
个选择产品
productAfterCode
:
{
productAfterCode
:
{
type
:
String
,
type
:
String
,
default
:
''
default
:
''
},
},
// 第
二
个选择产品
// 第
一
个选择产品
productBeforeCode
:
{
productBeforeCode
:
{
type
:
String
,
type
:
String
,
default
:
''
default
:
''
...
@@ -36,19 +39,43 @@ const props = defineProps({
...
@@ -36,19 +39,43 @@ const props = defineProps({
})
})
const
showDialog
=
ref
(
false
)
const
showDialog
=
ref
(
false
)
const
status
=
ref
(
true
)
// 判断是哪个选择产品
const
status
=
ref
(
true
)
// 判断是哪个选择产品
const
type
=
ref
()
const
beforeCode
=
ref
()
const
afterCode
=
ref
()
const
emits
=
defineEmits
([
'codeChange'
])
const
emits
=
defineEmits
([
'codeChange'
,
'initCode'
])
const
afterChange
=
(
value
:
string
)
=>
{
const
afterChange
=
(
value
:
string
)
=>
{
if
(
value
)
emits
(
'codeChange'
,
'after'
,
value
)
type
.
value
=
'after'
afterCode
.
value
=
value
}
}
const
beforeChange
=
(
value
:
string
)
=>
{
const
beforeChange
=
(
value
:
string
)
=>
{
if
(
value
)
emits
(
'codeChange'
,
'before'
,
value
)
type
.
value
=
'before'
beforeCode
.
value
=
value
}
const
handleClose
=
()
=>
{
showDialog
.
value
=
false
}
const
onConfirm
=
()
=>
{
if
(
type
.
value
===
'after'
)
{
if
(
!
afterCode
.
value
)
return
ElMessage
({
type
:
'warning'
,
message
:
'产品不能为空'
})
if
(
afterCode
.
value
===
beforeCode
.
value
)
return
ElMessage
({
type
:
'warning'
,
message
:
'不能选择相同产品'
})
emits
(
'codeChange'
,
'after'
,
afterCode
.
value
)
showDialog
.
value
=
false
}
else
if
(
type
.
value
===
'before'
)
{
if
(
!
beforeCode
.
value
)
return
ElMessage
({
type
:
'warning'
,
message
:
'产品不能为空'
})
if
(
afterCode
.
value
===
beforeCode
.
value
)
return
ElMessage
({
type
:
'warning'
,
message
:
'不能选择相同产品'
})
emits
(
'codeChange'
,
'before'
,
beforeCode
.
value
)
showDialog
.
value
=
false
}
}
}
defineExpose
({
defineExpose
({
showDialog
,
showDialog
,
status
status
,
type
})
})
</
script
>
</
script
>
...
...
src/views/manage/components/platformProducts/previewProduct.vue
浏览文件 @
48224ec1
<
template
>
<
template
>
<!--
<el-dialog
v-model=
"previewVisible"
title=
"预览"
:width=
"800"
>
-->
<div
style=
"margin-bottom: 20px;"
>
<el-button
type=
"primary"
@
click=
"check"
v-if=
"previewVisible"
>
校验
</el-button>
<el-button
type=
"primary"
@
click=
"check"
v-if=
"previewVisible"
>
校验
</el-button>
<el-button
type=
"primary"
@
click=
"handleGetData"
v-if=
"previewVisible"
>
获取数据
</el-button>
</div>
<ElGenerateForm
ref=
"generateFormRef"
v-if=
"previewVisible"
:data=
"widgetForm"
/>
<ElGenerateForm
ref=
"generateFormRef"
v-if=
"previewVisible"
:data=
"widgetForm"
/>
<!--
<template
#
footer
>
<el-button
@
click=
"handleReset"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"handleGetData"
>
获取数据
</el-button>
</
template
>
-->
<!-- </el-dialog> -->
</
template
>
</
template
>
<
script
setup
lang=
'ts'
>
<
script
setup
lang=
'ts'
>
import
{
ref
}
from
'vue'
import
{
ref
}
from
'vue'
import
{
checkCommon
}
from
'@/services/api/platformProducts'
import
ElGenerateForm
from
'../../../../vueFormCreate/core/element/ElGenerateForm.vue'
import
ElGenerateForm
from
'../../../../vueFormCreate/core/element/ElGenerateForm.vue'
import
{
data
}
from
'./test'
import
{
ElMessage
}
from
'element-plus'
;
const
previewVisible
=
ref
(
false
)
const
previewVisible
=
ref
(
false
)
const
widgetForm
=
data
.
data
const
widgetForm
=
ref
()
const
generateFormRef
=
ref
()
const
generateFormRef
=
ref
()
const
dataJsonTemplate
=
ref
({
const
dataJsonTemplate
=
ref
({
data
:
''
data
:
''
})
})
const
handleReset
=
()
=>
generateFormRef
.
value
.
reset
()
const
props
=
defineProps
({
code
:
{
type
:
String
,
default
:
''
}
})
const
emits
=
defineEmits
([
'codeData'
])
// 获取数据
// 获取数据
const
handleGetData
=
()
=>
{
const
handleGetData
=
()
=>
{
generateFormRef
.
value
.
getData
().
then
((
res
:
any
)
=>
{
generateFormRef
.
value
.
getData
().
then
((
res
:
any
)
=>
{
dataJsonTemplate
.
value
.
data
=
res
dataJsonTemplate
.
value
.
data
=
res
console
.
log
(
dataJsonTemplate
.
value
,
'dataJsonTemplate.value'
);
emits
(
'codeData'
,
props
.
code
,
res
)
})
})
}
}
const
handleCopyClick
=
(
text
:
string
)
=>
{
// copy(text)
}
const
check
=
()
=>
{
const
check
=
()
=>
{
generateFormRef
.
value
.
getData
().
then
((
res
:
any
)
=>
{
generateFormRef
.
value
.
getData
().
then
((
res
:
any
)
=>
{
console
.
log
(
res
);
if
(
res
)
{
console
.
log
(
'校验'
,
res
);
checkCommon
({
code
:
props
.
code
,
data
:
res
}).
then
((
checkData
:
any
)
=>
{
if
(
checkData
.
code
===
200
)
ElMessage
({
type
:
'success'
,
message
:
'校验通过'
})
})
}
})
})
}
}
defineExpose
({
defineExpose
({
previewVisible
previewVisible
,
widgetForm
,
handleGetData
})
})
</
script
>
</
script
>
...
...
src/views/manage/platformProducts.vue
浏览文件 @
48224ec1
<
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>
<el-button
type=
"primary"
icon=
"plus"
@
click=
"openShow"
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=
"product
After
CodeName"
align=
"center"
/>
<el-table-column
label=
"产品1"
prop=
"product
Before
CodeName"
align=
"center"
/>
<el-table-column
label=
"产品2"
prop=
"product
Before
CodeName"
align=
"center"
/>
<el-table-column
label=
"产品2"
prop=
"product
After
CodeName"
align=
"center"
/>
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
width=
"155"
>
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
width=
"155"
>
<template
#
default=
"scope"
>
<template
#
default=
"scope"
>
<el-button
type=
"primary"
link
size=
"small"
@
click=
"selectScene(scope.row.id)"
>
选择场景
<el-button
type=
"primary"
link
size=
"small"
@
click=
"selectScene(scope.row.id)"
>
选择场景
...
@@ -20,12 +19,13 @@
...
@@ -20,12 +19,13 @@
</el-row>
</el-row>
</div>
</div>
<el-dialog
v-model=
"showAddDialog"
title=
"选择产品"
width=
"50%"
>
<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=
"select
After
Products"
>
<el-button
type=
"primary"
circle
style=
"width: 100px; height: 100px;"
@
click=
"select
Before
Products"
>
{{
after
Title }}
</el-button>
{{
before
Title }}
</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>
...
@@ -33,18 +33,16 @@
...
@@ -33,18 +33,16 @@
</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=
"select
Before
Products"
>
<el-button
type=
"primary"
circle
style=
"width: 100px; height: 100px;"
@
click=
"select
After
Products"
>
{{
before
Title }}
</el-button>
{{
after
Title }}
</el-button>
</el-col>
</el-col>
<el-col
:span=
"11"
style=
"margin-top: 20px;"
>
<el-col
:span=
"11"
style=
"margin-top: 20px;"
>
<previewProduct
ref=
"previewProductAfterRef"
/>
<previewProduct
ref=
"previewProductBeforeRef"
:code=
"productBeforeCode"
@
codeData=
"codeData"
/>
<!-- <kingdee-basic-config /> -->
</el-col>
</el-col>
<el-col
:span=
"2"
>
<el-col
:span=
"2"
>
</el-col>
</el-col>
<el-col
:span=
"11"
style=
"margin-top: 20px;"
>
<el-col
:span=
"11"
style=
"margin-top: 20px;"
>
<previewProduct
ref=
"previewProductBeforeRef"
/>
<previewProduct
ref=
"previewProductAfterRef"
:code=
"productAfterCode"
@
codeData=
"codeData"
/>
<!-- <kingdee-basic-config /> -->
</el-col>
</el-col>
<el-col
:span=
"24"
style=
"text-align: center;"
>
<el-col
:span=
"24"
style=
"text-align: center;"
>
<el-button
type=
"primary"
@
click=
"onConfirm"
style=
"width: 88px; margin-top: 20%;"
>
保存产品
<el-button
type=
"primary"
@
click=
"onConfirm"
style=
"width: 88px; margin-top: 20%;"
>
保存产品
...
@@ -61,11 +59,10 @@
...
@@ -61,11 +59,10 @@
<
script
setup
lang=
'ts'
>
<
script
setup
lang=
'ts'
>
import
{
ref
,
computed
}
from
'vue'
import
{
ref
,
computed
}
from
'vue'
import
{
getPlatformProductList
,
createPlatformProduct
,
deletePlatformProduct
,
getDictItemList
}
from
'@/services/api/platformProducts'
import
{
getPlatformProductList
,
createPlatformProduct
,
deletePlatformProduct
,
getDictItemList
,
getCommonParam
,
postCommonParam
}
from
'@/services/api/platformProducts'
import
{
ElMessage
,
ElMessageBox
}
from
'element-plus'
;
import
{
ElMessage
,
ElMessageBox
}
from
'element-plus'
;
import
{
useRouter
}
from
'vue-router'
;
import
{
useRouter
}
from
'vue-router'
;
import
addProduct
from
'./components/platformProducts/addProduct.vue'
;
import
addProduct
from
'./components/platformProducts/addProduct.vue'
;
// import kingdeeBasicConfig from './components/platformProducts/kingdeeBasicConfig.vue';
import
previewProduct
from
'./components/platformProducts/previewProduct.vue'
;
import
previewProduct
from
'./components/platformProducts/previewProduct.vue'
;
const
router
=
useRouter
();
const
router
=
useRouter
();
...
@@ -73,7 +70,9 @@ const options = ref([] as any) // select 数据源
...
@@ -73,7 +70,9 @@ const options = ref([] as any) // select 数据源
const
showAddDialog
=
ref
(
false
)
const
showAddDialog
=
ref
(
false
)
const
productAfterCode
=
ref
()
// 第一个选择产品
const
productAfterCode
=
ref
()
// 第一个选择产品
const
productBeforeCode
=
ref
()
// 第二个选择产品
const
productBeforeCode
=
ref
()
// 第二个选择产品
const
productData
=
ref
()
const
productData
=
ref
()
// 产品数据
const
productAfterData
=
ref
()
const
productBeforeData
=
ref
()
const
addProductRef
=
ref
()
const
addProductRef
=
ref
()
const
previewProductAfterRef
=
ref
()
const
previewProductAfterRef
=
ref
()
const
previewProductBeforeRef
=
ref
()
const
previewProductBeforeRef
=
ref
()
...
@@ -105,33 +104,48 @@ let addProductShow = () => {
...
@@ -105,33 +104,48 @@ let addProductShow = () => {
showAddDialog
.
value
=
true
showAddDialog
.
value
=
true
}
}
let
openShow
=
()
=>
{
previewProductAfterRef
.
value
.
previewVisible
=
true
}
// 选择前产品
// 选择前产品
const
selectAfterProducts
=
()
=>
{
const
selectAfterProducts
=
()
=>
{
addProductRef
.
value
.
status
=
true
addProductRef
.
value
.
status
=
false
addProductRef
.
value
.
type
=
'after'
addProductRef
.
value
.
showDialog
=
true
addProductRef
.
value
.
showDialog
=
true
}
}
// 选择前产品
// 选择前产品
const
selectBeforeProducts
=
()
=>
{
const
selectBeforeProducts
=
()
=>
{
addProductRef
.
value
.
status
=
false
addProductRef
.
value
.
status
=
true
addProductRef
.
value
.
type
=
'before'
addProductRef
.
value
.
showDialog
=
true
addProductRef
.
value
.
showDialog
=
true
}
}
const
codeChange
=
(
code
:
string
,
value
:
string
)
=>
{
const
codeChange
=
(
code
:
string
,
value
:
string
)
=>
{
if
(
code
===
'after'
)
{
if
(
code
===
'after'
)
{
previewProductAfterRef
.
value
.
previewVisible
=
true
getCommonParam
(
value
).
then
((
res
:
any
)
=>
{
productAfterCode
.
value
=
value
if
(
res
.
code
===
200
)
{
previewProductAfterRef
.
value
.
widgetForm
=
res
.
data
previewProductAfterRef
.
value
.
previewVisible
=
true
productAfterCode
.
value
=
value
}
})
}
}
else
{
else
{
previewProductBeforeRef
.
value
.
previewVisible
=
true
getCommonParam
(
value
).
then
((
res
:
any
)
=>
{
productBeforeCode
.
value
=
value
if
(
res
.
code
===
200
)
{
previewProductBeforeRef
.
value
.
widgetForm
=
res
.
data
previewProductBeforeRef
.
value
.
previewVisible
=
true
productBeforeCode
.
value
=
value
}
})
}
}
}
}
// 获取保存数据
const
codeData
=
(
code
:
string
,
data
:
any
)
=>
{
console
.
log
(
code
,
data
,
productBeforeCode
.
value
,
productAfterCode
.
value
,
'data'
);
if
(
code
===
productBeforeCode
.
value
)
productBeforeData
.
value
=
data
else
productAfterData
.
value
=
data
}
// 选择场景
// 选择场景
const
selectScene
=
(
id
:
string
)
=>
{
const
selectScene
=
(
id
:
string
)
=>
{
sessionStorage
.
setItem
(
'platformProductRelationId'
,
id
)
sessionStorage
.
setItem
(
'platformProductRelationId'
,
id
)
...
@@ -165,21 +179,32 @@ const delProduct = (id: number) => {
...
@@ -165,21 +179,32 @@ const delProduct = (id: number) => {
}
}
const
onConfirm
=
()
=>
{
const
onConfirm
=
()
=>
{
if
(
!
productAfterCode
.
value
)
return
ElMessage
({
type
:
'warning'
,
message
:
'请先选择第一个产品'
})
if
(
!
productAfterCode
.
value
&&
!
productAfterCode
.
value
)
return
ElMessage
({
type
:
'warning'
,
message
:
'产品不能为空'
})
if
(
!
productBeforeCode
.
value
)
return
ElMessage
({
type
:
'warning'
,
message
:
'请先选择第二个产品'
})
if
(
productBeforeCode
.
value
===
productAfterCode
.
value
)
return
ElMessage
({
type
:
'warning'
,
message
:
'不能选择相同产品'
})
showAddDialog
.
value
=
false
let
data
=
{
let
data
=
{
productAfterCode
:
productAfterCode
.
value
,
productAfterCode
:
productAfterCode
.
value
,
productBeforeCode
:
productBeforeCode
.
value
productBeforeCode
:
productBeforeCode
.
value
}
}
previewProductAfterRef
.
value
.
handleGetData
()
previewProductBeforeRef
.
value
.
handleGetData
()
setTimeout
(()
=>
{
saveCommonParam
(
productBeforeCode
.
value
,
productBeforeData
.
value
)
saveCommonParam
(
productAfterCode
.
value
,
productAfterData
.
value
)
createPlatformProduct
(
data
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
200
)
{
init
()
productAfterCode
.
value
=
''
productBeforeCode
.
value
=
''
showAddDialog
.
value
=
false
ElMessage
({
type
:
'success'
,
message
:
'保存成功'
})
}
})
},
1000
);
}
createPlatformProduct
(
data
).
then
((
res
:
any
)
=>
{
const
saveCommonParam
=
(
code
:
string
,
data
:
any
)
=>
{
postCommonParam
({
code
,
data
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
init
()
console
.
log
(
res
);
productAfterCode
.
value
=
''
productBeforeCode
.
value
=
''
ElMessage
({
type
:
'success'
,
message
:
'保存成功'
})
}
}
})
})
}
}
...
@@ -199,12 +224,21 @@ const init = () => {
...
@@ -199,12 +224,21 @@ const init = () => {
getPlatformProductList
().
then
((
res
:
any
)
=>
{
getPlatformProductList
().
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
productData
.
value
=
res
.
data
.
records
productData
.
value
=
res
.
data
.
records
console
.
log
(
res
);
}
}
})
})
}
}
init
()
init
()
const
handleClose
=
()
=>
{
productAfterCode
.
value
=
''
productBeforeCode
.
value
=
''
productBeforeData
.
value
=
''
productAfterData
.
value
=
''
previewProductAfterRef
.
value
.
previewVisible
=
false
previewProductBeforeRef
.
value
.
previewVisible
=
false
showAddDialog
.
value
=
false
}
</
script
>
</
script
>
<
style
lang =
"scss"
scoped
>
<
style
lang =
"scss"
scoped
>
...
...
src/views/manage/stso.vue
浏览文件 @
48224ec1
...
@@ -3,9 +3,8 @@
...
@@ -3,9 +3,8 @@
<el-button
type=
"primary"
icon=
"plus"
size=
"small"
style=
"margin-bottom: 20px;"
@
click=
"addStso"
>
添加
</el-button>
<el-button
type=
"primary"
icon=
"plus"
size=
"small"
style=
"margin-bottom: 20px;"
@
click=
"addStso"
>
添加
</el-button>
<el-table
:data=
"stsoData"
border
stripe
>
<el-table
:data=
"stsoData"
border
stripe
>
<el-table-column
label=
"任务类名"
prop=
"jobClassName"
align=
"center"
/>
<el-table-column
label=
"单据名称"
prop=
"name"
align=
"center"
/>
<el-table-column
label=
"docType"
prop=
"docType"
align=
"center"
/>
<el-table-column
label=
"docType"
prop=
"docType"
align=
"center"
/>
<el-table-column
label=
"单据名称"
prop=
"name"
align=
"center"
/>
<el-table-column
label=
"单据唯一标识"
prop=
"sFormId"
align=
"center"
/>
<el-table-column
label=
"单据唯一标识"
prop=
"sFormId"
align=
"center"
/>
<el-table-column
label=
"接收地址"
prop=
"receiveAddress"
align=
"center"
/>
<el-table-column
label=
"接收地址"
prop=
"receiveAddress"
align=
"center"
/>
<el-table-column
label=
"创建时间"
prop=
"createTime"
align=
"center"
/>
<el-table-column
label=
"创建时间"
prop=
"createTime"
align=
"center"
/>
...
@@ -20,8 +19,12 @@
...
@@ -20,8 +19,12 @@
<el-dialog
v-model=
"showDialog"
:title=
"title"
width=
"30%"
:before-close=
"handleClose"
>
<el-dialog
v-model=
"showDialog"
:title=
"title"
width=
"30%"
:before-close=
"handleClose"
>
<el-form
:model=
"formData"
ref=
"formRef"
:rules=
"fromRules"
label-width=
"120px"
>
<el-form
:model=
"formData"
ref=
"formRef"
:rules=
"fromRules"
label-width=
"120px"
>
<el-form-item
label=
"任务类名"
prop=
"jobClassName"
>
<el-form-item
label=
"选择产品"
width=
"60px"
>
<el-input
v-model=
"formData.jobClassName"
placeholder=
"请输入任务类名"
/>
<el-select
v-model=
"formData.platformProductRelationId"
clearable
placeholder=
"请选择产品"
@
change=
"selectChange"
>
<el-option
v-for=
"item in productOptions"
:key=
"item.id"
:label=
"item.label"
:value=
"item.productAfterCode"
/>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"同步表单"
prop=
"commonConfigId"
>
<el-form-item
label=
"同步表单"
prop=
"commonConfigId"
>
<el-select
v-model=
"formData.commonConfigId"
class=
"m-2"
placeholder=
"请选择"
>
<el-select
v-model=
"formData.commonConfigId"
class=
"m-2"
placeholder=
"请选择"
>
...
@@ -45,27 +48,27 @@
...
@@ -45,27 +48,27 @@
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
{
getCommonConfig
}
from
'@/services/api/systemApi/fieldConfiguration/commonConfig'
import
{
getCommonConfig
}
from
'@/services/api/systemApi/fieldConfiguration/commonConfig'
// 查询参数
// 查询参数
const
listQuery
=
ref
({
const
listQuery
=
ref
({
platformProductRelationId
:
1
,
platformProductRelationId
:
1
,
jobClassName
:
''
,
// 任务类名
pageNo
:
1
,
// 页码
pageNo
:
1
,
// 页码
pageSize
:
10
,
// 每页数量
pageSize
:
10
,
// 每页数量
})
})
const
total
=
ref
(
0
)
const
total
=
ref
(
0
)
const
stsoData
=
ref
()
const
stsoData
=
ref
()
const
formRef
=
ref
()
const
formRef
=
ref
()
const
productOptions
=
ref
();
// 产品数据源
const
formData
=
ref
({
const
formData
=
ref
({
jobClassName
:
'com.system.quartz.job.KingDeeSynchronizationJob'
,
// 任务类名
platformProductRelationId
:
''
,
commonConfigId
:
''
,
// 通用配置id
commonConfigId
:
''
,
// 通用配置id
receiveAddress
:
''
// 接收地址
receiveAddress
:
''
// 接收地址
})
})
// 校验规则
// 校验规则
const
fromRules
=
ref
({
const
fromRules
=
ref
({
jobClassName
:
[{
required
:
true
,
message
:
''
,
trigger
:
'blur'
}],
commonConfigId
:
[{
required
:
true
,
message
:
''
,
trigger
:
'change'
}],
commonConfigId
:
[{
required
:
true
,
message
:
''
,
trigger
:
'change'
}],
receiveAddress
:
[{
required
:
true
,
message
:
''
,
trigger
:
'blur'
}],
receiveAddress
:
[{
required
:
true
,
message
:
''
,
trigger
:
'blur'
}],
})
})
...
@@ -84,6 +87,18 @@ const editStso = (row: any) => {
...
@@ -84,6 +87,18 @@ const editStso = (row: any) => {
formData
.
value
=
row
formData
.
value
=
row
showDialog
.
value
=
true
showDialog
.
value
=
true
}
}
const
selectChange
=
(
value
:
string
)
=>
{
if
(
value
)
{
// getCommonParam(value).then((res: any) => {
// if (res.code === 200) {
// console.log(res.data);
// // formData.value.receiveAddress = res.data
// }
// })
}
}
// 添加
// 添加
const
delStso
=
(
id
:
number
)
=>
{
const
delStso
=
(
id
:
number
)
=>
{
ElMessageBox
.
confirm
(
ElMessageBox
.
confirm
(
...
@@ -139,9 +154,9 @@ const onConfirm = () => {
...
@@ -139,9 +154,9 @@ const onConfirm = () => {
const
handleClose
=
()
=>
{
const
handleClose
=
()
=>
{
formData
.
value
=
{
formData
.
value
=
{
jobClassName
:
'com.system.quartz.job.KingDeeSynchronizationJob'
,
commonConfigId
:
''
,
commonConfigId
:
''
,
receiveAddress
:
''
receiveAddress
:
''
,
platformProductRelationId
:
''
}
}
showDialog
.
value
=
false
showDialog
.
value
=
false
}
}
...
@@ -166,6 +181,22 @@ const initStsoList = () => {
...
@@ -166,6 +181,22 @@ const initStsoList = () => {
})
})
}
}
initStsoList
()
initStsoList
()
// 初始化产品数据
const
initProduct
=
()
=>
{
getPlatformProductList
().
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
200
)
{
res
.
data
.
records
.
forEach
((
item
:
any
)
=>
{
item
.
label
=
item
.
productAfterCodeName
+
'-'
+
item
.
productBeforeCodeName
})
productOptions
.
value
=
res
.
data
.
records
console
.
log
(
productOptions
.
value
);
}
})
}
initProduct
()
</
script
>
</
script
>
<
style
lang =
"scss"
scoped
>
<
style
lang =
"scss"
scoped
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论