Commit f4edde82 authored by 张俊's avatar 张俊

Merge branch 'zj' into dev

parents 05c94b84 f9ee7b49
...@@ -16,7 +16,14 @@ module.exports = { ...@@ -16,7 +16,14 @@ module.exports = {
pathRewrite: { pathRewrite: {
"^/apaas": "" "^/apaas": ""
} }
} },
"/awecloud": {
target: "https://apaas3.wodcloud.com/awecloud/",
changeOrigin: true,
pathRewrite: {
"^/awecloud": ""
}
},
}, },
// Various Dev Server settings // Various Dev Server settings
host: "localhost", // can be overwritten by process.env.HOST host: "localhost", // can be overwritten by process.env.HOST
......
...@@ -575,8 +575,6 @@ export default { ...@@ -575,8 +575,6 @@ export default {
this.service_size_data = data.request_spcs_info this.service_size_data = data.request_spcs_info
this.size_arr_down = data.request_spcs_info this.size_arr_down = data.request_spcs_info
this.buy_type = data.request_spcs_info[0].type this.buy_type = data.request_spcs_info[0].type
}) })
.catch(function(response) {}); .catch(function(response) {});
}, },
......
...@@ -84,9 +84,9 @@ ...@@ -84,9 +84,9 @@
<el-form-item prop="resource"> <el-form-item prop="resource">
<p class="formname">开放程度:</p> <p class="formname">开放程度:</p>
<el-radio-group v-model="form.resource"> <el-radio-group v-model="form.resource">
<el-radio label="共享"></el-radio> <el-radio :label="1">共享</el-radio>
<el-radio label="受限"></el-radio> <el-radio :label="2">受限</el-radio>
<el-radio label="敏感"></el-radio> <el-radio :label="3">敏感</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
...@@ -166,7 +166,7 @@ export default { ...@@ -166,7 +166,7 @@ export default {
resource: '', resource: '',
fileList:'' fileList:''
}, },
open:true, open:1,
maxline:'', maxline:'',
open1:false, open1:false,
maxline1:'', maxline1:'',
...@@ -269,6 +269,7 @@ export default { ...@@ -269,6 +269,7 @@ export default {
this.now_user = data; this.now_user = data;
this.$store.commit('rolefun',data) this.$store.commit('rolefun',data)
this.getOriginArr() this.getOriginArr()
this.getServiceInfo()
}); });
}, },
mounted() {}, mounted() {},
...@@ -284,12 +285,67 @@ export default { ...@@ -284,12 +285,67 @@ export default {
}); });
}, },
getServiceInfo() {
this.$http
.get("/apaas/service/v3/service/manager?service_id="+this.$route.params.id)
.then((response) => {
let data = response.data.data;
console.log(data);
this.imgList = []
this.$set(this.form,'name',data.name)
this.$set(this.form,'desc',data.descript)
this.$set(this.form,'area',data.sectors-1)
this.$set(this.form,'origin',data.organization)
this.$set(this.form,'code',data.encode_method)
this.$set(this.form,'people',data.register_user_info?data.register_user_info.user_name:data.register_user_info)
this.$set(this.form,'phone',data.register_user_info?data.register_user_info.phone:data.register_user_info)
this.$set(this.form,'resource',data.openness)
this.$set(this.form,'fileList',data.cover)
this.imgList.push(data.cover)
this.open = data.service_safe_config?data.service_safe_config.fusing:data.service_safe_config
this.open1 = data.service_safe_config?data.service_safe_config.req_intervals:data.service_safe_config
this.maxline = data.service_safe_config?data.service_safe_config.max_connections:data.service_safe_config
this.maxline1 = data.service_safe_config?data.service_safe_config.max_req_num:data.service_safe_config
this.usetime1 = data.service_safe_config?data.service_safe_config.valid_time:data.service_safe_config
this.timevalue = data.service_safe_config?data.service_safe_config.time_unit:data.service_safe_config
this.open2 = data.service_safe_config?data.service_safe_config.tls:data.service_safe_config
})
.catch(function(response) {});
},
setService(){
var temp = {
id:parseInt(this.$route.params.id),
"name": this.form.name,
"sectors": this.form.area+1,
"organization": this.form.origin,
"cover": this.form.fileList,
"openness": this.form.resource,
"descript": this.form.desc,
"service_safe_config":{ // 安全配置 超管传入
fusing:this.open,
max_connections:this.maxline,
req_intervals:this.open1,
max_req_num:this.maxline1,
valid_time:this.usetime1,
time_unit:this.timevalue,
tls:this.open2,
}
}
this.$http
.put("/apaas/service/v3/service/manager",temp)
.then((response) => {
console.log(response);
this.getServiceInfo()
})
.catch(function(response) {
});
},
calcle(){ calcle(){
console.log('1111'); console.log('1111');
}, },
saveInfo(){ saveInfo(){
console.log('2222'); this.onSubmit('form')
}, },
openstart(){ openstart(){
this.open = !this.open this.open = !this.open
...@@ -307,7 +363,7 @@ export default { ...@@ -307,7 +363,7 @@ export default {
console.log('submit!'); console.log('submit!');
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
alert('submit!'); this.setService()
} else { } else {
console.log('error submit!!'); console.log('error submit!!');
return false; 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