|
@@ -36,7 +36,7 @@
|
|
|
<label>状态</label>
|
|
|
<el-select v-model="searchStatus" @change="getList(1)" placeholder="请选择">
|
|
|
<el-option
|
|
|
- v-for="item in searchStatusList"
|
|
|
+ v-for="item in $searchStatusList"
|
|
|
:key="item.status"
|
|
|
:label="item.status_name"
|
|
|
:value="item.status">
|
|
@@ -166,6 +166,7 @@ import Header from "../../components/Header.vue";
|
|
|
import NavMenu from "../../components/NavMenu.vue"
|
|
|
import Breadcrumb from '../../components/Breadcrumb.vue';
|
|
|
import { getLogin } from "@/api/ajax";
|
|
|
+import { mapState } from 'vuex';
|
|
|
|
|
|
export default {
|
|
|
//import引入的组件需要注入到对象中才能使用
|
|
@@ -196,12 +197,6 @@ export default {
|
|
|
account_type_name:'全部'
|
|
|
}
|
|
|
],
|
|
|
- searchStatusList:[
|
|
|
- {
|
|
|
- status:-1,
|
|
|
- status_name:'全部'
|
|
|
- }
|
|
|
- ],
|
|
|
statusList:{
|
|
|
1:{
|
|
|
text:'正常',
|
|
@@ -237,7 +232,7 @@ export default {
|
|
|
},
|
|
|
//计算属性 类似于data概念
|
|
|
computed: {
|
|
|
-
|
|
|
+ ...mapState(['$searchStatusList']),
|
|
|
},
|
|
|
//监控data中数据变化
|
|
|
watch: {},
|
|
@@ -349,19 +344,6 @@ export default {
|
|
|
this.tableHeight = window.innerHeight - tableH;
|
|
|
}
|
|
|
},
|
|
|
- // 用户状态列表
|
|
|
- getUserStatusList(){
|
|
|
- let MethodName = "/OrgServer/DictManager/GetSysUserStatusList";
|
|
|
- getLogin(MethodName, {})
|
|
|
- .then((res) => {
|
|
|
- if(res.status===1){
|
|
|
- this.searchStatusList = this.searchStatusList.concat(res.status_list)
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- this.loading = false
|
|
|
- });
|
|
|
- },
|
|
|
// 用户类型列表
|
|
|
getUserAccountTypeList(){
|
|
|
let MethodName = "/OrgServer/DictManager/GetSysUserAccountTypeList";
|
|
@@ -379,7 +361,6 @@ export default {
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {
|
|
|
this.getTableHeight();
|
|
|
- this.getUserStatusList()
|
|
|
this.getUserAccountTypeList()
|
|
|
this.getList()
|
|
|
},
|