Commit b6c3fb5e authored by “yiyousong”'s avatar “yiyousong”

perf: 优化应用黑名单产品列表获取

parent bbec0661
......@@ -57,7 +57,7 @@
<a-space>
<a-select
style="min-width: 120px"
v-model="siteDevTable.searchForm.type"
v-model="siteDevTable.searchForm.productName"
showSearch
optionFilterProp="label"
>
......@@ -65,12 +65,12 @@
>全部类型
</a-select-option>
<a-select-option
v-for="(v, i) in devType"
v-for="(v, i) in productList"
:key="i"
:value="v"
:label="v"
:value="v.productName"
:label="v.productName"
>
{{ v }}
{{ v.productName }}
</a-select-option>
</a-select>
<a-input-search
......@@ -136,32 +136,15 @@ import {
getBlackAppList,
deleteBlackapp,
} from "@/services/market";
import {getProductList} from "@/services/surface";
import local from "@/utils/local";
import DevToBlack from "../modal/DevToBlack.vue";
import YTable from "@/components/YTable.vue";
const devType = [
"排队机",
"窗口屏",
"呼叫器",
"集中显示屏",
"评价器",
"信息发布屏",
"导视机",
"自助服务终端",
"填单机",
"一码通",
"LED通屏",
"取件柜",
"背靠背评价设备",
"存取件",
"桌面式自助服务终端",
];
export default {
components: { DevToBlack, YTable },
data() {
return {
devType,
blackAppTable: {
page: 1,
size: 10,
......@@ -206,7 +189,7 @@ export default {
data: [],
searchForm: {
deviceCode: "",
type: "",
productName: "",
},
columns: [
{
......@@ -247,13 +230,27 @@ export default {
selectedRows: [],
visible: false,
siteId: local.getLocal("siteId"), // 站点id
productList: [], // 产品列表
};
},
created() {
this.getProductList();
this.getBlackAppList();
this.getDeviceList();
},
methods: {
// 获取产品列表
async getProductList() {
let res = await getProductList({
siteId: this.siteId,
page:1,
size:-1
});
if (res.data.code === 1) {
let { data } = res.data.data;
this.productList = data
}
},
// 获取设备黑名单
async getBlackAppList() {
this.blackAppTable.loading = true;
......@@ -282,7 +279,7 @@ export default {
size: this.siteDevTable.size,
siteId: this.siteId,
deviceCode: `%${this.siteDevTable.searchForm.deviceCode}%`,
productName: `%${this.siteDevTable.searchForm.type}%`,
productName: `%${this.siteDevTable.searchForm.productName}%`,
});
if (res.data.code == 1) {
let { data, total } = res.data.data;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment