pull/7/head^2
Aaaaaaaa 2024-09-08 16:59:54 +08:00
parent 7d8e8e6eec
commit 3189457a62
12 changed files with 194 additions and 240 deletions

View File

@ -47,10 +47,3 @@ export function delapi(productId){
})
}
export function getprice(productId){
return request({
url:"/background/apimanage/getprice/"+productId,
method: "POST",
})
}

View File

@ -7,12 +7,3 @@ export function gethostportList(){
method: "GET",
})
}
export function getcompany(){
return request({
url:"/market/company/selectcompany",
method: "POST",
})
}

View File

@ -6,3 +6,17 @@ export function getExtractDataTableNameList() {
method: 'post',
})
}
export function findTableValue(dataId,name) {
return request({
url: '/property/dataRunName/findTableValue?dataId='+dataId+"&tableName="+name,
method: 'post',
})
}
export function selectBasicList() {
return request({
url: '/property/dataRunName/selectBasicList',
method: 'post',
})
}

View File

@ -48,3 +48,10 @@ export function selectHandleClick(data) {
})
}
export function extractDataName(data) {
return request({
url: '/property/dataRunName/extractDataName',
method: 'post',
data: data
})
}

View File

@ -148,31 +148,7 @@ export const constantRoutes = [
path: 'index',
name: 'apiupdmessage',
component: () => import('@/views/background/apiupdmessage/index.vue'),
meta: { title: '接口信息修改页面', icon: 'form' }
}
]
},
{
path: '/product',
component: Layout,
children: [
{
path: 'index',
name: 'product',
component: () => import('@/views/market/product/index.vue'),
meta: { title: '数据块', icon: 'form' }
}
]
},
{
path: '/Workbench',
component: Layout,
children: [
{
path: 'index',
name: 'Workbench',
component: () => import('@/views/market/workbench/index.vue'),
meta: { title: '信息', icon: 'form' }
meta: { title: '接口列表', icon: 'form' }
}
]
},

View File

