Commit 9b5607e1 authored by jingnan's avatar jingnan 👀

架次关联站位编号组件修改

parent cbc56237
......@@ -87,7 +87,6 @@ export default {
}
},
created() {
console.log(http, 'http')
// 初始化数据
},
methods: {
......
export default {
props: {},
layoutConfigData: [
{
title: '高级组件配置',
data: [
{
key: 'bindKey',
title: '绑定属性',
disabled: true,
component: {
defaultValue: 'positionNumber',
name: 'el-input'
}
},
{
key: 'relatedAttribute',
title: '受关联属性',
disabled: true,
component: {
defaultValue: '',
name: 'el-input'
}
}
]
}
],
data() {
return {
}
},
created() {
},
computed: {
},
methods: {
}
}
<template>
<div>
<el-select
:value="value"
:value="selVal"
:loading="loading"
filterable
remote
......@@ -22,10 +22,11 @@
</template>
<script>
import config from './config'
export default {
name: 'StationSelect',
componentName: '架次关联站位编号',
mixins: [config],
props: {
value: {
type: [String, Number],
......@@ -47,20 +48,35 @@ export default {
data() {
return {
loading: false,
options: []
options: [],
// linkageValue: '',
selVal: ''
}
},
computed: {},
watch: {
'form.sorties': {
immediate: true,
deep: true,
// deep: true,
handler(val) {
// if (val !== this.linkageValue) {
if (this.item.key !== 'position') {
// this.linkageValue = val
this.$set(this.form, 'positionNumber', '')
this.selVal = ''
}
// }
val && this.getOptions()
}
},
value: {
immediate: true,
deep: true,
handler(v) {
if (v) {
this.selVal = this.value
}
}
}
},
methods: {
......@@ -104,6 +120,15 @@ export default {
},
change(val) {
this.$emit('input', val)
this.clearRelativeAttr()
},
clearRelativeAttr() {
if (this.item.relatedAttribute) {
const attributes = this.item.relatedAttribute.split(',') || []
attributes.forEach(el => {
el && this.$set(this.form, el, '')
})
}
},
clear() {
this.$emit('input')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment