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
zhouqian
vue-gjjs
Commits
1875b3bd
Commit
1875b3bd
authored
Sep 15, 2022
by
liuxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
补充xml格式展示
parent
f4fef989
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
119 additions
and
10 deletions
+119
-10
InputXml.vue
src/components/InputXml.vue
+107
-0
index.js
src/components/index.js
+3
-0
Pattern.js
src/model/Betsnd/Pattern.js
+1
-1
index.js
src/model/Public/Mtabut/index.js
+2
-2
Coninfp.vue
src/views/Public/Coninfp.vue
+6
-7
No files found.
src/components/InputXml.vue
0 → 100644
View file @
1875b3bd
<
template
>
<el-input
:id=
"id"
ref=
"form-item"
v-model=
"value"
type=
"textarea"
v-bind=
"$attrs"
v-on=
"$listeners"
v-bind:disabled=
"isDisable"
:rows=
"maxRows"
resize=
"none"
@
change=
"onChange"
/>
</
template
>
<
script
>
export
default
{
data
:
function
()
{
return
{
value
:
""
,
isXml
:
false
,
};
},
props
:
{
maxRows
:
{
type
:
Number
,
default
:
3
,
},
maxCols
:
{
type
:
Number
,
default
:
4
,
},
disabled
:
{
type
:
Boolean
,
default
:
false
,
},
id
:
{
type
:
String
,
default
:
undefined
,
},
model
:
{
type
:
Object
,
default
:
undefined
,
},
},
computed
:
{
// model: {
// get() {
// let value = this.format(this.value);
// return value;
// },
// set(newVal) {
// this.$emit("input", newVal);
// },
// },
isDisable
:
{
get
()
{
return
this
.
mode
===
"display"
||
this
.
disabled
;
},
},
},
methods
:
{
show
:
function
(
rows
)
{
let
strs
=
rows
.
length
>
0
?
rows
[
0
]
:
""
;
var
result
=
""
;
if
(
strs
.
startsWith
(
"<?xml"
))
{
this
.
isXml
=
true
;
var
pattern
=
/<tdfmt
\s[^
>
]
*>
(
.*
)
<
\/
tdfmt>/
;
var
temp
=
pattern
.
exec
(
strs
);
if
(
temp
!=
null
)
{
result
=
temp
[
1
];
}
}
return
result
.
replace
(
/<br
\/
>/g
,
"
\
n"
);
},
format
:
function
(
value
)
{
if
(
this
.
isXml
){
var
len
=
value
.
length
;
value
=
value
.
replace
(
/
\n
/g
,
"<br/>"
)
var
head
=
"<?xml version='1.0'?><tdfmt sel-start='"
+
len
+
"'>"
;
var
tail
=
"</tdfmt>"
;
return
head
+
value
+
tail
;
}
return
value
;
},
onChange
()
{
if
(
this
.
model
&&
this
.
model
.
rows
)
{
this
.
model
[
"rows"
][
0
]
=
this
.
format
(
this
.
value
);
this
.
$emit
(
"change"
,
this
.
value
);
}
},
},
watch
:
{
model
:
function
()
{
let
rows
=
this
.
model
[
"rows"
]
||
[];
this
.
value
=
this
.
show
(
rows
);
},
},
};
</
script
>
<
style
>
/* .el-input.highlight .el-input__inner{
border-color: red;
} */
</
style
>
\ No newline at end of file
src/components/index.js
View file @
1875b3bd
...
...
@@ -50,6 +50,7 @@ import InputSelect from "./InputSelect"
import
Fullbox
from
"./Fullbox"
import
CompareTable
from
"./CompareTable"
import
InputXml
from
"./InputXml.vue"
export
default
{
install
(
Vue
)
{
...
...
@@ -102,5 +103,6 @@ export default {
Vue
.
component
(
"c-inputselect"
,
InputSelect
)
Vue
.
component
(
"c-fullbox"
,
Fullbox
)
Vue
.
component
(
"c-compare-table"
,
CompareTable
)
Vue
.
component
(
"c-input-xml"
,
InputXml
)
}
}
\ No newline at end of file
src/model/Betsnd/Pattern.js
View file @
1875b3bd
...
...
@@ -38,7 +38,7 @@ export default {
],
"bedgrp.cbs.max.amt"
:[
{
type
:
"strig"
,
required
:
false
,
message
:
"必输项"
},
{
type
:
"stri
n
g"
,
required
:
false
,
message
:
"必输项"
},
{
max
:
18
,
message
:
"整数位不能超过14位"
},
{
pattern
:
/
(
^
\d
+$
)
|
(
^
\.\d{1,3}
$
)
|
(
^
\d
+
\.\d{1,3}
$
)
/
,
message
:
"小数位不能超过3位"
}
],
...
...
src/model/Public/Mtabut/index.js
View file @
1875b3bd
...
...
@@ -5,14 +5,14 @@ export default class Mtabut {
oitinf
:
{
labinftxt
:
""
,
// Label for INFTXT .mtabut.coninf.oitinf.labinftxt
oit
:
{
inftxt
:
""
,
// Infotext .mtabut.coninf.oitinf.oit.inftxt
inftxt
:
{}
,
// Infotext .mtabut.coninf.oitinf.oit.inftxt
inflev
:
""
,
// Infotext Level .mtabut.coninf.oitinf.oit.inflev
},
},
oitset
:
{
labinftxt
:
""
,
// Label for INFTXT .mtabut.coninf.oitset.labinftxt
oit
:
{
inftxt
:
""
,
// Infotext .mtabut.coninf.oitset.oit.inftxt
inftxt
:
{}
,
// Infotext .mtabut.coninf.oitset.oit.inftxt
inflev
:
""
,
// Infotext Level .mtabut.coninf.oitset.oit.inflev
},
},
...
...
src/views/Public/Coninfp.vue
View file @
1875b3bd
...
...
@@ -7,16 +7,15 @@
label=
"General"
prop=
"mtabut.coninf.oitinf.oit.inftxt"
>
<i-stream-input
type=
"textarea"
rows=
"6"
<c-input-xml
:maxRows=
"6"
maxlength=
"60"
resize=
"none"
show-word-limit
placeholder=
"请输入Infotext"
@
change=
"selectOrCheckboxRule('mtabut.coninf.oitinf.oit.inftxt')"
:model=
"model.mtabut.coninf.oitinf.oit.inftxt"
></
i-stream-input
>
></
c-input-xml
>
</el-form-item>
</c-col>
<c-col
:span=
"7"
:offset=
"1"
>
...
...
@@ -41,16 +40,16 @@
label=
"Settlement"
prop=
"mtabut.coninf.oitset.oit.inftxt"
>
<
i-stream-input
<
c-input-xml
type=
"textarea"
r
ows=
"6"
:maxR
ows=
"6"
maxlength=
"60"
resize=
"none"
show-word-limit
placeholder=
"请输入Infotext"
@
change=
"selectOrCheckboxRule('mtabut.coninf.oitset.oit.inftxt')"
:model=
"model.mtabut.coninf.oitset.oit.inftxt"
></
i-stream-input
>
></
c-input-xml
>
</el-form-item>
</c-col>
<c-col
:span=
"7"
:offset=
"1"
>
...
...
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