Tips:由于响应式是针对全屏显示,网站的内容区域宽度有限,所以会出现展示demo有些问题,但不影响使用1062px|1440px|1720px,表格每一项都有item.attrs,item.listeners穿透到element-ui组件
显示代码
```js {mixin:true} { data() { return { demo1: true, //gl-search数据 searchForm: { queryText: '', orderStatus: '', packageCode: '', merchantId: '', dqtId: '', pqId: '', mdId: '', auditStatus: '', dataPerfection: '', successDate: [], effectiveDate: [] }, searchSelectObj: { nameOrNoOrVin: { attr: 'customerName', value: '' } }, searchFormData: [ { type: 'selectInput', selectName: 'nameOrNoOrVin', isClear: true, inputWidth: '320px', selectWidth: '110px', selectOption: [ { label: '客户姓名客户姓名客户姓名', name: 'customerName' }, { label: '合同号', name: 'contractNo' }, { label: '车架号', name: 'vin' } ], handleSelectChange: value => { this.searchSelectObj.nameOrNoOrVin.value = '' } }, { label: '服务状态', name: 'orderStatus', type: 'select', optionList: [], optionId: 'confId', optionLabel: 'confName', optionsName: 'orderStatusList' }, { label: '产品名称', name: 'packageCode', type: 'select', optionList: [], optionId: 'packageCode', optionLabel: 'packageName', optionsName: 'goodsStatusList' }, { label: '提单成功时间', name: 'successDate', type: 'datePicker', isClear: true, pickerOptions: 'beforeRangePickerOptions', //label 显示隐藏 showLabel:false, }, { label: '生效时间', name: 'effectiveDate', type: 'datePicker', isClear: true, isHide:true }, // { // label: '财务审核状态', // name: 'auditStatus', // type: 'select', // optionList: [], // optionId: 'confId', // optionLabel: 'confName', // optionsName: 'auditStatusList' // }, // { // label: '上传资料', // name: 'dataPerfection', // type: 'select', // optionList: [], // optionId: 'confId', // optionLabel: 'confName', // optionsName: 'dataPerfectionList' // }, // { // label: '总部', // name: 'merchantId', // type: 'select', // optionList: [], // optionId: 'merchantNo', // optionLabel: 'merchantName', // optionsName: 'merchantList', // isHide: true, // changeAttr: (val, targetItem) => { // var idx = this.searchFormData.findIndex(item => item.name == this.levelToShow['2']) // this.searchFormData[idx].isHide = false // this.searchForm[this.levelToShow['2']] = '' // var tempIdx = '' // for (var i = 3; i <= 4; i++) { // tempIdx = this.searchFormData.findIndex(item => item.name == this.levelToShow[i + '']) // this.searchFormData[tempIdx].isHide = true // this.searchForm[this.levelToShow[i + '']] = '' // } // this.getMerchantList(val, 2, this.searchFormData[idx].name, this.searchFormData[idx].optionsName) // } // }, // { // label: '大区', // name: 'dqtId', // type: 'select', // optionList: [], // optionId: 'merchantNo', // optionLabel: 'merchantName', // optionsName: 'dqList', // isHide: true, // changeAttr: (val, targetItem) => { // var idx = this.searchFormData.findIndex(item => item.name == this.levelToShow['3']) // this.searchFormData[idx].isHide = false // this.searchForm[this.levelToShow['3']] = '' // var tempIdx = this.searchFormData.findIndex(item => item.name == this.levelToShow['4']) // this.searchFormData[tempIdx].isHide = true // this.searchForm[this.levelToShow['4']] = '' // this.getMerchantList(val, 3, this.searchFormData[idx].name, this.searchFormData[idx].optionsName) // } // }, // { // label: '片区', // name: 'pqId', // type: 'select', // optionList: [], // optionId: 'merchantNo', // optionLabel: 'merchantName', // optionsName: 'pqList', // isHide: true, // changeAttr: (val, targetItem) => { // var idx = this.searchFormData.findIndex(item => item.name == this.levelToShow['4']) // this.searchFormData[idx].isHide = false // this.searchForm[this.levelToShow['4']] = '' // this.getMerchantList(val, 4, this.searchFormData[idx].name, this.searchFormData[idx].optionsName) // } // }, // { // label: '门店', // name: 'mdId', // type: 'select', // optionList: [], // optionId: 'merchantNo', // optionLabel: 'merchantName', // optionsName: 'mdList', // isHide: true // } ], } }, methods:{ toggleShow(num){ // console.log(123) this['demo' + num] = !this['demo' + num] }, handleOkFn() { console.log('您点击了确定') }, handleRestFn() { console.log('您点击了取消') }, } }
# 用来作为 markdown 代码的示例部分
<div v-if="demo1">
```html
<template>
<GLCombiForm ref="showSearch" :rowNumber="2"
:formObj="searchForm"
:searchSelectObj="searchSelectObj"
:formData="searchFormData"
@handleOk="handleOkFn"
@handleRest="handleRestFn"></GLCombiForm>
</template>
<script>
export default {
data() {
return {
//gl-search数据
searchForm: {
queryText: '',
orderStatus: '',
packageCode: '',
merchantId: '',
dqtId: '',
pqId: '',
mdId: '',
auditStatus: '',
dataPerfection: '',
successDate: [],
effectiveDate: []
},
searchSelectObj: {
nameOrNoOrVin: {
attr: 'customerName',
value: ''
}
},
searchFormData: [
{
type: 'selectInput',
selectName: 'nameOrNoOrVin',
isClear: true,
inputWidth: '320px',
selectWidth: '110px',
selectOption: [
{
label: '客户姓名客户姓名客户姓名',
name: 'customerName'
},
{
label: '合同号',
name: 'contractNo'
},
{
label: '车架号',
name: 'vin'
}
],
handleSelectChange: value => {
this.searchSelectObj.nameOrNoOrVin.value = ''
}
},
{
label: '服务状态',
name: 'orderStatus',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'orderStatusList'
},
{
label: '产品名称',
name: 'packageCode',
type: 'select',
optionList: [],
optionId: 'packageCode',
optionLabel: 'packageName',
optionsName: 'goodsStatusList'
},
{
label: '提单成功时间',
name: 'successDate',
type: 'datePicker',
isClear: true,
pickerOptions: 'beforeRangePickerOptions',
//label 显示隐藏
showLabel:false,
},
{
label: '生效时间',
name: 'effectiveDate',
type: 'datePicker',
isClear: true,
isHide:true
},
]
}
},
methods: {
handleOkFn() {
console.log('您点击了确定')
},
handleRestFn() {
console.log('您点击了取消')
},
}
}
</script>