@ -116,12 +116,10 @@
:total="total">
</el-pagination>
<!--新增对话框-->
<el-dialog
title="新增接口"
title="提示"
:visible.sync="dialogVisible"
width="60%"
width="30%"
:before-close="handleClose">
<center>
<el-form :model="api" status-icon :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
@ -134,6 +132,9 @@
<el-form-item label="接口描述" prop="productContent" style="width: 70%">
<el-input type="text" v-model="api.productContent" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="接口价格" prop="productPrice" style="width: 70%">
<el-input type="text" v-model="api.productPrice" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="接口来源" prop="productFrom" style="width: 70%">
<el-input type="text" v-model="api.productFrom" autocomplete="off"></el-input>
</el-form-item>
@ -149,28 +150,6 @@
<el-form-item label="请求方式" prop="requestMethod" style="width: 70%">
<el-input type="text" v-model="api.requestMethod" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="选择默认规格" prop="requestMethod" style="width: 70%">
<el-select v-model="api.productSpecification" placeholder="请选择默认规格">
<el-option label="按次查询" value="按次查询"></el-option>
<el-option label="包日" value="包日"></el-option>
<el-option label="包月" value="包月"></el-option>
<el-option label="包年" value="包年"></el-option>
</el-select>
</el-form-item>
<el-divider></el-divider>
<span>价格</span>
<el-form-item label="按次查询" prop="requestMethod" style="width: 70%">
<el-input type="text" v-model="api.timemoney" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="包日" prop="requestMethod" style="width: 70%">
<el-input type="text" v-model="api.daymoney" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="包月" prop="requestMethod" style="width: 70%">
<el-input type="text" v-model="api.monthmoney" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="包年" prop="requestMethod" style="width: 70%">
<el-input type="text" v-model="api.yearmoney" autocomplete="off"></el-input>
</el-form-item>
</el-form>
</center>
<span slot="footer" class="dialog-footer">
@ -192,13 +171,14 @@
//import from ',
import {
addproduct,
delapi, getprice,
delapi,
productStateLis,
productStateList,
selectapiList,
UpdproductState
} from "@/api/background/apimanage";
import {resetForm} from "@/utils/muyu";
import {add} from "lodash/math";
import api from "js-cookie";
export default {
name: "Apimanage",
@ -209,13 +189,6 @@ export default {
//"
return {
tableData:[],
moneyData:[],
money:{
timemoney:'',
daymoney:'',
monthmoney:'',
yearmoney:''
},
ruleForm:{
pageNum:1,
pageSize:9,
@ -280,21 +253,7 @@ export default {
},
//
handleEdit(row){
//
getprice(row.productId).then(response=>{
this.moneyData=response.data
this.money.timemoney=this.moneyData[0].middlePrice
this.money.daymoney=this.moneyData[1].middlePrice
this.money.monthmoney=this.moneyData[2].middlePrice
this.money.yearmoney=this.moneyData[3].middlePrice
row.timemoney = this.money.timemoney;
row.daymoney = this.money.daymoney;
row.monthmoney = this.money.monthmoney;
row.yearmoney = this.money.yearmoney;
this.$router.push({path:"/apiupdmessage/index",query:{api:row}})
})
this.$router.push({path:"/apiupdmessage/index",query:{api:row}})
},
//
handleDelete(row){

View File

@ -20,6 +20,9 @@
<el-form-item label="接口销量" prop="productSales" style="width: 70%">
<el-input type="text" v-model="api.productSales" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="接口价格" prop="productPrice" style="width: 70%">
<el-input type="text" v-model="api.productPrice" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="接口来源" prop="productFrom" style="width: 70%">
<el-input type="text" v-model="api.productFrom" autocomplete="off"></el-input>
</el-form-item>
@ -35,28 +38,6 @@
<el-form-item label="请求方式" prop="requestMethod" style="width: 70%">
<el-input type="text" v-model="api.requestMethod" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="选择默认规格" prop="requestMethod" style="width: 70%">
<el-select v-model="api.productSpecification" placeholder="请选择默认规格">
<el-option label="按次查询" value="按次查询"></el-option>
<el-option label="包日" value="包日"></el-option>
<el-option label="包月" value="包月"></el-option>
<el-option label="包年" value="包年"></el-option>
</el-select>
</el-form-item>
<el-divider></el-divider>
<span>价格</span>
<el-form-item label="按次查询" prop="requestMethod" style="width: 70%">
<el-input type="text" v-model="api.timemoney" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="包日" prop="requestMethod" style="width: 70%">
<el-input type="text" v-model="api.daymoney" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="包月" prop="requestMethod" style="width: 70%">
<el-input type="text" v-model="api.monthmoney" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="包年" prop="requestMethod" style="width: 70%">
<el-input type="text" v-model="api.yearmoney" autocomplete="off"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm(api)"></el-button>
<el-button @click="resetForm('ruleForm')"></el-button>

View File

@ -8,18 +8,19 @@
<el-row>
<el-col :span="20"><div class="grid-content bg-purple">
<el-form :model="ruleForm" status-icon :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
<!-- <el-select v-model="ruleForm.productState" placeholder="请选择状态">-->
<!-- <el-option-->
<!-- v-for="item in options"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value">-->
<!-- </el-option>-->
<!-- </el-select>-->
<el-select v-model="ruleForm.productState" placeholder="请选择状态">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-input type="text" v-model="ruleForm.productName" style="width: 200px" autocomplete="off" placeholder="名称搜索"></el-input>
<el-button type="primary" @click="submitForm('ruleForm')"></el-button>
</el-form>
</div></el-col>
<el-col :span="4"><div class="grid-content bg-purple-light"><el-button type="primary">新增数据</el-button></div></el-col>
</el-row>
<el-row :gutter="12">
@ -38,7 +39,7 @@
</el-form-item>
<el-row>
<el-col :span="6"><div class="grid-content bg-purple">
<el-button type="success" @click="test(myapi)">使</el-button>
<el-button type="info" @click="test(myapi)"></el-button>
</div></el-col>
</el-row>
</el-form>

View File

@ -17,94 +17,94 @@
</el-calendar>
<el-card class="box-card" style="width: 94%;transform: translateX(3%);margin-top: 30px">
<el-table :data="arr" style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column label="编号" width="80" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.id }}</span>
</template>
</el-table-column>
<el-table-column label="商品图片" width="150" align="center">
<template slot-scope="scope">
<img :src="scope.row.picImg" alt="图片损坏">
</template>
</el-table-column>
<el-table-column label="商品名称" width="400" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.shopName }}</span>
<br>
品牌<span style="margin-left: 10px">{{ scope.row.brandName }}</span>
</template>
</el-table-column>
<el-table-column label="货号" width="150" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px">货号{{ scope.row.shopNum }}</span>
</template>
</el-table-column>
<el-table-column label="标签" width="150" align="center">
<template slot-scope="scope">
上架
<el-switch
v-model="scope.row.publishStatus"
@change="updateShop(scope.row)"
active-color="#409EFF"
inactive-color="#C0CCDA"
:active-value="1"
:inactive-value="0">
</el-switch>
<br>
新品
<el-switch
v-model="scope.row.newStatus"
@change="updateShop(scope.row)"
active-color="#409EFF"
inactive-color="#C0CCDA"
:active-value="1"
:inactive-value="0">
</el-switch>
<br>
推荐
<el-switch
v-model="scope.row.recommandStatus"
@change="updateShop(scope.row)"
active-color="#409EFF"
inactive-color="#C0CCDA"
:active-value="1"
:inactive-value="0">
</el-switch>
<br>
</template>
</el-table-column>
<el-table-column label="排序" width="150" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.sort }}</span>
</template>
</el-table-column>
<el-table-column label="销量" width="150" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.sale }}</span>
</template>
</el-table-column>
<el-table-column label="审核状态" width="150" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px" v-if="scope.row.verifyStatus==0"></span>
<span style="margin-left: 10px" v-if="scope.row.verifyStatus==1"></span>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button
size="mini"
@click="handleEdit(scope.row)">编辑</el-button>
<el-button
size="mini"
type="danger"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<el-card class="box-card" style="width: 94%;transform: translateX(3%);margin-top: 30px">
<el-table :data="arr" style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column label="编号" width="80" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.id }}</span>
</template>
</el-table-column>
<el-table-column label="商品图片" width="150" align="center">
<template slot-scope="scope">
<img :src="scope.row.picImg" alt="图片损坏">
</template>
</el-table-column>
<el-table-column label="商品名称" width="400" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.shopName }}</span>
<br>
品牌<span style="margin-left: 10px">{{ scope.row.brandName }}</span>
</template>
</el-table-column>
<el-table-column label="货号" width="150" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px">货号{{ scope.row.shopNum }}</span>
</template>
</el-table-column>
<el-table-column label="标签" width="150" align="center">
<template slot-scope="scope">
上架
<el-switch
v-model="scope.row.publishStatus"
@change="updateShop(scope.row)"
active-color="#409EFF"
inactive-color="#C0CCDA"
:active-value="1"
:inactive-value="0">
</el-switch>
<br>
新品
<el-switch
v-model="scope.row.newStatus"
@change="updateShop(scope.row)"
active-color="#409EFF"
inactive-color="#C0CCDA"
:active-value="1"
:inactive-value="0">
</el-switch>
<br>
推荐
<el-switch
v-model="scope.row.recommandStatus"
@change="updateShop(scope.row)"
active-color="#409EFF"
inactive-color="#C0CCDA"
:active-value="1"
:inactive-value="0">
</el-switch>
<br>
</template>
</el-table-column>
<el-table-column label="排序" width="150" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.sort }}</span>
</template>
</el-table-column>
<el-table-column label="销量" width="150" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.sale }}</span>
</template>
</el-table-column>
<el-table-column label="审核状态" width="150" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px" v-if="scope.row.verifyStatus==0"></span>
<span style="margin-left: 10px" v-if="scope.row.verifyStatus==1"></span>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button
size="mini"
@click="handleEdit(scope.row)">编辑</el-button>
<el-button
size="mini"
type="danger"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-card>

