From 6cfc511db100ab0b6f3b803085d69b9faec50903 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9A=E4=BF=8A=E6=97=AD?= <398847134@qq.com> Date: Thu, 12 Jun 2025 16:54:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E5=85=B1=E5=93=81=E7=89=8C=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=8F=96=E6=B6=88=E6=8E=88=E6=9D=83=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sub-operation-service/src/apis/brand.js | 13 ++++ .../src/views/brand/components/Auth.vue | 68 +++++++++++++++++-- .../ruralFinance/integratedSector/index.vue | 6 +- .../smartFarm/components/dataDisplay.vue | 1 - 4 files changed, 77 insertions(+), 11 deletions(-) diff --git a/sub-operation-service/src/apis/brand.js b/sub-operation-service/src/apis/brand.js index 6d3b678..6f01572 100644 --- a/sub-operation-service/src/apis/brand.js +++ b/sub-operation-service/src/apis/brand.js @@ -45,6 +45,12 @@ export function authDetail(id, params) { params, }); } +export function getStatisticsData(id, params) { + return request('brand/applicationrecord/getStatisticsData', { + method: 'GET', + params, + }); +} export function saveRecords(data) { return request('brand/applicationrecord/save', { @@ -52,3 +58,10 @@ export function saveRecords(data) { data, }); } + +export function cancelAuth(data) { + return request('brand/applicationrecord/cancel', { + method: 'POST', + data, + }); +} diff --git a/sub-operation-service/src/views/brand/components/Auth.vue b/sub-operation-service/src/views/brand/components/Auth.vue index e9ad5f0..93df1d4 100644 --- a/sub-operation-service/src/views/brand/components/Auth.vue +++ b/sub-operation-service/src/views/brand/components/Auth.vue @@ -7,13 +7,21 @@
-
817
+
{{ statisticsData.advent }}
授权产品
-
+
-

较上月上涨 13

+

+ 较上月上涨 {{ statisticsData.adventNum }} 件 +

+
+
+ +

+ 较上月下降 {{ -statisticsData.adventNum }} 件 +

@@ -22,13 +30,21 @@
-
125
+
{{ statisticsData.total }}
临期产品
-
+
+ +

+ 较上月上涨 {{ statisticsData.totalNum }} 件 +

+
+
-

较上月下降 5

+

+ 较上月下降 {{ -statisticsData.totalNum }} 件 +

@@ -186,6 +202,9 @@ import { ref, computed, onMounted } from 'vue'; import { getAssetsFile } from '@/utils/index.js'; import { authList, getProducts } from '@/apis/brand'; import { Edit } from '@element-plus/icons-vue'; +import { getStatisticsData } from '@/apis/brand.js'; +import { ElMessage, ElMessageBox } from 'element-plus'; +import { cancelAuth } from '@/apis/brand.js'; const dialogVisible = ref(false); const traceData = ref(null); @@ -255,8 +274,36 @@ const products = ref([ }, ]); +const statisticsData = ref({ + advent: 817, + adventNum: 13, + total: 125, + totalNum: -5, +}); + const onRevoke = (p) => { - console.log('取消授权', p); + ElMessageBox.confirm('是否确认取消该商品的授权?', '注意!', { + confirmButtonText: '确认', + cancelButtonText: '放弃', + type: 'error', + }) + .then(() => { + cancelAuth({ id: p.id }).then((res) => { + if (res.code === 200) { + ElMessage({ + type: 'success', + message: '已取消授权', + }); + getAuthList(2); + } + }); + }) + .catch(() => { + // ElMessage({ + // type: 'info', + // message: 'Delete canceled', + // }); + }); }; function onInspect(item) { @@ -338,8 +385,15 @@ const getAuthList = (status) => { }); }; +const getStatusData = () => { + getStatisticsData().then((res) => { + console.log(res); + }); +}; + onMounted(() => { getAuthList(2); + getStatusData(); }); diff --git a/sub-operation-service/src/views/ruralFinance/integratedSector/index.vue b/sub-operation-service/src/views/ruralFinance/integratedSector/index.vue index 2339e48..eef8ada 100644 --- a/sub-operation-service/src/views/ruralFinance/integratedSector/index.vue +++ b/sub-operation-service/src/views/ruralFinance/integratedSector/index.vue @@ -79,15 +79,15 @@
{{ item.maxMoney }}
-
最长期限
+
申请期限
{{ item.maxDate }}
-
年利率
+
参考利率
{{ item.rate }}
-
投保方式
+
担保方式
{{ item.ways }}
diff --git a/sub-operation-service/src/views/smartFarm/components/dataDisplay.vue b/sub-operation-service/src/views/smartFarm/components/dataDisplay.vue index 448bcea..aff3b49 100644 --- a/sub-operation-service/src/views/smartFarm/components/dataDisplay.vue +++ b/sub-operation-service/src/views/smartFarm/components/dataDisplay.vue @@ -300,7 +300,6 @@ onMounted(() => { const fertilizer = getAssetsFile('images/mockPic/fertilizerReport.png'); const seed = getAssetsFile('images/mockPic/seedReport.png'); const Irrigation = getAssetsFile('images/mockPic/irrigationReport.png'); - console.log(fertilizer); initChart(); if (props.title.indexOf('灌溉') !== -1) { Pics.value = [Irrigation];