Commit 88203bac by 史敦盼

修改资产关联

1 parent 43baef13
......@@ -4,7 +4,7 @@
* @Autor: pan
* @Date: 2024-03-12 14:55:59
* @LastEditors: pan
* @LastEditTime: 2024-04-02 13:59:42
* @LastEditTime: 2024-06-19 14:34:02
-->
<!-- /**
* 搜索栏公共组件
......@@ -42,18 +42,14 @@
<div class="btn-box">
<el-button
v-if="btnItems.includes('search')"
size="medium"
type="primary"
class="btn-search"
icon="el-icon-search"
@click="onSearch"
v-preventReClick
>查询</el-button
>
<el-button
size="medium"
type="default"
class="btn-reset"
icon="el-icon-refresh"
@click="onReset"
>重置</el-button
......@@ -180,7 +176,7 @@ export default {
.btn-box {
// padding-top: 5px;
display: flex;
height: 38px;
// height: 38px;
// button {
// height: 38px;
// }
......
......@@ -4,7 +4,7 @@
* @Autor: pan
* @Date: 2024-03-11 14:53:40
* @LastEditors: pan
* @LastEditTime: 2024-05-11 16:09:31
* @LastEditTime: 2024-06-19 17:25:07
-->
<!-- 示例
columns: [{ label: '头像', prop: 'avatar', align: 'center', __slotName: 'avatar',callback: (row, title) => {
......@@ -81,6 +81,7 @@
v-for="items in item.actionButtons"
:key="items.title"
v-bind="items"
:icon="typeof items.icon == 'function' ? items.icon(scope.row) : items.icon"
:disabled="
items.disabledCallback
? items.disabledCallback(scope.row, items.title)
......
......@@ -17,7 +17,8 @@ Vue.config.productionTip = false
Vue.prototype.$postRequest = postRequest
Vue.prototype.$postRequestShared = postRequestShared
Vue.use(ElementUI)
// Vue.use(ElementUI)
Vue.use(ElementUI, { size: 'small'})
Date.prototype.format = function (fmt) {
if (!fmt) {
fmt = 'yyyy-MM-dd hh:mm:ss'
......
......@@ -15,8 +15,8 @@
></Form>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose()" size="mini">取 消</el-button>
<el-button type="primary" @click="handleSubmit" size="mini" v-if="this.title != '详情'"
<el-button @click="handleClose()">取 消</el-button>
<el-button type="primary" @click="handleSubmit" v-if="this.title != '详情'"
>提 交</el-button
>
</span></el-dialog
......
......@@ -10,7 +10,6 @@
<el-button
icon="el-icon-document-add"
type="primary"
size="medium"
plain
@click="fnAdd()"
>新增</el-button
......@@ -26,7 +25,7 @@
id-key="elementId"
>
<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>
</template>
</table-config>
......
......@@ -4,7 +4,7 @@
* @Autor: pan
* @Date: 2024-05-10 18:41:29
* @LastEditors: pan
* @LastEditTime: 2024-05-11 18:24:00
* @LastEditTime: 2024-06-19 16:48:53
-->
<template>
<el-dialog
......@@ -141,13 +141,13 @@ export default {
},
events: {
change(e) {
that.sourseEleIdChange(e, 'assetByEleOptions', 'assetNumber')
that.sourseEleIdChange(e, 'assetByEleOptions', 'assetCode')
},
},
},
{
label: '源资产编号', // label文字
prop: 'assetNumber', // 字段名
prop: 'assetCode', // 字段名
element: 'el-input', // 指定elementui组件
placeholder: '', // elementui组件属性
rules: [{ required: true, trigger: 'blur', message: '不能为空' }],
......@@ -176,14 +176,14 @@ export default {
that.sourseEleIdChange(
e,
'targetAssetByEleOptions',
'targetAssetNumber',
'relaAssetCode',
)
},
},
},
{
label: '目标资产编号', // label文字
prop: 'targetAssetNumber', // 字段名
prop: 'relaAssetCode', // 字段名
element: 'el-input', // 指定elementui组件
initValue: '', // 字段初始值
readonly: true,
......@@ -224,7 +224,7 @@ export default {
},
},
mounted() {
// console.log('attr', this.relationData)
// console.log('attr', this.$attrs, this.relationData)
},
methods: {
sourseEleIdChange(v, options, name) {
......
......@@ -4,7 +4,7 @@
* @Autor: pan
* @Date: 2024-05-10 17:20:35
* @LastEditors: pan
* @LastEditTime: 2024-05-11 18:46:17
* @LastEditTime: 2024-06-19 17:26:10
-->
<template>
<div class="searchTable">
......@@ -18,7 +18,6 @@
<el-button
icon="el-icon-document-add"
type="primary"
size="medium"
plain
@click="fnAdd()"
>新建</el-button
......@@ -59,6 +58,15 @@ import { relationIcons } from '@/config'
import { getDictTypeOptions } from '@/utils'
export default {
name: 'relationPage',
props: {
relationChildAssetRelaId: {
type: [String, Number],
},
// relationData: {
// type: Object,
// default: () => {}
// }
},
data() {
return {
query: {
......@@ -166,18 +174,15 @@ export default {
type: 'primary',
size: 'mini',
plain: true,
icon: '',
titleChange: (row, btnProp) => {
this.$set(btnProp, 'icon', 'el-icon-edit')
// btnProp.icon = 'el-icon-edit' el-icon-upload2
icon: (row) => {
if(row.state == 2 || row.state == 0) {
btnProp.icon = 'el-icon-upload2'
return '发布'
return 'el-icon-upload2'
} else {
btnProp.icon = 'el-icon-remove-outline'
return'停用'
return 'el-icon-remove-outline'
}
// return row.state == 2 || row.state == 0 ? '发布' : '停用'
},
titleChange: (row) => {
return row.state == 2 || row.state == 0 ? '发布' : '停用'
},
},
{
......@@ -197,6 +202,7 @@ export default {
},
},
created() {
this.query.queryParam.assetRelaId = this.relationChildAssetRelaId || this.$attrs['relation-data'].assetRelaId
this.getDicts()
},
methods: {
......
......@@ -4,7 +4,7 @@
* @Autor: pan
* @Date: 2024-05-10 17:20:35
* @LastEditors: pan
* @LastEditTime: 2024-05-28 14:18:21
* @LastEditTime: 2024-06-19 15:37:43
-->
<template>
<div class="searchTable">
......@@ -18,7 +18,6 @@
<el-button
icon="el-icon-document-add"
type="primary"
size="medium"
plain
@click="fnAdd()"
>新建</el-button
......
......@@ -22,7 +22,7 @@
</div>
<div class="right_container" v-else-if="isRelationChild">
<!-- 资产关系分类页面 -->
<RelationChildPage :relation-data="relationData" />
<RelationChildPage :relationChildAssetRelaId="relationChildAssetRelaId" :relation-data="relationData" />
</div>
<div class="right_container" v-else>
<div class="search_menu">
......@@ -715,7 +715,8 @@ export default {
isRelation: false,
isRelationChild: false,
relationData: {}
relationData: {},
relationChildAssetRelaId: null
}
},
created() {
......@@ -742,6 +743,7 @@ export default {
methods: {
linkTo(data) {console.log('---', data)
this.$refs.tree.setCurrentKey(data.assetRelaId + '_1')
this.relationChildAssetRelaId = data.assetRelaId
this.isRelationChild = true
this.isRelation = false
},
......@@ -1677,16 +1679,19 @@ export default {
},
treeClick(data, node, self) {
console.log(data, node, self)
this.isRelationChild = false
if(data.viewId === 99) {
this.isRelation = true
this.isRelationChild = false
} else if(data.viewId !==0 && !data.archiType) { console.log('child')
this.isRelationChild = true
this.isRelation = false
// this.isRelationChild = false
} else if(data.viewId !==0 && data.eleRelaId) { console.log('child', data)
this.relationData = data
this.isRelation = false
this.$nextTick(() => {
this.isRelationChild = true
})
} else {
this.isRelation = false
this.isRelationChild = false
// this.isRelationChild = false
//左侧树点击
if (!data.archiBelongId) return
this.archiBelongId = data.archiBelongId
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!