fix: 修复创建作业资产选择树问题

This commit is contained in:
Aaron3S
2023-02-16 19:54:10 +08:00
committed by huailei
parent 91b1ae1766
commit 24682d70ce
2 changed files with 18 additions and 3 deletions

View File

@@ -15,6 +15,9 @@
v-bind="$attrs"
:header-actions="headerActions"
:table-config="tableConfig"
:url="baseUrl"
:node-url="baseNodeUrl"
:tree-url="`${baseNodeUrl}/children/tree/`"
class="tree-table"
/>
</Dialog>
@@ -32,6 +35,10 @@ export default {
type: String,
default: '/api/v1/assets/assets/'
},
baseNodeUrl: {
type: String,
default: '/api/v1/assets/nodes/'
},
value: {
type: Array,
default: () => []
@@ -144,7 +151,7 @@ export default {
}
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.page ::v-deep .page-heading {
display: none;
}
@@ -184,6 +191,7 @@ export default {
.page ::v-deep .treebox {
height: inherit !important;
}
.asset-select-dialog ::v-deep .el-icon-circle-check {
display: none;
}

View File

@@ -14,8 +14,9 @@
:value="value"
:visible.sync="dialogVisible"
v-bind="$attrs"
:base-url="baseUrl"
:tree-url-query="treeUrlQuery"
:base-url="baseUrl"
:base-node-url="baseNodeUrl"
@cancel="handleCancel"
@confirm="handleConfirm"
v-on="$listeners"
@@ -26,6 +27,7 @@
<script>
import Select2 from '@/components/FormFields/Select2'
import AssetSelectDialog from './dialog.vue'
import { b } from 'css-color-function/lib/adjusters'
export default {
componentName: 'AssetSelect',
@@ -35,6 +37,10 @@ export default {
type: String,
default: '/api/v1/assets/assets/'
},
baseNodeUrl: {
type: String,
default: '/api/v1/assets/nodes/'
},
treeUrlQuery: {
type: Object,
default: () => {}
@@ -70,6 +76,7 @@ export default {
}
},
methods: {
b,
handleFocus() {
this.$refs.select2.selectRef.blur()
this.dialogVisible = true
@@ -110,7 +117,7 @@ export default {
}
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.el-select {
width: 100%;
}