接口列表
parent
7db2d62539
commit
b07804e551
|
@ -14,3 +14,17 @@ export function findConnectorList(data) {
|
||||||
data:data
|
data:data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function addConnector(data) {
|
||||||
|
return request({
|
||||||
|
url: '/mart/connector/addConnector',
|
||||||
|
method: 'post',
|
||||||
|
data:data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getDeleteConnector(connectorId) {
|
||||||
|
return request({
|
||||||
|
url: '/mart/connector/getDeleteConnector?connectorId='+connectorId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -1,108 +1,149 @@
|
||||||
<template>
|
<template>
|
||||||
<el-table
|
<div>
|
||||||
:data="tableData"
|
<el-button icon="el-icon-plus" type="primary" size="mini" @click="dialogFormVisible=true">新增</el-button>
|
||||||
style="width: 100%">
|
<el-table
|
||||||
|
:data="tableData"
|
||||||
|
style="width: 100%">
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="id"
|
label="id"
|
||||||
width="180">
|
width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span style="margin-left: 10px">{{ scope.row.connectorId }}</span>
|
<span style="margin-left: 10px">{{ scope.row.connectorId }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="接口名称"
|
label="接口名称"
|
||||||
width="180">
|
width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span style="margin-left: 10px">{{ scope.row.connectorName }}</span>
|
<span style="margin-left: 10px">{{ scope.row.connectorName }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="接口描述"
|
label="接口描述"
|
||||||
width="180">
|
width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span style="margin-left: 10px">{{ scope.row.connectorDescribe }}</span>
|
<span style="margin-left: 10px">{{ scope.row.connectorDescribe }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="接口图片"
|
label="接口图片"
|
||||||
width="180">
|
width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span style="margin-left: 10px">{{ scope.row.connectorPicture }}</span>
|
<span style="margin-left: 10px">{{ scope.row.connectorPicture }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="公司"
|
label="公司"
|
||||||
width="180">
|
width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span style="margin-left: 10px">{{ scope.row.connectorCompany }}</span>
|
<span style="margin-left: 10px">{{ scope.row.connectorCompany }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="更新时间"
|
label="更新时间"
|
||||||
width="180">
|
width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span style="margin-left: 10px">{{ scope.row.connectorTime }}</span>
|
<span style="margin-left: 10px">{{ scope.row.connectorTime }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="剩余次数"
|
label="剩余次数"
|
||||||
width="180">
|
width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span style="margin-left: 10px">{{ scope.row.connectorResidueDegree }}</span>
|
<span style="margin-left: 10px">{{ scope.row.connectorResidueDegree }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="购买次数"
|
label="购买次数"
|
||||||
width="180">
|
width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span style="margin-left: 10px">{{ scope.row.connectorFrequency }}</span>
|
<span style="margin-left: 10px">{{ scope.row.connectorFrequency }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="状态"
|
label="状态"
|
||||||
width="180">
|
width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span style="margin-left: 10px">{{ scope.row.connectorStatus }}</span>
|
<span style="margin-left: 10px" v-if="scope.row.connectorStatus==0">审核中</span>
|
||||||
</template>
|
<span style="margin-left: 10px" v-if="scope.row.connectorStatus==1">审核通过</span>
|
||||||
</el-table-column>
|
<span style="margin-left: 10px" v-if="scope.row.connectorStatus==2">审核失败</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="操作">
|
<el-table-column label="操作">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
icon="el-icon-pear"
|
||||||
@click="handleEdit(scope.$index, scope.row)">编辑</el-button>
|
size="mini"
|
||||||
<el-button
|
@click="handleEdit(scope.$index, scope.row)">编辑</el-button>
|
||||||
size="mini"
|
<el-button
|
||||||
type="danger"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.$index, scope.row)">删除</el-button>
|
size="mini"
|
||||||
</template>
|
type="danger"
|
||||||
</el-table-column>
|
@click="handleDelete(scope.row)">删除</el-button>
|
||||||
</el-table>
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!-- 新增接口-->
|
||||||
|
<el-dialog title="新增接口" :visible.sync="dialogFormVisible">
|
||||||
|
<el-form :model="form">
|
||||||
|
<el-form-item label="接口名称" :label-width="formLabelWidth">
|
||||||
|
<el-input v-model="formLabelAlign.connectorName" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="接口描述" :label-width="formLabelWidth">
|
||||||
|
<el-input v-model="formLabelAlign.connectorDescribe" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="接口图片" :label-width="formLabelWidth">
|
||||||
|
<el-input v-model="formLabelAlign.connectorPicture" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="公司" :label-width="formLabelWidth">
|
||||||
|
<el-input v-model="formLabelAlign.connectorCompany" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="剩余次数" :label-width="formLabelWidth">
|
||||||
|
<el-input v-model="formLabelAlign.connectorResidueDegree" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="购买次数" :label-width="formLabelWidth">
|
||||||
|
<el-input v-model="formLabelAlign.connectorFrequency" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="addConnector">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
||||||
//例如:import 《组件名称》 from '《组件路径》,
|
//例如:import 《组件名称》 from '《组件路径》,
|
||||||
import {findConnectorList} from "@/api/port/port";
|
import {findConnectorList} from "@/api/port/port";
|
||||||
|
import {addConnector} from "@/api/port/port";
|
||||||
|
import {getDeleteConnector} from "@/api/port/port";
|
||||||
export default {
|
export default {
|
||||||
//import引入的组件需要注入到对象中才能使用"
|
//import引入的组件需要注入到对象中才能使用"
|
||||||
components: {},
|
components: {},
|
||||||
props: {},
|
props: {},
|
||||||
data() {
|
data() {
|
||||||
//这里存放数据"
|
//这里存放数据"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
form:{},
|
form:{},
|
||||||
tableData:[],
|
tableData:[],
|
||||||
|
formLabelAlign:{},
|
||||||
|
dialogFormVisible:false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
//计算属性 类似于data概念",
|
//计算属性 类似于data概念",
|
||||||
|
@ -111,6 +152,23 @@ export default {
|
||||||
watch: {},
|
watch: {},
|
||||||
//方法集合",
|
//方法集合",
|
||||||
methods: {
|
methods: {
|
||||||
|
handleDelete(row){
|
||||||
|
getDeleteConnector(row.connectorId).then((res)=>{
|
||||||
|
alert(res.msg);
|
||||||
|
if (200==res.code){
|
||||||
|
this.findConnectorList();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
addConnector(){
|
||||||
|
addConnector(this.formLabelAlign).then((res)=>{
|
||||||
|
alert(res.msg);
|
||||||
|
if (200==res.code){
|
||||||
|
this.findConnectorList();
|
||||||
|
this.dialogFormVisible=false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
findConnectorList(){
|
findConnectorList(){
|
||||||
findConnectorList(this.form).then((res)=>{
|
findConnectorList(this.form).then((res)=>{
|
||||||
this.tableData=res.data;
|
this.tableData=res.data;
|
||||||
|
|
Loading…
Reference in New Issue