优化搜索查询

This commit is contained in:
binbin_pan 2024-06-17 18:02:16 +08:00
parent a538a5eb84
commit fb0ec7cb81
9 changed files with 29 additions and 11 deletions

View File

@ -44,6 +44,7 @@
:show-all-levels="false"
@change="casCadeChange"
clearable
filterable
style="width: 240px"
/>
<el-date-picker

View File

@ -61,8 +61,9 @@
value: 'typeId',
checkStrictly: true,
}"
filterable
@change="handleNodeClick"
aria-placeholder="请选择具类型"
aria-placeholder="请选择具类型"
></el-cascader>
</el-form-item>
<el-form-item label="退料申请时间" prop="time">

View File

@ -19,6 +19,7 @@
highlight-current
@node-click="handleNodeClick"
:props="defaultProps"
:filter-node-method="filterNode"
>
</el-tree>
</div>
@ -47,7 +48,9 @@ export default {
}
},
watch: {
inputValue(val) {
this.$refs.tree.filter(val);
}
},
data() {
return {
@ -85,6 +88,10 @@ export default {
this.inputValue = e.label
this.$emit('changeId', e.id)
this.ishowTree = false
},
filterNode(value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1;
}
}

View File

@ -235,6 +235,8 @@ export default {
typeId: undefined,
keyword: '',
},
typeList: [],
equipmentTypeList: [],
}
},
created() {

View File

@ -202,7 +202,6 @@ export default {
//
projectList: [],
statusList: [
{ id: '0', name: '请选择' },
{ id: '1', name: '未结算' },
{ id: '2', name: '已结算' },
{ id: '3', name: '待审核' },
@ -220,7 +219,7 @@ export default {
pageNum: 1,
pageSize: 10,
keyWord: undefined,
sltStatus: '0',
sltStatus: '',
unitId: '',
projectId: '',
},

View File

@ -196,7 +196,6 @@ export default {
//
projectList: [],
statusList: [
{ id: '', name: '请选择' },
{ id: '0', name: '待审核' },
{ id: '1', name: '审核通过' },
{ id: '2', name: '审核驳回' },

View File

@ -19,6 +19,7 @@
highlight-current
@node-click="handleNodeClick"
:props="defaultProps"
:filter-node-method="filterNode"
>
</el-tree>
</div>
@ -63,11 +64,14 @@ export default {
},
mounted() {
},
// watch: {
watch: {
// name: function () {
// this.inputValue = this.name
// }
// },
inputValue(val) {
this.$refs.tree.filter(val);
}
},
methods: {
inputFocus() {
if (this.ishowTree == true) {
@ -85,6 +89,10 @@ export default {
this.inputValue = e.label
this.$emit('changeId', e.id)
this.ishowTree = false
},
filterNode(value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1;
}
}

View File

@ -61,7 +61,7 @@
<el-row>
<el-col :span="24">
<el-form-item label="上级" prop="currentId">
<el-cascader v-model="form.currentId" :options="deptOptions" :disabled="isEdit"
<el-cascader v-model="form.currentId" :options="deptOptions" :disabled="isEdit" filterable
:props="{ expandTrigger: 'hover', label: 'label', value: 'id', checkStrictly: true }"
@change="handleNodeClick"> </el-cascader>
</el-form-item>

View File

@ -156,6 +156,7 @@
v-model="form.currentId"
:options="deptOptions"
:disabled="isEdit"
filterable
:props="{
expandTrigger: 'hover',
label: 'label',