Commit 64b293ba by damodmg

发布加提示

parent 201d8ecc
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>API网关管理平台</title><link href=./static/css/app.a4f7b7848c8f4cb3146ef95597966651.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 type=text/javascript src=./static/js/manifest.e8c68a493d9b346035ea.js></script><script type=text/javascript src=./static/js/vendor.adc34c81686691b8a2e7.js></script><script type=text/javascript src=./static/js/app.eb7a92daf8e200957259.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.8d22d7df3d599992ccacbfea859814a2.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 type=text/javascript src=./static/js/manifest.996f66ff26f2d52f6535.js></script><script type=text/javascript src=./static/js/vendor.adc34c81686691b8a2e7.js></script><script type=text/javascript src=./static/js/app.eb7a92daf8e200957259.js></script></body></html>
\ No newline at end of file
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,o){for(var f,d,b,i=0,u=[];i<r.length;i++)d=r[i],t[d]&&u.push(t[d][0]),t[d]=0;for(f in c)Object.prototype.hasOwnProperty.call(c,f)&&(e[f]=c[f]);for(n&&n(r,c,o);u.length;)u.shift()();if(o)for(i=0;i<o.length;i++)b=a(a.s=o[i]);return b};var r={},t={23:0};function a(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,a){n=t[e]=[r,a]});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,a.nc&&o.setAttribute("nonce",a.nc),o.src=a.p+"static/js/"+e+"."+{0:"90184a99cbf200fc5420",1:"490562478be660678b4c",2:"aba954d032af31777ca2",3:"891b203d9fe7a8561dfd",4:"1d5814beb85ee6627aaf",5:"326fb42830c68b115dac",6:"8670f29c8b9abb55379a",7:"a1935be11e77d5f2c5b4",8:"8121d39547813d60ebc0",9:"b3deccff7d55a154a299",10:"0fa1f876e10fcdf5c8bc",11:"722834da6c9a43c2cd06",12:"67847cd5371b700c9f72",13:"28aedb2f2a8862416b38",14:"87bbee3da6a929830283",15:"2854ebb8d89f105b01a8",16:"ed20f73ba065fa5cfb56",17:"7654e050c5e95259b1af",18:"37321ffca9347a60b988",19:"76545794ef370769a689",20:"1e2a9dda654bf5adc16a"}[e]+".js";var f=setTimeout(d,12e4);function d(){o.onerror=o.onload=null,clearTimeout(f);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return o.onerror=o.onload=d,c.appendChild(o),r},a.m=e,a.c=r,a.d=function(e,n,r){a.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},a.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(n,"a",n),n},a.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},a.p="./",a.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={23: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:"90184a99cbf200fc5420",1:"490562478be660678b4c",2:"aba954d032af31777ca2",3:"891b203d9fe7a8561dfd",4:"9854e0e918ae4410a1aa",5:"326fb42830c68b115dac",6:"8670f29c8b9abb55379a",7:"a1935be11e77d5f2c5b4",8:"8121d39547813d60ebc0",9:"b3deccff7d55a154a299",10:"0fa1f876e10fcdf5c8bc",11:"722834da6c9a43c2cd06",12:"67847cd5371b700c9f72",13:"28aedb2f2a8862416b38",14:"87bbee3da6a929830283",15:"2854ebb8d89f105b01a8",16:"ed20f73ba065fa5cfb56",17:"7654e050c5e95259b1af",18:"37321ffca9347a60b988",19:"76545794ef370769a689",20:"1e2a9dda654bf5adc16a"}[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
......@@ -21,7 +21,7 @@
<div>
<el-button type="primary" v-if="activeName === 'first'" @click="addFluid">新建流控规则</el-button>
<el-button type="primary" v-if="activeName === 'second'" @click="addFusing">新建熔断规则</el-button>
<el-button type="primary" @click="publish">{{ publishNum > 0 ? '待发布' + '(' + publishNum + ')' : '发布' }}</el-button>
<el-button type="primary" @click="publish" :disabled="publishNum <= 0">{{ publishNum > 0 ? '待发布' + '(' + publishNum + ')' : '发布' }}</el-button>
</div>
</div>
<el-tab-pane label="流控规则" name="first">
......@@ -317,6 +317,7 @@ export default {
},
//发布
publish() {
let params = {
sceneCode: this.sceneCode
};
......@@ -327,21 +328,33 @@ export default {
url = '/gateway-manage/rule/degrade/publish'
}
var that = this;
getRequest(url, params)
.then(res => {
if (res.data.code == '0000') {
this.getList();
this.getUpdateStatus();
} else {
this.$message.error(res.data.message);
}
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
this.$confirm('确定要发布吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
getRequest(url, params)
.then(res => {
if (res.data.code == '0000') {
this.getList();
this.getUpdateStatus();
} else {
this.$message.error(res.data.message);
}
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
}).catch(() => {
this.$message({
type: 'info',
message: '已取消发布'
});
});
},
// 获取更新状态
getUpdateStatus(val) {
......
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