|
|
|
@ -62,7 +62,7 @@
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button type="primary" icon="el-icon-plus" @click="add(null,'add')"
|
|
|
|
|
>新增
|
|
|
|
|
>新增接口分类
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
</el-button-group>
|
|
|
|
@ -77,7 +77,7 @@
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="更新时间" prop="updateTime" show-overflow-tooltip>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="备注" prop="reemark" show-overflow-tooltip>
|
|
|
|
|
<el-table-column label="备注" prop="remark" show-overflow-tooltip>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作" width="120" fixed="right">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
@ -233,6 +233,70 @@
|
|
|
|
|
:before-close="hideForm"
|
|
|
|
|
width="60%"
|
|
|
|
|
top="5vh"
|
|
|
|
|
>
|
|
|
|
|
<el-form
|
|
|
|
|
:model="subData"
|
|
|
|
|
ref="dataForm"
|
|
|
|
|
:rules="formRules"
|
|
|
|
|
label-width="130px"
|
|
|
|
|
>
|
|
|
|
|
<el-row :gutter="20" class="el-row" type="flex">
|
|
|
|
|
<el-col :span="12" class="el-col">
|
|
|
|
|
<el-form-item label="接口名称" prop="name" class="query-form-item">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="subData.name"
|
|
|
|
|
style="width: 80%"
|
|
|
|
|
auto-complete="off"
|
|
|
|
|
placeholder="请输入接口分类名称"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12" class="el-col">
|
|
|
|
|
<el-form-item label="创建时间" prop="createTime">
|
|
|
|
|
<el-date-picker clearable size="small"
|
|
|
|
|
v-model="subData.createTime"
|
|
|
|
|
type="datetime"
|
|
|
|
|
style="width: 80%"
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
|
placeholder="选择创建时间">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="20" class="el-row" type="flex">
|
|
|
|
|
<el-col :span="12" class="el-col">
|
|
|
|
|
<el-form-item
|
|
|
|
|
label="备注"
|
|
|
|
|
prop="remark"
|
|
|
|
|
class="query-form-item"
|
|
|
|
|
>
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="subData.remark"
|
|
|
|
|
style="width: 80%"
|
|
|
|
|
placeholder="请输入接口备注"
|
|
|
|
|
auto-complete="off"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click.native="hideForm">取消</el-button>
|
|
|
|
|
<el-button type="primary" @click.native="forInvSubmit()"
|
|
|
|
|
>提交
|
|
|
|
|
</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<el-dialog
|
|
|
|
|
:title="formMap[formName]"
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
:close-on-press-escape="false"
|
|
|
|
|
:visible.sync="subFormVisible1"
|
|
|
|
|
:before-close="hideForm1"
|
|
|
|
|
width="60%"
|
|
|
|
|
top="5vh"
|
|
|
|
|
>
|
|
|
|
|
<el-form
|
|
|
|
|
:model="subData"
|
|
|
|
@ -326,14 +390,13 @@
|
|
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click.native="hideForm">取消</el-button>
|
|
|
|
|
<el-button type="primary" @click.native="forInvSubmit()"
|
|
|
|
|
<el-button @click.native="hideForm1">取消</el-button>
|
|
|
|
|
<el-button type="primary" @click.native="forInvSubmit1()"
|
|
|
|
|
>提交
|
|
|
|
|
</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
@ -356,6 +419,7 @@ export default {
|
|
|
|
|
subData: {},
|
|
|
|
|
formName: null,
|
|
|
|
|
subFormVisible: false,
|
|
|
|
|
subFormVisible1: false,
|
|
|
|
|
showSearch: true,
|
|
|
|
|
currentRow: null,
|
|
|
|
|
filterQuery: {
|
|
|
|
@ -599,13 +663,13 @@ export default {
|
|
|
|
|
this.formName = formName;
|
|
|
|
|
this.check = row;
|
|
|
|
|
this.subData = row;
|
|
|
|
|
this.subFormVisible = true;
|
|
|
|
|
this.subFormVisible1 = true;
|
|
|
|
|
},
|
|
|
|
|
reviewOrder(row, formName) {
|
|
|
|
|
this.formName = formName;
|
|
|
|
|
this.check = row;
|
|
|
|
|
this.subData = row;
|
|
|
|
|
this.subFormVisible = true;
|
|
|
|
|
this.subFormVisible1 = true;
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
@ -613,17 +677,66 @@ export default {
|
|
|
|
|
this.formName = formName;
|
|
|
|
|
this.check = row;
|
|
|
|
|
this.subData = {};
|
|
|
|
|
this.subFormVisible = true;
|
|
|
|
|
this.subFormVisible1 = true;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
add(data, formName) {
|
|
|
|
|
this.subFormVisible = true;
|
|
|
|
|
this.subData = {};
|
|
|
|
|
this.formName = formName;
|
|
|
|
|
this.subData = {};
|
|
|
|
|
this.check = data;
|
|
|
|
|
this.subFormVisible = true;
|
|
|
|
|
},
|
|
|
|
|
hideForm() {
|
|
|
|
|
this.subFormVisible = false;
|
|
|
|
|
},
|
|
|
|
|
hideForm1() {
|
|
|
|
|
this.subFormVisible1 = false;
|
|
|
|
|
},
|
|
|
|
|
forInvSubmit1() {
|
|
|
|
|
if (this.formName === "add" && this.check == null) {
|
|
|
|
|
//新增接口分类
|
|
|
|
|
this.subData.parentId = 0;
|
|
|
|
|
insertLicense(this.subData)
|
|
|
|
|
.then((res) => {
|
|
|
|
|
if (res.code == 20000) {
|
|
|
|
|
this.$message.success("添加成功!")
|
|
|
|
|
this.subFormVisible1 = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else if (this.formName === "add" && this.check != null) {
|
|
|
|
|
//新增子接口
|
|
|
|
|
this.subData.parentId = this.check.id;
|
|
|
|
|
insertLicense(this.subData)
|
|
|
|
|
.then((res) => {
|
|
|
|
|
if (res.code == 20000) {
|
|
|
|
|
this.$message.success("添加成功!")
|
|
|
|
|
this.subFormVisible1 = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else if (this.formName === "edit" && this.check.parentId == 0) {
|
|
|
|
|
//编辑接口分类
|
|
|
|
|
updateLicense(this.subData).then((res) => {
|
|
|
|
|
if (res.code == 20000) {
|
|
|
|
|
this.$message.success("修改成功!")
|
|
|
|
|
this.subFormVisible1 = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
updateLicense(this.subData).then((res) => {
|
|
|
|
|
if (res.code == 20000) {
|
|
|
|
|
this.$message.success("修改成功!")
|
|
|
|
|
this.subFormVisible1 = false;
|
|
|
|
|
this.getlower();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
forInvSubmit() {
|
|
|
|
|
if (this.formName === "add" && this.check == null) {
|
|
|
|
|