From 06c988be913c62dd923e2627e76e009df6497f9e Mon Sep 17 00:00:00 2001
From: hyt <958868763@qq.com>
Date: Wed, 15 May 2024 16:36:42 +0800
Subject: [PATCH] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E7=94=9F=E6=88=90=E7=9A=84?=
=?UTF-8?q?=E8=8F=9C=E5=8D=95=E5=92=8C=E6=8C=89=E9=92=AE=E4=B8=8D=E5=85=81?=
=?UTF-8?q?=E8=AE=B8=E5=88=A0=E9=99=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/store/modules/permission.js | 10 +-
src/views/applicationList/apiList/apiAdd.vue | 1013 ++++++++++++-----
.../buttonManagement/index.vue | 12 +-
.../menuManagement/index.vue | 67 +-
4 files changed, 797 insertions(+), 305 deletions(-)
diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js
index d688fbb..0621828 100644
--- a/src/store/modules/permission.js
+++ b/src/store/modules/permission.js
@@ -106,7 +106,7 @@ const permission = {
name: 'masterDataEdit',
hidden: true,
meta: {
- title: '基本信息',
+ title: '',
hidden: true
}
},
@@ -116,7 +116,7 @@ const permission = {
name: 'dataOrigin',
hidden: true,
meta: {
- title: '数据源',
+ title: '',
hidden: true
}
},
@@ -126,7 +126,7 @@ const permission = {
name: 'displayInfo',
hidden: true,
meta: {
- title: '显示信息',
+ title: '',
hidden: true
}
@@ -136,7 +136,7 @@ const permission = {
name: 'authorily',
component: () => import('@/views/masterDataOptions/authority'),
meta: {
- title: '配置权限',
+ title: '',
hidden: true
}
},
@@ -145,7 +145,7 @@ const permission = {
name: 'distribute',
component: () => import('@/views/masterDataOptions/distribute'),
meta: {
- title: '分发设置',
+ title: '',
hidden: true
}
}
diff --git a/src/views/applicationList/apiList/apiAdd.vue b/src/views/applicationList/apiList/apiAdd.vue
index ad2edf4..d6747b4 100644
--- a/src/views/applicationList/apiList/apiAdd.vue
+++ b/src/views/applicationList/apiList/apiAdd.vue
@@ -2,28 +2,28 @@
上一步
下一步
取消
保存
@@ -44,14 +44,14 @@
@@ -59,13 +59,14 @@
@@ -86,35 +87,35 @@
导入JSON
@@ -122,19 +123,19 @@
sonSelectChangeHandle(val, row)"
+ class="w-100"
+ v-model="row[0][row[1].id]"
+ :clearable="true"
+ placeholder="请选择"
+ @change="(val) => sonSelectChangeHandle(val, row)"
>
@@ -147,14 +148,14 @@
>
-->
@@ -164,9 +165,9 @@
+ 添加属性
@@ -179,37 +180,37 @@
导入JSON
@@ -217,20 +218,20 @@
sonSelectChangeHandle(val, row)"
+ class="w-100"
+ v-model="row[0][row[1].id]"
+ filterable
+ :clearable="true"
+ placeholder="请选择"
+ @change="(val) => sonSelectChangeHandle(val, row)"
>
@@ -243,14 +244,14 @@
>
-->
@@ -260,9 +261,9 @@
+ 添加属性
@@ -274,20 +275,20 @@
导入JSON
{{ row[0].parameterName }}
@@ -296,36 +297,36 @@
@@ -333,20 +334,20 @@
sonSelectChangeHandle(val, row)"
+ class="w-100"
+ v-model="row[0][row[1].id]"
+ filterable
+ :clearable="true"
+ placeholder="请选择"
+ @change="(val) => sonSelectChangeHandle(val, row)"
>
@@ -359,14 +360,14 @@
>
-->
@@ -376,9 +377,9 @@
+ 添加属性
@@ -391,36 +392,36 @@
导入JSON
@@ -428,20 +429,20 @@
sonSelectChangeHandle(val, row)"
+ class="w-100"
+ v-model="row[0][row[1].id]"
+ filterable
+ :clearable="true"
+ placeholder="请选择"
+ @change="(val) => sonSelectChangeHandle(val, row)"
>
@@ -449,9 +450,9 @@
+ 添加属性
@@ -467,12 +468,12 @@
@@ -482,20 +483,20 @@
@@ -616,6 +617,7 @@ export default {
stepZeroForm: {
needLogin: '1',
enableAccessEntry: ['2']
+
}, //步骤1表(数据)
stepOneformRow: [
{
@@ -685,13 +687,38 @@ export default {
message: 'TPS'
}
]
+ },
+ {
+ elCol: [
+ {
+ type: 'radio',
+ title: '是否扩展API',
+ maxlength: 200,
+ id: 'extensionApi',
+ pattern: '',
+ message: 'URL或协议不合法',
+ row: 24,
+ required: true,
+ options: [
+ {
+ label: '是',
+ id: '1'
+ },
+ {
+ label: '否',
+ id: '2'
+ }
+ ]
+ }
+ ]
}
],//步骤2表
stepOneForm: {
requestCoding: '1',
timeoutPeriod: 10000,
currentLimiting: 100,
- requestMethod: '1'
+ requestMethod: '1',
+ extensionApi: '1'
}, //步骤2表(数据)
stepThreeRadio: 1, //没用了(穿透配置)
stepThreeRadioOptions: [
@@ -1121,6 +1148,231 @@ export default {
}
},
methods: {
+ //当步骤二中的是否拓展api改变时如果为1则内部名称和方法名称需必填
+ stepOneChangeRadio(val, index, indexRow, row) {
+ console.log(row)
+ if (row.id === 'extensionApi') {
+ if (val == 1) {
+ this.stepOneformRow = [
+ {
+ elCol: [
+ {
+ type: 'input',
+ title: '目标地址',
+ maxlength: 200,
+ id: 'destinationAddress',
+ pattern: '',
+ message: 'URL或协议不合法',
+ row: 24,
+ required: true
+ }
+ ]
+ },
+ {
+ elCol: [
+ {
+ type: 'select',
+ title: '请求编码',
+ id: 'requestCoding',
+ row: 24,
+ required: true,
+ options: []
+ }
+ ]
+ },
+ {
+ elCol: [
+ {
+ type: 'select',
+ title: '请求方法',
+ id: 'requestMethod',
+ row: 24,
+ required: true,
+ options: []
+ }
+ ]
+ },
+ {
+ elCol: [
+ {
+ type: 'num',
+ title: '超出时间',
+ id: 'timeoutPeriod',
+ row: 24,
+ min: 1,
+ max: 600000,
+ maxlength: 50,
+ required: true,
+ message: 'ms'
+ }
+ ]
+ },
+ {
+ elCol: [
+ {
+ type: 'num',
+ title: '限流',
+ maxlength: 50,
+ id: 'currentLimiting',
+ min: 1,
+ row: 24,
+ max: 1000,
+ required: true,
+ message: 'TPS'
+ }
+ ]
+ },
+ {
+ elCol: [
+ {
+ type: 'radio',
+ title: '是否扩展API',
+ maxlength: 200,
+ id: 'extensionApi',
+ pattern: '',
+ message: 'URL或协议不合法',
+ row: 24,
+ required: true,
+ options: [
+ {
+ label: '是',
+ id: '1'
+ },
+ {
+ label: '否',
+ id: '2'
+ }
+ ]
+ }
+ ]
+ },
+ {
+ elCol: [
+ {
+ type: 'input',
+ title: '内部bean名称',
+ maxlength: 200,
+ id: 'beanName',
+ pattern: '',
+ message: 'URL或协议不合法',
+ row: 24,
+ required: true
+ }
+ ]
+ },
+ {
+ elCol: [
+ {
+ type: 'input',
+ title: '方法名称',
+ maxlength: 200,
+ id: 'funName',
+ pattern: '',
+ message: 'URL或协议不合法',
+ row: 24,
+ required: true
+ }
+ ]
+ }
+ ]
+ } else {
+ this.stepOneformRow = [
+ {
+ elCol: [
+ {
+ type: 'input',
+ title: '目标地址',
+ maxlength: 200,
+ id: 'destinationAddress',
+ pattern: '',
+ message: 'URL或协议不合法',
+ row: 24,
+ required: true
+ }
+ ]
+ },
+ {
+ elCol: [
+ {
+ type: 'select',
+ title: '请求编码',
+ id: 'requestCoding',
+ row: 24,
+ required: true,
+ options: []
+ }
+ ]
+ },
+ {
+ elCol: [
+ {
+ type: 'select',
+ title: '请求方法',
+ id: 'requestMethod',
+ row: 24,
+ required: true,
+ options: []
+ }
+ ]
+ },
+ {
+ elCol: [
+ {
+ type: 'num',
+ title: '超出时间',
+ id: 'timeoutPeriod',
+ row: 24,
+ min: 1,
+ max: 600000,
+ maxlength: 50,
+ required: true,
+ message: 'ms'
+ }
+ ]
+ },
+ {
+ elCol: [
+ {
+ type: 'num',
+ title: '限流',
+ maxlength: 50,
+ id: 'currentLimiting',
+ min: 1,
+ row: 24,
+ max: 1000,
+ required: true,
+ message: 'TPS'
+ }
+ ]
+ },
+ {
+ elCol: [
+ {
+ type: 'radio',
+ title: '是否扩展API',
+ maxlength: 200,
+ id: 'extensionApi',
+ pattern: '',
+ message: 'URL或协议不合法',
+ row: 24,
+ required: true,
+ options: [
+ {
+ label: '是',
+ id: '1'
+ },
+ {
+ label: '否',
+ id: '2'
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ },
// 选项卡点击事件
handleSelect(key, keyPath) {
this.activeIndex = key
@@ -1263,10 +1515,10 @@ export default {
// 子下拉框改变处理
sonSelectChangeHandle(val, row) {
if (
- val != 'Object' &&
- val != 'ObjectCom' &&
- val != 'Map' &&
- row[0].children
+ val != 'Object' &&
+ val != 'ObjectCom' &&
+ val != 'Map' &&
+ row[0].children
) {
this.$delete(row[0], 'children')
}
@@ -1280,12 +1532,12 @@ export default {
async getEditInfo() {
console.log(this.$route.query.apiId, 'id')
const res = await getApiModuleApi(
- {
- tl: 'sysApplicationService',
- as: 'application',
- dj: 'getAppApi'
- },
- { id: this.$route.query.apiId }
+ {
+ tl: 'sysApplicationService',
+ as: 'application',
+ dj: 'getAppApi'
+ },
+ { id: this.$route.query.apiId }
)
if (res.status == 200) {
let obj0 = {}
@@ -1323,8 +1575,231 @@ export default {
obj1['requestMethod'] = res.attribute.requestMethod
obj1['timeoutPeriod'] = res.attribute.timeoutPeriod
obj1['currentLimiting'] = res.attribute.currentLimiting
+ obj1['extensionApi'] = res.attribute.extensionApi
+ obj1['funName'] = res.attribute.funName
+ obj1['beanName'] = res.attribute.beanName
this.stepZeroForm = obj0
this.stepOneForm = obj1
+ //这里和stepOneChangeRadio方法一个道理 需要判断是否必填
+ if (this.stepOneForm.extensionApi == 1) {
+ this.stepOneformRow = [
+ {
+ elCol: [
+ {
+ type: 'input',
+ title: '目标地址',
+ maxlength: 200,
+ id: 'destinationAddress',
+ pattern: '',
+ message: 'URL或协议不合法',
+ row: 24,
+ required: true
+ }
+ ]
+ },
+ {
+ elCol: [
+ {
+ type: 'select',
+ title: '请求编码',
+ id: 'requestCoding',
+ row: 24,
+ required: true,
+ options: []
+ }
+ ]
+ },
+ {
+ elCol: [
+ {
+ type: 'select',
+ title: '请求方法',
+ id: 'requestMethod',
+ row: 24,
+ required: true,
+ options: []
+ }
+ ]
+ },
+ {
+ elCol: [
+ {
+ type: 'num',
+ title: '超出时间',
+ id: 'timeoutPeriod',
+ row: 24,
+ min: 1,
+ max: 600000,
+ maxlength: 50,
+ required: true,
+ message: 'ms'
+ }
+ ]
+ },
+ {
+ elCol: [
+ {
+ type: 'num',
+ title: '限流',
+ maxlength: 50,
+ id: 'currentLimiting',
+ min: 1,
+ row: 24,
+ max: 1000,
+ required: true,
+ message: 'TPS'
+ }
+ ]
+ },
+ {
+ elCol: [
+ {
+ type: 'radio',
+ title: '是否扩展API',
+ maxlength: 200,
+ id: 'extensionApi',
+ pattern: '',
+ message: 'URL或协议不合法',
+ row: 24,
+ required: true,
+ options: [
+ {
+ label: '是',
+ id: '1'
+ },
+ {
+ label: '否',
+ id: '2'
+ }
+ ]
+ }
+ ]
+ },
+ {
+ elCol: [
+ {
+ type: 'input',
+ title: '内部bean名称',
+ maxlength: 200,
+ id: 'beanName',
+ pattern: '',
+ message: 'URL或协议不合法',
+ row: 24,
+ required: true
+ }
+ ]
+ },
+ {
+ elCol: [
+ {
+ type: 'input',
+ title: '方法名称',
+ maxlength: 200,
+ id: 'funName',
+ pattern: '',
+ message: 'URL或协议不合法',
+ row: 24,
+ required: true
+ }
+ ]
+ }
+ ]
+ } else {
+ this.stepOneformRow = [
+ {
+ elCol: [
+ {
+ type: 'input',
+ title: '目标地址',
+ maxlength: 200,
+ id: 'destinationAddress',
+ pattern: '',
+ message: 'URL或协议不合法',
+ row: 24,
+ required: true
+ }
+ ]
+ },
+ {
+ elCol: [
+ {
+ type: 'select',
+ title: '请求编码',
+ id: 'requestCoding',
+ row: 24,
+ required: true,
+ options: []
+ }
+ ]
+ },
+ {
+ elCol: [
+ {
+ type: 'select',
+ title: '请求方法',
+ id: 'requestMethod',
+ row: 24,
+ required: true,
+ options: []
+ }
+ ]
+ },
+ {
+ elCol: [
+ {
+ type: 'num',
+ title: '超出时间',
+ id: 'timeoutPeriod',
+ row: 24,
+ min: 1,
+ max: 600000,
+ maxlength: 50,
+ required: true,
+ message: 'ms'
+ }
+ ]
+ },
+ {
+ elCol: [
+ {
+ type: 'num',
+ title: '限流',
+ maxlength: 50,
+ id: 'currentLimiting',
+ min: 1,
+ row: 24,
+ max: 1000,
+ required: true,
+ message: 'TPS'
+ }
+ ]
+ },
+ {
+ elCol: [
+ {
+ type: 'radio',
+ title: '是否扩展API',
+ maxlength: 200,
+ id: 'extensionApi',
+ pattern: '',
+ message: 'URL或协议不合法',
+ row: 24,
+ required: true,
+ options: [
+ {
+ label: '是',
+ id: '1'
+ },
+ {
+ label: '否',
+ id: '2'
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
this.$set(this.returnedForm, 'returnSuccessField', res.attribute.returnSuccessField)
this.$set(this.returnedForm, 'returnSuccessValue', res.attribute.returnSuccessValue)
this.$set(this.returnedForm, 'returnMsg', res.attribute.returnMsg)
@@ -1344,15 +1819,15 @@ export default {
},
async initRequestCoding() {
const res = await getApiModuleApi(
- {
- tl: 'generalServiceImpl',
- as: 'dictionaryshop',
- dj: 'selectDictionaryshop'
- },
- {
- tab_name: 'sys_app_api',
- column_name: 'request_coding'
- }
+ {
+ tl: 'generalServiceImpl',
+ as: 'dictionaryshop',
+ dj: 'selectDictionaryshop'
+ },
+ {
+ tab_name: 'sys_app_api',
+ column_name: 'request_coding'
+ }
)
if (res.status == 200) {
res.attribute.forEach((item) => {
@@ -1365,15 +1840,15 @@ export default {
},
async initRequestMethod() {
const res = await getApiModuleApi(
- {
- tl: 'generalServiceImpl',
- as: 'dictionaryshop',
- dj: 'selectDictionaryshop'
- },
- {
- tab_name: 'sys_app_api',
- column_name: 'request_method'
- }
+ {
+ tl: 'generalServiceImpl',
+ as: 'dictionaryshop',
+ dj: 'selectDictionaryshop'
+ },
+ {
+ tab_name: 'sys_app_api',
+ column_name: 'request_method'
+ }
)
if (res.status == 200) {
res.attribute.forEach((item) => {
@@ -1420,12 +1895,12 @@ export default {
if (this.$route.query.add) {
console.log(obj)
const res = await getApiModuleApi(
- {
- tl: 'sysApplicationService',
- as: 'application',
- dj: 'saveApi'
- },
- obj
+ {
+ tl: 'sysApplicationService',
+ as: 'application',
+ dj: 'saveApi'
+ },
+ obj
)
if (res.status == 200) {
this.$message({
@@ -1437,12 +1912,12 @@ export default {
} else {
obj['id'] = this.$route.query.apiId
const res = await getApiModuleApi(
- {
- tl: 'sysApplicationService',
- as: 'application',
- dj: 'updateApi'
- },
- obj
+ {
+ tl: 'sysApplicationService',
+ as: 'application',
+ dj: 'updateApi'
+ },
+ obj
)
if (res.status == 200) {
this.$message({
@@ -1484,17 +1959,17 @@ export default {
tableButtonHandle(row, item, data) {
if (item.type === 'dele') {
this.$confirm('确认删除?')
- .then(() => {
- this.idWatch(data, row.id)
- })
- .catch(() => {
- })
+ .then(() => {
+ this.idWatch(data, row.id)
+ })
+ .catch(() => {
+ })
} else if (item.type === 'addattr') {
console.log(row)
if (
- row.concreteType != 'Object' &&
- row.concreteType != 'Map' &&
- row.concreteType != 'ObjectCom'
+ row.concreteType != 'Object' &&
+ row.concreteType != 'Map' &&
+ row.concreteType != 'ObjectCom'
) {
this.$notify({
title: '添加失败',
@@ -1637,34 +2112,34 @@ export default {
},
clearTableData() {
this.queryTableInfo.tableData = this.queryTableInfo.tableData.filter(
- (item) => {
- return item.parameterType != 'authport'
- }
+ (item) => {
+ return item.parameterType != 'authport'
+ }
)
this.bodyEntTableInfo.tableData = this.bodyEntTableInfo.tableData.filter(
- (item) => {
- return item.parameterType != 'authport'
- }
+ (item) => {
+ return item.parameterType != 'authport'
+ }
)
this.bodyExitTableInfo.tableData =
- this.bodyExitTableInfo.tableData.filter((item) => {
- return item.parameterType != 'authport'
- })
+ this.bodyExitTableInfo.tableData.filter((item) => {
+ return item.parameterType != 'authport'
+ })
this.headersTableInfo.tableData = this.headersTableInfo.tableData.filter(
- (item) => {
- return item.parameterType != 'authport'
- }
+ (item) => {
+ return item.parameterType != 'authport'
+ }
)
},
//点击下一步如果有认证接口则请求
async getAuthInfo(id) {
const res = await getApiModuleApi(
- {
- tl: 'sysApplicationService',
- as: 'application',
- dj: 'getAppApi'
- },
- { id }
+ {
+ tl: 'sysApplicationService',
+ as: 'application',
+ dj: 'getAppApi'
+ },
+ { id }
)
console.log(res)
if (res.status == 200) {
diff --git a/src/views/systemMaintenance/buttonManagement/index.vue b/src/views/systemMaintenance/buttonManagement/index.vue
index c753507..39df0d2 100644
--- a/src/views/systemMaintenance/buttonManagement/index.vue
+++ b/src/views/systemMaintenance/buttonManagement/index.vue
@@ -45,7 +45,7 @@