diff --git a/src/api/user/oilSiteOilsPrice.js b/src/api/user/oilSiteOilsPrice.js index b2dc022..8051a79 100644 --- a/src/api/user/oilSiteOilsPrice.js +++ b/src/api/user/oilSiteOilsPrice.js @@ -16,6 +16,12 @@ export default { data: page }) }, + findByRelationId(id) { // 分页查询(调度管理) + return request({ + url: `/${service_name}/saasPriceAppRelationRecord/findByRelationId/${id}`, + method: 'get' + }) + }, save(oilSiteOilsPrice) { // 保存 return request({ url: `/${service_name}/${group_name}/save`, diff --git a/src/utils/request.js b/src/utils/request.js index 1e685e7..b58b62a 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -163,9 +163,11 @@ service.interceptors.response.use( type: "error", duration: 5 * 1000 }); + setTimeout(() => { store.dispatch("user/resetToken").then(() => { location.reload(); }); + }, 2000); // 排除自定义的车队返回结果状态码 } else if ( res.code !== 20000 && diff --git a/src/views/site/oilSiteOilsPrice/OilSiteOilsPriceList.vue b/src/views/site/oilSiteOilsPrice/OilSiteOilsPriceList.vue index 59ec756..4cadd24 100644 --- a/src/views/site/oilSiteOilsPrice/OilSiteOilsPriceList.vue +++ b/src/views/site/oilSiteOilsPrice/OilSiteOilsPriceList.vue @@ -132,6 +132,11 @@ 调价策略 + + + 变更历史 + + - + + + + + + + + + + + + + + + + + + + { let typeData = { type: row.globalEnable == 'ENABLE' ? 'success' : 'info', value: row.globalEnable == 'ENABLE' ? '启用' : '禁用' } return
- {typeData.value} + {typeData.value} {cell}
{row.siteId} @@ -611,6 +656,13 @@ export default { }, }, }, + watch:{ + showHistory(){ + if(!n){ + this.historyData = [] + } + } + }, created() { this.getByPage(); oilVehicleOwnerApi.getOils().then((res) => { @@ -624,6 +676,12 @@ export default { window.addEventListener("resize", this.getHeight, false); }, methods: { + showHistoryFn(row) { + oilSiteOilsPriceApi.findByRelationId(row.id).then(res => { + this.historyData = res.data; + this.showHistory = true + }) + }, toOutPutPiliang() { if (this.multipleSelection.length < 1) { this.$message.warning('请至少选择一条数据') @@ -673,7 +731,7 @@ export default { }, modifyStrategy(id) { oilSiteOilsPriceApi.get(id.id).then((res) => { - this.oilSiteOilsPrice = res.data + this.oilSiteOilsPrice = res.data // Object.assign(res.data, { // personalPriceApp: id.personalPriceApp, // personalPriceBase: id.personalPriceBase,