View File

@ -73,13 +73,14 @@
//import from ',
import {ifbuy, selectList, selectTypeList} from "@/api/market/product";
import {selectList, selectTypeList} from "@/api/market/product";
export default {
name: 'Product',
//import使"
components: {},
props: {},
data() {
//"
return {
@ -131,12 +132,6 @@ export default {
},
//
test(product){
//
ifbuy(product).then(response=>{
if (response.code!=200) {
alert(response.msg)
}
})
this.$router.push({path:"/apitest/index",query:{myapi:JSON.stringify(product)}})
},
// test(product) {

View File

@ -1,6 +1,6 @@
<template>
<div>
<h1>资产展示</h1>
<h1>测试4()- 资产展示</h1>
<el-container>
<el-aside width="400px">
@ -26,7 +26,7 @@
<el-descriptions class="margin-top" title="资产模型基本信息" :column="2" border>
<el-descriptions-item>
<template slot="label">表名称</template>
{{ tableBasic.name }}
{{ tableBasic.tableName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">表备注</template>
@ -34,11 +34,11 @@
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">数据量</template>
{{ dataNum }}
{{ tableBasic.dataNum }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">是否核心</template>
<el-tag size="small" v-if="dataNum!=0"></el-tag>
<dict-tag :options="dict.type.sys_no" :value="tableBasic.isCenter"/>
</el-descriptions-item>
</el-descriptions>
</template>
@ -51,13 +51,13 @@
</div>
<el-row :gutter="20">
<!-- -->
<el-col :span="6" v-for="DataValue in tableStructure" style="margin-top: 20px">
<el-descriptions :title="测试+'.'+tableBasic.name+'.'+DataValue.field" direction="vertical"
<el-col :span="6" v-for="DataValue in assetShowList" style="margin-top: 20px">
<el-descriptions :title="tableBasic.tableRemark+'.'+tableBasic.tableName+'.'+DataValue.key" direction="vertical"
border :column="1">
<el-descriptions-item label="Type">
<el-tag size="small">{{ DataValue.dataMapping}}</el-tag>
<el-tag size="small">{{ DataValue.type }}</el-tag>
</el-descriptions-item>
<el-descriptions-item label="Value">{{ DataValue.dataValue }}</el-descriptions-item>
<el-descriptions-item label="Value">{{ DataValue.value }}</el-descriptions-item>
</el-descriptions>
@ -65,15 +65,15 @@
</el-row>
</el-card>
<el-table
:data="tableStructure"
:data="DataValue"
style="width: 100%">
<el-table-column
prop="field"
prop="key"
label="key"
width="180">
</el-table-column>
<el-table-column
prop="annotation"
prop="label"
label="label"
width="180">
</el-table-column>
@ -82,10 +82,11 @@
label="type">
</el-table-column>
<el-table-column
prop="dataValue"
prop="value"
label="value">
</el-table-column>
</el-table>
</el-main>
</el-container>
@ -111,10 +112,10 @@ export default {
return {
data:[],
defaultProps: {
children: 'tableNames',
label: 'name'
children: 'children',
label: 'tableName'
},
tableBasic:[],
tableBasic:{},
tableStructure:[],
assetShowList: [
// {key: ".sys_user.id", type: "String", value: 1},
@ -123,8 +124,9 @@ export default {
// {key: ".sys_user.email", type: "String", value: "123@136.com"},
// {key: ".sys_user.sex", type: "String", value: "Y"},
],
kvtList: [],
DataValue:[],
dataNum:'',
};
},
// data",
@ -141,12 +143,23 @@ export default {
},
handleNodeClick(data){
console.log("...."+data)
this.tableBasic=data
console.log(this.tableBasic)
this.dataNum=data.tableFie.length
this.tableStructure=data.tableFie
console.log(this.tableStructure)
},
// findStructureByTableId(data.id).then((res)=>{
// this.tableStructure=res.data
// })
if (data.children==null){
findTableValueList(data.basicId,data.tableName).then(res=>{
this.assetShowList=res.data;
this.DataValue=res.data;
})
}
console.log("-----"+this.DataValue);
console.log("...."+data.basicId)
}
},
// - 访this",
created() {

View File

@ -62,7 +62,7 @@
</template>
</el-table-column>
<el-table-column label="类型" prop="type"></el-table-column>
<el-table-column label="映射类型" prop="dataMapping"></el-table-column>
<el-table-column label="映射类型" prop="types"></el-table-column>
<el-table-column label="是否为空" prop="nullable"></el-table-column>
<el-table-column label="是否字典" prop="isDictionary"></el-table-column>
<el-table-column label="映射字典" prop="dictionaryTable"></el-table-column>
@ -87,7 +87,7 @@
//jsjsjson,
//import from ',
import { getExtractDataTableNameList } from '@/api/property/astr'
import { findTableValue, getExtractDataTableNameList } from '@/api/property/astr'
export default {
//import使"
@ -124,10 +124,34 @@ export default {
})
},
handleNodeClick(data){
// console.log(data)
this.tableBasic=data
this.dataNum=data.tableFie.length
this.tableStructure=data.tableFie
// console.log(this.tableStructure)
findTableValue(data.dataId,data.name).then(res=>{
let tableMapping=res.data
// console.log(res.data)
for (const index in tableMapping) {
for (const i in this.tableStructure) {
if (tableMapping[index].key === this.tableStructure[i].field) {
this.tableStructure[i].types.push(tableMapping[index].type)
console.log(this.tableStructure[i].types)
if (i!== 0&& this.tableStructure[i].types==this.tableStructure[0].types){
alert("dawdwadad")
return
}
}
}
}
})
},