<template> <!-- 定义在这里的参数都是不可在外部覆盖的,防止出现问题 --> <j-select-biz-component :value="value" :multiple="false" :ellipsisLength="25" :listUrl="url.list" :columns="columns" v-on="$listeners" v-bind="attrs" /> </template> <script> import JDate from '@comp/jeecg/JDate' import JSelectBizComponent from './JSelectBizComponent' export default { name: 'JSelectMultiEmptyContainer', components: {JDate, JSelectBizComponent}, props: { value: null, // any type queryConfig: { type: Array, default: () => [] }, }, data() { return { url: {list: '/config/location/getEmptyContainerInLocation'}, columns: [ {title: '容器编码', align: 'center', width: '25%', dataIndex: 'containerCode'}, {title: '库位编码', align: 'center', width: '25%', dataIndex: 'code'}, {title: '库区', align: 'center', width: '20%', dataIndex: 'zoneCode'}, {title: '行', align: 'center', width: '20%', dataIndex: 'row'}, {title: '列', align: 'center', width: '20%', dataIndex: 'icolumn'}, {title: '层', align: 'center', width: '20%', dataIndex: 'layer'} ], // 定义在这里的参数都是可以在外部传递覆盖的,可以更灵活的定制化使用的组件 default: { name: "编码", width: 1200, displayKey: 'containerCode', returnKeys: ['id', 'containerCode'], queryParamText: '容器编码', }, // 多条件查询配置 queryConfigDefault: [ { key: 'locationCode', label: '库位编码', }, ], } }, computed: { attrs() { return Object.assign(this.default, this.$attrs, { queryConfig: this.queryConfigDefault.concat(this.queryConfig) }) } } } </script> <style lang="less" scoped></style>