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
8f720f24
Commit
8f720f24
authored
Sep 27, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文档送审
parent
85b2ed01
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
293 additions
and
42 deletions
+293
-42
add.vue
pages/word/document/add.vue
+3
-14
api.js
pages/word/document/api.js
+3
-0
index.vue
pages/word/document/index.vue
+5
-3
submit.vue
pages/word/document/submit.vue
+219
-17
word.vue
pages/word/document/word.vue
+63
-8
No files found.
pages/word/document/add.vue
View file @
8f720f24
...
...
@@ -218,23 +218,18 @@
</Col>
</Row>
</Form>
<!--
<Modal
v-model=
"modal"
title=
"文档送审"
footer-hide
fullscreen
:mask-closable=
"false"
>
<Submit
:isId=
"isId"
ref=
"submit"
@
on-close=
"close"
></Submit>
</Modal>
-->
</div>
</
template
>
<
script
>
import
Api
from
"./api"
;
// import Submit from "./submit";
export
default
{
name
:
"Add"
,
components
:
{
// Submit,
},
components
:
{},
data
()
{
return
{
// modal: false,
isId
:
""
,
imgName
:
""
,
avatorPath
:
""
,
fileds
:
[],
//扩展属性
...
...
@@ -339,12 +334,6 @@ export default {
Api
.
create
(
this
.
entity
)
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
// if (this.entity.status == 1) {
// this.modal = true;
// this.isId = r.result.id;
// } else {
// this.modal = false;
// }
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
}
else
{
...
...
pages/word/document/api.js
View file @
8f720f24
...
...
@@ -27,4 +27,7 @@ export default {
listbyid
(
params
){
return
Api
.
get
(
`
${
material
}
/documentpropertydefinition/listbyid`
,
params
);
},
batchstart
(
params
)
{
return
Api
.
post
(
`
${
workflowUrl
}
/instance/batchstart`
,
params
);
//送审
},
}
\ No newline at end of file
pages/word/document/index.vue
View file @
8f720f24
...
...
@@ -42,7 +42,7 @@
</a>
</div>
<Content
:class=
"!showMenu ? 'con_bord' : ''"
>
<Word
ref=
"dataTable"
:treeId=
"treeId"
:addShow=
"addShow"
:ids=
"ids"
/>
<Word
ref=
"dataTable"
:treeId=
"treeId"
:addShow=
"addShow"
:ids=
"ids"
:workFlowIds=
"workFlowIds"
/>
</Content>
</Layout>
</div>
...
...
@@ -70,6 +70,7 @@ export default {
treeId
:
0
,
addShow
:
false
,
ids
:
[],
workFlowIds
:
''
};
},
mounted
()
{
...
...
@@ -127,7 +128,7 @@ export default {
"upId"
);
this
.
list
=
this
.
$u
.
clone
(
data
);
// console.log(this.list);
// console.log(this.list);
});
},
toggle
()
{
...
...
@@ -142,8 +143,9 @@ export default {
},
change
(
a
,
b
)
{
// console.log(a)
//
console.log(b);
console
.
log
(
b
);
this
.
treeId
=
b
.
id
;
this
.
workFlowIds
=
b
.
workFlowIds
//流程id
// if (b.children.length == 0) { //判断最底层才能添加文档
// this.addShow = true;
// this.$refs.dataTable.$refs.grid.reload(this.easySearch);
...
...
pages/word/document/submit.vue
View file @
8f720f24
<
template
>
<div
class=
".detail-document"
>
<div
class=
"body-document"
>
{{
workFlowIds
}}
<div
class=
"body-document"
v-if=
"eid != 0"
>
<h4>
详细信息
</h4>
<Row>
<Col
span=
"20"
>
<div
class=
"new-detail detail-d"
>
<Row>
<Filed
v-for=
"li in fileds"
:key=
"li.field"
:span=
"li.span"
:name=
"li.title+':'"
>
<State
v-if=
"li.dataType==3"
:code=
"li.note"
:value=
"entity[li.field]"
/>
<div
v-else-if=
"li.dataType==8"
>
{{
entity
[
li
.
field
]
}}
</div>
<div
v-else-if=
"li.dataType==5"
v-html=
"entity[li.field]"
></div>
<DTSpan
v-else-if=
"li.dataType==4"
:value=
"entity[li.field]"
/>
<span
v-else
>
{{
entity
[
li
.
field
]
}}
</span
>
<Filed
v-for=
"li in fileds"
:key=
"li.field"
:span=
"li.span"
:name=
"li.title + ':'"
>
<State
v-if=
"li.unitName&&(li.dataType==1||li.dataType==2)"
v-if=
"li.dataType == 3"
:code=
"li.note"
:value=
"entity[li.field]"
/>
<div
v-else-if=
"li.dataType == 8"
>
{{
entity
[
li
.
field
]
}}
</div>
<div
v-else-if=
"li.dataType == 5"
v-html=
"entity[li.field]"
></div>
<DTSpan
v-else-if=
"li.dataType == 4"
:value=
"entity[li.field]"
/>
<span
v-else
>
{{
entity
[
li
.
field
]
}}
</span>
<State
v-if=
"li.unitName && (li.dataType == 1 || li.dataType == 2)"
:code=
"li.note"
:value=
"entity[li.field]"
/>
</Filed>
</Row>
<Row
class=
"filed-d"
>
<Filed
:span=
"12"
:name=
"l('creationTime')+':'"
>
{{
entity
.
creationTime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('creatorUserId')+':'"
>
<Filed
:span=
"12"
:name=
"l('creationTime') + ':'"
>
{{
entity
.
creationTime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('creatorUserId') + ':'"
>
<User
:value=
"entity.creatorUserId"
/>
</Filed>
<Filed
:span=
"12"
:name=
"l('status')+':'"
>
{{
entity
.
status
==
0
?
'草稿'
:
'送审'
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('filePath')+':'"
>
<Filed
:span=
"12"
:name=
"l('status') + ':'"
>
{{
entity
.
status
==
0
?
"草稿"
:
"送审"
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('filePath') + ':'"
>
<files
ref=
"refFile"
:parms=
"parms"
:showList=
"false"
/>
</Filed>
</Row>
...
...
@@ -33,27 +53,91 @@
</Col>
<Col
span=
"4"
class=
"dcm-right"
>
<div
class=
"img-touxiang"
>
<img
:src=
"downUrl+avatorPath"
v-if=
"avatorPath"
/>
<img
src=
"@/assets/images/files_header.png"
v-else
width=
"100%"
height=
"100%"
/>
<img
:src=
"downUrl + avatorPath"
v-if=
"avatorPath"
/>
<img
src=
"@/assets/images/files_header.png"
v-else
width=
"100%"
height=
"100%"
/>
</div>
</Col>
</Row>
</div>
<!--
<DataGrid
v-else
:columns=
"cols"
ref=
"grid"
:conditions=
"easySearch"
:action=
"action"
:initsearch=
"sets"
:tool=
"false"
:page=
"false"
:height=
"300"
:format=
"formatFun"
/>
-->
<DataGrid
v-else
:height=
"300"
:columns=
"columns"
ref=
"grid"
:action=
"action"
:conditions=
"easySearch"
:high=
"false"
:tool=
"false"
:page=
"false"
:format=
"formatFun"
/>
<Process
ref=
"userProcess"
:schemaIdVal=
"workFlowIds"
/>
<div
slot=
"footer"
>
<Button
@
click=
"modalInfo"
>
取消
</Button>
<Button
type=
"primary"
@
click=
"upSave"
>
确定送审
</Button>
</div>
<!-- 信息提示 -->
<Modal
v-model=
"ModalInfo"
title=
"信息提示"
width=
"600"
:mask-closable=
"false"
:scrollable=
"true"
ok-text=
"确定"
cancel-text=
"取消"
>
{{
metCodesStrTxt
}}
<div
slot=
"footer"
>
<Button
@
click=
"ModalInfo = false"
>
取消
</Button>
<Button
type=
"primary"
@
click=
"modalInfoOk"
>
确定
</Button>
</div>
</Modal>
</div>
</
template
>
<
script
>
import
Api
from
"./api"
;
import
Process
from
"@/components/orderOperator/process"
;
export
default
{
name
:
"Add"
,
name
:
"submit"
,
components
:
{
Process
,
},
data
()
{
return
{
action
:
Api
.
index
,
avatorPath
:
""
,
downUrl
:
fileUrlDown
,
entity
:
{},
ModalInfo
:
false
,
metCodesStrTxt
:
""
,
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
},
easySearch
:
{
keys
:
{
op
:
"refName,name"
,
value
:
null
},
categoryId
:
{
op
:
"In"
,
value
:
this
.
ids
,
},
},
fileds
:
[],
parms
:
{
app
:
"material"
,
...
...
@@ -61,14 +145,78 @@ export default {
name
:
""
,
field
:
""
,
},
dataListRetrunNew
:
{
schemaId
:
this
.
workFlowIds
,
//流程id
idList
:
[],
//合格证id List
codeList
:
[],
//合格证编号List
operatorIdList
:
[],
//操作员id
},
//确定后返回
columns
:
[
{
type
:
"selection"
,
width
:
70
,
align
:
"center"
,
},
{
key
:
"id"
,
title
:
this
.
$t
(
"id"
),
hide
:
true
,
align
:
"left"
,
high
:
true
,
},
{
key
:
"name"
,
title
:
this
.
l
(
"title"
),
align
:
"left"
,
high
:
true
},
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"code"
,
title
:
this
.
l
(
"name"
),
align
:
"left"
,
high
:
true
,
},
{
key
:
"status"
,
title
:
this
.
l
(
"status"
),
align
:
"left"
,
high
:
true
,
code
:
"word.document.status"
,
},
{
key
:
"version"
,
title
:
this
.
l
(
"revision"
),
align
:
"left"
,
high
:
true
,
},
{
key
:
"creatorUserId"
,
title
:
this
.
l
(
"creatorUserId"
),
align
:
"left"
,
high
:
true
,
type
:
"user"
,
},
],
};
},
props
:
[
"eid"
,
"treeId"
],
props
:
[
"eid"
,
"ids"
,
"treeId"
,
"rowsTable"
,
"workFlowIds"
],
mounted
()
{
this
.
dataListRetrunNew
.
schemaId
=
this
.
workFlowIds
;
this
.
initFiled
();
this
.
parms
.
eid
=
this
.
$u
.
guid
();
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
//格式化原始数据
formatFun
(
data
)
{
data
=
this
.
rowsTable
;
return
data
;
},
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
...
...
@@ -111,6 +259,60 @@ export default {
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
upSave
()
{
this
.
dataListRetrunNew
.
idList
=
[];
this
.
dataListRetrunNew
.
codeList
=
[];
let
codeList
=
[];
let
idList
=
[];
if
(
this
.
eid
!==
0
)
{
if
(
this
.
entity
.
code
!=
0
)
{
codeList
.
push
(
this
.
entity
.
code
);
}
else
{
codeList
.
push
(
this
.
eid
);
}
idList
.
push
(
this
.
eid
);
}
else
{
this
.
rowsTable
.
forEach
((
e
)
=>
{
idList
.
push
(
e
.
id
);
if
(
e
.
code
)
{
codeList
.
push
(
e
.
code
);
}
else
{
codeList
.
push
(
e
.
id
);
}
});
}
this
.
dataListRetrunNew
.
idList
=
idList
;
this
.
dataListRetrunNew
.
codeList
=
codeList
;
let
metCodesStr
=
JSON
.
stringify
(
codeList
)
.
replace
(
"["
,
""
)
.
replace
(
"]"
,
""
)
.
replace
(
/
\"
/g
,
""
);
this
.
ModalInfoStaut
=
"orderSendReview"
;
this
.
metCodesStrTxt
=
"确定送审此文档吗? "
;
this
.
ModalInfo
=
true
;
},
returnDataList
()
{
let
ues
=
this
.
$refs
.
userProcess
;
this
.
dataListRetrunNew
.
operatorIdList
=
ues
.
immutData
;
alert
(
JSON
.
stringify
(
this
.
dataListRetrunNew
));
// //返回审批数据
return
this
.
dataListRetrunNew
;
},
modalInfoOk
()
{
let
ues
=
this
.
$refs
.
userProcess
;
this
.
dataListRetrunNew
.
operatorIdList
=
ues
.
immutData
;
Api
.
batchstart
(
this
.
dataListRetrunNew
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
ModalInfo
=
false
;
this
.
$Message
.
success
(
"送审成功"
);
this
.
$emit
(
"on-close"
);
this
.
$emit
(
"on-ok"
);
}
});
},
modalInfo
()
{
this
.
$emit
(
"on-close"
);
},
l
(
key
)
{
key
=
"document_property_definition"
+
"."
+
key
;
return
this
.
$t
(
key
);
...
...
@@ -160,7 +362,7 @@ export default {
}
}
.detail-d {
padding
-left: 2
0px;
padding
: 1
0px;
.filed-d {
border-top: 1px solid #e0e0e0;
}
...
...
pages/word/document/word.vue
View file @
8f720f24
...
...
@@ -9,6 +9,8 @@
:type=
"typeInfo"
:span=
"6"
:lazy=
"true"
:format=
"formatFun"
@
on-selection-change=
"onSelect"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
...
...
@@ -35,6 +37,9 @@
@
click=
"changeShwo"
></Button>
</
template
>
<
template
slot=
"batch"
>
<Button
type=
"primary"
@
click=
"modalSchedule"
>
批量送审
</Button>
</
template
>
<
template
slot=
"card"
slot-scope=
"{ row }"
>
<div
class=
"body-card"
>
<Row
class=
"title-i"
>
...
...
@@ -80,6 +85,10 @@
<a
@
click=
"remove(row.id)"
>
<Icon
type=
"ios-trash"
/>
删除
</a
>
<a
@
click=
"view(row.id)"
>
<Icon
type=
"md-document"
/>
详情
</a>
<a
@
click=
"sub(row.id)"
v-if=
"row.status == 1"
>
<Icon
type=
"md-color-wand"
/>
送审
</a>
</div>
</Col>
</Row>
...
...
@@ -97,7 +106,10 @@
<component
:is=
"detail"
:eid=
"curId"
ids:ids
:treeId=
"treeId"
:rowsTable=
"rowsTable"
:workFlowIds=
"workFlowIds"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
...
...
@@ -124,6 +136,11 @@ export default {
curId
:
0
,
downUrl
:
fileUrlDown
,
columns
:
[
{
type
:
"selection"
,
width
:
70
,
align
:
"center"
,
},
{
key
:
"id"
,
title
:
this
.
$t
(
"id"
),
...
...
@@ -150,11 +167,7 @@ export default {
title
:
this
.
l
(
"status"
),
align
:
"left"
,
high
:
true
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
[
h
(
"span"
,
params
.
row
.
status
==
0
?
"草稿"
:
"送审"
),
]);
},
code
:
"word.document.status"
,
},
{
key
:
"version"
,
...
...
@@ -172,8 +185,8 @@ export default {
{
title
:
"操作"
,
key
:
"action"
,
width
:
1
4
0
,
align
:
"
center
"
,
width
:
1
8
0
,
align
:
"
left
"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
...
...
@@ -201,6 +214,14 @@ export default {
},
"删除"
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
this
.
sub
(
params
.
row
.
id
)
},
},
params
.
row
.
status
==
1
?
"送审"
:
""
),
]);
},
},
...
...
@@ -210,18 +231,38 @@ export default {
titleInfo
:
"卡片模式"
,
ModalIm
:
false
,
temTitle
:
"文档管理"
,
selectRows
:
[],
rowsTable
:
[],
};
},
props
:
{
treeId
:
Number
,
addShow
:
Boolean
,
ids
:
Array
,
workFlowIds
:
String
,
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
mounted
()
{},
methods
:
{
//格式化原始数据
formatFun
(
data
)
{
data
.
map
((
e
)
=>
{
if
(
e
.
status
==
1
)
{
e
.
_disabled
=
false
;
}
else
{
e
.
_disabled
=
true
;
}
});
return
data
;
},
onSelect
(
a
,
b
)
{
// console.log(a);
// console.log(b);
//批量选择
this
.
selectRows
=
a
;
},
changeShwo
()
{
//显示模式切换
if
(
this
.
typeInfo
==
"card"
)
{
...
...
@@ -257,7 +298,21 @@ export default {
// }
}
},
sub
(
id
)
{
this
.
fullscreen
=
true
;
this
.
curId
=
id
;
this
.
title
=
"文档送审"
;
this
.
detail
=
()
=>
import
(
"./submit"
);
this
.
modal
=
true
;
},
modalSchedule
()
{
this
.
fullscreen
=
true
;
this
.
rowsTable
=
this
.
selectRows
;
this
.
title
=
"文档送审"
;
this
.
curId
=
0
;
this
.
detail
=
()
=>
import
(
"./submit"
);
this
.
modal
=
true
;
},
view
(
id
)
{
this
.
fullscreen
=
true
;
this
.
curId
=
id
;
...
...
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