企业管理完善新增
parent
fd40a1edf7
commit
c20e4d1667
|
@ -38,6 +38,9 @@
|
|||
<el-form-item label="请求方式" prop="requestMethod" style="width: 70%">
|
||||
{{api.requestMethod}}
|
||||
</el-form-item>
|
||||
|
||||
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm('ruleForm')">返回</el-button>
|
||||
</el-form-item>
|
||||
|
|
|
@ -116,10 +116,12 @@
|
|||
:total="total">
|
||||
</el-pagination>
|
||||
|
||||
|
||||
<!--新增对话框-->
|
||||
<el-dialog
|
||||
title="提示"
|
||||
:visible.sync="dialogVisible"
|
||||
width="30%"
|
||||
width="60%"
|
||||
:before-close="handleClose">
|
||||
<center>
|
||||
<el-form :model="api" status-icon :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
|
||||
|
@ -132,9 +134,6 @@
|
|||
<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>
|
||||
|
@ -150,6 +149,23 @@
|
|||
<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-input type="text" v-model="api.productSpecification" autocomplete="off"></el-input>
|
||||
</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">
|
||||
|
|
|
@ -125,21 +125,8 @@
|
|||
:visible.sync="dialogVisible1"
|
||||
width="50%"
|
||||
:before-close="handleClose1">
|
||||
<el-form ref="form" :model="myapi" label-width="120px" :rules="rules">
|
||||
<el-form-item label="产品名称:" >
|
||||
{{myapi.productName}}
|
||||
</el-form-item>
|
||||
<el-form-item label="产品价格:">
|
||||
{{myapi.productPrice}}元/次
|
||||
</el-form-item>
|
||||
<el-form-item label="产品介绍:">
|
||||
{{myapi.productContent}}
|
||||
</el-form-item>
|
||||
<el-form-item label="重要路由:">
|
||||
{{myapi.apiRouter}}
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-divider></el-divider>
|
||||
|
||||
|
||||
<span style="color: #1ab394">请选择申请规格</span>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
|
@ -174,6 +161,24 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-divider></el-divider>
|
||||
<el-form ref="form" :model="newapi" label-width="120px" :rules="rules">
|
||||
<el-form-item label="产品名称:" >
|
||||
{{newapi.productName}}
|
||||
</el-form-item>
|
||||
<el-form-item label="产品规格:" >
|
||||
{{newapi.productSpecification}}
|
||||
</el-form-item>
|
||||
<el-form-item label="产品价格:" v-if="newapi.productSpecification=='按次查询'">
|
||||
{{newapi.productPrice}}元/次
|
||||
</el-form-item>
|
||||
<el-form-item label="支付价格:" v-if="newapi.productSpecification!='按次查询'">
|
||||
{{newapi.productPrice}}元
|
||||
</el-form-item>
|
||||
<el-form-item label="产品介绍:">
|
||||
{{newapi.productContent}}
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible1 = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogVisible1 = false">确 定</el-button>
|
||||
|
@ -209,7 +214,8 @@ export default {
|
|||
dialogVisible: false,
|
||||
dialogVisible1: false,
|
||||
ruleForm:{},
|
||||
tableData:[]
|
||||
tableData:[],
|
||||
newapi:{}
|
||||
};
|
||||
},
|
||||
//计算属性 类似于data概念",
|
||||
|
@ -240,10 +246,14 @@ export default {
|
|||
if (response.code!=200){
|
||||
alert(response.msg)
|
||||
}else {
|
||||
alert(JSON.stringify(myapi))
|
||||
this.getproductspecification(myapi)
|
||||
this.getproduct(myapi)
|
||||
this.dialogVisible1=true
|
||||
|
||||
this.newapi={
|
||||
productName: myapi.productName,
|
||||
productPrice: myapi.productPrice,
|
||||
productContent: myapi.productContent,
|
||||
productSpecification: myapi.productSpecification
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -264,11 +274,20 @@ export default {
|
|||
.catch(_ => {});
|
||||
},
|
||||
//产品规格
|
||||
getproductspecification(specification){
|
||||
getproduct(specification){
|
||||
selectproductspecification(specification).then(response=>{
|
||||
this.tableData=response.data
|
||||
})
|
||||
},
|
||||
//选择申请规格
|
||||
handleEdit(row){
|
||||
this.newapi={
|
||||
productName:this.myapi.productName,
|
||||
productSpecification: row.productSpecificationName,
|
||||
productPrice: row.middlePrice,
|
||||
productContent:this.myapi.productContent,
|
||||
}
|
||||
},
|
||||
//测试发送请求 单个参数
|
||||
submitForm(ruleForm){
|
||||
sendrequest(ruleForm).then(response=>{
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
</el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="6"><div class="grid-content bg-purple">
|
||||
<el-button type="info" @click="test(myapi)">测试</el-button>
|
||||
<el-button type="success" @click="test(myapi)">使用</el-button>
|
||||
</div></el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
|
Loading…
Reference in New Issue