企业管理完善新增

pull/7/head^2
WeiRan 2024-09-04 09:14:27 +08:00
parent d0a13cc604
commit 0ba53a33eb
5 changed files with 130 additions and 19 deletions

View File

@ -13,7 +13,7 @@ export function apitest(email){
export function reducetestcount(data){ export function reducetestcount(data){
return request({ return request({
url:"/market/product/reducetestcount", url:"/market/producttest/reducetestcount",
method: "POST", method: "POST",
data: data data: data
}) })
@ -27,6 +27,14 @@ export function iftest(data){
}) })
} }
export function findcount(data){
return request({
url:"/market/producttest/findcount",
method: "POST",
data: data
})
}
export function sendrequest(options){ export function sendrequest(options){

View File

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

View File

@ -148,7 +148,31 @@ export const constantRoutes = [
path: 'index', path: 'index',
name: 'apiupdmessage', name: 'apiupdmessage',
component: () => import('@/views/background/apiupdmessage/index.vue'), component: () => import('@/views/background/apiupdmessage/index.vue'),
meta: { title: '接口列表', icon: 'form' } 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' }
} }
] ]
}, },

View File

@ -198,7 +198,7 @@
<script> <script>
//jsjsjson, //jsjsjson,
//import from ', //import from ',
import {iftest, reducetestcount, sendrequest, sendrequest1} from "@/api/apitest/apitest"; import {findcount, iftest, reducetestcount, sendrequest, sendrequest1} from "@/api/apitest/apitest";
import api from "js-cookie"; import api from "js-cookie";
import {companyauthentication, ifcompanyauthentication} from "@/api/authentication/authentication"; import {companyauthentication, ifcompanyauthentication} from "@/api/authentication/authentication";
import {selectproductspecification} from "@/api/market/product"; import {selectproductspecification} from "@/api/market/product";
@ -231,7 +231,6 @@ export default {
watch: {}, watch: {},
//", //",
methods: { methods: {
api,
// //
handleClick(tab, event) { handleClick(tab, event) {
console.log(tab, event); console.log(tab, event);
@ -239,9 +238,10 @@ export default {
// //
test(myapi){ test(myapi){
//<=0 //<=0
iftest(myapi).then(response=>{ findcount(myapi).then(response=>{
if (response.data=='' || response.data<=0){ alert(response.data.testCount)
alert("使用次数已到期") if (response.data.testCount<=0){
alert("使用次数已到期,若像继续使用请先充值!")
}else{ }else{
this.dialogVisible=true this.dialogVisible=true
this.ruleForm={ this.ruleForm={
@ -379,6 +379,8 @@ export default {
//-1 //-1
reducetestcount(this.myapi).then(response=>{ reducetestcount(this.myapi).then(response=>{
}) })
} }
}, },
// - 访this", // - 访this",

View File

@ -3,11 +3,11 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="16"> <el-col :span="16">
<div class="grid-content bg-purple" style="border: 2px solid #ebeef5;"> <div class="grid-content bg-purple" style="border: 2px solid #ebeef5;">
<span>HI上海八维宏烨集团<br> <span>HI{{companymessage.companyName}}<br>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="6"><div class="grid-content bg-purple">上海市 上海市</div></el-col> <el-col :span="6"><div class="grid-content bg-purple">{{companymessage.companyAddress}}</div></el-col>
<el-col :span="6"><div class="grid-content bg-purple">IP114.85.72.211</div></el-col> <el-col :span="6"><div class="grid-content bg-purple">企业法人{{companymessage.companyLeader}}</div></el-col>
<el-col :span="6"><div class="grid-content bg-purple">时间2021-1-12</div></el-col> <el-col :span="6"><div class="grid-content bg-purple">时间{{companymessage.registrantDate}}</div></el-col>
<el-col :span="6"><div class="grid-content bg-purple"> <el-col :span="6"><div class="grid-content bg-purple">
<el-row> <el-row>
<el-col :span="12"><div class="grid-content bg-purple"><el-button type="primary">登录日志</el-button></div></el-col> <el-col :span="12"><div class="grid-content bg-purple"><el-button type="primary">登录日志</el-button></div></el-col>
@ -21,8 +21,8 @@
<div class="grid-content bg-purple" style="border: 1px solid #ebeef5;"> <div class="grid-content bg-purple" style="border: 1px solid #ebeef5;">
<span>账户余额<br> <span>账户余额<br>
<el-row> <el-row>
<el-col :span="12"><div class="grid-content bg-purple">8544344.00</div></el-col> <el-col :span="12"><div class="grid-content bg-purple">{{companymessage.companyMoney}}</div></el-col>
<el-col :span="12"><div class="grid-content bg-purple-light"><el-button type="primary">充值</el-button></div></el-col> <el-col :span="12"><div class="grid-content bg-purple-light"><el-button type="primary" @click="addmoney()"></el-button></div></el-col>
</el-row> </el-row>
</span> </span>
</div> </div>
@ -33,7 +33,7 @@
<div class="grid-content bg-purple-dark" style="border: 2px solid #ebeef5;"> <div class="grid-content bg-purple-dark" style="border: 2px solid #ebeef5;">
<el-row> <el-row>
<el-col :span="20"><div class="grid-content bg-purple"><span>热点接口</span></div></el-col> <el-col :span="20"><div class="grid-content bg-purple"><span>热点接口</span></div></el-col>
<el-col :span="4"><div class="grid-content bg-purple-light"><el-button type="primary">申请新的接口</el-button></div></el-col> <el-col :span="4"><div class="grid-content bg-purple-light"><el-button type="primary" @click="otherapi"></el-button></div></el-col>
</el-row><br> </el-row><br>
<el-row> <el-row>
<el-col :span="24"><div class="grid-content bg-purple-dark flex-container"> <el-col :span="24"><div class="grid-content bg-purple-dark flex-container">
@ -41,7 +41,7 @@
<el-form ref="form" :model="form" label-width="80px"> <el-form ref="form" :model="form" label-width="80px">
<el-form-item > <el-form-item >
<span>{{form.productName}}</span> <span>{{form.productName}}</span>
<el-button @click="tovalidation()"></el-button> <el-button @click="tovalidation(form)"></el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -103,6 +103,41 @@
</span> </span>
</el-dialog> </el-dialog>
<!--充值页面-->
<el-dialog
title="充值"
:visible.sync="dialogVisible2"
width="30%"
:before-close="handleClose2"
:close-on-click-modal="false">
<h2 style="color: #1ab394">请选择充值金额</h2>
<el-divider></el-divider>
<el-form :model="moneyForm" status-icon :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
<el-form-item label="请选择">
<el-radio-group v-model="moneyForm.resource">
<el-radio label="5"></el-radio>
<el-radio label="20"></el-radio>
<el-radio label="50"></el-radio>
<el-radio label="100"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="自定义充值" prop="pass" style="width: 50%">
<el-input type="text" v-model="moneyForm.pass" autocomplete="off"></el-input>
</el-form-item>
<el-divider></el-divider>
<el-form-item label="选择支付方式">
<el-radio-group v-model="moneyForm.resource">
<el-radio label="1">支付宝</el-radio>
<el-radio label="2">微信</el-radio>
<el-radio label="3">银行卡</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="insertmoney()"></el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
@ -111,7 +146,8 @@
//import from ', //import from ',
import {gethostportList} from "@/api/market/workbench"; import {getcompany, gethostportList} from "@/api/market/workbench";
import {ifbuy} from "@/api/market/product";
export default { export default {
name: 'Workbench', name: 'Workbench',
@ -126,8 +162,11 @@ export default {
hostportList:[], hostportList:[],
dialogVisible: false, dialogVisible: false,
dialogVisible1:false, dialogVisible1:false,
dialogVisible2:false,
// //
ruleForm:{} ruleForm:{},
companymessage:{},
moneyForm:{}
}; };
}, },
// data", // data",
@ -136,6 +175,27 @@ export default {
watch: {}, watch: {},
//", //",
methods: { methods: {
//
getcompany(){
getcompany().then(response=>{
this.companymessage=response.data
})
},
//
addmoney(){
this.dialogVisible2=true
},
//
insertmoney(){
this.dialogVisible2=false
// addmoney(this.companymessage).then(response=>{
//
// })
},
//
otherapi(){
this.$router.push("/product/index")
},
// //
gethostportList(){ gethostportList(){
gethostportList().then(response=>{ gethostportList().then(response=>{
@ -156,8 +216,15 @@ export default {
}) })
.catch(_ => {}); .catch(_ => {});
}, },
tovalidation(){ tovalidation(form){
this.dialogVisible=true // this.dialogVisible=true
//
ifbuy(form).then(response=>{
if (response.code!=200) {
alert(response.msg)
}
})
this.$router.push({path:"/apitest/index",query:{myapi:JSON.stringify(form)}})
}, },
validationYes(){ validationYes(){
this.dialogVisible1=true this.dialogVisible1=true
@ -170,6 +237,7 @@ export default {
// - 访this", // - 访this",
created() { created() {
this.gethostportList() this.gethostportList()
this.getcompany()
}, },
// - 访DOM", // - 访DOM",
mounted() { mounted() {