Commit d3f549ba authored by 张洋's avatar 张洋

修改时空服务注册功能(如果配置为needLogin则不调用portal注册以及隐藏预览按钮)

parent 96e5a0e9
<template> <template>
<div class="map_view"> <div class="map_view">
<a class="map_view_action" href="#" @click.prevent.stop="viewAction"> <a
v-if="showView"
class="map_view_action"
href="#"
@click.prevent.stop="viewAction"
>
<img :src="require('../../assets/imgs/ic_yulan.png')" /> <img :src="require('../../assets/imgs/ic_yulan.png')" />
</a> </a>
...@@ -13,7 +18,11 @@ ...@@ -13,7 +18,11 @@
:before-close="beforeClose" :before-close="beforeClose"
> >
<div class="map_view_container"> <div class="map_view_container">
<iframe v-if="src" :src="src" frameborder="0"></iframe> <iframe
v-if="src"
:src="src"
frameborder="0"
></iframe>
</div> </div>
</el-dialog> </el-dialog>
</transition> </transition>
...@@ -26,25 +35,32 @@ export default { ...@@ -26,25 +35,32 @@ export default {
name: "map-view", name: "map-view",
data: () => ({ data: () => ({
showDialog: false, showDialog: false,
src: "", showView: false,
src: ""
}), }),
props: { props: {
id: { id: {
type: [String, Number], type: [String, Number],
required: true, required: true
}, }
}, },
methods: { methods: {
viewAction() { viewAction() {
this.src = gisServiceUrl + `/portal/apaasplat/viewer/previewMap.html?id=${this.id}`; this.src =
gisServiceUrl +
`/portal/apaasplat/viewer/previewMap.html?id=${this.id}`;
this.showDialog = true; this.showDialog = true;
}, },
beforeClose(done) { beforeClose(done) {
this.src = ""; this.src = "";
done(); done();
}
}, },
}, mounted() {
this.showView =
window.serviceConfig && window.serviceConfig.state == "needLogin";
}
}; };
</script> </script>
......
<template> <template>
<div class="map_view"> <div class="map_view">
<a class="map_view_action" href="#" @click.prevent.stop="viewAction"> <a
v-if="showView"
class="map_view_action"
href="#"
@click.prevent.stop="viewAction"
>
<img :src="require('../../assets/imgs/ic_yulan.png')" /> <img :src="require('../../assets/imgs/ic_yulan.png')" />
</a> </a>
...@@ -13,7 +18,11 @@ ...@@ -13,7 +18,11 @@
:before-close="beforeClose" :before-close="beforeClose"
> >
<div class="map_view_container"> <div class="map_view_container">
<workflows-view :zoom="0.8" :id="id" :hideDetail="true"></workflows-view> <workflows-view
:zoom="0.8"
:id="id"
:hideDetail="true"
></workflows-view>
</div> </div>
</el-dialog> </el-dialog>
</transition> </transition>
...@@ -21,19 +30,20 @@ ...@@ -21,19 +30,20 @@
</template> </template>
<script> <script>
import workflowsView from '@/components/work-flow/workflows-view' import workflowsView from "@/components/work-flow/workflows-view";
export default { export default {
name: "map-view", name: "map-view",
components:{ components: {
workflowsView workflowsView
}, },
data: () => ({ data: () => ({
showDialog: false, showDialog: false,
showView: false
}), }),
props: { props: {
id: { id: {
type: Number, type: Number,
required: true, required: true
} }
}, },
methods: { methods: {
...@@ -42,8 +52,12 @@ export default { ...@@ -42,8 +52,12 @@ export default {
}, },
beforeClose(done) { beforeClose(done) {
done(); done();
}
}, },
}, mounted() {
this.showView =
window.serviceConfig && window.serviceConfig.state == "needLogin";
}
}; };
</script> </script>
......
<template> <template>
<div class="fwcs"> <div class="fwcs">
<el-breadcrumb v-if="is_map != 0" separator="/" class="bread_crumb"> <el-breadcrumb
v-if="is_map != 0"
separator="/"
class="bread_crumb"
>
<el-breadcrumb-item :to="{ path: '/workplace' }"> <el-breadcrumb-item :to="{ path: '/workplace' }">
在线组件工具 在线组件工具
</el-breadcrumb-item> </el-breadcrumb-item>
...@@ -22,12 +26,17 @@ ...@@ -22,12 +26,17 @@
</el-breadcrumb-item> </el-breadcrumb-item>
<el-breadcrumb-item>发布信息填写</el-breadcrumb-item> <el-breadcrumb-item>发布信息填写</el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
<el-breadcrumb v-else separator="/" class="bread_crumb"> <el-breadcrumb
v-else
separator="/"
class="bread_crumb"
>
<el-breadcrumb-item :to="{ path: '/fwzc' }">服务注册</el-breadcrumb-item> <el-breadcrumb-item :to="{ path: '/fwzc' }">服务注册</el-breadcrumb-item>
<el-breadcrumb-item v-if="!jcxxtx">服务测试</el-breadcrumb-item> <el-breadcrumb-item v-if="!jcxxtx">服务测试</el-breadcrumb-item>
<el-breadcrumb-item v-else :to="{ path: '/fwzc' }" <el-breadcrumb-item
>服务测试</el-breadcrumb-item v-else
> :to="{ path: '/fwzc' }"
>服务测试</el-breadcrumb-item>
<el-breadcrumb-item v-if="jcxxtx">基础信息填写</el-breadcrumb-item> <el-breadcrumb-item v-if="jcxxtx">基础信息填写</el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
<div v-if="!jcxxtx"> <div v-if="!jcxxtx">
...@@ -69,7 +78,10 @@ ...@@ -69,7 +78,10 @@
></el-option> ></el-option>
</el-select> </el-select>
</div> </div>
<div v-if="activeBtn == 4 && zhyyVal == 24" class="lc_alert"> <div
v-if="activeBtn == 4 && zhyyVal == 24"
class="lc_alert"
>
<i class="el-icon-warning-outline"></i> <i class="el-icon-warning-outline"></i>
<p> <p>
说明:支持多个流程服务接口的注册,若流程服务包含多个接口,每个接口需分别注册为独立的服务地址才可使用。<br /> 说明:支持多个流程服务接口的注册,若流程服务包含多个接口,每个接口需分别注册为独立的服务地址才可使用。<br />
...@@ -80,13 +92,11 @@ ...@@ -80,13 +92,11 @@
(用于查询流程状态) (用于查询流程状态)
</p> </p>
</div> </div>
<div <div v-show="
v-show="
(activeBtn == 4 && zhyyVal == 24) || (activeBtn == 4 && zhyyVal == 24) ||
activeBtn == 3 || activeBtn == 3 ||
activeBtn == 2 activeBtn == 2
" ">
>
<div class="fwcs_fwdz"> <div class="fwcs_fwdz">
上传接口文档 上传接口文档
<span class="title_bc">(请上传所有服务地址完整接口文档)</span> <span class="title_bc">(请上传所有服务地址完整接口文档)</span>
...@@ -107,7 +117,10 @@ ...@@ -107,7 +117,10 @@
</div> </div>
<div v-if="activeBtn == 3"> <div v-if="activeBtn == 3">
<div class="fwcs_fwdz">返回数据格式</div> <div class="fwcs_fwdz">返回数据格式</div>
<el-radio-group v-model="gz_fhsjgs" class="gz_fhsjgs_rad"> <el-radio-group
v-model="gz_fhsjgs"
class="gz_fhsjgs_rad"
>
<el-radio label="JSON">JSON</el-radio> <el-radio label="JSON">JSON</el-radio>
<el-radio label="xml">XML</el-radio> <el-radio label="xml">XML</el-radio>
</el-radio-group> </el-radio-group>
...@@ -168,13 +181,23 @@ ...@@ -168,13 +181,23 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-input> </el-input>
<el-button @click="clickFwcs()" class="fwcs_btn_fwcs"> <el-button
@click="clickFwcs()"
class="fwcs_btn_fwcs"
>
服务测试 服务测试
</el-button> </el-button>
</div> </div>
<div v-if="activeBtn == 0 || activeBtn == 2 || activeBtn == 3"> <div v-if="activeBtn == 0 || activeBtn == 2 || activeBtn == 3">
<el-tabs v-model="activeName" class="fwcs_tabs" @tab-click="clickTab"> <el-tabs
<el-tab-pane label="请求参数" name="0"> v-model="activeName"
class="fwcs_tabs"
@tab-click="clickTab"
>
<el-tab-pane
label="请求参数"
name="0"
>
<ces-table <ces-table
ref="fwcs_sjfw_qq" ref="fwcs_sjfw_qq"
size="mini" size="mini"
...@@ -197,7 +220,10 @@ ...@@ -197,7 +220,10 @@
@changeTable="changeTable" @changeTable="changeTable"
></ces-table> ></ces-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="请求体" name="1"> <el-tab-pane
label="请求体"
name="1"
>
<div class="sjfw_qqt"> <div class="sjfw_qqt">
<el-radio-group v-model="sjfwQqt"> <el-radio-group v-model="sjfwQqt">
<el-radio label="JSON">JSON</el-radio> <el-radio label="JSON">JSON</el-radio>
...@@ -208,7 +234,10 @@ ...@@ -208,7 +234,10 @@
ref="jsonCodes" ref="jsonCodes"
></v-apaas-code> ></v-apaas-code>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="授权信息" name="2"> <el-tab-pane
label="授权信息"
name="2"
>
<el-row class="sqxx_row"> <el-row class="sqxx_row">
<el-col :span="6"> <el-col :span="6">
<div class="sqxx_title">授权方式:</div> <div class="sqxx_title">授权方式:</div>
...@@ -225,7 +254,10 @@ ...@@ -225,7 +254,10 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="2" class="center_line_c"> <el-col
:span="2"
class="center_line_c"
>
<div class="center_line"></div> <div class="center_line"></div>
</el-col> </el-col>
<el-col :span="16"> <el-col :span="16">
...@@ -247,13 +279,19 @@ ...@@ -247,13 +279,19 @@
:key="item.name" :key="item.name"
v-model="skfwQqt" v-model="skfwQqt"
:label="item.id" :label="item.id"
>{{ item.name }}</el-radio >{{ item.name }}</el-radio>
>
</div> </div>
</div> </div>
<div v-if="activeBtn == 4 && zhyyVal != 34 && zhyyVal != 24"> <div v-if="activeBtn == 4 && zhyyVal != 34 && zhyyVal != 24">
<el-tabs v-model="activeZh" class="fwcs_tabs" @tab-click="clickTab"> <el-tabs
<el-tab-pane label="请求参数" name="0"> v-model="activeZh"
class="fwcs_tabs"
@tab-click="clickTab"
>
<el-tab-pane
label="请求参数"
name="0"
>
<ces-table <ces-table
ref="fwcs_zhfw_qq" ref="fwcs_zhfw_qq"
size="mini" size="mini"
...@@ -276,14 +314,18 @@ ...@@ -276,14 +314,18 @@
@changeTable="changeTable" @changeTable="changeTable"
></ces-table> ></ces-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="请求体" name="1"> <el-tab-pane
label="请求体"
name="1"
>
<div class="sjfw_qqt"> <div class="sjfw_qqt">
<el-radio-group v-model="zhfwQqt" @change="changeZhfwQqt"> <el-radio-group
v-model="zhfwQqt"
@change="changeZhfwQqt"
>
<el-radio label="JSON">JSON</el-radio> <el-radio label="JSON">JSON</el-radio>
<el-radio label="form-data">form-data</el-radio> <el-radio label="form-data">form-data</el-radio>
<el-radio label="x-www-form-urlencoded" <el-radio label="x-www-form-urlencoded">x-www-form-urlencoded</el-radio>
>x-www-form-urlencoded</el-radio
>
</el-radio-group> </el-radio-group>
</div> </div>
<div v-show="zhfwQqt == 'JSON'"> <div v-show="zhfwQqt == 'JSON'">
...@@ -342,14 +384,12 @@ ...@@ -342,14 +384,12 @@
</div> </div>
</block-radius> </block-radius>
<block-radius v-show="resultShow"> <block-radius v-show="resultShow">
<div <div v-show="
v-show="
(activeBtn == 0 || (activeBtn == 0 ||
activeBtn == 3 || activeBtn == 3 ||
(activeBtn == 4 && (zhyyVal == 22 || zhyyVal == 23))) && (activeBtn == 4 && (zhyyVal == 22 || zhyyVal == 23))) &&
resSuccess resSuccess
" ">
>
<div class="sjfw_qqcstx">请求参数信息填写:</div> <div class="sjfw_qqcstx">请求参数信息填写:</div>
<ces-table <ces-table
ref="fwcs_sjfw_qqcs" ref="fwcs_sjfw_qqcs"
...@@ -393,14 +433,12 @@ ...@@ -393,14 +433,12 @@
headerCellClassName="th_pink" headerCellClassName="th_pink"
></ces-table> ></ces-table>
</div> </div>
<div <div v-show="
v-show="
(activeBtn == 1 || (activeBtn == 1 ||
activeBtn == 2 || activeBtn == 2 ||
(activeBtn == 4 && zhyyVal == 34)) && (activeBtn == 4 && zhyyVal == 34)) &&
resSuccess resSuccess
" ">
>
<div class="skfw_csfwxx">测试服务信息:</div> <div class="skfw_csfwxx">测试服务信息:</div>
<div class="test_succ"> <div class="test_succ">
<div class="skcs_jg"> <div class="skcs_jg">
...@@ -411,16 +449,14 @@ ...@@ -411,16 +449,14 @@
</div> </div>
</div> </div>
</div> </div>
<div <div v-show="
v-show="
(activeBtn == 0 || (activeBtn == 0 ||
activeBtn == 1 || activeBtn == 1 ||
activeBtn == 2 || activeBtn == 2 ||
activeBtn == 3 || activeBtn == 3 ||
activeBtn == 4) && activeBtn == 4) &&
!resSuccess !resSuccess
" ">
>
<div class="skfw_csfwxx">测试服务信息:</div> <div class="skfw_csfwxx">测试服务信息:</div>
<div class="test_succ"> <div class="test_succ">
<div class="skcs_jg"> <div class="skcs_jg">
...@@ -496,16 +532,20 @@ ...@@ -496,16 +532,20 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-input> </el-input>
<el-button @click="clickFwcsOne(indexOne)" class="fwcs_btn_fwcs" <el-button
>服务测试</el-button @click="clickFwcsOne(indexOne)"
> class="fwcs_btn_fwcs"
>服务测试</el-button>
</div> </div>
<el-tabs <el-tabs
v-model="itemOne.activeName" v-model="itemOne.activeName"
class="fwcs_tabs" class="fwcs_tabs"
@tab-click="clickTabOne" @tab-click="clickTabOne"
> >
<el-tab-pane label="请求参数" name="0"> <el-tab-pane
label="请求参数"
name="0"
>
<ces-table <ces-table
:ref="`one_qqcs_${indexOne}`" :ref="`one_qqcs_${indexOne}`"
size="mini" size="mini"
...@@ -532,7 +572,10 @@ ...@@ -532,7 +572,10 @@
" "
></ces-table> ></ces-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="请求体" name="1"> <el-tab-pane
label="请求体"
name="1"
>
<div class="sjfw_qqt"> <div class="sjfw_qqt">
<el-radio-group v-model="itemOne.sjfwQqt"> <el-radio-group v-model="itemOne.sjfwQqt">
<el-radio label="JSON">JSON</el-radio> <el-radio label="JSON">JSON</el-radio>
...@@ -543,7 +586,10 @@ ...@@ -543,7 +586,10 @@
:ref="`one_json_${indexOne}`" :ref="`one_json_${indexOne}`"
></v-apaas-code> ></v-apaas-code>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="授权信息" name="2"> <el-tab-pane
label="授权信息"
name="2"
>
<el-row class="sqxx_row"> <el-row class="sqxx_row">
<el-col :span="6"> <el-col :span="6">
<div class="sqxx_title">授权方式:</div> <div class="sqxx_title">授权方式:</div>
...@@ -560,7 +606,10 @@ ...@@ -560,7 +606,10 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="2" class="center_line_c"> <el-col
:span="2"
class="center_line_c"
>
<div class="center_line_one"></div> <div class="center_line_one"></div>
</el-col> </el-col>
<el-col :span="16"> <el-col :span="16">
...@@ -637,20 +686,17 @@ ...@@ -637,20 +686,17 @@
" "
class="new_one" class="new_one"
@click="newOne(indexOne)" @click="newOne(indexOne)"
>新增服务地址</el-button >新增服务地址</el-button>
>
<el-button <el-button
v-if="!(indexOne == liucheng_list.length || liucheng_list.length == 1)" v-if="!(indexOne == liucheng_list.length || liucheng_list.length == 1)"
class="del_one" class="del_one"
@click="delOne(indexOne)" @click="delOne(indexOne)"
>移除</el-button >移除</el-button>
>
<el-button <el-button
v-if="itemOne.resultShow" v-if="itemOne.resultShow"
class="reset_one" class="reset_one"
@click="resetOne(indexOne)" @click="resetOne(indexOne)"
>重置</el-button >重置</el-button>
>
<el-button <el-button
v-if=" v-if="
indexOne + 1 == liucheng_list.length && itemOne.resSuccess indexOne + 1 == liucheng_list.length && itemOne.resSuccess
...@@ -740,16 +786,32 @@ ...@@ -740,16 +786,32 @@
<el-radio :label="3">敏感</el-radio> <el-radio :label="3">敏感</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item v-if="is_map != 0" class="btn_footer"> <el-form-item
<el-button class="previous" @click="goBack('map')"> v-if="is_map != 0"
class="btn_footer"
>
<el-button
class="previous"
@click="goBack('map')"
>
{{ is_map == 1 ? "返回智能制图" : "返回Web应用程序" }} {{ is_map == 1 ? "返回智能制图" : "返回Web应用程序" }}
</el-button> </el-button>
<el-button class="registe" :disabled="mapR" @click="registeMap"> <el-button
class="registe"
:disabled="mapR"
@click="registeMap"
>
服务发布 服务发布
</el-button> </el-button>
</el-form-item> </el-form-item>
<el-form-item v-else-if="process_id != ''" class="btn_footer"> <el-form-item
<el-button class="previous" @click="goBack('process')"> v-else-if="process_id != ''"
class="btn_footer"
>
<el-button
class="previous"
@click="goBack('process')"
>
返回流程管理 返回流程管理
</el-button> </el-button>
<el-button <el-button
...@@ -760,18 +822,29 @@ ...@@ -760,18 +822,29 @@
服务发布 服务发布
</el-button> </el-button>
</el-form-item> </el-form-item>
<el-form-item v-else class="btn_footer"> <el-form-item
<el-button class="previous" @click="previous">上一步</el-button> v-else
<el-button class="registe" :disabled="fwR" @click="registe" class="btn_footer"
>服务注册</el-button
> >
<el-button
class="previous"
@click="previous"
>上一步</el-button>
<el-button
class="registe"
:disabled="fwR"
@click="registe"
>服务注册</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
</block-radius> </block-radius>
</div> </div>
<div style="display: none"> <div style="display: none">
<iframe id="listener" :src="addPortalItemUrl"></iframe> <iframe
id="listener"
:src="addPortalItemUrl"
></iframe>
</div> </div>
<apass-dialog <apass-dialog
ref="alertChange" ref="alertChange"
...@@ -797,7 +870,7 @@ export default { ...@@ -797,7 +870,7 @@ export default {
CesTable, CesTable,
apassDialog, apassDialog,
"v-apaas-code": Codes, "v-apaas-code": Codes,
uploadFile, uploadFile
}, },
data() { data() {
return { return {
...@@ -820,14 +893,14 @@ export default { ...@@ -820,14 +893,14 @@ export default {
checkPass: false, checkPass: false,
dataType: "", dataType: "",
body_fields: [], body_fields: [],
param_fields: [], param_fields: []
}, }
], ],
rulesOne: { rulesOne: {
one_input: [ one_input: [
{ required: true, message: "请输入服务名称", trigger: "blur" }, { required: true, message: "请输入服务名称", trigger: "blur" },
{ min: 0, max: 15, message: "服务名称不超过15个字", trigger: "blur" }, { min: 0, max: 15, message: "服务名称不超过15个字", trigger: "blur" }
], ]
}, },
addPortalItemUrl: addPortalItemUrl:
gisServiceUrl + "/portal/apaasplat/viewer/addPortalItem.html", gisServiceUrl + "/portal/apaasplat/viewer/addPortalItem.html",
...@@ -839,12 +912,12 @@ export default { ...@@ -839,12 +912,12 @@ export default {
{ label: "GET", value: "GET" }, { label: "GET", value: "GET" },
{ label: "POST", value: "POST" }, { label: "POST", value: "POST" },
{ label: "PUT", value: "PUT" }, { label: "PUT", value: "PUT" },
{ label: "DELETE", value: "DELETE" }, { label: "DELETE", value: "DELETE" }
], ],
optionType1: [{ label: "GET", value: "GET" }], optionType1: [{ label: "GET", value: "GET" }],
optionType2: [ optionType2: [
{ label: "GET", value: "GET" }, { label: "GET", value: "GET" },
{ label: "POST", value: "POST" }, { label: "POST", value: "POST" }
], ],
activeName: "0", activeName: "0",
activeZh: "0", activeZh: "0",
...@@ -853,9 +926,9 @@ export default { ...@@ -853,9 +926,9 @@ export default {
label: "请求字段编码", label: "请求字段编码",
prop: "requestEncoding", prop: "requestEncoding",
type: "input", type: "input",
align: "left", align: "left"
}, },
{ label: "请求值", prop: "requestValue", type: "input", align: "left" }, { label: "请求值", prop: "requestValue", type: "input", align: "left" }
], ],
sjfwQqcstx: [ sjfwQqcstx: [
{ label: "字段编码", prop: "name", type: "", align: "left" }, { label: "字段编码", prop: "name", type: "", align: "left" },
...@@ -865,13 +938,13 @@ export default { ...@@ -865,13 +938,13 @@ export default {
prop: "show_type", prop: "show_type",
type: "", type: "",
align: "left", align: "left",
width: "140", width: "140"
}, },
{ {
label: "字段名称*", label: "字段名称*",
prop: "label", prop: "label",
type: "input", type: "input",
align: "left", align: "left"
}, },
{ {
label: "是否必须*", label: "是否必须*",
...@@ -881,11 +954,11 @@ export default { ...@@ -881,11 +954,11 @@ export default {
width: 100, width: 100,
selectArr: [ selectArr: [
{ label: "", value: 1 }, { label: "", value: 1 },
{ label: "", value: 0 }, { label: "", value: 0 }
], ],
hasDefault: true, hasDefault: true
}, },
{ label: "字段说明", prop: "descript", type: "input", align: "left" }, { label: "字段说明", prop: "descript", type: "input", align: "left" }
], ],
sjfwFhcstx: [ sjfwFhcstx: [
{ label: "字段编码", prop: "name", type: "", align: "left" }, { label: "字段编码", prop: "name", type: "", align: "left" },
...@@ -895,9 +968,9 @@ export default { ...@@ -895,9 +968,9 @@ export default {
label: "字段名称*", label: "字段名称*",
prop: "label", prop: "label",
type: "input", type: "input",
align: "left", align: "left"
}, },
{ label: "字段说明", prop: "descript", type: "input", align: "left" }, { label: "字段说明", prop: "descript", type: "input", align: "left" }
], ],
zhfwQqcsForm: [ zhfwQqcsForm: [
{ label: "请求字段编码", prop: "key", type: "input", align: "left" }, { label: "请求字段编码", prop: "key", type: "input", align: "left" },
...@@ -909,15 +982,15 @@ export default { ...@@ -909,15 +982,15 @@ export default {
width: 100, width: 100,
selectArr: [ selectArr: [
{ label: "text", value: "text" }, { label: "text", value: "text" },
{ label: "file", value: "file" }, { label: "file", value: "file" }
], ]
}, },
{ {
label: "请求值", label: "请求值",
prop: "val", prop: "val",
type: "upload", type: "upload",
align: "center", align: "center",
uploadKey: "field_type", uploadKey: "field_type"
}, },
{ {
label: "操作", label: "操作",
...@@ -927,10 +1000,10 @@ export default { ...@@ -927,10 +1000,10 @@ export default {
btnList: [ btnList: [
{ {
type: "primary-del", type: "primary-del",
label: "删除", label: "删除"
}, }
], ]
}, }
], ],
datasZhForm: [], datasZhForm: [],
datasZhwww: [], datasZhwww: [],
...@@ -953,12 +1026,12 @@ export default { ...@@ -953,12 +1026,12 @@ export default {
area: "", area: "",
origin: "", origin: "",
code: "自动生成", code: "自动生成",
resource: 1, resource: 1
}, },
rules: { rules: {
name: [ name: [
{ required: true, message: "请输入服务名称", trigger: "blur" }, { required: true, message: "请输入服务名称", trigger: "blur" },
{ min: 0, max: 15, message: "服务名称不超过15个字", trigger: "blur" }, { min: 0, max: 15, message: "服务名称不超过15个字", trigger: "blur" }
], ],
desc: [ desc: [
{ required: true, message: "请输入服务描述", trigger: "blur" }, { required: true, message: "请输入服务描述", trigger: "blur" },
...@@ -966,18 +1039,18 @@ export default { ...@@ -966,18 +1039,18 @@ export default {
min: 0, min: 0,
max: 200, max: 200,
message: "服务描述不超过200个字", message: "服务描述不超过200个字",
trigger: "blur", trigger: "blur"
}, }
], ],
area: [ area: [
{ required: true, message: "请选择服务领域", trigger: "change" }, { required: true, message: "请选择服务领域", trigger: "change" }
], ],
origin: [ origin: [
{ required: true, message: "请选择所属组织", trigger: "blur" }, { required: true, message: "请选择所属组织", trigger: "blur" }
], ],
resource: [ resource: [
{ required: true, message: "请选择开放程度", trigger: "blur" }, { required: true, message: "请选择开放程度", trigger: "blur" }
], ]
}, },
rules_process: { rules_process: {
name: [ name: [
...@@ -986,8 +1059,8 @@ export default { ...@@ -986,8 +1059,8 @@ export default {
min: 0, min: 0,
max: 100, max: 100,
message: "服务名称不超过100个字", message: "服务名称不超过100个字",
trigger: "blur", trigger: "blur"
}, }
], ],
desc: [ desc: [
{ required: true, message: "请输入服务描述", trigger: "blur" }, { required: true, message: "请输入服务描述", trigger: "blur" },
...@@ -995,16 +1068,16 @@ export default { ...@@ -995,16 +1068,16 @@ export default {
min: 0, min: 0,
max: 400, max: 400,
message: "服务描述不超过400个字", message: "服务描述不超过400个字",
trigger: "blur", trigger: "blur"
}, }
], ],
area: [{ required: true, message: "请选择服务领域", trigger: "blur" }], area: [{ required: true, message: "请选择服务领域", trigger: "blur" }],
origin: [ origin: [
{ required: true, message: "请选择所属组织", trigger: "blur" }, { required: true, message: "请选择所属组织", trigger: "blur" }
], ],
resource: [ resource: [
{ required: true, message: "请选择开放程度", trigger: "blur" }, { required: true, message: "请选择开放程度", trigger: "blur" }
], ]
}, },
cover: [], cover: [],
optionsArea: [], optionsArea: [],
...@@ -1024,7 +1097,7 @@ export default { ...@@ -1024,7 +1097,7 @@ export default {
dialogInfo: { dialogInfo: {
title: "时空服务参数已修改", title: "时空服务参数已修改",
msg: "", msg: "",
submit: null, submit: null
}, },
is_portal: false, is_portal: false,
portal_id: "", portal_id: "",
...@@ -1036,7 +1109,7 @@ export default { ...@@ -1036,7 +1109,7 @@ export default {
user_id: "", user_id: "",
fwR: false, fwR: false,
mapR: false, mapR: false,
proR: false, proR: false
}; };
}, },
computed: {}, computed: {},
...@@ -1084,8 +1157,8 @@ export default { ...@@ -1084,8 +1157,8 @@ export default {
checkPass: false, checkPass: false,
dataType: "", dataType: "",
body_fields: [], body_fields: [],
param_fields: [], param_fields: []
}, }
]; ];
this.activeName = "0"; this.activeName = "0";
this.code_1_index += 1; this.code_1_index += 1;
...@@ -1193,11 +1266,11 @@ export default { ...@@ -1193,11 +1266,11 @@ export default {
let request = this.$refs.fwcs_zhfw_www.getTableData().concat(); let request = this.$refs.fwcs_zhfw_www.getTableData().concat();
let arr = []; let arr = [];
request.pop(); request.pop();
request.forEach((item) => { request.forEach(item => {
arr.push({ arr.push({
key: item.requestEncoding, key: item.requestEncoding,
val: item.requestValue, val: item.requestValue,
field_type: "text", field_type: "text"
}); });
}); });
bodys = JSON.stringify(arr); bodys = JSON.stringify(arr);
...@@ -1220,9 +1293,9 @@ export default { ...@@ -1220,9 +1293,9 @@ export default {
: this.activeBtn == 4 : this.activeBtn == 4
? this.zhyyVal ? this.zhyyVal
: 0, : 0,
response_type: this.activeBtn == 3 ? this.gz_fhsjgs : "JSON", response_type: this.activeBtn == 3 ? this.gz_fhsjgs : "JSON"
}; };
this.$api.workbench.fwzcFwcs(query).then((response) => { this.$api.workbench.fwzcFwcs(query).then(response => {
if (response.data.success == 1) { if (response.data.success == 1) {
let data = response.data.data; let data = response.data.data;
this.body_fields = data.body_fields; this.body_fields = data.body_fields;
...@@ -1359,9 +1432,9 @@ export default { ...@@ -1359,9 +1432,9 @@ export default {
getOrganization() { getOrganization() {
if (this.$store.state.userInfo && this.$store.state.userInfo.user_id) { if (this.$store.state.userInfo && this.$store.state.userInfo.user_id) {
let query = { let query = {
id: this.$store.state.userInfo.user_id, id: this.$store.state.userInfo.user_id
}; };
this.$api.user.getUserDetail(query).then((request) => { this.$api.user.getUserDetail(query).then(request => {
if (request.data.success == 1) { if (request.data.success == 1) {
this.form.origin = request.data.data.department; this.form.origin = request.data.data.department;
this.oid = request.data.data.department_id; this.oid = request.data.data.department_id;
...@@ -1375,9 +1448,9 @@ export default { ...@@ -1375,9 +1448,9 @@ export default {
if (data.success == 1) { if (data.success == 1) {
self.$store.commit("userInfofun", data.data); self.$store.commit("userInfofun", data.data);
let query = { let query = {
id: self.$store.state.userInfo.user_id, id: self.$store.state.userInfo.user_id
}; };
self.$api.user.getUserDetail(query).then((request) => { self.$api.user.getUserDetail(query).then(request => {
if (request.data.success == 1) { if (request.data.success == 1) {
self.form.origin = request.data.data.department; self.form.origin = request.data.data.department;
self.oid = request.data.data.department_id; self.oid = request.data.data.department_id;
...@@ -1392,7 +1465,7 @@ export default { ...@@ -1392,7 +1465,7 @@ export default {
} }
}, },
registeMap() { registeMap() {
this.$refs.form.validate((valid) => { this.$refs.form.validate(valid => {
if (valid) { if (valid) {
if (this.cover.length != 0) { if (this.cover.length != 0) {
this.mapR = true; this.mapR = true;
...@@ -1421,9 +1494,9 @@ export default { ...@@ -1421,9 +1494,9 @@ export default {
request_fields: [], request_fields: [],
request_query_fields: [], request_query_fields: [],
response_fields: [], response_fields: [],
content_type: "JSON", content_type: "JSON"
}, }
], ]
}; };
} else if (this.is_map == 4) { } else if (this.is_map == 4) {
query = { query = {
...@@ -1448,12 +1521,12 @@ export default { ...@@ -1448,12 +1521,12 @@ export default {
request_fields: [], request_fields: [],
request_query_fields: [], request_query_fields: [],
response_fields: [], response_fields: [],
content_type: "JSON", content_type: "JSON"
}, }
], ]
}; };
} }
this.$api.workbench.serviceAdd(query).then((response) => { this.$api.workbench.serviceAdd(query).then(response => {
this.mapR = false; this.mapR = false;
if (response.data.success == 1) { if (response.data.success == 1) {
this.$message.success("服务发布成功"); this.$message.success("服务发布成功");
...@@ -1472,7 +1545,7 @@ export default { ...@@ -1472,7 +1545,7 @@ export default {
}); });
}, },
registeProcess() { registeProcess() {
this.$refs.form.validate((valid) => { this.$refs.form.validate(valid => {
if (valid) { if (valid) {
if (this.cover.length != 0) { if (this.cover.length != 0) {
this.proR = true; this.proR = true;
...@@ -1484,9 +1557,9 @@ export default { ...@@ -1484,9 +1557,9 @@ export default {
oid: this.oid, // 组织id oid: this.oid, // 组织id
encode_method: this.form.code, // 接口编码 encode_method: this.form.code, // 接口编码
cover: this.cover[0], // 服务封面 cover: this.cover[0], // 服务封面
openness: this.form.resource, // 开放程度,1共享/2受限/3敏感 openness: this.form.resource // 开放程度,1共享/2受限/3敏感
}; };
this.$api.workbench.releaseProcess(query).then((response) => { this.$api.workbench.releaseProcess(query).then(response => {
this.proR = false; this.proR = false;
if (response.data.success == 1) { if (response.data.success == 1) {
this.$message.success("服务发布成功"); this.$message.success("服务发布成功");
...@@ -1512,7 +1585,7 @@ export default { ...@@ -1512,7 +1585,7 @@ export default {
} }
}, },
registePt() { registePt() {
this.$refs.form.validate((valid) => { this.$refs.form.validate(valid => {
if (valid) { if (valid) {
if ( if (
(this.activeBtn == 2 && this.jkwds.length == 0) || (this.activeBtn == 2 && this.jkwds.length == 0) ||
...@@ -1522,7 +1595,12 @@ export default { ...@@ -1522,7 +1595,12 @@ export default {
} else { } else {
if (this.cover.length != 0) { if (this.cover.length != 0) {
let contentType = ""; let contentType = "";
if (this.activeBtn == 1 && !this.is_portal) { if (
this.activeBtn == 1 &&
!this.is_portal &&
window.serviceConfig &&
window.serviceConfig.state == "needLogin"
) {
this.addPortalItem(); this.addPortalItem();
} else { } else {
this.fwR = true; this.fwR = true;
...@@ -1574,11 +1652,11 @@ export default { ...@@ -1574,11 +1652,11 @@ export default {
? this.request_fields ? this.request_fields
: this.param_fields, : this.param_fields,
response_fields: this.response_fields, response_fields: this.response_fields,
content_type: contentType, content_type: contentType
}, }
], ]
}; };
this.$api.workbench.serviceAdd(query).then((response) => { this.$api.workbench.serviceAdd(query).then(response => {
this.fwR = false; this.fwR = false;
if (response.data.success == 1) { if (response.data.success == 1) {
this.$message.success("服务注册成功"); this.$message.success("服务注册成功");
...@@ -1599,7 +1677,7 @@ export default { ...@@ -1599,7 +1677,7 @@ export default {
}); });
}, },
registeOne() { registeOne() {
this.$refs.form.validate((valid) => { this.$refs.form.validate(valid => {
if (valid) { if (valid) {
if (this.cover.length != 0) { if (this.cover.length != 0) {
if (this.jkwds.length == 0) { if (this.jkwds.length == 0) {
...@@ -1607,7 +1685,7 @@ export default { ...@@ -1607,7 +1685,7 @@ export default {
} else { } else {
this.fwR = true; this.fwR = true;
let urls = []; let urls = [];
this.liucheng_list.forEach((item) => { this.liucheng_list.forEach(item => {
urls.push({ urls.push({
req_name: item.one_input, req_name: item.one_input,
response_type: "JSON", response_type: "JSON",
...@@ -1624,7 +1702,7 @@ export default { ...@@ -1624,7 +1702,7 @@ export default {
? item.request_fields ? item.request_fields
: item.param_fields, : item.param_fields,
response_fields: item.response_fields, response_fields: item.response_fields,
content_type: "JSON", content_type: "JSON"
}); });
}); });
let query = { let query = {
...@@ -1639,9 +1717,9 @@ export default { ...@@ -1639,9 +1717,9 @@ export default {
portal_id: this.portal_id, portal_id: this.portal_id,
encode_method: this.form.code, encode_method: this.form.code,
urls: urls, urls: urls,
doc_file: this.jkwds.length != 0 ? this.jkwds[0] : "", doc_file: this.jkwds.length != 0 ? this.jkwds[0] : ""
}; };
this.$api.workbench.serviceAdd(query).then((response) => { this.$api.workbench.serviceAdd(query).then(response => {
this.fwR = false; this.fwR = false;
if (response.data.success == 1) { if (response.data.success == 1) {
this.$message.success("服务注册成功"); this.$message.success("服务注册成功");
...@@ -1700,7 +1778,7 @@ export default { ...@@ -1700,7 +1778,7 @@ export default {
}, },
changeZhfwQqt() {}, changeZhfwQqt() {},
getArea() { getArea() {
this.$api.workbench.getServiceAreaList().then((response) => { this.$api.workbench.getServiceAreaList().then(response => {
if (response.data.success == 1) { if (response.data.success == 1) {
this.optionsArea = response.data.data; this.optionsArea = response.data.data;
} else { } else {
...@@ -1709,10 +1787,10 @@ export default { ...@@ -1709,10 +1787,10 @@ export default {
}); });
}, },
getServiceType1() { getServiceType1() {
this.$api.workbench.getServiceTypeList().then((response) => { this.$api.workbench.getServiceTypeList().then(response => {
if (response.data.success == 1) { if (response.data.success == 1) {
let arr = response.data.data; let arr = response.data.data;
arr.forEach((item) => { arr.forEach(item => {
switch (item.id) { switch (item.id) {
case 5: case 5:
item.default = "nav_ic_shujufw"; item.default = "nav_ic_shujufw";
...@@ -1830,8 +1908,8 @@ export default { ...@@ -1830,8 +1908,8 @@ export default {
url: self.serviceUrl, url: self.serviceUrl,
sectors: self.form.area, sectors: self.form.area,
data_service_type2: self.skfwQqt, data_service_type2: self.skfwQqt,
descript: self.form.desc, descript: self.form.desc
}, }
}, },
"*" "*"
); );
...@@ -1841,7 +1919,7 @@ export default { ...@@ -1841,7 +1919,7 @@ export default {
document.getElementById("listener").contentWindow.postMessage( document.getElementById("listener").contentWindow.postMessage(
{ {
cmd: "getPortalItemInfo", cmd: "getPortalItemInfo",
params: itemid, params: itemid
}, },
"*" "*"
); );
...@@ -1866,7 +1944,7 @@ export default { ...@@ -1866,7 +1944,7 @@ export default {
self.dialogInfo.msg = `您的时空服务地址已更新为${ self.dialogInfo.msg = `您的时空服务地址已更新为${
self.serviceUrl self.serviceUrl
},服务类型更新为${ },服务类型更新为${
self.skfwRadios.find((item) => { self.skfwRadios.find(item => {
return item.id == self.skfwQqt; return item.id == self.skfwQqt;
}).name }).name
}`; }`;
...@@ -1893,7 +1971,7 @@ export default { ...@@ -1893,7 +1971,7 @@ export default {
getProcessDetail() { getProcessDetail() {
this.$api.workbench this.$api.workbench
.getProcessDetail({ id: this.process_id }) .getProcessDetail({ id: this.process_id })
.then((response) => { .then(response => {
if (response.data.success == 1) { if (response.data.success == 1) {
let data = response.data.data; let data = response.data.data;
this.form.name = data.name; this.form.name = data.name;
...@@ -1905,7 +1983,7 @@ export default { ...@@ -1905,7 +1983,7 @@ export default {
}); });
}, },
newOne(indexOne) { newOne(indexOne) {
this.$refs["ruleFormOne_" + indexOne][0].validate((valid) => { this.$refs["ruleFormOne_" + indexOne][0].validate(valid => {
if (valid) { if (valid) {
if (this.liucheng_list[indexOne].resSuccess) { if (this.liucheng_list[indexOne].resSuccess) {
this.checkOne(indexOne, true); this.checkOne(indexOne, true);
...@@ -1929,7 +2007,7 @@ export default { ...@@ -1929,7 +2007,7 @@ export default {
checkPass: false, checkPass: false,
dataType: "", dataType: "",
body_fields: [], body_fields: [],
param_fields: [], param_fields: []
}); });
} else { } else {
this.$message.error(`请完善服务${indexOne + 1}中的信息`); this.$message.error(`请完善服务${indexOne + 1}中的信息`);
...@@ -2049,9 +2127,9 @@ export default { ...@@ -2049,9 +2127,9 @@ export default {
content_type: contentType, content_type: contentType,
data_service_type1: this.btnList[this.activeBtn].id, data_service_type1: this.btnList[this.activeBtn].id,
data_service_type2: 24, data_service_type2: 24,
response_type: "JSON", response_type: "JSON"
}; };
this.$api.workbench.fwzcFwcs(query).then((response) => { this.$api.workbench.fwzcFwcs(query).then(response => {
if (response.data.success == 1) { if (response.data.success == 1) {
let data = response.data.data; let data = response.data.data;
this.liucheng_list[indexOne].body_fields = data.body_fields; this.liucheng_list[indexOne].body_fields = data.body_fields;
...@@ -2117,7 +2195,7 @@ export default { ...@@ -2117,7 +2195,7 @@ export default {
self.checkTable(arr[i].children, rule, indexOne); self.checkTable(arr[i].children, rule, indexOne);
} }
} }
}, }
}, },
mounted() { mounted() {
let self = this; let self = this;
...@@ -2138,7 +2216,7 @@ export default { ...@@ -2138,7 +2216,7 @@ export default {
if (appmap_data) { if (appmap_data) {
_self.$store.commit("setAppBuilderParams", appmap_data); _self.$store.commit("setAppBuilderParams", appmap_data);
} }
}, }
}; };
</script> </script>
......
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