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
e30d1276
Commit
e30d1276
authored
Dec 27, 2021
by
fukai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善对setValues、setCodeValues的支持
parent
6bdbee1a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
Select.vue
src/components/Select.vue
+2
-2
commonApi.js
src/mixin/commonApi.js
+13
-0
No files found.
src/components/Select.vue
View file @
e30d1276
...
...
@@ -8,7 +8,7 @@
:clearable=
"clearable"
@
click
.
native=
"handleClick"
>
<template
v-if=
"dbCodeList.length > 0"
>
<template
v-if=
"dbCodeList
&& dbCodeList
.length > 0"
>
<el-option
v-for=
"item in dbCodeList"
:key=
"item.value"
...
...
@@ -17,7 +17,7 @@
>
</el-option>
</
template
>
<
template
v-else-if=
"code.length > 0"
>
<
template
v-else-if=
"code
&& code
.length > 0"
>
<el-option
v-for=
"item in code"
:key=
"item.value"
...
...
src/mixin/commonApi.js
View file @
e30d1276
...
...
@@ -20,6 +20,19 @@ export default {
Vue
.
set
(
this
.
codeSet
,
key
,
values
[
key
])
}
},
//获取后台setValues、setCodeValues传来的动态码
getBackendCode
(
key
){
let
arr
=
codeSet
[
key
]
if
(
!
arr
)
return
undefined
return
arr
.
map
(
item
=>
{
let
itemArr
=
item
.
split
(
"
\
t"
)
if
(
itemArr
.
length
>
1
)
return
{
label
:
itemArr
[
0
]
+
"
\
t"
+
itemArr
[
1
],
value
:
itemArr
[
0
]}
else
return
{
label
:
itemArr
[
0
],
value
:
itemArr
[
1
]}
})
},
async
init
(
params
)
{
let
rtnmsg
=
await
Api
.
post
(
this
.
declareParams
.
trnName
+
"/init"
,
{
params
})
if
(
rtnmsg
.
respCode
==
SUCCESS
){
...
...
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