diff --git a/src/assets/css/index.css b/src/assets/css/index.css
index 4ac5b2b4b3cdcfd496b2400b9a1e03f81fc29df4..2dfb72989c3ba134f39087fd0ccb02db925c1bf6 100644
--- a/src/assets/css/index.css
+++ b/src/assets/css/index.css
@@ -404,8 +404,11 @@ width: 620px!important;
.el-button {
border-radius: 8px;
}
-/* 下拉选样式 */
-/* .el-select-dropdown {
+/*
+ 下拉选样式
+ 此处勿删,apaasV3下拉选择样式统一用这个
+ */
+.el-select-dropdown {
border-radius: 8px;
}
.el-select-dropdown__list {
@@ -437,7 +440,7 @@ width: 620px!important;
}
.el-popper[x-placement^=top] .popper__arrow::after {
border-top-color: transparent;
-} */
+}
/* 单选激活样式 */
.el-radio__input.is-checked .el-radio__inner {
border-color: #838383;
diff --git a/src/components/codes.vue b/src/components/codes.vue
index cf64cf7fbf14afc3c44155e1ced2494a01093f71..c31bf4ea6fcfe4f350efb010020f8d54be4b4301 100644
--- a/src/components/codes.vue
+++ b/src/components/codes.vue
@@ -30,7 +30,9 @@ export default {
tabSize: 4,
highlightActiveLine: false
});
- this.getValue();
+ if (this.url) {
+ this.getValue();
+ }
},
watch: {},
methods: {
@@ -38,7 +40,7 @@ export default {
this.$http
.get(this.url)
.then(response => {
- this.aceEditor.setValue(JSON.stringify(response.data, null, "\t"));
+ this.aceEditor.setValue(response.data);
})
.catch(function(response) {
console.log(response);
@@ -46,6 +48,9 @@ export default {
},
parentHandleclick() {
this.$emit("getEditValue", this.aceEditor.getValue());
+ },
+ getCodesVal() {
+ return this.aceEditor.getValue();
}
}
};
diff --git a/src/components/table-select.vue b/src/components/table-select.vue
index fb6759c451e5ae55f9aaedb931f34f388e44c491..ae7d78d38a0d0d08c621d1eeb4cad92bbd797774 100644
--- a/src/components/table-select.vue
+++ b/src/components/table-select.vue
@@ -2,19 +2,25 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -23,9 +29,11 @@
import helper from "@/services/helper";
export default {
props: {
- selectArr:{
+ selectArr: {
type: Array,
- default: []
+ default: () => {
+ [];
+ }
},
item: {
type: String,
@@ -42,7 +50,7 @@ export default {
couldNotEdit: {
type: Boolean,
default: false
- },
+ }
},
data: () => ({
selectValue: ""
@@ -78,6 +86,6 @@ export default {
border-radius: 4px;
}
.table_in_s .el-input.is-disabled .el-input__inner {
- color: #70747C;
+ color: #70747c;
}
\ No newline at end of file
diff --git a/src/components/table-um.vue b/src/components/table-um.vue
index 11a67c8347f11ca4d83d85db23208af10fce6f60..1aa76d41bda624fdfc59b7f857f5b4fca55bf040 100644
--- a/src/components/table-um.vue
+++ b/src/components/table-um.vue
@@ -367,6 +367,10 @@ export default {
type: Boolean,
default: true,
},
+ datas: {
+ type: Array,
+ default: null,
+ },
},
data() {
return {
@@ -444,6 +448,9 @@ export default {
// console.log(this.emptyText);
// the if statement is to choose which data could be show, only used for test and template
this.selectedTabsPage = [];
+ if (this.datas) {
+ this.selectedTabsPage = this.datas;
+ }
this.pagination.total = 0;
if (this.autoAdd) {
this.addRow();
diff --git a/src/pages/fwzc_fwcs.vue b/src/pages/fwzc_fwcs.vue
index a096b56b0f95176ae6e2e77ea7976af74f3a7439..2c93be3a7a4d1d4c455480d9e726b919ecba8a9f 100644
--- a/src/pages/fwzc_fwcs.vue
+++ b/src/pages/fwzc_fwcs.vue
@@ -73,7 +73,7 @@
JSON
-
+
@@ -120,7 +120,8 @@
size="mini"
:border="true"
:headers="sjfw_qqcstx"
- url="qqcstx"
+ url
+ :datas="datas"
:searchShow="false"
:addRowBtn="false"
:autoAdd="false"
@@ -140,7 +141,8 @@
size="mini"
:border="true"
:headers="sjfw_fhcstx"
- url="fhcstx"
+ url
+ :datas="datas"
:searchShow="false"
:addRowBtn="false"
:autoAdd="false"
@@ -285,10 +287,10 @@ export default {
{ label: "请求值", prop: "requestValue", type: "input", align: "left" }
],
sjfw_qqcstx: [
- { label: "字段编码", prop: "unicode", type: "", align: "left" },
- { label: "示例值", prop: "examples", type: "input", align: "left" },
- { label: "字段类型", prop: "type", type: "", align: "left" },
- { label: "字段名称", prop: "name", type: "input", align: "left" },
+ { label: "字段编码", prop: "name", type: "", align: "left" },
+ { label: "示例值", prop: "example", type: "input", align: "left" },
+ { label: "字段类型", prop: "field_type", type: "", align: "left" },
+ { label: "字段名称", prop: "label", type: "input", align: "left" },
{
label: "是否必须",
prop: "needable",
@@ -296,18 +298,18 @@ export default {
align: "left",
width: 100
},
- { label: "字段说明", prop: "explanation", type: "input", align: "left" }
+ { label: "字段说明", prop: "descript", type: "input", align: "left" }
],
sjfw_fhcstx: [
- { label: "字段编码", prop: "unicode", type: "", align: "left" },
- { label: "字段类型", prop: "type", type: "popover", align: "left" },
- { label: "字段名称", prop: "name", type: "input", align: "left" },
- { label: "字段说明", prop: "explanation", type: "input", align: "left" }
+ { label: "字段编码", prop: "name", type: "", align: "left" },
+ { label: "字段类型", prop: "field_type", type: "popover", align: "left" },
+ { label: "字段名称", prop: "label", type: "input", align: "left" },
+ { label: "字段说明", prop: "descript", type: "input", align: "left" }
],
url: "",
emptyText: "暂时没数据",
resultShow: false,
- optionsSq: [{ label: "Bearer Token", value: "Bearer Token" }],
+ optionsSq: [{ label: "Bearer Token", value: "Bearer" }],
sqfsVal: "",
tokenVal: "",
sjfwQqt: "JSON",
@@ -351,7 +353,65 @@ export default {
{ label: "教育机构", value: 9 },
{ label: "其他", value: 10 }
],
- optionsOrganization: []
+ optionsOrganization: [],
+ datas: [
+ {
+ id: 123134445,
+ name: "name",
+ field_type: "string",
+ label: "",
+ descript: "",
+ example: "lisi",
+ children: null
+ },
+ {
+ id: 1213445,
+ name: "age",
+ field_type: "float",
+ label: "",
+ descript: "",
+ example: "22.00",
+ children: null
+ },
+ {
+ id: 12313444,
+ name: "childs",
+ field_type: "array",
+ label: "",
+ descript: "",
+ example: "",
+ children: [
+ {
+ id: 1231345,
+ name: "",
+ field_type: "object",
+ label: "",
+ descript: "",
+ example: "",
+ children: [
+ {
+ id: 123344445,
+ name: "name",
+ field_type: "string",
+ label: "",
+ descript: "",
+ example: "lili",
+ children: null
+ },
+ {
+ id: 11344445,
+ name: "age",
+ field_type: "float",
+ label: "",
+ descript: "",
+ example: "2.00",
+ children: null
+ }
+ ]
+ }
+ ]
+ }
+ ]
}),
computed: {},
watch: {},
@@ -362,6 +422,54 @@ export default {
},
clickFwcs() {
this.resultShow = true;
+ let aothorization = {};
+ if (this.sqfsVal != "") {
+ aothorization[this.sqfsVal] = this.tokenVal;
+ }
+ let request = this.$refs.fwcs_sjfw_qq.getTableData();
+ console.log(request);
+ let requestData = {};
+ for (let i = 0; i < request.length; i++) {
+ if (
+ request[i] &&
+ request[i].requestEncoding &&
+ request[i].requestValue &&
+ request[i].requestEncoding != "" &&
+ request[i].requestValue != ""
+ ) {
+ if (
+ Object.keys(requestData).indexOf(request[i].requestEncoding) == -1
+ ) {
+ requestData[request[i].requestEncoding] = [];
+ requestData[request[i].requestEncoding][0] =
+ request[i].requestValue;
+ } else {
+ requestData[request[i].requestEncoding].push(
+ request[i].requestValue
+ );
+ }
+ }
+ }
+ let url = `/apaas/service/v3/service/manager/test`;
+ let query = {
+ method: this.select,
+ url: this.input3,
+ Authorization: aothorization,
+ params: requestData,
+ body: this.$refs.jsonCodes.getCodesVal()
+ };
+ this.$http
+ .post(url, query)
+ .then(response => {
+ if (response.data.success == 1) {
+ this.l4 = response.data.data;
+ } else {
+ console.log(response.data.console.error);
+ }
+ })
+ .catch(function(response) {
+ console.log("unkonw error");
+ });
},
clickTab() {},
clickNext() {
diff --git a/static/data.json b/static/data.json
index 6fa4a317a952f3e0dd8a6e551e692da39798dc37..a8f30d57902271f6673e2d6b6ba1704f886e08ed 100644
--- a/static/data.json
+++ b/static/data.json
@@ -540,6 +540,58 @@
"name": "王小虎",
"explanation": "上海市普陀区金沙江路 1516 弄"
}
+ ],
+ "body_fields": [
+ {
+ "name": "name",
+ "field_type": "string",
+ "label": "",
+ "descript": "",
+ "example": "lisi",
+ "children": null
+ },
+ {
+ "name": "age",
+ "field_type": "float",
+ "label": "",
+ "descript": "",
+ "example": "22.00",
+ "children": null
+ },
+ {
+ "name": "childs",
+ "field_type": "array",
+ "label": "",
+ "descript": "",
+ "example": "",
+ "children": [
+ {
+ "name": "",
+ "field_type": "object",
+ "label": "",
+ "descript": "",
+ "example": "",
+ "children": [
+ {
+ "name": "name",
+ "field_type": "string",
+ "label": "",
+ "descript": "",
+ "example": "lili",
+ "children": null
+ },
+ {
+ "name": "age",
+ "field_type": "float",
+ "label": "",
+ "descript": "",
+ "example": "2.00",
+ "children": null
+ }
+ ]
+ }
+ ]
+ }
]
}
-}
+}
\ No newline at end of file