|
@ -44,6 +44,10 @@ export default { |
|
|
<span>{{item.meta.title}}</span> |
|
|
<span>{{item.meta.title}}</span> |
|
|
</el-button> |
|
|
</el-button> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
<el-button @click="queryDialog=true"> |
|
|
|
|
|
<el-icon><ep-filter /></el-icon> |
|
|
|
|
|
<span>{{$t('高级筛选')}}</span> |
|
|
|
|
|
</el-button> |
|
|
<slot name="tableButtons" :rows="selectedRows"></slot> |
|
|
<slot name="tableButtons" :rows="selectedRows"></slot> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
@ -143,6 +147,62 @@ export default { |
|
|
/> |
|
|
/> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
|
|
|
<el-dialog v-model="queryDialog" align-center destroy-on-close> |
|
|
|
|
|
<template #header> <span class="el-dialog__title"> {{$t('高级筛选')}} </span> </template> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
<el-col style="max-height:calc(100vh - 180px );"> |
|
|
|
|
|
<el-scrollbar> |
|
|
|
|
|
<el-row :gutter="20" v-for="(item,index) in queryList" style="margin-top:20px;"> |
|
|
|
|
|
<el-col :span="6"> |
|
|
|
|
|
<el-select v-model="item.property" :placeholder="$t('字段')"> |
|
|
|
|
|
<el-option v-for="(value, prop) in queryFromSchema.properties">{{value.title}}</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="6"> |
|
|
|
|
|
<el-select v-model="item.operator" :placeholder="$t('操作符')"> |
|
|
|
|
|
<el-option>{{$t('等于')}}</el-option> |
|
|
|
|
|
<el-option>{{$t('不等于')}}</el-option> |
|
|
|
|
|
<el-option>{{$t('大于')}}</el-option> |
|
|
|
|
|
<el-option>{{$t('大于等于')}}</el-option> |
|
|
|
|
|
<el-option>{{$t('小于')}}</el-option> |
|
|
|
|
|
<el-option>{{$t('小于等于')}}</el-option> |
|
|
|
|
|
<el-option>{{$t('包含')}}</el-option> |
|
|
|
|
|
<el-option>{{$t('不包含')}}</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="6"> |
|
|
|
|
|
<el-input v-model="item.value" :placeholder="$t('值')" /> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="4"> |
|
|
|
|
|
<el-select v-model="item.logical" :placeholder="$t('关系')"> |
|
|
|
|
|
<el-option>{{$t('且')}}</el-option> |
|
|
|
|
|
<el-option>{{$t('或')}}</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="2"> |
|
|
|
|
|
<el-space style="height:32px"> |
|
|
|
|
|
<el-icon class="cursor-pointer" @click="queryList.splice(index, 1)"> |
|
|
|
|
|
<ep-close /> |
|
|
|
|
|
</el-icon> |
|
|
|
|
|
</el-space> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
<el-col> |
|
|
|
|
|
<el-space style="height:32px;"> |
|
|
|
|
|
<el-icon class="cursor-pointer" @click="pushQueryList"><ep-plus /></el-icon> |
|
|
|
|
|
</el-space> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
</el-scrollbar> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
<template #footer> |
|
|
|
|
|
<span class="dialog-footer"> |
|
|
|
|
|
<el-button type="primary" @click="queryDialog=false"> {{$t('confirm')}} </el-button> |
|
|
|
|
|
</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-dialog> |
|
|
<el-drawer v-model="filterDrawer" destroy-on-close @close="tableRef.doLayout()"> |
|
|
<el-drawer v-model="filterDrawer" destroy-on-close @close="tableRef.doLayout()"> |
|
|
<template #header> <span class="el-dialog__title"> {{$t('filter')}} </span> </template> |
|
|
<template #header> <span class="el-dialog__title"> {{$t('filter')}} </span> </template> |
|
|
<el-scrollbar> |
|
|
<el-scrollbar> |
|
@ -240,6 +300,8 @@ export default { |
|
|
const sortColumns = ref(new Map()); |
|
|
const sortColumns = ref(new Map()); |
|
|
const schema = ref(props.schema); |
|
|
const schema = ref(props.schema); |
|
|
const queryFromSchema = ref(null); |
|
|
const queryFromSchema = ref(null); |
|
|
|
|
|
const queryList = ref([]); |
|
|
|
|
|
const queryDialog = ref(false); |
|
|
const tableSchema = ref({}); |
|
|
const tableSchema = ref({}); |
|
|
const tableData = ref([]); |
|
|
const tableData = ref([]); |
|
|
const editFormRef = ref(null); |
|
|
const editFormRef = ref(null); |
|
@ -418,6 +480,14 @@ export default { |
|
|
subDrawer.value = true; |
|
|
subDrawer.value = true; |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
const pushQueryList = () => { |
|
|
|
|
|
queryList.value.push({ |
|
|
|
|
|
property: "", |
|
|
|
|
|
operator: "等于", |
|
|
|
|
|
value: "", |
|
|
|
|
|
logical: "且", |
|
|
|
|
|
}); |
|
|
|
|
|
}; |
|
|
onMounted(async () => { |
|
|
onMounted(async () => { |
|
|
const vm = (await get(indexUrl)).data; |
|
|
const vm = (await get(indexUrl)).data; |
|
|
schema.value = vm.schema; |
|
|
schema.value = vm.schema; |
|
@ -442,6 +512,8 @@ export default { |
|
|
dialogVisible, |
|
|
dialogVisible, |
|
|
selectedRows, |
|
|
selectedRows, |
|
|
queryFromSchema, |
|
|
queryFromSchema, |
|
|
|
|
|
queryDialog, |
|
|
|
|
|
queryList, |
|
|
tableSchema, |
|
|
tableSchema, |
|
|
buttons, |
|
|
buttons, |
|
|
data, |
|
|
data, |
|
@ -463,6 +535,7 @@ export default { |
|
|
submit, |
|
|
submit, |
|
|
showList, |
|
|
showList, |
|
|
subListQuery, |
|
|
subListQuery, |
|
|
|
|
|
pushQueryList, |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
}; |
|
|
}; |
|
|