1.运营商搜索和运营区 快速搜索可选可搜索

This commit is contained in:
邱贞招 2024-08-09 20:40:55 +08:00
parent 5517c4179f
commit 9eadcec906
12 changed files with 35 additions and 12 deletions

View File

@ -1,6 +1,16 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="运营商" prop="deptId" v-if="userName == 'admin'">
<el-select v-model="queryParams.deptId" filterable placeholder="选择运营商" clearable>
<el-option
v-for="item in deptOptions"
:key="item.deptId"
:label="item.deptName"
:value="item.deptId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="运营区" prop="areaName">
<el-input v-model="queryParams.areaName" placeholder="请输入运营区" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
@ -432,6 +442,7 @@ import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { getDistrictList } from "@/api/common/common";
import { deptTreeSelect } from '@/api/system/user'
import { listDept2 } from '@/api/system/dept'
export default {
name: "Area",
@ -504,6 +515,11 @@ export default {
this.userName = this.$store.state.user.name;
this.getList();
this.getDeptTree();
if(this.userName === 'admin'){
listDept2({status: '0',pageNum:1,pageSize:999 }).then(response => {
this.deptOptions = response.rows;
});
}
},
methods: {
getCityList() {

View File

@ -2,7 +2,7 @@
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="运营商" prop="deptId" v-if="userName == 'admin'">
<el-select v-model="queryParams.deptId" placeholder="请选择运营商" clearable>
<el-select v-model="queryParams.deptId" filterable placeholder="请选择运营商" clearable>
<el-option
v-for="item in deptOptions"
:key="item.deptId"
@ -198,6 +198,7 @@ import { listArticle, getArticle, delArticle, addArticle, updateArticle,classify
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { listArea } from '@/api/system/area'
import { listDept2 } from '@/api/system/dept'
export default {
name: "Article",
@ -211,6 +212,7 @@ export default {
areaOptions: [],
//
ids: [],
deptOptions: [],
//
single: true,
//
@ -252,6 +254,11 @@ export default {
this.userName = this.$store.state.user.name;
this.getList();
this.getClassifyTree();
if(this.userName === 'admin'){
listDept2({status: '0',pageNum:1,pageSize:999 }).then(response => {
this.deptOptions = response.rows;
});
}
},
methods: {
/** 查询文章列表 */

View File

@ -2,7 +2,7 @@
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="运营区" prop="areaId" v-if="userName == 'admin'">
<el-select v-model="queryParams.areaId" placeholder="请选择运营区" clearable>
<el-select v-model="queryParams.areaId" filterable placeholder="请选择运营区" clearable>
<el-option
v-for="item in areaOptions"
:key="item.areaId"

View File

@ -2,7 +2,7 @@
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="运营商" prop="deptId" v-if="userName == 'admin'">
<el-select v-model="queryParams.deptId" placeholder="选择运营商" style="width: 120px;" clearable>
<el-select v-model="queryParams.deptId" filterable placeholder="选择运营商" style="width: 120px;" clearable>
<el-option
v-for="item in deptOptions"
:key="item.deptId"
@ -12,7 +12,7 @@
</el-select>
</el-form-item>
<el-form-item label="运营区" prop="areaId" v-if="userName == 'admin'">
<el-select v-model="queryParams.areaId" placeholder="选择运营区" style="width: 120px;" clearable>
<el-select v-model="queryParams.areaId" filterable placeholder="选择运营区" style="width: 120px;" clearable>
<el-option
v-for="item in areaOptions"
:key="item.areaId"

View File

@ -3,7 +3,7 @@
<!-- 搜索表单 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="运营商" prop="deptId" v-if="userName == 'admin'">
<el-select v-model="queryParams.deptId" placeholder="请选择运营商" clearable>
<el-select v-model="queryParams.deptId" filterable placeholder="请选择运营商" clearable>
<el-option
v-for="item in deptOptions"
:key="item.deptId"

View File

@ -2,7 +2,7 @@
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="运营区" prop="areaId" v-if="userName == 'admin'">
<el-select v-model="queryParams.areaId" placeholder="请选择运营区" clearable>
<el-select v-model="queryParams.areaId" filterable placeholder="请选择运营区" clearable>
<el-option
v-for="item in areaOptions"
:key="item.areaId"

View File

@ -2,7 +2,7 @@
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="运营商" prop="deptId" v-if="userName == 'admin'">
<el-select v-model="queryParams.operator" placeholder="选择运营商" clearable>
<el-select v-model="queryParams.operator" filterable placeholder="选择运营商" clearable>
<el-option
v-for="item in deptOptions"
:key="item.deptId"

View File

@ -2,7 +2,7 @@
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="运营区" prop="areaId" v-if="userName == 'admin'">
<el-select v-model="queryParams.areaId" placeholder="请选择运营区" clearable>
<el-select v-model="queryParams.areaId" filterable placeholder="请选择运营区" clearable>
<el-option
v-for="item in areaOptions"
:key="item.areaId"

View File

@ -2,7 +2,7 @@
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="运营区" prop="areaId" >
<el-select v-model="queryParams.areaId" placeholder="请选择运营区">
<el-select v-model="queryParams.areaId" filterable placeholder="请选择运营区">
<el-option
v-for="item in areaOptions"
:key="item.areaId"

View File

@ -2,7 +2,7 @@
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="运营区" prop="areaId" v-if="userName == 'admin'">
<el-select v-model="queryParams.areaId" placeholder="请选择运营区" clearable>
<el-select v-model="queryParams.areaId" filterable placeholder="请选择运营区" clearable>
<el-option
v-for="item in areaOptions"
:key="item.areaId"

View File

@ -2,7 +2,7 @@
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="运营商" prop="deptId" v-if="userName == 'admin'">
<el-select v-model="queryParams.deptId" placeholder="请选择运营商" clearable>
<el-select v-model="queryParams.deptId" filterable placeholder="请选择运营商" clearable>
<el-option
v-for="item in deptOptions"
:key="item.deptId"

View File

@ -2,7 +2,7 @@
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="运营区" prop="areaId" v-if="userName == 'admin'">
<el-select v-model="queryParams.areaId" placeholder="请选择运营区" clearable>
<el-select v-model="queryParams.areaId" filterable placeholder="请选择运营区" clearable>
<el-option
v-for="item in areaOptions"
:key="item.areaId"