Commit 2f34462b by 无尘

fix: 修改规范

parent b4e21f49
......@@ -4,4 +4,5 @@ node_modules/
/config/
/dist/
/*.js
font/
......@@ -13,17 +13,18 @@ module.exports = {
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
// "standard",
"plugin:vue/essential",
"plugin:vue/recommended"
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
"plugin:prettier/recommended"
// "plugin:prettier/recommended"
],
// required to lint *.vue files
plugins: ["vue", "prettier"],
plugins: ["vue"],
// add your custom rules here
rules: {
"prettier/prettier": "error",
// "prettier/prettier": "error",
// allow async-await
"generator-star-spacing": "off",
"no-console": process.env.NODE_ENV === "production" ? 2 : 0,
// "no-console": process.env.NODE_ENV === "production" ? 2 : 0,
"no-alert": process.env.NODE_ENV === "production" ? 2 : 0, //禁止使用alert confirm prompt
"no-debugger": process.env.NODE_ENV === "production" ? 2 : 0,
// --------------------静态检测-----------------------------
......@@ -48,7 +49,7 @@ module.exports = {
"no-empty": [
2,
{
"allowEmptyCatch": true
"allowEmptyCatch": true
}
],
// 禁止将 catch 的第一个参数 error 重新赋值 【重新赋值,error将没有意义】
......@@ -82,7 +83,7 @@ module.exports = {
complexity: [
2,
{
max: 20
max: 200
}
],
// 不允许有空函数,除非是将一个空函数设置为某个项的默认值 【否则空函数并没有实际意义】
......@@ -143,34 +144,28 @@ module.exports = {
// ----------------------------------------------------代码规范----------------------------------------------------------
/**
* 代码规范
* 有关【空格】、【链式换行】、【缩进】、【=、{}、()、首位空格】规范没有添加,怕大家一时间接受不了,目前所挑选的规则都是:保障我们的代码可读性、可维护性的
* */
// 变量名必须是 camelcase 驼峰风格的
// @off 【涉及到 很多 api 或文件名可能都不是 camelcase 先关闭】
camelcase: 0,
camelcase: [ 2, { "properties": "always" }],
// @fixable 禁止在行首写逗号
"comma-style": [2, "last"],
// @fixable 一个缩进必须用两个空格替代
// @off 【不限制大家,为了关闭eslint默认值,所以手动关闭,off不可去掉】 讨论
indent: [2, 2,{ "SwitchCase": 1 }],
//@off 手动关闭//前面需要回车的规则 注释
"spaced-comment": 0,
//@off 手动关闭//前面需要空格 注释
"spaced-comment": 2,
//@off 手动关闭: 禁用行尾空白
"no-trailing-spaces": 2,
//@off 手动关闭: 不允许多行回车
"no-multiple-empty-lines": 1,
//@off 手动关闭: 逗号前必须加空格
"comma-spacing": 0,
"comma-spacing": 2,
//@off 手动关闭: 冒号后必须加空格
"key-spacing": 1,
// @fixable 结尾禁止使用分号
//@off [vue官方推荐无分号,不知道大家是否可以接受?先手动off掉] 讨论
// "semi": [2,"never"],
semi: 0,
"key-spacing": 2,
// 代码块嵌套的深度禁止超过 5 层
"max-depth": [1, 5],
"max-depth": [1, 20],
// 回调函数嵌套禁止超过 4 层,多了请用 async await 替代
"max-nested-callbacks": [2, 4],
"max-nested-callbacks": [2, 8],
// 函数的参数禁止超过 7 个
"max-params": [2, 7],
// new 后面的类名必须首字母大写 【面向对象编程原则】
......@@ -200,6 +195,67 @@ module.exports = {
eqeqeq: 0,
//this别名
"consistent-this": [2, "that"],
//强制使用一致的反勾号、双引号或单引号 (quotes) 关闭
quotes: [2, "single"],
"array-bracket-spacing": [2,"always"],//[后 ]前必须有一个空格
"object-curly-spacing": [2,"always"],//{后 }前必须有一个空格
"space-before-function-paren": [2, "never"],//函数圆括号之前无空格
"space-infix-ops": 2,
"semi": [2, "always"],// 代码使用分号结尾
"valid-jsdoc": ["error", {
"requireReturn": false,
"requireParamDescription": false,
"requireReturnDescription": false
}], //使用JSDoc注释
"vue/attribute-hyphenation": ["error", "always"], // 自定义组件的属性使用连字符,不可使用小驼峰命名法
"vue/component-name-in-template-casing": ["error", "kebab-case", { registeredComponentsOnly: false }], // 自定义组件在template中的标签使用连字符
"vue/html-closing-bracket-newline": ["error", { // vue组件template中不能以 > 开头
"singleline": "never",
"multiline": "never"
}],
"vue/html-quotes": [ "error", "double"], // vue组件template中使用双引号
"vue/name-property-casing": ["error", "PascalCase"], // vue组件name属性使用大驼峰命名法
"vue/prop-name-casing": ["error", "camelCase"], // vue组件props的key使用小驼峰命名法
"vue/this-in-template": ["error", "never"], // vue组件template中不能使用this
"vue/order-in-components": ["error", {
"order": [
"el",
"name",
"key",
"parent",
"functional",
["delimiters", "comments"],
["components", "directives"],
"extends",
"mixins",
["provide", "inject"],
"ROUTER_GUARDS",
"layout",
"middleware",
"validate",
"scrollToTop",
"transition",
"loading",
"inheritAttrs",
"model",
["props", "propsData"],
"emits",
"setup",
"asyncData",
"data",
"fetch",
"head",
"watchQuery",
"LIFECYCLE_HOOKS",
"methods",
"filters",
"computed",
"watch",
["template", "render"],
"renderError"
]
}],
// -----------------------------ECMAScript 6-------------------------------------
/**
* ECMAScript 6
......@@ -215,15 +271,11 @@ module.exports = {
"no-dupe-class-members": 2,
// 禁止重复 import 模块
"no-duplicate-imports": 2,
//@off 以后可能会开启 禁止 var
"no-var": 0,
//@off 禁止 var
"no-var": 2,
// ---------------------------------被关闭的规则-----------------------
// parseInt必须指定第二个参数 parseInt("071",10);
radix: 0,
//强制使用一致的反勾号、双引号或单引号 (quotes) 关闭
quotes: 0,
//要求或禁止函数圆括号之前有一个空格
"space-before-function-paren": [0, "always"],
//禁止或强制圆括号内的空格
"space-in-parens": [0, "never"],
//关键字后面是否要空一格
......
/*
* @Descripttion: 当前组件信息
* @version: 1.0.0
* @Author: 无尘
* @Date: 2020-08-14 10:52:37
* @LastEditors: 无尘
* @LastEditTime: 2020-08-14 11:22:03
*/
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'scope-empty': [0],
'scope-case': [0],
'subject-full-stop': [0, 'never'],
'subject-case': [0, 'never'],
'type-enum': [ // commit type 类型
2,
'always',
[
'add', // 新功能
'feat', // 新功能
'fix', // 修改问题
'update', // 更新
'style', // 样式
'test', // 测试
'docs', // 文档
'refactor', // 重构
'chore' // 依赖包/辅助工具的变动
]
]
}
};
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>API网关管理平台</title><link href=./static/css/app.0abff36058d269a53e0ff12851bf7078.css rel=stylesheet></head><body style="min-width: 1400px;"><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script src=//web-1251519181.file.myqcloud.com/components/input.2.0.15.js></script><script src=//web-1251519181.file.myqcloud.com/components/delete.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/pagination.1.0.8.js></script><script type=text/javascript src=./static/js/manifest.ce4e0ef20242800b436e.js></script><script type=text/javascript src=./static/js/vendor.289e40671dbfc6af0fe7.js></script><script type=text/javascript src=./static/js/app.8b38bb9b591370f8452a.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>API网关管理平台</title><link href=./static/css/app.f168de6e1c992f8a8af77805e9b1a37c.css rel=stylesheet></head><body style="min-width: 1400px;"><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script src=//web-1251519181.file.myqcloud.com/components/input.2.0.15.js></script><script src=//web-1251519181.file.myqcloud.com/components/delete.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/pagination.1.0.8.js></script><script type=text/javascript src=./static/js/manifest.77529361fcdd31e8a3a5.js></script><script type=text/javascript src=./static/js/vendor.289e40671dbfc6af0fe7.js></script><script type=text/javascript src=./static/js/app.170302000a04b9ce8e63.js></script></body></html>
\ No newline at end of file
webpackJsonp([10],{"1btA":function(t,s){},AejC:function(t,s,i){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var e=i("Minx"),n=i.n(e),a={name:"Page404",data:function(){return{imgNotFound:n.a}},computed:{message:function(){return"抱歉,你访问的页面不存在"}},mounted:function(){}},r={render:function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticStyle:{background:"#f0f2f5","margin-top":"-20px",height:"100%"}},[s("div",{staticClass:"wscn-http404"},[s("div",{staticClass:"pic-404"},[s("img",{staticClass:"pic-404__parent",attrs:{src:this.imgNotFound,alt:"404"}})]),this._v(" "),s("div",{staticClass:"bullshit"},[s("div",{staticClass:"bullshit__headline"},[this._v("\n "+this._s(this.message)+"\n ")]),this._v(" "),s("a",{staticClass:"bullshit__return-home",attrs:{href:"#/companyGroup"}},[this._v("返回首页")])])])])},staticRenderFns:[]};var c=i("VU/8")(a,r,!1,function(t){i("1btA")},"data-v-f40093ba",null);s.default=c.exports},Minx:function(t,s,i){t.exports=i.p+"static/img/error_404.bf58747.svg"}});
\ No newline at end of file
webpackJsonp([10],{KQMn:function(e,t){},SGyq:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a("319J"),o=a("mvHQ"),n=a.n(o),i=a("fZjL"),s=a.n(i),l=a("P9l9"),c=a("TUB1"),d=a("LlAa"),u={name:"error-code-edit",props:{showDialog:{type:Boolean,default:!1},editRow:{type:Object,default:function(){return{errorSettingId:"",interfaceName:"",projectAndGroup:"",errorCode:"",errorInfo:""}}}},data:function(){return{customDialog:!1,formData:{errorSettingId:"",interfaceName:"",projectAndGroup:"",errorCode:"",errorInfo:""},rules:{errorCode:[{required:!0,message:"请输入错误码",trigger:"blur"}],errorInfo:[{required:!0,message:"请输入错误消息",trigger:"blur"}]}}},methods:{handleClose:function(e){e(),this.hideDialog()},customCancel:function(){this.hideDialog()},hideDialog:function(){this.customDialog=!1,this.formData.errorCode="",this.formData.errorInfo="",this.$emit("hideDialog","")},customConfirm:function(e){var t=this;t.formData.errorCode=t.formData.errorCode?String(t.formData.errorCode).replace(/\s+/g,""):"",t.formData.errorInfo=t.formData.errorInfo?String(t.formData.errorInfo).replace(/\s+/g,""):"",t.$refs[e].validate(function(e){if(!e)return!1;t.postEditData()})},postEditData:function(){var e=this,t={errorSettingId:e.formData.errorSettingId,errorCode:e.formData.errorCode,errorInfo:e.formData.errorInfo};Object(l.b)(e.editRow.errorSettingId?"/gateway-manage/update-error-setting":"/gateway-manage/create-error-setting",t).then(function(t){var a=t.data;if("0000"==a.code)return c.a.showmsg("保存成功","success"),void e.setData();d.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},setData:function(e){var t=this;t.$emit("hideDialog",t.formData),t.$nextTick(function(){t.formData.errorCode="",t.formData.errorInfo=""})}},watch:{showDialog:function(e,t){this.customDialog=e},editRow:function(e,t){s()(e).length&&(this.formData=JSON.parse(n()(e)))}},mounted:function(){this.customDialog=this.showDialog,s()(this.editRow).length&&(this.formData=JSON.parse(n()(this.editRow)))}},f={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"show",rawName:"v-show",value:e.customDialog,expression:"customDialog"}]},[a("el-dialog",{staticClass:"edit-dialog",attrs:{title:"编辑",visible:e.customDialog,width:"600px","before-close":e.handleClose},on:{"update:visible":function(t){e.customDialog=t}}},[a("div",{staticClass:"edit-dialog-body"},[a("el-form",{ref:"errorCodeForm",attrs:{model:e.formData,"label-width":"116px",rules:e.rules}},[a("el-form-item",{attrs:{label:"错误码:",prop:"errorCode"}},[a("el-input",{attrs:{disabled:!!e.formData.errorSettingId},model:{value:e.formData.errorCode,callback:function(t){e.$set(e.formData,"errorCode",t)},expression:"formData.errorCode"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"错误消息:",prop:"errorCode"}},[a("el-input",{model:{value:e.formData.errorInfo,callback:function(t){e.$set(e.formData,"errorInfo",t)},expression:"formData.errorInfo"}})],1),e._v(" "),e.formData.interfaceName?a("el-form-item",{attrs:{label:"使用的接口名称:"}},[e._v("\n "+e._s(e.formData.interfaceName)+"\n ")]):e._e(),e._v(" "),e.formData.projectAndGroup?a("el-form-item",{attrs:{label:"使用的项目分组:"}},[e._v("\n "+e._s(e.formData.projectAndGroup)+"\n ")]):e._e()],1)],1),e._v(" "),a("div",{staticClass:"dialog-footer",staticStyle:{"padding-bottom":"10px"},attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.customCancel}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.customConfirm("errorCodeForm")}}},[e._v("保 存")])],1)])],1)},staticRenderFns:[]};var g=a("VU/8")(u,f,!1,function(e){a("KQMn")},"data-v-d9a98e66",null).exports,h=a("jvWE"),m={name:"errorCode",components:{navBread:r.a,errorCodeEdit:g},data:function(){return{navPath:[{name:"错误码",path:""}],searchValue:"",loading:!0,tableData:[],pageSize:20,currentPage:1,totalCount:0,showDialog:!1,editIndex:"",editRow:{}}},methods:{searchData:Object(h.a)(function(e){this.currentPage,this.getData()},500),clearInput:function(){this.currentPage=1,this.getData()},handleSizeChange:function(e){this.pageSize=e,this.getData()},handleCurrentChange:function(e){this.currentPage=e,this.getData()},handleEdit:function(e,t){this.editIndex=e,this.editRow=t,this.showDialog=!0},hideDialog:function(e){if(!e)return this.editIndex="",this.editRow={},this.showDialog=!1,!1;this.currentPage,this.getData(),this.editIndex="",this.editRow={},this.showDialog=!1,this.$forceUpdate()},handleDel:function(e,t){var a=this;a.$confirm("确认删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){a.postDel(e,t)}).catch(function(){})},postDel:function(e,t){var a=this,r={errorSettingId:t.errorSettingId};Object(l.b)("/gateway-manage/delete-error-setting",r).then(function(e){var t=e.data;if("0000"==t.code)return c.a.showmsg("删除成功","success"),void a.getData();d.a.errorMsg(t)}).catch(function(e){a.$message.error({duration:1e3,message:e.message})})},getData:function(){var e=this;e.loading=!0;var t={search:e.searchValue,pageNum:e.currentPage,pageSize:e.pageSize};Object(l.b)("/gateway-manage/page-error-setting",t).then(function(t){var a=t.data;if(e.loading=!1,"0000"==a.code)return e.tableData=a.result.result||[],void(e.totalCount=a.result.totalCount);d.a.errorMsg(a)}).catch(function(t){e.loading=!1,e.$message.error({duration:1e3,message:t.message})})}},watch:{$route:{handler:function(e,t){},deep:!0}},mounted:function(){this.$emit("showTab",6),this.getData()}},p={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"api-body-content border-box"},[a("div",{staticClass:"common-nav"},[a("nav-bread",{attrs:{navPath:e.navPath}})],1),e._v(" "),a("div",{staticClass:"api-body-main common-body-main border-box"},[a("div",{staticClass:"api-main-content border-box"},[a("div",{staticClass:"search-wrap m-b-20 flex flex-space-between"},[a("el-input",{staticClass:"w-320",attrs:{clearable:"",placeholder:"请输入接口名称/错误码"},on:{clear:e.clearInput},nativeOn:{keyup:function(t){return a=t,e.searchData(a);var a}},model:{value:e.searchValue,callback:function(t){e.searchValue=t},expression:"searchValue"}},[a("i",{staticClass:"el-input__icon el-icon-search",attrs:{slot:"prefix"},slot:"prefix"})]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.handleEdit}},[e._v("新建错误码")])],1),e._v(" "),a("div",{staticClass:"table-wrap"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.tableData}},[a("el-table-column",{attrs:{label:"错误码","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.errorCode)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"错误消息","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.errorInfo)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){e.handleEdit(t.$index,t.row)}}},[e._v("编辑")]),e._v(" "),a("el-button",{attrs:{type:"text"},on:{click:function(a){e.handleDel(t.$index,t.row)}}},[e._v("删除")])]}}])})],1),e._v(" "),e.totalCount?a("div",{staticClass:"pagination text-right m-t-14"},[a("dm-pagination",{attrs:{small:"","page-size":e.pageSize,"current-page":e.currentPage,layout:"prev, pager, next",total:e.totalCount},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1):e._e()],1)])]),e._v(" "),a("error-code-edit",{attrs:{editRow:e.editRow,showDialog:e.showDialog},on:{hideDialog:e.hideDialog}})],1)},staticRenderFns:[]};var v=a("VU/8")(m,p,!1,function(e){a("vB2P")},"data-v-d23a5cdc",null);t.default=v.exports},vB2P:function(e,t){}});
\ No newline at end of file
webpackJsonp([11],{"2X9c":function(t,s,e){t.exports=e.p+"static/img/error_500.ed0cba4.svg"},FskK:function(t,s,e){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var i=e("2X9c"),a=e.n(i),n={name:"Page500",data:function(){return{imgService:a.a}},computed:{message:function(){return"抱歉,服务器出错了"}}},c={render:function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticStyle:{background:"#f0f2f5","margin-top":"-20px",height:"100%"}},[s("div",{staticClass:"wscn-http404"},[s("div",{staticClass:"pic-404"},[s("img",{staticClass:"pic-404__parent",attrs:{src:this.imgService,alt:"500"}})]),this._v(" "),s("div",{staticClass:"bullshit"},[s("div",{staticClass:"bullshit__headline"},[this._v("\n "+this._s(this.message)+"\n ")]),this._v(" "),s("a",{staticClass:"bullshit__return-home",attrs:{href:"#/companyGroup"}},[this._v("返回首页")])])])])},staticRenderFns:[]};var r=e("VU/8")(n,c,!1,function(t){e("y/L7")},"data-v-623ecb3a",null);s.default=r.exports},"y/L7":function(t,s){}});
\ No newline at end of file
webpackJsonp([11],{"2X9c":function(t,s,i){t.exports=i.p+"static/img/error_500.ed0cba4.svg"},FskK:function(t,s,i){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var a=i("2X9c"),e=i.n(a),n={name:"page500",data:function(){return{img_500:e.a}},computed:{message:function(){return"抱歉,服务器出错了"}}},c={render:function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticStyle:{background:"#f0f2f5","margin-top":"-20px",height:"100%"}},[s("div",{staticClass:"wscn-http404"},[s("div",{staticClass:"pic-404"},[s("img",{staticClass:"pic-404__parent",attrs:{src:this.img_500,alt:"500"}})]),this._v(" "),s("div",{staticClass:"bullshit"},[s("div",{staticClass:"bullshit__headline"},[this._v(this._s(this.message))]),this._v(" "),s("a",{staticClass:"bullshit__return-home",attrs:{href:"#/companyGroup"}},[this._v("返回首页")])])])])},staticRenderFns:[]};var r=i("VU/8")(n,c,!1,function(t){i("wJ+N")},"data-v-d1f21788",null);s.default=r.exports},"wJ+N":function(t,s){}});
\ No newline at end of file
webpackJsonp([12],{"6XGN":function(M,L,j){"use strict";Object.defineProperty(L,"__esModule",{value:!0});var N=j("CkW6"),u=j.n(N),w={name:"page403",data:function(){return{img_403:u.a}},computed:{message:function(){return"抱歉,你无权访问该页面"}}},D={render:function(){var M=this.$createElement,L=this._self._c||M;return L("div",{staticStyle:{background:"#f0f2f5","margin-top":"-20px",height:"100%"}},[L("div",{staticClass:"wscn-http404"},[L("div",{staticClass:"pic-404"},[L("img",{staticClass:"pic-404__parent",attrs:{src:this.img_403,alt:"403"}})]),this._v(" "),L("div",{staticClass:"bullshit"},[L("div",{staticClass:"bullshit__headline"},[this._v(this._s(this.message))]),this._v(" "),L("a",{staticClass:"bullshit__return-home",attrs:{href:"#/companyGroup"}},[this._v("返回首页")])])])])},staticRenderFns:[]};var C=j("VU/8")(w,D,!1,function(M){j("GVON")},"data-v-34b4b20b",null);L.default=C.exports},CkW6:function(M,L){M.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idX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LjMtMS4zdi04LjFjMC0wLjcsMC42LTEuMywxLjMtMS40QzIzNC40LDk0LjQsMjM1LDk1LDIzNSw5NS44Ig0KCS8+DQo8L3N2Zz4NCg=="},GVON:function(M,L){}});
\ No newline at end of file
webpackJsonp([12],{"6Vbk":function(t,e){},SGyq:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a("319J"),o=a("mvHQ"),n=a.n(o),i=a("fZjL"),s=a.n(i),l=a("P9l9"),c=a("TUB1"),d=a("LlAa"),u={name:"ErrorCodeEdit",props:{showDialog:{type:Boolean,default:!1},editRow:{type:Object,default:function(){return{errorSettingId:"",interfaceName:"",projectAndGroup:"",errorCode:"",errorInfo:""}}}},data:function(){return{customDialog:!1,formData:{errorSettingId:"",interfaceName:"",projectAndGroup:"",errorCode:"",errorInfo:""},rules:{errorCode:[{required:!0,message:"请输入错误码",trigger:"blur"}],errorInfo:[{required:!0,message:"请输入错误消息",trigger:"blur"}]}}},mounted:function(){this.customDialog=this.showDialog,s()(this.editRow).length&&(this.formData=JSON.parse(n()(this.editRow)))},methods:{handleClose:function(t){t(),this.hideDialog()},customCancel:function(){this.hideDialog()},hideDialog:function(){this.customDialog=!1,this.formData.errorCode="",this.formData.errorInfo="",this.$emit("hideDialog","")},customConfirm:function(t){var e=this;e.formData.errorCode=e.formData.errorCode?String(e.formData.errorCode).replace(/\s+/g,""):"",e.formData.errorInfo=e.formData.errorInfo?String(e.formData.errorInfo).replace(/\s+/g,""):"",e.$refs[t].validate(function(t){if(!t)return!1;e.postEditData()})},postEditData:function(){var t=this,e={errorSettingId:t.formData.errorSettingId,errorCode:t.formData.errorCode,errorInfo:t.formData.errorInfo};Object(l.b)(t.editRow.errorSettingId?"/gateway-manage/update-error-setting":"/gateway-manage/create-error-setting",e).then(function(e){var a=e.data;if("0000"==a.code)return c.a.showmsg("保存成功","success"),void t.setData();d.a.errorMsg(a)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})},setData:function(){var t=this;t.$emit("hideDialog",t.formData),t.$nextTick(function(){t.formData.errorCode="",t.formData.errorInfo=""})}},watch:{showDialog:function(t,e){this.customDialog=t},editRow:function(t,e){s()(t).length&&(this.formData=JSON.parse(n()(t)))}}},f={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"show",rawName:"v-show",value:t.customDialog,expression:"customDialog"}]},[a("el-dialog",{staticClass:"edit-dialog",attrs:{title:"编辑",visible:t.customDialog,width:"600px","before-close":t.handleClose},on:{"update:visible":function(e){t.customDialog=e}}},[a("div",{staticClass:"edit-dialog-body"},[a("el-form",{ref:"errorCodeForm",attrs:{model:t.formData,"label-width":"116px",rules:t.rules}},[a("el-form-item",{attrs:{label:"错误码:",prop:"errorCode"}},[a("el-input",{attrs:{disabled:!!t.formData.errorSettingId},model:{value:t.formData.errorCode,callback:function(e){t.$set(t.formData,"errorCode",e)},expression:"formData.errorCode"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"错误消息:",prop:"errorCode"}},[a("el-input",{model:{value:t.formData.errorInfo,callback:function(e){t.$set(t.formData,"errorInfo",e)},expression:"formData.errorInfo"}})],1),t._v(" "),t.formData.interfaceName?a("el-form-item",{attrs:{label:"使用的接口名称:"}},[t._v("\n "+t._s(t.formData.interfaceName)+"\n ")]):t._e(),t._v(" "),t.formData.projectAndGroup?a("el-form-item",{attrs:{label:"使用的项目分组:"}},[t._v("\n "+t._s(t.formData.projectAndGroup)+"\n ")]):t._e()],1)],1),t._v(" "),a("div",{staticClass:"dialog-footer",staticStyle:{"padding-bottom":"10px"},attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:t.customCancel}},[t._v("\n 取 消\n ")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.customConfirm("errorCodeForm")}}},[t._v("\n 保 存\n ")])],1)])],1)},staticRenderFns:[]};var g=a("VU/8")(u,f,!1,function(t){a("6Vbk")},"data-v-6510e881",null).exports,h=a("jvWE"),m={name:"ErrorCode",components:{navBread:r.a,errorCodeEdit:g},data:function(){return{navPath:[{name:"错误码",path:""}],searchValue:"",loading:!0,tableData:[],pageSize:20,currentPage:1,totalCount:0,showDialog:!1,editIndex:"",editRow:{}}},mounted:function(){this.$emit("showTab",6),this.getData()},methods:{searchData:Object(h.a)(function(t){this.currentPage,this.getData()},500),clearInput:function(){this.currentPage=1,this.getData()},handleSizeChange:function(t){this.pageSize=t,this.getData()},handleCurrentChange:function(t){this.currentPage=t,this.getData()},handleEdit:function(t,e){this.editIndex=t,this.editRow=e,this.showDialog=!0},hideDialog:function(t){if(!t)return this.editIndex="",this.editRow={},this.showDialog=!1,!1;this.currentPage,this.getData(),this.editIndex="",this.editRow={},this.showDialog=!1,this.$forceUpdate()},handleDel:function(t,e){var a=this;a.$confirm("确认删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){a.postDel(t,e)}).catch(function(){})},postDel:function(t,e){var a=this,r={errorSettingId:e.errorSettingId};Object(l.b)("/gateway-manage/delete-error-setting",r).then(function(t){var e=t.data;if("0000"==e.code)return c.a.showmsg("删除成功","success"),void a.getData();d.a.errorMsg(e)}).catch(function(t){a.$message.error({duration:1e3,message:t.message})})},getData:function(){var t=this;t.loading=!0;var e={search:t.searchValue,pageNum:t.currentPage,pageSize:t.pageSize};Object(l.b)("/gateway-manage/page-error-setting",e).then(function(e){var a=e.data;if(t.loading=!1,"0000"==a.code)return t.tableData=a.result.result||[],void(t.totalCount=a.result.totalCount);d.a.errorMsg(a)}).catch(function(e){t.loading=!1,t.$message.error({duration:1e3,message:e.message})})}},watch:{$route:{handler:function(t,e){},deep:!0}}},p={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"api-body-content border-box"},[a("div",{staticClass:"common-nav"},[a("nav-bread",{attrs:{"nav-path":t.navPath}})],1),t._v(" "),a("div",{staticClass:"api-body-main common-body-main border-box"},[a("div",{staticClass:"api-main-content border-box"},[a("div",{staticClass:"search-wrap m-b-20 flex flex-space-between"},[a("el-input",{staticClass:"w-320",attrs:{clearable:"",placeholder:"请输入接口名称/错误码"},on:{clear:t.clearInput},nativeOn:{keyup:function(e){return a=e,t.searchData(a);var a}},model:{value:t.searchValue,callback:function(e){t.searchValue=e},expression:"searchValue"}},[a("i",{staticClass:"el-input__icon el-icon-search",attrs:{slot:"prefix"},slot:"prefix"})]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.handleEdit}},[t._v("\n 新建错误码\n ")])],1),t._v(" "),a("div",{staticClass:"table-wrap"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData}},[a("el-table-column",{attrs:{label:"错误码","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.errorCode)+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"错误消息","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.errorInfo)+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){t.handleEdit(e.$index,e.row)}}},[t._v("\n 编辑\n ")]),t._v(" "),a("el-button",{attrs:{type:"text"},on:{click:function(a){t.handleDel(e.$index,e.row)}}},[t._v("\n 删除\n ")])]}}])})],1),t._v(" "),t.totalCount?a("div",{staticClass:"pagination text-right m-t-14"},[a("dm-pagination",{attrs:{small:"","page-size":t.pageSize,"current-page":t.currentPage,layout:"prev, pager, next",total:t.totalCount},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1):t._e()],1)])]),t._v(" "),a("error-code-edit",{attrs:{"edit-row":t.editRow,"show-dialog":t.showDialog},on:{hideDialog:t.hideDialog}})],1)},staticRenderFns:[]};var v=a("VU/8")(m,p,!1,function(t){a("ZwLc")},"data-v-2cf604fe",null);e.default=v.exports},ZwLc:function(t,e){}});
\ No newline at end of file
webpackJsonp([13],{"3g/j":function(t,e){},auIj:function(t,e){},kAqA:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=a("319J"),r=a("mvHQ"),i=a.n(r),n=a("fZjL"),s=a.n(n),c=a("l46T"),l=a("Kkt8"),u=a("P9l9"),d=a("TUB1"),p=a("LlAa"),m={name:"new-env",props:{showDialog:{type:Boolean,default:!1},editRow:{type:Object,default:function(){return{projectId:"",projectName:"",projectDescribe:""}}}},components:{limitInput:c.a,limitTextarea:l.a},data:function(){return{customDialog:!1,formData:{projectId:"",projectName:"",projectDescribe:""},rules:{projectName:[{required:!0,message:"请输入项目名称",trigger:"blur"}],projectDescribe:[{required:!0,message:"请输入描述",trigger:"blur"}]}}},methods:{handleClose:function(t){this.$refs.programForm.resetFields(),t(),this.hideDialog()},customCancel:function(){this.$refs.programForm.resetFields(),this.hideDialog()},hideDialog:function(){this.customDialog=!1,this.formData.projectName="",this.formData.projectDescribe="",this.$emit("hideDialog","")},customConfirm:function(t){var e=this;e.formData.projectName=e.formData.projectName?String(e.formData.projectName).replace(/\s+/g,""):"",e.formData.projectDescribe=e.formData.projectDescribe?String(e.formData.projectDescribe).replace(/\s+/g,""):"",e.$refs[t].validate(function(t){if(!t)return!1;e.postEditData()})},postEditData:function(){var t=this,e={projectId:t.formData.projectId,projectName:t.formData.projectName,projectDescribe:t.formData.projectDescribe};Object(u.a)(t.editRow.projectId?"/gateway-manage/update-project":"/gateway-manage/create-project",e).then(function(e){var a=e.data;if("0000"==a.code)return d.a.showmsg("保存成功","success"),void t.setData();p.a.errorMsg(a)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})},setData:function(t){var e=this;e.$emit("hideDialog",e.formData),e.$nextTick(function(){e.formData.projectName="",e.formData.projectDescribe=""})}},watch:{showDialog:function(t,e){this.customDialog=t},editRow:function(t,e){s()(t).length&&(this.formData=JSON.parse(i()(t)))}},mounted:function(){this.customDialog=this.showDialog,s()(this.editRow).length&&(this.formData=JSON.parse(i()(this.editRow)))}},h={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"show",rawName:"v-show",value:t.customDialog,expression:"customDialog"}]},[a("el-dialog",{staticClass:"edit-dialog",attrs:{title:t.formData.projectId?"编辑项目":"新建项目",visible:t.customDialog,width:"600px","before-close":t.handleClose},on:{"update:visible":function(e){t.customDialog=e}}},[a("div",{staticClass:"edit-dialog-body"},[a("el-form",{ref:"programForm",attrs:{model:t.formData,"label-width":"94px",rules:t.rules}},[a("el-form-item",{attrs:{label:"项目名称:",prop:"projectName"}},[a("limitInput",{attrs:{inputWidth:440,inputValue:t.formData.projectName,holder:"请输入项目名称",getByType:"word",maxLength:20},on:{"update:inputValue":function(e){t.$set(t.formData,"projectName",e)}}})],1),t._v(" "),a("el-form-item",{attrs:{label:"描述:"}},[a("limit-textarea",{attrs:{inputWidth:440,inputValue:t.formData.projectDescribe,holder:"请输入描述内容",getByType:"word",maxLength:100},on:{"update:inputValue":function(e){t.$set(t.formData,"projectDescribe",e)}}})],1)],1)],1),t._v(" "),a("div",{staticClass:"dialog-footer",staticStyle:{"padding-bottom":"10px"},attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:t.customCancel}},[t._v("取 消")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.customConfirm("programForm")}}},[t._v(t._s(t.formData.projectId?"保 存":"新 建"))])],1)])],1)},staticRenderFns:[]};var g=a("VU/8")(m,h,!1,function(t){a("auIj")},"data-v-255c0ab0",null).exports,f=a("jvWE"),D={name:"apiProgram",components:{navBread:o.a,newProgram:g},data:function(){return{navPath:[{name:"API管理",path:"/apiProgram"},{name:"项目列表",path:""}],searchValue:"",loading:!0,tableData:[],pageSize:20,currentPage:1,totalCount:0,showDialog:!1,editIndex:"",editRow:{}}},methods:{editProgram:function(){this.showDialog=!0},hideDialog:function(t){if(!t)return this.editIndex="",this.editRow={},this.showDialog=!1,!1;this.currentPage=1,this.getData(),this.editIndex="",this.editRow={},this.showDialog=!1,this.$forceUpdate()},searchData:Object(f.a)(function(t){this.currentPage,this.getData()},500),clearInput:function(){this.currentPage=1,this.getData()},handleSizeChange:function(t){this.pageSize=t,this.getData()},handleCurrentChange:function(t){this.currentPage=t,this.getData()},toGroupList:function(t,e){this.$router.push("/apiProgramGroup?projectId="+e.projectId+"&projectName="+e.projectName)},handleEdit:function(t,e){this.editIndex=t,this.editRow=e,this.showDialog=!0},handleDel:function(t,e){var a=this;a.$confirm("【"+e.projectName+"】下的接口将全部被删除,确认删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){a.postDelData(t,e)}).catch(function(){})},postDelData:function(t,e){var a=this,o={projectId:e.projectId};Object(u.a)("/gateway-manage/delete-project",o).then(function(e){var o=e.data;if("0000"==o.code)return d.a.showmsg("删除成功","success"),void a.tableData.splice(t,1);p.a.errorMsg(o)}).catch(function(t){a.$message.error({duration:1e3,message:t.message})})},getData:function(){var t=this;t.loading=!0;var e={search:t.searchValue,pageSize:t.pageSize,pageNum:t.currentPage};Object(u.a)("/gateway-manage/page-project",e).then(function(e){var a=e.data;if(t.loading=!1,"0000"==a.code)return t.tableData=a.result.result,void(t.totalCount=a.result.totalCount);p.a.errorMsg(a)}).catch(function(e){t.loading=!1,t.$message.error({duration:1e3,message:e.message})})}},watch:{$route:{handler:function(t,e){},deep:!0}},mounted:function(){this.$emit("showTab",21),this.getData()}},v={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"api-body-content border-box"},[a("div",{staticClass:"common-nav"},[a("nav-bread",{attrs:{navPath:t.navPath}})],1),t._v(" "),a("div",{staticClass:"api-body-main common-body-main border-box"},[a("div",{staticClass:"api-main-content border-box"},[a("div",{staticClass:"search-wrap m-b-20 flex flex-space-between"},[a("el-input",{staticClass:"w-320",attrs:{clearable:"",placeholder:"请输入项目名称"},on:{clear:t.clearInput},nativeOn:{keyup:function(e){return a=e,t.searchData(a);var a}},model:{value:t.searchValue,callback:function(e){t.searchValue=e},expression:"searchValue"}},[a("i",{staticClass:"el-input__icon el-icon-search",attrs:{slot:"prefix"},slot:"prefix"})]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.editProgram}},[t._v("新建项目")])],1),t._v(" "),a("div",{staticClass:"table-wrap"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData}},[a("el-table-column",{attrs:{prop:"projectName",label:"项目名称","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{label:"描述","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.projectDescribe)+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"创建时间","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"color-606266 line-18"},[t._v(t._s(t._f("timeStampToYmd")(e.row.createTime)))]),t._v(" "),a("div",{staticClass:"color-606266 line-18"},[t._v(t._s(t._f("timeStampToHms")(e.row.createTime)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){t.toGroupList(e.$index,e.row)}}},[t._v("分组列表")]),t._v(" "),a("el-button",{attrs:{type:"text"},on:{click:function(a){t.handleEdit(e.$index,e.row)}}},[t._v("编辑")]),t._v(" "),a("el-button",{attrs:{type:"text"},on:{click:function(a){t.handleDel(e.$index,e.row)}}},[t._v("删除")])]}}])})],1),t._v(" "),t.totalCount?a("div",{staticClass:"pagination text-right m-t-14"},[a("dm-pagination",{attrs:{small:"","page-size":t.pageSize,"current-page":t.currentPage,layout:"prev, pager, next",total:t.totalCount},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1):t._e()],1)])]),t._v(" "),a("new-program",{attrs:{editRow:t.editRow,showDialog:t.showDialog},on:{hideDialog:t.hideDialog}})],1)},staticRenderFns:[]};var b=a("VU/8")(D,v,!1,function(t){a("3g/j")},"data-v-35d504dd",null);e.default=b.exports}});
\ No newline at end of file
webpackJsonp([13],{"3NV5":function(M,L){},"6XGN":function(M,L,j){"use strict";Object.defineProperty(L,"__esModule",{value:!0});var N=j("CkW6"),u=j.n(N),w={name:"Page403",data:function(){return{imgNotFound:u.a}},computed:{message:function(){return"抱歉,你无权访问该页面"}}},D={render:function(){var M=this.$createElement,L=this._self._c||M;return L("div",{staticStyle:{background:"#f0f2f5","margin-top":"-20px",height:"100%"}},[L("div",{staticClass:"wscn-http404"},[L("div",{staticClass:"pic-404"},[L("img",{staticClass:"pic-404__parent",attrs:{src:this.imgNotFound,alt:"403"}})]),this._v(" "),L("div",{staticClass:"bullshit"},[L("div",{staticClass:"bullshit__headline"},[this._v("\n "+this._s(this.message)+"\n ")]),this._v(" "),L("a",{staticClass:"bullshit__return-home",attrs:{href:"#/companyGroup"}},[this._v("返回首页")])])])])},staticRenderFns:[]};var C=j("VU/8")(w,D,!1,function(M){j("3NV5")},"data-v-11f769de",null);L.default=C.exports},CkW6:function(M,L){M.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMS4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0i5Zu+5bGCXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgNDAwIDMzNSIgc3R5bGU9ImVuYWJsZS1i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NjMCwwLjctMC42LDEuMy0xLjMsMS4zaC04LjFjLTAuNywwLjEtMS40LTAuNS0xLjQtMS4zDQoJYy0wLjEtMC43LDAuNS0xLjQsMS4zLTEuNEMxOTcsMjcyLjcsMTk3LjEsMjcyLjcsMTk3LjEsMjcyLjciLz4NCjxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0yODQuNCwyNjQuNmg4LjFjMC43LDAsMS4zLDAuNiwxLjMsMS4zbDAsMGMwLDAuNy0wLjYsMS4zLTEuMywxLjNoLTguMWMtMC43LDAtMS4zLTAuNi0xLjMtMS4zDQoJQzI4MywyNjUuMywyODMuNiwyNjQuNiwyODQuNCwyNjQuNiIvPg0KPHBhdGggY2xhc3M9InN0MSIgZD0iTTk5LjIsMjY0LjZoMTcxLjdjMC40LDAsMC43LDAuMSwwLjksMC40YzAuNCwwLjQsMC41LDEsMC4zLDEuNWMtMC4yLDAuNS0wLjcsMC44LTEuMiwwLjhIOTkuMQ0KCWMtMC43LDAtMS4zLTAuNi0xLjMtMS4zQzk3LjgsMjY1LjMsOTguNCwyNjQuNiw5OS4yLDI2NC42Ii8+DQo8cGF0aCBjbGFzcz0ic3QzIiBkPSJNMjM1LDk1Ljh2OC4xYzAsMC43LTAuNiwxLjMtMS4zLDEuM3MtMS4zLTAuNi0xLjMtMS4zdi04LjFjMC0wLjcsMC42LTEuMywxLjMtMS40QzIzNC40LDk0LjQsMjM1LDk1LDIzNSw5NS44Ig0KCS8+DQo8L3N2Zz4NCg=="}});
\ No newline at end of file
webpackJsonp([14],{"/hT8":function(t,e){},"9NXI":function(t,e){},kAqA:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=a("319J"),r=a("mvHQ"),i=a.n(r),n=a("fZjL"),s=a.n(n),c=a("l46T"),l=a("Kkt8"),u=a("P9l9"),d=a("TUB1"),p=a("LlAa"),m={name:"NewEnv",components:{limitInput:c.a,limitTextarea:l.a},props:{showDialog:{type:Boolean,default:!1},editRow:{type:Object,default:function(){return{projectId:"",projectName:"",projectDescribe:""}}}},data:function(){return{customDialog:!1,formData:{projectId:"",projectName:"",projectDescribe:""},rules:{projectName:[{required:!0,message:"请输入项目名称",trigger:"blur"}],projectDescribe:[{required:!0,message:"请输入描述",trigger:"blur"}]}}},mounted:function(){this.customDialog=this.showDialog,s()(this.editRow).length&&(this.formData=JSON.parse(i()(this.editRow)))},methods:{handleClose:function(t){this.$refs.programForm.resetFields(),t(),this.hideDialog()},customCancel:function(){this.$refs.programForm.resetFields(),this.hideDialog()},hideDialog:function(){this.customDialog=!1,this.formData.projectName="",this.formData.projectDescribe="",this.$emit("hideDialog","")},customConfirm:function(t){var e=this;e.formData.projectName=e.formData.projectName?String(e.formData.projectName).replace(/\s+/g,""):"",e.formData.projectDescribe=e.formData.projectDescribe?String(e.formData.projectDescribe).replace(/\s+/g,""):"",e.$refs[t].validate(function(t){if(!t)return!1;e.postEditData()})},postEditData:function(){var t=this,e={projectId:t.formData.projectId,projectName:t.formData.projectName,projectDescribe:t.formData.projectDescribe};Object(u.a)(t.editRow.projectId?"/gateway-manage/update-project":"/gateway-manage/create-project",e).then(function(e){var a=e.data;if("0000"==a.code)return d.a.showmsg("保存成功","success"),void t.setData();p.a.errorMsg(a)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})},setData:function(){var t=this;t.$emit("hideDialog",t.formData),t.$nextTick(function(){t.formData.projectName="",t.formData.projectDescribe=""})}},watch:{showDialog:function(t,e){this.customDialog=t},editRow:function(t,e){s()(t).length&&(this.formData=JSON.parse(i()(t)))}}},h={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"show",rawName:"v-show",value:t.customDialog,expression:"customDialog"}]},[a("el-dialog",{staticClass:"edit-dialog",attrs:{title:t.formData.projectId?"编辑项目":"新建项目",visible:t.customDialog,width:"600px","before-close":t.handleClose},on:{"update:visible":function(e){t.customDialog=e}}},[a("div",{staticClass:"edit-dialog-body"},[a("el-form",{ref:"programForm",attrs:{model:t.formData,"label-width":"94px",rules:t.rules}},[a("el-form-item",{attrs:{label:"项目名称:",prop:"projectName"}},[a("limit-input",{attrs:{"input-width":440,"input-value":t.formData.projectName,holder:"请输入项目名称","get-by-type":"word","max-length":20},on:{"update:inputValue":function(e){t.$set(t.formData,"projectName",e)}}})],1),t._v(" "),a("el-form-item",{attrs:{label:"描述:"}},[a("limit-textarea",{attrs:{"input-width":440,"input-value":t.formData.projectDescribe,holder:"请输入描述内容","get-by-type":"word","max-length":100},on:{"update:inputValue":function(e){t.$set(t.formData,"projectDescribe",e)}}})],1)],1)],1),t._v(" "),a("div",{staticClass:"dialog-footer",staticStyle:{"padding-bottom":"10px"},attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:t.customCancel}},[t._v("\n 取 消\n ")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.customConfirm("programForm")}}},[t._v("\n "+t._s(t.formData.projectId?"保 存":"新 建")+"\n ")])],1)])],1)},staticRenderFns:[]};var f=a("VU/8")(m,h,!1,function(t){a("9NXI")},"data-v-33a94162",null).exports,g=a("jvWE"),D={name:"ApiProgram",components:{navBread:o.a,newProgram:f},data:function(){return{navPath:[{name:"API管理",path:"/apiProgram"},{name:"项目列表",path:""}],searchValue:"",loading:!0,tableData:[],pageSize:20,currentPage:1,totalCount:0,showDialog:!1,editIndex:"",editRow:{}}},mounted:function(){this.$emit("showTab",21),this.getData()},methods:{editProgram:function(){this.showDialog=!0},hideDialog:function(t){if(!t)return this.editIndex="",this.editRow={},this.showDialog=!1,!1;this.currentPage=1,this.getData(),this.editIndex="",this.editRow={},this.showDialog=!1,this.$forceUpdate()},searchData:Object(g.a)(function(t){this.currentPage,this.getData()},500),clearInput:function(){this.currentPage=1,this.getData()},handleSizeChange:function(t){this.pageSize=t,this.getData()},handleCurrentChange:function(t){this.currentPage=t,this.getData()},toGroupList:function(t,e){this.$router.push("/apiProgramGroup?projectId="+e.projectId+"&projectName="+e.projectName)},handleEdit:function(t,e){this.editIndex=t,this.editRow=e,this.showDialog=!0},handleDel:function(t,e){var a=this;a.$confirm("【"+e.projectName+"】下的接口将全部被删除,确认删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){a.postDelData(t,e)}).catch(function(){})},postDelData:function(t,e){var a=this,o={projectId:e.projectId};Object(u.a)("/gateway-manage/delete-project",o).then(function(e){var o=e.data;if("0000"==o.code)return d.a.showmsg("删除成功","success"),void a.tableData.splice(t,1);p.a.errorMsg(o)}).catch(function(t){a.$message.error({duration:1e3,message:t.message})})},getData:function(){var t=this;t.loading=!0;var e={search:t.searchValue,pageSize:t.pageSize,pageNum:t.currentPage};Object(u.a)("/gateway-manage/page-project",e).then(function(e){var a=e.data;if(t.loading=!1,"0000"==a.code)return t.tableData=a.result.result,void(t.totalCount=a.result.totalCount);p.a.errorMsg(a)}).catch(function(e){t.loading=!1,t.$message.error({duration:1e3,message:e.message})})}},watch:{$route:{handler:function(t,e){},deep:!0}}},v={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"api-body-content border-box"},[a("div",{staticClass:"common-nav"},[a("nav-bread",{attrs:{"nav-path":t.navPath}})],1),t._v(" "),a("div",{staticClass:"api-body-main common-body-main border-box"},[a("div",{staticClass:"api-main-content border-box"},[a("div",{staticClass:"search-wrap m-b-20 flex flex-space-between"},[a("el-input",{staticClass:"w-320",attrs:{clearable:"",placeholder:"请输入项目名称"},on:{clear:t.clearInput},nativeOn:{keyup:function(e){return a=e,t.searchData(a);var a}},model:{value:t.searchValue,callback:function(e){t.searchValue=e},expression:"searchValue"}},[a("i",{staticClass:"el-input__icon el-icon-search",attrs:{slot:"prefix"},slot:"prefix"})]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.editProgram}},[t._v("\n 新建项目\n ")])],1),t._v(" "),a("div",{staticClass:"table-wrap"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData}},[a("el-table-column",{attrs:{prop:"projectName",label:"项目名称","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{label:"描述","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.projectDescribe)+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"创建时间","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"color-606266 line-18"},[t._v("\n "+t._s(t._f("timeStampToYmd")(e.row.createTime))+"\n ")]),t._v(" "),a("div",{staticClass:"color-606266 line-18"},[t._v("\n "+t._s(t._f("timeStampToHms")(e.row.createTime))+"\n ")])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){t.toGroupList(e.$index,e.row)}}},[t._v("\n 分组列表\n ")]),t._v(" "),a("el-button",{attrs:{type:"text"},on:{click:function(a){t.handleEdit(e.$index,e.row)}}},[t._v("\n 编辑\n ")]),t._v(" "),a("el-button",{attrs:{type:"text"},on:{click:function(a){t.handleDel(e.$index,e.row)}}},[t._v("\n 删除\n ")])]}}])})],1),t._v(" "),t.totalCount?a("div",{staticClass:"pagination text-right m-t-14"},[a("dm-pagination",{attrs:{small:"","page-size":t.pageSize,"current-page":t.currentPage,layout:"prev, pager, next",total:t.totalCount},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1):t._e()],1)])]),t._v(" "),a("new-program",{attrs:{"edit-row":t.editRow,"show-dialog":t.showDialog},on:{hideDialog:t.hideDialog}})],1)},staticRenderFns:[]};var b=a("VU/8")(D,v,!1,function(t){a("/hT8")},"data-v-017cc9c0",null);e.default=b.exports}});
\ No newline at end of file
webpackJsonp([14],{AejC:function(t,s,i){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var e=i("Minx"),a=i.n(e),n={name:"page404",data:function(){return{img_404:a.a}},computed:{message:function(){return"抱歉,你访问的页面不存在"}},mounted:function(){}},r={render:function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticStyle:{background:"#f0f2f5","margin-top":"-20px",height:"100%"}},[s("div",{staticClass:"wscn-http404"},[s("div",{staticClass:"pic-404"},[s("img",{staticClass:"pic-404__parent",attrs:{src:this.img_404,alt:"404"}})]),this._v(" "),s("div",{staticClass:"bullshit"},[s("div",{staticClass:"bullshit__headline"},[this._v(this._s(this.message))]),this._v(" "),s("a",{staticClass:"bullshit__return-home",attrs:{href:"#/companyGroup"}},[this._v("返回首页")])])])])},staticRenderFns:[]};var c=i("VU/8")(n,r,!1,function(t){i("AsY3")},"data-v-18a2f51c",null);s.default=c.exports},AsY3:function(t,s){},Minx:function(t,s,i){t.exports=i.p+"static/img/error_404.bf58747.svg"}});
\ No newline at end of file
webpackJsonp([15],{hMb6:function(e,t){},vm6Q:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=a("mvHQ"),r=a.n(o),n=a("319J"),s=a("l46T"),l=a("Kkt8"),i=a("P9l9"),c=a("TUB1"),u=a("LlAa"),d={name:"createEnvSet",components:{navBread:n.a,limitInput:s.a,limitTextarea:l.a},data:function(){return{navPath:[{name:"环境管理",path:"/envManage"},{name:"配置列表",path:"/envManage?tabChildid=second"},{name:this.$route.query.backendProxyId?"show"==this.$route.query.envSetFlag?"查看配置":"修改配置":"新增配置",path:""}],formData:{backendProxyId:this.$route.query.backendProxyId||"",proxyType:this.$route.query.proxyType||"0",proxyCode:"",proxyName:"",description:"",envParams:""},rules:{proxyName:[{required:!0,message:"请输入配置名称",trigger:"blur"}],proxyCode:[{required:!0,message:"请输入配置code",trigger:"blur"}]},shoEnvFlag:!1,tableData:[{sceneCode:"",proxyParams:[{balence:"random",url:"",weight:"",zookeeperUrl:""}]}],envOptions:[]}},methods:{showEnvSet:function(){this.shoEnvFlag=!0},toDel:function(e,t,a){if("show"==this.$route.query.envSetFlag)return!1;e.proxyParams.splice(a,1)},toAdd:function(e,t,a){if("show"==this.$route.query.envSetFlag)return!1;e.proxyParams.push({balence:"",url:"",weight:"",zookeeperUrl:""})},handleDel:function(e,t){var a=this;a.$confirm("确定删除该环境?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){a.tableData.splice(e,1)}).catch(function(){})},toAddRow:function(){this.tableData.push({sceneCode:"",proxyParams:[{balence:"",url:"",weight:"",zookeeperUrl:""}]})},handleSave:function(e){var t=this;t.formData.proxyName=String(t.formData.proxyName).replace(/\s+/g,""),t.formData.proxyCode=String(t.formData.proxyCode).replace(/\s+/g,""),t.$refs[e].validate(function(e){if(!e)return!1;t.saveData()})},saveData:function(){var e=this,t=!0,a=!0,o=!0;if(e.tableData.forEach(function(r){""==r.sceneCode&&(t=!1),0==e.formData.proxyType?r.proxyParams.forEach(function(r){!1===/((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3}/g.test(r.url)&&(o=!1),r.weight<1e4||(a=!1),""!=r.url&&""!=r.weight||(t=!1),e.$delete(r,"zookeeperUrl")}):r.proxyParams.forEach(function(a){""==a.zookeeperUrl&&(t=!1),e.$delete(a,"balence"),e.$delete(a,"url"),e.$delete(a,"weight")})}),!t)return e.$message.error({duration:1e3,message:"请完善环境配置"}),!1;if(!a)return e.$message.error({duration:1e3,message:"请填写小于10000以内的权重值"}),!1;if(!o)return e.$message.error({duration:1e3,message:"请填写正确的 IP 地址"}),!1;var n={backendProxyId:e.formData.backendProxyId,proxyType:e.formData.proxyType,proxyName:e.formData.proxyName,proxyCode:e.formData.proxyCode,description:e.formData.description,envParams:e.shoEnvFlag?r()(e.tableData):""};Object(i.b)(e.$route.query.backendProxyId?"/gateway-manage/update-proxy":"/gateway-manage/create-proxy",n).then(function(t){var a=t.data;if("0000"==a.code)return c.a.showmsg("保存成功","success"),void e.$router.push("/envManage?tabChildid=second");u.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getEnvData:function(){var e=this;Object(i.a)("/gateway-manage/list-all-scene",{}).then(function(t){var a=t.data;"0000"!=a.code?u.a.errorMsg(a):e.envOptions=a.result||[]}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getData:function(){var e=this,t={backendProxyId:e.formData.backendProxyId};Object(i.a)("/gateway-manage/get-proxy",t).then(function(t){var a=t.data;if("0000"==a.code){e.formData=a.result;var o=JSON.parse(a.result.envParams);return e.tableData=o,void(e.tableData.length&&(e.shoEnvFlag=!0))}u.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},watch:{$route:{handler:function(e,t){},deep:!0}},mounted:function(){this.$emit("showTab",3),this.getEnvData(),this.$route.query.backendProxyId&&this.getData()}},p={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"api-body-content border-box"},[a("div",{staticClass:"common-nav"},[a("nav-bread",{attrs:{navPath:e.navPath}})],1),e._v(" "),a("div",{staticClass:"api-body-main common-body-main border-box"},[a("div",{staticClass:"api-main-content border-box"},[a("div",{staticClass:"base-set-wrap"},[a("div",{staticClass:"set-title font-14 color-303133"},[e._v("基础配置")]),e._v(" "),a("el-form",{ref:"envForm",attrs:{model:e.formData,"label-width":"94px",rules:e.rules}},[a("el-form-item",{attrs:{label:"参数类型:"}},[e._v("\n "+e._s(0==e.formData.proxyType?"http":"dubbo")+"\n ")]),e._v(" "),a("el-form-item",{attrs:{label:"配置名称:",prop:"proxyName"}},[a("limitInput",{attrs:{inputWidth:440,disflag:"show"==e.$route.query.envSetFlag,inputValue:e.formData.proxyName,holder:"请输入配置名称",getByType:"word",maxLength:20},on:{"update:inputValue":function(t){e.$set(e.formData,"proxyName",t)}}})],1),e._v(" "),a("el-form-item",{attrs:{label:"配置code:",prop:"proxyCode"}},[a("limitInput",{attrs:{inputWidth:440,disflag:!!e.formData.backendProxyId,inputValue:e.formData.proxyCode,holder:"请输入配置code",getByType:"word",maxLength:20},on:{"update:inputValue":function(t){e.$set(e.formData,"proxyCode",t)}}})],1),e._v(" "),a("el-form-item",{attrs:{label:"备注:",prop:"description"}},[a("limit-textarea",{attrs:{disInput:"show"==e.$route.query.envSetFlag,inputWidth:440,inputValue:e.formData.description,holder:"请输入备注内容",getByType:"word",maxLength:100},on:{"update:inputValue":function(t){e.$set(e.formData,"description",t)}}})],1),e._v(" "),e.shoEnvFlag?e._e():a("el-form-item",{attrs:{label:""}},[a("div",{staticClass:"show-set-env",on:{click:e.showEnvSet}},[a("span",{staticClass:"font-14 color-5584FF"},[e._v("添加环境配置")]),a("i",{staticClass:"iconfont iconxiala1 font-14 color-5584FF p-l-10"})])])],1)],1),e._v(" "),e.shoEnvFlag?a("div",{staticClass:"env-set-wrap"},[a("div",{staticClass:"set-title font-14 color-303133"},[e._v("环境配置")]),e._v(" "),a("div",{staticClass:"env-set-body"},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData}},[a("el-table-column",{attrs:{prop:"envName",label:"配置名称","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-select",{attrs:{placeholder:"请选择",disabled:"show"==e.$route.query.envSetFlag},model:{value:t.row.sceneCode,callback:function(a){e.$set(t.row,"sceneCode",a)},expression:"scope.row.sceneCode"}},e._l(e.envOptions,function(e){return a("el-option",{key:e.sceneCode,attrs:{label:e.sceneName,value:e.sceneCode}})}))]}}])}),e._v(" "),0==e.$route.query.proxyType?a("el-table-column",{attrs:{label:"IP地址",width:"550px"},scopedSlots:e._u([{key:"default",fn:function(t){return e._l(t.row.proxyParams,function(o,r){return a("div",{key:r,class:["ip-cell ",0==r?"":"m-t-18"]},[a("el-input",{staticClass:"w-200 font-14",attrs:{placeholder:"请输入ip地址",disabled:"show"==e.$route.query.envSetFlag},model:{value:o.url,callback:function(t){e.$set(o,"url",t)},expression:"item.url"}}),a("el-input",{staticClass:"w-200 font-14 m-l-10",attrs:{placeholder:"请输入权重值",disabled:"show"==e.$route.query.envSetFlag},model:{value:o.weight,callback:function(t){e.$set(o,"weight",t)},expression:"item.weight"}}),e._v(" "),t.row.proxyParams.length>1?a("i",{staticClass:"inline-block vertical-middle pointer el-icon-minus font-14 p-l-10",on:{click:function(a){e.toDel(t.row,t.$index,r)}}}):e._e(),e._v(" "),t.row.proxyParams.length-1==r?a("i",{staticClass:"inline-block vertical-middle pointer el-icon-plus font-14 p-l-10",on:{click:function(a){e.toAdd(t.row,t.$index,r)}}}):e._e()],1)})}}])}):e._e(),e._v(" "),1==e.$route.query.proxyType?a("el-table-column",{attrs:{label:"注册中心",width:"550px"},scopedSlots:e._u([{key:"default",fn:function(t){return e._l(t.row.proxyParams,function(t,o){return a("div",{key:o,class:["ip-cell w-206",0==o?"":"m-t-18"]},[a("el-input",{staticClass:"font-14",attrs:{placeholder:""},model:{value:t.zookeeperUrl,callback:function(a){e.$set(t,"zookeeperUrl",a)},expression:"item.zookeeperUrl"}})],1)})}}])}):e._e(),e._v(" "),a("el-table-column",{attrs:{label:"操作","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e.tableData.length>1?a("el-button",{attrs:{disabled:"show"==e.$route.query.envSetFlag,type:"text"},on:{click:function(a){e.handleDel(t.$index,t.row)}}},[e._v("删除")]):e._e()]}}])})],1)],1),e._v(" "),a("div",{staticClass:"add-row text-center pointer"},[a("el-button",{attrs:{disabled:"show"==e.$route.query.envSetFlag,type:"text"},on:{click:e.toAddRow}},[a("i",{staticClass:"el-icon-circle-plus-outline font-14 color-5584FF"}),a("span",{staticClass:"font-14 color-5584FF p-l-4"},[e._v("添加行")])])],1)]):e._e(),e._v(" "),a("div",{staticClass:"save-wrap",style:{"padding-left":e.shoEnvFlag?"0":"97px"}},[a("el-button",{attrs:{disabled:"show"==e.$route.query.envSetFlag,type:"primary"},on:{click:function(t){e.handleSave("envForm")}}},[e._v("保存")])],1)])])])},staticRenderFns:[]};var m=a("VU/8")(d,p,!1,function(e){a("hMb6")},"data-v-c53f5054",null);t.default=m.exports}});
\ No newline at end of file
webpackJsonp([15],{OEJD:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("319J"),o=a("P9l9"),r=a("jvWE"),l=a("LlAa"),i={name:"ReleaseRecords",components:{navBread:n.a},data:function(){return{navPath:[{name:"发布记录",path:""}],searchValue:"",loading:!0,tableData:[],pageSize:20,currentPage:1,totalCount:0}},mounted:function(){this.$emit("showTab",4),this.getData()},methods:{searchData:Object(r.a)(function(){this.currentPage,this.getData()},500),clearInput:function(){this.currentPage=1,this.getData()},handleSizeChange:function(e){this.pageSize=e,this.getData()},handleCurrentChange:function(e){this.currentPage=e,this.getData()},handleShow:function(e,t){this.$router.push("/apiListManageShow?editFlag=0&interfaceId="+t.interfaceId+"&interfaceName="+t.interfaceName+"&interfaceVersionId="+t.interfaceVersionId+"&publishRecordId="+t.publishRecordId+"&projectId="+t.projectId+"&projectName="+t.projectName+"&interfaceGroupId="+t.interfaceGroupId+"&interfaceGroupName="+t.interfaceGroupName)},getData:function(){var e=this;e.loading=!0;var t={search:e.searchValue,pageNum:e.currentPage,pageSize:e.pageSize};Object(o.a)("/gateway-manage/page-api-publish-record",t).then(function(t){var a=t.data;if(e.loading=!1,"0000"==a.code)return e.tableData=a.result.result||[],void(e.totalCount=a.result.totalCount);l.a.errorMsg(a)}).catch(function(t){e.loading=!1,e.$message.error({duration:1e3,message:t.message})})}},watch:{$route:{handler:function(e,t){},deep:!0}}},s={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"api-body-content border-box"},[a("div",{staticClass:"common-nav"},[a("nav-bread",{attrs:{"nav-path":e.navPath}})],1),e._v(" "),a("div",{staticClass:"api-body-main common-body-main border-box"},[a("div",{staticClass:"api-main-content border-box"},[a("div",{staticClass:"search-wrap m-b-20"},[a("el-input",{staticClass:"w-320",attrs:{clearable:"",placeholder:"请输入版本号/API名称"},on:{clear:e.clearInput},nativeOn:{keyup:function(t){return a=t,e.searchData(a);var a}},model:{value:e.searchValue,callback:function(t){e.searchValue=t},expression:"searchValue"}},[a("i",{staticClass:"el-input__icon el-icon-search",attrs:{slot:"prefix"},slot:"prefix"})])],1),e._v(" "),a("div",{staticClass:"table-wrap"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.tableData}},[a("el-table-column",{attrs:{prop:"publishRecordId",label:"发布版本","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"API名称","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.interfaceName)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"版本号","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.version)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"环境","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.sceneName)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"发布备注","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.remark)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"创建时间","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"color-606266 line-18"},[e._v("\n "+e._s(e._f("timeStampToYmd")(t.row.createTime))+"\n ")]),e._v(" "),a("div",{staticClass:"color-606266 line-18"},[e._v("\n "+e._s(e._f("timeStampToHms")(t.row.createTime))+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){e.handleShow(t.$index,t.row)}}},[e._v("\n 查看\n ")])]}}])})],1),e._v(" "),e.totalCount?a("div",{staticClass:"pagination text-right m-t-14"},[a("dm-pagination",{attrs:{small:"","page-size":e.pageSize,"current-page":e.currentPage,layout:"prev, pager, next",total:e.totalCount},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1):e._e()],1)])])])},staticRenderFns:[]};var c=a("VU/8")(i,s,!1,function(e){a("OHin")},"data-v-ef2af3ec",null);t.default=c.exports},OHin:function(e,t){}});
\ No newline at end of file
webpackJsonp([17],{"60Jx":function(t,a){},K0rJ:function(t,a,i){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=i("319J"),e=i("P9l9"),s=i("PEkr"),o={name:"PluginManage",components:{navBread:n.a,selectEnv:s.a},data:function(){return{navPath:[{name:"插件管理",path:""}],search:"",list:[],showdialog:!1,pluginType:0,pluginId:"",loading:!1}},mounted:function(){this.getList()},methods:{getList:function(){var t=this,a=this,i={search:this.search};this.loading=!0,Object(e.a)("/gateway-manage/plugin/list",i).then(function(a){"0000"==a.data.code?(a.data.result?t.list=a.data.result:t.list=[],t.loading=!1):t.$message.error(a.data.message)}).catch(function(t){a.$message.error({duration:1e3,message:t.message})})},goEnvList:function(t){this.showdialog=!0,this.pluginId=t.pluginId,this.pluginType=t.pluginType},closeDialog:function(){this.showdialog=!1}},watch:{$route:{handler:function(t,a){},deep:!0}}},l={render:function(){var t=this,a=t.$createElement,i=t._self._c||a;return i("div",{staticClass:"api-body-content border-box"},[i("div",{staticClass:"common-nav"},[i("nav-bread",{attrs:{"nav-path":t.navPath}})],1),t._v(" "),i("div",{staticClass:"api-body-main common-body-main border-box"},[i("div",{staticClass:"api-main-content border-box"},[i("el-input",{staticClass:"w-320",attrs:{placeholder:"请输入插件名称","prefix-icon":"el-icon-search",clearable:""},on:{clear:function(a){t.getList()}},nativeOn:{keyup:function(a){if(!("button"in a)&&t._k(a.keyCode,"enter",13,a.key,"Enter"))return null;t.getList()}},model:{value:t.search,callback:function(a){t.search=a},expression:"search"}}),t._v(" "),i("div",{directives:[{name:"loadingh",rawName:"v-loadingh",value:t.loading,expression:"loading"}],staticClass:"list-content"},t._l(t.list,function(a,n){return i("div",{key:n,staticClass:"list-item"},[i("div",{staticClass:"item-top"},[i("span",{staticClass:"icon-content"},[0===a.pluginType?i("i",{staticClass:"iconfont iconahas"}):t._e(),t._v(" "),1===a.pluginType?i("i",{staticClass:"iconfont iconkaifangpingtai"}):t._e()]),t._v(" "),i("div",{staticClass:"item-info"},[i("h3",[t._v("插件名称")]),t._v(" "),i("p",[t._v(t._s(a.pluginName))])])]),t._v(" "),i("div",{staticClass:"item-bottom"},[i("el-button",{attrs:{type:"text"},on:{click:function(i){t.goEnvList(a)}}},[t._v("\n 选择环境进入"),i("i",{staticClass:"iconfont iconjiantou-zuo"})])],1)])}))],1)]),t._v(" "),t.showdialog?i("select-env",{attrs:{"plugin-id":t.pluginId,"plugin-type":t.pluginType},on:{closeDialog:t.closeDialog}}):t._e()],1)},staticRenderFns:[]};var c=i("VU/8")(o,l,!1,function(t){i("60Jx")},"data-v-aca52f8e",null);a.default=c.exports}});
\ No newline at end of file
webpackJsonp([17],{"4FxI":function(e,t){},tiLT:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=a("319J"),n=a("f2i8"),r=a("P9l9"),i=a("jvWE"),l=a("LlAa"),s={name:"apiProgramGroup",components:{navBread:o.a,newApiGroup:n.a},data:function(){return{navPath:[{name:"API管理",path:"/apiProgram"},{name:"API列表",path:""}],projectId:this.$route.query.projectId||"",interfaceGroupId:this.$route.query.interfaceGroupId||"",searchValue:"",targetType:"-1",targetTypeOptions:[{value:"-1",label:"所有"},{value:"0",label:"私有"},{value:"1",label:"公开"}],loading:!0,tableData:[],pageSize:20,currentPage:1,totalCount:0,showDialog:!1,editIndex:"",editRow:{}}},methods:{searchData:Object(i.a)(function(e){this.currentPage,this.getData()},500),clearInput:function(){this.currentPage=1,this.getData()},changeTargetType:function(e){this.currentPage=1,this.getData()},handleSizeChange:function(e){this.pageSize=e,this.getData()},handleCurrentChange:function(e){this.currentPage=e,this.getData()},toApiListManage:function(e,t){this.$router.push("/apiListManage?interfaceId="+t.interfaceId+"&interfaceName="+t.interfaceName+"&projectId="+t.projectId+"&projectName="+t.projectName+"&interfaceGroupId="+t.interfaceGroupId+"&interfaceGroupName="+t.interfaceGroupName)},getData:function(){var e=this;e.loading=!0;var t={projectId:e.projectId,interfaceGroupId:e.interfaceGroupId,search:e.searchValue,target:e.targetType,pageSize:e.pageSize,pageNum:e.currentPage};Object(r.a)("/gateway-manage/page-api",t).then(function(t){var a=t.data;if(e.loading=!1,"0000"==a.code)return e.tableData=a.result.result,void(e.totalCount=a.result.totalCount);l.a.errorMsg(a)}).catch(function(t){e.loading=!1,e.$message.error({duration:1e3,message:t.message})})}},watch:{$route:{handler:function(e,t){},deep:!0}},mounted:function(){this.$emit("showTab",22),this.getData()}},c={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"api-body-content border-box"},[a("div",{staticClass:"common-nav"},[a("nav-bread",{attrs:{navPath:e.navPath}})],1),e._v(" "),a("div",{staticClass:"api-body-main common-body-main border-box"},[a("div",{staticClass:"api-main-content border-box"},[a("div",{staticClass:"search-wrap m-b-20 flex flex-space-between"},[a("div",{staticStyle:{"font-size":"0"}},[a("el-input",{staticClass:"w-320",attrs:{clearable:"",placeholder:"请输入API名称"},on:{clear:e.clearInput},nativeOn:{keyup:function(t){return a=t,e.searchData(a);var a}},model:{value:e.searchValue,callback:function(t){e.searchValue=t},expression:"searchValue"}},[a("i",{staticClass:"el-input__icon el-icon-search",attrs:{slot:"prefix"},slot:"prefix"})]),e._v(" "),a("el-select",{staticClass:"w-137 margin-left10",attrs:{placeholder:"请选择"},on:{change:e.changeTargetType},model:{value:e.targetType,callback:function(t){e.targetType=t},expression:"targetType"}},e._l(e.targetTypeOptions,function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}))],1)]),e._v(" "),a("div",{staticClass:"table-wrap"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.tableData}},[a("el-table-column",{attrs:{prop:"interfaceName",label:"API名称","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"API类型","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s("0"==t.row.interfaceType?"http":"1"==t.row.interfaceType?"dubbo ":"自定义返回")+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"访问路径","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.interfaceUrl)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"访问类型","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.optType)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"项目/分组","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.projectName+"/"+t.row.interfaceGroupName)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"创建时间","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"color-606266 line-18"},[e._v(e._s(e._f("timeStampToYmd")(t.row.createTime)))]),e._v(" "),a("div",{staticClass:"color-606266 line-18"},[e._v(e._s(e._f("timeStampToHms")(t.row.createTime)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){e.toApiListManage(t.$index,t.row)}}},[e._v("管理")])]}}])})],1),e._v(" "),e.totalCount?a("div",{staticClass:"pagination text-right m-t-14"},[a("dm-pagination",{attrs:{small:"","page-size":e.pageSize,"current-page":e.currentPage,layout:"prev, pager, next",total:e.totalCount},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1):e._e()],1)])]),e._v(" "),a("new-api-group",{attrs:{editRow:e.editRow,showDialog:e.showDialog},on:{hideDialog:e.hideDialog}})],1)},staticRenderFns:[]};var u=a("VU/8")(s,c,!1,function(e){a("4FxI")},"data-v-49d3125a",null);t.default=u.exports}});
\ No newline at end of file
webpackJsonp([18],{"G8l+":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a("319J"),o=a("f2i8"),i=a("P9l9"),r=a("jvWE"),s=a("TUB1"),c=a("LlAa"),l={name:"ApiProgramGroup",components:{navBread:n.a,newApiGroup:o.a},data:function(){return{navPath:[{name:"API管理",path:"/apiProgram"},{name:this.$route.query.projectName+"项目列表",path:"/apiProgramGroup"},{name:"分组列表",path:""}],searchValue:"",loading:!0,tableData:[],pageSize:20,currentPage:1,totalCount:0,showDialog:!1,editIndex:"",editRow:{}}},mounted:function(){this.$emit("showTab",21),this.getData()},methods:{createApi:function(t,e){this.$router.push("/createApi?projectId="+e.projectId+"&projectName="+this.$route.query.projectName+"&interfaceGroupId="+e.interfaceGroupId+"&interfaceGroupName="+e.groupName)},editProgram:function(){this.showDialog=!0},hideDialog:function(t){if(!t)return this.editIndex="",this.editRow={},this.showDialog=!1,!1;this.currentPage=1,this.getData(),this.editIndex="",this.editRow={},this.showDialog=!1,this.$forceUpdate()},searchData:Object(r.a)(function(t){this.currentPage,this.getData()},500),clearInput:function(){this.currentPage=1,this.getData()},handleSizeChange:function(t){this.pageSize=t,this.getData()},handleCurrentChange:function(t){this.currentPage=t,this.getData()},toApiList:function(t,e){this.$router.push("/groupApiList?projectId="+e.projectId+"&projectName="+this.$route.query.projectName+"&interfaceGroupId="+e.interfaceGroupId+"&interfaceGroupName="+e.groupName)},handleEdit:function(t,e){this.editIndex=t,this.editRow=e,this.showDialog=!0},handleDel:function(t,e){var a=this;a.$confirm("【"+e.groupName+"】下的接口将全部被删除,确认删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){a.postDelData(t,e)}).catch(function(){})},postDelData:function(t,e){var a=this,n={interfaceGroupId:e.interfaceGroupId};Object(i.a)("/gateway-manage/delete-api-group",n).then(function(e){var n=e.data;if("0000"==n.code)return s.a.showmsg("删除成功","success"),void a.tableData.splice(t,1);c.a.errorMsg(n)}).catch(function(t){a.$message.error({duration:1e3,message:t.message})})},getData:function(){var t=this;t.loading=!0;var e={search:t.searchValue,pageSize:t.pageSize,pageNum:t.currentPage,projectId:t.$route.query.projectId};Object(i.a)("/gateway-manage/page-api-group",e).then(function(e){var a=e.data;if(t.loading=!1,"0000"==a.code)return t.tableData=a.result.result,void(t.totalCount=a.result.totalCount);c.a.errorMsg(a)}).catch(function(e){t.loading=!1,t.$message.error({duration:1e3,message:e.message})})}},watch:{$route:{handler:function(t,e){},deep:!0}}},u={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"api-body-content border-box"},[a("div",{staticClass:"common-nav"},[a("nav-bread",{attrs:{"nav-path":t.navPath}})],1),t._v(" "),a("div",{staticClass:"api-body-main common-body-main border-box"},[a("div",{staticClass:"api-main-content border-box"},[a("div",{staticClass:"search-wrap m-b-20 flex flex-space-between"},[a("el-input",{staticClass:"w-320",attrs:{clearable:"",placeholder:"请输入分组名称"},on:{clear:t.clearInput},nativeOn:{keyup:function(e){return a=e,t.searchData(a);var a}},model:{value:t.searchValue,callback:function(e){t.searchValue=e},expression:"searchValue"}},[a("i",{staticClass:"el-input__icon el-icon-search",attrs:{slot:"prefix"},slot:"prefix"})]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.editProgram}},[t._v("\n 新建分组\n ")])],1),t._v(" "),a("div",{staticClass:"table-wrap"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData}},[a("el-table-column",{attrs:{prop:"groupName",label:"分组名称","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{label:"描述","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.remark)+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"创建时间","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"color-606266 line-18"},[t._v("\n "+t._s(t._f("timeStampToYmd")(e.row.createTime))+"\n ")]),t._v(" "),a("div",{staticClass:"color-606266 line-18"},[t._v("\n "+t._s(t._f("timeStampToHms")(e.row.createTime))+"\n ")])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){t.toApiList(e.$index,e.row)}}},[t._v("\n API列表\n ")]),t._v(" "),a("el-button",{attrs:{type:"text"},on:{click:function(a){t.handleEdit(e.$index,e.row)}}},[t._v("\n 编辑\n ")]),t._v(" "),a("el-button",{attrs:{type:"text"},on:{click:function(a){t.handleDel(e.$index,e.row)}}},[t._v("\n 删除\n ")]),t._v(" "),a("el-button",{attrs:{type:"text"},on:{click:function(a){t.createApi(e.$index,e.row)}}},[t._v("\n 新建API\n ")])]}}])})],1),t._v(" "),t.totalCount?a("div",{staticClass:"pagination text-right m-t-14"},[a("dm-pagination",{attrs:{small:"","page-size":t.pageSize,"current-page":t.currentPage,layout:"prev, pager, next",total:t.totalCount},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1):t._e()],1)])]),t._v(" "),a("new-api-group",{attrs:{"edit-row":t.editRow,"show-dialog":t.showDialog},on:{hideDialog:t.hideDialog}})],1)},staticRenderFns:[]};var p=a("VU/8")(l,u,!1,function(t){a("au+W")},"data-v-7bb899b2",null);e.default=p.exports},"au+W":function(t,e){}});
\ No newline at end of file
webpackJsonp([18],{K0rJ:function(t,i,a){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=a("319J"),e=a("P9l9"),s=a("PEkr"),o={name:"pluginManage",components:{navBread:n.a,selectEnv:s.a},data:function(){return{navPath:[{name:"插件管理",path:""}],search:"",list:[],showdialog:!1,pluginType:0,pluginId:"",loading:!1}},methods:{getList:function(){var t=this,i=this,a={search:this.search};this.loading=!0,Object(e.a)("/gateway-manage/plugin/list",a).then(function(i){"0000"==i.data.code?(i.data.result?t.list=i.data.result:t.list=[],t.loading=!1):t.$message.error(i.data.message)}).catch(function(t){i.$message.error({duration:1e3,message:t.message})})},goEnvList:function(t){this.showdialog=!0,this.pluginId=t.pluginId,this.pluginType=t.pluginType},closeDialog:function(){this.showdialog=!1}},watch:{$route:{handler:function(t,i){},deep:!0}},mounted:function(){this.getList()}},l={render:function(){var t=this,i=t.$createElement,a=t._self._c||i;return a("div",{staticClass:"api-body-content border-box"},[a("div",{staticClass:"common-nav"},[a("nav-bread",{attrs:{navPath:t.navPath}})],1),t._v(" "),a("div",{staticClass:"api-body-main common-body-main border-box"},[a("div",{staticClass:"api-main-content border-box"},[a("el-input",{staticClass:"w-320",attrs:{placeholder:"请输入插件名称","prefix-icon":"el-icon-search",clearable:""},on:{clear:function(i){t.getList()}},nativeOn:{keyup:function(i){if(!("button"in i)&&t._k(i.keyCode,"enter",13,i.key,"Enter"))return null;t.getList()}},model:{value:t.search,callback:function(i){t.search=i},expression:"search"}}),t._v(" "),a("div",{directives:[{name:"loadingh",rawName:"v-loadingh",value:t.loading,expression:"loading"}],staticClass:"list-content"},t._l(t.list,function(i,n){return a("div",{key:n,staticClass:"list-item"},[a("div",{staticClass:"item-top"},[a("span",{staticClass:"icon-content"},[0===i.pluginType?a("i",{staticClass:"iconfont iconahas"}):t._e(),t._v(" "),1===i.pluginType?a("i",{staticClass:"iconfont iconkaifangpingtai"}):t._e()]),t._v(" "),a("div",{staticClass:"item-info"},[a("h3",[t._v("插件名称")]),t._v(" "),a("p",[t._v(t._s(i.pluginName))])])]),t._v(" "),a("div",{staticClass:"item-bottom"},[a("el-button",{attrs:{type:"text"},on:{click:function(a){t.goEnvList(i)}}},[t._v("选择环境进入"),a("i",{staticClass:"iconfont iconjiantou-zuo"})])],1)])}))],1)]),t._v(" "),t.showdialog?a("selectEnv",{attrs:{pluginId:t.pluginId,pluginType:t.pluginType},on:{closeDialog:t.closeDialog}}):t._e()],1)},staticRenderFns:[]};var c=a("VU/8")(o,l,!1,function(t){a("jbD3")},"data-v-2e0e7926",null);i.default=c.exports},jbD3:function(t,i){}});
\ No newline at end of file
webpackJsonp([19],{"6+GR":function(e,t){},vm6Q:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=a("mvHQ"),r=a.n(o),n=a("319J"),s=a("l46T"),l=a("Kkt8"),i=a("P9l9"),c=a("TUB1"),u=a("LlAa"),d={name:"CreateEnvSet",components:{navBread:n.a,limitInput:s.a,limitTextarea:l.a},data:function(){return{navPath:[{name:"环境管理",path:"/envManage"},{name:"配置列表",path:"/envManage?tabChildid=second"},{name:this.$route.query.backendProxyId?"show"==this.$route.query.envSetFlag?"查看配置":"修改配置":"新增配置",path:""}],formData:{backendProxyId:this.$route.query.backendProxyId||"",proxyType:this.$route.query.proxyType||"0",proxyCode:"",proxyName:"",description:"",envParams:""},rules:{proxyName:[{required:!0,message:"请输入配置名称",trigger:"blur"}],proxyCode:[{required:!0,message:"请输入配置code",trigger:"blur"}]},shoEnvFlag:!1,tableData:[{sceneCode:"",proxyParams:[{balence:"random",url:"",weight:"",zookeeperUrl:""}]}],envOptions:[]}},mounted:function(){this.$emit("showTab",3),this.getEnvData(),this.$route.query.backendProxyId&&this.getData()},methods:{showEnvSet:function(){this.shoEnvFlag=!0},toDel:function(e,t,a){if("show"==this.$route.query.envSetFlag)return!1;e.proxyParams.splice(a,1)},toAdd:function(e,t,a){if("show"==this.$route.query.envSetFlag)return!1;e.proxyParams.push({balence:"",url:"",weight:"",zookeeperUrl:""})},handleDel:function(e,t){var a=this;a.$confirm("确定删除该环境?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){a.tableData.splice(e,1)}).catch(function(){})},toAddRow:function(){this.tableData.push({sceneCode:"",proxyParams:[{balence:"",url:"",weight:"",zookeeperUrl:""}]})},handleSave:function(e){var t=this;t.formData.proxyName=String(t.formData.proxyName).replace(/\s+/g,""),t.formData.proxyCode=String(t.formData.proxyCode).replace(/\s+/g,""),t.$refs[e].validate(function(e){if(!e)return!1;t.saveData()})},saveData:function(){var e=this,t=!0,a=!0,o=!0;if(e.tableData.forEach(function(r){""==r.sceneCode&&(t=!1),0==e.formData.proxyType?r.proxyParams.forEach(function(r){!1===/((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3}/g.test(r.url)&&(o=!1),r.weight<1e4||(a=!1),""!=r.url&&""!=r.weight||(t=!1),e.$delete(r,"zookeeperUrl")}):r.proxyParams.forEach(function(a){""==a.zookeeperUrl&&(t=!1),e.$delete(a,"balence"),e.$delete(a,"url"),e.$delete(a,"weight")})}),!t)return e.$message.error({duration:1e3,message:"请完善环境配置"}),!1;if(!a)return e.$message.error({duration:1e3,message:"请填写小于10000以内的权重值"}),!1;if(!o)return e.$message.error({duration:1e3,message:"请填写正确的 IP 地址"}),!1;var n={backendProxyId:e.formData.backendProxyId,proxyType:e.formData.proxyType,proxyName:e.formData.proxyName,proxyCode:e.formData.proxyCode,description:e.formData.description,envParams:e.shoEnvFlag?r()(e.tableData):""};Object(i.b)(e.$route.query.backendProxyId?"/gateway-manage/update-proxy":"/gateway-manage/create-proxy",n).then(function(t){var a=t.data;if("0000"==a.code)return c.a.showmsg("保存成功","success"),void e.$router.push("/envManage?tabChildid=second");u.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getEnvData:function(){var e=this;Object(i.a)("/gateway-manage/list-all-scene",{}).then(function(t){var a=t.data;"0000"!=a.code?u.a.errorMsg(a):e.envOptions=a.result||[]}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getData:function(){var e=this,t={backendProxyId:e.formData.backendProxyId};Object(i.a)("/gateway-manage/get-proxy",t).then(function(t){var a=t.data;if("0000"==a.code){e.formData=a.result;var o=JSON.parse(a.result.envParams);return e.tableData=o,void(e.tableData.length&&(e.shoEnvFlag=!0))}u.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},watch:{$route:{handler:function(e,t){},deep:!0}}},p={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"api-body-content border-box"},[a("div",{staticClass:"common-nav"},[a("nav-bread",{attrs:{"nav-path":e.navPath}})],1),e._v(" "),a("div",{staticClass:"api-body-main common-body-main border-box"},[a("div",{staticClass:"api-main-content border-box"},[a("div",{staticClass:"base-set-wrap"},[a("div",{staticClass:"set-title font-14 color-303133"},[e._v("\n 基础配置\n ")]),e._v(" "),a("el-form",{ref:"envForm",attrs:{model:e.formData,"label-width":"94px",rules:e.rules}},[a("el-form-item",{attrs:{label:"参数类型:"}},[e._v("\n "+e._s(0==e.formData.proxyType?"http":"dubbo")+"\n ")]),e._v(" "),a("el-form-item",{attrs:{label:"配置名称:",prop:"proxyName"}},[a("limit-input",{attrs:{"input-width":440,disflag:"show"==e.$route.query.envSetFlag,"input-value":e.formData.proxyName,holder:"请输入配置名称","get-by-type":"word","max-length":20},on:{"update:inputValue":function(t){e.$set(e.formData,"proxyName",t)}}})],1),e._v(" "),a("el-form-item",{attrs:{label:"配置code:",prop:"proxyCode"}},[a("limit-input",{attrs:{"input-width":440,disflag:!!e.formData.backendProxyId,"input-value":e.formData.proxyCode,holder:"请输入配置code","get-by-type":"word","max-length":20},on:{"update:inputValue":function(t){e.$set(e.formData,"proxyCode",t)}}})],1),e._v(" "),a("el-form-item",{attrs:{label:"备注:",prop:"description"}},[a("limit-textarea",{attrs:{"dis-input":"show"==e.$route.query.envSetFlag,"input-width":440,"input-value":e.formData.description,holder:"请输入备注内容","get-by-type":"word","max-length":100},on:{"update:inputValue":function(t){e.$set(e.formData,"description",t)}}})],1),e._v(" "),e.shoEnvFlag?e._e():a("el-form-item",{attrs:{label:""}},[a("div",{staticClass:"show-set-env",on:{click:e.showEnvSet}},[a("span",{staticClass:"font-14 color-5584FF"},[e._v("添加环境配置")]),a("i",{staticClass:"iconfont iconxiala1 font-14 color-5584FF p-l-10"})])])],1)],1),e._v(" "),e.shoEnvFlag?a("div",{staticClass:"env-set-wrap"},[a("div",{staticClass:"set-title font-14 color-303133"},[e._v("\n 环境配置\n ")]),e._v(" "),a("div",{staticClass:"env-set-body"},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData}},[a("el-table-column",{attrs:{prop:"envName",label:"配置名称","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-select",{attrs:{placeholder:"请选择",disabled:"show"==e.$route.query.envSetFlag},model:{value:t.row.sceneCode,callback:function(a){e.$set(t.row,"sceneCode",a)},expression:"scope.row.sceneCode"}},e._l(e.envOptions,function(e){return a("el-option",{key:e.sceneCode,attrs:{label:e.sceneName,value:e.sceneCode}})}))]}}])}),e._v(" "),0==e.$route.query.proxyType?a("el-table-column",{attrs:{label:"IP地址",width:"550px"},scopedSlots:e._u([{key:"default",fn:function(t){return e._l(t.row.proxyParams,function(o,r){return a("div",{key:r,class:["ip-cell ",0==r?"":"m-t-18"]},[a("el-input",{staticClass:"w-200 font-14",attrs:{placeholder:"请输入ip地址",disabled:"show"==e.$route.query.envSetFlag},model:{value:o.url,callback:function(t){e.$set(o,"url",t)},expression:"item.url"}}),a("el-input",{staticClass:"w-200 font-14 m-l-10",attrs:{placeholder:"请输入权重值",disabled:"show"==e.$route.query.envSetFlag},model:{value:o.weight,callback:function(t){e.$set(o,"weight",t)},expression:"item.weight"}}),e._v(" "),t.row.proxyParams.length>1?a("i",{staticClass:"inline-block vertical-middle pointer el-icon-minus font-14 p-l-10",on:{click:function(a){e.toDel(t.row,t.$index,r)}}}):e._e(),e._v(" "),t.row.proxyParams.length-1==r?a("i",{staticClass:"inline-block vertical-middle pointer el-icon-plus font-14 p-l-10",on:{click:function(a){e.toAdd(t.row,t.$index,r)}}}):e._e()],1)})}}])}):e._e(),e._v(" "),1==e.$route.query.proxyType?a("el-table-column",{attrs:{label:"注册中心",width:"550px"},scopedSlots:e._u([{key:"default",fn:function(t){return e._l(t.row.proxyParams,function(t,o){return a("div",{key:o,class:["ip-cell w-206",0==o?"":"m-t-18"]},[a("el-input",{staticClass:"font-14",attrs:{placeholder:""},model:{value:t.zookeeperUrl,callback:function(a){e.$set(t,"zookeeperUrl",a)},expression:"item.zookeeperUrl"}})],1)})}}])}):e._e(),e._v(" "),a("el-table-column",{attrs:{label:"操作","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e.tableData.length>1?a("el-button",{attrs:{disabled:"show"==e.$route.query.envSetFlag,type:"text"},on:{click:function(a){e.handleDel(t.$index,t.row)}}},[e._v("\n 删除\n ")]):e._e()]}}])})],1)],1),e._v(" "),a("div",{staticClass:"add-row text-center pointer"},[a("el-button",{attrs:{disabled:"show"==e.$route.query.envSetFlag,type:"text"},on:{click:e.toAddRow}},[a("i",{staticClass:"el-icon-circle-plus-outline font-14 color-5584FF"}),a("span",{staticClass:"font-14 color-5584FF p-l-4"},[e._v("添加行")])])],1)]):e._e(),e._v(" "),a("div",{staticClass:"save-wrap",style:{"padding-left":e.shoEnvFlag?"0":"97px"}},[a("el-button",{attrs:{disabled:"show"==e.$route.query.envSetFlag,type:"primary"},on:{click:function(t){e.handleSave("envForm")}}},[e._v("\n 保存\n ")])],1)])])])},staticRenderFns:[]};var m=a("VU/8")(d,p,!1,function(e){a("6+GR")},"data-v-7207d56f",null);t.default=m.exports}});
\ No newline at end of file
webpackJsonp([19],{"GC/1":function(e,t){},OEJD:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("319J"),o=a("P9l9"),r=a("jvWE"),l=a("LlAa"),i={name:"releaseRecords",components:{navBread:n.a},data:function(){return{navPath:[{name:"发布记录",path:""}],searchValue:"",loading:!0,tableData:[],pageSize:20,currentPage:1,totalCount:0}},methods:{searchData:Object(r.a)(function(e){this.currentPage,this.getData()},500),clearInput:function(){this.currentPage=1,this.getData()},handleSizeChange:function(e){this.pageSize=e,this.getData()},handleCurrentChange:function(e){this.currentPage=e,this.getData()},handleShow:function(e,t){this.$router.push("/apiListManageShow?editFlag=0&interfaceId="+t.interfaceId+"&interfaceName="+t.interfaceName+"&interfaceVersionId="+t.interfaceVersionId+"&publishRecordId="+t.publishRecordId+"&projectId="+t.projectId+"&projectName="+t.projectName+"&interfaceGroupId="+t.interfaceGroupId+"&interfaceGroupName="+t.interfaceGroupName)},getData:function(){var e=this;e.loading=!0;var t={search:e.searchValue,pageNum:e.currentPage,pageSize:e.pageSize};Object(o.a)("/gateway-manage/page-api-publish-record",t).then(function(t){var a=t.data;if(e.loading=!1,"0000"==a.code)return e.tableData=a.result.result||[],void(e.totalCount=a.result.totalCount);l.a.errorMsg(a)}).catch(function(t){e.loading=!1,e.$message.error({duration:1e3,message:t.message})})}},watch:{$route:{handler:function(e,t){},deep:!0}},mounted:function(){this.$emit("showTab",4),this.getData()}},s={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"api-body-content border-box"},[a("div",{staticClass:"common-nav"},[a("nav-bread",{attrs:{navPath:e.navPath}})],1),e._v(" "),a("div",{staticClass:"api-body-main common-body-main border-box"},[a("div",{staticClass:"api-main-content border-box"},[a("div",{staticClass:"search-wrap m-b-20"},[a("el-input",{staticClass:"w-320",attrs:{clearable:"",placeholder:"请输入版本号/API名称"},on:{clear:e.clearInput},nativeOn:{keyup:function(t){return a=t,e.searchData(a);var a}},model:{value:e.searchValue,callback:function(t){e.searchValue=t},expression:"searchValue"}},[a("i",{staticClass:"el-input__icon el-icon-search",attrs:{slot:"prefix"},slot:"prefix"})])],1),e._v(" "),a("div",{staticClass:"table-wrap"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.tableData}},[a("el-table-column",{attrs:{prop:"publishRecordId",label:"发布版本","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"API名称","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.interfaceName)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"版本号","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.version)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"环境","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.sceneName)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"发布备注","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.remark)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"创建时间","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"color-606266 line-18"},[e._v(e._s(e._f("timeStampToYmd")(t.row.createTime)))]),e._v(" "),a("div",{staticClass:"color-606266 line-18"},[e._v(e._s(e._f("timeStampToHms")(t.row.createTime)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){e.handleShow(t.$index,t.row)}}},[e._v("查看")])]}}])})],1),e._v(" "),e.totalCount?a("div",{staticClass:"pagination text-right m-t-14"},[a("dm-pagination",{attrs:{small:"","page-size":e.pageSize,"current-page":e.currentPage,layout:"prev, pager, next",total:e.totalCount},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1):e._e()],1)])])])},staticRenderFns:[]};var c=a("VU/8")(i,s,!1,function(e){a("GC/1")},"data-v-2ba52231",null);t.default=c.exports}});
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
webpackJsonp([20],{EBdF:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("319J"),r=a("P9l9"),o={name:"Overview",components:{navBread:n.a},data:function(){return{navPath:[{name:"概览",path:""}]}},mounted:function(){this.$emit("showTab",1)},methods:{getData:function(){var e=this,t={project:e.repProjectName,router:e.pathName,requestProject:e.repProjectName};Object(r.a)("/haoban-manage-web/menu-detail",t).then(function(t){var a=t.data;if(1==a.errorCode)return a.result?void 0:void e.$message.error({duration:1e3,message:"暂无数据"});e.$message.error({duration:1e3,message:a.message})}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},watch:{$route:{handler:function(e,t){},deep:!0}}},s={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"api-body-content border-box"},[t("div",{staticClass:"common-nav"},[t("nav-bread",{attrs:{"nav-path":this.navPath}})],1),this._v(" "),this._m(0)])},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"api-body-main common-body-main border-box"},[t("div",{staticClass:"api-main-content border-box"})])}]};var i=a("VU/8")(o,s,!1,function(e){a("fv92")},"data-v-591420e4",null);t.default=i.exports},fv92:function(e,t){}});
\ No newline at end of file
webpackJsonp([20],{"G8l+":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=a("319J"),n=a("f2i8"),i=a("P9l9"),r=a("jvWE"),s=a("TUB1"),c=a("LlAa"),l={name:"apiProgramGroup",components:{navBread:o.a,newApiGroup:n.a},data:function(){return{navPath:[{name:"API管理",path:"/apiProgram"},{name:this.$route.query.projectName+"项目列表",path:"/apiProgramGroup"},{name:"分组列表",path:""}],searchValue:"",loading:!0,tableData:[],pageSize:20,currentPage:1,totalCount:0,showDialog:!1,editIndex:"",editRow:{}}},methods:{createApi:function(t,e){this.$router.push("/createApi?projectId="+e.projectId+"&projectName="+this.$route.query.projectName+"&interfaceGroupId="+e.interfaceGroupId+"&interfaceGroupName="+e.groupName)},editProgram:function(){this.showDialog=!0},hideDialog:function(t){if(!t)return this.editIndex="",this.editRow={},this.showDialog=!1,!1;this.currentPage=1,this.getData(),this.editIndex="",this.editRow={},this.showDialog=!1,this.$forceUpdate()},searchData:Object(r.a)(function(t){this.currentPage,this.getData()},500),clearInput:function(){this.currentPage=1,this.getData()},handleSizeChange:function(t){this.pageSize=t,this.getData()},handleCurrentChange:function(t){this.currentPage=t,this.getData()},toApiList:function(t,e){this.$router.push("/groupApiList?projectId="+e.projectId+"&projectName="+this.$route.query.projectName+"&interfaceGroupId="+e.interfaceGroupId+"&interfaceGroupName="+e.groupName)},handleEdit:function(t,e){this.editIndex=t,this.editRow=e,this.showDialog=!0},handleDel:function(t,e){var a=this;a.$confirm("【"+e.groupName+"】下的接口将全部被删除,确认删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){a.postDelData(t,e)}).catch(function(){})},postDelData:function(t,e){var a=this,o={interfaceGroupId:e.interfaceGroupId};Object(i.a)("/gateway-manage/delete-api-group",o).then(function(e){var o=e.data;if("0000"==o.code)return s.a.showmsg("删除成功","success"),void a.tableData.splice(t,1);c.a.errorMsg(o)}).catch(function(t){a.$message.error({duration:1e3,message:t.message})})},getData:function(){var t=this;t.loading=!0;var e={search:t.searchValue,pageSize:t.pageSize,pageNum:t.currentPage,projectId:t.$route.query.projectId};Object(i.a)("/gateway-manage/page-api-group",e).then(function(e){var a=e.data;if(t.loading=!1,"0000"==a.code)return t.tableData=a.result.result,void(t.totalCount=a.result.totalCount);c.a.errorMsg(a)}).catch(function(e){t.loading=!1,t.$message.error({duration:1e3,message:e.message})})}},watch:{$route:{handler:function(t,e){},deep:!0}},mounted:function(){this.$emit("showTab",21),this.getData()}},u={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"api-body-content border-box"},[a("div",{staticClass:"common-nav"},[a("nav-bread",{attrs:{navPath:t.navPath}})],1),t._v(" "),a("div",{staticClass:"api-body-main common-body-main border-box"},[a("div",{staticClass:"api-main-content border-box"},[a("div",{staticClass:"search-wrap m-b-20 flex flex-space-between"},[a("el-input",{staticClass:"w-320",attrs:{clearable:"",placeholder:"请输入分组名称"},on:{clear:t.clearInput},nativeOn:{keyup:function(e){return a=e,t.searchData(a);var a}},model:{value:t.searchValue,callback:function(e){t.searchValue=e},expression:"searchValue"}},[a("i",{staticClass:"el-input__icon el-icon-search",attrs:{slot:"prefix"},slot:"prefix"})]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.editProgram}},[t._v("新建分组")])],1),t._v(" "),a("div",{staticClass:"table-wrap"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData}},[a("el-table-column",{attrs:{prop:"groupName",label:"分组名称","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{label:"描述","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.remark)+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"创建时间","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"color-606266 line-18"},[t._v(t._s(t._f("timeStampToYmd")(e.row.createTime)))]),t._v(" "),a("div",{staticClass:"color-606266 line-18"},[t._v(t._s(t._f("timeStampToHms")(e.row.createTime)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){t.toApiList(e.$index,e.row)}}},[t._v("API列表")]),t._v(" "),a("el-button",{attrs:{type:"text"},on:{click:function(a){t.handleEdit(e.$index,e.row)}}},[t._v("编辑")]),t._v(" "),a("el-button",{attrs:{type:"text"},on:{click:function(a){t.handleDel(e.$index,e.row)}}},[t._v("删除")]),t._v(" "),a("el-button",{attrs:{type:"text"},on:{click:function(a){t.createApi(e.$index,e.row)}}},[t._v("新建API")])]}}])})],1),t._v(" "),t.totalCount?a("div",{staticClass:"pagination text-right m-t-14"},[a("dm-pagination",{attrs:{small:"","page-size":t.pageSize,"current-page":t.currentPage,layout:"prev, pager, next",total:t.totalCount},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1):t._e()],1)])]),t._v(" "),a("new-api-group",{attrs:{editRow:t.editRow,showDialog:t.showDialog},on:{hideDialog:t.hideDialog}})],1)},staticRenderFns:[]};var d=a("VU/8")(l,u,!1,function(t){a("m/1A")},"data-v-2354eed0",null);e.default=d.exports},"m/1A":function(t,e){}});
\ No newline at end of file
webpackJsonp([21],{EBdF:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("319J"),r=a("P9l9"),o={name:"overview",components:{navBread:n.a},data:function(){return{navPath:[{name:"概览",path:""}]}},methods:{getData:function(){var e=this,t={project:e.repProjectName,router:e.pathName,requestProject:e.repProjectName};Object(r.a)("/haoban-manage-web/menu-detail",t).then(function(t){var a=t.data;if(1==a.errorCode)return a.result?void 0:void e.$message.error({duration:1e3,message:"暂无数据"});e.$message.error({duration:1e3,message:a.message})}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},watch:{$route:{handler:function(e,t){},deep:!0}},mounted:function(){this.$emit("showTab",1)}},s={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"api-body-content border-box"},[t("div",{staticClass:"common-nav"},[t("nav-bread",{attrs:{navPath:this.navPath}})],1),this._v(" "),this._m(0)])},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"api-body-main common-body-main border-box"},[t("div",{staticClass:"api-main-content border-box"})])}]};var i=a("VU/8")(o,s,!1,function(e){a("rypi")},"data-v-1c210dc8",null);t.default=i.exports},rypi:function(e,t){}});
\ No newline at end of file
webpackJsonp([21],{"2BYX":function(e,t){},tiLT:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("319J"),o=a("f2i8"),r=a("P9l9"),i=a("jvWE"),l=a("LlAa"),s={name:"ApiProgramGroup",components:{navBread:n.a,newApiGroup:o.a},data:function(){return{navPath:[{name:"API管理",path:"/apiProgram"},{name:"API列表",path:""}],projectId:this.$route.query.projectId||"",interfaceGroupId:this.$route.query.interfaceGroupId||"",searchValue:"",targetType:"-1",targetTypeOptions:[{value:"-1",label:"所有"},{value:"0",label:"私有"},{value:"1",label:"公开"}],loading:!0,tableData:[],pageSize:20,currentPage:1,totalCount:0,showDialog:!1,editIndex:"",editRow:{}}},mounted:function(){this.$emit("showTab",22),this.getData()},methods:{searchData:Object(i.a)(function(){this.currentPage,this.getData()},500),clearInput:function(){this.currentPage=1,this.getData()},changeTargetType:function(){this.currentPage=1,this.getData()},handleSizeChange:function(e){this.pageSize=e,this.getData()},handleCurrentChange:function(e){this.currentPage=e,this.getData()},toApiListManage:function(e,t){this.$router.push("/apiListManage?interfaceId="+t.interfaceId+"&interfaceName="+t.interfaceName+"&projectId="+t.projectId+"&projectName="+t.projectName+"&interfaceGroupId="+t.interfaceGroupId+"&interfaceGroupName="+t.interfaceGroupName)},getData:function(){var e=this;e.loading=!0;var t={projectId:e.projectId,interfaceGroupId:e.interfaceGroupId,search:e.searchValue,target:e.targetType,pageSize:e.pageSize,pageNum:e.currentPage};Object(r.a)("/gateway-manage/page-api",t).then(function(t){var a=t.data;if(e.loading=!1,"0000"==a.code)return e.tableData=a.result.result,void(e.totalCount=a.result.totalCount);l.a.errorMsg(a)}).catch(function(t){e.loading=!1,e.$message.error({duration:1e3,message:t.message})})}},watch:{$route:{handler:function(e,t){},deep:!0}}},c={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"api-body-content border-box"},[a("div",{staticClass:"common-nav"},[a("nav-bread",{attrs:{"nav-path":e.navPath}})],1),e._v(" "),a("div",{staticClass:"api-body-main common-body-main border-box"},[a("div",{staticClass:"api-main-content border-box"},[a("div",{staticClass:"search-wrap m-b-20 flex flex-space-between"},[a("div",{staticStyle:{"font-size":"0"}},[a("el-input",{staticClass:"w-320",attrs:{clearable:"",placeholder:"请输入API名称"},on:{clear:e.clearInput},nativeOn:{keyup:function(t){return a=t,e.searchData(a);var a}},model:{value:e.searchValue,callback:function(t){e.searchValue=t},expression:"searchValue"}},[a("i",{staticClass:"el-input__icon el-icon-search",attrs:{slot:"prefix"},slot:"prefix"})]),e._v(" "),a("el-select",{staticClass:"w-137 margin-left10",attrs:{placeholder:"请选择"},on:{change:e.changeTargetType},model:{value:e.targetType,callback:function(t){e.targetType=t},expression:"targetType"}},e._l(e.targetTypeOptions,function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}))],1)]),e._v(" "),a("div",{staticClass:"table-wrap"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.tableData}},[a("el-table-column",{attrs:{prop:"interfaceName",label:"API名称","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"API类型","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s("0"==t.row.interfaceType?"http":"1"==t.row.interfaceType?"dubbo ":"自定义返回")+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"访问路径","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.interfaceUrl)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"访问类型","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.optType)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"项目/分组","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.projectName+"/"+t.row.interfaceGroupName)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"创建时间","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"color-606266 line-18"},[e._v("\n "+e._s(e._f("timeStampToYmd")(t.row.createTime))+"\n ")]),e._v(" "),a("div",{staticClass:"color-606266 line-18"},[e._v("\n "+e._s(e._f("timeStampToHms")(t.row.createTime))+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){e.toApiListManage(t.$index,t.row)}}},[e._v("\n 管理\n ")])]}}])})],1),e._v(" "),e.totalCount?a("div",{staticClass:"pagination text-right m-t-14"},[a("dm-pagination",{attrs:{small:"","page-size":e.pageSize,"current-page":e.currentPage,layout:"prev, pager, next",total:e.totalCount},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1):e._e()],1)])]),e._v(" "),a("new-api-group",{attrs:{"edit-row":e.editRow,"show-dialog":e.showDialog},on:{hideDialog:e.hideDialog}})],1)},staticRenderFns:[]};var u=a("VU/8")(s,c,!1,function(e){a("2BYX")},"data-v-3c6f5da9",null);t.default=u.exports}});
\ No newline at end of file
webpackJsonp([22],{A1JT:function(e,t){},S82n:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a("319J"),o=a("f2i8"),n=a("P9l9"),i=a("jvWE"),l=a("LlAa"),s={name:"apiProgramGroup",components:{navBread:r.a,newApiGroup:o.a},data:function(){return{navPath:[{name:"API管理",path:"/apiProgram"},{name:this.$route.query.projectName+"项目列表",path:"/apiProgramGroup"},{name:this.$route.query.interfaceGroupName+"分组列表",path:"/groupApiList"},{name:"API列表",path:""}],projectId:this.$route.query.projectId||"",interfaceGroupId:this.$route.query.interfaceGroupId||"",searchValue:"",targetType:"-1",targetTypeOptions:[{value:"-1",label:"所有"},{value:"0",label:"私有"},{value:"1",label:"公开"}],loading:!0,tableData:[],pageSize:20,currentPage:1,totalCount:0,showDialog:!1,editIndex:"",editRow:{}}},methods:{searchData:Object(i.a)(function(e){this.currentPage,this.getData()},500),clearInput:function(){this.currentPage=1,this.getData()},changeTargetType:function(e){this.currentPage=1,this.getData()},createApi:function(){this.$router.push("/createApi?projectId="+this.$route.query.projectId+"&projectName="+this.$route.query.projectName+"&interfaceGroupId="+this.$route.query.interfaceGroupId+"&interfaceGroupName="+this.$route.query.interfaceGroupName)},handleSizeChange:function(e){this.pageSize=e,this.getData()},handleCurrentChange:function(e){this.currentPage=e,this.getData()},toApiListManage:function(e,t){this.$router.push("/apiListManage?interfaceId="+t.interfaceId+"&interfaceName="+t.interfaceName+"&projectId="+t.projectId+"&projectName="+t.projectName+"&interfaceGroupId="+t.interfaceGroupId+"&interfaceGroupName="+t.interfaceGroupName)},getData:function(){var e=this;e.loading=!0;var t={projectId:e.projectId,interfaceGroupId:e.interfaceGroupId,search:e.searchValue,target:e.targetType,pageSize:e.pageSize,pageNum:e.currentPage};Object(n.a)("/gateway-manage/page-api",t).then(function(t){var a=t.data;if(e.loading=!1,"0000"==a.code)return e.tableData=a.result.result,void(e.totalCount=a.result.totalCount);l.a.errorMsg(a)}).catch(function(t){e.loading=!1,e.$message.error({duration:1e3,message:t.message})})}},watch:{$route:{handler:function(e,t){},deep:!0}},mounted:function(){this.$emit("showTab",21),this.getData()}},c={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"api-body-content border-box"},[a("div",{staticClass:"common-nav"},[a("nav-bread",{attrs:{navPath:e.navPath}})],1),e._v(" "),a("div",{staticClass:"api-body-main common-body-main border-box"},[a("div",{staticClass:"api-main-content border-box"},[a("div",{staticClass:"search-wrap m-b-20 flex flex-space-between"},[a("div",{staticStyle:{"font-size":"0"}},[a("el-input",{staticClass:"w-320",attrs:{clearable:"",placeholder:"请输入API名称"},on:{clear:e.clearInput},nativeOn:{keyup:function(t){return a=t,e.searchData(a);var a}},model:{value:e.searchValue,callback:function(t){e.searchValue=t},expression:"searchValue"}},[a("i",{staticClass:"el-input__icon el-icon-search",attrs:{slot:"prefix"},slot:"prefix"})]),e._v(" "),a("el-select",{staticClass:"w-137 margin-left10",attrs:{placeholder:"请选择"},on:{change:e.changeTargetType},model:{value:e.targetType,callback:function(t){e.targetType=t},expression:"targetType"}},e._l(e.targetTypeOptions,function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}))],1),e._v(" "),e.$route.query.projectName&&e.$route.query.interfaceGroupId?a("div",[a("el-button",{attrs:{type:"primary"},on:{click:e.createApi}},[e._v("创建API")])],1):e._e()]),e._v(" "),a("div",{staticClass:"table-wrap"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.tableData}},[a("el-table-column",{attrs:{prop:"interfaceName",label:"API名称","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"API类型","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s("0"==t.row.interfaceType?"http":"1"==t.row.interfaceType?"dubbo ":"自定义返回")+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"访问路径","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.interfaceUrl)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"访问类型","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.optType)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"项目/分组","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.projectName+"/"+t.row.interfaceGroupName)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"创建时间","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"color-606266 line-18"},[e._v(e._s(e._f("timeStampToYmd")(t.row.createTime)))]),e._v(" "),a("div",{staticClass:"color-606266 line-18"},[e._v(e._s(e._f("timeStampToHms")(t.row.createTime)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){e.toApiListManage(t.$index,t.row)}}},[e._v("管理")])]}}])})],1),e._v(" "),e.totalCount?a("div",{staticClass:"pagination text-right m-t-14"},[a("dm-pagination",{attrs:{small:"","page-size":e.pageSize,"current-page":e.currentPage,layout:"prev, pager, next",total:e.totalCount},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1):e._e()],1)])]),e._v(" "),a("new-api-group",{attrs:{editRow:e.editRow,showDialog:e.showDialog},on:{hideDialog:e.hideDialog}})],1)},staticRenderFns:[]};var u=a("VU/8")(s,c,!1,function(e){a("A1JT")},"data-v-0fd1f024",null);t.default=u.exports}});
\ No newline at end of file
webpackJsonp([22],{Hhbt:function(e,t){},S82n:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a("319J"),o=a("f2i8"),n=a("P9l9"),i=a("jvWE"),l=a("LlAa"),s={name:"ApiProgramGroup",components:{navBread:r.a,newApiGroup:o.a},data:function(){return{navPath:[{name:"API管理",path:"/apiProgram"},{name:this.$route.query.projectName+"项目列表",path:"/apiProgramGroup"},{name:this.$route.query.interfaceGroupName+"分组列表",path:"/groupApiList"},{name:"API列表",path:""}],projectId:this.$route.query.projectId||"",interfaceGroupId:this.$route.query.interfaceGroupId||"",searchValue:"",targetType:"-1",targetTypeOptions:[{value:"-1",label:"所有"},{value:"0",label:"私有"},{value:"1",label:"公开"}],loading:!0,tableData:[],pageSize:20,currentPage:1,totalCount:0,showDialog:!1,editIndex:"",editRow:{}}},mounted:function(){this.$emit("showTab",21),this.getData()},methods:{searchData:Object(i.a)(function(){this.currentPage,this.getData()},500),clearInput:function(){this.currentPage=1,this.getData()},changeTargetType:function(){this.currentPage=1,this.getData()},createApi:function(){this.$router.push("/createApi?projectId="+this.$route.query.projectId+"&projectName="+this.$route.query.projectName+"&interfaceGroupId="+this.$route.query.interfaceGroupId+"&interfaceGroupName="+this.$route.query.interfaceGroupName)},handleSizeChange:function(e){this.pageSize=e,this.getData()},handleCurrentChange:function(e){this.currentPage=e,this.getData()},toApiListManage:function(e,t){this.$router.push("/apiListManage?interfaceId="+t.interfaceId+"&interfaceName="+t.interfaceName+"&projectId="+t.projectId+"&projectName="+t.projectName+"&interfaceGroupId="+t.interfaceGroupId+"&interfaceGroupName="+t.interfaceGroupName)},getData:function(){var e=this;e.loading=!0;var t={projectId:e.projectId,interfaceGroupId:e.interfaceGroupId,search:e.searchValue,target:e.targetType,pageSize:e.pageSize,pageNum:e.currentPage};Object(n.a)("/gateway-manage/page-api",t).then(function(t){var a=t.data;if(e.loading=!1,"0000"==a.code)return e.tableData=a.result.result,void(e.totalCount=a.result.totalCount);l.a.errorMsg(a)}).catch(function(t){e.loading=!1,e.$message.error({duration:1e3,message:t.message})})}},watch:{$route:{handler:function(e,t){},deep:!0}}},c={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"api-body-content border-box"},[a("div",{staticClass:"common-nav"},[a("nav-bread",{attrs:{"nav-path":e.navPath}})],1),e._v(" "),a("div",{staticClass:"api-body-main common-body-main border-box"},[a("div",{staticClass:"api-main-content border-box"},[a("div",{staticClass:"search-wrap m-b-20 flex flex-space-between"},[a("div",{staticStyle:{"font-size":"0"}},[a("el-input",{staticClass:"w-320",attrs:{clearable:"",placeholder:"请输入API名称"},on:{clear:e.clearInput},nativeOn:{keyup:function(t){return a=t,e.searchData(a);var a}},model:{value:e.searchValue,callback:function(t){e.searchValue=t},expression:"searchValue"}},[a("i",{staticClass:"el-input__icon el-icon-search",attrs:{slot:"prefix"},slot:"prefix"})]),e._v(" "),a("el-select",{staticClass:"w-137 margin-left10",attrs:{placeholder:"请选择"},on:{change:e.changeTargetType},model:{value:e.targetType,callback:function(t){e.targetType=t},expression:"targetType"}},e._l(e.targetTypeOptions,function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}))],1),e._v(" "),e.$route.query.projectName&&e.$route.query.interfaceGroupId?a("div",[a("el-button",{attrs:{type:"primary"},on:{click:e.createApi}},[e._v("\n 创建API\n ")])],1):e._e()]),e._v(" "),a("div",{staticClass:"table-wrap"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.tableData}},[a("el-table-column",{attrs:{prop:"interfaceName",label:"API名称","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"API类型","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s("0"==t.row.interfaceType?"http":"1"==t.row.interfaceType?"dubbo ":"自定义返回")+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"访问路径","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.interfaceUrl)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"访问类型","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.optType)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"项目/分组","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.projectName+"/"+t.row.interfaceGroupName)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"创建时间","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"color-606266 line-18"},[e._v("\n "+e._s(e._f("timeStampToYmd")(t.row.createTime))+"\n ")]),e._v(" "),a("div",{staticClass:"color-606266 line-18"},[e._v("\n "+e._s(e._f("timeStampToHms")(t.row.createTime))+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){e.toApiListManage(t.$index,t.row)}}},[e._v("\n 管理\n ")])]}}])})],1),e._v(" "),e.totalCount?a("div",{staticClass:"pagination text-right m-t-14"},[a("dm-pagination",{attrs:{small:"","page-size":e.pageSize,"current-page":e.currentPage,layout:"prev, pager, next",total:e.totalCount},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1):e._e()],1)])]),e._v(" "),a("new-api-group",{attrs:{"edit-row":e.editRow,"show-dialog":e.showDialog},on:{hideDialog:e.hideDialog}})],1)},staticRenderFns:[]};var u=a("VU/8")(s,c,!1,function(e){a("Hhbt")},"data-v-340f42b4",null);t.default=u.exports}});
\ No newline at end of file
webpackJsonp([8],{"7Otq":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAAXNSR0IArs4c6QAAAohJREFUSA3llr9vjlEUx/u0fkVaWiQGtPEGVYnBJMwmE5PJwtbBYqhB/AESQUSnpiFCaMTAJKIq1GBQNWgTQyPKIKlfg2q1fX2+b+6t+97nXs9zG1tP8nnvueeec773+f1mDYlWrVb3UHIQqjCcZdl4SossJRmxbeSfAFsn0T5EP5bt01g20eR1MVoxheR3yilrqYI/A42nA7FoKFVwhE5fnW5f8F8780LXPT2FyUrgOq5hOAILcJ/r94uxtK0onWkSJYDoFNO5VDG1SBZETDVrYV4+onNqVNYKTylNV9JMj0OHYSuj3ajEPsB7wyQb+I0ftaAgIluo0CMgEfllb655cvVMagNjiH9irLNYo29kzcAmiOXUNTKTJlOjG+l7KCHW7AHJ++AqDIHEi0wig9AL++Ee5CwmuJHMy/AK2uASPINZ8E2xp6CczTAKF0B1OYsJ2sSdONrpQ/gB2sQL0M2im2MYJGSPbgC/AmnGTTMKvi0QuAUd0ALNUIEBCNnL0qpUvwl1MDE9+EfhGMyYWGgICtrnyd+MPjsxW83CLtC4KpYUixddw1jdkuPLV/Daks/Z38Jgj9wp5XbbTc0ZOA93IdVuU3ARztJrh19cu0tZaGfhAOgd2g/XefH2MOqDe5zhCqzX/B+mfwLd1ElQdXqvDjKeZNwA+oc3qYXDoGfLmt6HdcZCOzyxCYw9cM6ZP8LXV2XRmGfw3MmZxj8kwbdOUK7EmxcrjUOsEU6bdSuoJqcg95kj1gaz4NqIdqF3ZIsnUOHwJ7xYbUr+XpztoMuhb95YbcH7IU9/H8e98JSO8A64piPO7dgrLJzSowneuY3xb0iwFST6GR6DvhD/xejVBUOg3jdh3R/Z4PK7K+X7nwAAAABJRU5ErkJggg=="},JXTs:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("mvHQ"),i=a.n(n),r=a("P9l9"),o=a("LlAa"),s=a("TUB1"),c={name:"vue-api-header",data:function(){return{baseInfo:{}}},methods:{toLoginOut:function(){var e=this;e.$confirm("确认退出吗?","提示",{type:"warning"}).then(function(){e.postLoginOut()}).catch(function(e){})},postLoginOut:function(){var e=this;Object(r.a)("/gateway-manage/invalidate",{}).then(function(t){var a=t.data;if("0000"==a.code)return s.a.showmsg("退出成功","success"),e.$store.dispatch("clearUserInfo"),e.$router.push("/login"),!1;o.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getUserInfo:function(){var e=this;Object(r.a)("/gateway-manage/get-login-userInfo",{}).then(function(t){var a=t.data;if("0000"==a.code)return e.baseInfo=a.result,localStorage.removeItem("userInfo"),void localStorage.setItem("userInfo",i()(a.result));o.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},watch:{$route:{handler:function(e,t){},deep:!0}},mounted:function(){this.pathName=this.$route.path,this.getUserInfo()}},l={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"api-header"},[a("div",{staticClass:"api-header-wrap border-box flex flex-space-between"},[e._m(0),e._v(" "),a("div",{staticClass:"api-header-right"},[a("div",{staticClass:"api-header-right_info"},[a("span",{staticClass:"api-header-message"},[e._v("消息")]),e._v(" "),a("el-popover",{staticStyle:{"min-width":"95px","margin-left":"10px"},attrs:{placement:"bottom",title:"",width:"95",trigger:"hover","popper-class":"user-header-pop"}},[a("ul",{staticClass:"navsuerwrap"},[a("li",{staticClass:"user-item loginout",staticStyle:{"text-align":"center"},on:{click:function(t){return t.stopPropagation(),e.toLoginOut(t)}}},[a("a",{staticClass:"usertext "},[e._v("退出登录")])])]),e._v(" "),a("div",{staticClass:"nav-user-name",staticStyle:{display:"inline-block"},attrs:{slot:"reference"},slot:"reference"},[a("a",{staticClass:"user-left-img flex flex-align-center"},[a("img",{staticStyle:{width:"30px",height:"30px","border-radius":"15px","padding-right":"2px"},attrs:{src:e.baseInfo.avatar,alt:""}}),a("span",{staticClass:"color-fff font-14 p-r-14"},[e._v(e._s(e.baseInfo.userName))]),a("i",{staticClass:"el-icon-arrow-down font-14 color-fff"})])])])],1)])])])},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"api-header-left"},[t("img",{attrs:{src:a("7Otq"),alt:""}}),t("span",{staticClass:"color-fff "},[this._v("API网关管理后台")])])}]};var d=a("VU/8")(c,l,!1,function(e){a("WKN7")},"data-v-2884065b",null).exports,u={name:"vue-api-aside",props:{activeSelTab:{type:String,default:function(){return"1"}}},data:function(){return{activeTab:this.activeSelTab,leftMenuData:[{tabId:1,tabCode:1,tabName:"概览",tabIcon:"icongailan-",collapsFlag:!1,tabUrl:"/overview",children:[]},{tabId:2,tabCode:2,tabName:"API管理",tabIcon:"iconapi",collapsFlag:!0,tabUrl:"/apiProgram",children:[{tabId:21,tabCode:21,tabName:"项目列表",tabIcon:"",tabUrl:"/apiProgram"},{tabId:22,tabCode:22,tabName:"API列表",tabIcon:"",tabUrl:"/apiList"}]},{tabId:3,tabCode:3,tabName:"环境管理",tabIcon:"iconhuanjingguanli",collapsFlag:!1,tabUrl:"/envManage",children:[]},{tabId:4,tabCode:4,tabName:"发布记录",tabIcon:"iconfabu",collapsFlag:!1,tabUrl:"/releaseRecords",children:[]},{tabId:5,tabCode:5,tabName:"插件管理",tabIcon:"iconchajianguanli",collapsFlag:!1,tabUrl:"/pluginManage",children:[]},{tabId:6,tabCode:6,tabName:"错误码",tabIcon:"iconcuowu",collapsFlag:!1,tabUrl:"/errorCode",children:[]}]}},methods:{selectTab:function(e,t,a){if(t?this.leftMenuData[a].onlyIconActive=!0:(this.leftMenuData.forEach(function(e){e.onlyIconActive=!1}),this.$forceUpdate()),e.hasOwnProperty("children")&&e.children.length>0)return this.leftMenuData[a].onlyIconActive=!0,e.children[0].hasOwnProperty("children")&&e.children[0].hasOwnProperty("children").length>0?(this.activeTab=e.children[0].children[0].tabCode,this.$emit("setSelectTab",e),!1):(this.activeTab=e.children[0].tabCode,this.$emit("setSelectTab",e),!1);this.activeTab=e.tabCode,this.$emit("setSelectTab",e)},getLeftMenu:function(){var e=this,t={project:e.repProjectName,router:e.pathName,requestProject:e.repProjectName};Object(r.a)("/haoban-manage-web/menu-detail",t).then(function(t){var a=t.data;if(1==a.errorCode)return a.result?void 0:void e.$message.error({duration:1e3,message:"暂无数据"});e.$message.error({duration:1e3,message:a.message})}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},watch:{$route:{handler:function(e,t){},deep:!0},activeSelTab:function(e,t){this.activeTab=e}},mounted:function(){this.activeTab=this.activeSelTab}},h={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"api-body-left border-box"},[a("ul",{staticClass:"tab-left-list border-box"},[e._l(e.leftMenuData,function(t,n){return[a("li",{key:n,class:["tab-left-list-cell color-606266 font-14 border-box my-first-level",t.tabCode==e.activeTab?"active-tab":""],on:{click:function(a){e.selectTab(t,!1,n)}}},[a("i",{class:["iconfont tab-icon",t.tabIcon,t.onlyIconActive?"iconActive":""]}),e._v(e._s(t.tabName)+"\n ")]),e._v(" "),t.collapsFlag?a("ul",{key:"childitem"+n,staticClass:"child-tab-left-list"},[e._l(t.children,function(t,i){return[a("li",{key:i,class:["tab-left-list-cell color-606266 font-14 border-box",t.tabCode==e.activeTab?"active-tab":""],on:{click:function(a){e.selectTab(t,"child",n)}}},[e._v(e._s(t.tabName))])]})],2):e._e()]})],2)])},staticRenderFns:[]};var b={name:"index",data:function(){return{projectName:"haoban-manage-web",windowH:window.screen.height-56-40-72+"px",collapseFlag:!1,activeSelTab:""}},methods:{changeRoute:function(e){this.$router.push(e)},toRouterView:function(e){this.$router.push({path:e.path})},showTab:function(e){this.activeSelTab=e},setSelectTab:function(e){var t=e.tabCode;e.hasOwnProperty("children")&&e.children.length&&(t=e.children[0].tabCode,e.children[0].hasOwnProperty("children")&&e.children[0].hasOwnProperty("children").length&&(t=e.children[0].children[0].tabCode)),this.$router.push({path:e.tabUrl,query:{tabCode:t}})},getDataOverview:function(){}},mounted:function(){this.contentHeight=(document.documentElement.clientHeight||document.body.clientHeight)-204+"px"},components:{vueApiHeader:d,vueApiAside:a("VU/8")(u,h,!1,function(e){a("bcia")},"data-v-7187d995",null).exports}},f={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{attrs:{id:"index"}},[t("vue-api-header"),this._v(" "),t("div",{staticClass:"api-body border-box"},[t("div",{staticClass:"api-body-wrap flex border-box"},[t("vue-api-aside",{attrs:{activeSelTab:this.activeSelTab},on:{setSelectTab:this.setSelectTab}}),this._v(" "),t("div",{staticClass:"api-body-right border-box",staticStyle:{height:"calc(100vh - 56px)"}},[t("transition",{attrs:{name:"fade",mode:"out-in"}},[t("router-view",{on:{showTab:this.showTab}})],1)],1)],1)])],1)},staticRenderFns:[]};var g=a("VU/8")(b,f,!1,function(e){a("tCYL")},null,null);t.default=g.exports},WKN7:function(e,t){},bcia:function(e,t){},tCYL:function(e,t){}});
\ No newline at end of file
webpackJsonp([9],{"7Otq":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAAXNSR0IArs4c6QAAAohJREFUSA3llr9vjlEUx/u0fkVaWiQGtPEGVYnBJMwmE5PJwtbBYqhB/AESQUSnpiFCaMTAJKIq1GBQNWgTQyPKIKlfg2q1fX2+b+6t+97nXs9zG1tP8nnvueeec773+f1mDYlWrVb3UHIQqjCcZdl4SossJRmxbeSfAFsn0T5EP5bt01g20eR1MVoxheR3yilrqYI/A42nA7FoKFVwhE5fnW5f8F8780LXPT2FyUrgOq5hOAILcJ/r94uxtK0onWkSJYDoFNO5VDG1SBZETDVrYV4+onNqVNYKTylNV9JMj0OHYSuj3ajEPsB7wyQb+I0ftaAgIluo0CMgEfllb655cvVMagNjiH9irLNYo29kzcAmiOXUNTKTJlOjG+l7KCHW7AHJ++AqDIHEi0wig9AL++Ee5CwmuJHMy/AK2uASPINZ8E2xp6CczTAKF0B1OYsJ2sSdONrpQ/gB2sQL0M2im2MYJGSPbgC/AmnGTTMKvi0QuAUd0ALNUIEBCNnL0qpUvwl1MDE9+EfhGMyYWGgICtrnyd+MPjsxW83CLtC4KpYUixddw1jdkuPLV/Daks/Z38Jgj9wp5XbbTc0ZOA93IdVuU3ARztJrh19cu0tZaGfhAOgd2g/XefH2MOqDe5zhCqzX/B+mfwLd1ElQdXqvDjKeZNwA+oc3qYXDoGfLmt6HdcZCOzyxCYw9cM6ZP8LXV2XRmGfw3MmZxj8kwbdOUK7EmxcrjUOsEU6bdSuoJqcg95kj1gaz4NqIdqF3ZIsnUOHwJ7xYbUr+XpztoMuhb95YbcH7IU9/H8e98JSO8A64piPO7dgrLJzSowneuY3xb0iwFST6GR6DvhD/xejVBUOg3jdh3R/Z4PK7K+X7nwAAAABJRU5ErkJggg=="},JXTs:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("mvHQ"),i=a.n(n),r=a("P9l9"),o=a("LlAa"),s=a("TUB1"),c={name:"VueApiHeader",data:function(){return{baseInfo:{}}},mounted:function(){this.pathName=this.$route.path,this.getUserInfo()},methods:{toLoginOut:function(){var e=this;e.$confirm("确认退出吗?","提示",{type:"warning"}).then(function(){e.postLoginOut()}).catch(function(e){})},postLoginOut:function(){var e=this;Object(r.a)("/gateway-manage/invalidate",{}).then(function(t){var a=t.data;if("0000"==a.code)return s.a.showmsg("退出成功","success"),e.$store.dispatch("clearUserInfo"),e.$router.push("/login"),!1;o.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getUserInfo:function(){var e=this;Object(r.a)("/gateway-manage/get-login-userInfo",{}).then(function(t){var a=t.data;if("0000"==a.code)return e.baseInfo=a.result,localStorage.removeItem("userInfo"),void localStorage.setItem("userInfo",i()(a.result));o.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},watch:{$route:{handler:function(e,t){},deep:!0}}},l={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"api-header"},[a("div",{staticClass:"api-header-wrap border-box flex flex-space-between"},[e._m(0),e._v(" "),a("div",{staticClass:"api-header-right"},[a("div",{staticClass:"api-header-right_info"},[a("span",{staticClass:"api-header-message"},[e._v("消息")]),e._v(" "),a("el-popover",{staticStyle:{"min-width":"95px","margin-left":"10px"},attrs:{placement:"bottom",title:"",width:"95",trigger:"hover","popper-class":"user-header-pop"}},[a("ul",{staticClass:"navsuerwrap"},[a("li",{staticClass:"user-item loginout",staticStyle:{"text-align":"center"},on:{click:function(t){return t.stopPropagation(),e.toLoginOut(t)}}},[a("a",{staticClass:"usertext "},[e._v("退出登录")])])]),e._v(" "),a("div",{staticClass:"nav-user-name",staticStyle:{display:"inline-block"},attrs:{slot:"reference"},slot:"reference"},[a("a",{staticClass:"user-left-img flex flex-align-center"},[a("img",{staticStyle:{width:"30px",height:"30px","border-radius":"15px","padding-right":"2px"},attrs:{src:e.baseInfo.avatar,alt:""}}),a("span",{staticClass:"color-fff font-14 p-r-14"},[e._v(e._s(e.baseInfo.userName))]),a("i",{staticClass:"el-icon-arrow-down font-14 color-fff"})])])])],1)])])])},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"api-header-left"},[t("img",{attrs:{src:a("7Otq"),alt:""}}),t("span",{staticClass:"color-fff "},[this._v("API网关管理后台")])])}]};var d=a("VU/8")(c,l,!1,function(e){a("yvZW")},"data-v-37a67e98",null).exports,u={name:"VueApiAside",props:{activeSelTab:{type:String,default:function(){return"1"}}},data:function(){return{activeTab:this.activeSelTab,leftMenuData:[{tabId:1,tabCode:1,tabName:"概览",tabIcon:"icongailan-",collapsFlag:!1,tabUrl:"/overview",children:[]},{tabId:2,tabCode:2,tabName:"API管理",tabIcon:"iconapi",collapsFlag:!0,tabUrl:"/apiProgram",children:[{tabId:21,tabCode:21,tabName:"项目列表",tabIcon:"",tabUrl:"/apiProgram"},{tabId:22,tabCode:22,tabName:"API列表",tabIcon:"",tabUrl:"/apiList"}]},{tabId:3,tabCode:3,tabName:"环境管理",tabIcon:"iconhuanjingguanli",collapsFlag:!1,tabUrl:"/envManage",children:[]},{tabId:4,tabCode:4,tabName:"发布记录",tabIcon:"iconfabu",collapsFlag:!1,tabUrl:"/releaseRecords",children:[]},{tabId:5,tabCode:5,tabName:"插件管理",tabIcon:"iconchajianguanli",collapsFlag:!1,tabUrl:"/pluginManage",children:[]},{tabId:6,tabCode:6,tabName:"错误码",tabIcon:"iconcuowu",collapsFlag:!1,tabUrl:"/errorCode",children:[]}]}},mounted:function(){this.activeTab=this.activeSelTab},methods:{selectTab:function(e,t,a){if(t?this.leftMenuData[a].onlyIconActive=!0:(this.leftMenuData.forEach(function(e){e.onlyIconActive=!1}),this.$forceUpdate()),e.hasOwnProperty("children")&&e.children.length>0)return this.leftMenuData[a].onlyIconActive=!0,e.children[0].hasOwnProperty("children")&&e.children[0].hasOwnProperty("children").length>0?(this.activeTab=e.children[0].children[0].tabCode,this.$emit("setSelectTab",e),!1):(this.activeTab=e.children[0].tabCode,this.$emit("setSelectTab",e),!1);this.activeTab=e.tabCode,this.$emit("setSelectTab",e)},getLeftMenu:function(){var e=this,t={project:e.repProjectName,router:e.pathName,requestProject:e.repProjectName};Object(r.a)("/haoban-manage-web/menu-detail",t).then(function(t){var a=t.data;if(1==a.errorCode)return a.result?void 0:void e.$message.error({duration:1e3,message:"暂无数据"});e.$message.error({duration:1e3,message:a.message})}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},watch:{$route:{handler:function(e,t){},deep:!0},activeSelTab:function(e,t){this.activeTab=e}}},h={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"api-body-left border-box"},[a("ul",{staticClass:"tab-left-list border-box"},[e._l(e.leftMenuData,function(t,n){return[a("li",{key:n,class:["tab-left-list-cell color-606266 font-14 border-box my-first-level",t.tabCode==e.activeTab?"active-tab":""],on:{click:function(a){e.selectTab(t,!1,n)}}},[a("i",{class:["iconfont tab-icon",t.tabIcon,t.onlyIconActive?"iconActive":""]}),e._v(e._s(t.tabName)+"\n ")]),e._v(" "),t.collapsFlag?a("ul",{key:"childitem"+n,staticClass:"child-tab-left-list"},[e._l(t.children,function(t,i){return[a("li",{key:i,class:["tab-left-list-cell color-606266 font-14 border-box",t.tabCode==e.activeTab?"active-tab":""],on:{click:function(a){e.selectTab(t,"child",n)}}},[e._v("\n "+e._s(t.tabName)+"\n ")])]})],2):e._e()]})],2)])},staticRenderFns:[]};var b={name:"Index",components:{vueApiHeader:d,vueApiAside:a("VU/8")(u,h,!1,function(e){a("eWqt")},"data-v-191347ac",null).exports},data:function(){return{projectName:"haoban-manage-web",windowH:window.screen.height-56-40-72+"px",collapseFlag:!1,activeSelTab:""}},mounted:function(){this.contentHeight=(document.documentElement.clientHeight||document.body.clientHeight)-204+"px"},methods:{changeRoute:function(e){this.$router.push(e)},toRouterView:function(e){this.$router.push({path:e.path})},showTab:function(e){this.activeSelTab=e},setSelectTab:function(e){var t=e.tabCode;e.hasOwnProperty("children")&&e.children.length&&(t=e.children[0].tabCode,e.children[0].hasOwnProperty("children")&&e.children[0].hasOwnProperty("children").length&&(t=e.children[0].children[0].tabCode)),this.$router.push({path:e.tabUrl,query:{tabCode:t}})},getDataOverview:function(){}}},f={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{attrs:{id:"index"}},[t("vue-api-header"),this._v(" "),t("div",{staticClass:"api-body border-box"},[t("div",{staticClass:"api-body-wrap flex border-box"},[t("vue-api-aside",{attrs:{"active-sel-tab":this.activeSelTab},on:{setSelectTab:this.setSelectTab}}),this._v(" "),t("div",{staticClass:"api-body-right border-box",staticStyle:{height:"calc(100vh - 56px)"}},[t("transition",{attrs:{name:"fade",mode:"out-in"}},[t("router-view",{on:{showTab:this.showTab}})],1)],1)],1)])],1)},staticRenderFns:[]};var g=a("VU/8")(b,f,!1,function(e){a("WV4b")},null,null);t.default=g.exports},WV4b:function(e,t){},eWqt:function(e,t){},yvZW:function(e,t){}});
\ No newline at end of file
webpackJsonp([24],{0:function(e,n,t){t("j1ja"),e.exports=t("NHnr")},"4qCZ":function(e,n){},"5tgt":function(e,n,t){e.exports=function(e,n){return function(o){t("Opzk")("./"+e+"/"+n+".vue").then(function(e){o(e)})}}},NHnr:function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=t("fZjL"),a=t.n(o),r=(t("j1ja"),t("hKoQ")),i=t.n(r),u={render:function(){var e=this.$createElement,n=this._self._c||e;return n("div",{attrs:{id:"app"}},[n("transition",{attrs:{name:"fade",mode:"out-in"}},[n("router-view")],1)],1)},staticRenderFns:[]};var c=t("VU/8")({name:"App",data:function(){return{}}},u,!1,function(e){t("OQzs")},null,null).exports,s=t("lRwf"),p=t.n(s),m=t("pRNm"),g=t.n(m),l=t("5tgt"),f=t.n(l);p.a.use(g.a);var d,v=function(e){t.e(1).then(t.bind(null,"ODjX")).then(function(n){e(n)})},h=[{path:"/",name:"/",redirect:"login"},{path:"/login",name:"登录",component:f()("login","index")},{path:"/index",name:"概览",redirect:"overview",component:f()("index","index"),children:[{path:"/overview",name:"概览",component:f()("index","overview")},{path:"/apiProgram",name:"项目列表",component:f()("index","apiProgram")},{path:"/apiProgramGroup",name:"分组列表",component:f()("index","apiProgramGroup")},{path:"/apiList",name:"API列表",component:f()("index","apiList")},{path:"/groupApiList",name:"项目分组API列表",component:f()("index","groupApiList")},{path:"/createApi",name:"创建API",component:f()("index","createApi")},{path:"/apiListManage",name:"API列表管理",component:f()("index","apiListManage")},{path:"/apiListManageShow",name:"API列表管理查看",component:f()("index","apiListManageShow")},{path:"/envManage",name:"环境管理",component:f()("index","envManage")},{path:"/createEnvSet",name:"新建配置",component:f()("index","createEnvSet")},{path:"/releaseRecords",name:"发布记录",component:f()("index","releaseRecords")},{path:"/pluginManage",name:"插件管理",component:f()("index","pluginManage")},{path:"/plugAhsh",name:"插件管理",component:f()("index","plugAhsh")},{path:"/plugPlatform",name:"插件管理",component:f()("index","plugPlatform")},{path:"/errorCode",name:"错误码",component:f()("index","errorCode")}]},{path:"/plugPlatformLog",name:"插件管理",component:f()("index","plugPlatformLog")},{path:"/403",name:"无权访问",component:v},{path:"/404",name:"error404",component:v},{path:"/500",name:"error500",component:v},{path:"*",redirect:"/404",hidden:!0}],x=new g.a({routes:h,scrollBehavior:function(){return{y:0}}}),I=t("zL8q"),S=t.n(I),M=t("Rf8U"),k=t.n(M),D=t("mtWM"),w=t.n(D),L=t("bOdI"),P=t.n(L),A=t("mvHQ"),R=t.n(A),B=t("SJI6"),T=t.n(B);p.a.use(T.a);var b=new T.a.Store({state:{userInfo:{},token:null,title:"",show:!1,bgHeight:window.screen.availHeight-440-24+"px",baseInfo:{},frontInfo:{},backInfo:{},resultInfo:{},tempBackData:[],logData:""},mutations:(d={},P()(d,"login",function(e,n){sessionStorage.token=n,e.token=n}),P()(d,"logout",function(e){sessionStorage.removeItem("token"),e.token=null}),P()(d,"title",function(e,n){e.title=n}),P()(d,"show",function(e,n){e.show=n}),P()(d,"saveUser",function(e,n){localStorage.removeItem("userInfo"),localStorage.setItem("userInfo",R()(n)),e.userInfo=JSON.parse(localStorage.getItem("userInfo"))}),P()(d,"clearUser",function(e){e.userInfo={},localStorage.getItem("userInfo")&&localStorage.removeItem("userInfo")}),P()(d,"saveLog",function(e,n){localStorage.setItem("logInfo",n),e.logData=localStorage.getItem("logInfo")||n}),P()(d,"saveBase",function(e,n){e.baseInfo=n}),P()(d,"saveFront",function(e,n){e.frontInfo=n}),P()(d,"saveBack",function(e,n){e.backInfo=n}),P()(d,"saveResult",function(e,n){e.resultInfo=n}),P()(d,"saveTempBack",function(e,n){e.tempBackData=n}),P()(d,"clearTempBack",function(e){e.tempBackData=[]}),P()(d,"clearData",function(e){e.baseInfo={},e.frontInfo={},e.backInfo={},e.resultInfo={}}),P()(d,"clearLog",function(e){localStorage.removeItem("logInfo"),e.logData=""}),d),actions:{saveLogInfo:function(e,n){e.commit("saveLog",n)},clearLogInfo:function(e,n){e.commit("clearLog",n)},saveUserInfo:function(e,n){e.commit("saveUser",n)},clearUserInfo:function(e,n){e.commit("clearUser",n)},saveBaseInfo:function(e,n){e.commit("saveBase",n)},saveFrontInfo:function(e,n){e.commit("saveFront",n)},saveBackInfo:function(e,n){e.commit("saveBack",n)},saveResultInfo:function(e,n){e.commit("saveResult",n)},saveTempBackData:function(e,n){e.commit("saveTempBack",n)},clearTempBackData:function(e,n){e.commit("clearTempBack")},clearApiData:function(e,n){e.commit("clearData")}}}),H=(t("4qCZ"),t("uKUT"),t("Xcu2"),{dateFormat:function(e,n){if(!e)return"";e=10===e.toString().length?1e3*e:e;var t=new Date(e),o={"M+":t.getMonth()+1,"D+":t.getDate(),W:"日一二三四五六".charAt(t.getDay()),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds(),"q+":Math.floor((t.getMonth()+3)/3),S:t.getMilliseconds()};for(var a in/(Y+)/.test(n)&&(n=n.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length))),o)new RegExp("("+a+")").test(n)&&(n=n.replace(RegExp.$1,1===RegExp.$1.length?o[a]:("00"+o[a]).substr((""+o[a]).length)));return n},formatTimeStamp:function(e){if(!e)return"";var n=new Date(e),t=n.getMonth()+1,o=n.getDate()<10?"0"+n.getDate():n.getDate(),a=t<10?"0"+t:t,r=n.getHours()<10?"0"+n.getHours():n.getHours(),i=n.getMinutes()<10?"0"+n.getMinutes():n.getMinutes(),u=n.getSeconds()<10?"0"+n.getSeconds():n.getSeconds();return n.getFullYear()+"-"+a+"-"+o+" "+r+":"+i+":"+u},timeStampToYmd:function(e){if(!e)return"";var n=new Date(e),t=n.getMonth()+1,o=n.getDate()<10?"0"+n.getDate():n.getDate(),a=t<10?"0"+t:t;return n.getFullYear()+"-"+a+"-"+o},timeStampToHms:function(e){if(!e)return"";var n=new Date(e);return(n.getHours()<10?"0"+n.getHours():n.getHours())+":"+(n.getMinutes()<10?"0"+n.getMinutes():n.getMinutes())+":"+(n.getSeconds()<10?"0"+n.getSeconds():n.getSeconds())}});i.a.polyfill(),Vue.config.productionTip=!1,Vue.use(S.a,{size:"large"}),Vue.use(k.a,w.a),Vue.axios.defaults.withCredentials=!0,a()(H).forEach(function(e){Vue.filter(e,H[e])}),new Vue({el:"#app",router:x,store:b,components:{App:c},template:"<App/>"})},OQzs:function(e,n){},Opzk:function(e,n,t){var o={"./errorPage/403.vue":["6XGN",13],"./errorPage/404.vue":["AejC",10],"./errorPage/500.vue":["FskK",11],"./errorPage/index.vue":["ODjX",1],"./index/apiList.vue":["tiLT",0,21],"./index/apiListManage.vue":["dqHC",0,6],"./index/apiListManageShow.vue":["r4m9",0,3],"./index/apiProgram.vue":["kAqA",0,14],"./index/apiProgramGroup.vue":["G8l+",0,18],"./index/createApi.vue":["Yns/",0,2],"./index/createEnvSet.vue":["vm6Q",0,19],"./index/envManage.vue":["iGM1",0,8],"./index/errorCode.vue":["SGyq",0,12],"./index/groupApiList.vue":["S82n",0,22],"./index/index.vue":["JXTs",0,9],"./index/overview.vue":["EBdF",0,20],"./index/plugAhsh.vue":["JN/y",0,5],"./index/plugPlatform.vue":["dAfO",0,4],"./index/plugPlatformLog.vue":["jtQ2",16],"./index/pluginManage.vue":["K0rJ",0,17],"./index/releaseRecords.vue":["OEJD",0,15],"./login/index.vue":["T+/8",0,7]};function a(e){var n=o[e];return n?Promise.all(n.slice(1).map(t.e)).then(function(){return t(n[0])}):Promise.reject(new Error("Cannot find module '"+e+"'."))}a.keys=function(){return Object.keys(o)},a.id="Opzk",e.exports=a},SJI6:function(e,n){e.exports=Vuex},Xcu2:function(e,n){},lRwf:function(e,n){e.exports=Vue},pRNm:function(e,n){e.exports=VueRouter},uKUT:function(e,n){}},[0]);
\ No newline at end of file
webpackJsonp([24],{"/NA0":function(e,n){},0:function(e,n,t){t("j1ja"),e.exports=t("NHnr")},"4qCZ":function(e,n){},"5tgt":function(e,n,t){e.exports=function(e,n){return function(o){t("Opzk")("./"+e+"/"+n+".vue").then(function(e){o(e)})}}},NHnr:function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=t("fZjL"),a=t.n(o),r=(t("j1ja"),t("hKoQ")),i=t.n(r),u={render:function(){var e=this.$createElement,n=this._self._c||e;return n("div",{attrs:{id:"app"}},[n("transition",{attrs:{name:"fade",mode:"out-in"}},[n("router-view")],1)],1)},staticRenderFns:[]};var c=t("VU/8")({name:"App",data:function(){return{}}},u,!1,function(e){t("/NA0")},null,null).exports,s=t("lRwf"),p=t.n(s),m=t("pRNm"),g=t.n(m),l=t("5tgt"),f=t.n(l);p.a.use(g.a);var d,v=function(e){t.e(1).then(t.bind(null,"ODjX")).then(function(n){e(n)})},h=[{path:"/",name:"/",redirect:"login"},{path:"/login",name:"登录",component:f()("login","index")},{path:"/index",name:"概览",redirect:"overview",component:f()("index","index"),children:[{path:"/overview",name:"概览",component:f()("index","overview")},{path:"/apiProgram",name:"项目列表",component:f()("index","apiProgram")},{path:"/apiProgramGroup",name:"分组列表",component:f()("index","apiProgramGroup")},{path:"/apiList",name:"API列表",component:f()("index","apiList")},{path:"/groupApiList",name:"项目分组API列表",component:f()("index","groupApiList")},{path:"/createApi",name:"创建API",component:f()("index","createApi")},{path:"/apiListManage",name:"API列表管理",component:f()("index","apiListManage")},{path:"/apiListManageShow",name:"API列表管理查看",component:f()("index","apiListManageShow")},{path:"/envManage",name:"环境管理",component:f()("index","envManage")},{path:"/createEnvSet",name:"新建配置",component:f()("index","createEnvSet")},{path:"/releaseRecords",name:"发布记录",component:f()("index","releaseRecords")},{path:"/pluginManage",name:"插件管理",component:f()("index","pluginManage")},{path:"/plugAhsh",name:"插件管理",component:f()("index","plugAhsh")},{path:"/plugPlatform",name:"插件管理",component:f()("index","plugPlatform")},{path:"/errorCode",name:"错误码",component:f()("index","errorCode")}]},{path:"/plugPlatformLog",name:"插件管理",component:f()("index","plugPlatformLog")},{path:"/403",name:"无权访问",component:v},{path:"/404",name:"error404",component:v},{path:"/500",name:"error500",component:v},{path:"*",redirect:"/404",hidden:!0}],x=new g.a({routes:h,scrollBehavior:function(){return{y:0}}}),I=t("zL8q"),S=t.n(I),M=t("Rf8U"),k=t.n(M),D=t("mtWM"),w=t.n(D),A=t("bOdI"),L=t.n(A),P=t("mvHQ"),R=t.n(P),B=t("SJI6"),T=t.n(B);p.a.use(T.a);var b=new T.a.Store({state:{userInfo:{},token:null,title:"",show:!1,bgHeight:window.screen.availHeight-440-24+"px",baseInfo:{},frontInfo:{},backInfo:{},resultInfo:{},tempBackData:[],logData:""},mutations:(d={},L()(d,"login",function(e,n){sessionStorage.token=n,e.token=n}),L()(d,"logout",function(e){sessionStorage.removeItem("token"),e.token=null}),L()(d,"title",function(e,n){e.title=n}),L()(d,"show",function(e,n){e.show=n}),L()(d,"saveUser",function(e,n){localStorage.removeItem("userInfo"),localStorage.setItem("userInfo",R()(n)),e.userInfo=JSON.parse(localStorage.getItem("userInfo"))}),L()(d,"clearUser",function(e){e.userInfo={},localStorage.getItem("userInfo")&&localStorage.removeItem("userInfo")}),L()(d,"saveLog",function(e,n){localStorage.setItem("logInfo",n),e.logData=localStorage.getItem("logInfo")||n}),L()(d,"saveBase",function(e,n){e.baseInfo=n}),L()(d,"saveFront",function(e,n){e.frontInfo=n}),L()(d,"saveBack",function(e,n){e.backInfo=n}),L()(d,"saveResult",function(e,n){e.resultInfo=n}),L()(d,"saveTempBack",function(e,n){e.tempBackData=n}),L()(d,"clearTempBack",function(e){e.tempBackData=[]}),L()(d,"clearData",function(e){e.baseInfo={},e.frontInfo={},e.backInfo={},e.resultInfo={}}),L()(d,"clearLog",function(e){localStorage.removeItem("logInfo"),e.logData=""}),d),actions:{saveLogInfo:function(e,n){e.commit("saveLog",n)},clearLogInfo:function(e,n){e.commit("clearLog",n)},saveUserInfo:function(e,n){e.commit("saveUser",n)},clearUserInfo:function(e,n){e.commit("clearUser",n)},saveBaseInfo:function(e,n){e.commit("saveBase",n)},saveFrontInfo:function(e,n){e.commit("saveFront",n)},saveBackInfo:function(e,n){e.commit("saveBack",n)},saveResultInfo:function(e,n){e.commit("saveResult",n)},saveTempBackData:function(e,n){e.commit("saveTempBack",n)},clearTempBackData:function(e,n){e.commit("clearTempBack")},clearApiData:function(e,n){e.commit("clearData")}}}),H=(t("4qCZ"),t("uKUT"),t("Xcu2"),{dateFormat:function(e,n){if(e){e=10===e.toString().length?1e3*e:e;var t=new Date(e),o={"M+":t.getMonth()+1,"D+":t.getDate(),W:"日一二三四五六".charAt(t.getDay()),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds(),"q+":Math.floor((t.getMonth()+3)/3),S:t.getMilliseconds()};for(var a in/(Y+)/.test(n)&&(n=n.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length))),o)new RegExp("("+a+")").test(n)&&(n=n.replace(RegExp.$1,1===RegExp.$1.length?o[a]:("00"+o[a]).substr((""+o[a]).length)));return n}},formatTimeStamp:function(e){if(e){var n=new Date(e),t=n.getMonth()+1,o=n.getDate()<10?"0"+n.getDate():n.getDate(),a=t<10?"0"+t:t,r=n.getHours()<10?"0"+n.getHours():n.getHours(),i=n.getMinutes()<10?"0"+n.getMinutes():n.getMinutes(),u=n.getSeconds()<10?"0"+n.getSeconds():n.getSeconds();return n.getFullYear()+"-"+a+"-"+o+" "+r+":"+i+":"+u}},timeStampToYmd:function(e){if(e){var n=new Date(e),t=n.getMonth()+1,o=n.getDate()<10?"0"+n.getDate():n.getDate(),a=t<10?"0"+t:t;return n.getFullYear()+"-"+a+"-"+o}},timeStampToHms:function(e){if(e){var n=new Date(e);return(n.getHours()<10?"0"+n.getHours():n.getHours())+":"+(n.getMinutes()<10?"0"+n.getMinutes():n.getMinutes())+":"+(n.getSeconds()<10?"0"+n.getSeconds():n.getSeconds())}}});i.a.polyfill(),Vue.config.productionTip=!1,Vue.use(S.a,{size:"large"}),Vue.use(k.a,w.a),Vue.axios.defaults.withCredentials=!0,a()(H).forEach(function(e){Vue.filter(e,H[e])}),new Vue({el:"#app",router:x,store:b,components:{App:c},template:"<App/>"})},Opzk:function(e,n,t){var o={"./errorPage/403.vue":["6XGN",12],"./errorPage/404.vue":["AejC",14],"./errorPage/500.vue":["FskK",11],"./errorPage/index.vue":["ODjX",1],"./index/apiList.vue":["tiLT",0,17],"./index/apiListManage.vue":["dqHC",0,6],"./index/apiListManageShow.vue":["r4m9",0,3],"./index/apiProgram.vue":["kAqA",0,13],"./index/apiProgramGroup.vue":["G8l+",0,20],"./index/createApi.vue":["Yns/",0,2],"./index/createEnvSet.vue":["vm6Q",0,15],"./index/envManage.vue":["iGM1",0,9],"./index/errorCode.vue":["SGyq",0,10],"./index/groupApiList.vue":["S82n",0,22],"./index/index.vue":["JXTs",0,8],"./index/overview.vue":["EBdF",0,21],"./index/plugAhsh.vue":["JN/y",0,5],"./index/plugPlatform.vue":["dAfO",0,4],"./index/plugPlatformLog.vue":["jtQ2",16],"./index/pluginManage.vue":["K0rJ",0,18],"./index/releaseRecords.vue":["OEJD",0,19],"./login/index.vue":["T+/8",0,7]};function a(e){var n=o[e];return n?Promise.all(n.slice(1).map(t.e)).then(function(){return t(n[0])}):Promise.reject(new Error("Cannot find module '"+e+"'."))}a.keys=function(){return Object.keys(o)},a.id="Opzk",e.exports=a},SJI6:function(e,n){e.exports=Vuex},Xcu2:function(e,n){},lRwf:function(e,n){e.exports=Vue},pRNm:function(e,n){e.exports=VueRouter},uKUT:function(e,n){}},[0]);
\ No newline at end of file
!function(e){var c=window.webpackJsonp;window.webpackJsonp=function(n,a,o){for(var f,d,i,u=0,b=[];u<n.length;u++)d=n[u],r[d]&&b.push(r[d][0]),r[d]=0;for(f in a)Object.prototype.hasOwnProperty.call(a,f)&&(e[f]=a[f]);for(c&&c(n,a,o);b.length;)b.shift()();if(o)for(u=0;u<o.length;u++)i=t(t.s=o[u]);return i};var n={},r={25:0};function t(c){if(n[c])return n[c].exports;var r=n[c]={i:c,l:!1,exports:{}};return e[c].call(r.exports,r,r.exports,t),r.l=!0,r.exports}t.e=function(e){var c=r[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var n=new Promise(function(n,t){c=r[e]=[n,t]});c[2]=n;var a=document.getElementsByTagName("head")[0],o=document.createElement("script");o.type="text/javascript",o.charset="utf-8",o.async=!0,o.timeout=12e4,t.nc&&o.setAttribute("nonce",t.nc),o.src=t.p+"static/js/"+e+"."+{0:"9c647af54f8db9855e8c",1:"7f85c1e2ac5f4c047efd",2:"c0956545640a521ab15d",3:"8882091b0e73f9e289d6",4:"b2d89698a0ae2ac34e17",5:"3fadf27b13bcc167eba7",6:"ddee96dfb06520aa0ec9",7:"4320c4a059f510d5dfd6",8:"906602fc350d59f9270f",9:"854c44feb68f7100c11e",10:"57ed7c7c6d7145dc2385",11:"59bf839ca035394048ab",12:"c45bbc8ecfcc7b672a1a",13:"379c95bf9019e4e8cddd",14:"6f16f2fe36c1124e5b7d",15:"9d2f500fea36ef6fda8f",16:"ef195c3fcb925c77ae43",17:"b5e910bde458646a90bb",18:"6ffde6c5a377916a7ab6",19:"6d26c0f0a01ed0e00ce9",20:"5ba68acba9f82b20d865",21:"7e030ac7d4c12b6eeb37",22:"641a8c74328d990ee39c"}[e]+".js";var f=setTimeout(d,12e4);function d(){o.onerror=o.onload=null,clearTimeout(f);var c=r[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),r[e]=void 0)}return o.onerror=o.onload=d,a.appendChild(o),n},t.m=e,t.c=n,t.d=function(e,c,n){t.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(c,"a",c),c},t.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},t.p="./",t.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,o){for(var f,d,i,u=0,b=[];u<r.length;u++)d=r[u],a[d]&&b.push(a[d][0]),a[d]=0;for(f in c)Object.prototype.hasOwnProperty.call(c,f)&&(e[f]=c[f]);for(n&&n(r,c,o);b.length;)b.shift()();if(o)for(u=0;u<o.length;u++)i=t(t.s=o[u]);return i};var r={},a={25:0};function t(n){if(r[n])return r[n].exports;var a=r[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,t),a.l=!0,a.exports}t.e=function(e){var n=a[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,t){n=a[e]=[r,t]});n[2]=r;var c=document.getElementsByTagName("head")[0],o=document.createElement("script");o.type="text/javascript",o.charset="utf-8",o.async=!0,o.timeout=12e4,t.nc&&o.setAttribute("nonce",t.nc),o.src=t.p+"static/js/"+e+"."+{0:"fe8155cd2aea3fa2f83f",1:"0ebe3ead93207dc78a78",2:"746c1aff28909fa81065",3:"fb5e4035ba804765ab57",4:"c9fc186f812aaef507e1",5:"c1a580a559c868117c50",6:"d27e38edeaee3efb1982",7:"b2a85a42ddd430235a63",8:"7b30654eb23787b522cc",9:"1a984a688854fc33f5d5",10:"b5580a32cf4d4f184029",11:"dcbbbaf20a8db81e57e6",12:"3b9c756b15cf547445f5",13:"2e2ddd11329ffaa2ecb4",14:"9825bb69e60b8030c230",15:"384267038af31c9086d9",16:"ef195c3fcb925c77ae43",17:"e2c1ed5831cab43ca406",18:"ebf8edd37453b58275c4",19:"af939310f74a7e6b9748",20:"b732da2f8840ccd2f16e",21:"55879284ad4d1f03fbe0",22:"161337a4049c5fdd2a11"}[e]+".js";var f=setTimeout(d,12e4);function d(){o.onerror=o.onload=null,clearTimeout(f);var n=a[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),a[e]=void 0)}return o.onerror=o.onload=d,c.appendChild(o),r},t.m=e,t.c=r,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="./",t.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
......@@ -8,6 +8,7 @@
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"start": "npm run dev",
"build": "node build/build.js",
"lint": "eslint --ext .js,.vue src",
"format": "onchange 'test/**/*.js' 'src/**/*.js' 'src/**/*.vue' -- prettier --write {{changed}}",
"formater": "onchange \"test/**/*.js\" \"src/**/*.js\" \"src/**/*.vue\" -- prettier --write {{changed}}",
"version": "conventional-changelog -p angular -i changelog.md -s -r 0 && git add changelog.md"
......@@ -29,6 +30,8 @@
"xlsx": "^0.13.5"
},
"devDependencies": {
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"autoprefixer": "^7.1.2",
"axios": "^0.18.0",
"babel-core": "^6.22.1",
......@@ -54,15 +57,16 @@
"eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-promise": "^3.4.0",
"eslint-plugin-standard": "^3.0.1",
"eslint-plugin-vue": "^4.0.0",
"eslint-plugin-vue": "^6.2.2",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^1.1.4",
"friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^2.30.1",
"husky": "^4.3.0",
"less": "^3.0.4",
"less-loader": "^4.1.0",
"lint-staged": "^10.4.0",
"node-notifier": "^5.1.2",
"node-sass": "^4.9.0",
"onchange": "^5.2.0",
"optimize-css-assets-webpack-plugin": "^3.2.0",
"ora": "^1.2.0",
......@@ -72,7 +76,8 @@
"postcss-url": "^7.2.1",
"prettier": "^1.16.4",
"rimraf": "^2.6.0",
"sass-loader": "^7.0.1",
"sass": "^1.26.11",
"sass-loader": "^7.3.1",
"semver": "^5.3.0",
"shelljs": "^0.7.6",
"uglifyjs-webpack-plugin": "^1.1.1",
......@@ -88,6 +93,18 @@
"webpack-dev-server": "^2.9.1",
"webpack-merge": "^4.1.0"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"lint-staged": {
"*.{js,vue}": [
"eslint --fix",
"git add"
]
},
"engines": {
"node": ">= 6.0.0",
"npm": ">= 3.0.0"
......
<template>
<div id="app">
<transition name="fade" mode="out-in">
<router-view></router-view>
<transition
name="fade"
mode="out-in">
<router-view />
</transition>
</div>
</template>
......
......@@ -50,13 +50,12 @@ Vue.axios.interceptors.response.use(
}
);
/*
*
* 统一 get 请求方法
* @url: 请求的 url
* @params: 请求带的参数
* @header: 带 token
*
/**
* @description: get
* @param {String} url
* @param {Object} params
* @return {Function}
* @author: 无尘
*/
export const getRequest = (url, params) => {
params.requestProject = 'api-gateway-web';
......@@ -72,12 +71,11 @@ export const getRequest = (url, params) => {
};
/**
*
* 统一 post 请求方法
* url: 请求的 url
* @params: 请求带的参数
* @header:
*
* @description: post formdata
* @param {String} url
* @param {Object} params
* @return {Function}
* @author: 无尘
*/
export const postRequest = (url, params) => {
params.requestProject = 'api-gateway-web';
......@@ -103,11 +101,11 @@ export const postJsonRequest = (url, params) => {
};
/**
* method: 'post'
* 'Content-Type': 'application/json;charset=UTF-8'
* @data: params
* @requestProject: 'api-gateway-web'
*
* @description: post json
* @param {String} url
* @param {Object} params
* @return {Function}
* @author: 无尘
*/
export const postJson = (url, params) => {
// params.requestProject = "api-gateway-web";
......@@ -121,9 +119,11 @@ export const postJson = (url, params) => {
};
/**
* method: 'post'
* data: params
*
* @description: post
* @param {String} url
* @param {Object} params
* @return {Function}
* @author: 无尘
*/
export const postForm = (url, params) => {
params.requestProject = 'api-gateway-web';
......@@ -136,9 +136,12 @@ export const postForm = (url, params) => {
};
/**
* post excel
* @description: post excel
* @param {String} url
* @param {Object} params
* @return {Function}
* @author: 无尘
*/
export const postExcel = (url, params) => {
params.requestProject = 'api-gateway-web';
return Vue.axios({
......
// 防抖
export function _debounce(fn, delay) {
var delay = delay || 200;
var timer;
/**
* @description: 防抖
* @param {Function} fn
* @param {Number} delays
* @returns {Function}
* @author: 无尘
*/
export function _debounce(fn, delays) {
let delay = delays || 200;
let timer;
// console.log(fn)
return function() {
var that = this;
var args = arguments;
let that = this;
let args = arguments;
if (timer) {
clearTimeout(timer);
}
......@@ -15,15 +21,21 @@ export function _debounce(fn, delay) {
}, delay);
};
}
// 节流
export function _throttle(fn, interval) {
var last;
var timer;
var interval = interval || 200;
/**
* @description: 节流
* @param {Function} fn
* @param {Number} intervals
* @returns {Function}
* @author: 无尘
*/
export function _throttle(fn, intervals) {
let last;
let timer;
let interval = intervals || 200;
return function() {
var that = this;
var args = arguments;
var now = +new Date();
let that = this;
let args = arguments;
let now = +new Date();
if (last && now - last < interval) {
clearTimeout(timer);
timer = setTimeout(function() {
......@@ -38,8 +50,10 @@ export function _throttle(fn, interval) {
}
/**
* 手机号格式化
* @description: 手机号格式化
* @param {String} phone
* @returns {String}
* @author: 无尘
*/
export function formatPhone(phone) {
phone = phone.toString();
......@@ -47,7 +61,9 @@ export function formatPhone(phone) {
}
/**
* 时间戳格式化
* @description: 时间戳格式化
* @param {Number} num
* @author: 无尘
*/
function formatDig(num) {
......@@ -66,12 +82,15 @@ export function formatDate(time) {
}
/**
* 千位分割
* @description: 千位分割
* @param {Number} num
* @returns {String}
* @author: 无尘
*/
export function formatNum(num) {
let number = num.toString().split('.'); // 分隔小数点
let dot = '0.' + (number[1] || 0);
var reg = /\d{1,3}(?=(\d{3})+$)/g;
let reg = /\d{1,3}(?=(\d{3})+$)/g;
return (
(number[0] + '').replace(reg, '$&,') +
'.' +
......@@ -83,7 +102,10 @@ export function formatNum(num) {
}
/**
* 重复判断
* @description: 重复判断
* @param {Array} arr
* @returns {Boolean}
* @author: 无尘
*/
export function isRepeat(arr) {
let hash = {};
......
/**
* 判断字符长度
* @param: str
*/
export default {
/**
* 一个汉字算两个字符,一个英文字母或数字算一个字符
* @description: 一个汉字算两个字符, 一个英文字母或数字算一个字符
* @param {String} val
* @returns {Number}
* @author: 无尘
*/
getByteLen: function(val) {
let valStr = val == '' || val == null ? '' : val;
......@@ -21,7 +19,10 @@ export default {
return len;
},
/**
* 一个汉字算一个字,一个英文字母或数字算半个字
* @description: 一个汉字算一个字, 一个英文字母或数字算半个字
* @param {String} val
* @returns {Number}
* @author: 无尘
*/
getZhLen: function(val) {
let valStr = val == '' || val == null ? '' : val;
......@@ -37,26 +38,38 @@ export default {
return Math.ceil(len);
},
/*暂无用*/
/**
*
* @description: 暂无用
* @param {String} str
* @param {Number} len
* @param {Number} type
* @returns {String}
* @author: 无尘
*/
cutStr: function(str, len, type) {
let char_length = 0;
let charLength = 0;
for (let i = 0; i < str.length; i++) {
let son_str = str.charAt(i);
let sonStr = str.charAt(i);
if (type == 1) {
encodeURI(son_str).length > 2 ? (char_length += 1) : (char_length += 0.5);
encodeURI(sonStr).length > 2 ? (charLength += 1) : (charLength += 0.5);
}
if (type == 2) {
char_length += 1;
charLength += 1;
}
if (char_length >= len) {
let sub_len = char_length == len ? i + 1 : i;
return str.substr(0, sub_len);
if (charLength >= len) {
let subLen = charLength == len ? i + 1 : i;
return str.substr(0, subLen);
}
}
},
/**
* 限制字数用, 一个汉字算一个字,两个英文/字母算一个字
* @description: 限制字数用, 一个汉字算一个字, 两个英文 / 字母算一个字
* @param {String} val
* @param {Number} max
* @returns {String}
* @author: 无尘
*/
getByteVal: function(val, max) {
let valStr = val == '' || val == null ? '' : val;
......@@ -72,7 +85,11 @@ export default {
},
/**
* 限制字符数用, 一个汉字算两个字符,一个英文/字母算一个字符
* @description: 限制字符数用, 一个汉字算两个字符, 一个英文 / 字母算一个字符
* @param {String} val
* @param {Number} max
* @returns {String}
* @author: 无尘
*/
getCharVal: function(val, max) {
let valStr = val == '' || val == null ? '' : val;
......@@ -88,7 +105,10 @@ export default {
},
/**
* 正则校验,校验非负数字
* @description: 正则校验, 校验非负数字
* @param {String} v
* @returns {Boolean}
* @author: 无尘
*/
regPos: function(v) {
let regTest = /^\d+(\.\d+)?$/;
......
/*
* 时间日期转换
* @param: "10:00-22:00"/ new Date()
*/
export default {
/*
* var storeBusinessTime="10:00-22:00" to
*/
timeToDate: function(val) {
var date = new Date()
var y = date.getFullYear();
var m = date.getMonth() +1;
var day = date.getDate();
var d = [],newArr = [];
var dArr = val.split('-');
dArr.forEach(function(ele,index){
newArr.push(ele.split(':'))
})
d = [new Date(y,m,day,newArr[0][0],newArr[0][1]),new Date(y,m,day,newArr[1][0],newArr[1][1])]
return d;
},
dateToTime(val) {
console.log(val)
// (0-9)年月数字的显示
function formatDig(num) {
return num > 9 ? '' + num : '0' + num;
}
var t;
var t1 = formatDig(new Date(val[0]).getHours())+':'+formatDig(new Date(val[0]).getMinutes())
var t2 = formatDig(new Date(val[1]).getHours())+':'+formatDig(new Date(val[1]).getMinutes())
t= t1+'-'+t2
return t;
}
}
var SIGN_REGEXP = /([yMdhsm])(\1*)/g;
var DEFAULT_PATTERN = 'yyyy-MM-dd';
function padding(s, len) {
var len = len - (s + '').length;
for (var i = 0; i < len; i++) { s = '0' + s; }
return s;
};
export default {
getQueryStringByName: function (name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
var context = "";
if (r != null)
context = r[2];
reg = null;
r = null;
return context == null || context == "" || context == "undefined" ? "" : context;
},
formatDate: {
format: function (date, pattern) {
pattern = pattern || DEFAULT_PATTERN;
return pattern.replace(SIGN_REGEXP, function ($0) {
switch ($0.charAt(0)) {
case 'y': return padding(date.getFullYear(), $0.length);
case 'M': return padding(date.getMonth() + 1, $0.length);
case 'd': return padding(date.getDate(), $0.length);
case 'w': return date.getDay() + 1;
case 'h': return padding(date.getHours(), $0.length);
case 'm': return padding(date.getMinutes(), $0.length);
case 's': return padding(date.getSeconds(), $0.length);
}
});
},
parse: function (dateString, pattern) {
var matchs1 = pattern.match(SIGN_REGEXP);
var matchs2 = dateString.match(/(\d)+/g);
if (matchs1.length == matchs2.length) {
var _date = new Date(1970, 0, 1);
for (var i = 0; i < matchs1.length; i++) {
var _int = parseInt(matchs2[i]);
var sign = matchs1[i];
switch (sign.charAt(0)) {
case 'y': _date.setFullYear(_int); break;
case 'M': _date.setMonth(_int - 1); break;
case 'd': _date.setDate(_int); break;
case 'h': _date.setHours(_int); break;
case 'm': _date.setMinutes(_int); break;
case 's': _date.setSeconds(_int); break;
}
}
return _date;
}
return null;
}
}
};
......@@ -13,22 +13,50 @@ import backConstTable from '@/components/api/back-const-table.vue';
-->
<template>
<div>
<div class="el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition" style="width: 100%; table-layout: fixed;">
<div
class="el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition"
style="width: 100%; table-layout: fixed;">
<div class="el-table__header-wrapper">
<table cellspacing="0" cellpadding="0" border="0" class="el-table__header" style="width: 100%; table-layout: fixed;">
<table
cellspacing="0"
cellpadding="0"
border="0"
class="el-table__header"
style="width: 100%; table-layout: fixed;">
<thead class="has-gutter">
<tr class="">
<th colspan="1" rowspan="1" class="el-table_1_column_1 is-leaf">
<div class="cell">参数名</div>
<th
colspan="1"
rowspan="1"
class="el-table_1_column_1 is-leaf">
<div class="cell">
参数名
</div>
</th>
<th v-if="interfaceType == '0'" colspan="1" rowspan="1" class="el-table_1_column_2 is-leaf">
<div class="cell">参数位置</div>
<th
v-if="interfaceType == '0'"
colspan="1"
rowspan="1"
class="el-table_1_column_2 is-leaf">
<div class="cell">
参数位置
</div>
</th>
<th colspan="1" rowspan="1" class="el-table_1_column_2 is-leaf">
<div class="cell">参数类型</div>
<th
colspan="1"
rowspan="1"
class="el-table_1_column_2 is-leaf">
<div class="cell">
参数类型
</div>
</th>
<th colspan="1" rowspan="1" class="el-table_1_column_4 is-leaf">
<div class="cell">参数值</div>
<th
colspan="1"
rowspan="1"
class="el-table_1_column_4 is-leaf">
<div class="cell">
参数值
</div>
</th>
</tr>
</thead>
......@@ -37,25 +65,45 @@ import backConstTable from '@/components/api/back-const-table.vue';
<div class="el-table__body-wrapper is-scrolling-none">
<div class="table-content">
<template v-for="(itemValue, itemName, index) in itemData.properties">
<table v-if="itemValue.constFlag" cellspacing="0" cellpadding="0" border="0" class="el-table__body" style="width: 100%; table-layout: fixed;" :key="index + itemName + 121">
<table
v-if="itemValue.constFlag"
:key="index + itemName + 121"
cellspacing="0"
cellpadding="0"
border="0"
class="el-table__body"
style="width: 100%; table-layout: fixed;">
<tbody>
<tr class="el-table__row">
<td rowspan="1" colspan="1" class="el-table_1_column_1">
<td
rowspan="1"
colspan="1"
class="el-table_1_column_1">
<div class="cell el-tooltip">
{{ itemValue.currentKey }}
</div>
</td>
<td v-if="interfaceType == '0'" rowspan="1" colspan="1" class="el-table_1_column_2">
<td
v-if="interfaceType == '0'"
rowspan="1"
colspan="1"
class="el-table_1_column_2">
<div class="cell el-tooltip">
{{ itemValue.backendOriginType }}
</div>
</td>
<td rowspan="1" colspan="1" class="el-table_1_column_2">
<td
rowspan="1"
colspan="1"
class="el-table_1_column_2">
<div class="cell el-tooltip">
{{ itemValue.type }}
</div>
</td>
<td rowspan="1" colspan="1" class="el-table_1_column_3">
<td
rowspan="1"
colspan="1"
class="el-table_1_column_3">
<div class="cell el-tooltip">
{{ itemValue.defaultVal }}
</div>
......@@ -71,7 +119,7 @@ import backConstTable from '@/components/api/back-const-table.vue';
</template>
<script>
export default {
name: 'back-constant',
name: 'BackConstant',
props: {
itemData: {
type: Object,
......@@ -80,7 +128,7 @@ export default {
}
},
interfaceType: {
type: [String, Number],
type: [ String, Number ],
default() {
return '0';
}
......@@ -91,15 +139,15 @@ export default {
trData: {}
};
},
mounted() {
const that = this;
that.trData = JSON.parse(JSON.stringify(that.itemData));
},
watch: {
itemData: function(newData, oldData) {
const that = this;
that.trData = JSON.parse(JSON.stringify(newData));
}
},
mounted() {
const that = this;
that.trData = JSON.parse(JSON.stringify(that.itemData));
}
};
</script>
......
......@@ -13,24 +13,52 @@ import backInfoShow from '@/components/api/back-info-show.vue';
-->
<template>
<div class="back-info-show border-box">
<el-form label-width="120px" :model="apiInfoData">
<el-form
label-width="120px"
:model="apiInfoData">
<el-form-item label="返回参数:">
<div class="el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition" style="width: 100%; table-layout: fixed;">
<div
class="el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition"
style="width: 100%; table-layout: fixed;">
<div class="el-table__header-wrapper">
<table cellspacing="0" cellpadding="0" border="0" class="el-table__header" style="width: 100%;">
<table
cellspacing="0"
cellpadding="0"
border="0"
class="el-table__header"
style="width: 100%;">
<thead class="has-gutter">
<tr class="">
<th colspan="1" rowspan="1" class="el-table_1_column_1 is-leaf" style="width: 36px;">
<div class="cell"></div>
<th
colspan="1"
rowspan="1"
class="el-table_1_column_1 is-leaf"
style="width: 36px;">
<div class="cell" />
</th>
<th colspan="1" rowspan="1" class="el-table_1_column_1 is-leaf">
<div class="cell">参数名</div>
<th
colspan="1"
rowspan="1"
class="el-table_1_column_1 is-leaf">
<div class="cell">
参数名
</div>
</th>
<th colspan="1" rowspan="1" class="el-table_1_column_2 is-leaf">
<div class="cell">参数类型</div>
<th
colspan="1"
rowspan="1"
class="el-table_1_column_2 is-leaf">
<div class="cell">
参数类型
</div>
</th>
<th colspan="1" rowspan="1" class="el-table_1_column_4 is-leaf">
<div class="cell">示例</div>
<th
colspan="1"
rowspan="1"
class="el-table_1_column_4 is-leaf">
<div class="cell">
示例
</div>
</th>
</tr>
</thead>
......@@ -38,16 +66,25 @@ import backInfoShow from '@/components/api/back-info-show.vue';
</div>
<div class="el-table__body-wrapper is-scrolling-none">
<div class="table-content">
<back-info-table :itemData="apiInfoData.resultParams"></back-info-table>
<back-info-table :item-data="apiInfoData.resultParams" />
</div>
</div>
</div>
</el-form-item>
<el-form-item label="错误码:">
<el-table :data="apiInfoData.errCode" style="width: 100%">
<el-table-column prop="orig_error_code" label="原始错误码"> </el-table-column>
<el-table-column prop="error_code" label="映射错误码"> </el-table-column>
<el-table-column prop="error_info" label="错误信息" show-overflow-tooltip> </el-table-column>
<el-table
:data="apiInfoData.errCode"
style="width: 100%">
<el-table-column
prop="orig_error_code"
label="原始错误码" />
<el-table-column
prop="error_code"
label="映射错误码" />
<el-table-column
prop="error_info"
label="错误信息"
show-overflow-tooltip />
</el-table>
</el-form-item>
<el-form-item label="成功返回示例:">
......@@ -70,13 +107,13 @@ import backInfoShow from '@/components/api/back-info-show.vue';
<script>
import backInfoTable from '@/components/api/back-info-table.vue';
export default {
name: 'back-info-show',
name: 'BackInfoShow',
components: {
backInfoTable
},
props: {
apiData: {
type: [Object, Array],
type: [ Object, Array ],
default() {
return {
interfaceName: '1',
......@@ -107,50 +144,50 @@ export default {
}
],
resultParams: {
type: 'object', //object,array,string,number,boolean,
type: 'object', // object,array,string,number,boolean,
properties: {
name: {
originType: 'query', //来源类型 query,body,header
originType: 'query', // 来源类型 query,body,header
type: 'object',
isBackendField: 0, //是否后端字段
defaultVal: 'val', //默认值
isRootKey: 0, //是否是后端参数字段
rootKey: '', //后端参数字段
objectClass: '', //如果是object 并且是dubbo
isBackendField: 0, // 是否后端字段
defaultVal: 'val', // 默认值
isRootKey: 0, // 是否是后端参数字段
rootKey: '', // 后端参数字段
objectClass: '', // 如果是object 并且是dubbo
description: '描述',
check: true,
required: [],
properties: {
nameId: {
originType: 'query', //来源类型 query,body,header
originType: 'query', // 来源类型 query,body,header
type: 'object',
isBackendField: 0, //是否后端字段
defaultVal: 'val', //默认值
isRootKey: 0, //是否是后端参数字段
rootKey: '', //后端参数字段
objectClass: '', //如果是object 并且是dubbo
isBackendField: 0, // 是否后端字段
defaultVal: 'val', // 默认值
isRootKey: 0, // 是否是后端参数字段
rootKey: '', // 后端参数字段
objectClass: '', // 如果是object 并且是dubbo
description: '描述',
check: true,
properties: {
age: {
originType: 'query', //来源类型 query,body,header
originType: 'query', // 来源类型 query,body,header
type: 'string',
isBackendField: 0, //是否后端字段
defaultVal: 'val', //默认值
isRootKey: 0, //是否是后端参数字段
rootKey: '', //后端参数字段
objectClass: '', //如果是object 并且是dubbo
isBackendField: 0, // 是否后端字段
defaultVal: 'val', // 默认值
isRootKey: 0, // 是否是后端参数字段
rootKey: '', // 后端参数字段
objectClass: '', // 如果是object 并且是dubbo
description: '描述',
check: true
},
email: {
originType: 'query', //来源类型 query,body,header
originType: 'query', // 来源类型 query,body,header
type: 'string',
isBackendField: 0, //是否后端字段
defaultVal: 'val', //默认值
isRootKey: 0, //是否是后端参数字段
rootKey: '', //后端参数字段
objectClass: '', //如果是object 并且是dubbo
isBackendField: 0, // 是否后端字段
defaultVal: 'val', // 默认值
isRootKey: 0, // 是否是后端参数字段
rootKey: '', // 后端参数字段
objectClass: '', // 如果是object 并且是dubbo
description: '描述',
check: true
}
......@@ -159,13 +196,13 @@ export default {
}
},
id: {
originType: 'query', //来源类型 query,body,header
originType: 'query', // 来源类型 query,body,header
type: 'string',
isBackendField: 0, //是否后端字段
defaultVal: 'val', //默认值
isRootKey: 0, //是否是后端参数字段
rootKey: '', //后端参数字段
objectClass: '', //如果是object 并且是dubbo
isBackendField: 0, // 是否后端字段
defaultVal: 'val', // 默认值
isRootKey: 0, // 是否是后端参数字段
rootKey: '', // 后端参数字段
objectClass: '', // 如果是object 并且是dubbo
description: '描述',
check: true
}
......@@ -175,16 +212,16 @@ export default {
}
};
},
mounted() {
const that = this;
that.apiInfoData = that.apiData;
},
watch: {
apiData: function(newData, oldData) {
const that = this;
that.apiInfoData = newData;
}
},
mounted() {
const that = this;
that.apiInfoData = that.apiData;
}
};
</script>
......
......@@ -14,35 +14,74 @@ import backInfoTable from '@/components/api/back-info-table.vue';
<template>
<div>
<template v-for="(itemValue, itemName, index) in itemData.properties">
<table cellspacing="0" cellpadding="0" border="0" class="el-table__body" style="width: 100%;table-layout: fixed;" :key="index + itemName + 121">
<table
:key="index + itemName + 121"
cellspacing="0"
cellpadding="0"
border="0"
class="el-table__body"
style="width: 100%;table-layout: fixed;">
<tbody>
<tr class="el-table__row">
<td rowspan="1" colspan="1" class="el-table_1_column_1" style="width: 36px;">
<div v-if="itemValue.type == 'object' || itemValue.type == 'array'" class="cell"><i class="el-icon-minus"></i></div>
<td
rowspan="1"
colspan="1"
class="el-table_1_column_1"
style="width: 36px;">
<div
v-if="itemValue.type == 'object' || itemValue.type == 'array'"
class="cell">
<i class="el-icon-minus" />
</div>
</td>
<td rowspan="1" colspan="1" class="el-table_1_column_1">
<div class="cell el-tooltip">{{ itemName }}</div>
<td
rowspan="1"
colspan="1"
class="el-table_1_column_1">
<div class="cell el-tooltip">
{{ itemName }}
</div>
</td>
<td rowspan="1" colspan="1" class="el-table_1_column_2">
<div class="cell el-tooltip">{{ itemValue.type }}</div>
<td
rowspan="1"
colspan="1"
class="el-table_1_column_2">
<div class="cell el-tooltip">
{{ itemValue.type }}
</div>
</td>
<td rowspan="1" colspan="1" class="el-table_1_column_3">
<div class="cell el-tooltip">{{ itemValue.example }}</div>
<td
rowspan="1"
colspan="1"
class="el-table_1_column_3">
<div class="cell el-tooltip">
{{ itemValue.example }}
</div>
</td>
</tr>
</tbody>
</table>
<table-row class="el-table__row" style="padding-left: 10px;" v-if="itemValue.type == 'array' && Object.keys(itemValue.items.properties).length" :itemData="itemValue.items" :key="index + '122' + itemName"> </table-row>
<table-row class="el-table__row" style="padding-left: 10px;" v-if="itemValue.type == 'object' && Object.keys(itemValue.properties).length" :itemData="itemValue" :key="index + '122' + itemName"> </table-row>
<table-row
v-if="itemValue.type == 'array' && Object.keys(itemValue.items.properties).length"
:key="index + '122' + itemName"
class="el-table__row"
style="padding-left: 10px;"
:item-data="itemValue.items" />
<table-row
v-if="itemValue.type == 'object' && Object.keys(itemValue.properties).length"
:key="index + '122' + itemName"
class="el-table__row"
style="padding-left: 10px;"
:item-data="itemValue" />
</template>
</div>
</template>
<script>
export default {
name: 'table-row',
name: 'TableRow',
props: {
itemData: {
type: [Object, Array],
type: [ Object, Array ],
default() {
return {};
}
......@@ -55,41 +94,41 @@ export default {
interfaceUrl: '/',
requestType: 'post',
frontParams: {
type: 'object', //object,array,string,number,boolean,
type: 'object', // object,array,string,number,boolean,
properties: {
name: {
originType: 'query', //来源类型 query,body,header
originType: 'query', // 来源类型 query,body,header
type: 'object',
isBackendField: 0, //是否后端字段
defaultVal: 'val', //默认值
isRootKey: 0, //是否是后端参数字段
rootKey: '', //后端参数字段
objectClass: '', //如果是object 并且是dubbo
isBackendField: 0, // 是否后端字段
defaultVal: 'val', // 默认值
isRootKey: 0, // 是否是后端参数字段
rootKey: '', // 后端参数字段
objectClass: '', // 如果是object 并且是dubbo
description: '描述',
check: true,
required: [],
properties: {
nameId: {
originType: 'query', //来源类型 query,body,header
originType: 'query', // 来源类型 query,body,header
type: 'object',
isBackendField: 0, //是否后端字段
defaultVal: 'val', //默认值
isRootKey: 0, //是否是后端参数字段
rootKey: '', //后端参数字段
objectClass: '', //如果是object 并且是dubbo
isBackendField: 0, // 是否后端字段
defaultVal: 'val', // 默认值
isRootKey: 0, // 是否是后端参数字段
rootKey: '', // 后端参数字段
objectClass: '', // 如果是object 并且是dubbo
description: '描述',
check: true
}
}
},
id: {
originType: 'query', //来源类型 query,body,header
originType: 'query', // 来源类型 query,body,header
type: 'string',
isBackendField: 0, //是否后端字段
defaultVal: 'val', //默认值
isRootKey: 0, //是否是后端参数字段
rootKey: '', //后端参数字段
objectClass: '', //如果是object 并且是dubbo
isBackendField: 0, // 是否后端字段
defaultVal: 'val', // 默认值
isRootKey: 0, // 是否是后端参数字段
rootKey: '', // 后端参数字段
objectClass: '', // 如果是object 并且是dubbo
description: '描述',
check: true
}
......@@ -99,16 +138,16 @@ export default {
}
};
},
mounted() {
const that = this;
that.trData = that.itemData;
},
watch: {
itemData: function(newData, oldData) {
const that = this;
that.trData = newData;
}
},
mounted() {
const that = this;
that.trData = that.itemData;
}
};
</script>
......
......@@ -14,28 +14,68 @@ import backTableRight from '@/components/api/back-table-right.vue';
<template>
<div>
<template v-for="(itemValue, itemName, index) in itemData.properties">
<table v-if="!itemValue.constFlag" cellspacing="0" cellpadding="0" border="0" class="el-table__body" style="width: 100%;table-layout: fixed;" :key="index + itemName + 121">
<table
v-if="!itemValue.constFlag"
:key="index + itemName + 121"
cellspacing="0"
cellpadding="0"
border="0"
class="el-table__body"
style="width: 100%;table-layout: fixed;">
<tbody>
<tr class="el-table__row">
<td rowspan="1" colspan="1" class="el-table_1_column_1" style="width: 36px;">
<div v-if="itemValue.type == 'object' || itemValue.type == 'array'" class="cell"><i class="el-icon-minus"></i></div>
<td
rowspan="1"
colspan="1"
class="el-table_1_column_1"
style="width: 36px;">
<div
v-if="itemValue.type == 'object' || itemValue.type == 'array'"
class="cell">
<i class="el-icon-minus" />
</div>
</td>
<td rowspan="1" colspan="1" class="el-table_1_column_1">
<td
rowspan="1"
colspan="1"
class="el-table_1_column_1">
<div class="cell el-tooltip">
<el-tooltip class="item" effect="dark" :content="itemName" placement="top">
<el-tooltip
class="item"
effect="dark"
:content="itemName"
placement="top">
<span>{{ itemName }}</span>
</el-tooltip>
</div>
</td>
<td rowspan="1" colspan="1" class="el-table_1_column_2">
<div class="cell el-tooltip">{{ itemValue.type }}</div>
<td
rowspan="1"
colspan="1"
class="el-table_1_column_2">
<div class="cell el-tooltip">
{{ itemValue.type }}
</div>
</td>
<td v-if="interfaceType == 1" rowspan="1" colspan="1" class="el-table_1_column_3">
<div class="cell el-tooltip">{{ itemValue.objectClass }}</div>
<td
v-if="interfaceType == 1"
rowspan="1"
colspan="1"
class="el-table_1_column_3">
<div class="cell el-tooltip">
{{ itemValue.objectClass }}
</div>
</td>
<td rowspan="1" colspan="1" class="el-table_1_column_4">
<td
rowspan="1"
colspan="1"
class="el-table_1_column_4">
<div class="cell el-tooltip">
<el-tooltip class="item" effect="dark" :content="itemValue.defaultVal" placement="top">
<el-tooltip
class="item"
effect="dark"
:content="itemValue.defaultVal"
placement="top">
<span>{{ itemValue.defaultVal }}</span>
</el-tooltip>
</div>
......@@ -43,23 +83,31 @@ import backTableRight from '@/components/api/back-table-right.vue';
</tr>
</tbody>
</table>
<back-table-row class="el-table__row child-row" v-if="itemValue.type == 'array' && Object.keys(itemValue.items.properties).length" :itemData="itemValue.items" :key="index + '122' + itemName"> </back-table-row>
<back-table-row class="el-table__row child-row" v-if="itemValue.type == 'object' && Object.keys(itemValue.properties).length" :itemData="itemValue" :key="index + '123' + itemName"> </back-table-row>
<back-table-row
v-if="itemValue.type == 'array' && Object.keys(itemValue.items.properties).length"
:key="index + '122' + itemName"
class="el-table__row child-row"
:item-data="itemValue.items" />
<back-table-row
v-if="itemValue.type == 'object' && Object.keys(itemValue.properties).length"
:key="index + '123' + itemName"
class="el-table__row child-row"
:item-data="itemValue" />
</template>
</div>
</template>
<script>
export default {
name: 'back-table-row',
name: 'BackTableRow',
props: {
itemData: {
type: [Object, Array],
type: [ Object, Array ],
default() {
return {};
}
},
interfaceType: {
type: [String, Number],
type: [ String, Number ],
default() {
return '0';
}
......@@ -70,16 +118,16 @@ export default {
trData: {}
};
},
mounted() {
const that = this;
that.trData = that.itemData;
},
watch: {
itemData: function(newData, oldData) {
const that = this;
that.trData = newData;
}
},
mounted() {
const that = this;
that.trData = that.itemData;
}
};
</script>
......
......@@ -14,39 +14,81 @@ import backTableTr from '@/components/api/back-table-tr.vue';
<template>
<div>
<template v-for="(itemValue, itemName, index) in itemData.properties">
<table v-if="!itemValue.constFlag" cellspacing="0" cellpadding="0" border="0" class="el-table__body" style="width: 100%;table-layout: fixed;" :key="index + itemName + 121">
<table
v-if="!itemValue.constFlag"
:key="index + itemName + 121"
cellspacing="0"
cellpadding="0"
border="0"
class="el-table__body"
style="width: 100%;table-layout: fixed;">
<tbody>
<tr class="el-table__row">
<td rowspan="1" colspan="1" class="el-table_1_column_1" style="width: 36px;">
<div v-if="itemValue.type == 'object' || itemValue.type == 'array'" class="cell"><i class="el-icon-minus"></i></div>
<td
rowspan="1"
colspan="1"
class="el-table_1_column_1"
style="width: 36px;">
<div
v-if="itemValue.type == 'object' || itemValue.type == 'array'"
class="cell">
<i class="el-icon-minus" />
</div>
</td>
<td rowspan="1" colspan="1" class="el-table_1_column_1">
<td
rowspan="1"
colspan="1"
class="el-table_1_column_1">
<div class="cell el-tooltip">
<el-tooltip class="item" effect="dark" :content="itemName" placement="top">
<el-tooltip
class="item"
effect="dark"
:content="itemName"
placement="top">
<span>{{ itemName }}</span>
</el-tooltip>
</div>
</td>
<td rowspan="1" colspan="1" class="el-table_1_column_2">
<div class="cell el-tooltip">{{ itemValue.frontOriginType }}</div>
<td
rowspan="1"
colspan="1"
class="el-table_1_column_2">
<div class="cell el-tooltip">
{{ itemValue.frontOriginType }}
</div>
</td>
<td rowspan="1" colspan="1" class="el-table_1_column_2">
<div class="cell el-tooltip">{{ itemValue.type }}</div>
<td
rowspan="1"
colspan="1"
class="el-table_1_column_2">
<div class="cell el-tooltip">
{{ itemValue.type }}
</div>
</td>
</tr>
</tbody>
</table>
<back-table-row class="el-table__row" style="padding-left: 10px;" v-if="itemValue.type == 'array' && Object.keys(itemValue.items.properties).length" :itemData="itemValue.items" :key="index + '122' + itemName"> </back-table-row>
<back-table-row class="el-table__row" style="padding-left: 10px;" v-if="itemValue.type == 'object' && Object.keys(itemValue.properties).length" :itemData="itemValue" :key="index + '122' + itemName"> </back-table-row>
<back-table-row
v-if="itemValue.type == 'array' && Object.keys(itemValue.items.properties).length"
:key="index + '122' + itemName"
class="el-table__row"
style="padding-left: 10px;"
:item-data="itemValue.items" />
<back-table-row
v-if="itemValue.type == 'object' && Object.keys(itemValue.properties).length"
:key="index + '122' + itemName"
class="el-table__row"
style="padding-left: 10px;"
:item-data="itemValue" />
</template>
</div>
</template>
<script>
export default {
name: 'back-table-row',
name: 'BackTableRow',
props: {
itemData: {
type: [Object, Array],
type: [ Object, Array ],
default() {
return {};
}
......@@ -57,16 +99,16 @@ export default {
trData: {}
};
},
mounted() {
const that = this;
that.trData = that.itemData;
},
watch: {
itemData: function(newData, oldData) {
const that = this;
that.trData = newData;
}
},
mounted() {
const that = this;
that.trData = that.itemData;
}
};
</script>
......
......@@ -13,7 +13,9 @@ import baseInfoShow from '@/components/api/base-info-show.vue';
-->
<template>
<div class="base-info-show border-box">
<el-form label-width="120px" :model="apiInfoData">
<el-form
label-width="120px"
:model="apiInfoData">
<el-form-item label="API名称:">
{{ apiInfoData.interfaceName }}
</el-form-item>
......@@ -23,7 +25,9 @@ import baseInfoShow from '@/components/api/base-info-show.vue';
<el-form-item label="访问类型:">
{{ apiInfoData.requestType }}
</el-form-item>
<el-form-item label="描述:" class="max-w-1000">
<el-form-item
label="描述:"
class="max-w-1000">
{{ apiInfoData.interfaceDescribe }}
</el-form-item>
</el-form>
......@@ -31,10 +35,10 @@ import baseInfoShow from '@/components/api/base-info-show.vue';
</template>
<script>
export default {
name: 'base-info-show',
name: 'BaseInfoShow',
props: {
apiData: {
type: [Object, Array],
type: [ Object, Array ],
default() {
return {};
}
......@@ -50,16 +54,16 @@ export default {
}
};
},
mounted() {
const that = this;
that.apiInfoData = that.apiData;
},
watch: {
apiData: function(newData, oldData) {
const that = this;
that.apiInfoData = newData;
}
},
mounted() {
const that = this;
that.apiInfoData = that.apiData;
}
};
</script>
......
......@@ -5,7 +5,9 @@ import frontInfoShow from '@/components/api/frontend-info-show.vue';
-->
<template>
<div class="frontend-info-show border-box">
<el-form label-width="120px" :model="apiInfoData">
<el-form
label-width="120px"
:model="apiInfoData">
<el-form-item label="协议:">
{{ apiInfoData.protocol }}
</el-form-item>
......@@ -16,31 +18,72 @@ import frontInfoShow from '@/components/api/frontend-info-show.vue';
{{ apiInfoData.requestType }}
</el-form-item>
<el-form-item label="参数配置:">
<div class="el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition" style="width: 100%; table-layout: fixed;">
<div
class="el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition"
style="width: 100%; table-layout: fixed;">
<div class="el-table__header-wrapper">
<table cellspacing="0" cellpadding="0" border="0" class="el-table__header" style="width: 100%;">
<table
cellspacing="0"
cellpadding="0"
border="0"
class="el-table__header"
style="width: 100%;">
<thead class="has-gutter">
<tr class="">
<th colspan="1" rowspan="1" class="el-table_1_column_1 is-leaf" style="width: 36px;">
<div class="cell"></div>
<th
colspan="1"
rowspan="1"
class="el-table_1_column_1 is-leaf"
style="width: 36px;">
<div class="cell" />
</th>
<th colspan="1" rowspan="1" class="el-table_1_column_1 is-leaf">
<div class="cell">参数名</div>
<th
colspan="1"
rowspan="1"
class="el-table_1_column_1 is-leaf">
<div class="cell">
参数名
</div>
</th>
<th colspan="1" rowspan="1" class="el-table_1_column_1 is-leaf">
<div class="cell">参数位置</div>
<th
colspan="1"
rowspan="1"
class="el-table_1_column_1 is-leaf">
<div class="cell">
参数位置
</div>
</th>
<th colspan="1" rowspan="1" class="el-table_1_column_2 is-leaf">
<div class="cell">参数类型</div>
<th
colspan="1"
rowspan="1"
class="el-table_1_column_2 is-leaf">
<div class="cell">
参数类型
</div>
</th>
<th colspan="1" rowspan="1" class="el-table_1_column_3 is-leaf">
<div class="cell">必选</div>
<th
colspan="1"
rowspan="1"
class="el-table_1_column_3 is-leaf">
<div class="cell">
必选
</div>
</th>
<th colspan="1" rowspan="1" class="el-table_1_column_4 is-leaf">
<div class="cell">示例</div>
<th
colspan="1"
rowspan="1"
class="el-table_1_column_4 is-leaf">
<div class="cell">
示例
</div>
</th>
<th colspan="1" rowspan="1" class="el-table_1_column_5 is-leaf">
<div class="cell">描述</div>
<th
colspan="1"
rowspan="1"
class="el-table_1_column_5 is-leaf">
<div class="cell">
描述
</div>
</th>
</tr>
</thead>
......@@ -48,7 +91,7 @@ import frontInfoShow from '@/components/api/frontend-info-show.vue';
</div>
<div class="el-table__body-wrapper is-scrolling-none">
<div class="table-content">
<table-tr :itemData="apiInfoData.frontParams.properties"></table-tr>
<table-tr :item-data="apiInfoData.frontParams.properties" />
</div>
</div>
</div>
......@@ -59,13 +102,13 @@ import frontInfoShow from '@/components/api/frontend-info-show.vue';
<script>
import tableTr from '@/components/api/table-tr.vue';
export default {
name: 'frontend-info-show',
name: 'FrontendInfoShow',
components: {
tableTr
},
props: {
apiData: {
type: [Object, Array],
type: [ Object, Array ],
default() {
return {};
}
......@@ -78,16 +121,16 @@ export default {
interfaceUrl: '/',
requestType: 'post',
frontParams: {
type: 'object', //object,array,string,number,boolean,
type: 'object', // object,array,string,number,boolean,
properties: {
name: {
originType: 'query', //来源类型 query,body,header
originType: 'query', // 来源类型 query,body,header
type: 'object',
isBackendField: 0, //是否后端字段
defaultVal: 'val', //默认值
isRootKey: 0, //是否是后端参数字段
rootKey: '', //后端参数字段
objectClass: '', //如果是object 并且是dubbo
isBackendField: 0, // 是否后端字段
defaultVal: 'val', // 默认值
isRootKey: 0, // 是否是后端参数字段
rootKey: '', // 后端参数字段
objectClass: '', // 如果是object 并且是dubbo
description: '描述',
check: true,
required: [],
......@@ -99,16 +142,16 @@ export default {
}
};
},
mounted() {
const that = this;
that.apiInfoData = that.apiData;
},
watch: {
apiData: function(newData, oldData) {
const that = this;
that.apiInfoData = newData;
}
},
mounted() {
const that = this;
that.apiInfoData = that.apiData;
}
};
</script>
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-08-07 13:48:12
* @LastEditors: 无尘
* @LastEditTime: 2019-10-18 16:04:53
* @LastEditTime: 2020-09-23 18:13:33
-->
<!--
<go-history :historyShow="historyShow" @hideHistoryDialog="hideHistoryDialog"></go-history>
......@@ -13,39 +13,87 @@ import goHistory from '@/components/api/go-history.vue';
<template>
<div v-show="customDialog">
<el-dialog class="edit-dialog" title="选择回退版本" :visible.sync="customDialog" width="600px" :before-close="handleClose">
<el-dialog
class="edit-dialog"
title="选择回退版本"
:visible.sync="customDialog"
width="600px"
:before-close="handleClose">
<div class="table-wrap">
<el-table :data="tableData" style="width: 100%">
<el-table-column label="" show-overflow-tooltip>
<el-table
:data="tableData"
style="width: 100%">
<el-table-column
label=""
show-overflow-tooltip>
<template slot-scope="scope">
<el-radio v-model="selectVersion" :label="scope.row.publishRecordId">{{ scope.row.version }}</el-radio>
<el-radio
v-model="selectVersion"
:label="scope.row.publishRecordId">
{{ scope.row.version }}
</el-radio>
</template>
</el-table-column>
<el-table-column prop="publishRecordId" label="发布版本" show-overflow-tooltip> </el-table-column>
<el-table-column label="发布备注" show-overflow-tooltip>
<el-table-column
prop="publishRecordId"
label="发布版本"
show-overflow-tooltip />
<el-table-column
label="发布备注"
show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.remark }}
</template>
</el-table-column>
<el-table-column label="发布时间" show-overflow-tooltip>
<el-table-column
label="发布时间"
show-overflow-tooltip>
<template slot-scope="scope">
<div class="color-606266 line-18">{{ scope.row.createTime | timeStampToYmd }}</div>
<div class="color-606266 line-18">{{ scope.row.createTime | timeStampToHms }}</div>
<div class="color-606266 line-18">
{{ scope.row.createTime | timeStampToYmd }}
</div>
<div class="color-606266 line-18">
{{ scope.row.createTime | timeStampToHms }}
</div>
</template>
</el-table-column>
<el-table-column label="操作" show-overflow-tooltip>
<el-table-column
label="操作"
show-overflow-tooltip>
<template slot-scope="scope">
<el-button @click="handleShow(scope.$index, scope.row)" type="text">查看</el-button>
<el-button
type="text"
@click="handleShow(scope.$index, scope.row)">
查看
</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination text-right m-t-14" v-if="!!totalCount">
<dm-pagination small :page-size="pageSize" :current-page="currentPage" layout="prev, pager, next" :total="totalCount" @size-change="handleSizeChange" @current-change="handleCurrentChange"> </dm-pagination>
<div
v-if="!!totalCount"
class="pagination text-right m-t-14">
<dm-pagination
small
:page-size="pageSize"
:current-page="currentPage"
layout="prev, pager, next"
:total="totalCount"
@size-change="handleSizeChange"
@current-change="handleCurrentChange" />
</div>
</div>
<div slot="footer" class="dialog-footer" style="padding-bottom: 10px;">
<el-button @click="customCancel">取 消</el-button>
<el-button type="primary" @click="customConfirm('syncForm')">确 定</el-button>
<div
slot="footer"
class="dialog-footer"
style="padding-bottom: 10px;">
<el-button @click="customCancel">
取 消
</el-button>
<el-button
type="primary"
@click="customConfirm('syncForm')">
确 定
</el-button>
</div>
</el-dialog>
</div>
......@@ -56,14 +104,14 @@ import { getRequest } from '@/api/api';
import errMsg from '@/assets/js/error';
import showMsg from '@/assets/js/showmsg';
export default {
name: 'go-history',
name: 'GoHistory',
props: {
historyShow: {
type: Boolean,
default: false
},
apiData: {
type: [Object, Array],
type: [ Object, Array ],
default() {
return {};
}
......@@ -91,9 +139,18 @@ export default {
totalCount: 0
};
},
/* 接收数据 */
mounted() {
const that = this;
that.customDialog = that.historyShow;
that.getData();
},
methods: {
/**
* 关闭
* @description: 关闭
* @param {Function} done
* @author: 无尘
*/
handleClose(done) {
const that = this;
......@@ -102,7 +159,8 @@ export default {
},
/**
* 取消
* @description: 取消
* @author: 无尘
*/
customCancel() {
const that = this;
......@@ -116,7 +174,9 @@ export default {
},
/**
* 确定回退
* @description: 确定回退
* @returns {Boolean}
* @author: 无尘
*/
customConfirm() {
const that = this;
......@@ -154,9 +214,10 @@ export default {
},
/**
* 提交数据
* @description: 提交数据
* @author: 无尘
*/
setData(list) {
setData() {
const that = this;
that.$emit('hideHistoryDialog');
/* that.$nextTick(() => {
......@@ -164,7 +225,9 @@ export default {
}); */
},
/**
* 分页
* @description: 分页
* @param {Number} val
* @author: 无尘
*/
handleSizeChange(val) {
this.pageSize = val;
......@@ -175,14 +238,18 @@ export default {
this.getData();
},
/**
* 查看定义详情页
* @description: 查看定义详情页
* @param {Number} index
* @param {Object} row
* @author: 无尘
*/
handleShow(index, row) {
const that = this;
window.open(`#/apiListManageShow?editFlag=0&interfaceId=${row.interfaceId}&interfaceName=${row.interfaceName}&interfaceVersionId=${row.interfaceVersionId}&publishRecordId=${row.publishRecordId}&projectId=${row.projectId}&projectName=${that.$route.query.projectName}&interfaceGroupId=${row.interfaceGroupId}&interfaceGroupName=${that.$route.query.interfaceGroupName}`);
},
/**
* 获取数据
* @description: 获取数据
* @author: 无尘
*/
getData() {
const that = this;
......@@ -221,13 +288,6 @@ export default {
that.customDialog = newData;
that.getData();
}
},
/* 接收数据 */
mounted() {
const that = this;
that.customDialog = that.historyShow;
that.getData();
}
};
</script>
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-07-31 19:53:49
* @LastEditors: 无尘
* @LastEditTime: 2020-06-01 14:58:07
* @LastEditTime: 2020-09-24 09:46:58
-->
<!--
<publish-list></publish-list>
......@@ -18,37 +18,70 @@
</el-input>
</div> -->
<div class="table-wrap">
<el-table v-loading="loading" :data="tableData" style="width: 100%">
<el-table-column prop="publishRecordId" label="发布版本" show-overflow-tooltip> </el-table-column>
<el-table-column label="版本号" show-overflow-tooltip>
<el-table
v-loading="loading"
:data="tableData"
style="width: 100%">
<el-table-column
prop="publishRecordId"
label="发布版本"
show-overflow-tooltip />
<el-table-column
label="版本号"
show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.version }}
</template>
</el-table-column>
<el-table-column label="环境" show-overflow-tooltip>
<el-table-column
label="环境"
show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.sceneName }}
</template>
</el-table-column>
<el-table-column label="发布备注" show-overflow-tooltip>
<el-table-column
label="发布备注"
show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.remark }}
</template>
</el-table-column>
<el-table-column label="发布时间" show-overflow-tooltip>
<el-table-column
label="发布时间"
show-overflow-tooltip>
<template slot-scope="scope">
<div class="color-606266 line-18">{{ scope.row.publishTime | timeStampToYmd }}</div>
<div class="color-606266 line-18">{{ scope.row.publishTime | timeStampToHms }}</div>
<div class="color-606266 line-18">
{{ scope.row.publishTime | timeStampToYmd }}
</div>
<div class="color-606266 line-18">
{{ scope.row.publishTime | timeStampToHms }}
</div>
</template>
</el-table-column>
<el-table-column label="操作" show-overflow-tooltip>
<el-table-column
label="操作"
show-overflow-tooltip>
<template slot-scope="scope">
<el-button @click="handleShow(scope.$index, scope.row)" type="text">查看</el-button>
<el-button
type="text"
@click="handleShow(scope.$index, scope.row)">
查看
</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination text-right m-t-14" v-if="!!totalCount">
<dm-pagination small :page-size="pageSize" :current-page="currentPage" layout="prev, pager, next" :total="totalCount" @size-change="handleSizeChange" @current-change="handleCurrentChange"> </dm-pagination>
<div
v-if="!!totalCount"
class="pagination text-right m-t-14">
<dm-pagination
small
:page-size="pageSize"
:current-page="currentPage"
layout="prev, pager, next"
:total="totalCount"
@size-change="handleSizeChange"
@current-change="handleCurrentChange" />
</div>
</div>
</div>
......@@ -58,7 +91,7 @@ import { getRequest } from '@/api/api';
import { _debounce } from '@/assets/js/public';
import errMsg from '@/assets/js/error';
export default {
name: 'publish-list',
name: 'PublishList',
data() {
return {
// 面包屑参数
......@@ -88,25 +121,39 @@ export default {
totalCount: 0
};
},
/* 接收数据 */
mounted() {
const that = this;
that.$nextTick(() => {
that.getData();
});
that.$emit('showTab', 4);
},
methods: {
/**
* 搜索
* @description: 搜索
* @author: 无尘
*/
searchData: _debounce(function(value) {
searchData: _debounce(function() {
const that = this;
that.currentPage == 1;
that.getData();
}, 500),
/**
* 搜索清除
* @description: 搜索清除
* @author: 无尘
*/
clearInput() {
this.currentPage = 1;
this.getData();
},
/**
* 分页
* @description: 分页
* @param {Number} val
* @author: 无尘
*/
handleSizeChange(val) {
this.pageSize = val;
......@@ -117,14 +164,18 @@ export default {
this.getData();
},
/**
* 查看定义详情页
* @description: 查看定义详情页
* @param {Boolean} index
* @param {Object} row
* @author: 无尘
*/
handleShow(index, row) {
const that = this;
that.$router.push(`/apiListManageShow?editFlag=0&interfaceId=${that.$route.query.interfaceId}&interfaceName=${that.$route.query.interfaceName}&projectId=${row.projectId}&projectName=${that.$route.query.projectName}&interfaceGroupId=${row.interfaceGroupId}&interfaceGroupName=${that.$route.query.interfaceGroupName}&interfaceVersionId=${row.interfaceVersionId}&publishRecordId=${row.publishRecordId}`);
},
/**
* 获取数据
* @description: 获取数据
* @author: 无尘
*/
getData() {
const that = this;
......@@ -162,15 +213,6 @@ export default {
}
},
/* 接收数据 */
mounted() {
const that = this;
that.$nextTick(() => {
that.getData();
});
that.$emit('showTab', 4);
}
};
</script>
......
......@@ -9,9 +9,18 @@ import publishSet from '@/components/api/publish-set.vue'
-->
<template>
<div v-show="customDialog">
<el-dialog class="edit-dialog" title="发布" :visible.sync="customDialog" width="600px" :before-close="handleClose">
<el-dialog
class="edit-dialog"
title="发布"
:visible.sync="customDialog"
width="600px"
:before-close="handleClose">
<div class="edit-dialog-body">
<el-form :model="formData" label-width="160px" :rules="rules" ref="publishForm">
<el-form
ref="publishForm"
:model="formData"
label-width="160px"
:rules="rules">
<el-form-item label="API名称:">
{{ $route.query.interfaceName }}
</el-form-item>
......@@ -19,16 +28,33 @@ import publishSet from '@/components/api/publish-set.vue'
{{ formData.sceneName }}
</el-form-item>
<el-form-item label="设置为默认版本:">
<el-switch v-model="formData.defaultFlag" active-text="" inactive-text=""> </el-switch>
<el-switch
v-model="formData.defaultFlag"
active-text=""
inactive-text="" />
</el-form-item>
<el-form-item label="备注:">
<limit-textarea :inputWidth="370" :inputValue.sync="formData.remark" :holder="'请输入备注内容'" :getByType="'word'" :maxLength="100"> </limit-textarea>
<limit-textarea
:input-width="370"
:input-value.sync="formData.remark"
:holder="'请输入备注内容'"
:get-by-type="'word'"
:max-length="100" />
</el-form-item>
</el-form>
</div>
<div slot="footer" class="dialog-footer" style="padding-bottom: 10px;">
<el-button @click="customCancel">取 消</el-button>
<el-button type="primary" @click="customConfirm('publishForm')">发 布</el-button>
<div
slot="footer"
class="dialog-footer"
style="padding-bottom: 10px;">
<el-button @click="customCancel">
取 消
</el-button>
<el-button
type="primary"
@click="customConfirm('publishForm')">
发 布
</el-button>
</div>
</el-dialog>
</div>
......@@ -39,7 +65,7 @@ import { getRequest } from '@/api/api';
import showMsg from '@/assets/js/showmsg';
import errMsg from '@/assets/js/error';
export default {
name: 'publish-set',
name: 'PublishSet',
components: {
limitTextarea
},
......@@ -82,9 +108,19 @@ export default {
rules: {}
};
},
/* 接收数据 */
mounted() {
const that = this;
that.customDialog = that.publishShow;
that.formData = JSON.parse(JSON.stringify(that.editRow));
that.formData.defaultFlag = that.editRow.defaultFlag == 1 ? true : false;
},
methods: {
/**
* 关闭
* @description: 关闭
* @param {Function} done
* @author: 无尘
*/
handleClose(done) {
const that = this;
......@@ -93,7 +129,8 @@ export default {
},
/**
* 取消
* @description: 取消
* @author: 无尘
*/
customCancel() {
const that = this;
......@@ -110,7 +147,9 @@ export default {
},
/**
* 确定同步
* @description: 确定同步
* @param {String} formName
* @author: 无尘
*/
customConfirm(formName) {
const that = this;
......@@ -148,9 +187,10 @@ export default {
},
/**
* 提交数据
* @description: 提交数据
* @author: 无尘
*/
setData(list) {
setData() {
const that = this;
that.$emit('hidePublishDialog', true);
}
......@@ -165,14 +205,6 @@ export default {
that.formData = JSON.parse(JSON.stringify(newData));
that.formData.defaultFlag = newData.defaultFlag == 1 ? true : false;
}
},
/* 接收数据 */
mounted() {
const that = this;
that.customDialog = that.publishShow;
that.formData = JSON.parse(JSON.stringify(that.editRow));
that.formData.defaultFlag = that.editRow.defaultFlag == 1 ? true : false;
}
};
</script>
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-08-05 16:32:37
* @LastEditors: 无尘
* @LastEditTime: 2019-10-21 16:23:47
* @LastEditTime: 2020-09-24 09:42:02
-->
<!--
<record-list
......@@ -17,29 +17,62 @@ import recordList from '@/components/api/record-list.vue'
-->
<template>
<div v-show="customDialog">
<el-dialog class="edit-dialog" title="发布记录" :visible.sync="customDialog" width="600px" :before-close="handleClose">
<el-dialog
class="edit-dialog"
title="发布记录"
:visible.sync="customDialog"
width="600px"
:before-close="handleClose">
<div class="edit-dialog-body">
<el-table :data="tableData" style="width: 100%">
<el-table-column prop="publishRecordId" label="发布版本" show-overflow-tooltip> </el-table-column>
<el-table-column label="发布备注" show-overflow-tooltip>
<el-table
:data="tableData"
style="width: 100%">
<el-table-column
prop="publishRecordId"
label="发布版本"
show-overflow-tooltip />
<el-table-column
label="发布备注"
show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.remark }}
</template>
</el-table-column>
<el-table-column label="发布时间" show-overflow-tooltip>
<el-table-column
label="发布时间"
show-overflow-tooltip>
<template slot-scope="scope">
<div class="color-606266 line-18">{{ scope.row.publishTime | timeStampToYmd }}</div>
<div class="color-606266 line-18">{{ scope.row.publishTime | timeStampToHms }}</div>
<div class="color-606266 line-18">
{{ scope.row.publishTime | timeStampToYmd }}
</div>
<div class="color-606266 line-18">
{{ scope.row.publishTime | timeStampToHms }}
</div>
</template>
</el-table-column>
<el-table-column label="操作" show-overflow-tooltip>
<el-table-column
label="操作"
show-overflow-tooltip>
<template slot-scope="scope">
<el-button @click="handleShow(scope.$index, scope.row)" type="text">查看</el-button>
<el-button
type="text"
@click="handleShow(scope.$index, scope.row)">
查看
</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination text-right m-t-14" v-if="!!totalCount">
<dm-pagination small :page-size="pageSize" :current-page="currentPage" layout="prev, pager, next" :total="totalCount" @size-change="handleSizeChange" @current-change="handleCurrentChange"> </dm-pagination>
<div
v-if="!!totalCount"
class="pagination text-right m-t-14">
<dm-pagination
small
:page-size="pageSize"
:current-page="currentPage"
layout="prev, pager, next"
:total="totalCount"
@size-change="handleSizeChange"
@current-change="handleCurrentChange" />
</div>
</div>
</el-dialog>
......@@ -49,7 +82,7 @@ import recordList from '@/components/api/record-list.vue'
import { getRequest } from '@/api/api';
import errMsg from '@/assets/js/error';
export default {
name: 'record-list',
name: 'RecordList',
props: {
recordShow: {
type: Boolean,
......@@ -100,9 +133,18 @@ export default {
totalCount: 0
};
},
/* 接收数据 */
mounted() {
const that = this;
that.customDialog = that.recordShow;
that.formData = JSON.parse(JSON.stringify(that.editRow));
},
methods: {
/**
* 关闭
* @description: 关闭
* @param {Function} done
* @author: 无尘
*/
handleClose(done) {
const that = this;
......@@ -111,7 +153,8 @@ export default {
},
/**
* 取消
* @description: 取消
* @author: 无尘取消
*/
customCancel() {
const that = this;
......@@ -125,7 +168,9 @@ export default {
},
/**
* 分页
* @description: 分页
* @param {Number} val
* @author: 无尘
*/
handleSizeChange(val) {
this.pageSize = val;
......@@ -136,14 +181,18 @@ export default {
this.getData();
},
/**
* 查看定义详情页
* @description: 查看定义详情页
* @param {Boolean} index
* @param {Object} row
* @author: 无尘
*/
handleShow(index, row) {
const that = this;
that.$router.push(`/apiListManageShow?editFlag=0&interfaceId=${row.interfaceId}&interfaceName=${row.interfaceName}&interfaceVersionId=${row.interfaceVersionId}&publishRecordId=${row.publishRecordId}&projectId=${row.projectId}&projectName=${that.$route.query.projectName}&interfaceGroupId=${row.interfaceGroupId}&interfaceGroupName=${that.$route.query.interfaceGroupName}`);
},
/**
* 获取数据
* @description: 获取数据
* @author: 无尘
*/
getData() {
const that = this;
......@@ -184,13 +233,6 @@ export default {
that.getData();
}
}
},
/* 接收数据 */
mounted() {
const that = this;
that.customDialog = that.recordShow;
that.formData = JSON.parse(JSON.stringify(that.editRow));
}
};
</script>
......
......@@ -9,25 +9,52 @@ import syncSet from '@/components/api/sync-set.vue'
-->
<template>
<div v-show="customDialog">
<el-dialog class="edit-dialog" title="同步" :visible.sync="customDialog" width="424px" :before-close="handleClose">
<el-dialog
class="edit-dialog"
title="同步"
:visible.sync="customDialog"
width="424px"
:before-close="handleClose">
<div class="edit-dialog-body">
<el-form :model="formData" label-width="110px" :rules="rules" ref="syncForm">
<el-form
ref="syncForm"
:model="formData"
label-width="110px"
:rules="rules">
<el-form-item label="API名称:">
{{ $route.query.interfaceName }}
</el-form-item>
<el-form-item label="API版本:">
{{ formData.version }}
</el-form-item>
<el-form-item label="同步至环境:" prop="sceneCode">
<el-select class="w-190" v-model="formData.sceneCode" placeholder="请选择">
<el-option v-for="item in envOptions" :key="item.sceneCode" :label="item.sceneName" :value="item.sceneCode"> </el-option>
<el-form-item
label="同步至环境:"
prop="sceneCode">
<el-select
v-model="formData.sceneCode"
class="w-190"
placeholder="请选择">
<el-option
v-for="item in envOptions"
:key="item.sceneCode"
:label="item.sceneName"
:value="item.sceneCode" />
</el-select>
</el-form-item>
</el-form>
</div>
<div slot="footer" class="dialog-footer" style="padding-bottom: 10px;">
<el-button @click="customCancel">取 消</el-button>
<el-button type="primary" @click="customConfirm('syncForm')">同 步</el-button>
<div
slot="footer"
class="dialog-footer"
style="padding-bottom: 10px;">
<el-button @click="customCancel">
取 消
</el-button>
<el-button
type="primary"
@click="customConfirm('syncForm')">
同 步
</el-button>
</div>
</el-dialog>
</div>
......@@ -37,7 +64,7 @@ import { getRequest } from '@/api/api';
import showMsg from '@/assets/js/showmsg';
import errMsg from '@/assets/js/error';
export default {
name: 'sync-set',
name: 'SyncSet',
props: {
syncShow: {
type: Boolean,
......@@ -70,7 +97,7 @@ export default {
sceneCode: ''
},
rules: {
sceneCode: [{ required: true, message: '请选择环境', trigger: 'change' }]
sceneCode: [ { required: true, message: '请选择环境', trigger: 'change' } ]
},
envOptions: [
/* {
......@@ -84,9 +111,19 @@ export default {
]
};
},
/* 接收数据 */
mounted() {
const that = this;
that.getEnvData();
that.customDialog = that.syncShow;
that.formData = JSON.parse(JSON.stringify(that.editRow));
},
methods: {
/**
* 关闭
* @description: 关闭
* @param {Function} done
* @author: 无尘
*/
handleClose(done) {
const that = this;
......@@ -95,7 +132,8 @@ export default {
},
/**
* 取消
* @description: 取消
* @author: 无尘
*/
customCancel() {
const that = this;
......@@ -112,7 +150,10 @@ export default {
},
/**
* 确定同步
* @description: 确定同步
* @param {String} formName
* @returns {Boolean}
* @author: 无尘
*/
customConfirm(formName) {
const that = this;
......@@ -153,14 +194,16 @@ export default {
},
/**
* 提交数据
* @description: 提交数据
* @author: 无尘
*/
setData(list) {
setData() {
const that = this;
that.$emit('hideSyncDialog');
},
/**
* 获取环境列表
* @description: 获取环境列表
* @author: 无尘
*/
getEnvData() {
const that = this;
......@@ -190,14 +233,6 @@ export default {
const that = this;
that.formData = JSON.parse(JSON.stringify(newData));
}
},
/* 接收数据 */
mounted() {
const that = this;
that.getEnvData();
that.customDialog = that.syncShow;
that.formData = JSON.parse(JSON.stringify(that.editRow));
}
};
</script>
......
......@@ -14,38 +14,90 @@ import tableTr from '@/components/api/table-tr.vue';
<template>
<div>
<template v-for="(itemValue, itemName, index) in itemData">
<table cellspacing="0" cellpadding="0" border="0" class="el-table__body" style="width: 100%;table-layout: fixed;" :key="index + itemName + 121">
<table
:key="index + itemName + 121"
cellspacing="0"
cellpadding="0"
border="0"
class="el-table__body"
style="width: 100%;table-layout: fixed;">
<tbody>
<tr class="el-table__row">
<td rowspan="1" colspan="1" class="el-table_1_column_1" style="width: 36px;">
<div v-if="itemValue.type == 'object' || itemValue.type == 'array'" class="cell"><i class="el-icon-minus"></i></div>
<td
rowspan="1"
colspan="1"
class="el-table_1_column_1"
style="width: 36px;">
<div
v-if="itemValue.type == 'object' || itemValue.type == 'array'"
class="cell">
<i class="el-icon-minus" />
</div>
</td>
<td rowspan="1" colspan="1" class="el-table_1_column_1">
<td
rowspan="1"
colspan="1"
class="el-table_1_column_1">
<div class="cell el-tooltip">
<el-tooltip class="item" effect="dark" :content="itemName" placement="top">
<el-tooltip
class="item"
effect="dark"
:content="itemName"
placement="top">
<span>{{ itemName }}</span>
</el-tooltip>
</div>
</td>
<td rowspan="1" colspan="1" class="el-table_1_column_1">
<div class="cell el-tooltip">{{ itemValue.frontOriginType }}</div>
<td
rowspan="1"
colspan="1"
class="el-table_1_column_1">
<div class="cell el-tooltip">
{{ itemValue.frontOriginType }}
</div>
</td>
<td rowspan="1" colspan="1" class="el-table_1_column_2">
<div class="cell el-tooltip">{{ itemValue.type }}</div>
<td
rowspan="1"
colspan="1"
class="el-table_1_column_2">
<div class="cell el-tooltip">
{{ itemValue.type }}
</div>
</td>
<td rowspan="1" colspan="1" class="el-table_1_column_3">
<div class="cell el-tooltip"><el-checkbox disabled="true" v-model="itemValue.check"></el-checkbox></div>
<td
rowspan="1"
colspan="1"
class="el-table_1_column_3">
<div class="cell el-tooltip">
<el-checkbox
v-model="itemValue.check"
disabled="true" />
</div>
</td>
<td rowspan="1" colspan="1" class="el-table_1_column_3">
<td
rowspan="1"
colspan="1"
class="el-table_1_column_3">
<div class="cell el-tooltip">
<el-tooltip class="item" effect="dark" :content="itemValue.example" placement="top">
<el-tooltip
class="item"
effect="dark"
:content="itemValue.example"
placement="top">
<span>{{ itemValue.example }}</span>
</el-tooltip>
</div>
</td>
<td rowspan="1" colspan="1" class="el-table_1_column_3">
<td
rowspan="1"
colspan="1"
class="el-table_1_column_3">
<div class="cell el-tooltip">
<el-tooltip class="item" effect="dark" :content="itemValue.description" placement="top">
<el-tooltip
class="item"
effect="dark"
:content="itemValue.description"
placement="top">
<span>{{ itemValue.description }}</span>
</el-tooltip>
</div>
......@@ -53,17 +105,27 @@ import tableTr from '@/components/api/table-tr.vue';
</tr>
</tbody>
</table>
<table-row class="el-table__row" style="padding-left: 10px;" v-if="itemValue.type == 'array'" :itemData="itemValue.items.properties" :key="index + '122' + itemName"> </table-row>
<table-row class="el-table__row" style="padding-left: 10px;" v-if="itemValue.type == 'object'" :itemData="itemValue.properties" :key="index + '122' + itemName"> </table-row>
<table-row
v-if="itemValue.type == 'array'"
:key="index + '122' + itemName"
class="el-table__row"
style="padding-left: 10px;"
:item-data="itemValue.items.properties" />
<table-row
v-if="itemValue.type == 'object'"
:key="index + '122' + itemName"
class="el-table__row"
style="padding-left: 10px;"
:item-data="itemValue.properties" />
</template>
</div>
</template>
<script>
export default {
name: 'table-row',
name: 'TableRow',
props: {
itemData: {
type: [Object, Array],
type: [ Object, Array ],
default() {
return {};
}
......@@ -76,41 +138,41 @@ export default {
interfaceUrl: '/',
requestType: 'post',
frontParams: {
type: 'object', //object,array,string,number,boolean,
type: 'object', // object,array,string,number,boolean,
properties: {
name: {
originType: 'query', //来源类型 query,body,header
originType: 'query', // 来源类型 query,body,header
type: 'object',
isBackendField: 0, //是否后端字段
defaultVal: 'val', //默认值
isRootKey: 0, //是否是后端参数字段
rootKey: '', //后端参数字段
objectClass: '', //如果是object 并且是dubbo
isBackendField: 0, // 是否后端字段
defaultVal: 'val', // 默认值
isRootKey: 0, // 是否是后端参数字段
rootKey: '', // 后端参数字段
objectClass: '', // 如果是object 并且是dubbo
description: '描述',
check: true,
required: [],
properties: {
nameId: {
originType: 'query', //来源类型 query,body,header
originType: 'query', // 来源类型 query,body,header
type: 'object',
isBackendField: 0, //是否后端字段
defaultVal: 'val', //默认值
isRootKey: 0, //是否是后端参数字段
rootKey: '', //后端参数字段
objectClass: '', //如果是object 并且是dubbo
isBackendField: 0, // 是否后端字段
defaultVal: 'val', // 默认值
isRootKey: 0, // 是否是后端参数字段
rootKey: '', // 后端参数字段
objectClass: '', // 如果是object 并且是dubbo
description: '描述',
check: true
}
}
},
id: {
originType: 'query', //来源类型 query,body,header
originType: 'query', // 来源类型 query,body,header
type: 'string',
isBackendField: 0, //是否后端字段
defaultVal: 'val', //默认值
isRootKey: 0, //是否是后端参数字段
rootKey: '', //后端参数字段
objectClass: '', //如果是object 并且是dubbo
isBackendField: 0, // 是否后端字段
defaultVal: 'val', // 默认值
isRootKey: 0, // 是否是后端参数字段
rootKey: '', // 后端参数字段
objectClass: '', // 如果是object 并且是dubbo
description: '描述',
check: true
}
......@@ -120,16 +182,16 @@ export default {
}
};
},
mounted() {
const that = this;
that.trData = that.itemData;
},
watch: {
itemData: function(newData, oldData) {
const that = this;
that.trData = newData;
}
},
mounted() {
const that = this;
that.trData = that.itemData;
}
};
</script>
......
......@@ -14,39 +14,81 @@ import backTableLeft from '@/components/createApi/back-table-left.vue';
<template>
<div>
<template v-for="(itemValue, itemName, index) in itemData.properties">
<table v-if="!itemValue.constFlag" cellspacing="0" cellpadding="0" border="0" class="el-table__body" style="width: 100%;table-layout: fixed;" :key="index + itemName + 121">
<table
v-if="!itemValue.constFlag"
:key="index + itemName + 121"
cellspacing="0"
cellpadding="0"
border="0"
class="el-table__body"
style="width: 100%;table-layout: fixed;">
<tbody>
<tr class="el-table__row">
<td rowspan="1" colspan="1" class="el-table_1_column_1" style="width: 36px;">
<div v-if="itemValue.type == 'object' || itemValue.type == 'array'" class="cell"><i class="el-icon-minus"></i></div>
<td
rowspan="1"
colspan="1"
class="el-table_1_column_1"
style="width: 36px;">
<div
v-if="itemValue.type == 'object' || itemValue.type == 'array'"
class="cell">
<i class="el-icon-minus" />
</div>
</td>
<td rowspan="1" colspan="1" class="el-table_1_column_1">
<td
rowspan="1"
colspan="1"
class="el-table_1_column_1">
<div class="cell el-tooltip">
<el-tooltip class="item" effect="dark" :content="itemName" placement="top">
<el-tooltip
class="item"
effect="dark"
:content="itemName"
placement="top">
<span>{{ itemName }}</span>
</el-tooltip>
</div>
</td>
<td rowspan="1" colspan="1" class="el-table_1_column_2">
<div class="cell el-tooltip">{{ itemValue.frontOriginType }}</div>
<td
rowspan="1"
colspan="1"
class="el-table_1_column_2">
<div class="cell el-tooltip">
{{ itemValue.frontOriginType }}
</div>
</td>
<td rowspan="1" colspan="1" class="el-table_1_column_2">
<div class="cell el-tooltip">{{ itemValue.type }}</div>
<td
rowspan="1"
colspan="1"
class="el-table_1_column_2">
<div class="cell el-tooltip">
{{ itemValue.type }}
</div>
</td>
</tr>
</tbody>
</table>
<back-table-row class="el-table__row" style="padding-left: 10px;" v-if="itemValue.type == 'array' && Object.keys(itemValue.items.properties).length" :itemData="itemValue.items" :key="index + '122' + itemName"> </back-table-row>
<back-table-row class="el-table__row" style="padding-left: 10px;" v-if="itemValue.type == 'object' && Object.keys(itemValue.properties).length" :itemData="itemValue" :key="index + '122' + itemName"> </back-table-row>
<back-table-row
v-if="itemValue.type == 'array' && Object.keys(itemValue.items.properties).length"
:key="index + '122' + itemName"
class="el-table__row"
style="padding-left: 10px;"
:item-data="itemValue.items" />
<back-table-row
v-if="itemValue.type == 'object' && Object.keys(itemValue.properties).length"
:key="index + '122' + itemName"
class="el-table__row"
style="padding-left: 10px;"
:item-data="itemValue" />
</template>
</div>
</template>
<script>
export default {
name: 'back-table-row',
name: 'BackTableRow',
props: {
itemData: {
type: [Object, Array],
type: [ Object, Array ],
default() {
return {};
}
......@@ -57,16 +99,16 @@ export default {
trData: {}
};
},
mounted() {
const that = this;
that.trData = that.itemData;
},
watch: {
itemData: function(newData, oldData) {
const that = this;
that.trData = newData;
}
},
mounted() {
const that = this;
that.trData = that.itemData;
}
};
</script>
......
......@@ -13,33 +13,84 @@ import createBase from '@/components/api/create-base.vue';
-->
<template>
<div class="base-info-show border-box">
<el-form label-width="104px" :model="apiInfoData" ref="baseForm" :rules="rules">
<el-form-item label="API名称:" prop="interfaceName">
<limitInput :inputWidth="329" :disflag="$route.query.interfaceId ? true : false" :inputValue.sync="apiInfoData.interfaceName" :holder="'请输入API名称'" :getByType="'word'" :maxLength="20"> </limitInput>
<el-form
ref="baseForm"
label-width="104px"
:model="apiInfoData"
:rules="rules">
<el-form-item
label="API名称:"
prop="interfaceName">
<limit-input
:input-width="329"
:disflag="$route.query.interfaceId ? true : false"
:input-value.sync="apiInfoData.interfaceName"
:holder="'请输入API名称'"
:get-by-type="'word'"
:max-length="20" />
</el-form-item>
<el-form-item label="API类型:" prop="target">
<el-radio-group v-model="apiInfoData.target" :disabled="$route.query.interfaceId ? true : false">
<el-radio label="1">公开</el-radio>
<el-radio label="0">私有</el-radio>
<el-form-item
label="API类型:"
prop="target">
<el-radio-group
v-model="apiInfoData.target"
:disabled="$route.query.interfaceId ? true : false">
<el-radio label="1">
公开
</el-radio>
<el-radio label="0">
私有
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="访问类型:" prop="optType">
<el-select v-model="apiInfoData.optType" placeholder="请选择" :disabled="$route.query.interfaceId ? true : false">
<el-option label="list" value="list"></el-option>
<el-option label="delete" value="delete"></el-option>
<el-option label="update" value="update"></el-option>
<el-option label="get" value="get"></el-option>
<el-option label="search" value="search"></el-option>
<el-form-item
label="访问类型:"
prop="optType">
<el-select
v-model="apiInfoData.optType"
placeholder="请选择"
:disabled="$route.query.interfaceId ? true : false">
<el-option
label="list"
value="list" />
<el-option
label="delete"
value="delete" />
<el-option
label="update"
value="update" />
<el-option
label="get"
value="get" />
<el-option
label="search"
value="search" />
</el-select>
</el-form-item>
<el-form-item label="请求路径:" prop="interfaceUrl">
<el-input class="w-329" :disabled="$route.query.interfaceId ? true : false" v-model="apiInfoData.interfaceUrl" @blur="blurInterfaceUrl"></el-input>
<el-form-item
label="请求路径:"
prop="interfaceUrl">
<el-input
v-model="apiInfoData.interfaceUrl"
class="w-329"
:disabled="$route.query.interfaceId ? true : false"
@blur="blurInterfaceUrl" />
</el-form-item>
<el-form-item label="描述:">
<limit-textarea :inputWidth="500" :disInput="$route.query.interfaceId ? true : false" :inputValue.sync="apiInfoData.interfaceDescribe" :holder="''" :getByType="'word'" :maxLength="100"> </limit-textarea>
<limit-textarea
:input-width="500"
:dis-input="$route.query.interfaceId ? true : false"
:input-value.sync="apiInfoData.interfaceDescribe"
:holder="''"
:get-by-type="'word'"
:max-length="100" />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm('baseForm')">下一步</el-button>
<el-button
type="primary"
@click="submitForm('baseForm')">
下一步
</el-button>
</el-form-item>
</el-form>
</div>
......@@ -51,7 +102,7 @@ import { getRequest } from '@/api/api';
import showMsg from '@/assets/js/showmsg';
import errMsg from '@/assets/js/error';
export default {
name: 'create-base',
name: 'CreateBase',
components: {
limitTextarea,
limitInput
......@@ -69,11 +120,21 @@ export default {
interfaceDescribe: ''
},
rules: {
interfaceName: [{ required: true, message: '请输入API名称', trigger: 'blur' }],
interfaceUrl: [{ required: true, message: '请输入请求路径', trigger: 'blur' }]
interfaceName: [ { required: true, message: '请输入API名称', trigger: 'blur' } ],
interfaceUrl: [ { required: true, message: '请输入请求路径', trigger: 'blur' } ]
}
};
},
mounted() {
const that = this;
/* eslint-disable */
if (that.$route.query.interfaceId && !Object.keys(that.$store.state.baseInfo).length) {
that.getData();
}
if (Object.keys(that.$store.state.baseInfo).length) {
that.apiInfoData = that.$store.state.baseInfo;
}
},
methods: {
submitForm(formName) {
const that = this;
......@@ -298,16 +359,6 @@ export default {
});
});
}
},
mounted() {
const that = this;
/* eslint-disable */
if (that.$route.query.interfaceId && !Object.keys(that.$store.state.baseInfo).length) {
that.getData();
}
if (Object.keys(that.$store.state.baseInfo).length) {
that.apiInfoData = that.$store.state.baseInfo;
}
}
};
</script>
......
......@@ -6,47 +6,100 @@ import resultTable from '@/components/createApi/result-table.vue';
<template>
<div>
<template v-for="(itemValue, itemName, index) in itemData.properties">
<table cellspacing="0" cellpadding="0" border="0" class="el-table__body" style="width: 100%; table-layout: fixed;" :key="index + itemName + 121">
<table
:key="index + itemName + 121"
cellspacing="0"
cellpadding="0"
border="0"
class="el-table__body"
style="width: 100%; table-layout: fixed;">
<tbody>
<tr class="el-table__row">
<td rowspan="1" colspan="1" class="el-table_1_column_1">
<td
rowspan="1"
colspan="1"
class="el-table_1_column_1">
<div class="cell">
<el-input v-model="itemValue.currentKey" :disabled="itemValue.type == 'array' || itemValue.type == 'object'" @blur="blurKey(itemValue, itemName)"></el-input>
<el-input
v-model="itemValue.currentKey"
:disabled="itemValue.type == 'array' || itemValue.type == 'object'"
@blur="blurKey(itemValue, itemName)" />
</div>
</td>
<td rowspan="1" colspan="1" class="el-table_1_column_2">
<td
rowspan="1"
colspan="1"
class="el-table_1_column_2">
<div class="cell">
<el-select v-model="itemValue.type" placeholder="请选择参数类型" @change="changeType(itemValue.type, itemValue, itemValue.currentKey, itemValue.level)">
<el-option label="string" value="string"></el-option>
<el-option label="number" value="number"></el-option>
<el-option label="boolean" value="boolean"></el-option>
<el-option label="object" value="object"></el-option>
<el-option label="array" value="array"></el-option>
<el-select
v-model="itemValue.type"
placeholder="请选择参数类型"
@change="changeType(itemValue.type, itemValue, itemValue.currentKey, itemValue.level)">
<el-option
label="string"
value="string" />
<el-option
label="number"
value="number" />
<el-option
label="boolean"
value="boolean" />
<el-option
label="object"
value="object" />
<el-option
label="array"
value="array" />
</el-select>
</div>
</td>
<td rowspan="1" colspan="1" class="el-table_1_column_3">
<td
rowspan="1"
colspan="1"
class="el-table_1_column_3">
<div class="cell">
<el-input v-model="itemValue.example"></el-input>
<el-input v-model="itemValue.example" />
</div>
</td>
<td rowspan="1" colspan="1" class="el-table_1_column_3">
<td
rowspan="1"
colspan="1"
class="el-table_1_column_3">
<div class="cell">
<el-button v-if="itemValue.type == 'array' || itemValue.type == 'object'" type="text" @click="handleAdd(itemValue, itemValue.currentKey, index, itemValue.level)">添加子属性</el-button>
<el-button type="text" @click="handleDel(itemValue.parentKey, itemValue.currentKey, index, itemValue.level)">删除</el-button>
<el-button
v-if="itemValue.type == 'array' || itemValue.type == 'object'"
type="text"
@click="handleAdd(itemValue, itemValue.currentKey, index, itemValue.level)">
添加子属性
</el-button>
<el-button
type="text"
@click="handleDel(itemValue.parentKey, itemValue.currentKey, index, itemValue.level)">
删除
</el-button>
</div>
</td>
</tr>
</tbody>
</table>
<body-row class="el-table__row" style="padding-left: 10px;" v-if="itemValue.type == 'array' && Object.keys(itemValue.items.properties).length" :itemData="itemValue.items" :key="index + '122' + itemName"> </body-row>
<body-row class="el-table__row" style="padding-left: 10px;" v-if="itemValue.type == 'object' && Object.keys(itemValue.properties).length" :itemData="itemValue" :key="index + '122' + itemName"> </body-row>
<body-row
v-if="itemValue.type == 'array' && Object.keys(itemValue.items.properties).length"
:key="index + '122' + itemName"
class="el-table__row"
style="padding-left: 10px;"
:item-data="itemValue.items" />
<body-row
v-if="itemValue.type == 'object' && Object.keys(itemValue.properties).length"
:key="index + '122' + itemName"
class="el-table__row"
style="padding-left: 10px;"
:item-data="itemValue" />
</template>
</div>
</template>
<script>
export default {
name: 'body-row',
name: 'BodyRow',
props: {
itemData: {
type: Object,
......@@ -61,9 +114,16 @@ export default {
keyLength: 1 // 记录生成 obj key的标志
};
},
mounted() {
const that = this;
that.trData = JSON.parse(JSON.stringify(that.itemData));
},
methods: {
/**
* key 输入变化
* @description: key 输入变化
* @param {Object} obj
* @param {String} oldKey
* @author: 无尘
*/
blurKey(obj, oldKey) {
const that = this;
......@@ -73,7 +133,9 @@ export default {
}
},
/**
* 更新参数名字段
* @description: 更新参数名字段
* @param {Object} itemData
* @author: 无尘
*/
updateKey(itemData) {
const that = this;
......@@ -91,7 +153,13 @@ export default {
}
},
/**
* 删除一项
* @description: 删除一项
* @param {String} parentKey
* @param {String} itemKey
* @param {Number} index
* @param {Number} level
* @returns {Boolean}
* @author: 无尘
*/
async handleDel(parentKey, itemKey, index, level) {
const that = this;
......@@ -115,7 +183,12 @@ export default {
}
},
/**
* 修改 type
* @description: 修改 type
* @param {String} type
* @param {Object} obj
* @param {String} itemKey
* @param {Number} level
* @author: 无尘
*/
changeType(type, obj, itemKey, level) {
const that = this;
......@@ -131,7 +204,7 @@ export default {
currentKey: 'items',
level: parseInt(level) + 1, // 层级
type: 'string',
defaultVal: 'val', //默认值
defaultVal: 'val', // 默认值
description: '描述',
example: '示例',
properties: {}
......@@ -140,10 +213,13 @@ export default {
that.$forceUpdate();
},
/**
* 添加子属性
* {
* properties: {}
* }
* @description: 添加子属性
* @param {Object} obj
* @param {String} itemKey
* @param {Number} index
* @param {Number} level
* @returns {Boolean}
* @author: 无尘
*/
handleAdd(obj, itemKey, index, level) {
const that = this;
......@@ -184,10 +260,6 @@ export default {
that.trData = JSON.parse(JSON.stringify(newData));
}
}
},
mounted() {
const that = this;
that.trData = JSON.parse(JSON.stringify(that.itemData));
}
};
</script>
......
......@@ -16,20 +16,54 @@ import webEditor from '@/components/createApi/web-editor.vue'
-->
<template>
<div v-show="customDialog">
<el-dialog class="edit-dialog" title="导入json" :visible.sync="customDialog" width="600px" :before-close="handleClose">
<el-dialog
class="edit-dialog"
title="导入json"
:visible.sync="customDialog"
width="600px"
:before-close="handleClose">
<div class="edit-dialog-body">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="JSON" name="first">
<editor ref="myEditorJson" v-model="contentJson" @init="editorInit" lang="json" theme="chrome" width="500" height="300"></editor>
<el-tabs
v-model="activeName"
@tab-click="handleClick">
<el-tab-pane
label="JSON"
name="first">
<editor
ref="myEditorJson"
v-model="contentJson"
lang="json"
theme="chrome"
width="500"
height="300"
@init="editorInit" />
</el-tab-pane>
<el-tab-pane label="JSON-SCHEMA" name="second">
<editor ref="myEditorJsonSchema" v-model="contentJsonSchema" @init="editorInit" lang="json" theme="chrome" width="500" height="300"></editor>
<el-tab-pane
label="JSON-SCHEMA"
name="second">
<editor
ref="myEditorJsonSchema"
v-model="contentJsonSchema"
lang="json"
theme="chrome"
width="500"
height="300"
@init="editorInit" />
</el-tab-pane>
</el-tabs>
</div>
<div slot="footer" class="dialog-footer" style="padding-bottom: 10px;">
<el-button @click="customCancel">取消</el-button>
<el-button type="primary" @click="customConfirm('importForm')">确定</el-button>
<div
slot="footer"
class="dialog-footer"
style="padding-bottom: 10px;">
<el-button @click="customCancel">
取消
</el-button>
<el-button
type="primary"
@click="customConfirm('importForm')">
确定
</el-button>
</div>
</el-dialog>
</div>
......
......@@ -5,39 +5,83 @@ import envList from '@/components/env/env-list.vue';
<template>
<div>
<div class="search-wrap m-b-20 flex flex-space-between">
<el-input clearable class="w-320 serach" placeholder="请输入发布版本" v-model="searchValue" @keyup.native="value => searchData(value)" @clear="clearInput">
<i slot="prefix" class="el-input__icon el-icon-search"></i>
<el-input
v-model="searchValue"
clearable
class="w-320 serach"
placeholder="请输入发布版本"
@keyup.native="value => searchData(value)"
@clear="clearInput">
<i
slot="prefix"
class="el-input__icon el-icon-search" />
</el-input>
<el-button type="primary" @click="editEnv">新建环境</el-button>
<el-button
type="primary"
@click="editEnv">
新建环境
</el-button>
</div>
<div class="table-wrap">
<el-table v-loading="loading" :data="tableData" style="width: 100%">
<el-table-column prop="sceneName" label="环境名称" show-overflow-tooltip> </el-table-column>
<el-table-column label="环境code" show-overflow-tooltip>
<el-table
v-loading="loading"
:data="tableData"
style="width: 100%">
<el-table-column
prop="sceneName"
label="环境名称"
show-overflow-tooltip />
<el-table-column
label="环境code"
show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.sceneCode }}
</template>
</el-table-column>
<el-table-column label="环境域名" show-overflow-tooltip>
<el-table-column
label="环境域名"
show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.domainUrl }}
</template>
</el-table-column>
<el-table-column label="默认环境" show-overflow-tooltip>
<el-table-column
label="默认环境"
show-overflow-tooltip>
<template slot-scope="scope">
<el-switch v-model="scope.row.defaultFlag" active-text="" inactive-text="" @change="changeEnv(scope.row, scope.row.defaultFlag)"> </el-switch>
<el-switch
v-model="scope.row.defaultFlag"
active-text=""
inactive-text=""
@change="changeEnv(scope.row, scope.row.defaultFlag)" />
</template>
</el-table-column>
<el-table-column label="创建时间" show-overflow-tooltip>
<el-table-column
label="创建时间"
show-overflow-tooltip>
<template slot-scope="scope">
<div class="color-606266 line-18">{{ scope.row.createTime | timeStampToYmd }}</div>
<div class="color-606266 line-18">{{ scope.row.createTime | timeStampToHms }}</div>
<div class="color-606266 line-18">
{{ scope.row.createTime | timeStampToYmd }}
</div>
<div class="color-606266 line-18">
{{ scope.row.createTime | timeStampToHms }}
</div>
</template>
</el-table-column>
<el-table-column label="操作" show-overflow-tooltip>
<el-table-column
label="操作"
show-overflow-tooltip>
<template slot-scope="scope">
<el-button @click="handleEdit(scope.$index, scope.row)" type="text">编辑</el-button>
<el-button @click="handleDel(scope.$index, scope.row)" type="text">删除</el-button>
<el-button
type="text"
@click="handleEdit(scope.$index, scope.row)">
编辑
</el-button>
<el-button
type="text"
@click="handleDel(scope.$index, scope.row)">
删除
</el-button>
</template>
</el-table-column>
</el-table>
......@@ -45,7 +89,10 @@ import envList from '@/components/env/env-list.vue';
<dm-pagination small :page-size="pageSize" :current-page="currentPage" layout="prev, pager, next" :total="totalCount" @size-change="handleSizeChange" @current-change="handleCurrentChange"> </dm-pagination>
</div> -->
</div>
<new-env :editRow="editRow" :showDialog="showDialog" @hideDialog="hideDialog"> </new-env>
<new-env
:edit-row="editRow"
:show-dialog="showDialog"
@hideDialog="hideDialog" />
</div>
</template>
<script>
......@@ -55,7 +102,10 @@ import { _debounce } from '@/assets/js/public';
import showMsg from '@/assets/js/showmsg';
import errMsg from '@/assets/js/error';
export default {
name: 'env-list',
name: 'EnvList',
components: {
newEnv
},
data() {
return {
searchValue: '',
......@@ -77,12 +127,14 @@ export default {
editRow: {}
};
},
components: {
newEnv
mounted() {
const that = this;
that.getData();
},
methods: {
/**
* 编辑环境
* @description: 编辑环境
* @author: 无尘
*/
editEnv() {
const that = this;
......@@ -112,7 +164,8 @@ export default {
that.$forceUpdate();
},
/**
* 搜索
* @description: 搜索
* @author: 无尘
*/
searchData: _debounce(function(value) {
const that = this;
......@@ -121,14 +174,17 @@ export default {
}, 500),
/**
* 搜索清除
* @description: 搜索清除
* @author: 无尘
*/
clearInput() {
this.currentPage = 1;
this.getData();
},
/**
* 分页
* @description: 分页
* @param {Number} val
* @author: 无尘
*/
handleSizeChange(val) {
this.pageSize = val;
......@@ -139,7 +195,10 @@ export default {
this.getData();
},
/**
* 编辑
* @description: 编辑
* @param {Number} index
* @param {Object} row
* @author: 无尘
*/
handleEdit(index, row) {
const that = this;
......@@ -148,7 +207,10 @@ export default {
that.showDialog = true;
},
/**
* 删除
* @description: 删除
* @param {Number} index
* @param {Object} row
* @author: 无尘
*/
handleDel(index, row) {
const that = this;
......@@ -186,7 +248,10 @@ export default {
});
},
/**
* 改变默认环境
* @description: 改变默认环境
* @param {Object} row
* @param {Boolean} val
* @author: 无尘
*/
changeEnv(row, val) {
const that = this;
......@@ -216,7 +281,8 @@ export default {
});
},
/**
* 获取数据
* @description: 获取数据
* @author: 无尘
*/
getData() {
const that = this;
......@@ -245,10 +311,6 @@ export default {
});
});
}
},
mounted() {
const that = this;
that.getData();
}
};
</script>
......
......@@ -5,42 +5,100 @@ import envSetList from '@/components/env/env-set-list.vue';
<template>
<div>
<div class="search-wrap m-b-20 flex flex-space-between">
<el-input clearable class="w-320" placeholder="请输入配置名称/code" v-model="searchValue" @keyup.native="value => searchData(value)" @clear="clearInput">
<i slot="prefix" class="el-input__icon el-icon-search"></i>
<el-input
v-model="searchValue"
clearable
class="w-320"
placeholder="请输入配置名称/code"
@keyup.native="value => searchData(value)"
@clear="clearInput">
<i
slot="prefix"
class="el-input__icon el-icon-search" />
</el-input>
<div class="search-wrap-right">
<el-button type="primary" @click="toCreatSet">新建配置</el-button
><el-radio-group class="m-l-10" v-model="proxyType" @change="changeType">
<el-radio-button label="0">http</el-radio-button>
<el-radio-button label="1">dubbo</el-radio-button>
<el-button
type="primary"
@click="toCreatSet">
新建配置
</el-button><el-radio-group
v-model="proxyType"
class="m-l-10"
@change="changeType">
<el-radio-button label="0">
http
</el-radio-button>
<el-radio-button label="1">
dubbo
</el-radio-button>
</el-radio-group>
</div>
</div>
<div class="table-wrap">
<el-table v-loading="loading" :data="tableData" style="width: 100%">
<el-table-column prop="proxyName" label="配置名称" show-overflow-tooltip> </el-table-column>
<el-table-column prop="proxyCode" label="配置code" show-overflow-tooltip> </el-table-column>
<el-table-column label="描述" show-overflow-tooltip>
<el-table
v-loading="loading"
:data="tableData"
style="width: 100%">
<el-table-column
prop="proxyName"
label="配置名称"
show-overflow-tooltip />
<el-table-column
prop="proxyCode"
label="配置code"
show-overflow-tooltip />
<el-table-column
label="描述"
show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.description }}
</template>
</el-table-column>
<el-table-column label="创建时间" show-overflow-tooltip>
<el-table-column
label="创建时间"
show-overflow-tooltip>
<template slot-scope="scope">
<div class="color-606266 line-18">{{ scope.row.createTime | timeStampToYmd }}</div>
<div class="color-606266 line-18">{{ scope.row.createTime | timeStampToHms }}</div>
<div class="color-606266 line-18">
{{ scope.row.createTime | timeStampToYmd }}
</div>
<div class="color-606266 line-18">
{{ scope.row.createTime | timeStampToHms }}
</div>
</template>
</el-table-column>
<el-table-column label="操作" show-overflow-tooltip>
<el-table-column
label="操作"
show-overflow-tooltip>
<template slot-scope="scope">
<el-button @click="handleShow(scope.$index, scope.row)" type="text">查看</el-button>
<el-button @click="handleEdit(scope.$index, scope.row)" type="text">编辑</el-button>
<el-button @click="handleDel(scope.$index, scope.row)" type="text">删除</el-button>
<el-button
type="text"
@click="handleShow(scope.$index, scope.row)">
查看
</el-button>
<el-button
type="text"
@click="handleEdit(scope.$index, scope.row)">
编辑
</el-button>
<el-button
type="text"
@click="handleDel(scope.$index, scope.row)">
删除
</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination text-right m-t-14" v-if="!!totalCount">
<dm-pagination small :page-size="pageSize" :current-page="currentPage" layout="prev, pager, next" :total="totalCount" @size-change="handleSizeChange" @current-change="handleCurrentChange"> </dm-pagination>
<div
v-if="!!totalCount"
class="pagination text-right m-t-14">
<dm-pagination
small
:page-size="pageSize"
:current-page="currentPage"
layout="prev, pager, next"
:total="totalCount"
@size-change="handleSizeChange"
@current-change="handleCurrentChange" />
</div>
</div>
</div>
......@@ -51,7 +109,7 @@ import { _debounce } from '@/assets/js/public';
import showMsg from '@/assets/js/showmsg';
import errMsg from '@/assets/js/error';
export default {
name: 'env-set-list',
name: 'EnvSetList',
data() {
return {
proxyType: '0', // http: 0, dubbo: 1
......@@ -72,16 +130,22 @@ export default {
totalCount: 0
};
},
mounted() {
const that = this;
that.getData();
},
methods: {
/**
* 新建配置
* @description: 新建配置
* @author: 无尘
*/
toCreatSet() {
const that = this;
that.$router.push(`/createEnvSet?proxyType=${that.proxyType}`);
},
/**
* 搜索
* @description: 搜索
* @author: 无尘
*/
searchData: _debounce(function(value) {
const that = this;
......@@ -90,22 +154,26 @@ export default {
}, 500),
/**
* 搜索清除
* @description: 搜索清除
* @author: 无尘
*/
clearInput() {
this.currentPage = 1;
this.getData();
},
/**
* 切换 http dubbo
* @description: 切换 http dubbo
* @author: 无尘
*/
changeType(val) {
changeType() {
const that = this;
that.currentPage = 1;
that.getData();
},
/**
* 分页
* @description: 分页
* @param {Number} val
* @author: 无尘
*/
handleSizeChange(val) {
this.pageSize = val;
......@@ -116,21 +184,30 @@ export default {
this.getData();
},
/**
* 查看
* @description: 查看
* @param {Number} index
* @param {Object} row
* @author: 无尘
*/
handleShow(index, row) {
const that = this;
that.$router.push(`/createEnvSet?envSetFlag=show&proxyType=${row.proxyType}&backendProxyId=${row.backendProxyId}`);
},
/**
* 编辑
* @description: 编辑
* @param {Number} index
* @param {Object} row
* @author: 无尘
*/
handleEdit(index, row) {
const that = this;
that.$router.push(`/createEnvSet?envSetFlag=edit&proxyType=${row.proxyType}&backendProxyId=${row.backendProxyId}`);
},
/**
* 删除
* @description: 删除
* @param {Number} index
* @param {Object} row
* @author: 无尘
*/
handleDel(index, row) {
const that = this;
......@@ -169,7 +246,8 @@ export default {
});
},
/**
* 获取数据
* @description: 获取数据
* @author: 无尘
*/
getData() {
const that = this;
......@@ -200,10 +278,7 @@ export default {
});
}
},
mounted() {
const that = this;
that.getData();
}
};
</script>
<style lang="less" scoped>
......
......@@ -9,26 +9,68 @@ import newEnv from '@/components/env/new-env.vue'
-->
<template>
<div v-show="customDialog">
<el-dialog class="edit-dialog" :title="editRow.sceneCode ? '编辑环境' : '新建环境'" :visible.sync="customDialog" width="600px" :before-close="handleClose">
<el-dialog
class="edit-dialog"
:title="editRow.sceneCode ? '编辑环境' : '新建环境'"
:visible.sync="customDialog"
width="600px"
:before-close="handleClose">
<div class="edit-dialog-body">
<el-form :model="formData" label-width="94px" :rules="rules" ref="envForm">
<el-form-item label="环境名称:" prop="sceneName">
<limitInput :inputWidth="400" :inputValue.sync="formData.sceneName" :holder="'请输入环境名称'" :getByType="'word'" :maxLength="20"> </limitInput>
<el-form
ref="envForm"
:model="formData"
label-width="94px"
:rules="rules">
<el-form-item
label="环境名称:"
prop="sceneName">
<limit-input
:input-width="400"
:input-value.sync="formData.sceneName"
:holder="'请输入环境名称'"
:get-by-type="'word'"
:max-length="20" />
</el-form-item>
<el-form-item label="环境code:" prop="sceneCode">
<limitInput :inputWidth="400" :disflag="editRow.sceneCode ? true : false" :inputValue.sync="formData.sceneCode" :holder="'请输入环境code'" :getByType="'word'" :maxLength="20"> </limitInput>
<el-form-item
label="环境code:"
prop="sceneCode">
<limit-input
:input-width="400"
:disflag="editRow.sceneCode ? true : false"
:input-value.sync="formData.sceneCode"
:holder="'请输入环境code'"
:get-by-type="'word'"
:max-length="20" />
</el-form-item>
<el-form-item label="环境域名:" prop="domainUrl">
<limitInput :inputWidth="400" :inputValue.sync="formData.domainUrl" :holder="'请输入环境域名'" :getByType="'word'" :maxLength="50"> </limitInput>
<el-form-item
label="环境域名:"
prop="domainUrl">
<limit-input
:input-width="400"
:input-value.sync="formData.domainUrl"
:holder="'请输入环境域名'"
:get-by-type="'word'"
:max-length="50" />
</el-form-item>
<el-form-item label="默认环境:">
<el-checkbox v-model="formData.defaultFlag">设置为默认环境</el-checkbox>
<el-checkbox v-model="formData.defaultFlag">
设置为默认环境
</el-checkbox>
</el-form-item>
</el-form>
</div>
<div slot="footer" class="dialog-footer" style="padding-bottom: 10px;">
<el-button @click="customCancel">取 消</el-button>
<el-button type="primary" @click="customConfirm('envForm')">{{ editRow.sceneCode ? '保 存' : '新 建' }}</el-button>
<div
slot="footer"
class="dialog-footer"
style="padding-bottom: 10px;">
<el-button @click="customCancel">
取 消
</el-button>
<el-button
type="primary"
@click="customConfirm('envForm')">
{{ editRow.sceneCode ? '保 存' : '新 建' }}
</el-button>
</div>
</el-dialog>
</div>
......@@ -39,7 +81,10 @@ import { getRequest } from '@/api/api';
import showMsg from '@/assets/js/showmsg';
import errMsg from '@/assets/js/error';
export default {
name: 'new-env',
name: 'NewEnv',
components: {
limitInput
},
props: {
showDialog: {
type: Boolean,
......@@ -57,9 +102,6 @@ export default {
}
}
},
components: {
limitInput
},
data() {
return {
customDialog: false, // 弹框显示
......@@ -70,15 +112,26 @@ export default {
defaultFlag: false
},
rules: {
sceneName: [{ required: true, message: '请输入环境名称', trigger: 'blur' }],
sceneCode: [{ required: true, message: '请输入环境code', trigger: 'blur' }],
domainUrl: [{ required: true, message: '请输入环境域名', trigger: 'blur' }]
sceneName: [ { required: true, message: '请输入环境名称', trigger: 'blur' } ],
sceneCode: [ { required: true, message: '请输入环境code', trigger: 'blur' } ],
domainUrl: [ { required: true, message: '请输入环境域名', trigger: 'blur' } ]
}
};
},
/* 接收数据 */
mounted() {
const that = this;
that.customDialog = that.showDialog;
if (Object.keys(that.editRow).length) {
that.formData = JSON.parse(JSON.stringify(that.editRow));
}
},
methods: {
/**
* 关闭
* @description: 关闭
* @param {Function} done
* @author: 无尘
*/
handleClose(done) {
const that = this;
......@@ -88,7 +141,8 @@ export default {
},
/**
* 取消
* @description: 取消
* @author: 无尘
*/
customCancel() {
const that = this;
......@@ -109,7 +163,9 @@ export default {
},
/**
* 确定
* @description: 确定
* @param {String} formName
* @author: 无尘
*/
customConfirm(formName) {
const that = this;
......@@ -151,9 +207,10 @@ export default {
},
/**
* 提交数据
* @description: 提交数据
* @author: 无尘
*/
setData(list) {
setData() {
const that = this;
that.$emit('hideDialog', that.formData);
that.$nextTick(() => {
......@@ -174,15 +231,6 @@ export default {
that.formData = JSON.parse(JSON.stringify(newData));
}
}
},
/* 接收数据 */
mounted() {
const that = this;
that.customDialog = that.showDialog;
if (Object.keys(that.editRow).length) {
that.formData = JSON.parse(JSON.stringify(that.editRow));
}
}
};
</script>
......
......@@ -9,26 +9,54 @@ import errorCodeEdit from '@/components/error/error-code-edit.vue'
-->
<template>
<div v-show="customDialog">
<el-dialog class="edit-dialog" title="编辑" :visible.sync="customDialog" width="600px" :before-close="handleClose">
<el-dialog
class="edit-dialog"
title="编辑"
:visible.sync="customDialog"
width="600px"
:before-close="handleClose">
<div class="edit-dialog-body">
<el-form :model="formData" label-width="116px" :rules="rules" ref="errorCodeForm">
<el-form-item label="错误码:" prop="errorCode">
<el-input :disabled="formData.errorSettingId ? true : false" v-model="formData.errorCode"></el-input>
<el-form
ref="errorCodeForm"
:model="formData"
label-width="116px"
:rules="rules">
<el-form-item
label="错误码:"
prop="errorCode">
<el-input
v-model="formData.errorCode"
:disabled="formData.errorSettingId ? true : false" />
</el-form-item>
<el-form-item label="错误消息:" prop="errorCode">
<el-input v-model="formData.errorInfo"></el-input>
<el-form-item
label="错误消息:"
prop="errorCode">
<el-input v-model="formData.errorInfo" />
</el-form-item>
<el-form-item v-if="formData.interfaceName" label="使用的接口名称:">
<el-form-item
v-if="formData.interfaceName"
label="使用的接口名称:">
{{ formData.interfaceName }}
</el-form-item>
<el-form-item v-if="formData.projectAndGroup" label="使用的项目分组:">
<el-form-item
v-if="formData.projectAndGroup"
label="使用的项目分组:">
{{ formData.projectAndGroup }}
</el-form-item>
</el-form>
</div>
<div slot="footer" class="dialog-footer" style="padding-bottom: 10px;">
<el-button @click="customCancel">取 消</el-button>
<el-button type="primary" @click="customConfirm('errorCodeForm')">保 存</el-button>
<div
slot="footer"
class="dialog-footer"
style="padding-bottom: 10px;">
<el-button @click="customCancel">
取 消
</el-button>
<el-button
type="primary"
@click="customConfirm('errorCodeForm')">
保 存
</el-button>
</div>
</el-dialog>
</div>
......@@ -38,7 +66,7 @@ import { postRequest } from '@/api/api';
import showMsg from '@/assets/js/showmsg';
import errMsg from '@/assets/js/error';
export default {
name: 'error-code-edit',
name: 'ErrorCodeEdit',
props: {
showDialog: {
type: Boolean,
......@@ -68,14 +96,25 @@ export default {
errorInfo: ''
},
rules: {
errorCode: [{ required: true, message: '请输入错误码', trigger: 'blur' }],
errorInfo: [{ required: true, message: '请输入错误消息', trigger: 'blur' }]
errorCode: [ { required: true, message: '请输入错误码', trigger: 'blur' } ],
errorInfo: [ { required: true, message: '请输入错误消息', trigger: 'blur' } ]
}
};
},
/* 接收数据 */
mounted() {
const that = this;
that.customDialog = that.showDialog;
if (Object.keys(that.editRow).length) {
that.formData = JSON.parse(JSON.stringify(that.editRow));
}
},
methods: {
/**
* 关闭
* @description: 关闭
* @param {Function} done
* @author: 无尘
*/
handleClose(done) {
const that = this;
......@@ -84,7 +123,8 @@ export default {
},
/**
* 取消
* @description: 取消
* @author: 无尘
*/
customCancel() {
const that = this;
......@@ -103,7 +143,9 @@ export default {
},
/**
* 确定
* @description: 确定
* @param {String} formName
* @author: 无尘
*/
customConfirm(formName) {
const that = this;
......@@ -143,9 +185,10 @@ export default {
},
/**
* 提交数据
* @description: 提交数据
* @author: 无尘
*/
setData(list) {
setData() {
const that = this;
that.$emit('hideDialog', that.formData);
that.$nextTick(() => {
......@@ -165,15 +208,6 @@ export default {
that.formData = JSON.parse(JSON.stringify(newData));
}
}
},
/* 接收数据 */
mounted() {
const that = this;
that.customDialog = that.showDialog;
if (Object.keys(that.editRow).length) {
that.formData = JSON.parse(JSON.stringify(that.editRow));
}
}
};
</script>
......
......@@ -11,22 +11,29 @@
</limitInput>
-->
<template>
<div :class="['input-line-cell', limitClass]" :style="{ width: inputWidth + 'px' }">
<el-input :style="{ width: inputWidth + 'px' }" v-model="itemValue" :disabled="disflag" :placeholder="holder" @blur="inputBlur()" @focus="inputFocus()" @keyup.native="value => toInput(value)"> </el-input>
<span class="tip"
><span class="len_span">{{ inputNum }}</span
>/{{ limitLength }}</span
>
<div
:class="['input-line-cell', limitClass]"
:style="{ width: inputWidth + 'px' }">
<el-input
v-model="itemValue"
:style="{ width: inputWidth + 'px' }"
:disabled="disflag"
:placeholder="holder"
@blur="inputBlur()"
@focus="inputFocus()"
@keyup.native="value => toInput(value)" />
<span
class="tip"><span class="len_span">{{ inputNum }}</span>/{{ limitLength }}</span>
</div>
</template>
<script>
import strLength from '@/assets/js/strlen';
export default {
name: 'limitinput',
name: 'Limitinput',
props: {
// 传入 input value
inputValue: {
type: [String, Number],
type: [ String, Number ],
default() {
return '';
}
......
......@@ -10,18 +10,27 @@
</limit-textarea>
-->
<template>
<div class="input-line-cell" :style="{ width: inputWidth + 'px' }">
<el-input :style="{ width: inputWidth + 'px' }" v-model="itemValue" :placeholder="holder" type="textarea" :rows="3" :disabled="disInput" @blur="inputBlur()" @focus="inputFocus()" @keyup.native="value => toInput(value)"> </el-input>
<span class="tip"
><span class="len_span">{{ inputNum }}</span
>/{{ limitLength }}</span
>
<div
class="input-line-cell"
:style="{ width: inputWidth + 'px' }">
<el-input
v-model="itemValue"
:style="{ width: inputWidth + 'px' }"
:placeholder="holder"
type="textarea"
:rows="3"
:disabled="disInput"
@blur="inputBlur()"
@focus="inputFocus()"
@keyup.native="value => toInput(value)" />
<span
class="tip"><span class="len_span">{{ inputNum }}</span>/{{ limitLength }}</span>
</div>
</template>
<script>
import strLength from '@/assets/js/strlen';
export default {
name: 'limittextarea',
name: 'Limittextarea',
props: {
inputValue: {
// 传入 input value
......
......@@ -11,15 +11,21 @@
<el-breadcrumb separator-class="el-icon-arrow-right">
<template v-for="(item, index) in navPath">
<template v-if="!!item.path">
<el-breadcrumb-item :key="'nav' + index" @click="changeRoute(item.path, item.relocation)">
<span class="el-breadcrumb__inner is-link" @click="changeRoute(item.path, item.relocation)">
<el-breadcrumb-item
:key="'nav' + index"
@click="changeRoute(item.path, item.relocation)">
<span
class="el-breadcrumb__inner is-link"
@click="changeRoute(item.path, item.relocation)">
{{ item.name
}}<!-- :to="{ path: item.path }" -->
</span>
</el-breadcrumb-item>
</template>
<template v-else>
<el-breadcrumb-item :key="'nav' + index">{{ item.name }}</el-breadcrumb-item>
<el-breadcrumb-item :key="'nav' + index">
{{ item.name }}
</el-breadcrumb-item>
</template>
</template>
</el-breadcrumb>
......@@ -30,12 +36,7 @@
import { postRequest } from '@/api/api';
import errMsg from '@/assets/js/error';
export default {
name: 'nav-bread',
data() {
return {
projectName: 'api-gateway-web' // 当前项目名
};
},
name: 'NavBread',
props: {
navPath: {
type: Array,
......@@ -56,6 +57,11 @@ export default {
default: ''
}
},
data() {
return {
projectName: 'api-gateway-web' // 当前项目名
};
},
methods: {
changeRoute(path, relocation) {
let that = this;
......@@ -86,7 +92,7 @@ export default {
postRequest('/api-auth/get-current-memu-data', para)
.then(res => {
// console.log(res,res.data,res.data.errorCode)
var resData = res.data;
let resData = res.data;
if (resData.errorCode == 0) {
if (!resData.result) {
return false;
......
......@@ -7,9 +7,16 @@
* @LastEditTime: 2019-10-23 17:47:12
-->
<template>
<el-dialog :title="alarmType === 1 ? '流控日志' : '熔断日志'" :visible.sync="dialogVisible" width="600px" @close="close">
<el-dialog
:title="alarmType === 1 ? '流控日志' : '熔断日志'"
:visible.sync="dialogVisible"
width="600px"
@close="close">
<div class="dialog-body">
<el-table :data="tableData" style="width: 100%" class="dialog-table">
<el-table
:data="tableData"
style="width: 100%"
class="dialog-table">
<!-- <el-table-column prop="rangeType" :label="alarmType === 1 ? '流控范围' : '熔断范围'">
<template slot-scope="scope">
<div v-if="scope.row.rangeType === 0">项目</div>
......@@ -17,17 +24,33 @@
<div v-if="scope.row.rangeType === 2">接口</div>
</template>
</el-table-column> -->
<el-table-column prop="alarmType" label="告警类型">
<el-table-column
prop="alarmType"
label="告警类型">
<template slot-scope="scope">
<div v-if="scope.row.alarmType === 1">流控告警</div>
<div v-if="scope.row.alarmType === 2">熔断告警</div>
<div v-if="scope.row.alarmType === 1">
流控告警
</div>
<div v-if="scope.row.alarmType === 2">
熔断告警
</div>
</template>
</el-table-column>
<el-table-column prop="alarmContent" :label="alarmType === 1 ? '流控内容' : '熔断内容'" width="300px" show-overflow-tooltip></el-table-column>
<el-table-column prop="updateTime" label="发生时间">
<el-table-column
prop="alarmContent"
:label="alarmType === 1 ? '流控内容' : '熔断内容'"
width="300px"
show-overflow-tooltip />
<el-table-column
prop="updateTime"
label="发生时间">
<template slot-scope="scope">
<div class="color-606266 line-18">{{ scope.row.updateTime | timeStampToYmd }}</div>
<div class="color-606266 line-18">{{ scope.row.updateTime | timeStampToHms }}</div>
<div class="color-606266 line-18">
{{ scope.row.updateTime | timeStampToYmd }}
</div>
<div class="color-606266 line-18">
{{ scope.row.updateTime | timeStampToHms }}
</div>
</template>
</el-table-column>
<!-- <el-table-column prop="updateTime" label="更新时间">
......@@ -37,8 +60,16 @@
</template>
</el-table-column> -->
</el-table>
<div class="page-content" v-if="total > 0">
<dm-pagination small @current-change="handleCurrentChange" :current-page.sync="currentPage" :page-size="pageSize" layout="prev, pager, next" :total="total"> </dm-pagination>
<div
v-if="total > 0"
class="page-content">
<dm-pagination
small
:current-page.sync="currentPage"
:page-size="pageSize"
layout="prev, pager, next"
:total="total"
@current-change="handleCurrentChange" />
</div>
</div>
</el-dialog>
......@@ -93,7 +124,7 @@ export default {
currentPage: this.currentPage,
pageSize: this.pageSize
};
var that = this;
let that = this;
getRequest('/gateway-manage/rule/alarm/log', params)
.then(res => {
if (res.data.code == '0000') {
......
......@@ -7,25 +7,56 @@
* @LastEditTime: 2019-10-23 17:47:37
-->
<template>
<el-dialog title="日志" :visible.sync="dialogVisible" width="600px" @close="close">
<el-dialog
title="日志"
:visible.sync="dialogVisible"
width="600px"
@close="close">
<div class="dialog-body">
<el-table :data="tableData" style="width: 100%" class="dialog-table">
<el-table-column prop="alarmType" label="告警类型">
<el-table
:data="tableData"
style="width: 100%"
class="dialog-table">
<el-table-column
prop="alarmType"
label="告警类型">
<template slot-scope="scope">
<div v-if="scope.row.alarmType === 1">流控告警</div>
<div v-if="scope.row.alarmType === 2">熔断告警</div>
<div v-if="scope.row.alarmType === 1">
流控告警
</div>
<div v-if="scope.row.alarmType === 2">
熔断告警
</div>
</template>
</el-table-column>
<el-table-column prop="alarmContent" label="告警内容" width="300px" show-overflow-tooltip> </el-table-column>
<el-table-column prop="updateTime" label="发生时间">
<el-table-column
prop="alarmContent"
label="告警内容"
width="300px"
show-overflow-tooltip />
<el-table-column
prop="updateTime"
label="发生时间">
<template slot-scope="scope">
<div class="color-606266 line-18">{{ scope.row.updateTime | timeStampToYmd }}</div>
<div class="color-606266 line-18">{{ scope.row.updateTime | timeStampToHms }}</div>
<div class="color-606266 line-18">
{{ scope.row.updateTime | timeStampToYmd }}
</div>
<div class="color-606266 line-18">
{{ scope.row.updateTime | timeStampToHms }}
</div>
</template>
</el-table-column>
</el-table>
<div class="page-content" v-if="total > 0">
<dm-pagination small @current-change="handleCurrentChange" :current-page.sync="currentPage" :page-size="pageSize" layout="prev, pager, next" :total="total"> </dm-pagination>
<div
v-if="total > 0"
class="page-content">
<dm-pagination
small
:current-page.sync="currentPage"
:page-size="pageSize"
layout="prev, pager, next"
:total="total"
@current-change="handleCurrentChange" />
</div>
</div>
</el-dialog>
......@@ -73,7 +104,7 @@ export default {
currentPage: this.currentPage,
pageSize: this.pageSize
};
var that = this;
let that = this;
getRequest('/gateway-manage/rule/alarm/log', params)
.then(res => {
if (res.data.code == '0000') {
......
<template>
<el-dialog :title="type === '1' ? '新建绑定白名单接口' : '新建绑定能力接口'" :visible.sync="dialogVisible" width="600px" @close="closeDialog">
<el-dialog
:title="type === '1' ? '新建绑定白名单接口' : '新建绑定能力接口'"
:visible.sync="dialogVisible"
width="600px"
@close="closeDialog">
<div class="dialog-body">
<div class="content">
<div class="left-content">
<div class="title">
<h3><el-checkbox :indeterminate="isIndeterminate" v-model="checkedAll" @change="changeAllTree">所有API</el-checkbox></h3>
<h3>
<el-checkbox
v-model="checkedAll"
:indeterminate="isIndeterminate"
@change="changeAllTree">
所有API
</el-checkbox>
</h3>
</div>
<div class="tree-content" v-loading="loading">
<el-tree :props="props" :load="loadNode" node-key="id" lazy show-checkbox @check-change="handleCheckChange" ref="tree"> </el-tree>
<div
v-loading="loading"
class="tree-content">
<el-tree
ref="tree"
:props="props"
:load="loadNode"
node-key="id"
lazy
show-checkbox
@check-change="handleCheckChange" />
</div>
</div>
<div class="left-center">
<el-button type="primary" :disabled="leftSelectList.length <= 0" @click="transferRight">转入<i class="el-icon-arrow-right el-icon--right"></i></el-button>
<el-button type="primary" :disabled="rightSelectList.length <= 0" @click="transferLeft"><i class="el-icon-arrow-left el-icon--left"></i>移除</el-button>
<el-button
type="primary"
:disabled="leftSelectList.length <= 0"
@click="transferRight">
转入<i class="el-icon-arrow-right el-icon--right" />
</el-button>
<el-button
type="primary"
:disabled="rightSelectList.length <= 0"
@click="transferLeft">
<i class="el-icon-arrow-left el-icon--left" />移除
</el-button>
</div>
<div class="right-content">
<!-- <div class="title">
......@@ -20,10 +50,22 @@
</div> -->
<div class="list-content table-transfer">
<template>
<el-table ref="multipleTable" :data="rightList" tooltip-effect="dark" style="width: 100%" height="305" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50"> </el-table-column>
<el-table-column label="已选API" width="150">
<template slot-scope="scope">{{ scope.row.name }}</template>
<el-table
ref="multipleTable"
:data="rightList"
tooltip-effect="dark"
style="width: 100%"
height="305"
@selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="50" />
<el-table-column
label="已选API"
width="150">
<template slot-scope="scope">
{{ scope.row.name }}
</template>
</el-table-column>
</el-table>
</template>
......@@ -35,9 +77,18 @@
</div>
</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="closeDialog">取消</el-button>
<el-button type="primary" @click="submitForm" :loading="btnLoading">确定</el-button>
<div
slot="footer"
class="dialog-footer">
<el-button @click="closeDialog">
取消
</el-button>
<el-button
type="primary"
:loading="btnLoading"
@click="submitForm">
确定
</el-button>
</div>
</el-dialog>
</template>
......@@ -102,7 +153,7 @@ export default {
return item.type !== 0;
})
) {
//选中的都不是一级的
// 选中的都不是一级的
count = 1;
} else {
if (item.type === 0) {
......@@ -113,13 +164,13 @@ export default {
this.isIndeterminate = count > 0 && count < this.projectList.length;
this.checkedAll = count === this.projectList.length ? true : false;
},
//转入
// 转入
transferRight() {
this.rightList = this.leftSelectList.concat(this.rightList);
this.rightList = this.rightList.filter(function(x, index, self) {
return self.indexOf(x) === index;
});
//处理数据选中父级的过滤掉子级
// 处理数据选中父级的过滤掉子级
for (let i = 0; i < this.rightList.length; i++) {
if (
this.rightList.find(item => {
......@@ -127,7 +178,7 @@ export default {
})
) {
if (this.rightList[i].leaf) {
//是叶子节点
// 是叶子节点
this.rightList.splice(i, 1);
i = 0;
}
......@@ -152,7 +203,7 @@ export default {
},
// 加载数据
loadNode(node, resolve) {
var that = this;
let that = this;
if (node.level === 0) {
this.loading = true;
getRequest('/gateway-manage/plugin/interface/tree', {})
......@@ -229,7 +280,7 @@ export default {
this.rightSelectList = val;
},
submitForm() {
var that = this;
let that = this;
if (this.rightSelectList.length === 0) {
this.$message.error('请选择要绑定的API');
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment