Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
liangzhen
/
framework-tools-web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 88203bac
authored
Jun 19, 2024
by
史敦盼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改资产关联
1 parent
43baef13
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
45 additions
and
38 deletions
src/components/SearchForm.vue
src/components/TableConfig.vue
src/main.js
src/views/batchPlanManagement/Add.vue
src/views/batchPlanManagement/index.vue
src/views/busi-assets-list/RelationChildAdd.vue
src/views/busi-assets-list/RelationChildPage.vue
src/views/busi-assets-list/RelationPage.vue
src/views/busi-assets-list/index.vue
src/components/SearchForm.vue
View file @
88203ba
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* @Autor: pan
* @Autor: pan
* @Date: 2024-03-12 14:55:59
* @Date: 2024-03-12 14:55:59
* @LastEditors: pan
* @LastEditors: pan
* @LastEditTime: 2024-0
4-02 13:59:4
2
* @LastEditTime: 2024-0
6-19 14:34:0
2
-->
-->
<!-- /**
<!-- /**
* 搜索栏公共组件
* 搜索栏公共组件
...
@@ -42,18 +42,14 @@
...
@@ -42,18 +42,14 @@
<div
class=
"btn-box"
>
<div
class=
"btn-box"
>
<el-button
<el-button
v-if=
"btnItems.includes('search')"
v-if=
"btnItems.includes('search')"
size=
"medium"
type=
"primary"
type=
"primary"
class=
"btn-search"
icon=
"el-icon-search"
icon=
"el-icon-search"
@
click=
"onSearch"
@
click=
"onSearch"
v-preventReClick
v-preventReClick
>
查询
</el-button
>
查询
</el-button
>
>
<el-button
<el-button
size=
"medium"
type=
"default"
type=
"default"
class=
"btn-reset"
icon=
"el-icon-refresh"
icon=
"el-icon-refresh"
@
click=
"onReset"
@
click=
"onReset"
>
重置
</el-button
>
重置
</el-button
...
@@ -180,7 +176,7 @@ export default {
...
@@ -180,7 +176,7 @@ export default {
.btn-box
{
.btn-box
{
//
padding-top
:
5px
;
//
padding-top
:
5px
;
display
:
flex
;
display
:
flex
;
height
:
38px
;
//
height
:
38px
;
//
button
{
//
button
{
//
height
:
38px
;
//
height
:
38px
;
//
}
//
}
...
...
src/components/TableConfig.vue
View file @
88203ba
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* @Autor: pan
* @Autor: pan
* @Date: 2024-03-11 14:53:40
* @Date: 2024-03-11 14:53:40
* @LastEditors: pan
* @LastEditors: pan
* @LastEditTime: 2024-0
5-11 16:09:31
* @LastEditTime: 2024-0
6-19 17:25:07
-->
-->
<!-- 示例
<!-- 示例
columns: [{ label: '头像', prop: 'avatar', align: 'center', __slotName: 'avatar',callback: (row, title) => {
columns: [{ label: '头像', prop: 'avatar', align: 'center', __slotName: 'avatar',callback: (row, title) => {
...
@@ -81,6 +81,7 @@
...
@@ -81,6 +81,7 @@
v-for=
"items in item.actionButtons"
v-for=
"items in item.actionButtons"
:key=
"items.title"
:key=
"items.title"
v-bind=
"items"
v-bind=
"items"
:icon=
"typeof items.icon == 'function' ? items.icon(scope.row) : items.icon"
:disabled=
"
:disabled=
"
items.disabledCallback
items.disabledCallback
? items.disabledCallback(scope.row, items.title)
? items.disabledCallback(scope.row, items.title)
...
...
src/main.js
View file @
88203ba
...
@@ -17,7 +17,8 @@ Vue.config.productionTip = false
...
@@ -17,7 +17,8 @@ Vue.config.productionTip = false
Vue
.
prototype
.
$postRequest
=
postRequest
Vue
.
prototype
.
$postRequest
=
postRequest
Vue
.
prototype
.
$postRequestShared
=
postRequestShared
Vue
.
prototype
.
$postRequestShared
=
postRequestShared
Vue
.
use
(
ElementUI
)
// Vue.use(ElementUI)
Vue
.
use
(
ElementUI
,
{
size
:
'small'
})
Date
.
prototype
.
format
=
function
(
fmt
)
{
Date
.
prototype
.
format
=
function
(
fmt
)
{
if
(
!
fmt
)
{
if
(
!
fmt
)
{
fmt
=
'yyyy-MM-dd hh:mm:ss'
fmt
=
'yyyy-MM-dd hh:mm:ss'
...
...
src/views/batchPlanManagement/Add.vue
View file @
88203ba
...
@@ -15,8 +15,8 @@
...
@@ -15,8 +15,8 @@
></Form>
></Form>
</div>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"handleClose()"
size=
"mini"
>
取 消
</el-button>
<el-button
@
click=
"handleClose()"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"handleSubmit"
size=
"mini"
v-if=
"this.title != '详情'"
<el-button
type=
"primary"
@
click=
"handleSubmit"
v-if=
"this.title != '详情'"
>
提 交
</el-button
>
提 交
</el-button
>
>
</span></el-dialog
</span></el-dialog
...
...
src/views/batchPlanManagement/index.vue
View file @
88203ba
...
@@ -10,7 +10,6 @@
...
@@ -10,7 +10,6 @@
<el-button
<el-button
icon=
"el-icon-document-add"
icon=
"el-icon-document-add"
type=
"primary"
type=
"primary"
size=
"medium"
plain
plain
@
click=
"fnAdd()"
@
click=
"fnAdd()"
>
新增
</el-button
>
新增
</el-button
...
@@ -26,7 +25,7 @@
...
@@ -26,7 +25,7 @@
id-key=
"elementId"
id-key=
"elementId"
>
>
<template
#
batName=
"
{ data }">
<template
#
batName=
"
{ data }">
<el-button
v-if=
"data.row.batName"
class=
"detailBtn"
size=
"medium"
@
click=
"fnEdit(data.row, true)"
>
{{
data
.
row
.
batName
}}
</el-button >
<el-button
v-if=
"data.row.batName"
class=
"detailBtn"
@
click=
"fnEdit(data.row, true)"
>
{{
data
.
row
.
batName
}}
</el-button >
<span
v-else
>
{{
data
.
row
.
batName
}}
</span>
<span
v-else
>
{{
data
.
row
.
batName
}}
</span>
</
template
>
</
template
>
</table-config>
</table-config>
...
...
src/views/busi-assets-list/RelationChildAdd.vue
View file @
88203ba
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* @Autor: pan
* @Autor: pan
* @Date: 2024-05-10 18:41:29
* @Date: 2024-05-10 18:41:29
* @LastEditors: pan
* @LastEditors: pan
* @LastEditTime: 2024-0
5-11 18:24:00
* @LastEditTime: 2024-0
6-19 16:48:53
-->
-->
<
template
>
<
template
>
<el-dialog
<el-dialog
...
@@ -141,13 +141,13 @@ export default {
...
@@ -141,13 +141,13 @@ export default {
},
},
events
:
{
events
:
{
change
(
e
)
{
change
(
e
)
{
that
.
sourseEleIdChange
(
e
,
'assetByEleOptions'
,
'asset
Number
'
)
that
.
sourseEleIdChange
(
e
,
'assetByEleOptions'
,
'asset
Code
'
)
},
},
},
},
},
},
{
{
label
:
'源资产编号'
,
// label文字
label
:
'源资产编号'
,
// label文字
prop
:
'asset
Number
'
,
// 字段名
prop
:
'asset
Code
'
,
// 字段名
element
:
'el-input'
,
// 指定elementui组件
element
:
'el-input'
,
// 指定elementui组件
placeholder
:
''
,
// elementui组件属性
placeholder
:
''
,
// elementui组件属性
rules
:
[{
required
:
true
,
trigger
:
'blur'
,
message
:
'不能为空'
}],
rules
:
[{
required
:
true
,
trigger
:
'blur'
,
message
:
'不能为空'
}],
...
@@ -176,14 +176,14 @@ export default {
...
@@ -176,14 +176,14 @@ export default {
that
.
sourseEleIdChange
(
that
.
sourseEleIdChange
(
e
,
e
,
'targetAssetByEleOptions'
,
'targetAssetByEleOptions'
,
'
targetAssetNumber
'
,
'
relaAssetCode
'
,
)
)
},
},
},
},
},
},
{
{
label
:
'目标资产编号'
,
// label文字
label
:
'目标资产编号'
,
// label文字
prop
:
'
targetAssetNumber
'
,
// 字段名
prop
:
'
relaAssetCode
'
,
// 字段名
element
:
'el-input'
,
// 指定elementui组件
element
:
'el-input'
,
// 指定elementui组件
initValue
:
''
,
// 字段初始值
initValue
:
''
,
// 字段初始值
readonly
:
true
,
readonly
:
true
,
...
@@ -224,7 +224,7 @@ export default {
...
@@ -224,7 +224,7 @@ export default {
},
},
},
},
mounted
()
{
mounted
()
{
// console.log('attr', this.relationData)
// console.log('attr', this.
$attrs, this.
relationData)
},
},
methods
:
{
methods
:
{
sourseEleIdChange
(
v
,
options
,
name
)
{
sourseEleIdChange
(
v
,
options
,
name
)
{
...
...
src/views/busi-assets-list/RelationChildPage.vue
View file @
88203ba
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* @Autor: pan
* @Autor: pan
* @Date: 2024-05-10 17:20:35
* @Date: 2024-05-10 17:20:35
* @LastEditors: pan
* @LastEditors: pan
* @LastEditTime: 2024-0
5-11 18:46:17
* @LastEditTime: 2024-0
6-19 17:26:10
-->
-->
<
template
>
<
template
>
<div
class=
"searchTable"
>
<div
class=
"searchTable"
>
...
@@ -18,7 +18,6 @@
...
@@ -18,7 +18,6 @@
<el-button
<el-button
icon=
"el-icon-document-add"
icon=
"el-icon-document-add"
type=
"primary"
type=
"primary"
size=
"medium"
plain
plain
@
click=
"fnAdd()"
@
click=
"fnAdd()"
>
新建
</el-button
>
新建
</el-button
...
@@ -59,6 +58,15 @@ import { relationIcons } from '@/config'
...
@@ -59,6 +58,15 @@ import { relationIcons } from '@/config'
import
{
getDictTypeOptions
}
from
'@/utils'
import
{
getDictTypeOptions
}
from
'@/utils'
export
default
{
export
default
{
name
:
'relationPage'
,
name
:
'relationPage'
,
props
:
{
relationChildAssetRelaId
:
{
type
:
[
String
,
Number
],
},
// relationData: {
// type: Object,
// default: () => {}
// }
},
data
()
{
data
()
{
return
{
return
{
query
:
{
query
:
{
...
@@ -166,18 +174,15 @@ export default {
...
@@ -166,18 +174,15 @@ export default {
type
:
'primary'
,
type
:
'primary'
,
size
:
'mini'
,
size
:
'mini'
,
plain
:
true
,
plain
:
true
,
icon
:
''
,
icon
:
(
row
)
=>
{
titleChange
:
(
row
,
btnProp
)
=>
{
this
.
$set
(
btnProp
,
'icon'
,
'el-icon-edit'
)
// btnProp.icon = 'el-icon-edit' el-icon-upload2
if
(
row
.
state
==
2
||
row
.
state
==
0
)
{
if
(
row
.
state
==
2
||
row
.
state
==
0
)
{
btnProp
.
icon
=
'el-icon-upload2'
return
'el-icon-upload2'
return
'发布'
}
else
{
}
else
{
btnProp
.
icon
=
'el-icon-remove-outline'
return
'el-icon-remove-outline'
return
'停用'
}
}
// return row.state == 2 || row.state == 0 ? '发布' : '停用'
},
titleChange
:
(
row
)
=>
{
return
row
.
state
==
2
||
row
.
state
==
0
?
'发布'
:
'停用'
},
},
},
},
{
{
...
@@ -197,6 +202,7 @@ export default {
...
@@ -197,6 +202,7 @@ export default {
},
},
},
},
created
()
{
created
()
{
this
.
query
.
queryParam
.
assetRelaId
=
this
.
relationChildAssetRelaId
||
this
.
$attrs
[
'relation-data'
].
assetRelaId
this
.
getDicts
()
this
.
getDicts
()
},
},
methods
:
{
methods
:
{
...
...
src/views/busi-assets-list/RelationPage.vue
View file @
88203ba
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* @Autor: pan
* @Autor: pan
* @Date: 2024-05-10 17:20:35
* @Date: 2024-05-10 17:20:35
* @LastEditors: pan
* @LastEditors: pan
* @LastEditTime: 2024-0
5-28 14:18:21
* @LastEditTime: 2024-0
6-19 15:37:43
-->
-->
<
template
>
<
template
>
<div
class=
"searchTable"
>
<div
class=
"searchTable"
>
...
@@ -18,7 +18,6 @@
...
@@ -18,7 +18,6 @@
<el-button
<el-button
icon=
"el-icon-document-add"
icon=
"el-icon-document-add"
type=
"primary"
type=
"primary"
size=
"medium"
plain
plain
@
click=
"fnAdd()"
@
click=
"fnAdd()"
>
新建
</el-button
>
新建
</el-button
...
...
src/views/busi-assets-list/index.vue
View file @
88203ba
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
</div>
</div>
<div
class=
"right_container"
v-else-if=
"isRelationChild"
>
<div
class=
"right_container"
v-else-if=
"isRelationChild"
>
<!-- 资产关系分类页面 -->
<!-- 资产关系分类页面 -->
<RelationChildPage
:relation-data=
"relationData"
/>
<RelationChildPage
:relation
ChildAssetRelaId=
"relationChildAssetRelaId"
:relation
-data=
"relationData"
/>
</div>
</div>
<div
class=
"right_container"
v-else
>
<div
class=
"right_container"
v-else
>
<div
class=
"search_menu"
>
<div
class=
"search_menu"
>
...
@@ -715,7 +715,8 @@ export default {
...
@@ -715,7 +715,8 @@ export default {
isRelation
:
false
,
isRelation
:
false
,
isRelationChild
:
false
,
isRelationChild
:
false
,
relationData
:
{}
relationData
:
{},
relationChildAssetRelaId
:
null
}
}
},
},
created
()
{
created
()
{
...
@@ -742,6 +743,7 @@ export default {
...
@@ -742,6 +743,7 @@ export default {
methods
:
{
methods
:
{
linkTo
(
data
)
{
console
.
log
(
'---'
,
data
)
linkTo
(
data
)
{
console
.
log
(
'---'
,
data
)
this
.
$refs
.
tree
.
setCurrentKey
(
data
.
assetRelaId
+
'_1'
)
this
.
$refs
.
tree
.
setCurrentKey
(
data
.
assetRelaId
+
'_1'
)
this
.
relationChildAssetRelaId
=
data
.
assetRelaId
this
.
isRelationChild
=
true
this
.
isRelationChild
=
true
this
.
isRelation
=
false
this
.
isRelation
=
false
},
},
...
@@ -1677,16 +1679,19 @@ export default {
...
@@ -1677,16 +1679,19 @@ export default {
},
},
treeClick
(
data
,
node
,
self
)
{
treeClick
(
data
,
node
,
self
)
{
console
.
log
(
data
,
node
,
self
)
console
.
log
(
data
,
node
,
self
)
this
.
isRelationChild
=
false
if
(
data
.
viewId
===
99
)
{
if
(
data
.
viewId
===
99
)
{
this
.
isRelation
=
true
this
.
isRelation
=
true
this
.
isRelationChild
=
false
// this.isRelationChild = false
}
else
if
(
data
.
viewId
!==
0
&&
!
data
.
archiType
)
{
console
.
log
(
'child'
)
}
else
if
(
data
.
viewId
!==
0
&&
data
.
eleRelaId
)
{
console
.
log
(
'child'
,
data
)
this
.
isRelationChild
=
true
this
.
isRelation
=
false
this
.
relationData
=
data
this
.
relationData
=
data
this
.
isRelation
=
false
this
.
$nextTick
(()
=>
{
this
.
isRelationChild
=
true
})
}
else
{
}
else
{
this
.
isRelation
=
false
this
.
isRelation
=
false
this
.
isRelationChild
=
false
//
this.isRelationChild = false
//左侧树点击
//左侧树点击
if
(
!
data
.
archiBelongId
)
return
if
(
!
data
.
archiBelongId
)
return
this
.
archiBelongId
=
data
.
archiBelongId
this
.
archiBelongId
=
data
.
archiBelongId
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment