|
@@ -15,6 +15,7 @@ import { useTableData } from '/@/utils/useTableData';
|
|
import EditComputerInfo from '/@/views/computer-information/components/EditComputerInfo.vue';
|
|
import EditComputerInfo from '/@/views/computer-information/components/EditComputerInfo.vue';
|
|
import { useResponse } from '/@/utils/useResponse';
|
|
import { useResponse } from '/@/utils/useResponse';
|
|
import CreateComputer from '/@/views/computer-information/components/CreateComputer.vue';
|
|
import CreateComputer from '/@/views/computer-information/components/CreateComputer.vue';
|
|
|
|
+import { getShopFilterList } from '/@/views/computer-information/api';
|
|
|
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
const loading = ref();
|
|
const loading = ref();
|
|
@@ -23,10 +24,12 @@ const showDialog = ref(false);
|
|
// const isDrawerVisible = ref(false);
|
|
// const isDrawerVisible = ref(false);
|
|
|
|
|
|
const searchComputer = ref('');
|
|
const searchComputer = ref('');
|
|
|
|
+const searchNumber = ref<string[]>([]);
|
|
|
|
|
|
const computerInfo = ref([]);
|
|
const computerInfo = ref([]);
|
|
const shopOptions = ref([]);
|
|
const shopOptions = ref([]);
|
|
const userOptions = ref([]);
|
|
const userOptions = ref([]);
|
|
|
|
+const numberOptions = ref([]);
|
|
|
|
|
|
const { tableOptions, handlePageChange } = usePagination(fetchCardData);
|
|
const { tableOptions, handlePageChange } = usePagination(fetchCardData);
|
|
tableOptions.value.limit = 12;
|
|
tableOptions.value.limit = 12;
|
|
@@ -36,7 +39,9 @@ async function fetchCardData() {
|
|
page: tableOptions.value.page,
|
|
page: tableOptions.value.page,
|
|
limit: tableOptions.value.limit,
|
|
limit: tableOptions.value.limit,
|
|
computerNumber: searchComputer.value,
|
|
computerNumber: searchComputer.value,
|
|
- };
|
|
|
|
|
|
+ shop: searchNumber.value.join(','),
|
|
|
|
+ };
|
|
|
|
+ console.log(query);
|
|
await useTableData(api.getCardData, query, tableOptions);
|
|
await useTableData(api.getCardData, query, tableOptions);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -91,10 +96,21 @@ async function fetchUserOptions() {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+async function fetchShopFilterOptions() {
|
|
|
|
+ try {
|
|
|
|
+ const resp = await useResponse(null, api.getShopFilterList);
|
|
|
|
+ numberOptions.value = resp.data.platformNumber
|
|
|
|
+ } catch (e) {
|
|
|
|
+ console.log('error', e);
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
fetchCardData();
|
|
fetchCardData();
|
|
fetchShopOptions();
|
|
fetchShopOptions();
|
|
fetchUserOptions();
|
|
fetchUserOptions();
|
|
|
|
+ fetchShopFilterOptions();
|
|
});
|
|
});
|
|
</script>
|
|
</script>
|
|
|
|
|
|
@@ -105,7 +121,20 @@ onMounted(() => {
|
|
<div>
|
|
<div>
|
|
<span class="font-bold text-xl">电脑信息概览</span>
|
|
<span class="font-bold text-xl">电脑信息概览</span>
|
|
<el-divider class="text-3xl" direction="vertical" />
|
|
<el-divider class="text-3xl" direction="vertical" />
|
|
- <el-input v-model="searchComputer" clearable placeholder="电脑编号" style="width: 200px" @change="fetchCardData"></el-input>
|
|
|
|
|
|
+ <el-input v-model="searchComputer" clearable placeholder="电脑编号" style="width: 200px;padding-right: 10px;" @change="fetchCardData"></el-input>
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="searchNumber"
|
|
|
|
+ clearable
|
|
|
|
+ collapse-tags
|
|
|
|
+ collapse-tags-tooltip
|
|
|
|
+ filterable
|
|
|
|
+ multiple
|
|
|
|
+ placeholder="店铺编号"
|
|
|
|
+ style="width: 200px"
|
|
|
|
+ @change="fetchCardData"
|
|
|
|
+ >
|
|
|
|
+ <el-option v-for="item in numberOptions" :key="item" :label="item" :value="item" />
|
|
|
|
+ </el-select>
|
|
</div>
|
|
</div>
|
|
<span>
|
|
<span>
|
|
<el-button :icon="Plus" bg text type="primary" @click="addComputer">添 加</el-button>
|
|
<el-button :icon="Plus" bg text type="primary" @click="addComputer">添 加</el-button>
|