优化搜索查询
This commit is contained in:
parent
a538a5eb84
commit
fb0ec7cb81
|
|
@ -44,6 +44,7 @@
|
||||||
:show-all-levels="false"
|
:show-all-levels="false"
|
||||||
@change="casCadeChange"
|
@change="casCadeChange"
|
||||||
clearable
|
clearable
|
||||||
|
filterable
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
/>
|
/>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
|
|
||||||
|
|
@ -61,8 +61,9 @@
|
||||||
value: 'typeId',
|
value: 'typeId',
|
||||||
checkStrictly: true,
|
checkStrictly: true,
|
||||||
}"
|
}"
|
||||||
|
filterable
|
||||||
@change="handleNodeClick"
|
@change="handleNodeClick"
|
||||||
aria-placeholder="请选择极具类型"
|
aria-placeholder="请选择机具类型"
|
||||||
></el-cascader>
|
></el-cascader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="退料申请时间" prop="time">
|
<el-form-item label="退料申请时间" prop="time">
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
highlight-current
|
highlight-current
|
||||||
@node-click="handleNodeClick"
|
@node-click="handleNodeClick"
|
||||||
:props="defaultProps"
|
:props="defaultProps"
|
||||||
|
:filter-node-method="filterNode"
|
||||||
>
|
>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -47,7 +48,9 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
inputValue(val) {
|
||||||
|
this.$refs.tree.filter(val);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -85,6 +88,10 @@ export default {
|
||||||
this.inputValue = e.label
|
this.inputValue = e.label
|
||||||
this.$emit('changeId', e.id)
|
this.$emit('changeId', e.id)
|
||||||
this.ishowTree = false
|
this.ishowTree = false
|
||||||
|
},
|
||||||
|
filterNode(value, data) {
|
||||||
|
if (!value) return true;
|
||||||
|
return data.label.indexOf(value) !== -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -235,6 +235,8 @@ export default {
|
||||||
typeId: undefined,
|
typeId: undefined,
|
||||||
keyword: '',
|
keyword: '',
|
||||||
},
|
},
|
||||||
|
typeList: [],
|
||||||
|
equipmentTypeList: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
|
||||||
|
|
@ -202,7 +202,6 @@ export default {
|
||||||
// 工程数据
|
// 工程数据
|
||||||
projectList: [],
|
projectList: [],
|
||||||
statusList: [
|
statusList: [
|
||||||
{ id: '0', name: '请选择' },
|
|
||||||
{ id: '1', name: '未结算' },
|
{ id: '1', name: '未结算' },
|
||||||
{ id: '2', name: '已结算' },
|
{ id: '2', name: '已结算' },
|
||||||
{ id: '3', name: '待审核' },
|
{ id: '3', name: '待审核' },
|
||||||
|
|
@ -220,7 +219,7 @@ export default {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
keyWord: undefined,
|
keyWord: undefined,
|
||||||
sltStatus: '0',
|
sltStatus: '',
|
||||||
unitId: '',
|
unitId: '',
|
||||||
projectId: '',
|
projectId: '',
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -196,7 +196,6 @@ export default {
|
||||||
// 工程数据
|
// 工程数据
|
||||||
projectList: [],
|
projectList: [],
|
||||||
statusList: [
|
statusList: [
|
||||||
{ id: '', name: '请选择' },
|
|
||||||
{ id: '0', name: '待审核' },
|
{ id: '0', name: '待审核' },
|
||||||
{ id: '1', name: '审核通过' },
|
{ id: '1', name: '审核通过' },
|
||||||
{ id: '2', name: '审核驳回' },
|
{ id: '2', name: '审核驳回' },
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
highlight-current
|
highlight-current
|
||||||
@node-click="handleNodeClick"
|
@node-click="handleNodeClick"
|
||||||
:props="defaultProps"
|
:props="defaultProps"
|
||||||
|
:filter-node-method="filterNode"
|
||||||
>
|
>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -63,11 +64,14 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
// watch: {
|
watch: {
|
||||||
// name: function () {
|
// name: function () {
|
||||||
// this.inputValue = this.name
|
// this.inputValue = this.name
|
||||||
// }
|
// }
|
||||||
// },
|
inputValue(val) {
|
||||||
|
this.$refs.tree.filter(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
inputFocus() {
|
inputFocus() {
|
||||||
if (this.ishowTree == true) {
|
if (this.ishowTree == true) {
|
||||||
|
|
@ -85,6 +89,10 @@ export default {
|
||||||
this.inputValue = e.label
|
this.inputValue = e.label
|
||||||
this.$emit('changeId', e.id)
|
this.$emit('changeId', e.id)
|
||||||
this.ishowTree = false
|
this.ishowTree = false
|
||||||
|
},
|
||||||
|
filterNode(value, data) {
|
||||||
|
if (!value) return true;
|
||||||
|
return data.label.indexOf(value) !== -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="上级" prop="currentId">
|
<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 }"
|
:props="{ expandTrigger: 'hover', label: 'label', value: 'id', checkStrictly: true }"
|
||||||
@change="handleNodeClick"> </el-cascader>
|
@change="handleNodeClick"> </el-cascader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
|
||||||
|
|
@ -156,6 +156,7 @@
|
||||||
v-model="form.currentId"
|
v-model="form.currentId"
|
||||||
:options="deptOptions"
|
:options="deptOptions"
|
||||||
:disabled="isEdit"
|
:disabled="isEdit"
|
||||||
|
filterable
|
||||||
:props="{
|
:props="{
|
||||||
expandTrigger: 'hover',
|
expandTrigger: 'hover',
|
||||||
label: 'label',
|
label: 'label',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue