合并提交

master
Yer 2023-10-09 13:30:56 +08:00
commit eed6ba43d9
4 changed files with 673 additions and 283 deletions

View File

@ -490,4 +490,24 @@ export const getHotWordsHistory = (params) => {
return getRequest(`/hotwords/hotwords/history`,params); return getRequest(`/hotwords/hotwords/history`,params);
}; };
// 获取文件目录列表
export const getFileDirectory = () => {
return getRequest(commonUrl+`/common/resource/fileDirectory`);
};
// 添加文件目录
export const addFileDirectory = (params) => {
return postRequestWithNoForm(commonUrl+`/common/resource/fileDirectory`,params);
};
// 修改文件目录
export const updateFileDirectory = (params) => {
return putRequestWithNoForm(commonUrl+`/common/resource/fileDirectory`,params);
};
// 删除文件目录
export const delFileDirectory = (id) => {
return deleteRequest(commonUrl+`/common/resource/fileDirectory/${id}`);
};

View File

@ -209,10 +209,14 @@ export default {
cursor: pointer; cursor: pointer;
} }
} }
.active { .active {
color: $theme_color; color: $theme_color;
position: relative; position: relative;
} }
.date-picker {}
.active:before { .active:before {
content: ""; content: "";
position: absolute; position: absolute;

File diff suppressed because it is too large Load Diff

View File

@ -10,39 +10,33 @@
item.year + '年' + item.month + '月' }}</Option> item.year + '年' + item.month + '月' }}</Option>
</Select> </Select>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import Cookies from "js-cookie"; import { getShopListData } from "@/api/shops.js";
export default { export default {
props: ["closeShop"], props: ["closeShop"],
data() { data() {
return { return {
month: "", // month: "", //
defuaultWay: {
title: "最近7天",
selected: true,
searchType: "LAST_SEVEN",
},
selectedWay: { selectedWay: {
title: "最近7天", //
title: "过去7天",
selected: true, selected: true,
searchType: "LAST_SEVEN", searchType: "LAST_SEVEN",
}, },
storeId: "", // id storeId: "", // id
dates: [], // dates: [], //
params: { // params: {
//
pageNumber: 1, pageNumber: 1,
pageSize: 10, pageSize: 10,
storeName: "", storeName: "",
storeId: "",
}, },
dateList: [ dateList: [
//
{ {
title: "今天", title: "今天",
selected: false, selected: false,
@ -54,17 +48,18 @@ export default {
searchType: "YESTERDAY", searchType: "YESTERDAY",
}, },
{ {
title: "最近7天", title: "过去7天",
selected: true, selected: true,
searchType: "LAST_SEVEN", searchType: "LAST_SEVEN",
}, },
{ {
title: "最近30天", title: "过去30天",
selected: false, selected: false,
searchType: "LAST_THIRTY", searchType: "LAST_THIRTY",
}, },
], ],
originDateList: [ originDateList: [
//
{ {
title: "今天", title: "今天",
selected: false, selected: false,
@ -76,23 +71,54 @@ export default {
searchType: "YESTERDAY", searchType: "YESTERDAY",
}, },
{ {
title: "最近7天", title: "过去7天",
selected: true, selected: true,
searchType: "LAST_SEVEN", searchType: "LAST_SEVEN",
}, },
{ {
title: "最近30天", title: "过去30天",
selected: false, selected: false,
searchType: "LAST_THIRTY", searchType: "LAST_THIRTY",
}, },
], ],
shopTotal: "", //
shopsData: [], //
}; };
}, },
mounted() { mounted() {
this.storeId = JSON.parse(Cookies.get("userInfoSeller")).id;
this.getFiveYears(); this.getFiveYears();
this.getShopList();
}, },
methods: { methods: {
//
handleReachBottom() {
setTimeout(() => {
if (this.params.pageNumber * this.params.pageSize <= this.shopTotal) {
this.params.pageNumber++;
this.getShopList();
}
}, 1500);
},
//
getShopList() {
getShopListData(this.params).then((res) => {
if (res.success) {
/**
* 解决数据请求中滚动栏会一直上下跳动
*/
this.shopTotal = res.result.total;
this.shopsData.push(...res.result.records);
}
});
},
//
changeshop(val) {
this.selectedWay.storeId = this.storeId;
this.$emit("selected", this.selectedWay);
},
// 5 // 5
getFiveYears() { getFiveYears() {
let getYear = new Date().getFullYear(); let getYear = new Date().getFullYear();
@ -114,7 +140,7 @@ export default {
} }
this.dates = dates.reverse(); this.dates = dates.reverse();
}, },
// //
changeSelect(e) { changeSelect(e) {
this.month = e this.month = e
if (this.month) { if (this.month) {
@ -136,13 +162,13 @@ export default {
} }
}, },
// //
clickBreadcrumb(item) { clickBreadcrumb(item) {
let currentIndex; let currentIndex;
this.dateList.forEach((res, index) => { this.dateList.forEach((res,index) => {
res.selected = false; res.selected = false;
if (res.title === item.title) { if(res.title === item.title){
currentIndex = index currentIndex = index
} }
}); });
@ -150,7 +176,7 @@ export default {
item.storeId = this.storeId; item.storeId = this.storeId;
this.month = ""; this.month = "";
if (item.searchType == "") { if (item.searchType == "") {
let currentDate = this.originDateList[currentIndex].searchType let currentDate = this.originDateList[currentIndex].searchType
if (currentDate) { if (currentDate) {
item.searchType = currentDate item.searchType = currentDate
} else { } else {