+
{{ yx_state.state }}
@@ -132,7 +233,7 @@
-
+
{{ yx_state.averageTime }}
最大响应时间:{{ yx_state.maxTime }}
@@ -140,7 +241,7 @@
-
+
{{ yx_state.averageTraffic }}
最大吞吐率:{{ yx_state.maxTraffic }}
@@ -149,7 +250,7 @@
{{ yx_state.memory }}
@@ -163,7 +264,7 @@
服务调用列表
@@ -187,7 +288,7 @@
>
-
服务规格:
+
服务规格:
规格设置:
@@ -257,25 +358,25 @@
-

+
服务收益总额
-
{{trans_all_obj.all}}
+
{{ trans_all_obj.all }}
金币
-

+
交易总数
-
{{trans_all_obj.times}}
+
{{ trans_all_obj.times }}
笔
-

+
本月交易总数
-
{{trans_all_obj.month}}
+
{{ trans_all_obj.month }}
笔
@@ -299,7 +400,7 @@
-
+
@@ -332,9 +433,9 @@ export default {
data() {
return {
now_user: 0, //0:普通用户,1:组织管理员,2:超级管理员
- process_in_up:false,//是否是服务注册产生的流程服务
- perception_in:false,//是否是感知服务
- in_origin_ser:false,//是否是组织内部的服务
+ process_in_up: false, //是否是服务注册产生的流程服务
+ perception_in: false, //是否是感知服务
+ in_origin_ser: false, //是否是组织内部的服务
buy_style: [1],
// editstr:'
1221312
wuqwyequ827812731731',
listTotal: 0,
@@ -346,7 +447,7 @@ export default {
pageSizes: [10, 20, 50],
responseParamUrl: "",
codeExampleUrl: "",
- port_select_server:'',
+ port_select_server: "",
yx_state: {
state: "",
averageTime: "",
@@ -355,35 +456,35 @@ export default {
maxTraffic: "",
memory: "",
},
- port_select:'',
+ port_select: "",
service_use_arr: [],
- req_solt_data:[],
- res_solt_data:[],
- req_gz_solt_data:[],
- res_gz_solt_data:[],
- service_gz_process_arr:[],
- trans_all_obj:{
- all:0,
- times:0,
- month:0,
+ req_solt_data: [],
+ res_solt_data: [],
+ req_gz_solt_data: [],
+ res_gz_solt_data: [],
+ service_gz_process_arr: [],
+ trans_all_obj: {
+ all: 0,
+ times: 0,
+ month: 0,
},
- trans_log_arr:[
+ trans_log_arr: [
{
title: "服务交易概览",
info: "",
- prop:'title',
+ prop: "title",
type: "solt",
solt_name: "trans_all",
},
{
title: "服务交易记录",
info: "",
- prop:'title',
+ prop: "title",
type: "solt",
solt_name: "trans_log",
},
],
- trans_log_header:[
+ trans_log_header: [
{
prop: "department_name",
label: "申请单位",
@@ -427,7 +528,7 @@ export default {
align: "center",
},
],
- trans_log_data:[],
+ trans_log_data: [],
res_solt_header_arr: [
{
prop: "name",
@@ -632,15 +733,27 @@ export default {
], // 响应参数-header
res_data: [], // 响应参数
res_code_arr: "", // 响应示例
- req_solt_code_arr:'11',
- res_solt_code_arr:'11',
+ req_solt_code_arr: "11",
+ res_solt_code_arr: "11",
buy_type: "",
- workflows_id:'',//判断是否是流程服务
+ workflows_id: "", //判断是否是流程服务
sizeset_flag: false, //规格设置是否显示
service_arr: [
["服务基本信息", "接口详细信息", "服务运行状态"],
- ["服务基本信息", "接口详细信息", "服务运行状态", "服务计费规则","服务交易记录"],
- ["服务基本信息", "接口详细信息", "服务运行状态", "服务规格","服务交易记录"],
+ [
+ "服务基本信息",
+ "接口详细信息",
+ "服务运行状态",
+ "服务计费规则",
+ "服务交易记录",
+ ],
+ [
+ "服务基本信息",
+ "接口详细信息",
+ "服务运行状态",
+ "服务规格",
+ "服务交易记录",
+ ],
],
service_size_data: [], //服务规格数组
service_header_arr: {
@@ -814,9 +927,9 @@ export default {
label: "调用时间",
minWidth: "20%",
align: "center",
- }
+ },
],
- service_process_arr:[],
+ service_process_arr: [],
service_size_arr: [
{
prop: "index",
@@ -852,20 +965,23 @@ export default {
edit_size_arr: [
{
prop: "spcs_type",
- label: '规格类型
+')
',
+ label:
+ '规格类型

',
width: "180px",
align: "center",
type: "select",
- selectArr:[
+ selectArr: [
{
- label:'计次收费规格',
- value:1
+ label: "计次收费规格",
+ value: 1,
},
{
- label:'时长收费规格',
- value:2
- }
- ]
+ label: "时长收费规格",
+ value: 2,
+ },
+ ],
},
{
prop: "money",
@@ -876,7 +992,10 @@ export default {
},
{
prop: "pv",
- label: '调用次数
+')
',
+ label:
+ '调用次数

',
width: "150px",
align: "center",
type: "input",
@@ -891,14 +1010,14 @@ export default {
prop: "time",
label: "时长",
width: "150px",
- align: "left"
+ align: "left",
},
{
prop: "descript",
label: "规格说明",
minWidth: "33.33%",
align: "left",
- type:'input'
+ type: "input",
},
{
label: "操作",
@@ -949,7 +1068,7 @@ export default {
solt_name: "res_code",
},
],
- process_in_up_arr:[
+ process_in_up_arr: [
{
title: "接口文档:",
info: "",
@@ -961,9 +1080,9 @@ export default {
info: "",
type: "solt",
solt_name: "service_port",
- }
+ },
],
- port_solt_arr:[
+ port_solt_arr: [
{
title: "服务地址:",
info: "",
@@ -1001,7 +1120,7 @@ export default {
solt_name: "response_code",
},
],
- gz_solt_arr:[
+ gz_solt_arr: [
{
title: "请求方式:",
info: "12123",
@@ -1035,7 +1154,7 @@ export default {
solt_name: "response_code",
},
],
- port_options:[],
+ port_options: [],
service_type_arr: [
"数据服务",
"时空服务",
@@ -1084,6 +1203,38 @@ export default {
info: "",
},
],
+ cp_arr: [
+ {
+ title: "产品简介:",
+ info: "",
+ },
+ {
+ title: "产品领域:",
+ info: "",
+ },
+ {
+ title: "产品标签:",
+ info: "",
+ },
+ {
+ title: "所属组织:",
+ info: "",
+ },
+ {
+ title: "开放程度:",
+ info: "",
+ },
+ {
+ title: "注册发布时间:",
+ info: "",
+ },
+ {
+ title: "产品详情:",
+ type: "solt",
+ solt_name: "cp_md",
+ },
+ ],
+ data_service_type1: ""
};
},
computed: {
@@ -1095,15 +1246,15 @@ export default {
if (n == 2) {
this.getData();
}
- }
+ },
},
created() {
if (this.userInfo) {
this.now_user = this.level;
- if(this.now_user==1||this.now_user==2){
- this.in_origin_ser = true
- }else{
- this.in_origin_ser = false
+ if (this.now_user == 1 || this.now_user == 2) {
+ this.in_origin_ser = true;
+ } else {
+ this.in_origin_ser = false;
}
} else {
this.getCurrentUser();
@@ -1114,16 +1265,16 @@ export default {
},
mounted() {},
methods: {
- change_port(val){
- this.port_options.forEach(e => {
- if(e.value == val){
- this.$set(this.port_solt_arr[0],'info',e.value)
- this.$set(this.port_solt_arr[1],'info',e.req_type)
- this.$set(this.port_solt_arr[2],'info',e.encode_method)
- this.req_solt_data = e.req_fields
- this.res_solt_data = e.res_fields
- this.req_solt_code_arr = e.req_fields_example
- this.res_solt_code_arr = e.res_fields_example
+ change_port(val) {
+ this.port_options.forEach((e) => {
+ if (e.value == val) {
+ this.$set(this.port_solt_arr[0], "info", e.value);
+ this.$set(this.port_solt_arr[1], "info", e.req_type);
+ this.$set(this.port_solt_arr[2], "info", e.encode_method);
+ this.req_solt_data = e.req_fields;
+ this.res_solt_data = e.res_fields;
+ this.req_solt_code_arr = e.req_fields_example;
+ this.res_solt_code_arr = e.res_fields_example;
}
});
},
@@ -1135,7 +1286,7 @@ export default {
transchangePageSize(value) {
this.transpageSize = value;
this.transcurrentPage = 1;
- this.get_trans_data()
+ this.get_trans_data();
},
changeCurrentPage(value) {
this.currentPage = value;
@@ -1143,33 +1294,35 @@ export default {
},
transchangeCurrentPage(value) {
this.transcurrentPage = value;
- this.get_trans_data()
+ this.get_trans_data();
},
- iconChange (val) {
+ iconChange(val) {
// el-select实际上是两层div包裹的input
this.port_select_server = val;
// 获取当前el-select标签第一层div
- const dom = this.$refs['select_icon'].$el;
- if(dom.children[0].children[0].tagName == 'SPAN'){
- dom.children[0].children[0].remove()
+ const dom = this.$refs["select_icon"].$el;
+ if (dom.children[0].children[0].tagName == "SPAN") {
+ dom.children[0].children[0].remove();
}
// 创建需要添加到其中的标签 并填充内容
- const svgDom = document.createElement('span'); // ('
');
- svgDom.setAttribute('class', 'el-input__prefix');
- if(val.split(',')[1]=='true'){
- svgDom.innerHTML = '
';
- }else{
- svgDom.innerHTML = '
故障';
+ const svgDom = document.createElement("span"); // ('
');
+ svgDom.setAttribute("class", "el-input__prefix");
+ if (val.split(",")[1] == "true") {
+ svgDom.innerHTML =
+ '
';
+ } else {
+ svgDom.innerHTML =
+ '
故障';
}
// 将创建的标签添加到父节点(第二层div)
dom.children[0].appendChild(svgDom);
// 得到el-select中的input标签
const inputDom = dom.children[0].children[0];
- inputDom.setAttribute('style', 'padding-left: 60px;');
+ inputDom.setAttribute("style", "padding-left: 60px;");
// 将添加的标签放到input前面
dom.children[0].insertBefore(svgDom, inputDom);
- this.getData()
+ this.getData();
},
get_use_list() {
this.service_use_arr = [];
@@ -1195,16 +1348,23 @@ export default {
? `访问次数:${e.request_spcs.count}/日 访问量:${e.request_spcs.pv}/日`
: "",
sqsc: e.duration + ["", "个月", "年"][e.duration_unit || 0],
- jkmc:e.req_name||'',
- jkdz:e.req_url||'',
- state:(e.req_status||e.req_status==0)?e.req_status==-1?'失败':'成功':'',
- time:e.last_request_time?e.last_request_time.split("+")[0].replace("T", " "):'-',
- count:e.req_num||'-'
+ jkmc: e.req_name || "",
+ jkdz: e.req_url || "",
+ state:
+ e.req_status || e.req_status == 0
+ ? e.req_status == -1
+ ? "失败"
+ : "成功"
+ : "",
+ time: e.last_request_time
+ ? e.last_request_time.split("+")[0].replace("T", " ")
+ : "-",
+ count: e.req_num || "-",
});
});
}
})
- .catch(function(response) {});
+ .catch(function (response) {});
},
change_buy(val) {
if (this.buy_style.indexOf(val) !== -1) {
@@ -1218,10 +1378,10 @@ export default {
if (data.success == 1) {
this.$store.commit("userInfofun", data.data);
this.now_user = this.level;
- if(this.now_user==1||this.now_user==2){
- this.in_origin_ser = true
- }else{
- this.in_origin_ser = false
+ if (this.now_user == 1 || this.now_user == 2) {
+ this.in_origin_ser = true;
+ } else {
+ this.in_origin_ser = false;
}
console.log(this.level);
} else {
@@ -1230,35 +1390,38 @@ export default {
});
},
getData() {
- console.log(this.namespace)
- this.$api.workbench.getServiceRunningTopology({ namespace: this.namespace }).then((response) => {
- this.datas = response.data.elements;
- });
+ console.log(this.namespace);
+ this.$api.workbench
+ .getServiceRunningTopology({ namespace: this.namespace })
+ .then((response) => {
+ this.datas = response.data.elements;
+ });
},
- get_trans_data(){
+ get_trans_data() {
this.$http
.get(
`/apaas/service/v3/service/manager/service/trade/list?page=${this.currentPage}&size=${this.pageSize}&service_id=${this.$route.params.id}`
- ).then(res=>{
+ )
+ .then((res) => {
console.log(res);
// listTotal: 0,
- if(res.data.success){
- this.translistTotal = res.data.data.total
- var temp = res.data.data.list||[]
- temp.forEach(e => {
- if(e.spcs_type==1){
- e.duration_name = '不限时长'
- e.gg = `${e.spcs_count}次/ ${e.single_money} 元`
- }else if(e.spcs_type==2){
- e.duration_name = e.duration+'月'
- e.gg = `${e.single_money} 元/月`
+ if (res.data.success) {
+ this.translistTotal = res.data.data.total;
+ var temp = res.data.data.list || [];
+ temp.forEach((e) => {
+ if (e.spcs_type == 1) {
+ e.duration_name = "不限时长";
+ e.gg = `${e.spcs_count}次/ ${e.single_money} 元`;
+ } else if (e.spcs_type == 2) {
+ e.duration_name = e.duration + "月";
+ e.gg = `${e.single_money} 元/月`;
}
e.trade_times = helper.dateStringTransform(e.trade_time);
e.total_moneys = e.total_money + "金币";
});
- this.trans_log_data = temp
+ this.trans_log_data = temp;
}
- })
+ });
},
getServiceInfo() {
this.$http
@@ -1270,13 +1433,17 @@ export default {
if (response.data.success === 1) {
let data = response.data.data;
this.namespace = data.urls[0].namespace;
- if(data.workflows_id){
- this.workflows_id = data.workflows_id
- }else{
- this.workflows_id = false
+ if (data.workflows_id) {
+ this.workflows_id = data.workflows_id;
+ } else {
+ this.workflows_id = false;
}
this.$set(this.service_header_arr, "portal_id", data.portal_id); // 时空服务id
- this.$set(this.service_header_arr, "workflows_id", data.workflows_id); // 时空服务id
+ this.$set(
+ this.service_header_arr,
+ "workflows_id",
+ data.workflows_id
+ ); // 时空服务id
this.$set(
this.service_header_arr,
"isMap",
@@ -1322,69 +1489,116 @@ export default {
"fixedurl",
this.$route.path.replace("servicedetail", "serviceedit")
);
- this.trans_all_obj={
- all:data.sale_total_money,
- times:data.sale_total,
- month:data.sale_month_total,
- }
+ this.trans_all_obj = {
+ all: data.sale_total_money,
+ times: data.sale_total,
+ month: data.sale_month_total,
+ };
//判断是否是服务注册出来的流程服务
- if(data.data_service_type2 == 24&&data.workflows_id==0){
- this.process_in_up = true
- this.$set(this.process_in_up_arr[0],'info',data.doc_file.split('/')[data.doc_file.split('/').length-1])
- this.$set(this.process_in_up_arr[0],'url',data.doc_file)
- var temp_port_arr = []
- data.urls.forEach(e => {
+ if (data.data_service_type2 == 24 && data.workflows_id == 0) {
+ this.process_in_up = true;
+ this.$set(
+ this.process_in_up_arr[0],
+ "info",
+ data.doc_file.split("/")[data.doc_file.split("/").length - 1]
+ );
+ this.$set(this.process_in_up_arr[0], "url", data.doc_file);
+ var temp_port_arr = [];
+ data.urls.forEach((e) => {
temp_port_arr.push({
- label:e.req_name,
- value:e.req_url,
- able:e.state==-1?false:true,
- ...e
- })
+ label: e.req_name,
+ value: e.req_url,
+ able: e.state == -1 ? false : true,
+ ...e,
+ });
});
- this.port_options = temp_port_arr
- if(this.port_options[0]){
- this.port_select = this.port_options[0].value
- this.$set(this.port_solt_arr[0],'info',this.port_options[0].value)
- this.$set(this.port_solt_arr[1],'info',this.port_options[0].req_type)
- this.$set(this.port_solt_arr[2],'info',this.port_options[0].encode_method)
- this.req_solt_data = this.port_options[0].req_fields
- this.res_solt_data = this.port_options[0].res_fields
- this.req_solt_code_arr = this.port_options[0].req_fields_example
- this.res_solt_code_arr = this.port_options[0].res_fields_example
+ this.port_options = temp_port_arr;
+ if (this.port_options[0]) {
+ this.port_select = this.port_options[0].value;
+ this.$set(
+ this.port_solt_arr[0],
+ "info",
+ this.port_options[0].value
+ );
+ this.$set(
+ this.port_solt_arr[1],
+ "info",
+ this.port_options[0].req_type
+ );
+ this.$set(
+ this.port_solt_arr[2],
+ "info",
+ this.port_options[0].encode_method
+ );
+ this.req_solt_data = this.port_options[0].req_fields;
+ this.res_solt_data = this.port_options[0].res_fields;
+ this.req_solt_code_arr = this.port_options[0].req_fields_example;
+ this.res_solt_code_arr = this.port_options[0].res_fields_example;
}
- }else{
- this.process_in_up = false
+ } else {
+ this.process_in_up = false;
}
- if(data.service_data_type_1 == 10){
- this.perception_in = true
- this.$set(this.gz_solt_arr[0],'info',data.urls[0].req_url)
- this.$set(this.gz_solt_arr[1],'info',data.urls[0].encode_method)
- this.req_gz_solt_data = data.urls[0].req_fields
- this.res_gz_solt_data = data.urls[0].res_fields
- this.req_solt_code_arr = data.urls[0].req_fields_example
- this.res_solt_code_arr = data.urls[0].res_fields_example
-
- }else{
- this.perception_in = false
+ if (data.service_data_type_1 == 10) {
+ this.perception_in = true;
+ this.$set(this.gz_solt_arr[0], "info", data.urls[0].req_url);
+ this.$set(
+ this.gz_solt_arr[1],
+ "info",
+ data.urls[0].encode_method
+ );
+ this.req_gz_solt_data = data.urls[0].req_fields;
+ this.res_gz_solt_data = data.urls[0].res_fields;
+ this.req_solt_code_arr = data.urls[0].req_fields_example;
+ this.res_solt_code_arr = data.urls[0].res_fields_example;
+ } else {
+ this.perception_in = false;
}
- console.log(this.process_in_up,this.perception_in);
- this.get_trans_data()
- if(this.process_in_up){
- var temp_sj = this.service_header_arr.first.pop()
- this.service_header_arr.second = []
- this.service_header_arr.second.push(temp_sj)
+ console.log(this.process_in_up, this.perception_in);
+ this.get_trans_data();
+ if (this.process_in_up) {
+ var temp_sj = this.service_header_arr.first.pop();
+ this.service_header_arr.second = [];
+ this.service_header_arr.second.push(temp_sj);
}
this.$set(this.list_arr[0], "info", data.descript);
this.$set(this.list_arr[1], "info", data.sectors_name);
this.$set(this.list_arr[2], "info", data.organization_name);
this.$set(this.list_arr[3], "info", data.openness_name);
this.$set(this.list_arr[4], "info", "自动生成");
- this.$set(
- this.list_arr[5],
- "info",
- data.create_time.replace("T", " ").split("+")[0]
- );
+ let str = data.create_time.replace("T", " ").split("+")[0];
+ str = str.replace("Z", " ").split("+")[0];
+ this.$set(this.list_arr[5], "info", str);
+ this.$set(this.cp_arr[0], "info", data.descript);
+ this.$set(this.cp_arr[1], "info", data.sectors_name);
+ let strtags = "";
+ if (data.tags && data.tags.length != 0) {
+ data.tags.forEach((item) => {
+ strtags += item + " ";
+ });
+ }
+ this.$set(this.cp_arr[2], "info", strtags);
+ this.$set(this.cp_arr[3], "info", data.organization_name);
+ this.$set(this.cp_arr[4], "info", data.openness_name);
+ this.$set(this.cp_arr[5], "info", str);
+ this.data_service_type1 = data.data_service_type1;
+ if (this.data_service_type1 == "36") {
+ this.service_arr[0][0] = "产品基本信息";
+ this.service_arr[0][1] = "";
+ this.service_arr[0][2] = "";
+ this.service_arr[1][0] = "产品基本信息";
+ this.service_arr[1][1] = "";
+ this.service_arr[1][2] = "";
+ this.service_arr[1][3] = "产品计费规则";
+ this.service_arr[1][4] = "产品交易记录";
+ this.service_arr[2][0] = "产品基本信息";
+ this.service_arr[2][1] = "";
+ this.service_arr[2][2] = "";
+ this.service_arr[2][3] = "产品规格";
+ this.service_arr[2][4] = "产品交易记录";
+ this.getMd(data.doc_file)
+ }
+ // console.log(this.service_arr)
// 接口详情信息
this.$set(
this.servicead_arr[0],
@@ -1399,44 +1613,50 @@ export default {
this.$set(this.servicead_arr[1], "info", "无请求参数");
}
this.req_code_arr =
- data.urls[0].req_fields_example || data.urls[0].req_query_example || ""; // 请求示例
+ data.urls[0].req_fields_example ||
+ data.urls[0].req_query_example ||
+ ""; // 请求示例
if (!this.req_code_arr) {
this.$set(this.servicead_arr[2], "type", "");
this.$set(this.servicead_arr[2], "info", "无请求示例");
}
- this.$set(this.servicead_arr[3], "info", data.urls[0].encode_method); // 编码格式
+ this.$set(
+ this.servicead_arr[3],
+ "info",
+ data.urls[0].encode_method
+ ); // 编码格式
this.res_data = JSON.parse(data.urls[0].res_fields || "[]"); // 响应参数
if (this.res_data && this.res_data.length === 0) {
this.$set(this.servicead_arr[4], "type", "");
this.$set(this.servicead_arr[4], "info", "无响应参数");
}
- console.log(data.urls[0].res_fields_example)
+ console.log(data.urls[0].res_fields_example);
this.res_code_arr = data.urls[0].res_fields_example || ""; // 响应示例
- console.log(this.res_code_arr)
+ console.log(this.res_code_arr);
if (!this.res_code_arr) {
this.$set(this.servicead_arr[5], "type", "");
this.$set(this.servicead_arr[5], "info", "无响应示例");
}
// 接口详情信息 end
- var temp = data.request_spcs_info||[]
- temp.forEach((e,idx) => {
- e.index = idx+1
- if(e.spcs_type==1){
- e.gg = e.money+'金币/'+e.spcs_count+'次'
- e.time = '不限时长'
- e.pv = e.spcs_count
- e.d_price = e.money/e.spcs_count+'金币/次'
- e.spcs_type_name = '计次收费'
- }else if(e.spcs_type==2){
- e.gg = e.money+'金币/月'
- e.time = '1个月'
- e.pv = '不限次数'
- e.d_price = '-'
- e.spcs_type_name = '计时收费'
+ var temp = data.request_spcs_info || [];
+ temp.forEach((e, idx) => {
+ e.index = idx + 1;
+ if (e.spcs_type == 1) {
+ e.gg = e.money + "金币/" + e.spcs_count + "次";
+ e.time = "不限时长";
+ e.pv = e.spcs_count;
+ e.d_price = e.money / e.spcs_count + "金币/次";
+ e.spcs_type_name = "计次收费";
+ } else if (e.spcs_type == 2) {
+ e.gg = e.money + "金币/月";
+ e.time = "1个月";
+ e.pv = "不限次数";
+ e.d_price = "-";
+ e.spcs_type_name = "计时收费";
}
});
- this.service_size_data =temp;
- this.size_arr_down =temp;
+ this.service_size_data = temp;
+ this.size_arr_down = temp;
} else {
this.$message({
message: response.data.errMsg,
@@ -1444,32 +1664,44 @@ export default {
});
}
})
- .catch(function(response) {});
+ .catch(function (response) {});
+ },
+ getMd(url) {
+ this.$http
+ .get(url, {
+ params: {
+ serviceId: this.id,
+ },
+ })
+ .then(response => {
+ this.cp_arr[6].item = response.data;
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
},
now_size_data(val) {
console.log(val);
- val.forEach(e => {
- if(e.spcs_type==1){
- if(e.pv=='不限次数'){
- e.pv = ''
- e.time = ''
- e.descript = ''
- e.money = ''
- e.d_price = ''
+ val.forEach((e) => {
+ if (e.spcs_type == 1) {
+ if (e.pv == "不限次数") {
+ e.pv = "";
+ e.time = "";
+ e.descript = "";
+ e.money = "";
+ e.d_price = "";
}
- e.time = '不限时长'
- e.descript = '提供'+e.pv+'次服务,时长不限'
- if(e.money&&e.pv){
- e.d_price = parseInt(e.money/e.pv)+'金币/次'
- }
- }else if(e.spcs_type==2){
- e.pv = '不限次数'
- e.d_price = '-'
- e.time = '按月'
- e.descript = '每月不限调用次数'
+ e.time = "不限时长";
+ e.descript = "提供" + e.pv + "次服务,时长不限";
+ if (e.money && e.pv) {
+ e.d_price = parseInt(e.money / e.pv) + "金币/次";
}
-
-
+ } else if (e.spcs_type == 2) {
+ e.pv = "不限次数";
+ e.d_price = "-";
+ e.time = "按月";
+ e.descript = "每月不限调用次数";
+ }
});
this.size_arr_down = val;
},
@@ -1482,51 +1714,51 @@ export default {
.then((response) => {
let data = response.data.data;
console.log(data);
- var temp = data.data||[]
- temp.forEach((e,idx) => {
- e.index = idx+1
- // if(e.spcs_type==1){
- // e.gg = e.money+'/'+e.spcs_count
- // e.time = '不限时长'
- // e.pv = e.spcs_count
- // e.d_price = ''
- // }else if(e.spcs_type==1){
- // e.gg = e.money+'/月'
- // e.time = '1个月'
- // e.pv = '不限次数'
- // e.d_price = '-'
- // }
+ var temp = data.data || [];
+ temp.forEach((e, idx) => {
+ e.index = idx + 1;
+ // if(e.spcs_type==1){
+ // e.gg = e.money+'/'+e.spcs_count
+ // e.time = '不限时长'
+ // e.pv = e.spcs_count
+ // e.d_price = ''
+ // }else if(e.spcs_type==1){
+ // e.gg = e.money+'/月'
+ // e.time = '1个月'
+ // e.pv = '不限次数'
+ // e.d_price = '-'
+ // }
- if(e.spcs_type==1){
- e.gg = e.money+'金币/'+e.spcs_count+'次'
- e.time = '不限时长'
- e.pv = e.spcs_count
- e.d_price = e.money/e.spcs_count+'金币/次'
- e.spcs_type_name = '计次收费'
- }else if(e.spcs_type==2){
- e.gg = e.money+'金币/月'
- e.time = '1个月'
- e.pv = '不限次数'
- e.d_price = '-'
- e.spcs_type_name = '计时收费'
- }
- });
+ if (e.spcs_type == 1) {
+ e.gg = e.money + "金币/" + e.spcs_count + "次";
+ e.time = "不限时长";
+ e.pv = e.spcs_count;
+ e.d_price = e.money / e.spcs_count + "金币/次";
+ e.spcs_type_name = "计次收费";
+ } else if (e.spcs_type == 2) {
+ e.gg = e.money + "金币/月";
+ e.time = "1个月";
+ e.pv = "不限次数";
+ e.d_price = "-";
+ e.spcs_type_name = "计时收费";
+ }
+ });
this.service_size_data = temp;
})
- .catch(function(response) {});
+ .catch(function (response) {});
},
change_service_size() {
let temp = [];
-
+
this.size_arr_down.forEach((e) => {
- if (e.pv && e.money&&e.spcs_type) {
- e.id = 0
+ if (e.pv && e.money && e.spcs_type) {
+ e.id = 0;
delete e.undefined;
delete e.flag;
- e.spcs_count = e.spcs_type==1?parseInt(e.pv):0;
+ e.spcs_count = e.spcs_type == 1 ? parseInt(e.pv) : 0;
e.money = parseFloat(e.money);
- e.duration=1
- e.duration_unit=1
+ e.duration = 1;
+ e.duration_unit = 1;
temp.push(e);
}
});
@@ -1595,7 +1827,7 @@ export default {
background-color: #c3caf8;
color: #0f2683;
}
-.service_port .el-input__inner{
+.service_port .el-input__inner {
width: 785px;
background-color: #f7f8f9;
}
@@ -1712,7 +1944,7 @@ export default {
margin-top: 50px;
overflow: hidden;
}
-.port_bg_box{
+.port_bg_box {
width: 100%;
min-height: 100px;
background-color: #f8f9fd;
@@ -1720,13 +1952,13 @@ export default {
margin-top: 10px;
padding: 20px 30px;
}
-.trans_all{
+.trans_all {
width: 100%;
height: 128px;
- background-color: #fbfcfe;
- border-radius: 12px;
+ background-color: #fbfcfe;
+ border-radius: 12px;
}
-.trans_all .trans_box{
+.trans_all .trans_box {
width: 33.3%;
float: left;
height: 65px;
@@ -1734,10 +1966,10 @@ export default {
margin-top: 30px;
border-right: 2px solid #e6ebfe;
}
-.trans_all .trans_box:nth-last-of-type(1){
+.trans_all .trans_box:nth-last-of-type(1) {
border: 0;
}
-.trans_middle{
+.trans_middle {
width: 200px;
height: 65px;
line-height: 65px;
@@ -1745,33 +1977,32 @@ export default {
position: relative;
text-align: right;
}
-.trans_middle img{
+.trans_middle img {
position: absolute;
left: 0;
top: 15px;
}
-.trans_middle span{
+.trans_middle span {
position: absolute;
right: -20px;
top: 18px;
font-size: 16px;
- color: #242c43;
+ color: #242c43;
}
-.trans_middle p{
+.trans_middle p {
font-size: 16px;
line-height: 32px;
- color: #58617a;
+ color: #58617a;
}
-.trans_middle p:nth-of-type(2){
+.trans_middle p:nth-of-type(2) {
font-size: 24px;
- font-weight: bold;
- color: #242c43;
+ font-weight: bold;
+ color: #242c43;
}
-.trans_all .trans_box:nth-of-type(1) .trans_middle span{
+.trans_all .trans_box:nth-of-type(1) .trans_middle span {
right: -40px;
}
-.trans_log{
+.trans_log {
width: 100%;
-
}
diff --git a/src/pages/workbench/fwzc_fwcs.vue b/src/pages/workbench/fwzc_fwcs.vue
index d2061c9b7f79668fea938ee0957c9781b06fb775..c2d95a7b7e8e1f600621e4d8180ec8c488c5e33e 100644
--- a/src/pages/workbench/fwzc_fwcs.vue
+++ b/src/pages/workbench/fwzc_fwcs.vue
@@ -41,12 +41,12 @@
>
![]()
{{ item.name }}
@@ -112,10 +112,16 @@
XML
-