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
3e8ee6fc
Commit
3e8ee6fc
authored
Oct 19, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目管理新增
parent
687df1cc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
115 additions
and
72 deletions
+115
-72
add.vue
pages/project/project/add.vue
+115
-72
No files found.
pages/project/project/add.vue
View file @
3e8ee6fc
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<!--
<Col
:span=
"12"
<Col
span=
"8"
>
<FormItem
:label=
"l('picture')"
prop=
"picture"
>
<inputFile
class=
"tphoto"
ref=
"refmovieFile1"
v-model=
"imgName"
:parms=
"parmsName"
/>
</FormItem>
<div
class=
"img-touxiang"
>
<img
:src=
"avatorPath"
v-if=
"imgName"
@
click=
"imgUrl"
class=
"img1"
/>
<img
src=
"@/assets/images/files_header.png"
v-else
width=
"100%"
height=
"100%"
/>
</div>
</Col>
<Col
span=
"16"
>
<!--
<Col
:span=
"12"
><FormItem
:label=
"l('creationTime')"
prop=
"creationTime"
>
<DatePicker
type=
"date"
v-model=
"entity.creationTime"
></DatePicker>
</FormItem
></Col>
-->
<!--
<Col
:span=
"12"
<!--
<Col
:span=
"12"
><FormItem
:label=
"l('creatorUserId')"
prop=
"creatorUserId"
>
<InputNumber
v-model=
"entity.creatorUserId"
></InputNumber>
</FormItem
></Col>
-->
<!--
<Col
:span=
"12"
<!--
<Col
:span=
"12"
><FormItem
:label=
"l('lastModificationTime')"
prop=
"lastModificationTime"
...
...
@@ -22,13 +42,13 @@
v-model=
"entity.lastModificationTime"
></DatePicker>
</FormItem
></Col>
-->
<!--
<Col
:span=
"12"
<!--
<Col
:span=
"12"
><FormItem
:label=
"l('lastModifierUserId')"
prop=
"lastModifierUserId"
>
<InputNumber
v-model=
"entity.lastModifierUserId"
></InputNumber>
</FormItem
></Col>
-->
<!--
<Col
:span=
"12"
<!--
<Col
:span=
"12"
><FormItem
:label=
"l('isDeleted')"
prop=
"isDeleted"
>
<InputNumber
v-model=
"entity.isDeleted"
></InputNumber>
</FormItem
></Col>
...
...
@@ -39,75 +59,74 @@
v-model=
"entity.deletionTime"
></DatePicker>
</FormItem
></Col>
-->
<!--
<Col
:span=
"12"
<!--
<Col
:span=
"12"
><FormItem
:label=
"l('deleterUserId')"
prop=
"deleterUserId"
>
<InputNumber
v-model=
"entity.deleterUserId"
></InputNumber>
</FormItem
></Col>
-->
<Col
:span=
"12"
><FormItem
:label=
"l('title')"
prop=
"title"
>
<Input
v-model=
"entity.title"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('title')"
prop=
"title"
>
<Input
v-model=
"entity.title"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('state')"
prop=
"state"
>
<Dictionary
code=
"mes.project_main.State"
v-model=
"entity.state"
></Dictionary>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('type')"
prop=
"type"
>
<Dictionary
code=
"mes.project_main.Type"
v-model=
"entity.type"
></Dictionary>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('picture')"
prop=
"picture"
>
<Input
v-model=
"entity.picture"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('attachment')"
prop=
"attachment"
>
<Input
v-model=
"entity.attachment"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('phase')"
prop=
"phase"
>
<Dictionary
code=
"mes.project_main.Phase"
v-model=
"entity.phase"
></Dictionary>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('startDate')"
prop=
"startDate"
>
<DatePicker
type=
"date"
v-model=
"entity.startDate"
></DatePicker>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('endDate')"
prop=
"endDate"
>
<DatePicker
type=
"date"
v-model=
"entity.endDate"
></DatePicker>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('businessUnits')"
prop=
"businessUnits"
>
<Input
v-model=
"entity.businessUnits"
>
</Input>
</FormItem
></Col>
<Col
:span=
"24"
><FormItem
:label=
"l('note')"
prop=
"note"
>
<Input
v-model=
"entity.note"
type=
"textarea"
:rows=
"5"
></Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('state')"
prop=
"state"
>
<Dictionary
code=
"project.main.state"
v-model=
"entity.state"
></Dictionary>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('startDate')"
prop=
"startDate"
>
<DatePicker
type=
"date"
v-model=
"entity.startDate"
></DatePicker>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('endDate')"
prop=
"endDate"
>
<DatePicker
type=
"date"
v-model=
"entity.endDate"
></DatePicker>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('type')"
prop=
"type"
>
<Dictionary
code=
"project.main.type"
v-model=
"entity.type"
></Dictionary>
</FormItem
></Col>
<!--
<Col
:span=
"12"
><FormItem
:label=
"l('phase')"
prop=
"phase"
>
<Dictionary
code=
"mes.project_main.Phase"
v-model=
"entity.phase"
></Dictionary>
</FormItem
></Col>
-->
<!--
<Col
:span=
"12"
><FormItem
:label=
"l('businessUnits')"
prop=
"businessUnits"
>
<Input
v-model=
"entity.businessUnits"
>
</Input>
</FormItem
></Col>
-->
<Col
:span=
"24"
>
<FormItem
:label=
"l('attachment')"
prop=
"attachment"
>
<!--
<Input
v-model=
"entity.template"
type=
"textarea"
:rows=
"5"
></Input>
-->
<files
ref=
"refFile"
:parms=
"parms"
files
/>
</FormItem>
</Col>
<Col
:span=
"24"
><FormItem
:label=
"l('note')"
prop=
"note"
>
<Input
v-model=
"entity.note"
type=
"textarea"
:rows=
"5"
></Input>
</FormItem
></Col>
</Col>
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button
>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</Form>
...
...
@@ -119,6 +138,8 @@ export default {
data
()
{
return
{
disabled
:
false
,
imgName
:
""
,
avatorPath
:
""
,
entity
:
{
// creationTime: null,
creatorUserId
:
this
.
$store
.
state
.
userInfo
.
userId
,
...
...
@@ -141,6 +162,13 @@ export default {
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
},
parmsName
:
"app=material&eid=1&name=ProjectMain"
,
parms
:
{
app
:
"material"
,
eid
:
null
,
name
:
""
,
field
:
""
,
},
};
},
props
:
{
...
...
@@ -148,15 +176,24 @@ export default {
eid
:
Number
,
},
mounted
()
{
if
(
this
.
eid
>
0
)
{
this
.
load
(
this
.
eid
);
}
// if (this.eid > 0) {
// this.load(this.eid);
// }
this
.
$refs
.
refmovieFile1
.
inputShow
=
false
;
this
.
parms
.
eid
=
this
.
$u
.
guid
();
},
methods
:
{
imgUrl
()
{
window
.
open
(
this
.
avatorPath
,
"_blank"
);
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
this
.
disabled
=
true
;
if
(
this
.
$refs
.
refFile
.
nameList
.
length
>
0
)
{
this
.
entity
.
attachment
=
this
.
parms
.
eid
;
}
else
{
this
.
entity
.
attachment
=
""
;
}
Api
.
create
(
this
.
entity
)
.
then
((
r
)
=>
{
this
.
disabled
=
false
;
...
...
@@ -198,6 +235,12 @@ export default {
this
.
load
(
v
);
}
},
imgName
(
newName
,
oldName
)
{
console
.
log
(
newName
);
const
imgPathsArr
=
JSON
.
parse
(
newName
);
this
.
entity
.
picture
=
imgPathsArr
[
0
].
filePath
;
this
.
avatorPath
=
fileUrlDown
+
imgPathsArr
[
0
].
filePath
;
},
},
};
</
script
>
\ No newline at end of file
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