|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
- <div v-show="!commodityManageFormState.show">
|
|
|
+ <div v-show="!(commodityManageFormState.show || interfaceListData.show)">
|
|
|
<transition name="fade">
|
|
|
<el-form ref="queryFormRef" :model="queryParams">
|
|
|
<el-row :gutter="20">
|
|
@@ -12,14 +12,14 @@
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="服务分类:" prop="serviceClass">
|
|
|
<el-select v-model="queryParams.serviceClass" clearable>
|
|
|
- <!--<el-option v-for="item in mm_event_type" :key="item.value" :label="item.label" :value="item.value"></el-option>-->
|
|
|
+ <el-option v-for="item in service_class" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="服务状态:" prop="serviceStatus">
|
|
|
<el-select v-model="queryParams.serviceStatus" clearable>
|
|
|
- <!--<el-option v-for="item in mm_event_type" :key="item.value" :label="item.label" :value="item.value"></el-option>-->
|
|
|
+ <el-option v-for="item in service_status" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -56,8 +56,12 @@
|
|
|
<el-table-column label="支付数" align="center" prop="payAmount" />
|
|
|
<el-table-column label="销量" align="center" prop="sales" />
|
|
|
<el-table-column label="退款数" align="center" prop="refundAmount" />
|
|
|
- <el-table-column label="接口数" align="center" prop="" />
|
|
|
- <el-table-column label="调用数" align="center" prop="" />
|
|
|
+ <el-table-column label="接口数" align="center" prop="interfacesAmount">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-text class="common-btn-text-primary" @click="showInterfaceList(scope.row)">{{ scope.row.interfacesAmount }}</el-text>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="调用数" align="center" prop="callAmount" />
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
<template #default="scope">
|
|
|
<el-text class="common-btn-text-primary" @click="handleView(scope.row)">查看</el-text>
|
|
@@ -66,21 +70,23 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
- <pagination v-show="total > 0" v-model:page="queryParams.page" v-model:limit="queryParams.page_size"
|
|
|
- :total="total" @pagination="getList"/>
|
|
|
+ <pagination v-show="total > 0" v-model:page="queryParams.page" v-model:limit="queryParams.page_size" :total="total" @pagination="getList" />
|
|
|
</div>
|
|
|
<CommodityManageForm
|
|
|
v-if="commodityManageFormState.show"
|
|
|
@onCancel="commodityManageFormState.show = false"
|
|
|
@onConfirm="handleCommodityManageFormState"
|
|
|
/>
|
|
|
+ <InterfaceList v-if="interfaceListData.show" :id="interfaceListData.id" @back="handleBack" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup name="CommodityManage">
|
|
|
import CommodityManageForm from './CommodityManageForm.vue';
|
|
|
+import InterfaceList from './InterfaceList.vue';
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
+const { service_class, service_status } = toRefs(proxy?.useDict('service_class', 'service_status'));
|
|
|
const queryFormRef = ref();
|
|
|
// 搜索条件
|
|
|
const queryParams = reactive({
|
|
@@ -113,6 +119,7 @@ const commodityManageFormState = ref({
|
|
|
const getList = () => {
|
|
|
loading.value = true;
|
|
|
setTimeout(() => {
|
|
|
+ dataList.value = [{ interfacesAmount: 20 }];
|
|
|
loading.value = false;
|
|
|
}, 500);
|
|
|
};
|
|
@@ -166,6 +173,25 @@ const handleImport = () => {};
|
|
|
// 导出
|
|
|
const handleExport = () => {};
|
|
|
|
|
|
+//接口列表参数
|
|
|
+const interfaceListData = ref({
|
|
|
+ show: false,
|
|
|
+ id: ''
|
|
|
+});
|
|
|
+// 接口列表界面
|
|
|
+const showInterfaceList = (row) => {
|
|
|
+ interfaceListData.value = {
|
|
|
+ show: true,
|
|
|
+ id: row.id
|
|
|
+ };
|
|
|
+};
|
|
|
+
|
|
|
+const handleBack = () => {
|
|
|
+ interfaceListData.value = {
|
|
|
+ show: false,
|
|
|
+ id: ''
|
|
|
+ };
|
|
|
+};
|
|
|
getList();
|
|
|
</script>
|
|
|
|