|
|
@@ -30,6 +30,9 @@
|
|
|
{{ Number(row.status) === 1 ? '启用' : '禁用' }}
|
|
|
</el-tag>
|
|
|
</template>
|
|
|
+ <template v-slot:factoriesId="{ row }">
|
|
|
+ {{ getFactoryName(row.factoriesId) }}
|
|
|
+ </template>
|
|
|
<template v-slot:action="{ row }">
|
|
|
<el-link
|
|
|
v-if="row.clientId"
|
|
|
@@ -134,6 +137,7 @@
|
|
|
import tabMixins from '@/mixins/tableColumnsMixin';
|
|
|
import ExternalClientSearch from './components/external-client-search.vue';
|
|
|
import ExternalClientEdit from './components/external-client-edit.vue';
|
|
|
+ import { getFactoryList } from '@/api/factoryModel';
|
|
|
import {
|
|
|
pageExternalClients,
|
|
|
setExternalClientStatus,
|
|
|
@@ -234,10 +238,26 @@
|
|
|
pageSize: this.$store.state.tablePageSize,
|
|
|
cacheKeyUrl: 'external-client-management',
|
|
|
secretVisible: false,
|
|
|
- clientSecret: ''
|
|
|
+ clientSecret: '',
|
|
|
+ factoryList: []
|
|
|
};
|
|
|
},
|
|
|
+ created() {
|
|
|
+ this.loadFactoryList();
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ async loadFactoryList() {
|
|
|
+ this.factoryList = (await getFactoryList()) || [];
|
|
|
+ },
|
|
|
+ getFactoryName(id) {
|
|
|
+ if (!id) {
|
|
|
+ return '全部工厂';
|
|
|
+ }
|
|
|
+ const factory = this.factoryList.find(
|
|
|
+ (item) => String(item.id) === String(id)
|
|
|
+ );
|
|
|
+ return factory ? factory.name : id;
|
|
|
+ },
|
|
|
datasource({ page, limit, where, order }) {
|
|
|
return pageExternalClients({
|
|
|
...where,
|