Commit ebaf24e1 authored by 刘殿昕's avatar 刘殿昕

Merge branch 'ldx' into dev

parents 5324c947 6c955235
...@@ -36,7 +36,15 @@ ...@@ -36,7 +36,15 @@
v-model="serviceUrl" v-model="serviceUrl"
class="input-with-select" class="input-with-select"
> >
<el-select v-model="select" slot="prepend" placeholder="请选择"> <el-select v-if="activeBtn == 1" v-model="select" slot="prepend" placeholder="请选择">
<el-option
v-for="item in optionType1"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
<el-select v-else v-model="select" slot="prepend" placeholder="请选择">
<el-option <el-option
v-for="item in optionType" v-for="item in optionType"
:key="item.value" :key="item.value"
...@@ -114,7 +122,7 @@ ...@@ -114,7 +122,7 @@
<el-radio <el-radio
v-for="item in skfwRadios" v-for="item in skfwRadios"
:key="item" :key="item"
v-model="sjfwQqt" v-model="skfwQqt"
:label="item" :label="item"
>{{ item }}</el-radio> >{{ item }}</el-radio>
<el-button v-if="activeBtn == 1" @click="clickFwcs()" class="fwcs_btn_fwcs">服务测试</el-button> <el-button v-if="activeBtn == 1" @click="clickFwcs()" class="fwcs_btn_fwcs">服务测试</el-button>
...@@ -363,6 +371,9 @@ export default { ...@@ -363,6 +371,9 @@ export default {
{ label: "PUT", value: "PUT" }, { label: "PUT", value: "PUT" },
{ label: "DELETE", value: "DELETE" } { label: "DELETE", value: "DELETE" }
], ],
optionType1: [
{ label: "GET", value: "GET" },
],
activeName: 0, activeName: 0,
activeZh: 0, activeZh: 0,
sjfwQqcs: [ sjfwQqcs: [
...@@ -459,6 +470,7 @@ export default { ...@@ -459,6 +470,7 @@ export default {
tokenVal: "", tokenVal: "",
sjfwQqt: "JSON", sjfwQqt: "JSON",
zhfwQqt: "JSON", zhfwQqt: "JSON",
skfwQqt: "ArcGIS Server Web",
skfwRadios: [ skfwRadios: [
"ArcGIS Server Web", "ArcGIS Server Web",
"文档", "文档",
...@@ -636,7 +648,14 @@ export default { ...@@ -636,7 +648,14 @@ export default {
headers: headers, headers: headers,
params: requestData, params: requestData,
body: bodys, body: bodys,
content_type: contentType content_type: contentType,
data_service_type1: this.btnList[this.activeBtn].id,
data_service_type2:
this.activeBtn == 1
? this.skfwQqt
: this.activeBtn == 4
? this.zhyyVal
: 0
}; };
this.$api.workbench.fwzcFwcs(query).then(response => { this.$api.workbench.fwzcFwcs(query).then(response => {
if (response.data.success == 1) { if (response.data.success == 1) {
...@@ -721,6 +740,15 @@ export default { ...@@ -721,6 +740,15 @@ export default {
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
if (valid) { if (valid) {
if (this.cover.length != 0) { if (this.cover.length != 0) {
let contentType = "";
if (this.activeBtn == 0) {
bodys = this.$refs.jsonCodes.getCodesVal();
contentType = this.sjfwQqt;
} else if (this.activeBtn == 4) {
if (this.activeZh == 1) {
contentType = this.zhfwQqt;
}
}
let query = { let query = {
name: this.form.name, name: this.form.name,
sectors: this.form.area, sectors: this.form.area,
...@@ -731,7 +759,7 @@ export default { ...@@ -731,7 +759,7 @@ export default {
data_service_type1: this.btnList[this.activeBtn].id, data_service_type1: this.btnList[this.activeBtn].id,
data_service_type2: data_service_type2:
this.activeBtn == 1 this.activeBtn == 1
? this.skfwRadios ? this.skfwQqt
: this.activeBtn == 4 : this.activeBtn == 4
? this.zhyyVal ? this.zhyyVal
: 0, : 0,
...@@ -739,7 +767,8 @@ export default { ...@@ -739,7 +767,8 @@ export default {
method: this.select, method: this.select,
url: this.serviceUrl, url: this.serviceUrl,
request_fields: this.request_fields, request_fields: this.request_fields,
response_fields: this.response_fields response_fields: this.response_fields,
content_type: contentType
}; };
this.$api.workbench.serviceAdd(query).then(response => { this.$api.workbench.serviceAdd(query).then(response => {
if (response.data.success == 1) { if (response.data.success == 1) {
......
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