Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vue-gjjs
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fukai
vue-gjjs
Commits
1b1dc516
Commit
1b1dc516
authored
Jul 11, 2022
by
liuxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
customModel初始化
parent
f4d03b81
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
101 additions
and
0 deletions
+101
-0
commonApi.js
src/mixin/commonApi.js
+13
-0
commonProcess.js
src/mixin/commonProcess.js
+26
-0
customIndex.js
src/model/Ditopn/customIndex.js
+37
-0
index.js
src/utils/index.js
+11
-0
Ovwp.vue
src/views/Business/Detopn/Ovwp.vue
+12
-0
index.vue
src/views/Business/Ditopn/index.vue
+2
-0
No files found.
src/mixin/commonApi.js
View file @
1b1dc516
...
...
@@ -112,6 +112,19 @@ export default {
loading
.
close
()
return
rtnmsg
},
async
executeCustomRule
(
rulePath
,
params
,
delayCb
)
{
const
loading
=
this
.
loading
(
"正在请求数据"
)
//copy
Utils
.
copyCustomFromModel
(
this
.
customModel
,
this
.
model
)
console
.
log
(
this
.
customModel
)
let
rtnmsg
=
await
Api
.
post
(
this
.
requestPrefix
+
"/executeRule/"
+
rulePath
,
this
.
wrapperCustom
(
params
,
delayCb
))
if
(
rtnmsg
.
respCode
==
SUCCESS
)
{
this
.
updateValueSet
(
rtnmsg
.
codeSet
)
this
.
showBackendErrors
(
rtnmsg
.
fieldErrors
)
}
loading
.
close
()
return
rtnmsg
},
async
checkAll
(
params
)
{
const
loading
=
this
.
loading
(
"正在校验数据"
)
const
rtnmsg
=
await
Api
.
post
(
this
.
requestPrefix
+
"/checkAll"
,
this
.
wrapper
(
params
))
...
...
src/mixin/commonProcess.js
View file @
1b1dc516
...
...
@@ -130,11 +130,19 @@ export default {
rulePath
=
"cnybop.libp"
}
if
(
!!
rulePath
)
{
// if(rulePath == "setmod.setpan"){
// this.executeCustomRule(rulePath).then(res => {
// if (res.respCode == SUCCESS) {
// this.updateModel(res.data)
// }
// })
// }else{
this
.
executeRule
(
rulePath
).
then
(
res
=>
{
if
(
res
.
respCode
==
SUCCESS
)
{
this
.
updateModel
(
res
.
data
)
}
})
// }
}
},
/**
...
...
@@ -159,6 +167,24 @@ export default {
}
return
fn
;
},
wrapperCustom
(
params
,
delayCb
)
{
params
=
params
||
{}
params
[
'isCustom'
]
=
true
const
fn
=
async
()
=>
{
const
that
=
this
;
const
data
=
await
new
Promise
(
resolve
=>
{
// 保证前一次请求结果赋值VO完成
setTimeout
(()
=>
{
delayCb
&&
delayCb
()
const
d
=
Utils
.
flatObject
(
that
.
customModel
)
resolve
(
d
)
},
0
)
})
params
[
'keys'
]
=
Object
.
keys
(
data
)
return
{
...
data
,
params
}
}
return
fn
;
},
/**
* 用于手动的触发model里属性的 executeDefault
* @param {string} rule 执行的 rule path
...
...
src/model/Ditopn/customIndex.js
0 → 100644
View file @
1b1dc516
import
Api
from
"~/service/Api"
import
Pub
from
"../Public"
import
Rec
from
'../Public/Dids/Did'
import
Cbs
from
'../Public/Dids/Did'
export
default
class
customDitopn
{
constructor
()
{
this
.
data
=
{
didgrp
:
{
rec
:
new
Rec
().
data
,
cbs
:
{
nom1
:
new
Cbs
().
data
.
nom1
,
max
:
new
Cbs
().
data
.
max
,
},
apl
:
{
namelc
:
""
,
// 名称 .didgrp.apl.namelc
adrelc
:
""
,
// 地址 .didgrp.apl.adrelc
// dbfadrblkcn: "", // Chinese address .didgrp.apl.dbfadrblkcn
// rolsetflg: "", // 备查表相关字段
},
},
// ditp: new Dids().data.Ditp,
// litbenl1blk: "", // XMLPanel litbenl1的内置block .litbenl1blk
// litapll1blk: "", // XMLPanel litapll1的内置block .litapll1blk
// litrmbl1blk: "", // XMLPanel litrmbl1的内置block .litrmbl1blk
setmod
:
new
Pub
().
data
.
Setmod
,
// mtabut: new Pub().data.Mtabut,
// trnmod: new Pub().data.Trnmod,
// liaall: new Pub().data.Liaall,
// litameadv: "", // 特殊规定 .litameadv
// ameadvrmk: "", // 特殊规定条件 .ameadvrmk
// godnam: "", // 槧物简称 .godnam
// bchname: "", // branch name .bchname
pageId
:
""
// ctx的key
}
}
}
\ No newline at end of file
src/utils/index.js
View file @
1b1dc516
...
...
@@ -245,4 +245,14 @@ export default class Utils {
return
uuid
;
}
static
copyCustomFromModel
(
customModel
,
model
){
for
(
let
key
in
customModel
){
if
(
typeof
customModel
[
key
]
==
"object"
){
this
.
copyCustomFromModel
(
customModel
[
key
],
model
[
key
])
}
else
{
customModel
[
key
]
=
model
[
key
]
}
}
}
}
\ No newline at end of file
src/views/Business/Detopn/Ovwp.vue
View file @
1b1dc516
...
...
@@ -366,6 +366,18 @@
</c-col>
<c-col
:span=
"24"
>
<c-form-item
label=
"开证行开证类型"
prop=
"dedgrp.rec.dkflg"
>
<c-select
v-model=
"model.dedgrp.rec.dkflg"
style=
"width: 100%"
placeholder=
"请选择"
:code=
"codes.dkflg"
disabled
></c-select>
</c-form-item>
</c-col>
<c-col
:span=
"24"
>
<el-form-item
label=
"有效地点"
prop=
"dedgrp.rec.expplc"
>
<c-input
v-model=
"model.dedgrp.rec.expplc"
...
...
src/views/Business/Ditopn/index.vue
View file @
1b1dc516
...
...
@@ -128,6 +128,7 @@ import Api from "~/service/Api";
import
Utils
from
"~/utils/index"
;
import
CodeTable
from
"~/config/CodeTable"
;
import
Ditopn
from
"~/model/Ditopn"
;
import
customDitopn
from
"~/model/Ditopn/customIndex"
;
import
commonProcess
from
"~/mixin/commonProcess"
;
import
commonFuncs
from
"~/mixin/commonFuncs"
;
import
Pattern
from
"~/model/Ditopn/Pattern"
;
...
...
@@ -187,6 +188,7 @@ export default {
tabVal
:
"ovwp"
,
trnName
:
"ditopn"
,
model
:
new
Ditopn
().
data
,
customModel
:
new
customDitopn
().
data
,
checkRules
:
Check
,
defaultRules
:
Default
,
pattern
:
Pattern
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment