|
|
@@ -74,6 +74,18 @@
|
|
|
end-placeholder="结束日期"
|
|
|
></el-date-picker>
|
|
|
</el-form-item>
|
|
|
+ <template>
|
|
|
+ <div>
|
|
|
+ <el-select v-model="selectedValue" filterable placeholder="请选择">
|
|
|
+ <el-option
|
|
|
+ v-for="item in filteredOptions"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
@@ -355,6 +367,7 @@ import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUs
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
+import log from "@/views/monitor/job/log.vue";
|
|
|
|
|
|
export default {
|
|
|
name: "User",
|
|
|
@@ -394,6 +407,14 @@ export default {
|
|
|
roleOptions: [],
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
+ selectedValue: '?',
|
|
|
+ options: [
|
|
|
+ { label: '选项1', value: '1' },
|
|
|
+ { label: '选项2', value: '2' },
|
|
|
+ { label: '选项3', value: '3' },
|
|
|
+ // 更多选项...
|
|
|
+ ],
|
|
|
+ filteredOptions: [],
|
|
|
defaultProps: {
|
|
|
children: "children",
|
|
|
label: "label"
|
|
|
@@ -472,6 +493,12 @@ export default {
|
|
|
// 根据名称筛选部门树
|
|
|
deptName(val) {
|
|
|
this.$refs.tree.filter(val);
|
|
|
+ },
|
|
|
+ selectedValue(newVal,oldVal) {
|
|
|
+ // 当选择值改变时,更新模糊匹配的下拉列表
|
|
|
+ console.log(oldVal);
|
|
|
+ console.log(newVal);
|
|
|
+ this.updateFilteredOptions(newVal);
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
@@ -482,6 +509,12 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
+ updateFilteredOptions(query) {
|
|
|
+ // 根据查询关键词,获取匹配的下拉列表数据
|
|
|
+ this.filteredOptions = this.options.filter(option =>
|
|
|
+ option.label.includes(query)
|
|
|
+ );
|
|
|
+ },
|
|
|
/** 查询用户列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|