Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
Project
Project
Details
Activity
Releases
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
周远喜
mes-ui
Commits
5f534397
Commit
5f534397
authored
Sep 29, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
封装code组件
parent
6fea9e5e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
78 additions
and
26 deletions
+78
-26
api.js
components/page/api.js
+11
-0
inputCode.vue
components/page/inputCode.vue
+50
-0
add.vue
pages/word/document/add.vue
+7
-16
api.js
pages/word/document/api.js
+0
-5
edit.vue
pages/word/document/edit.vue
+6
-3
word.vue
pages/word/document/word.vue
+1
-1
iview.js
plugins/iview.js
+3
-1
No files found.
components/page/api.js
0 → 100644
View file @
5f534397
import
Api
from
'@/plugins/request'
;
export
default
{
//批量生成序列号并返回
serialcode
(
params
)
{
return
Api
.
post
(
`
${
systemUrl
}
/cache/generate_serialcode`
,
params
);
},
}
\ No newline at end of file
components/page/inputCode.vue
0 → 100644
View file @
5f534397
<
template
>
<div
class=
"input-code"
>
<Input
v-model=
"code"
clearable
>
<Select
v-model=
"select"
slot=
"append"
style=
"width: 100px"
>
<Option
value=
"com"
>
生成编号
</Option>
</Select>
</Input>
</div>
</
template
>
<
script
>
import
Api
from
"./api"
;
export
default
{
data
()
{
return
{
code
:
""
,
select
:
"com"
,
};
},
props
:
{
value
:
[
String
,
Number
,
Array
,
Object
],
clearable
:
{
type
:
Boolean
,
default
:
true
,
},
},
mounted
()
{
this
.
getSerialcode
();
},
methods
:
{
// 生成临时编号code
getSerialcode
()
{
Api
.
serialcode
({
code
:
""
,
}).
then
((
r
)
=>
{
if
(
r
.
result
)
{
this
.
code
=
r
.
result
[
0
];
}
});
},
},
watch
:
{
value
(
v
)
{
this
.
code
=
v
;
},
},
};
</
script
>
<
style
>
</
style
>
\ No newline at end of file
pages/word/document/add.vue
View file @
5f534397
<
template
>
<div
class=
"document-add"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"1
2
0"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"1
1
0"
>
<Row>
<Col
span=
"18"
>
<Row>
<Col
v-for=
"li in fileds"
:key=
"li.field"
:span=
"li.span"
>
<FormItem
:label=
"li.title"
:prop=
"li.name"
>
<Input
v-if=
"li.dataType == 0"
v-if=
"li.dataType == 0
&& li.field != 'code'
"
v-model=
"entity[li.field]"
:disabled=
"li.field == 'code'"
></Input>
<InputCode
v-if=
"li.dataType == 0 && li.field == 'code'"
v-model=
"entity[li.field]"
/>
<InputNumber
v-if=
"li.dataType == 1 || li.dataType == 2"
v-model=
"entity[li.field]"
...
...
@@ -222,12 +225,12 @@
</
template
>
<
script
>
import
Api
from
"./api"
;
export
default
{
name
:
"Add"
,
components
:
{},
data
()
{
return
{
code
:
""
,
// modal: false,
imgName
:
""
,
avatorPath
:
""
,
...
...
@@ -283,20 +286,8 @@ export default {
this
.
initFiled
();
this
.
parms
.
eid
=
this
.
$u
.
guid
();
this
.
$refs
.
refmovieFile1
.
inputShow
=
false
;
this
.
getSerialcode
();
},
methods
:
{
// 生成临时编号code
getSerialcode
()
{
Api
.
serialcode
({
code
:
""
,
count
:
0
,
}).
then
((
r
)
=>
{
if
(
r
.
result
)
{
this
.
entity
.
code
=
r
.
result
[
0
];
}
});
},
imgUrl
()
{
window
.
open
(
this
.
avatorPath
,
"_blank"
);
},
...
...
pages/word/document/api.js
View file @
5f534397
...
...
@@ -34,10 +34,5 @@ export default {
getcategorytemplate
(
params
){
//获取分类的模板
return
Api
.
get
(
`
${
material
}
/documenttemplate/getcategorytemplate`
,
params
);
},
//批量生成序列号并返回
serialcode
(
params
)
{
return
Api
.
post
(
`
${
systemUrl
}
/cache/generate_serialcode`
,
params
);
},
}
\ No newline at end of file
pages/word/document/edit.vue
View file @
5f534397
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"1
2
0"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"1
1
0"
>
<Row>
<Col
span=
"18"
>
<Row>
<Col
v-for=
"li in fileds"
:key=
"li.field"
:span=
"li.span"
>
<FormItem
:label=
"li.title"
:prop=
"li.name"
>
<Input
v-if=
"li.dataType == 0"
v-if=
"li.dataType == 0
&& li.field != 'code'
"
v-model=
"entity[li.field]"
:disabled=
"li.field == 'code'"
></Input>
<InputCode
v-if=
"li.dataType == 0 && li.field == 'code'"
v-model=
"entity[li.field]"
/>
<InputNumber
v-if=
"li.dataType == 1 || li.dataType == 2"
v-model=
"entity[li.field]"
...
...
pages/word/document/word.vue
View file @
5f534397
...
...
@@ -100,7 +100,7 @@
<Modal
v-model=
"modal"
:title=
"title"
width=
"1
2
00"
width=
"1
3
00"
footer-hide
:mask-closable=
"false"
:fullscreen=
"fullscreen"
...
...
plugins/iview.js
View file @
5f534397
...
...
@@ -65,6 +65,8 @@ import OutputTime from '@/components/page/outputTime.vue'
import
ViewerImg
from
'@/components/page/viewer.vue'
import
ImportExcel
from
'@/components/page/import/process.vue'
import
CustomProperties
from
'@/components/page/customProperties.vue'
import
InputCode
from
'@/components/page/inputCode.vue'
// import FormMaking from 'form-making'
...
...
@@ -135,7 +137,7 @@ Vue.component("StoreTree", StoreTree)
Vue
.
component
(
"StoreSelect"
,
StoreSelect
)
Vue
.
component
(
"ImportExcel"
,
ImportExcel
)
Vue
.
component
(
"CustomProperties"
,
CustomProperties
)
Vue
.
component
(
"InputCode"
,
InputCode
)
//注入mock
// require("../mock")
...
...
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