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
ba16e0c2
Commit
ba16e0c2
authored
Oct 19, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product' of git.mes123.com:zhouyx/mes-ui into product-rjt
parents
aa47556c
4a7599b0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
139 additions
and
98 deletions
+139
-98
zh-CN.js
i18n/locale/zh-CN.js
+19
-22
index.vue
pages/project/plan/index.vue
+5
-4
add.vue
pages/project/project/add.vue
+115
-72
No files found.
i18n/locale/zh-CN.js
View file @
ba16e0c2
...
...
@@ -1818,27 +1818,24 @@ export default {
type
:
'类型'
,
attachment
:
'附件'
,
executor
:
'执行人'
,
},
project_main
:
{
creationTime
:
'创建时间'
,
creatorUserId
:
'创建人'
,
lastModificationTime
:
'更新时间'
,
lastModifierUserId
:
'更新人'
,
isDeleted
:
'删除人'
,
deletionTime
:
'删除时间'
,
deleterUserId
:
'删除人'
,
title
:
'标题'
,
note
:
'备注'
,
state
:
'状态'
,
type
:
'分类'
,
picture
:
'图片'
,
attachment
:
'附件'
,
phase
:
'阶段'
,
startDate
:
'开始日期'
,
endDate
:
'结束日期'
,
businessUnits
:
'业务单位'
,
}
,
project_main
:
{
creationTime
:
'创建时间'
,
creatorUserId
:
'创建人'
,
lastModificationTime
:
'更新时间'
,
lastModifierUserId
:
'更新人'
,
isDeleted
:
'删除人'
,
deletionTime
:
'删除时间'
,
deleterUserId
:
'删除人'
,
title
:
'标题'
,
note
:
'备注'
,
state
:
'状态'
,
type
:
'分类'
,
picture
:
'图片'
,
attachment
:
'附件'
,
phase
:
'阶段'
,
startDate
:
'开始日期'
,
endDate
:
'结束日期'
,
businessUnits
:
'业务单位'
,
}
}
pages/project/plan/index.vue
View file @
ba16e0c2
...
...
@@ -155,23 +155,24 @@ export default {
},
mounted
()
{
console
.
log
(
this
);
this
.
search
();
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
ok
()
{
// this.$refs.grid.load
();
this
.
search
();
this
.
modal
=
false
;
this
.
curId
=
0
;
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
//
this.$refs.grid.reload(this.easySearch);
var
params
=
{
conditions
:[]
}
Api
.
list
(
params
).
then
(
r
=>
{
this
.
list
=
r
.
result
;
})
},
add
()
{
...
...
@@ -201,7 +202,7 @@ export default {
remove
(
id
)
{
Api
.
delete
(
id
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
search
();
this
.
$Message
.
success
(
"删除成功"
);
}
});
...
...
pages/project/project/add.vue
View file @
ba16e0c2
<
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