|
@@ -15,6 +15,14 @@
|
|
|
},
|
|
|
]"
|
|
|
@get-list="getList">
|
|
|
+ <template #isTop="{ item }">
|
|
|
+ <div>
|
|
|
+ <el-icon style="color: red; cursor: pointer; font-size: 22px; transform: translateY(5px)" @click="deleteTop(item)" v-if="item.isTop === 1">
|
|
|
+ <Flag />
|
|
|
+ </el-icon>
|
|
|
+ <el-icon style="color: #b5b5b5; cursor: pointer; font-size: 22px; transform: translateY(5px)" @click="addTop(item)" v-else><Flag /></el-icon>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
<template #address="{ item }">
|
|
|
<span>{{ item.countryName }}</span>
|
|
|
<span v-if="item.provinceName"> ,{{ item.provinceName }}</span>
|
|
@@ -342,6 +350,15 @@ const config = computed(() => {
|
|
|
return [
|
|
|
{
|
|
|
attrs: {
|
|
|
+ label: "",
|
|
|
+ slot: "isTop",
|
|
|
+ fixed: "left",
|
|
|
+ width: 60,
|
|
|
+ align: "center",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
label: "客户名称",
|
|
|
prop: "name",
|
|
|
slot: "name",
|
|
@@ -1031,6 +1048,16 @@ const submitPerson = () => {
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
+const deleteTop = (item) => {
|
|
|
+ proxy.post("/customerTop/delete", { customerId: item.id }).then(() => {
|
|
|
+ item.isTop = 0;
|
|
|
+ });
|
|
|
+};
|
|
|
+const addTop = (item) => {
|
|
|
+ proxy.post("/customerTop/add", { customerId: item.id }).then(() => {
|
|
|
+ item.isTop = 1;
|
|
|
+ });
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|