queryform 调整

This commit is contained in:
fan 2019-10-28 10:26:33 +08:00
parent 50f87895c6
commit 9c99b2f451
3 changed files with 25 additions and 15 deletions

View File

@ -10,7 +10,7 @@
style="padding-top: 18px;"
>
<el-row>
<el-col :span="18">
<el-col :span="leftSpan">
<template v-for="(colNum, rIndex) in rowColumnList">
<el-row :key="rIndex" :gutter="20">
<template v-for="(field, name, index) in queryObject">
@ -127,8 +127,8 @@
</el-row>
</template>
</el-col>
<el-col :span="5" :offset="1">
<el-button type="primary" size="small" :disabled="!canQuery" @click="query">{{ $t('global.query') }}</el-button>
<el-col :span="24-leftSpan-1" :offset="1">
<el-button style="margin-right: 10px" type="primary" size="small" :disabled="!canQuery" @click="query">{{ $t('global.query') }}</el-button>
<el-button v-if="queryForm.reset" type="primary" size="small" :disabled="!canQuery" @click="doClean">{{ $t('global.reset') }}</el-button>
<el-button v-if="exportFlag" type="primary" size="small" :disabled="!canQuery" @click="doExport">{{ $t('global.export') }}</el-button>
<template v-for="(button, index) in queryList.actions">
@ -138,8 +138,8 @@
:type="button.type ? button.type: 'primary'"
size="small"
:style="button.style"
@click="button.handler"
class="button_style"
@click="button.handler"
>{{ button.text }}</el-button>
</template>
</el-col>
@ -173,6 +173,12 @@ export default {
canQuery: {
type: Boolean,
required: true
},
leftSpan: {
type: Number,
default() {
return 18;
}
}
},
data() {
@ -481,7 +487,9 @@ export default {
max-width: 240px;
min-width: 100px;
}
.button_style {
.el-button+.el-button {
margin-right:10px;
margin-left: 0;
margin-bottom: 10px;
}
</style>

View File

@ -4,6 +4,7 @@
v-show="!(queryForm.show === false)"
ref="queryForm"
:query-form="queryForm"
:left-span="queryForm.leftSpan"
:query-list="queryList"
:before-query="queryForm.beforeQuery"
:can-query="canQuery"

View File

@ -29,6 +29,7 @@ export default {
queryForm: {
labelWidth: '140px',
reset: true,
leftSpan: 18,
queryObject: {
'canDistribute': {
type: 'select',
@ -106,7 +107,7 @@ export default {
type: ''
},
{
name: '打包详情',
name: this.$t('orderAuthor.packingDetails'),
handleClick: this.handleDetail,
type: '',
showControl: (row) => { return !row.permissionType; }
@ -115,19 +116,19 @@ export default {
}
],
actions: [
{ text: this.$t('permission.permissionPack'), btnCode: 'employee_insert', handler: this.handlePermissionPack },
{ text: this.$t('permission.permissionPack'), btnCode: 'employee_insert', handler: this.handlePermissionPack }
]
}
};
},
watch: {
'$route.params.mapId': function (val) {
this.$refs.queryListPage.refresh(true);
}
},
mounted() {
this.loadInitData();
},
watch: {
'$route.params.mapId': function (val) {
this.$refs.queryListPage.refresh(true);
}
},
methods: {
handleRoleVest(index, row) {
this.$refs.selectRole.doShow(row.id);
@ -151,9 +152,9 @@ export default {
return row[porpInfo.property] ? row[porpInfo.property] : '---';
},
queryFunction(params) {
if (this.$route.params.mapId) {
params.mapId = this.$route.params.mapId;
}
if (this.$route.params.mapId) {
params.mapId = this.$route.params.mapId;
}
return listUserPermision(params);
},
handlePermissionPack() {