Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
W
web
Project
Project
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
INET-TWO
web
Commits
5b56a66e
Commit
5b56a66e
authored
Aug 07, 2024
by
ztf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加自定义组件
parent
c82ed5da
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
1853 additions
and
0 deletions
+1853
-0
index.vue
...mmonComponents/components/AssociationFormAddMVM/index.vue
+5
-0
file.js
applications/dee-doc/src/api/file.js
+16
-0
index.vue
...privateComponents/components/ApplyDoc2ReplyLink/index.vue
+370
-0
index.vue
...ponents/components/ClosedLoopMattersRelatedLink/index.vue
+178
-0
index.vue
...omponents/components/ExtRelatedInterfaceLinkAdd/index.vue
+136
-0
index.vue
...c/src/privateComponents/components/InternalUnit/index.vue
+169
-0
index.vue
...c/src/privateComponents/components/ProposerUnit/index.vue
+276
-0
index.vue
...ponents/components/RelatedIncomeContractAddList/index.vue
+83
-0
index.vue
...nents/components/RelatedSpendingContractAddList/index.vue
+83
-0
index.vue
...rivateComponents/components/SelectInterfaceInfo/index.vue
+62
-0
index.vue
...ee-doc/src/privateComponents/components/editECR/index.vue
+170
-0
index.vue
...c/src/privateComponents/components/modifyNumber/index.vue
+132
-0
index.vue
.../src/privateComponents/components/updateVersion/index.vue
+173
-0
No files found.
applications/architecture-dee/src/commonComponents/components/AssociationFormAddMVM/index.vue
View file @
5b56a66e
...
...
@@ -90,6 +90,10 @@ export default {
type
:
[
String
,
Number
],
default
:
()
=>
''
},
versionControl
:
{
// 是否受版本控制
type
:
Boolean
,
default
:
true
},
latestOptions
:
{
// 版本选择
type
:
Array
,
default
:
()
=>
[
...
...
@@ -806,6 +810,7 @@ export default {
params
.
searchItems
.
items
[
findIndex
].
fieldName
=
'resourceNo'
}
}
this
.
$api
.
searchApi
(
modelName
,
params
,
this
.
defaultData
.
modelName
.
versionControl
!==
false
).
then
(
res
=>
{
// this.$api.searchApi(this.defaultData.modelName.name, params, this.defaultData.modelName.versionControl).then(res => {
this
.
tableData
=
this
.
filterData
(
res
.
items
?
res
.
items
.
content
:
[])
...
...
applications/dee-doc/src/api/file.js
0 → 100644
View file @
5b56a66e
import
{
get
,
downloadFile
// del
}
from
'../utils/http'
// 文件下载
export
function
downPdf
(
params
)
{
return
get
(
'/dfs/fileManager/downloadCipher'
,
params
)
}
export
function
downFileByFileCode
(
fileCode
)
{
return
downloadFile
(
`/dfs/fileManager/downloadio/fileCode?fileCode=
${
fileCode
}
`
)
}
export
function
downFileByFileId
(
fileId
)
{
return
downloadFile
(
`/dfs/fileManager/downloadio?fileId=
${
fileId
}
`
)
}
applications/dee-doc/src/privateComponents/components/ApplyDoc2ReplyLink/index.vue
0 → 100644
View file @
5b56a66e
<
template
>
<div
v-dee-loading=
"loading"
class=
"dee-model"
>
<dee-table
:selection-row=
"[]"
:columns=
"columns"
:data=
"tableData"
@
selection-change=
"selectionChange"
>
<dee-tools
slot=
"header"
:permissions=
"permissions"
:perm-enable=
"true"
:tools=
"BtnTools"
/>
</dee-table>
<dee-add-model-case-dialog
:show-sub-type=
"true"
width=
"60%"
title=
"添加"
:show-dialog=
"addDialog"
model-name=
"DxDocument"
search-attr=
"number,name"
:default-data=
"
{latest:'LATEST',modelName: 'DxDocument',state:'published'}"
@close="addDialog= false"
@selection="addLinks"
/>
</div>
</
template
>
<
script
>
import
{
post
}
from
'@/utils/http'
import
_set
from
'lodash.set'
export
default
{
name
:
'ApplyDoc2ReplyLink'
,
componentName
:
'相关跟进数据'
,
modelRelationObjs
:
[
'DxDocument'
],
props
:
{
basicData
:
{
type
:
Object
,
default
:
()
=>
null
},
permissions
:
{
type
:
[
Array
,
Object
],
default
:
()
=>
null
}
},
data
()
{
return
{
linksName
:
'ApplyDoc'
,
replayLinksName
:
'ReplyDoc'
,
loading
:
false
,
tableData
:
[],
selection
:
[],
stateOption
:
[],
addType
:
'addLink'
,
addDialog
:
false
,
BtnTools
:
[
{
name
:
'新增申请'
,
icon
:
'/icons/c-add.png'
,
key
:
'ApplyDoc-add'
,
handler
:
{
click
:
()
=>
{
this
.
addType
=
'addLink'
this
.
addDialog
=
true
}
}
},
{
name
:
'移除申请'
,
icon
:
'/icons/c-delete.png'
,
key
:
'ApplyDoc-remove'
,
handler
:
{
click
:
()
=>
{
this
.
removeLinks
()
}
}
},
{
name
:
'添加答复'
,
icon
:
'/icons/c-creatapply.png'
,
key
:
'ApplyDoc-replayAdd'
,
handler
:
{
click
:
()
=>
{
this
.
addRelay
()
}
}
},
{
name
:
'移除答复'
,
icon
:
'/icons/c-delete.png'
,
key
:
'ApplyDoc-replayRemove'
,
handler
:
{
click
:
()
=>
{
this
.
removeRelay
()
}
}
}
]
}
},
computed
:
{
columns
()
{
return
[{
title
:
'申请数据'
,
'align'
:
'center'
,
children
:
[{
title
:
'状态'
,
'key'
:
'target.displayState'
},
{
title
:
'编号'
,
key
:
'target.number'
,
fixed
:
true
,
'formatterKey'
:
'component'
,
'component'
:
{
'name'
:
'jumpDetailsPage'
,
'show'
:
true
,
'props'
:
'{}'
}
},
{
title
:
'名称'
,
key
:
'target.name'
},
{
title
:
'类型'
,
key
:
'target.subTypeDisplayName'
},
{
title
:
'版本'
,
key
:
'target.displayVersion'
}]
},
{
title
:
'答复数据'
,
'align'
:
'center'
,
children
:
[{
title
:
'状态'
,
'key'
:
'replay.displayState'
},
{
title
:
'编号'
,
key
:
'replay.number'
,
'formatterKey'
:
'component'
,
'component'
:
{
'name'
:
'jumpDetailsPage'
,
'show'
:
true
,
'props'
:
'{}'
}
},
{
title
:
'名称'
,
key
:
'replay.name'
},
{
title
:
'类型'
,
key
:
'replay.subTypeDisplayName'
},
{
title
:
'版本'
,
key
:
'replay.displayVersion'
}]
}]
},
tableKey
()
{
return
'ApplyDocLink'
},
linkType
()
{
return
'target'
}
},
watch
:
{},
// 生命周期 - 创建完成(访问当前this实例)
created
()
{},
// 生命周期 - 挂载完成(访问DOM元素)
mounted
()
{
this
.
getStateList
()
},
methods
:
{
getStateList
()
{
this
.
$utils
.
getDicListByCode
(
'ObjStatus'
).
then
((
res
)
=>
{
this
.
stateOption
=
res
this
.
search
()
})
},
search
()
{
if
(
!
this
.
linkType
)
{
return
}
this
.
loading
=
true
const
params
=
{
'pageFrom'
:
1
,
'pageSize'
:
999
,
'openProps'
:
[{
'name'
:
'target'
}],
'searchItems'
:
{
'children'
:
[],
'items'
:
[{
'fieldName'
:
'sourceId'
,
'operator'
:
'EQ'
,
'value'
:
this
.
basicData
.
masterId
}],
'operator'
:
'AND'
}
}
post
(
`/
${
this
.
linksName
}
/find/recursion`
,
params
).
then
(
res
=>
{
if
(
res
.
items
&&
res
.
items
.
content
)
{
this
.
getReplyDoc
(
res
.
items
.
content
,
params
)
}
}).
catch
(()
=>
{
this
.
loading
=
false
})
},
getReplyDoc
(
items
)
{
const
data
=
items
.
map
(
r
=>
{
r
.
show
=
true
_set
(
r
,
'target.displayState'
,
this
.
getStateDisplay
(
r
.
target
&&
r
.
target
.
state
))
return
r
})
const
replayLinkIds
=
data
.
map
(
r
=>
r
.
replyLinkId
).
filter
(
r
=>
r
)
if
(
!
replayLinkIds
||
!
replayLinkIds
.
length
)
{
this
.
tableData
=
data
this
.
loading
=
false
return
}
const
params
=
{
'pageFrom'
:
1
,
'pageSize'
:
999
,
'openProps'
:
[{
'name'
:
'target'
}],
'searchItems'
:
{
'children'
:
[],
'items'
:
[{
'fieldName'
:
'id'
,
'operator'
:
'IN'
,
'value'
:
replayLinkIds
}],
'operator'
:
'AND'
}
}
post
(
`/
${
this
.
replayLinksName
}
/find/recursion`
,
params
).
then
(
res
=>
{
if
(
res
.
items
&&
res
.
items
.
content
)
{
res
.
items
.
content
.
forEach
(
row
=>
{
const
link
=
data
.
find
(
r
=>
r
.
replyLinkId
===
row
.
id
)
if
(
link
)
{
link
.
replay
=
row
.
target
_set
(
link
,
'replay.displayState'
,
this
.
getStateDisplay
(
row
.
target
&&
row
.
target
.
state
))
}
})
console
.
log
(
data
)
this
.
tableData
=
data
}
}).
finally
(()
=>
{
this
.
loading
=
false
})
},
getStateDisplay
(
code
)
{
if
(
!
code
)
{
return
''
}
const
item
=
this
.
stateOption
.
find
(
r
=>
r
.
value
===
code
)
return
item
?
item
.
label
:
code
},
addLinks
(
rows
)
{
if
(
this
.
addType
===
'addLink'
)
{
const
links
=
rows
.
map
(
row
=>
{
return
{
sourceId
:
this
.
basicData
.
masterId
,
sourceIdType
:
'DxDocument'
,
target
:
row
,
operator
:
'ADD'
}
})
this
.
updateLinks
(
links
,
()
=>
{
this
.
addDialog
=
false
this
.
search
()
})
return
}
if
(
rows
.
length
>
1
)
{
this
.
$utils
.
showMessageWarning
(
'一条申请数据只能有一个答复数据!'
)
return
}
this
.
addRelayLinks
(
rows
)
},
addRelay
()
{
if
(
!
this
.
selection
||
!
this
.
selection
.
length
)
{
this
.
$utils
.
showMessageWarning
(
'请先选择申请数据!'
)
return
}
if
(
this
.
selection
.
length
!==
1
)
{
this
.
$utils
.
showMessageWarning
(
'只能选择一条申请数据答复!'
)
return
}
this
.
addType
=
'replayLink'
this
.
addDialog
=
true
},
addRelayLinks
(
rows
)
{
const
replayLinks
=
rows
.
map
(
r
=>
{
return
{
sourceId
:
this
.
basicData
.
masterId
,
sourceIdType
:
'DxDocument'
,
target
:
r
,
operator
:
'ADD'
}
})
this
.
updateReplayLinks
(
replayLinks
,
(
res
)
=>
{
// 生成答复链接
const
params
=
this
.
selection
.
map
(
r
=>
{
return
{
id
:
r
.
id
,
operator
:
'MODIFY'
}
})
params
[
0
].
replyLinkId
=
res
.
items
[
0
].
id
// 将答复链接id 写入 申请链接
this
.
updateLinks
(
params
,
()
=>
{
this
.
addDialog
=
false
this
.
search
()
})
})
},
selectionChange
(
rows
)
{
this
.
selection
=
rows
},
removeLinks
()
{
const
links
=
this
.
selection
.
map
(
r
=>
{
const
link
=
{
id
:
r
.
id
,
operator
:
'REMOVE'
}
return
link
})
if
(
links
.
length
===
0
)
{
this
.
$utils
.
showMessageWarning
(
'请选择要删除的项'
)
return
}
const
replayLinks
=
this
.
selection
.
filter
(
r
=>
r
.
replyLinkId
).
map
(
r
=>
{
return
{
id
:
r
.
replyLinkId
,
operator
:
'REMOVE'
}
})
this
.
updateReplayLinks
(
replayLinks
,
()
=>
{
this
.
updateLinks
(
links
,
()
=>
{
this
.
search
()
})
})
},
removeRelay
()
{
if
(
this
.
selection
.
length
===
0
)
{
this
.
$utils
.
showMessageWarning
(
'请选择要删除的项'
)
return
}
const
replayLinks
=
this
.
selection
.
map
(
r
=>
{
return
{
id
:
r
.
replyLinkId
,
operator
:
'REMOVE'
}
})
const
links
=
this
.
selection
.
map
(
r
=>
{
return
{
id
:
r
.
id
,
operator
:
'MODIFY'
,
replyLinkId
:
''
}
})
this
.
updateReplayLinks
(
replayLinks
,
()
=>
{
this
.
updateLinks
(
links
,
()
=>
{
this
.
search
()
})
})
},
updateLinks
(
rows
,
cb
)
{
return
this
.
update
(
rows
,
this
.
linksName
,
cb
)
},
updateReplayLinks
(
rows
,
cb
)
{
return
this
.
update
(
rows
,
this
.
replayLinksName
,
cb
)
},
update
(
rows
,
type
,
cb
)
{
post
(
`/
${
type
}
/recursions`
,
rows
).
then
(
res
=>
{
cb
&&
cb
(
res
)
}).
catch
(()
=>
{
this
.
loading
=
false
})
}
}
}
</
script
>
<
style
lang=
"scss"
>
/* @import url(); 引入css类 */
</
style
>
applications/dee-doc/src/privateComponents/components/ClosedLoopMattersRelatedLink/index.vue
0 → 100644
View file @
5b56a66e
<
template
>
<div
v-dee-loading=
"loading"
class=
"dee-model"
>
<dee-table
:columns=
"columns"
:data=
"tableData"
/>
</div>
</
template
>
<
script
>
import
{
post
}
from
'@/utils/http'
export
default
{
name
:
'ClosedLoopMattersRelatedLink'
,
componentName
:
'相关闭环跟进事项'
,
props
:
{
basicData
:
{
type
:
Object
,
default
:
()
=>
null
},
permissions
:
{
type
:
[
Array
,
Object
],
default
:
()
=>
null
}
},
data
()
{
return
{
applyDocLoading
:
false
,
replyDocLoding
:
false
,
applyDocList
:
[],
replayDocList
:
[],
columns
:
[{
'title'
:
'编号'
,
'key'
:
'source.number'
,
'level'
:
1
,
'show'
:
true
,
'defaultItem'
:
true
,
'formatterKey'
:
'component'
,
'component'
:
{
'name'
:
'jumpDetailsPage'
,
'show'
:
true
,
'props'
:
'{}'
}
},
{
'title'
:
'名称'
,
'key'
:
'source.name'
,
'level'
:
1
,
'show'
:
true
,
'defaultItem'
:
true
},
{
'title'
:
'版本'
,
'key'
:
'source.displayVersion'
,
'level'
:
1
,
'show'
:
true
,
'defaultItem'
:
true
},
{
'title'
:
'状态'
,
'key'
:
'source.state'
,
'fildProp'
:
{
'id'
:
31
,
'refId'
:
null
,
'type'
:
'DictDataVO'
,
'rule'
:
{
'typeName'
:
'DictDataVO'
,
'dictTypeCode'
:
'ObjStatus'
},
'attrType'
:
'BASE'
},
'show'
:
true
,
'defaultItem'
:
true
},
{
'title'
:
'关联者'
,
'key'
:
'creator.userName'
,
'parentKey'
:
'creator'
,
'level'
:
1
,
'show'
:
true
,
'defaultItem'
:
true
},
{
'title'
:
'关联时间'
,
'key'
:
'createTime'
,
'defaultItem'
:
true
},
{
'title'
:
'关联描述'
,
'key'
:
'linkDescript'
,
'defaultItem'
:
true
}]
}
},
computed
:
{
tableData
()
{
return
[...
this
.
applyDocList
,
...
this
.
replayDocList
]
},
loading
()
{
return
this
.
replyDocLoding
&&
this
.
applyDocLoading
}
},
watch
:
{
basicData
:
{
immediate
:
true
,
deep
:
true
,
handler
:
function
(
val
)
{
if
(
Object
.
keys
(
val
).
length
>
0
)
{
this
.
getTableData
()
}
}
}
},
// 生命周期 - 创建完成(访问当前this实例)
created
()
{},
// 生命周期 - 挂载完成(访问DOM元素)
mounted
()
{},
methods
:
{
getTableData
()
{
this
.
applyDocList
=
[]
this
.
replayDocList
=
[]
this
.
getApplyDoc
()
this
.
getReplayDoc
()
},
getApplyDoc
()
{
this
.
applyDocLoading
=
true
const
params
=
{
'pageFrom'
:
1
,
'pageSize'
:
999
,
'openProps'
:
[{
'name'
:
'source'
}],
'searchItems'
:
{
'children'
:
[],
'items'
:
[{
'fieldName'
:
'targetId'
,
'operator'
:
'EQ'
,
'value'
:
this
.
basicData
.
versionId
}],
'operator'
:
'AND'
}
}
post
(
`/ApplyDoc/find/recursion`
,
params
).
then
(
res
=>
{
if
(
res
.
items
&&
res
.
items
.
content
)
{
this
.
applyDocList
=
res
.
items
.
content
}
}).
finally
(()
=>
{
this
.
applyDocLoading
=
false
})
},
getReplayDoc
()
{
this
.
replyDocLoding
=
true
const
params
=
{
'pageFrom'
:
1
,
'pageSize'
:
999
,
'openProps'
:
[{
'name'
:
'source'
}],
'searchItems'
:
{
'children'
:
[],
'items'
:
[{
'fieldName'
:
'targetId'
,
'operator'
:
'EQ'
,
'value'
:
this
.
basicData
.
versionId
}],
'operator'
:
'AND'
}
}
post
(
`/ReplyDoc/find/recursion`
,
params
).
then
(
res
=>
{
if
(
res
.
items
&&
res
.
items
.
content
)
{
this
.
replayDocList
=
res
.
items
.
content
}
}).
finally
(()
=>
{
this
.
replyDocLoding
=
false
})
}
}
}
</
script
>
<
style
lang=
"scss"
>
/* @import url(); 引入css类 */
</
style
>
applications/dee-doc/src/privateComponents/components/ExtRelatedInterfaceLinkAdd/index.vue
0 → 100644
View file @
5b56a66e
<!-- 相关接口单添加
<template>
<dee-add-model-case-dialog
:show-sub-type="true"
width="60%"
title="添加"
:show-dialog="addDialog"
model-name="DxDocument"
search-attr="number,name"
:default-data="{latest:'LATEST',modelName: 'DxDocument',state:'published'}"
@close="addDialog= false"
@selection="addLinks"
/>
</template>
<script>
export default {
name: 'ExtRelatedInterfaceLinkAdd',
componentName: '相关接口单-添加',
components: {},
props: {
dialogShow: {
type: Boolean,
default: false
},
obj: {
type: Object,
default: () => {}
},
pageData: {
type: Object,
default: () => {}
}
},
data() {
return {
// defaultData: {
// latest: '',
// modelName: 'DxDocument'
// },
// latestOptions: [
// { value: '', label: '全部' },
// { value: 'LATEST', label: '最新' },
// { value: 'VERSION_NEWEST', label: '修订' }
// ]
}
},
computed: {},
watch: {},
created() {},
mounted() {},
methods: {
selection(rows) {
this.$emit('add', rows)
this.$emit('close')
},
cancel() {
this.$emit('close')
}
}
}
</script>
<style lang='scss' scoped>
</style> -->
<
template
>
<!--
<dee-add-model-case-dialog
:show-sub-type=
"true"
width=
"70%"
title=
"添加对象"
:show-dialog=
"dialogShow"
:latest-options=
"latestOptions"
:default-data=
"defaultData"
@
close=
"$emit('close')"
@
selection=
"selection"
/>
-->
<!-- width="70%"
title="添加"
:show-dialog="addDialog" -->
<div>
相关接口单添加
<dee-add-model-case-dialog
:show-sub-type=
"true"
model-name=
"DxDocument"
search-attr=
"number,name"
:default-data=
"defaultData"
@
close=
"$emit('close')"
@
selection=
"selection"
/>
</div>
</
template
>
<
script
>
export
default
{
name
:
'ExtRelatedInterfaceLinkAdd'
,
componentName
:
'相关接口单-添加'
,
components
:
{},
props
:
{
addDialog
:
{
type
:
Boolean
,
default
:
false
},
obj
:
{
type
:
Object
,
default
:
()
=>
{}
},
pageData
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
data
()
{
return
{
defaultData
:
{
latest
:
''
,
modelName
:
'DxDocument'
}
}
},
computed
:
{},
watch
:
{},
created
()
{},
mounted
()
{},
methods
:
{
selection
(
rows
)
{
this
.
$emit
(
'add'
,
rows
)
this
.
$emit
(
'close'
)
},
cancel
()
{
this
.
$emit
(
'close'
)
}
}
}
</
script
>
<
style
lang=
"scss"
></
style
>
applications/dee-doc/src/privateComponents/components/InternalUnit/index.vue
0 → 100644
View file @
5b56a66e
<
template
>
<div
class=
"dee-model foreign-unit-mode"
>
<div
v-show=
"editState||value"
><span>
{{
value
}}
</span>
<el-button
type=
"text"
@
click=
"showDialogFlag=true"
>
{{
editState
?
'设置'
:
'查看'
}}
</el-button>
</div>
<dee-dialog
:dialog-visible=
"showDialogFlag"
:title=
"editState?'外单位选择':'外单位查看'"
width=
"800px"
class=
"foreign-unit-dialog"
:dialog-bttons=
"editState?dialogBttons:[]"
@
on-submit=
"submit"
@
on-cancel=
"showDialogFlag=false"
@
handleClose=
"showDialogFlag=false"
>
<div
v-for=
"(units,index) in unitLists"
:key=
"index"
class=
"rows"
>
<div
class=
"sub-title"
>
{{
units
.
title
}}
</div>
<div
class=
"checkbox"
>
<el-checkbox
v-for=
"(unit) in units.children"
:key=
"unit.key"
:checked=
"unit.checked"
:disabled=
"unit.disabled"
@
change=
"(val)=>
{unit.checked = val}"
>
{{
unit
.
title
}}
</el-checkbox>
</div>
</div>
</dee-dialog>
</div>
</
template
>
<
script
>
export
default
{
name
:
'InternalUnit'
,
componentName
:
'外单位选择或查看'
,
props
:
{
disabled
:
{
type
:
Boolean
,
default
:
false
},
readOnly
:
{
type
:
Boolean
,
default
:
false
},
value
:
{
type
:
[
String
,
Object
],
default
:
()
=>
''
}
},
data
()
{
return
{
dictOptions
:
[],
dialogBttons
:
[{
type
:
'submit'
,
text
:
'提交'
,
component
:
{
type
:
'primary'
}
},
{
type
:
'cancel'
,
text
:
'取消'
,
component
:
{}
}],
showDialogFlag
:
false
,
checkedValue
:
[]
}
},
computed
:
{
editState
()
{
return
!
this
.
disabled
&&
!
this
.
readOnly
},
serviceApi
()
{
return
this
.
$getService
(
'DictData'
,
{
versionControl
:
false
}).
baseQuery
().
orderByDesc
(
'modifyTime'
)
},
unitLists
()
{
if
(
!
this
.
dictOptions
||
this
.
dictOptions
.
length
===
0
)
{
return
[]
}
return
this
.
setChecked
(
this
.
dictOptions
,
this
.
value
)
}
},
watch
:
{},
// 生命周期 - 创建完成(访问当前this实例)
created
()
{},
// 生命周期 - 挂载完成(访问DOM元素)
mounted
()
{
this
.
init
()
},
methods
:
{
init
()
{
this
.
serviceApi
.
page
(
1
,
1000
)
.
search
({
data
:
{
items
:
[{
fieldName
:
'dictCode'
,
operator
:
'EQ'
,
value
:
'ExternalParties'
},
{
fieldName
:
'dictState'
,
operator
:
'EQ'
,
value
:
'ENABLE'
}],
operator
:
'AND'
}
}).
then
(
res
=>
{
this
.
dictOptions
=
res
.
content
})
},
submit
()
{
const
checked
=
[]
this
.
unitLists
.
forEach
(
items
=>
{
if
(
items
.
children
&&
items
.
children
.
length
)
{
items
.
children
.
forEach
(
unit
=>
{
if
(
unit
.
checked
)
{
checked
.
push
(
unit
.
title
)
}
})
}
})
this
.
$emit
(
'input'
,
checked
.
join
())
this
.
showDialogFlag
=
false
},
setChecked
(
options
,
checkedStr
)
{
const
checked
=
checkedStr
?
checkedStr
.
split
(
','
)
:
[]
// 数据洗澡
const
list
=
options
.
map
(
r
=>
{
return
{
title
:
r
.
dictValue
,
key
:
r
.
dictKey
,
parentKey
:
r
.
parentKey
,
disabled
:
!
this
.
editState
,
checked
:
checked
.
includes
(
r
.
dictKey
)
}
})
// 分类
const
parent
=
list
.
filter
(
r
=>
!
r
.
parentKey
)
parent
.
forEach
(
item
=>
{
item
.
children
=
list
.
filter
(
r
=>
r
.
parentKey
===
item
.
key
)
})
return
parent
}
}
}
</
script
>
<
style
lang=
"scss"
>
/* @import url(); 引入css类 */
.foreign-unit-dialog
{
.rows
{
margin-bottom
:
20px
;
}
.title-bar
{
margin-bottom
:
6px
;
font-weight
:
700
;
&
:before
{
content
:
""
;
width
:
4px
;
height
:
13px
;
-ms-flex-item-align
:
center
;
align-self
:
center
;
margin-right
:
12px
;
}
}
}
</
style
>
applications/dee-doc/src/privateComponents/components/ProposerUnit/index.vue
0 → 100644
View file @
5b56a66e
/*
* 提出方 可以选外单位和 内部设计维度
*/
<
template
>
<div
class=
"dee-model foreign-unit-mode"
>
<div
v-show=
"editState||cloneValue"
>
{{
cloneValue
}}
<el-button
type=
"text"
@
click=
"showDialogFlag=true"
>
{{
editState
?
'设置'
:
'查看'
}}
</el-button></div>
<dee-dialog
:dialog-visible=
"showDialogFlag"
:title=
"editState?'选择':'查看'"
width=
"800px"
class=
"foreign-unit-dialog"
:dialog-bttons=
"editState?dialogBttons:[]"
@
on-submit=
"submit"
@
on-cancel=
"showDialogFlag=false"
@
handleClose=
"showDialogFlag=false"
>
<div
:key=
"formKey"
>
<div
class=
"unit-type"
>
<label>
外单位
</label>
<el-button
type=
"text"
@
click=
"()=>
{setAll('ext');clear('int')}">全选
</el-button>
<el-button
type=
"text"
@
click=
"clear('ext')"
>
全清
</el-button>
</div>
<div
v-for=
"(units,index) in unitLists"
:key=
"index"
class=
"rows"
>
<div
class=
"sub-title"
>
{{
units
.
title
}}
</div>
<div
class=
"checkbox"
>
<el-checkbox
v-for=
"unit in units.children"
:key=
"unit.key"
:checked=
"unit.checked"
:disabled=
"unit.disabled"
@
change=
"(val)=>
{unit.checked = val;clear('int')}"
>
{{
unit
.
title
}}
</el-checkbox>
</div>
</div>
<div
class=
"unit-type"
>
<label>
内部单位
</label>
<el-button
type=
"text"
@
click=
"()=>
{setAll('int');clear('ext')}">全选
</el-button>
<el-button
type=
"text"
@
click=
"clear('int')"
>
全清
</el-button>
</div>
<div
class=
"checkbox"
>
<el-checkbox
v-for=
"unit in internalUnit"
:key=
"unit.key"
:checked=
"unit.checked"
:disabled=
"unit.disabled"
@
change=
"(val)=>
{unit.checked = val;clear('ext')}"
>
{{
unit
.
title
}}
</el-checkbox>
</div>
</div>
</dee-dialog>
</div>
</
template
>
<
script
>
import
_get
from
'lodash.get'
import
{
post
}
from
'@/utils/http'
export
default
{
name
:
'ProposerUnit'
,
componentName
:
'提出方'
,
props
:
{
scope
:
{
type
:
Object
,
default
:
null
},
disabled
:
{
type
:
Boolean
,
default
:
false
},
readOnly
:
{
type
:
Boolean
,
default
:
false
},
value
:
{
type
:
[
String
,
Object
],
default
:
()
=>
''
}
},
data
()
{
return
{
formKey
:
0
,
dictOptions
:
[],
dialogBttons
:
[{
type
:
'submit'
,
text
:
'提交'
,
component
:
{
type
:
'primary'
}
},
{
type
:
'cancel'
,
text
:
'取消'
,
component
:
{}
}],
internalUnit
:
[],
showDialogFlag
:
false
}
},
computed
:
{
editState
()
{
return
!
this
.
disabled
&&
!
this
.
readOnly
&&
!
this
.
scope
},
serviceApi
()
{
return
this
.
$getService
(
'DictData'
,
{
versionControl
:
false
}).
baseQuery
().
orderByDesc
(
'modifyTime'
)
},
unitLists
()
{
if
(
!
this
.
dictOptions
||
this
.
dictOptions
.
length
===
0
)
{
return
[]
}
return
this
.
setChecked
(
this
.
dictOptions
,
this
.
cloneValue
)
},
rowValue
()
{
if
(
!
this
.
scope
||
!
this
.
scope
.
column
||
!
this
.
scope
.
row
)
{
return
null
}
return
_get
(
this
.
scope
.
row
,
this
.
scope
.
column
.
property
)
},
cloneValue
()
{
return
this
.
rowValue
||
this
.
value
}
},
watch
:
{},
// 生命周期 - 创建完成(访问当前this实例)
created
()
{},
// 生命周期 - 挂载完成(访问DOM元素)
mounted
()
{
this
.
init
()
},
methods
:
{
init
()
{
this
.
serviceApi
.
page
(
1
,
1000
)
.
search
({
data
:
{
items
:
[{
fieldName
:
'dictCode'
,
operator
:
'EQ'
,
value
:
'ExternalParties'
},
{
fieldName
:
'dictState'
,
operator
:
'EQ'
,
value
:
'ENABLE'
}],
operator
:
'AND'
}
}).
then
(
res
=>
{
this
.
dictOptions
=
res
.
content
})
// this.getInternalUnit()
},
getInternalUnit
()
{
const
params
=
{
'items'
:
[],
'operator'
:
'AND'
,
'sortAsc'
:
true
,
'sortProperties'
:
[
'orgSort'
]
}
post
(
'/Organization/nodes'
,
params
).
then
(
res
=>
{
if
(
res
&&
res
.
items
)
{
const
orgs
=
res
.
items
.
find
(
r
=>
r
.
orgCode
===
'001'
)
if
(
orgs
&&
orgs
.
children
)
{
this
.
internalUnit
=
orgs
.
children
.
map
(
r
=>
{
return
{
key
:
r
.
orgCode
,
title
:
r
.
orgName
,
disabled
:
!
this
.
editState
,
checked
:
this
.
cloneValue
.
indexOf
(
r
.
orgCode
)
>
-
1
}
})
}
}
})
},
submit
()
{
const
checked
=
[]
this
.
unitLists
.
forEach
(
items
=>
{
if
(
items
.
children
&&
items
.
children
.
length
)
{
items
.
children
.
forEach
(
unit
=>
{
console
.
log
(
'unit'
,
unit
)
if
(
unit
.
checked
)
{
checked
.
push
(
unit
.
title
)
}
})
}
})
this
.
internalUnit
.
forEach
(
item
=>
{
console
.
log
(
'item'
,
item
)
if
(
item
.
checked
)
{
checked
.
push
(
item
.
title
)
}
})
console
.
log
(
'checked'
,
checked
)
this
.
$emit
(
'input'
,
checked
.
join
())
this
.
showDialogFlag
=
false
},
setChecked
(
options
,
checkedStr
)
{
const
checked
=
checkedStr
?
checkedStr
.
split
(
','
)
:
[]
// 数据洗澡
const
list
=
options
.
map
(
r
=>
{
return
{
title
:
r
.
dictValue
,
key
:
r
.
dictKey
,
parentKey
:
r
.
parentKey
,
disabled
:
!
this
.
editState
,
checked
:
checked
.
includes
(
r
.
dictKey
)
}
})
// 分类
const
parent
=
list
.
filter
(
r
=>
!
r
.
parentKey
)
parent
.
forEach
(
item
=>
{
item
.
children
=
list
.
filter
(
r
=>
r
.
parentKey
===
item
.
key
)
})
return
parent
},
clear
(
type
)
{
if
(
!
this
.
editState
)
{
return
}
if
(
type
===
'ext'
)
{
this
.
unitLists
.
forEach
((
r
)
=>
{
r
.
children
&&
r
.
children
.
forEach
(
m
=>
{
m
.
checked
=
false
})
})
}
if
(
type
===
'int'
)
{
this
.
internalUnit
.
forEach
((
r
)
=>
{
r
.
checked
=
false
})
}
this
.
refresh
()
},
setAll
(
type
)
{
if
(
!
this
.
editState
)
{
return
}
if
(
type
===
'ext'
)
{
this
.
unitLists
.
forEach
((
r
)
=>
{
r
.
children
&&
r
.
children
.
forEach
(
m
=>
{
m
.
checked
=
true
})
})
}
if
(
type
===
'int'
)
{
this
.
internalUnit
.
forEach
((
r
)
=>
{
r
.
checked
=
true
})
}
this
.
refresh
()
},
refresh
()
{
this
.
formKey
++
}
}
}
</
script
>
<
style
lang=
"scss"
>
/* @import url(); 引入css类 */
.foreign-unit-dialog
{
.rows
{
margin-bottom
:
20px
;
}
.unit-type
{
label
{
font
:
size
18px
;
font-weight
:
900
;
}
}
.title-bar
{
margin-bottom
:
6px
;
font-weight
:
700
;
&
:before
{
content
:
""
;
width
:
4px
;
height
:
13px
;
-ms-flex-item-align
:
center
;
align-self
:
center
;
margin-right
:
12px
;
}
}
}
</
style
>
applications/dee-doc/src/privateComponents/components/RelatedIncomeContractAddList/index.vue
0 → 100644
View file @
5b56a66e
<!--
* @Author: zhangtianfeng 3232807530@qq.com
* @Date: 2024-08-06 15:50:13
* @LastEditors: zhangtianfeng 3232807530@qq.com
* @LastEditTime: 2024-08-06 15:54:30
-->
<
template
>
<div
class=
"RelatedIncomeContractAddList"
>
<dee-as-com
class=
"FeatureTypicalcom"
:lay-config=
"
{
typeName: 'ExtIncomeContract',
layKey: 'relatedIncomeContract-AddList'
}"
@selectionChange="selectionChange"
/>
<div
class=
"btns"
>
<el-button
type=
"primary"
class=
"submitBTN"
:disabled=
"!isDisable"
@
click=
"tosubmit"
>
确定
</el-button>
<el-button
type=
"primary"
@
click=
"$emit('cancel')"
>
取消
</el-button>
</div>
</div>
</
template
>
<
script
>
import
{
post
}
from
'@/utils/http'
export
default
{
name
:
'RelatedSpendingContractAddList'
,
componentName
:
'相关收入合同-添加'
,
props
:
{
basicData
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
data
()
{
return
{
selections
:
[]
}
},
computed
:
{
isDisable
()
{
return
Boolean
(
this
.
selections
.
length
)
}
},
mounted
()
{
},
methods
:
{
selectionChange
(
data
)
{
this
.
selections
=
data
},
tosubmit
()
{
const
source
=
this
.
$parent
.
$parent
.
$parent
.
$parent
.
basicData
const
params
=
this
.
selections
.
map
(
r
=>
{
return
{
source
:
source
,
operator
:
'ADD'
,
target
:
r
}
})
post
(
'ExtContractLink/recursions'
,
params
).
then
(
res
=>
{
this
.
$emit
(
'completeEven'
)
})
}
}
}
</
script
>
<
style
lang=
'scss'
scoped
>
.RelatedIncomeContractAddList
{
height
:
80%
;
.FeatureTypicalcom
{
height
:
calc
(
100%
-
50px
);
}
.btns
{
margin-top
:
20px
;
display
:
flex
;
justify-content
:
center
;
.submitBTN
{
margin-right
:
25px
;
}
}
}
</
style
>
applications/dee-doc/src/privateComponents/components/RelatedSpendingContractAddList/index.vue
0 → 100644
View file @
5b56a66e
<!--
* @Author: zhangtianfeng 3232807530@qq.com
* @Date: 2024-08-06 13:54:44
* @LastEditors: zhangtianfeng 3232807530@qq.com
* @LastEditTime: 2024-08-06 14:10:31
-->
<
template
>
<div
class=
"RelatedSpendingContractAddList"
>
<dee-as-com
class=
"FeatureTypicalcom"
:lay-config=
"
{
typeName: 'ExtSpendingContract',
layKey: 'relatedSpendingContract-AddList'
}"
@selectionChange="selectionChange"
/>
<div
class=
"btns"
>
<el-button
type=
"primary"
class=
"submitBTN"
:disabled=
"!isDisable"
@
click=
"tosubmit"
>
确定
</el-button>
<el-button
type=
"primary"
@
click=
"$emit('cancel')"
>
取消
</el-button>
</div>
</div>
</
template
>
<
script
>
import
{
post
}
from
'@/utils/http'
export
default
{
name
:
'RelatedSpendingContractAddList'
,
componentName
:
'相关支出合同-添加'
,
props
:
{
basicData
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
data
()
{
return
{
selections
:
[]
}
},
computed
:
{
isDisable
()
{
return
Boolean
(
this
.
selections
.
length
)
}
},
mounted
()
{
},
methods
:
{
selectionChange
(
data
)
{
this
.
selections
=
data
},
tosubmit
()
{
const
source
=
this
.
$parent
.
$parent
.
$parent
.
$parent
.
basicData
const
params
=
this
.
selections
.
map
(
r
=>
{
return
{
source
:
source
,
operator
:
'ADD'
,
target
:
r
}
})
post
(
'ExtContractLink/recursions'
,
params
).
then
(
res
=>
{
this
.
$emit
(
'completeEven'
)
})
}
}
}
</
script
>
<
style
lang=
'scss'
scoped
>
.RelatedSpendingContractAddList
{
height
:
80%
;
.FeatureTypicalcom
{
height
:
calc
(
100%
-
50px
);
}
.btns
{
margin-top
:
20px
;
display
:
flex
;
justify-content
:
center
;
.submitBTN
{
margin-right
:
25px
;
}
}
}
</
style
>
applications/dee-doc/src/privateComponents/components/SelectInterfaceInfo/index.vue
0 → 100644
View file @
5b56a66e
<
template
>
<div>
<!-- 下拉框 -->
<el-select
v-model=
"value"
placeholder=
"请选择"
@
change=
"handleChange"
>
<el-option
v-for=
"item in org"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select></div>
</
template
>
<
script
>
export
default
{
name
:
'SelectInterfaceInfo'
,
componentName
:
'提资记录-新建-选择提资方'
,
data
()
{
return
{
value
:
null
,
org
:
[
// { value: '哈哈',
// label: '哈哈'
// }
]
}
},
mounted
()
{
// this.initOrg()
},
methods
:
{
initOrg
()
{
const
org
=
localStorage
.
getItem
(
'org'
)
console
.
log
(
'org'
,
org
)
if
(
!
org
)
{
return
}
this
.
org
=
JSON
.
parse
(
org
)
if
(
!
this
.
org
)
{
this
.
org
=
[]
return
}
this
.
org
=
this
.
org
.
filter
(
r
=>
r
.
orgCode
.
indexOf
(
'001'
)
===
0
)
// 001 开头标识 设计维度部门
this
.
org
=
this
.
org
.
map
(
r
=>
{
return
{
label
:
r
.
orgName
,
value
:
r
.
orgName
}
})
},
handleChange
(
val
)
{
this
.
$emit
(
'input'
,
this
.
value
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
applications/dee-doc/src/privateComponents/components/editECR/index.vue
0 → 100644
View file @
5b56a66e
<!--
* @Author: zhangtianfeng 3232807530@qq.com
* @Date: 2024-07-31 15:11:47
* @LastEditors: zhangtianfeng 3232807530@qq.com
* @LastEditTime: 2024-07-31 15:13:41
-->
<
template
>
<dee-form
v-dee-loading=
"loading"
:form=
"form"
:form-data=
"propFormData"
:rules=
"rules"
:form-buttons=
"formButtons"
form-btn-position=
"center"
@
on-submit=
"submit"
@
on-cancel=
"close"
/>
</
template
>
<
script
>
export
default
{
name
:
'EditECR'
,
componentName
:
'详情按钮-编辑ECR'
,
props
:
{
dialogShow
:
{
type
:
Boolean
,
default
:
()
=>
false
},
node
:
{
type
:
Object
,
default
:
()
=>
{}
},
editObj
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
data
()
{
return
{
loading
:
false
,
propFormData
:
[{
split
:
3
,
data
:
[
{
key
:
'changeReason'
,
title
:
'更改原因'
,
width
:
3
,
'component'
:
{
'name'
:
'el-select'
,
'dicType'
:
'0'
,
'optionsdic'
:
'UpgradeReason'
}
},
{
key
:
'causeDescript'
,
title
:
'原因说明'
,
width
:
3
,
'component'
:
{
'name'
:
'el-input'
,
type
:
'textarea'
,
row
:
2
}
}]
}],
formButtons
:
[
{
'text'
:
'确定'
,
'type'
:
'submit'
,
'component'
:
{
'type'
:
'primary'
}
},
{
'text'
:
'取消'
,
'type'
:
'cancel'
,
'component'
:
{
}
}
],
rules
:
{
changeReason
:
[
{
required
:
true
,
message
:
'请填写更改原因'
,
trigger
:
'input'
}
],
causeDescript
:
[
{
required
:
true
,
message
:
'请填写原因说明'
,
trigger
:
'input'
}
]
},
form
:
{}
}
},
computed
:
{
ecrLinkApi
()
{
return
this
.
$getService
(
'ExtUpgradeObjLink'
).
baseQuery
().
orderByDesc
(
'modifyTime'
)
.
page
(
1
,
1
)
.
setBaseSearchItems
({
data
:
{
items
:
[]
}})
},
ecrApi
()
{
return
this
.
$getService
(
'ECR'
)
}
},
watch
:
{
dialogShow
:
{
immediate
:
true
,
handler
:
function
(
flag
)
{
if
(
flag
)
{
this
.
init
()
}
else
{
this
.
clear
()
}
}
}
},
// 生命周期 - 创建完成(访问当前this实例)
created
()
{},
// 生命周期 - 挂载完成(访问DOM元素)
mounted
()
{},
methods
:
{
submit
()
{
if
(
this
.
loading
)
{
return
}
this
.
loading
=
true
this
.
ecrApi
.
save
(
this
.
form
).
then
(
res
=>
{
this
.
$emit
(
'close'
)
}).
filnally
(()
=>
{
this
.
loading
=
false
})
},
close
()
{
this
.
$emit
(
'close'
)
},
init
()
{
if
(
this
.
node
&&
this
.
node
.
versionId
)
{
this
.
getData
()
}
},
getData
()
{
this
.
loading
=
true
const
customSearchItems
=
{
data
:
{
items
:
[{
fieldName
:
'targetId'
,
operator
:
'EQ'
,
value
:
this
.
node
.
versionId
}]
}}
this
.
ecrLinkApi
.
openProp
([
'source'
])
.
recursion
(
customSearchItems
).
then
(
res
=>
{
if
(
res
.
content
&&
res
.
content
[
0
]
&&
res
.
content
[
0
].
source
)
{
this
.
form
=
{
id
:
res
.
content
[
0
].
source
.
id
,
causeDescript
:
res
.
content
[
0
].
source
.
causeDescript
,
changeReason
:
res
.
content
[
0
].
source
.
changeReason
}
}
else
{
this
.
$utils
.
showMessageWarning
(
'未找到相关ECR!'
)
this
.
close
()
}
this
.
loading
=
false
}).
catch
(()
=>
{
this
.
loading
=
false
})
},
clear
()
{
this
.
form
=
{}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
applications/dee-doc/src/privateComponents/components/modifyNumber/index.vue
0 → 100644
View file @
5b56a66e
<
template
>
<dee-form
v-dee-loading=
"loading"
:form=
"form"
:form-data=
"propFormData"
:rules=
"rules"
:form-buttons=
"formButtons"
form-btn-position=
"center"
@
on-submit=
"submit"
@
on-cancel=
"close"
/>
</
template
>
<
script
>
import
{
get
}
from
'@/utils/http'
export
default
{
name
:
'ModifyNumber'
,
componentName
:
'改编号'
,
props
:
{
dialogShow
:
{
type
:
Boolean
,
default
:
()
=>
false
},
node
:
{
type
:
Object
,
default
:
()
=>
{}
},
businessTab
:
{
type
:
Object
,
default
:
()
=>
null
}
},
data
()
{
return
{
loading
:
false
,
propFormData
:
[{
split
:
3
,
data
:
[
{
key
:
'number'
,
width
:
3
,
component
:
{
name
:
'el-input'
,
type
:
'textarea'
,
rows
:
'2'
,
placeholder
:
'请输入新编号'
}
}
]
}],
formButtons
:
[
{
'text'
:
'确定'
,
'type'
:
'submit'
,
'component'
:
{
'type'
:
'primary'
}
},
{
'text'
:
'取消'
,
'type'
:
'cancel'
,
'component'
:
{
}
}
],
rules
:
{
},
form
:
{}
}
},
watch
:
{
dialogShow
:
{
immediate
:
true
,
handler
:
function
(
flag
)
{
if
(
flag
)
{
this
.
init
()
}
else
{
this
.
clear
()
}
}
}
},
// 生命周期 - 创建完成(访问当前this实例)
created
()
{},
// 生命周期 - 挂载完成(访问DOM元素)
mounted
()
{},
methods
:
{
submit
()
{
if
(
this
.
loading
)
{
return
}
this
.
loading
=
true
get
(
`/
${
this
.
modelName
}
/version/reNameNumber/
${
this
.
form
.
id
}
`
,
{
name
:
this
.
form
.
name
,
number
:
this
.
form
.
number
}).
then
(
res
=>
{
this
.
$emit
(
'close'
)
this
.
refresh
(
res
.
items
)
}).
filnally
(()
=>
{
this
.
loading
=
false
})
},
refresh
(
items
)
{
if
(
!
this
.
businessTab
||
!
items
)
{
return
}
const
id
=
items
.
id
const
subTypeName
=
items
.
subTypeName
const
modelName
=
this
.
$utils
.
getModelName4dxClassName
(
items
)
const
newlink
=
{
path
:
`/generalDetail/
${
id
}
/
${
subTypeName
}
/
${
modelName
}
`
}
this
.
businessTab
.
reload
({
type
:
'updateVersion'
,
id
:
items
.
id
},
newlink
)
},
close
()
{
this
.
$emit
(
'close'
)
},
init
()
{
if
(
this
.
node
&&
this
.
node
.
id
)
{
this
.
form
.
id
=
this
.
node
.
id
this
.
form
.
phaseState
=
this
.
node
.
phaseState
||
''
}
},
clear
()
{
this
.
form
=
{}
}
}
}
</
script
>
<
style
lang=
"scss"
>
</
style
>
applications/dee-doc/src/privateComponents/components/updateVersion/index.vue
0 → 100644
View file @
5b56a66e
<!--
* @Author: zhangtianfeng 3232807530@qq.com
* @Date: 2024-07-31 14:50:38
* @LastEditors: zhangtianfeng 3232807530@qq.com
* @LastEditTime: 2024-07-31 15:06:17
-->
<
template
>
<dee-form
v-dee-loading=
"loading"
:form=
"form"
:form-data=
"propFormData"
:rules=
"rules"
:form-buttons=
"formButtons"
form-btn-position=
"center"
@
on-submit=
"submit"
@
on-cancel=
"close"
/>
</
template
>
<
script
>
import
{
post
}
from
'@/utils/http'
export
default
{
name
:
'UpdateVersion'
,
// import引入的组件需要注入到对象中才能使用
components
:
{},
componentName
:
'详情按钮-升版'
,
props
:
{
dialogShow
:
{
type
:
Boolean
,
default
:
()
=>
false
},
node
:
{
type
:
Object
,
default
:
()
=>
{}
},
businessTab
:
{
type
:
Object
,
default
:
()
=>
null
}
},
data
()
{
return
{
loading
:
false
,
propFormData
:
[{
split
:
3
,
data
:
[
{
key
:
'id'
,
component
:
{
name
:
'el-input'
,
'obscure'
:
'true'
}
},
{
key
:
'phaseState'
,
title
:
'阶段选择'
,
width
:
3
,
'component'
:
{
'name'
:
'el-select'
,
'dicType'
:
'0'
,
'optionsdic'
:
'PhaseState'
,
'hasParams'
:
false
}
},
{
key
:
'changeReason'
,
title
:
'升版原因'
,
width
:
3
,
'component'
:
{
'name'
:
'el-select'
,
'dicType'
:
'0'
,
'optionsdic'
:
'UpgradeReason'
,
'hasParams'
:
false
}
},
{
key
:
'causeDescript'
,
title
:
'原因说明'
,
width
:
3
,
'component'
:
{
'name'
:
'el-input'
,
type
:
'textarea'
,
row
:
2
}
}]
}],
formButtons
:
[
{
'text'
:
'确定'
,
'type'
:
'submit'
,
'component'
:
{
'type'
:
'primary'
}
},
{
'text'
:
'取消'
,
'type'
:
'cancel'
,
'component'
:
{
}
}
],
rules
:
{
deleteType
:
[
{
required
:
true
,
message
:
'请选择阶段'
,
trigger
:
'change'
}
],
changeReason
:
[
{
required
:
true
,
message
:
'请选择升版原因'
,
trigger
:
'change'
}
]
},
form
:
{}
}
},
computed
:
{
},
watch
:
{
dialogShow
:
{
immediate
:
true
,
handler
:
function
(
flag
)
{
if
(
flag
)
{
this
.
init
()
}
else
{
this
.
clear
()
}
}
}
},
// 生命周期 - 创建完成(访问当前this实例)
created
()
{},
// 生命周期 - 挂载完成(访问DOM元素)
mounted
()
{},
methods
:
{
submit
()
{
if
(
this
.
loading
)
{
return
}
this
.
loading
=
true
post
(
`/DxDocument/ext/version/
${
this
.
form
.
id
}
/revise`
,
this
.
form
).
then
(
res
=>
{
this
.
$emit
(
'close'
)
this
.
refresh
(
res
.
items
)
}).
filnally
(()
=>
{
this
.
loading
=
false
})
},
refresh
(
items
)
{
if
(
!
this
.
businessTab
||
!
items
)
{
return
}
const
id
=
items
.
id
const
subTypeName
=
items
.
subTypeName
const
modelName
=
this
.
$utils
.
getModelName4dxClassName
(
items
)
const
newlink
=
{
path
:
`/generalDetail/
${
id
}
/
${
subTypeName
}
/
${
modelName
}
`
}
this
.
businessTab
.
reload
({
type
:
'updateVersion'
,
id
:
items
.
id
},
newlink
)
},
close
()
{
this
.
$emit
(
'close'
)
},
init
()
{
if
(
this
.
node
&&
this
.
node
.
id
)
{
this
.
form
.
id
=
this
.
node
.
id
this
.
form
.
phaseState
=
this
.
node
.
phaseState
||
''
}
},
clear
()
{
this
.
form
=
{}
}
}
}
</
script
>
<
style
lang=
"scss"
>
</
style
>
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